wifi: rtw89: coex: Add version code for Wi-Fi firmware coexistence control
authorChing-Te Ku <ku920601@realtek.com>
Fri, 6 Jan 2023 12:08:38 +0000 (20:08 +0800)
committerKalle Valo <kvalo@kernel.org>
Mon, 16 Jan 2023 13:36:57 +0000 (15:36 +0200)
The newer Wi-Fi firmware are all changed to "Not to send H2C to
mention firmware how many call flow step should firmware trace".
The structure had removed the member, and define the steps number
at newer version firmware.

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/20230106120844.17441-2-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/fw.c

index 98cfadda8f45e867fc5b255cee64dbd38fd0e867..85c7172e931bf8c756670d4ee41af9ce5a806cfd 100644 (file)
@@ -1992,8 +1992,8 @@ fail:
 #define H2C_LEN_CXDRVINFO_CTRL (4 + H2C_LEN_CXDRVHDR)
 int rtw89_fw_h2c_cxdrv_ctrl(struct rtw89_dev *rtwdev)
 {
-       const struct rtw89_chip_info *chip = rtwdev->chip;
        struct rtw89_btc *btc = &rtwdev->btc;
+       const struct rtw89_btc_ver *ver = btc->ver;
        struct rtw89_btc_ctrl *ctrl = &btc->ctrl;
        struct sk_buff *skb;
        u8 *cmd;
@@ -2013,7 +2013,7 @@ int rtw89_fw_h2c_cxdrv_ctrl(struct rtw89_dev *rtwdev)
        RTW89_SET_FWCMD_CXCTRL_MANUAL(cmd, ctrl->manual);
        RTW89_SET_FWCMD_CXCTRL_IGNORE_BT(cmd, ctrl->igno_bt);
        RTW89_SET_FWCMD_CXCTRL_ALWAYS_FREERUN(cmd, ctrl->always_freerun);
-       if (chip->chip_id == RTL8852A)
+       if (ver->fcxctrl == 0)
                RTW89_SET_FWCMD_CXCTRL_TRACE_STEP(cmd, ctrl->trace_step);
 
        rtw89_h2c_pkt_set_hdr(rtwdev, skb, FWCMD_TYPE_H2C,