rtlwifi: btcoex: 23b 1ant: Revise media status notify to fix no scan result issue
Force antenna setup for no scan result issue 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:
parent
f9af7af4a1
commit
29c1de9193
|
@ -2804,18 +2804,53 @@ void ex_halbtc8723b1ant_media_status_notify(struct btc_coexist *btcoexist,
|
||||||
u8 h2c_parameter[3] = {0};
|
u8 h2c_parameter[3] = {0};
|
||||||
u32 wifi_bw;
|
u32 wifi_bw;
|
||||||
u8 wifi_central_chnl;
|
u8 wifi_central_chnl;
|
||||||
|
bool wifi_under_b_mode = false;
|
||||||
|
|
||||||
if (btcoexist->manual_control || btcoexist->stop_coex_dm ||
|
if (btcoexist->manual_control || btcoexist->stop_coex_dm ||
|
||||||
coex_sta->bt_disabled)
|
coex_sta->bt_disabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (BTC_MEDIA_CONNECT == type)
|
if (type == BTC_MEDIA_CONNECT) {
|
||||||
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
|
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
|
||||||
"[BTCoex], MEDIA connect notify\n");
|
"[BTCoex], MEDIA connect notify\n");
|
||||||
else
|
/* Force antenna setup for no scan result issue */
|
||||||
|
halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 8);
|
||||||
|
halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA,
|
||||||
|
FORCE_EXEC, false, false);
|
||||||
|
btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_UNDER_B_MODE,
|
||||||
|
&wifi_under_b_mode);
|
||||||
|
|
||||||
|
/* Set CCK Tx/Rx high Pri except 11b mode */
|
||||||
|
if (wifi_under_b_mode) {
|
||||||
|
btcoexist->btc_write_1byte(btcoexist, 0x6cd,
|
||||||
|
0x00); /* CCK Tx */
|
||||||
|
btcoexist->btc_write_1byte(btcoexist, 0x6cf,
|
||||||
|
0x00); /* CCK Rx */
|
||||||
|
} else {
|
||||||
|
btcoexist->btc_write_1byte(btcoexist, 0x6cd,
|
||||||
|
0x00); /* CCK Tx */
|
||||||
|
btcoexist->btc_write_1byte(btcoexist, 0x6cf,
|
||||||
|
0x10); /* CCK Rx */
|
||||||
|
}
|
||||||
|
|
||||||
|
coex_dm->backup_arfr_cnt1 =
|
||||||
|
btcoexist->btc_read_4byte(btcoexist, 0x430);
|
||||||
|
coex_dm->backup_arfr_cnt2 =
|
||||||
|
btcoexist->btc_read_4byte(btcoexist, 0x434);
|
||||||
|
coex_dm->backup_retry_limit =
|
||||||
|
btcoexist->btc_read_2byte(btcoexist, 0x42a);
|
||||||
|
coex_dm->backup_ampdu_max_time =
|
||||||
|
btcoexist->btc_read_1byte(btcoexist, 0x456);
|
||||||
|
} else {
|
||||||
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
|
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
|
||||||
"[BTCoex], MEDIA disconnect notify\n");
|
"[BTCoex], MEDIA disconnect notify\n");
|
||||||
|
|
||||||
|
btcoexist->btc_write_1byte(btcoexist, 0x6cd, 0x0); /* CCK Tx */
|
||||||
|
btcoexist->btc_write_1byte(btcoexist, 0x6cf, 0x0); /* CCK Rx */
|
||||||
|
|
||||||
|
coex_sta->cck_ever_lock = false;
|
||||||
|
}
|
||||||
|
|
||||||
/* only 2.4G we need to inform bt the chnl mask */
|
/* only 2.4G we need to inform bt the chnl mask */
|
||||||
btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_CENTRAL_CHNL,
|
btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_CENTRAL_CHNL,
|
||||||
&wifi_central_chnl);
|
&wifi_central_chnl);
|
||||||
|
|
Loading…
Reference in New Issue