]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtw89: 8852b: restore setting for RFE type 5 after device resume
authorPing-Ke Shih <pkshih@realtek.com>
Fri, 17 May 2024 01:35:43 +0000 (09:35 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Thu, 23 May 2024 03:33:38 +0000 (11:33 +0800)
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")
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/20240517013543.11533-1-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/rtw8852b.c

index 53ae00b5ab7cce8a3c1be2cd20ed60add904f76a..517ad1a763fa417bcb9f8e9139fb0b6d4e502bfb 100644 (file)
@@ -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);