mt76: mt76x02: fix handling MCU timeouts during hw restart

If a MCU timeout occurs before a hw restart completes, another hw restart
is scheduled, and the station state gets corrupted.
To speed up dealing with that, do not issue any MCU commands after the first
timeout, and defer handling timeouts until the reset has completed.
Also ignore errors in MCU commands during start/config to avoid making user
space fail on this condition. If it happens, another restart is scheduled
quickly, and that usually recovers the hardware properly.

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2020-02-16 16:09:00 +01:00
parent f408a2b756
commit 17ecf07625
7 changed files with 31 additions and 13 deletions
+3
View File
@@ -20,6 +20,9 @@ int mt76x02_mcu_msg_send(struct mt76_dev *mdev, int cmd, const void *data,
int ret;
u8 seq;
if (mt76_is_mmio(&dev->mt76) && dev->mcu_timeout)
return -EIO;
skb = mt76x02_mcu_msg_alloc(data, len);
if (!skb)
return -ENOMEM;