]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtw89: coex: To avoid TWS serials A2DP lag, adjust slot arrangement
authorChing-Te Ku <ku920601@realtek.com>
Wed, 5 Feb 2025 01:32:32 +0000 (09:32 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 10 Feb 2025 03:19:32 +0000 (11:19 +0800)
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>
Link: https://patch.msgid.link/20250205013233.10945-3-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/coex.c

index 806a51782467bb685e9b719063ca5a1f67e10134..28d29fa17316ad85776a2720faf92032b9d69c4c 100644 (file)
@@ -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) {