rtlwifi: btcoex: 23b 2ant: turn off ps and tdma mechanism when in concurrent mode
When wifi is in concurrent mode, we can not distinguish if it is the real PS or just a fake one by sending null data, so we turn it off in case of miracast scenario. Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Signed-off-by: Larry 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: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
bcd37f4a08
commit
a8570896b9
|
@ -3168,10 +3168,29 @@ static void btc8723b2ant_action_hid_a2dp(struct btc_coexist *btcoexist)
|
|||
}
|
||||
}
|
||||
|
||||
static void btc8723b2ant_action_wifi_multi_port(struct btc_coexist *btcoexist)
|
||||
{
|
||||
btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6);
|
||||
btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0);
|
||||
|
||||
/* sw all off */
|
||||
btc8723b2ant_sw_mechanism(btcoexist, false, false, false, false);
|
||||
|
||||
/* hw all off */
|
||||
btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0);
|
||||
|
||||
btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0);
|
||||
btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1);
|
||||
}
|
||||
|
||||
static void btc8723b2ant_run_coexist_mechanism(struct btc_coexist *btcoexist)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = btcoexist->adapter;
|
||||
u8 algorithm = 0;
|
||||
u32 num_of_wifi_link = 0;
|
||||
u32 wifi_link_status = 0;
|
||||
struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info;
|
||||
bool miracast_plus_bt = false;
|
||||
|
||||
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
|
||||
"[BTCoex], RunCoexistMechanism()===>\n");
|
||||
|
@ -3203,6 +3222,33 @@ static void btc8723b2ant_run_coexist_mechanism(struct btc_coexist *btcoexist)
|
|||
}
|
||||
}
|
||||
|
||||
/* for P2P */
|
||||
btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_LINK_STATUS,
|
||||
&wifi_link_status);
|
||||
num_of_wifi_link = wifi_link_status >> 16;
|
||||
|
||||
if ((num_of_wifi_link >= 2) ||
|
||||
(wifi_link_status & WIFI_P2P_GO_CONNECTED)) {
|
||||
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
|
||||
"############# [BTCoex], Multi-Port num_of_wifi_link = %d, wifi_link_status = 0x%x\n",
|
||||
num_of_wifi_link, wifi_link_status);
|
||||
|
||||
if (bt_link_info->bt_link_exist)
|
||||
miracast_plus_bt = true;
|
||||
else
|
||||
miracast_plus_bt = false;
|
||||
|
||||
btcoexist->btc_set(btcoexist, BTC_SET_BL_MIRACAST_PLUS_BT,
|
||||
&miracast_plus_bt);
|
||||
btc8723b2ant_action_wifi_multi_port(btcoexist);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
miracast_plus_bt = false;
|
||||
btcoexist->btc_set(btcoexist, BTC_SET_BL_MIRACAST_PLUS_BT,
|
||||
&miracast_plus_bt);
|
||||
|
||||
coex_dm->cur_algorithm = algorithm;
|
||||
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
|
||||
"[BTCoex], Algorithm = %d\n",
|
||||
|
|
|
@ -249,6 +249,7 @@ enum btc_set_type {
|
|||
BTC_SET_BL_TO_REJ_AP_AGG_PKT,
|
||||
BTC_SET_BL_BT_CTRL_AGG_SIZE,
|
||||
BTC_SET_BL_INC_SCAN_DEV_NUM,
|
||||
BTC_SET_BL_MIRACAST_PLUS_BT,
|
||||
|
||||
/* type u1Byte */
|
||||
BTC_SET_U1_RSSI_ADJ_VAL_FOR_AGC_TABLE_ON,
|
||||
|
|
Loading…
Reference in New Issue