rtlwifi: btcoex: 23b 1ant: Setup register for BT WHCK test

If BT is under WHCK, we enter a special mode.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Yan-Hsuan Chuang <yhchuang@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:
Ping-Ke Shih 2017-05-19 10:59:34 -05:00 committed by Kalle Valo
parent 7d0d2c14cc
commit 53e18bcf3c
2 changed files with 26 additions and 0 deletions

View File

@ -1701,6 +1701,18 @@ static void halbtc8723b1ant_monitor_bt_enable_disable(struct btc_coexist
* Non-Software Coex Mechanism start
*
*****************************************************/
static void halbtc8723b1ant_action_bt_whck_test(struct btc_coexist *btcoexist)
{
halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0,
0x0);
halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8);
halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, NORMAL_EXEC,
false, false);
halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0);
}
static void halbtc8723b1ant_action_wifi_multiport(struct btc_coexist *btcoexist)
{
halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE,
@ -2074,6 +2086,13 @@ static void halbtc8723b1ant_run_coexist_mechanism(struct btc_coexist *btcoexist)
return;
}
if (coex_sta->bt_whck_test) {
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], wifi is under IPS !!!\n");
halbtc8723b1ant_action_bt_whck_test(btcoexist);
return;
}
if (coex_dm->bt_status == BT_8723B_1ANT_BT_STATUS_ACL_BUSY ||
coex_dm->bt_status == BT_8723B_1ANT_BT_STATUS_SCO_BUSY ||
coex_dm->bt_status == BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY)
@ -2883,6 +2902,12 @@ void ex_halbtc8723b1ant_bt_info_notify(struct btc_coexist *btcoexist,
"0x%02x, ", tmp_buf[i]);
}
/* if 0xff, it means BT is under WHCK test */
if (bt_info == 0xff)
coex_sta->bt_whck_test = true;
else
coex_sta->bt_whck_test = false;
if (rsp_source != BT_INFO_SRC_8723B_1ANT_WIFI_FW) {
coex_sta->bt_retry_cnt = /* [3:0] */
coex_sta->bt_info_c2h[rsp_source][2] & 0xf;

View File

@ -162,6 +162,7 @@ struct coex_sta_8723b_1ant {
bool c2h_bt_info_req_sent;
u8 bt_info_c2h[BT_INFO_SRC_8723B_1ANT_MAX][10];
u32 bt_info_c2h_cnt[BT_INFO_SRC_8723B_1ANT_MAX];
bool bt_whck_test;
bool c2h_bt_inquiry_page;
bool c2h_bt_remote_name_req;
u8 bt_retry_cnt;