Commit b60b4686 authored by Ching-Te Ku's avatar Ching-Te Ku Committed by Ping-Ke Shih

wifi: rtw89: coex: Add Bluetooth frequency hopping map version 7

The report is reported from Bluetooth, it described the usable
Bluetooth channel map. Bluetooth should not hopped into Wi-Fi
using channel. Version 8 report adjust the structure variables
order.
Signed-off-by: default avatarChing-Te Ku <ku920601@realtek.com>
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/20240423130502.32682-4-pkshih@realtek.com
parent e5d0305a
......@@ -1138,6 +1138,7 @@ static void _update_bt_report(struct rtw89_dev *rtwdev, u8 rpt_type, u8 *pfinfo)
struct rtw89_btc_fbtc_btscan_v7 *pscan_v7;
struct rtw89_btc_fbtc_btafh *pafh_v1 = NULL;
struct rtw89_btc_fbtc_btafh_v2 *pafh_v2 = NULL;
struct rtw89_btc_fbtc_btafh_v7 *pafh_v7 = NULL;
struct rtw89_btc_fbtc_btdevinfo *pdev = NULL;
bool scan_update = true;
int i;
......@@ -1198,6 +1199,17 @@ static void _update_bt_report(struct rtw89_dev *rtwdev, u8 rpt_type, u8 *pfinfo)
memcpy(&bt_linfo->afh_map_le[0], pafh_v2->afh_le_a, 4);
memcpy(&bt_linfo->afh_map_le[4], pafh_v2->afh_le_b, 1);
}
} else if (ver->fcxbtafh == 7) {
pafh_v7 = (struct rtw89_btc_fbtc_btafh_v7 *)pfinfo;
if (pafh_v7->map_type & RPT_BT_AFH_SEQ_LEGACY) {
memcpy(&bt_linfo->afh_map[0], pafh_v7->afh_l, 4);
memcpy(&bt_linfo->afh_map[4], pafh_v7->afh_m, 4);
memcpy(&bt_linfo->afh_map[8], pafh_v7->afh_h, 2);
}
if (pafh_v7->map_type & RPT_BT_AFH_SEQ_LE) {
memcpy(&bt_linfo->afh_map_le[0], pafh_v7->afh_le_a, 4);
memcpy(&bt_linfo->afh_map_le[4], pafh_v7->afh_le_b, 1);
}
} else if (ver->fcxbtafh == 1) {
pafh_v1 = (struct rtw89_btc_fbtc_btafh *)pfinfo;
memcpy(&bt_linfo->afh_map[0], pafh_v1->afh_l, 4);
......
......@@ -2735,6 +2735,18 @@ struct rtw89_btc_fbtc_btafh_v2 {
u8 afh_le_b[4];
} __packed;
struct rtw89_btc_fbtc_btafh_v7 {
u8 fver;
u8 map_type;
u8 rsvd0;
u8 rsvd1;
u8 afh_l[4]; /*bit0:2402, bit1:2403.... bit31:2433 */
u8 afh_m[4]; /*bit0:2434, bit1:2435.... bit31:2465 */
u8 afh_h[4]; /*bit0:2466, bit1:2467.....bit14:2480 */
u8 afh_le_a[4];
u8 afh_le_b[4];
} __packed;
struct rtw89_btc_fbtc_btdevinfo {
u8 fver; /* btc_ver::fcxbtdevinfo */
u8 rsvd;
......
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