]> git.baikalelectronics.ru Git - kernel.git/commit
mt76: mt7921s: fix the device cannot sleep deeply in suspend
authorSean Wang <sean.wang@mediatek.com>
Fri, 19 Nov 2021 23:22:11 +0000 (07:22 +0800)
committerFelix Fietkau <nbd@nbd.name>
Sun, 19 Dec 2021 14:24:00 +0000 (15:24 +0100)
commit3bfe7decfdda9621c0707fbb25b982f32de28887
tree797716d5c4374ac5ca21547e167a70dade5c5ecb
parent9d0159e88234533ea7938c186cb81a645699ee3f
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: cb31575e0168 ("mt76: mt7921: introduce mt7921s support")
Reported-by: Leon Yen <leon.yen@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
drivers/net/wireless/mediatek/mt76/mt7921/main.c
drivers/net/wireless/mediatek/mt76/mt7921/sdio.c
drivers/net/wireless/mediatek/mt76/sdio.c
drivers/net/wireless/mediatek/mt76/sdio_txrx.c