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

wifi: rtw89: coex: Add Bluetooth scan parameter report version 7

This report is reported from Bluetooth, it described Bluetooth scan
parameters. Version 7 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-3-pkshih@realtek.com
parent 430d80e7
......@@ -1135,6 +1135,7 @@ static void _update_bt_report(struct rtw89_dev *rtwdev, u8 rpt_type, u8 *pfinfo)
struct rtw89_btc_fbtc_btver *pver = NULL;
struct rtw89_btc_fbtc_btscan_v1 *pscan_v1;
struct rtw89_btc_fbtc_btscan_v2 *pscan_v2;
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_btdevinfo *pdev = NULL;
......@@ -1172,6 +1173,15 @@ static void _update_bt_report(struct rtw89_dev *rtwdev, u8 rpt_type, u8 *pfinfo)
pscan_v2->para[i].intvl == 0)
scan_update = false;
}
} else if (ver->fcxbtscan == 7) {
pscan_v7 = (struct rtw89_btc_fbtc_btscan_v7 *)pfinfo;
for (i = 0; i < CXSCAN_MAX; i++) {
bt->scan_info_v2[i] = pscan_v7->para[i];
if ((pscan_v7->type & BIT(i)) &&
pscan_v7->para[i].win == 0 &&
pscan_v7->para[i].intvl == 0)
scan_update = false;
}
}
if (scan_update)
bt->scan_info_update = 1;
......@@ -1428,6 +1438,11 @@ static u32 _chk_btc_report(struct rtw89_dev *rtwdev,
} else if (ver->fcxbtscan == 2) {
pfinfo = &pfwinfo->rpt_fbtc_btscan.finfo.v2;
pcinfo->req_len = sizeof(pfwinfo->rpt_fbtc_btscan.finfo.v2);
} else if (ver->fcxbtscan == 7) {
pfinfo = &pfwinfo->rpt_fbtc_btscan.finfo.v7;
pcinfo->req_len = sizeof(pfwinfo->rpt_fbtc_btscan.finfo.v7);
} else {
goto err;
}
pcinfo->req_fver = ver->fcxbtscan;
break;
......
......@@ -1954,9 +1954,18 @@ struct rtw89_btc_fbtc_btscan_v2 {
struct rtw89_btc_bt_scan_info_v2 para[CXSCAN_MAX];
} __packed;
struct rtw89_btc_fbtc_btscan_v7 {
u8 fver; /* btc_ver::fcxbtscan */
u8 type;
u8 rsvd0;
u8 rsvd1;
struct rtw89_btc_bt_scan_info_v2 para[CXSCAN_MAX];
} __packed;
union rtw89_btc_fbtc_btscan {
struct rtw89_btc_fbtc_btscan_v1 v1;
struct rtw89_btc_fbtc_btscan_v2 v2;
struct rtw89_btc_fbtc_btscan_v7 v7;
};
struct rtw89_btc_bt_info {
......
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