mirror of https://gitee.com/openkylin/linux.git
rtlwifi: btcoex: set correct interface type and parameter.
This commit fixies two problems. The first one is interface types (e.g. PCI) that are used to switch antenna, and the second is to add wifi_only parameter to give correct state. 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
87d8a9f352
commit
43f5644a90
|
@ -803,8 +803,6 @@ bool exhalbtc_initlize_variables(void)
|
||||||
|
|
||||||
halbtc_dbg_init();
|
halbtc_dbg_init();
|
||||||
|
|
||||||
btcoexist->chip_interface = BTC_INTF_UNKNOWN;
|
|
||||||
|
|
||||||
btcoexist->btc_read_1byte = halbtc_read_1byte;
|
btcoexist->btc_read_1byte = halbtc_read_1byte;
|
||||||
btcoexist->btc_write_1byte = halbtc_write_1byte;
|
btcoexist->btc_write_1byte = halbtc_write_1byte;
|
||||||
btcoexist->btc_write_1byte_bitmask = halbtc_bitmask_write_1byte;
|
btcoexist->btc_write_1byte_bitmask = halbtc_bitmask_write_1byte;
|
||||||
|
@ -843,6 +841,18 @@ bool exhalbtc_bind_bt_coex_withadapter(void *adapter)
|
||||||
if (btcoexist->binded)
|
if (btcoexist->binded)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
switch (rtlpriv->rtlhal.interface) {
|
||||||
|
case INTF_PCI:
|
||||||
|
btcoexist->chip_interface = BTC_INTF_PCI;
|
||||||
|
break;
|
||||||
|
case INTF_USB:
|
||||||
|
btcoexist->chip_interface = BTC_INTF_USB;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
btcoexist->chip_interface = BTC_INTF_UNKNOWN;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
btcoexist->binded = true;
|
btcoexist->binded = true;
|
||||||
btcoexist->statistics.cnt_bind++;
|
btcoexist->statistics.cnt_bind++;
|
||||||
|
|
||||||
|
@ -912,10 +922,8 @@ void exhalbtc_pre_load_firmware(struct btc_coexist *btcoexist)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void exhalbtc_init_hw_config(struct btc_coexist *btcoexist)
|
void exhalbtc_init_hw_config(struct btc_coexist *btcoexist, bool wifi_only)
|
||||||
{
|
{
|
||||||
bool wifi_only = true;
|
|
||||||
|
|
||||||
if (!halbtc_is_bt_coexist_available(btcoexist))
|
if (!halbtc_is_bt_coexist_available(btcoexist))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -601,7 +601,7 @@ extern struct btc_coexist gl_bt_coexist;
|
||||||
|
|
||||||
bool exhalbtc_initlize_variables(void);
|
bool exhalbtc_initlize_variables(void);
|
||||||
bool exhalbtc_bind_bt_coex_withadapter(void *adapter);
|
bool exhalbtc_bind_bt_coex_withadapter(void *adapter);
|
||||||
void exhalbtc_init_hw_config(struct btc_coexist *btcoexist);
|
void exhalbtc_init_hw_config(struct btc_coexist *btcoexist, bool wifi_only);
|
||||||
void exhalbtc_init_coex_dm(struct btc_coexist *btcoexist);
|
void exhalbtc_init_coex_dm(struct btc_coexist *btcoexist);
|
||||||
void exhalbtc_ips_notify(struct btc_coexist *btcoexist, u8 type);
|
void exhalbtc_ips_notify(struct btc_coexist *btcoexist, u8 type);
|
||||||
void exhalbtc_lps_notify(struct btc_coexist *btcoexist, u8 type);
|
void exhalbtc_lps_notify(struct btc_coexist *btcoexist, u8 type);
|
||||||
|
|
|
@ -68,7 +68,7 @@ void rtl_btc_init_hw_config(struct rtl_priv *rtlpriv)
|
||||||
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
|
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
|
||||||
"%s, bt_exist is %d\n", __func__, bt_exist);
|
"%s, bt_exist is %d\n", __func__, bt_exist);
|
||||||
|
|
||||||
exhalbtc_init_hw_config(&gl_bt_coexist);
|
exhalbtc_init_hw_config(&gl_bt_coexist, !bt_exist);
|
||||||
exhalbtc_init_coex_dm(&gl_bt_coexist);
|
exhalbtc_init_coex_dm(&gl_bt_coexist);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue