Commit e58f6e06 authored by Felix Fietkau's avatar Felix Fietkau

mt76: mt76x02: reset MCU timeout counter earlier in watchdog reset

Ensure that MCU commands issued right after hardware reset are not dropped
and treated as failed.
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent c984457b
......@@ -461,6 +461,7 @@ static void mt76x02_watchdog_reset(struct mt76x02_dev *dev)
mutex_lock(&dev->mt76.mutex);
dev->mcu_timeout = 0;
if (restart)
mt76x02_reset_state(dev);
......@@ -544,10 +545,6 @@ static void mt76x02_check_tx_hang(struct mt76x02_dev *dev)
restart:
mt76x02_watchdog_reset(dev);
mutex_lock(&dev->mt76.mcu.mutex);
dev->mcu_timeout = 0;
mutex_unlock(&dev->mt76.mcu.mutex);
dev->tx_hang_reset++;
dev->tx_hang_check = 0;
memset(dev->mt76.tx_dma_idx, 0xff,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment