Skip to content

Commit

Permalink
mt76x0: alloc mcu buffers first in mt76x0_mcu_cmd_init
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lorenzo Bianconi authored and Felix Fietkau committed Sep 19, 2018
1 parent 58b5eb8 commit d1b6eec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c
Original file line number Diff line number Diff line change
@@ -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);
}

0 comments on commit d1b6eec

Please sign in to comment.