Skip to contentSkip to conversation

rtw89: coex: set EN bit to PLT register

PATCH In review Ping-Ke Shih 2 participants 2 messages Feb 8, 2022 – Feb 10, 2022 Realtek wireless driver (rtw89)

lore
Share & tools
lore

Ping-Ke Shih

author maintainer
#0 lore raw

PATCH 1/1 rtw89: coex: set EN bit to PLT register

B_AX_PLT_EN is to enable polluted mechanism. If it is enabled and gnt_bt = 1 while wlan TX, B_AX_BT_PLT_PKT_CNT counter will increase, but TX counter to BB will not. Without this bit BTCoex mechanism might have some problems.

---
 drivers/net/wireless/realtek/rtw89/mac.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/wireless/realtek/rtw89/mac.c +4 -3
index 2e95d9007c41d..9fc7e1479737d 100644
@@ -3442,7 +3442,7 @@ int rtw89_mac_cfg_gnt(struct rtw89_dev *rtwdev,
 int rtw89_mac_cfg_plt(struct rtw89_dev *rtwdev, struct rtw89_mac_ax_plt *plt)
 {
 	u32 reg;
-	u8 val;
+	u16 val;
 	int ret;
 
 	ret = rtw89_mac_check_mac_en(rtwdev, plt->band, RTW89_CMAC_SEL);
@@ -3457,8 +3457,9 @@ int rtw89_mac_cfg_plt(struct rtw89_dev *rtwdev, struct rtw89_mac_ax_plt *plt)
 	      (plt->rx & RTW89_MAC_AX_PLT_LTE_RX ? B_AX_RX_PLT_GNT_LTE_RX : 0) |
 	      (plt->rx & RTW89_MAC_AX_PLT_GNT_BT_TX ? B_AX_RX_PLT_GNT_BT_TX : 0) |
 	      (plt->rx & RTW89_MAC_AX_PLT_GNT_BT_RX ? B_AX_RX_PLT_GNT_BT_RX : 0) |
-	      (plt->rx & RTW89_MAC_AX_PLT_GNT_WL ? B_AX_RX_PLT_GNT_WL : 0);
-	rtw89_write8(rtwdev, reg, val);
+	      (plt->rx & RTW89_MAC_AX_PLT_GNT_WL ? B_AX_RX_PLT_GNT_WL : 0) |
+	      B_AX_PLT_EN;
+	rtw89_write16(rtwdev, reg, val);
 
 	return 0;
 }
Signature · 1 line
2.25.1
#1 lore raw
Quoted 6 lines · Ping-Ke Shih

B_AX_PLT_EN is to enable polluted mechanism. If it is enabled and gnt_bt = 1 while wlan TX, B_AX_BT_PLT_PKT_CNT counter will increase, but TX counter to BB will not. Without this bit BTCoex mechanism might have some problems.

Patch applied to wireless-next.git, thanks.

28e7ea8a3128 rtw89: coex: set EN bit to PLT register

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

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