diff mbox series

[2/3] wifi: rtw89: coex: To avoid TWS serials A2DP lag, adjust slot arrangement

Message ID 20250205013233.10945-3-pkshih@realtek.com (mailing list archive)
State New
Delegated to: Ping-Ke Shih
Headers show
Series wifi: rtw89: coex: improve user experience with TWS Bluetooth devices | expand

Commit Message

Ping-Ke Shih Feb. 5, 2025, 1:32 a.m. UTC
From: Ching-Te Ku <ku920601@realtek.com>

The TWS(True wireless stereo) serials Bluetooth audio device need to keep
packet traffic not only with DUT, it also need to synchronize packet with
its assistant earbud. And all the BR/EDR Bluetooth device need to do page
scan to keep re-connect event sensitively between different DUT.
These behavior will make TWS Bluetooth device cost more time slot to keep
the good audio performance. This patch decrease half of Wi-Fi slot(from
40ms to 20ms) in a single cycle. Make the slot more flexible to prevent
audio lag. The single cycle will be shorter, then it will bring some slot
protection cost make Wi-Fi throughput decrease about 5%.

Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw89/coex.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw89/coex.c b/drivers/net/wireless/realtek/rtw89/coex.c
index 806a51782467..28d29fa17316 100644
--- a/drivers/net/wireless/realtek/rtw89/coex.c
+++ b/drivers/net/wireless/realtek/rtw89/coex.c
@@ -4583,17 +4583,11 @@  static void _action_bt_hid(struct rtw89_dev *rtwdev)
 static void _action_bt_a2dp(struct rtw89_dev *rtwdev)
 {
 	struct rtw89_btc *btc = &rtwdev->btc;
-	struct rtw89_btc_bt_link_info *bt_linfo = &btc->cx.bt.link_info;
-	struct rtw89_btc_bt_a2dp_desc a2dp = bt_linfo->a2dp_desc;
 	struct rtw89_btc_dm *dm = &btc->dm;
 
 	_set_ant(rtwdev, NM_EXEC, BTC_PHY_ALL, BTC_ANT_W2G);
 
-	if (a2dp.vendor_id == 0x4c || dm->leak_ap || bt_linfo->slave_role)
-		dm->slot_dur[CXST_W1] = 20;
-	else
-		dm->slot_dur[CXST_W1] = 40;
-
+	dm->slot_dur[CXST_W1] = 20;
 	dm->slot_dur[CXST_B1] = BTC_B1_MAX;
 
 	switch (btc->cx.state_map) {
@@ -4690,17 +4684,11 @@  static void _action_bt_pan(struct rtw89_dev *rtwdev)
 static void _action_bt_a2dp_hid(struct rtw89_dev *rtwdev)
 {
 	struct rtw89_btc *btc = &rtwdev->btc;
-	struct rtw89_btc_bt_link_info *bt_linfo = &btc->cx.bt.link_info;
-	struct rtw89_btc_bt_a2dp_desc a2dp = bt_linfo->a2dp_desc;
 	struct rtw89_btc_dm *dm = &btc->dm;
 
 	_set_ant(rtwdev, NM_EXEC, BTC_PHY_ALL, BTC_ANT_W2G);
 
-	if (a2dp.vendor_id == 0x4c || dm->leak_ap || bt_linfo->slave_role)
-		dm->slot_dur[CXST_W1] = 20;
-	else
-		dm->slot_dur[CXST_W1] = 40;
-
+	dm->slot_dur[CXST_W1] = 20;
 	dm->slot_dur[CXST_B1] = BTC_B1_MAX;
 
 	switch (btc->cx.state_map) {