diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-03-10 19:10:59 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-03-17 19:13:59 +0300 |
commit | e58f6e0625c581b6d10962c35eace02590f8ce75 (patch) | |
tree | 69969a2f077d746c23f9c671c7a72b74e143fe47 /drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c | |
parent | c984457b661a5f86ea22f2b2fc52bd6c3503c9d8 (diff) | |
download | linux-e58f6e0625c581b6d10962c35eace02590f8ce75.tar.xz |
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: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c index c7f028e73b6b..7dcc5d342e9f 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c @@ -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, |