Second patchset to add new firmware commands/events format used by 8922A
firmware, and then 8922A can use WiFi and Bluetooth simultaneously with
smooth A2DP and HID.
Ching-Te Ku (8):
wifi: rtw89: coex: Add Wi-Fi null data status version 7
wifi: rtw89: coex: Add Bluetooth scan parameter report version 7
wifi: rtw89: coex: Add Bluetooth frequency hopping map version 7
wifi: rtw89: coex: Add Bluetooth version report version 7
wifi: rtw89: coex: Fix unexpected value in version 7 slot parameter
wifi: rtw89: coex: Add Wi-Fi role v8 condition when set Bluetooth
channel
wifi: rtw89: coex: Add Wi-Fi role v8 condition when set BTG control
wifi: rtw89: coex: Check and enable reports after run coex
drivers/net/wireless/realtek/rtw89/coex.c | 175 +++++++++++++++++++---
drivers/net/wireless/realtek/rtw89/core.h | 53 ++++++-
2 files changed, 205 insertions(+), 23 deletions(-)
--
2.25.1
From: Ching-Te Ku <[email protected]>
It will assign wrong value to version 7 slot parameter setting, because
the structure member order has changed. Add a for-loop to assign variables
manually.
Signed-off-by: Ching-Te Ku <[email protected]>
Signed-off-by: Ping-Ke Shih <[email protected]>
---
drivers/net/wireless/realtek/rtw89/coex.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/coex.c b/drivers/net/wireless/realtek/rtw89/coex.c
index 15e04440888d..374bc5aad2e8 100644
--- a/drivers/net/wireless/realtek/rtw89/coex.c
+++ b/drivers/net/wireless/realtek/rtw89/coex.c
@@ -827,8 +827,20 @@ static void _reset_btc_var(struct rtw89_dev *rtwdev, u8 type)
/* set the slot_now table to original */
btc->dm.tdma_now = t_def[CXTD_OFF];
btc->dm.tdma = t_def[CXTD_OFF];
- memcpy(&btc->dm.slot_now, s_def, sizeof(btc->dm.slot_now));
- memcpy(&btc->dm.slot, s_def, sizeof(btc->dm.slot));
+ if (ver->fcxslots >= 7) {
+ for (i = 0; i < ARRAY_SIZE(s_def); i++) {
+ btc->dm.slot.v7[i].dur = s_def[i].dur;
+ btc->dm.slot.v7[i].cxtype = s_def[i].cxtype;
+ btc->dm.slot.v7[i].cxtbl = s_def[i].cxtbl;
+ }
+ memcpy(&btc->dm.slot_now.v7, &btc->dm.slot.v7,
+ sizeof(btc->dm.slot_now.v7));
+ } else {
+ memcpy(&btc->dm.slot_now.v1, s_def,
+ sizeof(btc->dm.slot_now.v1));
+ memcpy(&btc->dm.slot.v1, s_def,
+ sizeof(btc->dm.slot.v1));
+ }
btc->policy_len = 0;
btc->bt_req_len = 0;
@@ -2319,7 +2331,7 @@ static void rtw89_btc_fw_set_slots(struct rtw89_dev *rtwdev)
tlv_v7->type = SET_SLOT_TABLE;
tlv_v7->ver = ver->fcxslots;
- tlv_v7->len = sizeof(dm->slot.v7);
+ tlv_v7->len = ARRAY_SIZE(dm->slot.v7);
memcpy(tlv_v7->val, dm->slot.v7, sizeof(dm->slot.v7));
_send_fw_cmd(rtwdev, BTFC_SET, SET_SLOT_TABLE, (u8 *)tlv_v7, len);
--
2.25.1