Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtw88: coex: only skip coex triggered by BT info

The coex mechanism used to skip upon the freeze flag is raised.
That will cause the coex mechanism being skipped unexpectedly.
Coex only wanted to keep the TDMA table from being changed by
BT side.

So, check the freeze and reason, if the coex reason is coming
from BT info, skip it, to make sure the coex triggered by Wifi
itself can work.

This is required for the AP mode, while the control flow is
different with STA mode. When starting an AP mode, the AP mode
needs to start working immedaitely after leaving IPS, and the
freeze flag could be raised. If the coex info is skipped, then
the AP mode will not set the antenna owner, leads to TX stuck.

Fixes: 4136214f7c46 ("rtw88: add BT co-existence support")
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200717064937.27966-5-yhchuang@realtek.com

authored by

Yan-Hsuan Chuang and committed by
Kalle Valo
3f194bd4 d8e030c7

+2 -1
+2 -1
drivers/net/wireless/realtek/rtw88/coex.c
··· 1962 1962 if (coex_stat->wl_under_ips) 1963 1963 return; 1964 1964 1965 - if (coex->freeze && !coex_stat->bt_setup_link) 1965 + if (coex->freeze && coex_dm->reason == COEX_RSN_BTINFO && 1966 + !coex_stat->bt_setup_link) 1966 1967 return; 1967 1968 1968 1969 coex_stat->cnt_wl[COEX_CNT_WL_COEXRUN]++;