diff --git a/mt7603/mac.c b/mt7603/mac.c index 5526e1977..62dec4c02 100644 --- a/mt7603/mac.c +++ b/mt7603/mac.c @@ -1293,7 +1293,10 @@ static void mt7603_mac_watchdog_reset(struct mt7603_dev *dev) mt7603_beacon_set_timer(dev, -1, 0); - mt7603_pse_reset(dev); + if (dev->reset_cause[RESET_CAUSE_RESET_FAILED] || + dev->cur_reset_cause == RESET_CAUSE_RX_PSE_BUSY) + mt7603_pse_reset(dev); + if (dev->reset_cause[RESET_CAUSE_RESET_FAILED]) goto skip_dma_reset; @@ -1442,6 +1445,7 @@ mt7603_watchdog_check(struct mt7603_dev *dev, u8 *counter, if (*counter < MT7603_WATCHDOG_TIMEOUT) return false; trigger: + dev->cur_reset_cause = cause; dev->reset_cause[cause]++; return true; } diff --git a/mt7603/mt7603.h b/mt7603/mt7603.h index 5e15f4445..27ac2f4a5 100644 --- a/mt7603/mt7603.h +++ b/mt7603/mt7603.h @@ -135,6 +135,8 @@ struct mt7603_dev { u8 rx_pse_check; u8 mcu_hang; + enum mt7603_reset_cause cur_reset_cause; + u16 tx_dma_idx[4]; u16 rx_dma_idx;