wifi: rtw89: coex: add v1 Wi-Fi firmware steps report

This report is to record firmware call flow like notify events, and take
actions. This can help to address if firmware flow is in expectation.
Implement v1 parser to support 8852CE firmware report.

Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220920010939.12173-5-pkshih@realtek.com
This commit is contained in:
Ching-Te Ku 2022-09-20 09:09:34 +08:00 committed by Kalle Valo
parent 3f386573d4
commit b696d42205
2 changed files with 23 additions and 4 deletions

View File

@ -997,9 +997,17 @@ static u32 _chk_btc_report(struct rtw89_dev *rtwdev,
break;
case BTC_RPT_TYPE_STEP:
pcinfo = &pfwinfo->rpt_fbtc_step.cinfo;
pfinfo = &pfwinfo->rpt_fbtc_step.finfo;
pcinfo->req_len = sizeof(pfwinfo->rpt_fbtc_step.finfo.step[0]) *
trace_step + 8;
if (chip->chip_id == RTL8852A) {
pfinfo = &pfwinfo->rpt_fbtc_step.finfo;
pcinfo->req_len = sizeof(pfwinfo->rpt_fbtc_step.finfo.step[0]) *
trace_step +
offsetof(struct rtw89_btc_fbtc_steps, step);
} else {
pfinfo = &pfwinfo->rpt_fbtc_step.finfo_v1;
pcinfo->req_len = sizeof(pfwinfo->rpt_fbtc_step.finfo_v1.step[0]) *
trace_step +
offsetof(struct rtw89_btc_fbtc_steps_v1, step);
}
pcinfo->req_fver = chip->fcxstep_ver;
pcinfo->rx_len = rpt_len;
pcinfo->rx_cnt++;

View File

@ -1629,6 +1629,14 @@ struct rtw89_btc_fbtc_steps {
struct rtw89_btc_fbtc_step step[FCXMAX_STEP];
} __packed;
struct rtw89_btc_fbtc_steps_v1 {
u8 fver;
u8 en;
__le16 rsvd;
__le32 cnt;
struct rtw89_btc_fbtc_step step[FCXMAX_STEP];
} __packed;
struct rtw89_btc_fbtc_cysta { /* statistics for cycles */
u8 fver; /* chip_info::fcxcysta_ver */
u8 rsvd;
@ -1903,7 +1911,10 @@ struct rtw89_btc_rpt_fbtc_cysta {
struct rtw89_btc_rpt_fbtc_step {
struct rtw89_btc_rpt_cmn_info cinfo; /* common info, by driver */
struct rtw89_btc_fbtc_steps finfo; /* info from fw */
union {
struct rtw89_btc_fbtc_steps finfo; /* info from fw */
struct rtw89_btc_fbtc_steps_v1 finfo_v1; /* info from fw */
};
};
struct rtw89_btc_rpt_fbtc_nullsta {