wifi: rtw89: coex: update to support new firmware 0.29.122.0
Ping-Ke Shih
maintainercover wifi: rtw89: coex: update to support new firmware 0.29.122.0
The format of firmware commands/events of 0.29.122.0 for coex is changed, so implement the changes accordingly.
Ching-Te Ku (4):
wifi: rtw89: coex: RTL8852BT coexistence Wi-Fi firmware support for
0.29.122.0
wifi: rtw89: coex: Fix coexistence report not show as expected
wifi: rtw89: coex: Add parser for Bluetooth channel map report version
7wifi: rtw89: coex: Update Wi-Fi/Bluetooth coexistence version to 7.0.4
drivers/net/wireless/realtek/rtw89/coex.c | 16 +++++++++++++--- drivers/net/wireless/realtek/rtw89/core.h | 1 + 2 files changed, 14 insertions(+), 3 deletions(-)
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerPATCH 1/4 wifi: rtw89: coex: RTL8852BT coexistence Wi-Fi firmware support for 0.29.122.0
From: Ching-Te Ku <[email protected]>
Add format version of Wi-Fi firmware commands/events for firmware version 0.29.122.0.
--- drivers/net/wireless/realtek/rtw89/coex.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/net/wireless/realtek/rtw89/coex.c +8 -0
@@ -132,6 +132,14 @@ static const u32 cxtbl[] = {static const struct rtw89_btc_ver rtw89_btc_ver_defs[] = {/* firmware version must be in decreasing order for each chip */ + {RTL8852BT ,RTW89_FW_VER_CODE (0 ,29 ,122 ,0 ), + .fcxbtcrpt =8 , .fcxtdma =7 , .fcxslots =7 , .fcxcysta =7 , + .fcxstep =7 , .fcxnullsta =7 , .fcxmreg =7 , .fcxgpiodbg =7 , + .fcxbtver =7 , .fcxbtscan =7 , .fcxbtafh =7 , .fcxbtdevinfo =7 , + .fwlrole =7 , .frptmap =3 , .fcxctrl =7 , .fcxinit =7 , + .fwevntrptl =1 , .fwc2hfunc =2 , .drvinfo_type =1 , .info_buf =1800 , + .max_role_num =6 , + }, {RTL8852BT ,RTW89_FW_VER_CODE (0 ,29 ,90 ,0 ), .fcxbtcrpt =7 , .fcxtdma =7 , .fcxslots =7 , .fcxcysta =7 , .fcxstep =7 , .fcxnullsta =7 , .fcxmreg =7 , .fcxgpiodbg =7 ,
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerRe: [PATCH rtw-next 1/4] wifi: rtw89: coex: RTL8852BT coexistence Wi-Fi firmware support for 0.29.122.0
Quoted 7 lines · Ping-Ke Shih
From: Ching-Te Ku <[email protected]>
Add format version of Wi-Fi firmware commands/events for firmware version 0.29.122.0.
Signed-off-by Ching-Te Ku <[email protected]>Signed-off-by Ping-Ke Shih <[email protected]>
4 patch(es) applied to rtw-next branch of rtw.git, thanks.
bb76dd94b7c7 wifi: rtw89: coex: RTL8852BT coexistence Wi-Fi firmware support for 0.29.122.0 a36230aa5f5e wifi: rtw89: coex: Fix coexistence report not show as expected 6db476db57ca wifi: rtw89: coex: Add parser for Bluetooth channel map report version 7 e5c45671d996 wifi: rtw89: coex: Update Wi-Fi/Bluetooth coexistence version to 7.0.4
Ping-Ke Shih
maintainerPATCH 2/4 wifi: rtw89: coex: Fix coexistence report not show as expected
In reply to Ping-Ke ShihFrom: Ching-Te Ku <[email protected]>
This report will feedback some basic information from firmware(PTA counter, report counter, mailbox counter etc). And the report version need to match driver & firmware both side. The original logic break the switch case logic before driver update the report version. It made the report can not be parsed correctly. Delete the break at the version 7 and 8.
Add logic to count C2H event report.
--- drivers/net/wireless/realtek/rtw89/coex.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/realtek/rtw89/coex.c +1 -2
@@ -1380,11 +1380,9 @@ static u32 _chk_btc_report(struct rtw89_dev *rtwdev, }else if (ver->fcxbtcrpt ==8 ) { pfinfo = &pfwinfo->rpt_ctrl.finfo.v8; pcinfo->req_len =sizeof (pfwinfo->rpt_ctrl.finfo.v8); -break ; }else if (ver->fcxbtcrpt ==7 ) { pfinfo = &pfwinfo->rpt_ctrl.finfo.v7; pcinfo->req_len =sizeof (pfwinfo->rpt_ctrl.finfo.v7); -break ; }else { goto err; }
@@ -8108,6 +8106,7 @@ void rtw89_btc_c2h_handle(struct rtw89_dev *rtwdev, struct sk_buff *skb,return ; func =rtw89_btc_c2h_get_index_by_ver (rtwdev, func); + pfwinfo->cnt_c2h++;switch (func) {case BTF_EVNT_BUF_OVERFLOW :
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerPATCH 3/4 wifi: rtw89: coex: Add parser for Bluetooth channel map report version 7
In reply to Ping-Ke ShihFrom: Ching-Te Ku <[email protected]>
In order to rearrange the structure member, the format update to version 7. And to parse the report correctly, add the related logic.
--- drivers/net/wireless/realtek/rtw89/coex.c | 3 +++ drivers/net/wireless/realtek/rtw89/core.h | 1 + 2 files changed, 4 insertions(+)
drivers/net/wireless/realtek/rtw89/coex.c +3 -0
@@ -1540,6 +1540,9 @@ static u32 _chk_btc_report(struct rtw89_dev *rtwdev, }else if (ver->fcxbtafh ==2 ) { pfinfo = &pfwinfo->rpt_fbtc_btafh.finfo.v2; pcinfo->req_len =sizeof (pfwinfo->rpt_fbtc_btafh.finfo.v2); + }else if (ver->fcxbtafh ==7 ) { + pfinfo = &pfwinfo->rpt_fbtc_btafh.finfo.v7; + pcinfo->req_len =sizeof (pfwinfo->rpt_fbtc_btafh.finfo.v7); }else { goto err; }
drivers/net/wireless/realtek/rtw89/core.h +1 -0
@@ -3044,6 +3044,7 @@ struct rtw89_btc_rpt_cmn_info {union rtw89_btc_fbtc_btafh_info {struct rtw89_btc_fbtc_btafh v1;struct rtw89_btc_fbtc_btafh_v2 v2; +struct rtw89_btc_fbtc_btafh_v7 v7; };struct rtw89_btc_report_ctrl_state {
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerPATCH 4/4 wifi: rtw89: coex: Update Wi-Fi/Bluetooth coexistence version to 7.0.4
In reply to Ping-Ke ShihFrom: Ching-Te Ku <[email protected]>
RTL8852BE-VT support for firmware 29.122. Add parser for Bluetooth channel map report version 7.
--- drivers/net/wireless/realtek/rtw89/coex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw89/coex.c +1 -1
@@ -10,7 +10,7 @@#include "ps.h" #include "reg.h" -#define RTW89_COEX_VERSION 0x07000313 +#define RTW89_COEX_VERSION 0x07000413#define FCXDEF_STEP 50/* MUST <= FCXMAX_STEP and match with wl fw*/ #define BTC_E2G_LIMIT_DEF 80
Signature · 1 line
2.25.1