mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt7921s: fix the device cannot sleep deeply in suspend
According to the MT7921S firmware, the cmd MCU_UNI_CMD_HIF_CTRL have to
be last MCU command to execute in suspend handler and all data traffic
have to be stopped before the cmd MCU_UNI_CMD_HIF_CTRL starts as well
in order that mt7921 can successfully fall into the deep sleep mode.
Where we reuse the flag MT76_STATE_SUSPEND and avoid creating
another global flag to stop all of the traffic onto the SDIO bus.
Fixes: 48fab5bbef40 ("mt76: mt7921: introduce mt7921s support")
Reported-by: Leon Yen <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+2
-1
@@ -317,7 +317,8 @@ void mt76s_txrx_worker(struct mt76_sdio *sdio)
|
||||
if (ret > 0)
|
||||
nframes += ret;
|
||||
|
||||
if (test_bit(MT76_MCU_RESET, &dev->phy.state)) {
|
||||
if (test_bit(MT76_MCU_RESET, &dev->phy.state) ||
|
||||
test_bit(MT76_STATE_SUSPEND, &dev->phy.state)) {
|
||||
if (!mt76s_txqs_empty(dev))
|
||||
continue;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user