Skip to contentSkip to conversation

wifi: rtw89: 8852b: restore setting for RFE type 5 after device resume

PATCH In review Ping-Ke Shih 1 participant 2 messages May 17, 2024 – May 23, 2024 Realtek wireless driver (rtw89)

lore
Share & tools
lore

Ping-Ke Shih

author maintainer
#0 lore raw

PATCH 1/1 wifi: rtw89: 8852b: restore setting for RFE type 5 after device resume

The RFE type 5 set SPS analog parameters only once at probe stage, but the setting is missing after suspend/resume, so remove restriction and set the value when card power on/off.

Fixes 3ef60f44830a ("wifi: rtw89: 8852b: update hardware parameters for RFE type 5")
---
 drivers/net/wireless/realtek/rtw89/rtw8852b.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/realtek/rtw89/rtw8852b.c +3 -3
index 53ae00b5ab7c..517ad1a763fa 100644
@@ -403,6 +403,8 @@ static int rtw8852b_pwr_on_func(struct rtw89_dev *rtwdev)
 	u32 val32;
 	u32 ret;
 
+	rtw8852b_pwr_sps_ana(rtwdev);
+
 	rtw89_write32_clr(rtwdev, R_AX_SYS_PW_CTRL, B_AX_AFSM_WLSUS_EN |
 						    B_AX_AFSM_PCIE_SUS_EN);
 	rtw89_write32_set(rtwdev, R_AX_SYS_PW_CTRL, B_AX_DIS_WLBT_PDNSUSEN_SOPC);
@@ -530,9 +532,7 @@ static int rtw8852b_pwr_off_func(struct rtw89_dev *rtwdev)
 	u32 val32;
 	u32 ret;
 
-	/* Only do once during probe stage after reading efuse */
-	if (!test_bit(RTW89_FLAG_PROBE_DONE, rtwdev->flags))
-		rtw8852b_pwr_sps_ana(rtwdev);
+	rtw8852b_pwr_sps_ana(rtwdev);
 
 	ret = rtw89_mac_write_xtal_si(rtwdev, XTAL_SI_ANAPAR_WL, XTAL_SI_RFC2RF,
 				      XTAL_SI_RFC2RF);
Signature · 1 line
2.25.1
author maintainer
#1 lore raw
Quoted 6 lines · Ping-Ke Shih

The RFE type 5 set SPS analog parameters only once at probe stage, but the setting is missing after suspend/resume, so remove restriction and set the value when card power on/off.

Fixes 3ef60f44830a ("wifi: rtw89: 8852b: update hardware parameters for RFE type 5")

1 patch(es) applied to rtw-next branch of rtw.git, thanks.

2c1fc7c24cd4 wifi: rtw89: 8852b: restore setting for RFE type 5 after device resume

---
https://github.com/pkshih/rtw.git