提交 7558668d 编写于 作者: Y Yan-Hsuan Chuang 提交者: Kalle Valo

rtlwifi: btcoex: 23b 2ant: wifi is not actually off in mp mode

In mp mode, the wifi will not turn off and still has control of the PTA,
so the driver needs to distinguish whether it is mp mode or not
Signed-off-by: NYan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
Cc: Pkshih <pkshih@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 ae889ebc
...@@ -3606,6 +3606,7 @@ static void btc8723b2ant_run_coexist_mechanism(struct btc_coexist *btcoexist) ...@@ -3606,6 +3606,7 @@ static void btc8723b2ant_run_coexist_mechanism(struct btc_coexist *btcoexist)
static void btc8723b2ant_wifioff_hwcfg(struct btc_coexist *btcoexist) static void btc8723b2ant_wifioff_hwcfg(struct btc_coexist *btcoexist)
{ {
bool is_in_mp_mode = false;
u8 h2c_parameter[2] = {0}; u8 h2c_parameter[2] = {0};
u32 fw_ver = 0; u32 fw_ver = 0;
...@@ -3623,6 +3624,15 @@ static void btc8723b2ant_wifioff_hwcfg(struct btc_coexist *btcoexist) ...@@ -3623,6 +3624,15 @@ static void btc8723b2ant_wifioff_hwcfg(struct btc_coexist *btcoexist)
} else { } else {
btcoexist->btc_write_1byte(btcoexist, 0x765, 0x18); btcoexist->btc_write_1byte(btcoexist, 0x765, 0x18);
} }
btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_IS_IN_MP_MODE,
&is_in_mp_mode);
if (!is_in_mp_mode)
/* BT select s0/s1 is controlled by BT */
btcoexist->btc_write_1byte_bitmask(btcoexist, 0x67, 0x20, 0x0);
else
/* BT select s0/s1 is controlled by WiFi */
btcoexist->btc_write_1byte_bitmask(btcoexist, 0x67, 0x20, 0x1);
} }
/********************************************************************* /*********************************************************************
......
...@@ -205,6 +205,7 @@ enum btc_get_type { ...@@ -205,6 +205,7 @@ enum btc_get_type {
BTC_GET_BL_WIFI_ENABLE_ENCRYPTION, BTC_GET_BL_WIFI_ENABLE_ENCRYPTION,
BTC_GET_BL_WIFI_UNDER_B_MODE, BTC_GET_BL_WIFI_UNDER_B_MODE,
BTC_GET_BL_EXT_SWITCH, BTC_GET_BL_EXT_SWITCH,
BTC_GET_BL_WIFI_IS_IN_MP_MODE,
/* type s4Byte */ /* type s4Byte */
BTC_GET_S4_WIFI_RSSI, BTC_GET_S4_WIFI_RSSI,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册