mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 21:36:52 +00:00
mt7603: only issue PSE reset on PSE stuck
The reset can take quite a bit of time, so only issue it when necessary Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+5
-1
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user