summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorYan-Hsuan Chuang <yhchuang@realtek.com>2017-04-10 19:23:05 +0300
committerKalle Valo <kvalo@codeaurora.org>2017-04-13 17:11:01 +0300
commitbcdffd050c80a72465a8736aacdd614f583a5fb3 (patch)
tree12f9894c9398dc83e5188b96bb3bc266154796a6 /drivers/net/wireless
parentedf8fa7b66f0e7b74806439581b2b5ae72a8b8d3 (diff)
downloadlinux-bcdffd050c80a72465a8736aacdd614f583a5fb3.tar.xz
rtlwifi: btcoex: 21a 1ant: If wifi only, do not initiate coex mechanism
If the device has wifi mode only, there is no need to initiate the hardware for wifi and bt coexistence, so just return to avoid it. 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>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c
index 05e33d38d49c..86eab6a4ada2 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c
@@ -1990,7 +1990,7 @@ static void btc8821a1ant_init_coex_dm(struct btc_coexist *btcoexist)
}
static void btc8821a1ant_init_hw_config(struct btc_coexist *btcoexist,
- bool back_up)
+ bool back_up, bool wifi_only)
{
struct rtl_priv *rtlpriv = btcoexist->adapter;
u8 u1_tmp = 0;
@@ -1999,6 +1999,9 @@ static void btc8821a1ant_init_hw_config(struct btc_coexist *btcoexist,
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], 1Ant Init HW Config!!\n");
+ if (wifi_only)
+ return;
+
if (back_up) {
coex_dm->backup_arfr_cnt1 = btcoexist->btc_read_4byte(btcoexist,
0x430);
@@ -2039,9 +2042,9 @@ static void btc8821a1ant_init_hw_config(struct btc_coexist *btcoexist,
/**************************************************************
* extern function start with ex_btc8821a1ant_
**************************************************************/
-void ex_btc8821a1ant_init_hwconfig(struct btc_coexist *btcoexist)
+void ex_btc8821a1ant_init_hwconfig(struct btc_coexist *btcoexist, bool wifionly)
{
- btc8821a1ant_init_hw_config(btcoexist, true);
+ btc8821a1ant_init_hw_config(btcoexist, true, wifionly);
}
void ex_btc8821a1ant_init_coex_dm(struct btc_coexist *btcoexist)
@@ -2783,7 +2786,7 @@ void ex_btc8821a1ant_pnp_notify(struct btc_coexist *btcoexist, u8 pnp_state)
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], Pnp notify to WAKE UP\n");
btcoexist->stop_coex_dm = false;
- btc8821a1ant_init_hw_config(btcoexist, false);
+ btc8821a1ant_init_hw_config(btcoexist, false, false);
btc8821a1ant_init_coex_dm(btcoexist);
btc8821a1ant_query_bt_info(btcoexist);
}