]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
mt76x0: alloc mcu buffers first in mt76x0_mcu_cmd_init
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Thu, 6 Sep 2018 09:18:46 +0000 (11:18 +0200)
committerFelix Fietkau <nbd@nbd.name>
Wed, 19 Sep 2018 10:31:03 +0000 (12:31 +0200)
swap mt76u_mcu_init_rx and mt76x0_mcu_function_select in
mt76x0_mcu_cmd_init routine in order to allocate mcu buffers
first and then send mcu commands

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c

index 0a0deaf1c65ddd8ca940a51232eece97e2dbaf9d..7be2835f3b4fcf126f2f7cc4646d84a919b769a0 100644 (file)
@@ -387,9 +387,11 @@ int mt76x0_mcu_init(struct mt76x0_dev *dev)
 
 int mt76x0_mcu_cmd_init(struct mt76x0_dev *dev)
 {
-       int ret = mt76x0_mcu_function_select(dev, Q_SELECT, 1);
+       int ret;
+
+       ret = mt76u_mcu_init_rx(&dev->mt76);
        if (ret)
                return ret;
 
-       return mt76u_mcu_init_rx(&dev->mt76);
+       return mt76x0_mcu_function_select(dev, Q_SELECT, 1);
 }