diff options
author | Bo Jiao <Bo.Jiao@mediatek.com> | 2023-04-05 07:24:37 +0800 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2023-04-17 17:46:05 +0200 |
commit | 27015b6fbcca836c6dbf196afc266e068af4aeec (patch) | |
tree | 43f55242a02a62d6d834189848874f7bf2425f10 /drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | |
parent | 1b83d17ccece7db5e0ad4602969c1146f1381c3d (diff) |
wifi: mt76: mt7996: enable full system reset support
Add mt7996_reset() and refactor mt7996_mac_reset_work() to support
full system recovery.
Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7996/mmio.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c b/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c index fc77641ce7bf..8d6ab919d086 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c @@ -289,10 +289,9 @@ static void mt7996_irq_tasklet(struct tasklet_struct *t) u32 val = mt76_rr(dev, MT_MCU_CMD); mt76_wr(dev, MT_MCU_CMD, val); - if (val & MT_MCU_CMD_ERROR_MASK) { - dev->reset_state = val; - ieee80211_queue_work(mt76_hw(dev), &dev->reset_work); - wake_up(&dev->reset_wait); + if (val & (MT_MCU_CMD_ERROR_MASK | MT_MCU_CMD_WDT_MASK)) { + dev->recovery.state = val; + mt7996_reset(dev); } } } |