summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
diff options
context:
space:
mode:
authorYan-Hsuan Chuang <yhchuang@realtek.com>2017-06-05 10:29:55 -0500
committerKalle Valo <kvalo@codeaurora.org>2017-06-13 10:02:28 +0300
commit60f44100eee785b5bdb475d05760ff15707fd1b7 (patch)
tree58221c541555fa8d076cf02dd4c8dd818b0d8809 /drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
parent86f9ab2ef4bdf0c9763d18ae2755ba75b4004725 (diff)
rtlwifi: btcoex: add settings before the hardware is ready
When the hardware is turned on and in the initialization stage, the PTA circuit is unstable. Hence we need to force some hardware settings to make sure the PTA circuit work correctly, otherwise it may affect the user's experience. Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <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>
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c')
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
index 5e6e14fd8c85..8b015e64af49 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
@@ -690,6 +690,21 @@ bool exhalbtc_initlize_variables(struct rtl_priv *adapter)
return true;
}
+void exhalbtc_power_on_setting(struct btc_coexist *btcoexist)
+{
+ if (!halbtc_is_bt_coexist_available(btcoexist))
+ return;
+
+ btcoexist->statistics.cnt_power_on++;
+
+ if (IS_HARDWARE_TYPE_8723B(btcoexist->adapter)) {
+ if (btcoexist->board_info.btdm_ant_num == 2)
+ ex_btc8723b2ant_power_on_setting(btcoexist);
+ else if (btcoexist->board_info.btdm_ant_num == 1)
+ ex_btc8723b1ant_power_on_setting(btcoexist);
+ }
+}
+
void exhalbtc_pre_load_firmware(struct btc_coexist *btcoexist)
{
if (!halbtc_is_bt_coexist_available(btcoexist))