Skip to contentSkip to conversation

wifi: rtw89: phy: reset value of force TX power for MAC ID

PATCH In review Ping-Ke Shih 1 participant 2 messages Mar 25, 2025 – Mar 31, 2025 Realtek wireless driver (rtw89)

lore
Share & tools
lore

Ping-Ke Shih

author maintainer
#0 lore raw

PATCH 1/1 wifi: rtw89: phy: reset value of force TX power for MAC ID

The force TX power function is disabled, but the force TX power value is preserved, causing misunderstand the behavior in debug. Clear all values.

---
 drivers/net/wireless/realtek/rtw89/phy_be.c |  2 +-
 drivers/net/wireless/realtek/rtw89/reg.h    | 10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtw89/phy_be.c +1 -1
index 37d8f254ae32..d321cf1fc485 100644
@@ -362,7 +362,7 @@ static void rtw89_phy_bb_wrap_force_cr_init(struct rtw89_dev *rtwdev,
 	rtw89_write32_mask(rtwdev, addr, B_BE_PWR_FORCE_RU_ENON, 0);
 	rtw89_write32_mask(rtwdev, addr, B_BE_PWR_FORCE_RU_ON, 0);
 	addr = rtw89_mac_reg_by_idx(rtwdev, R_BE_PWR_FORCE_MACID, mac_idx);
-	rtw89_write32_mask(rtwdev, addr, B_BE_PWR_FORCE_MACID_ON, 0);
+	rtw89_write32_mask(rtwdev, addr, B_BE_PWR_FORCE_MACID_ALL, 0);
 	addr = rtw89_mac_reg_by_idx(rtwdev, R_BE_PWR_COEX_CTRL, mac_idx);
 	rtw89_write32_mask(rtwdev, addr, B_BE_PWR_FORCE_COEX_ON, 0);
 	addr = rtw89_mac_reg_by_idx(rtwdev, R_BE_PWR_RATE_CTRL, mac_idx);
drivers/net/wireless/realtek/rtw89/reg.h +9 -1
index c776954ad360..6ef546d1b575 100644
@@ -7601,7 +7601,15 @@
 #define B_BE_PWR_FORCE_RU_ON BIT(18)
 #define B_BE_PWR_FORCE_RU_ENON BIT(28)
 #define R_BE_PWR_FORCE_MACID 0x11A48
-#define B_BE_PWR_FORCE_MACID_ON BIT(9)
+#define B_BE_PWR_FORCE_MACID_DBM_ON BIT(9)
+#define B_BE_PWR_FORCE_MACID_DBM_VAL GENMASK(17, 10)
+#define B_BE_PWR_FORCE_MACID_EN_VAL BIT(18)
+#define B_BE_PWR_FORCE_MACID_EN_ON BIT(19)
+#define B_BE_PWR_FORCE_MACID_ALL \
+	(B_BE_PWR_FORCE_MACID_DBM_ON | \
+	 B_BE_PWR_FORCE_MACID_DBM_VAL | \
+	 B_BE_PWR_FORCE_MACID_EN_VAL | \
+	 B_BE_PWR_FORCE_MACID_EN_ON)
 
 #define R_BE_PWR_REG_CTRL 0x11A50
 #define B_BE_PWR_BT_EN BIT(23)
Signature · 1 line
2.25.1
author maintainer
#1 lore raw
Quoted 4 lines · Ping-Ke Shih

The force TX power function is disabled, but the force TX power value is preserved, causing misunderstand the behavior in debug. Clear all values.

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

e95129709a86 wifi: rtw89: phy: reset value of force TX power for MAC ID

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