Commit b696d422 authored by Ching-Te Ku's avatar Ching-Te Ku Committed by Kalle Valo

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: default avatarChing-Te Ku <ku920601@realtek.com>
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220920010939.12173-5-pkshih@realtek.com
parent 3f386573
......@@ -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++;
......
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment