]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
rtw88: coex: fix A2DP stutters while WL busy + WL scan
authorChing-Te Ku <ku920601@realtek.com>
Fri, 19 Mar 2021 05:42:18 +0000 (13:42 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Sun, 11 Apr 2021 09:27:58 +0000 (12:27 +0300)
While WL scan, WL is more high priority than BT. The packets from AP
will be a big interference to A2DP. It will lead to A2DP stutters. Stop
answering CTS to AP to decrease AP's packets Tx while WL scan + WL busy.
Enable BT AFH feature to make BT leave away from WL channel.

Desired BT firmware BT-COEX version: 0x1c
Desired WL firmware version: 9.9.x

Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210319054218.3319-8-pkshih@realtek.com
drivers/net/wireless/realtek/rtw88/coex.c
drivers/net/wireless/realtek/rtw88/rtw8822c.c

index 7eee2c5ecb115274d11a7b653d03f0715afac239..cedbf382584865edfab1f6d1d873265d6b325b35 100644 (file)
@@ -787,7 +787,6 @@ static void rtw_coex_update_wl_ch_info(struct rtw_dev *rtwdev, u8 type)
 {
        struct rtw_chip_info *chip = rtwdev->chip;
        struct rtw_coex_dm *coex_dm = &rtwdev->coex.dm;
-       struct rtw_efuse *efuse = &rtwdev->efuse;
        u8 link = 0;
        u8 center_chan = 0;
        u8 bw;
@@ -798,7 +797,7 @@ static void rtw_coex_update_wl_ch_info(struct rtw_dev *rtwdev, u8 type)
        if (type != COEX_MEDIA_DISCONNECT)
                center_chan = rtwdev->hal.current_channel;
 
-       if (center_chan == 0 || (efuse->share_ant && center_chan <= 14)) {
+       if (center_chan == 0) {
                link = 0;
                center_chan = 0;
                bw = 0;
@@ -2325,8 +2324,11 @@ static void rtw_coex_action_wl_linkscan(struct rtw_dev *rtwdev)
        if (efuse->share_ant) { /* Shared-Ant */
                if (coex_stat->bt_a2dp_exist) {
                        slot_type = TDMA_4SLOT;
-                       table_case = 9;
                        tdma_case = 11;
+                       if (coex_stat->wl_gl_busy)
+                               table_case = 26;
+                       else
+                               table_case = 9;
                } else {
                        table_case = 9;
                        tdma_case = 7;
index 9453a20f966a55257cba65a990387e277827ab9b..07ff0d442e5baa4596da7db31baaa51e71d89684 100644 (file)
@@ -4393,7 +4393,7 @@ struct rtw_chip_info rtw8822c_hw_spec = {
        .wowlan_stub = &rtw_wowlan_stub_8822c,
        .max_sched_scan_ssids = 4,
 #endif
-       .coex_para_ver = 0x201029,
+       .coex_para_ver = 0x2103181c,
        .bt_desired_ver = 0x1c,
        .scbd_support = true,
        .new_scbd10_def = true,