Skip to content

Commit ebea22c

Browse files
Ching-Te KuPing-Ke Shih
authored andcommitted
wifi: rtw89: coex: Limit Wi-Fi scan slot cost to avoid A2DP glitch
When Wi-Fi is scanning at 2.4GHz, PTA will abort almost all the BT request. Once the Wi-Fi slot stay too long, BT audio device can not get enough data, audio glitch will happened. This patch limit 2.4Ghz Wi-Fi slot to 80ms while Wi-Fi is scanning to avoid audio glitch. Signed-off-by: Ching-Te Ku <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent d47c1c6 commit ebea22c

File tree

1 file changed

+4
-1
lines changed
  • drivers/net/wireless/realtek/rtw89

1 file changed

+4
-1
lines changed

drivers/net/wireless/realtek/rtw89/coex.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ static const struct rtw89_btc_fbtc_slot s_def[] = {
9393
[CXST_E2G] = __DEF_FBTC_SLOT(5, 0xea5a5a5a, SLOT_MIX),
9494
[CXST_E5G] = __DEF_FBTC_SLOT(5, 0xffffffff, SLOT_ISO),
9595
[CXST_EBT] = __DEF_FBTC_SLOT(5, 0xe5555555, SLOT_MIX),
96-
[CXST_ENULL] = __DEF_FBTC_SLOT(5, 0xaaaaaaaa, SLOT_ISO),
96+
[CXST_ENULL] = __DEF_FBTC_SLOT(5, 0x55555555, SLOT_MIX),
9797
[CXST_WLK] = __DEF_FBTC_SLOT(250, 0xea5a5a5a, SLOT_MIX),
9898
[CXST_W1FDD] = __DEF_FBTC_SLOT(50, 0xffffffff, SLOT_ISO),
9999
[CXST_B1FDD] = __DEF_FBTC_SLOT(50, 0xffffdfff, SLOT_ISO),
@@ -4153,6 +4153,7 @@ void rtw89_btc_set_policy_v1(struct rtw89_dev *rtwdev, u16 policy_type)
41534153
s_def[CXST_EBT].cxtbl, s_def[CXST_EBT].cxtype);
41544154
_slot_set_le(btc, CXST_ENULL, s_def[CXST_ENULL].dur,
41554155
s_def[CXST_ENULL].cxtbl, s_def[CXST_ENULL].cxtype);
4156+
_slot_set_dur(btc, CXST_EBT, dur_2);
41564157
break;
41574158
case BTC_CXP_OFFE_DEF2:
41584159
_slot_set(btc, CXST_E2G, 20, cxtbl[1], SLOT_ISO);
@@ -4162,6 +4163,7 @@ void rtw89_btc_set_policy_v1(struct rtw89_dev *rtwdev, u16 policy_type)
41624163
s_def[CXST_EBT].cxtbl, s_def[CXST_EBT].cxtype);
41634164
_slot_set_le(btc, CXST_ENULL, s_def[CXST_ENULL].dur,
41644165
s_def[CXST_ENULL].cxtbl, s_def[CXST_ENULL].cxtype);
4166+
_slot_set_dur(btc, CXST_EBT, dur_2);
41654167
break;
41664168
case BTC_CXP_OFFE_2GBWMIXB:
41674169
if (a2dp->exist)
@@ -4170,6 +4172,7 @@ void rtw89_btc_set_policy_v1(struct rtw89_dev *rtwdev, u16 policy_type)
41704172
_slot_set(btc, CXST_E2G, 5, tbl_w1, SLOT_MIX);
41714173
_slot_set_le(btc, CXST_EBT, cpu_to_le16(40),
41724174
s_def[CXST_EBT].cxtbl, s_def[CXST_EBT].cxtype);
4175+
_slot_set_dur(btc, CXST_EBT, dur_2);
41734176
break;
41744177
case BTC_CXP_OFFE_WL: /* for 4-way */
41754178
_slot_set(btc, CXST_E2G, 5, cxtbl[1], SLOT_MIX);

0 commit comments

Comments
 (0)