diff mbox series

[v2,12/24] rtw88: add module param to switch lps supportability

Message ID 1550134743-17443-13-git-send-email-yhchuang@realtek.com (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show
Series rtw88: major fixes for 8822c to have stable functionalities | expand

Commit Message

Tony Chuang Feb. 14, 2019, 8:58 a.m. UTC
From: Yan-Hsuan Chuang <yhchuang@realtek.com>

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 <yhchuang@realtek.com>
---
 drivers/net/wireless/realtek/rtw88/main.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
index 5b2be74..233871e 100644
--- a/drivers/net/wireless/realtek/rtw88/main.c
+++ b/drivers/net/wireless/realtek/rtw88/main.c
@@ -13,11 +13,14 @@ 
 #include "efuse.h"
 #include "debug.h"
 
+static bool rtw_fw_support_lps;
 unsigned int rtw_debug_mask;
 EXPORT_SYMBOL(rtw_debug_mask);
 
+module_param_named(support_lps, rtw_fw_support_lps, bool, 0644);
 module_param_named(debug_mask, rtw_debug_mask, uint, 0644);
 
+MODULE_PARM_DESC(support_lps, "Set Y to enable LPS support");
 MODULE_PARM_DESC(debug_mask, "Debugging mask");
 
 static struct ieee80211_channel rtw_channeltable_2g[] = {
@@ -165,7 +168,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))