wifi: rtw89: coex: fine tune free-run policy and update debug counters
Ping-Ke Shih
maintainercover wifi: rtw89: coex: fine tune free-run policy and update debug counters
Main update related to 8851B is patch 4/4 that sends more information to firmware via H2C command, which converts to suggested format as well. Other patches are to update things found during developing BT-coexistence mechanism for 8851B.
Ching-Te Ku (3):
wifi: rtw89: coex: Enable Wi-Fi RX gain control for free run solution
wifi: rtw89: coex: Add path control register to monitor list
wifi: rtw89: coex: Update function to get BT RSSI and hardware counter
Ping-Ke Shih (1):
wifi: rtw89: coex: send more hardware module info to firmware for
8851B
drivers/net/wireless/realtek/rtw89/core.h | 5 +- drivers/net/wireless/realtek/rtw89/fw.c | 64 +++++----- drivers/net/wireless/realtek/rtw89/fw.h | 113 ++++++------------ drivers/net/wireless/realtek/rtw89/rtw8852a.c | 3 +- drivers/net/wireless/realtek/rtw89/rtw8852b.c | 11 +- drivers/net/wireless/realtek/rtw89/rtw8852c.c | 10 +- 6 files changed, 91 insertions(+), 115 deletions(-)
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerPATCH 1/4 wifi: rtw89: coex: Enable Wi-Fi RX gain control for free run solution
From: Ching-Te Ku <[email protected]>
When Wi-Fi & Bluetooth are both busy at the same time, Wi-Fi need to enable RX gain to protect Wi-Fi RX RF ability. Without this configure the interference from Bluetooth will bring a big impact to Wi-Fi RX.
--- drivers/net/wireless/realtek/rtw89/rtw8852b.c | 4 ++-- drivers/net/wireless/realtek/rtw89/rtw8852c.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/realtek/rtw89/rtw8852b.c +2 -2
@@ -323,7 +323,7 @@ static const struct rtw89_btc_rf_trx_para rtw89_btc_8852b_rf_ul[] = { {255, 0, 0, 7}, /* 2 ->reserved for shared-antenna */ {255, 0, 0, 7}, /* 3- >reserved for shared-antenna */ {255, 0, 0, 7}, /* 4 ->reserved for shared-antenna */ - {255, 0, 0, 7}, /* the below id is for non-shared-antenna free-run */ + {255, 1, 0, 7}, /* the below id is for non-shared-antenna free-run */ {6, 1, 0, 7}, {13, 1, 0, 7}, {13, 1, 0, 7}
@@ -335,7 +335,7 @@ static const struct rtw89_btc_rf_trx_para rtw89_btc_8852b_rf_dl[] = { {255, 0, 0, 7}, /* 2 ->reserved for shared-antenna */ {255, 0, 0, 7}, /* 3- >reserved for shared-antenna */ {255, 0, 0, 7}, /* 4 ->reserved for shared-antenna */ - {255, 0, 0, 7}, /* the below id is for non-shared-antenna free-run */ + {255, 1, 0, 7}, /* the below id is for non-shared-antenna free-run */ {255, 1, 0, 7}, {255, 1, 0, 7}, {255, 1, 0, 7}
drivers/net/wireless/realtek/rtw89/rtw8852c.c +2 -2
@@ -2536,7 +2536,7 @@ static const struct rtw89_btc_rf_trx_para rtw89_btc_8852c_rf_ul[] = { {255, 0, 0, 7}, /* 2 ->reserved for shared-antenna */ {255, 0, 0, 7}, /* 3- >reserved for shared-antenna */ {255, 0, 0, 7}, /* 4 ->reserved for shared-antenna */ - {255, 0, 0, 7}, /* the below id is for non-shared-antenna free-run */ + {255, 1, 0, 7}, /* the below id is for non-shared-antenna free-run */ {6, 1, 0, 7}, {13, 1, 0, 7}, {13, 1, 0, 7}
@@ -2548,7 +2548,7 @@ static const struct rtw89_btc_rf_trx_para rtw89_btc_8852c_rf_dl[] = { {255, 0, 0, 7}, /* 2 ->reserved for shared-antenna */ {255, 0, 0, 7}, /* 3- >reserved for shared-antenna */ {255, 0, 0, 7}, /* 4 ->reserved for shared-antenna */ - {255, 0, 0, 7}, /* the below id is for non-shared-antenna free-run */ + {255, 1, 0, 7}, /* the below id is for non-shared-antenna free-run */ {255, 1, 0, 7}, {255, 1, 0, 7}, {255, 1, 0, 7}
Signature · 1 line
2.25.1
Re: [PATCH 1/4] wifi: rtw89: coex: Enable Wi-Fi RX gain control for free run solution
Quoted 8 lines · Ping-Ke Shih
From: Ching-Te Ku <[email protected]>
When Wi-Fi & Bluetooth are both busy at the same time, Wi-Fi need to enable RX gain to protect Wi-Fi RX RF ability. Without this configure the interference from Bluetooth will bring a big impact to Wi-Fi RX.
Signed-off-by Ching-Te Ku <[email protected]>Signed-off-by Ping-Ke Shih <[email protected]>
4 patches applied to wireless-next.git, thanks.
36ef71db559f wifi: rtw89: coex: Enable Wi-Fi RX gain control for free run solution 9fde30562840 wifi: rtw89: coex: Add path control register to monitor list 2380a220316f wifi: rtw89: coex: Update function to get BT RSSI and hardware counter c0fea064b264 wifi: rtw89: coex: send more hardware module info to firmware for 8851B
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Ping-Ke Shih
maintainerPATCH 2/4 wifi: rtw89: coex: Add path control register to monitor list
In reply to Ping-Ke ShihFrom: Ching-Te Ku <[email protected]>
Chips use similar hardware for path control, but could different path/antenna configuration. Add these register to monitor, if there are wrong settings, these register can help to debug.
--- drivers/net/wireless/realtek/rtw89/rtw8852b.c | 4 +++- drivers/net/wireless/realtek/rtw89/rtw8852c.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw89/rtw8852b.c +3 -1
@@ -355,7 +355,9 @@ static const struct rtw89_btc_fbtc_mreg rtw89_btc_8852b_mon_reg[] = {RTW89_DEF_FBTC_MREG (REG_MAC ,4 ,0xd200 ),RTW89_DEF_FBTC_MREG (REG_MAC ,4 ,0xd220 ),RTW89_DEF_FBTC_MREG (REG_BB ,4 ,0x980 ), - RTW89_DEF_FBTC_MREG(REG_BT_MODEM, 4, 0x178), +RTW89_DEF_FBTC_MREG (REG_BB ,4 ,0x4738 ), +RTW89_DEF_FBTC_MREG (REG_BB ,4 ,0x4688 ), + RTW89_DEF_FBTC_MREG(REG_BB, 4, 0x4694), };static const u8 rtw89_btc_8852b_wl_rssi_thres[BTC_WL_RSSI_THMAX ] = {70 ,60 ,50 ,40 };
drivers/net/wireless/realtek/rtw89/rtw8852c.c +3 -0
@@ -2570,6 +2570,9 @@ static const struct rtw89_btc_fbtc_mreg rtw89_btc_8852c_mon_reg[] = {RTW89_DEF_FBTC_MREG (REG_MAC ,4 ,0xd200 ),RTW89_DEF_FBTC_MREG (REG_MAC ,4 ,0xd220 ),RTW89_DEF_FBTC_MREG (REG_BB ,4 ,0x980 ), +RTW89_DEF_FBTC_MREG (REG_BB ,4 ,0x4aa4 ), +RTW89_DEF_FBTC_MREG (REG_BB ,4 ,0x4778 ), + RTW89_DEF_FBTC_MREG(REG_BB, 4, 0x476c), }; static
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerPATCH 3/4 wifi: rtw89: coex: Update function to get BT RSSI and hardware counter
In reply to Ping-Ke ShihFrom: Ching-Te Ku <[email protected]>
Correct Bluetooth RSSI count method. The 6dB is the gap between hardware packet sampled value and real RSSI value.
--- drivers/net/wireless/realtek/rtw89/rtw8852a.c | 3 ++- drivers/net/wireless/realtek/rtw89/rtw8852b.c | 3 ++- drivers/net/wireless/realtek/rtw89/rtw8852c.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-)
drivers/net/wireless/realtek/rtw89/rtw8852a.c +2 -1
@@ -1827,7 +1827,8 @@ rtw8852a_btc_set_wl_txpwr_ctrl(struct rtw89_dev *rtwdev, u32 txpwr_val)static s8 rtw8852a_btc_get_bt_rssi (struct rtw89_dev *rtwdev,s8 val) { -return clamp_t (s8, val,-100 ,0 ) +100 ; +/* +6 for compensate offset */ +return clamp_t (s8, val +6 ,-100 ,0 ) +100 ; }static struct rtw89_btc_rf_trx_para rtw89_btc_8852a_rf_ul[] = {
drivers/net/wireless/realtek/rtw89/rtw8852b.c +2 -1
@@ -2269,7 +2269,8 @@ do { \static s8 rtw8852b_btc_get_bt_rssi (struct rtw89_dev *rtwdev,s8 val) { -return clamp_t (s8, val,-100 ,0 ) +100 ; +/* +6 for compensate offset */ +return clamp_t (s8, val +6 ,-100 ,0 ) +100 ; } static
drivers/net/wireless/realtek/rtw89/rtw8852c.c +2 -1
@@ -2527,7 +2527,8 @@ do { \static s8 rtw8852c_btc_get_bt_rssi (struct rtw89_dev *rtwdev,s8 val) { -return clamp_t (s8, val,-100 ,0 ) +100 ; +/* +6 for compensate offset */ +return clamp_t (s8, val +6 ,-100 ,0 ) +100 ; }static const struct rtw89_btc_rf_trx_para rtw89_btc_8852c_rf_ul[] = {
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerPATCH 4/4 wifi: rtw89: coex: send more hardware module info to firmware for 8851B
In reply to Ping-Ke Shih8851B has various hardware module types, so BT coexistence in firmware needs these information to make decision. Add them to make 8851B work well.
--- drivers/net/wireless/realtek/rtw89/core.h | 5 +- drivers/net/wireless/realtek/rtw89/fw.c | 64 ++++++------ drivers/net/wireless/realtek/rtw89/fw.h | 113 +++++++--------------- 3 files changed, 75 insertions(+), 107 deletions(-)
drivers/net/wireless/realtek/rtw89/core.h +4 -1
@@ -957,6 +957,8 @@ struct rtw89_btc_ant_info { u8 single_pos: 1;/* Single antenna at S0 or S1 */ u8 diversity: 1; + u8 btg_pos: 2; + u8 stream_cnt: 4; };enum rtw89_tfc_dir {
@@ -1413,8 +1415,9 @@ struct rtw89_btc_module { u8 bt_solo: 1; u8 bt_pos: 1; u8 switch_type: 1; + u8 wa_type: 3; -u8 rsvd; +u8 kt_ver_adie; };#define RTW89_BTC_DM_MAXSTEP 30
drivers/net/wireless/realtek/rtw89/fw.c +35 -29
87 lines not on this page · raw message
drivers/net/wireless/realtek/rtw89/fw.h +36 -77
121 lines not on this page · raw message
Signature · 1 line
2.25.1