Skip to content

Commit

Permalink
mt7603: only issue PSE reset on PSE stuck
Browse files Browse the repository at this point in the history
The reset can take quite a bit of time, so only issue it when necessary

Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Nov 21, 2018
1 parent 94cebfc commit b38fe7d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mt7603/mac.c
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions mt7603/mt7603.h
Expand Up @@ -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;

Expand Down

0 comments on commit b38fe7d

Please sign in to comment.