mirror of https://gitee.com/openkylin/linux.git
rtlwifi: btcoex: 21a 1ant: fw settings for softap mode
For ap mode, adjust fw settings to operate properly. 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
f4a23e194e
commit
1bdd83392f
|
@ -843,18 +843,35 @@ static void btc8821a1ant_set_fw_ps_tdma(struct btc_coexist *btcoexist, u8 byte1,
|
||||||
{
|
{
|
||||||
struct rtl_priv *rtlpriv = btcoexist->adapter;
|
struct rtl_priv *rtlpriv = btcoexist->adapter;
|
||||||
u8 h2c_parameter[5] = {0};
|
u8 h2c_parameter[5] = {0};
|
||||||
|
u8 real_byte1 = byte1, real_byte5 = byte5;
|
||||||
|
bool ap_enable = false;
|
||||||
|
|
||||||
h2c_parameter[0] = byte1;
|
btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_AP_MODE_ENABLE,
|
||||||
|
&ap_enable);
|
||||||
|
|
||||||
|
if (ap_enable) {
|
||||||
|
if (byte1 & BIT4 && !(byte1 & BIT5)) {
|
||||||
|
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
|
||||||
|
"[BTCoex], FW for 1Ant AP mode\n");
|
||||||
|
real_byte1 &= ~BIT4;
|
||||||
|
real_byte1 |= BIT5;
|
||||||
|
|
||||||
|
real_byte5 |= BIT5;
|
||||||
|
real_byte5 &= ~BIT6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h2c_parameter[0] = real_byte1;
|
||||||
h2c_parameter[1] = byte2;
|
h2c_parameter[1] = byte2;
|
||||||
h2c_parameter[2] = byte3;
|
h2c_parameter[2] = byte3;
|
||||||
h2c_parameter[3] = byte4;
|
h2c_parameter[3] = byte4;
|
||||||
h2c_parameter[4] = byte5;
|
h2c_parameter[4] = real_byte5;
|
||||||
|
|
||||||
coex_dm->ps_tdma_para[0] = byte1;
|
coex_dm->ps_tdma_para[0] = real_byte1;
|
||||||
coex_dm->ps_tdma_para[1] = byte2;
|
coex_dm->ps_tdma_para[1] = byte2;
|
||||||
coex_dm->ps_tdma_para[2] = byte3;
|
coex_dm->ps_tdma_para[2] = byte3;
|
||||||
coex_dm->ps_tdma_para[3] = byte4;
|
coex_dm->ps_tdma_para[3] = byte4;
|
||||||
coex_dm->ps_tdma_para[4] = byte5;
|
coex_dm->ps_tdma_para[4] = real_byte5;
|
||||||
|
|
||||||
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
|
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
|
||||||
"[BTCoex], PS-TDMA H2C cmd =0x%x%08x\n",
|
"[BTCoex], PS-TDMA H2C cmd =0x%x%08x\n",
|
||||||
|
|
Loading…
Reference in New Issue