Skip to content

Commit 841f263

Browse files
Ching-Te KuKalle Valo
authored andcommitted
rtw89: coex: Add case for scan offload
Turn off coexistence driver control, let firmware can control the traffic during scan. This prevents potential unexpected behavior of the BT driver. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220401055043.12512-4-pkshih@realtek.com
1 parent 2b8219e commit 841f263

File tree

1 file changed

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

1 file changed

+11
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3068,7 +3068,17 @@ static void _action_wl_scan(struct rtw89_dev *rtwdev)
30683068
struct rtw89_btc_wl_info *wl = &btc->cx.wl;
30693069
struct rtw89_btc_wl_dbcc_info *wl_dinfo = &wl->dbcc_info;
30703070

3071-
if (rtwdev->dbcc_en) {
3071+
if (RTW89_CHK_FW_FEATURE(SCAN_OFFLOAD, &rtwdev->fw)) {
3072+
_set_ant(rtwdev, NM_EXEC, BTC_PHY_ALL, BTC_ANT_W25G);
3073+
if (btc->mdinfo.ant.type == BTC_ANT_SHARED)
3074+
_set_policy(rtwdev, BTC_CXP_OFFE_DEF,
3075+
BTC_RSN_NTFY_SCAN_START);
3076+
else
3077+
_set_policy(rtwdev, BTC_CXP_OFF_EQ0,
3078+
BTC_RSN_NTFY_SCAN_START);
3079+
3080+
rtw89_debug(rtwdev, RTW89_DBG_BTC, "[BTC], Scan offload!\n");
3081+
} else if (rtwdev->dbcc_en) {
30723082
if (wl_dinfo->real_band[RTW89_PHY_0] != RTW89_BAND_2G &&
30733083
wl_dinfo->real_band[RTW89_PHY_1] != RTW89_BAND_2G)
30743084
_action_wl_5g(rtwdev);

0 commit comments

Comments
 (0)