wifi: rtw89: rfk: add to print debug log of CIM3K

Add calibration report of CIM3K, which does calibration in firmware and
send a C2H event as debug purpose.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260123013957.16418-5-pkshih@realtek.com
This commit is contained in:
Ping-Ke Shih 2026-01-23 09:39:50 +08:00
parent 17b75fbf9c
commit 571f945fb9
3 changed files with 41 additions and 0 deletions

View File

@ -5102,6 +5102,33 @@ struct rtw89_c2h_rf_txiqk_rpt_log {
__le32 tx_xym[2][6][14];
} __packed;
struct rtw89_c2h_rf_cim3k_rpt_log {
u8 cim3k_band[2];
u8 cim3k_ch[2];
u8 cim3k_bw[2];
u8 su_path_ok[2];
u8 ru_path_ok[2];
u8 txagc_cim3k[2];
u8 ther_cim3k[2];
u8 cim3k_gs[2];
__le16 cim3k_pwsf[2];
bool cim3k_nctldone[2];
u8 rsvd[2];
__le32 cim3k_rxiqc[2];
__le32 cim3k_su_coef[2][3];
__le16 dc_i[2];
__le16 dc_q[2];
u8 corr_val[2];
u8 corr_idx[2];
u8 rxbb_ov[2];
u8 cim3k_txiqc[2];
u8 kidx[2];
u8 fw_cim3k_ver;
bool su_cim3k_en[2];
bool ru_cim3k_en[2];
u8 rsvd1;
} __packed;
struct rtw89_c2h_rfk_report {
struct rtw89_c2h_hdr hdr;
u8 state; /* enum rtw89_rfk_report_state */

View File

@ -3457,6 +3457,7 @@ static void rtw89_phy_c2h_rfk_rpt_log(struct rtw89_dev *rtwdev,
struct rtw89_c2h_rf_txgapk_rpt_log *txgapk;
struct rtw89_c2h_rf_rxdck_rpt_log *rxdck;
struct rtw89_c2h_rf_txiqk_rpt_log *txiqk;
struct rtw89_c2h_rf_cim3k_rpt_log *cim3k;
struct rtw89_c2h_rf_dack_rpt_log *dack;
struct rtw89_c2h_rf_tssi_rpt_log *tssi;
struct rtw89_c2h_rf_dpk_rpt_log *dpk;
@ -3712,6 +3713,10 @@ static void rtw89_phy_c2h_rfk_rpt_log(struct rtw89_dev *rtwdev,
if (len != sizeof(*txiqk))
goto out;
return;
case RTW89_PHY_C2H_RFK_LOG_FUNC_CIM3K:
if (len != sizeof(*cim3k))
goto out;
return;
default:
break;
}
@ -3854,6 +3859,13 @@ rtw89_phy_c2h_rfk_log_txiqk(struct rtw89_dev *rtwdev, struct sk_buff *c2h, u32 l
RTW89_PHY_C2H_RFK_LOG_FUNC_TXIQK, "TXIQK");
}
static void
rtw89_phy_c2h_rfk_log_cim3k(struct rtw89_dev *rtwdev, struct sk_buff *c2h, u32 len)
{
rtw89_phy_c2h_rfk_log(rtwdev, c2h, len,
RTW89_PHY_C2H_RFK_LOG_FUNC_CIM3K, "CIM3K");
}
static
void (* const rtw89_phy_c2h_rfk_log_handler[])(struct rtw89_dev *rtwdev,
struct sk_buff *c2h, u32 len) = {
@ -3865,6 +3877,7 @@ void (* const rtw89_phy_c2h_rfk_log_handler[])(struct rtw89_dev *rtwdev,
[RTW89_PHY_C2H_RFK_LOG_FUNC_TXGAPK] = rtw89_phy_c2h_rfk_log_txgapk,
[RTW89_PHY_C2H_RFK_LOG_FUNC_TAS_PWR] = rtw89_phy_c2h_rfk_log_tas_pwr,
[RTW89_PHY_C2H_RFK_LOG_FUNC_TXIQK] = rtw89_phy_c2h_rfk_log_txiqk,
[RTW89_PHY_C2H_RFK_LOG_FUNC_CIM3K] = rtw89_phy_c2h_rfk_log_cim3k,
};
static

View File

@ -151,6 +151,7 @@ enum rtw89_phy_c2h_rfk_log_func {
RTW89_PHY_C2H_RFK_LOG_FUNC_TXGAPK = 5,
RTW89_PHY_C2H_RFK_LOG_FUNC_TAS_PWR = 9,
RTW89_PHY_C2H_RFK_LOG_FUNC_TXIQK = 0xc,
RTW89_PHY_C2H_RFK_LOG_FUNC_CIM3K = 0xe,
RTW89_PHY_C2H_RFK_LOG_FUNC_NUM,
};