From: Yan-Hsuan Chuang <[email protected]>

The module parameter is added to turn on/off lps support. And the
default value is "N". It is because that lps is not compatible with
bt-coexistence, WOW/PNO and the calibration routines for now.

After trade lps support off against these functionalities, it is
reasonable to set the parameter default to "N".

Signed-off-by: Yan-Hsuan Chuang <[email protected]>
---
 drivers/net/wireless/realtek/rtw88/main.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtw88/main.c 
b/drivers/net/wireless/realtek/rtw88/main.c
index ef010dc..8a2ec8a 100644
--- a/drivers/net/wireless/realtek/rtw88/main.c
+++ b/drivers/net/wireless/realtek/rtw88/main.c
@@ -13,6 +13,10 @@
 #include "efuse.h"
 #include "debug.h"
 
+static bool rtw_fw_support_lps;
+module_param_named(support_lps, rtw_fw_support_lps, bool, 0644);
+MODULE_PARM_DESC(support_lps, "Set Y to enable LPS support");
+
 static struct ieee80211_channel rtw_channeltable_2g[] = {
        {.center_freq = 2412, .hw_value = 1,},
        {.center_freq = 2417, .hw_value = 2,},
@@ -158,7 +162,8 @@ static void rtw_watch_dog_work(struct work_struct *work)
         * more than two stations associated to the AP, then we can not enter
         * lps, because fw does not handle the overlapped beacon interval
         */
-       if (data.rtwvif && !data.active && data.assoc_cnt == 1)
+       if (rtw_fw_support_lps &&
+           data.rtwvif && !data.active && data.assoc_cnt == 1)
                rtw_enter_lps(rtwdev, data.rtwvif);
 
        if (rtw_flag_check(rtwdev, RTW_FLAG_SCANNING))
-- 
2.7.4

Reply via email to