Skip to contentSkip to conversation

wifi: rtw89: 8852c: correct set of IQK backup registers

PATCH In review Ping-Ke Shih 2 participants 3 messages Sep 30, 2022 – Oct 5, 2022 Realtek wireless driver (rtw89)

lore
Share & tools
lore

Ping-Ke Shih

author maintainer
#0 lore raw

PATCH 1/2 wifi: rtw89: 8852c: correct set of IQK backup registers

IQK can change the values of this register set, so need to backup and restore the values. During we rewrite IQK, the policy is changed. Some values are controlled and filled by IQK, and don't need to restore after IQK. Therefore, remove this kind of registers from this array.

---
 drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c +1 -2
index 006c2cf931116..1e67a565a9e0c 100644
@@ -22,8 +22,7 @@ static const u32 _tssi_de_mcs_5m[RF_PATH_NUM_8852C] = {0x5828, 0x7828};
 static const u32 _tssi_de_mcs_10m[RF_PATH_NUM_8852C] = {0x5830, 0x7830};
 
 static const u32 rtw8852c_backup_bb_regs[] = {
-	0x813c, 0x8124, 0x8120, 0xc0d4, 0xc0d8, 0xc0e8, 0x823c, 0x8224, 0x8220,
-	0xc1d4, 0xc1d8, 0xc1e8
+	0x8120, 0xc0d4, 0xc0d8, 0xc0e8, 0x8220, 0xc1d4, 0xc1d8, 0xc1e8
 };
 
 static const u32 rtw8852c_backup_rf_regs[] = {
Signature · 1 line
2.25.1
author maintainer
#1 lore raw

PATCH 2/2 wifi: rtw89: 8852c: rfk: correct miscoding delay of DPK

Using mdelay() can work well, but calibration causes too much time. Use proper udelay() to get shorter time and the same result.

---
 drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c +1 -1
index 1e67a565a9e0c..b0672b906e7bc 100644
@@ -1666,7 +1666,7 @@ static u8 _dpk_one_shot(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy,
 
 	ret = read_poll_timeout_atomic(rtw89_phy_read32_mask, val, val == 0x55,
 				       10, 20000, false, rtwdev, 0xbff8, MASKBYTE0);
-	mdelay(10);
+	udelay(10);
 	rtw89_phy_write32_clr(rtwdev, R_NCTL_N1, MASKBYTE0);
 
 	rtw89_debug(rtwdev, RTW89_DBG_RFK,
Signature · 1 line
2.25.1
#2 lore raw
In reply to Ping-Ke Shih
Quoted 6 lines · Ping-Ke Shih

IQK can change the values of this register set, so need to backup and restore the values. During we rewrite IQK, the policy is changed. Some values are controlled and filled by IQK, and don't need to restore after IQK. Therefore, remove this kind of registers from this array.

2 patches applied to wireless-next.git, thanks.

68b0ce5bb400 wifi: rtw89: 8852c: correct set of IQK backup registers 3be11416204a wifi: rtw89: 8852c: rfk: correct miscoding delay of DPK

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches