]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: rtw89: Disable deep power saving for USB/SDIO
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Mon, 30 Jun 2025 20:43:25 +0000 (23:43 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:25:56 +0000 (16:25 +0200)
[ Upstream commit a3b871a0f7c083c2a632a31da8bc3de554ae8550 ]

Disable deep power saving for USB and SDIO because rtw89_mac_send_rpwm()
is called in atomic context and accessing hardware registers results in
"scheduling while atomic" errors.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/0f49eceb-0de0-47e2-ba36-3c6a0dddd17d@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/realtek/rtw89/core.c

index 9e4a02a322ffe8e194242a80aec63045d2927ddb..ff3a31bf3a87d293de8bb9ec997dae2a873efacd 100644 (file)
@@ -1721,6 +1721,9 @@ static enum rtw89_ps_mode rtw89_update_ps_mode(struct rtw89_dev *rtwdev)
 {
        const struct rtw89_chip_info *chip = rtwdev->chip;
 
+       if (rtwdev->hci.type != RTW89_HCI_TYPE_PCIE)
+               return RTW89_PS_MODE_NONE;
+
        if (rtw89_disable_ps_mode || !chip->ps_mode_supported ||
            RTW89_CHK_FW_FEATURE(NO_DEEP_PS, &rtwdev->fw))
                return RTW89_PS_MODE_NONE;