diff mbox series

[2/5] wifi: rtw89: coex: Not to enable firmware report when WiFi is power saving

Message ID 20230314020617.28193-3-pkshih@realtek.com (mailing list archive)
State Accepted
Commit 829b3a8b212a71b55598b9bd5861a41906a611ae
Delegated to: Kalle Valo
Headers show
Series wifi: rtw89: coex: complete first coexistence features for 8852b | expand

Commit Message

Ping-Ke Shih March 14, 2023, 2:06 a.m. UTC
From: Ching-Te Ku <ku920601@realtek.com>

If driver enable firmware report during WiFi power saving, the
firmware timer will lead to some power saving issue like,
fail to enter LPS, can not leave LPS or some unexpected issue.

Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw89/coex.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw89/coex.c b/drivers/net/wireless/realtek/rtw89/coex.c
index bd06388ea211e..d4a2ed254213b 100644
--- a/drivers/net/wireless/realtek/rtw89/coex.c
+++ b/drivers/net/wireless/realtek/rtw89/coex.c
@@ -1741,10 +1741,14 @@  static void rtw89_btc_fw_en_rpt(struct rtw89_dev *rtwdev,
 				u32 rpt_map, bool rpt_state)
 {
 	struct rtw89_btc *btc = &rtwdev->btc;
+	struct rtw89_btc_wl_smap *wl_smap = &btc->cx.wl.status.map;
 	struct rtw89_btc_btf_fwinfo *fwinfo = &btc->fwinfo;
 	struct rtw89_btc_btf_set_report r = {0};
 	u32 val, bit_map;
 
+	if ((wl_smap->rf_off || wl_smap->lps != BTC_LPS_OFF) && rpt_state != 0)
+		return;
+
 	bit_map = rtw89_btc_fw_rpt_ver(rtwdev, rpt_map);
 
 	rtw89_debug(rtwdev, RTW89_DBG_BTC,