summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/realtek/rtw88/wow.c
diff options
context:
space:
mode:
authorChin-Yen Lee <timlee@realtek.com>2020-10-30 09:48:26 +0100
committerKalle Valo <kvalo@codeaurora.org>2020-11-07 16:51:06 +0100
commitfc3ac64a3a28682f856c920b97f8359c6a5ebd2c (patch)
tree5f6bb28c8b41ddf1fbe978a96941c853958edc5f /drivers/net/wireless/realtek/rtw88/wow.c
parentrtw88: add C2H response for checking firmware leave lps (diff)
downloadlinux-fc3ac64a3a28682f856c920b97f8359c6a5ebd2c.tar.xz
linux-fc3ac64a3a28682f856c920b97f8359c6a5ebd2c.zip
rtw88: decide lps deep mode from firmware feature.
This patch checks the supported lps deep mode from firmware feature, and allows different firmware have different deep power mode. Original module parameter rtw_fw_lps_deep_mode is replaced with rtw_disable_lps_deep_mode for user to disable lps deep mode. Signed-off-by: Chin-Yen Lee <timlee@realtek.com> Signed-off-by: Tzu-En Huang <tehuang@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20201030084826.9034-5-tehuang@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtw88/wow.c')
-rw-r--r--drivers/net/wireless/realtek/rtw88/wow.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/wow.c b/drivers/net/wireless/realtek/rtw88/wow.c
index 2fcdf70a3a77..b419bc28861f 100644
--- a/drivers/net/wireless/realtek/rtw88/wow.c
+++ b/drivers/net/wireless/realtek/rtw88/wow.c
@@ -555,7 +555,7 @@ static int rtw_wow_leave_no_link_ps(struct rtw_dev *rtwdev)
int ret = 0;
if (test_bit(RTW_FLAG_WOWLAN, rtwdev->flags)) {
- if (rtw_fw_lps_deep_mode)
+ if (rtw_get_lps_deep_mode(rtwdev) != LPS_DEEP_MODE_NONE)
rtw_leave_lps_deep(rtwdev);
} else {
if (test_bit(RTW_FLAG_INACTIVE_PS, rtwdev->flags)) {
@@ -616,7 +616,8 @@ static int rtw_wow_enter_ps(struct rtw_dev *rtwdev)
if (rtw_wow_mgd_linked(rtwdev))
ret = rtw_wow_enter_linked_ps(rtwdev);
- else if (rtw_wow_no_link(rtwdev) && rtw_fw_lps_deep_mode)
+ else if (rtw_wow_no_link(rtwdev) &&
+ rtw_get_lps_deep_mode(rtwdev) != LPS_DEEP_MODE_NONE)
ret = rtw_wow_enter_no_link_ps(rtwdev);
return ret;