summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/realtek
diff options
context:
space:
mode:
authorPing-Ke Shih <pkshih@realtek.com>2017-05-20 10:48:59 -0500
committerKalle Valo <kvalo@codeaurora.org>2017-05-24 16:50:34 +0300
commitc34e42aa3e6e37a3625f88c96bd4923b93d83b6d (patch)
treea49f14e392d98ef26d6382d46c9f40db6e6a8a37 /drivers/net/wireless/realtek
parentfa73a1ebe720c8360d6cce251487cb3917c16e09 (diff)
downloadop-kernel-dev-c34e42aa3e6e37a3625f88c96bd4923b93d83b6d.zip
op-kernel-dev-c34e42aa3e6e37a3625f88c96bd4923b93d83b6d.tar.gz
rtlwifi: btcoex: 23b 1ant: define wifi in high priority task.
Add the definition of wifi in high priority task for bt inquiry. According to driver's notifications, btc will knows whether wifi is in high priority tasks or not. 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>
Diffstat (limited to 'drivers/net/wireless/realtek')
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c15
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.h1
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
index 188e248..1850462 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
@@ -2662,6 +2662,7 @@ void ex_halbtc8723b1ant_scan_notify(struct btc_coexist *btcoexist, u8 type)
return;
if (type == BTC_SCAN_START) {
+ coex_sta->wifi_is_high_pri_task = true;
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], SCAN START notify\n");
/* Force antenna setup for no scan result issue */
@@ -2676,6 +2677,7 @@ void ex_halbtc8723b1ant_scan_notify(struct btc_coexist *btcoexist, u8 type)
"[BTCoex], 0x948=0x%x, 0x765=0x%x, 0x67=0x%x\n",
u32tmp, u8tmpa, u8tmpb);
} else {
+ coex_sta->wifi_is_high_pri_task = false;
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], SCAN FINISH notify\n");
@@ -2748,6 +2750,8 @@ void ex_halbtc8723b1ant_connect_notify(struct btc_coexist *btcoexist, u8 type)
return;
if (type == BTC_ASSOCIATE_START) {
+ coex_sta->wifi_is_high_pri_task = true;
+
/* 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,
@@ -2756,6 +2760,7 @@ void ex_halbtc8723b1ant_connect_notify(struct btc_coexist *btcoexist, u8 type)
"[BTCoex], CONNECT START notify\n");
coex_dm->arp_cnt = 0;
} else {
+ coex_sta->wifi_is_high_pri_task = false;
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], CONNECT FINISH notify\n");
}
@@ -2906,11 +2911,21 @@ void ex_halbtc8723b1ant_special_packet_notify(struct btc_coexist *btcoexist,
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], ARP Packet Count = %d\n",
coex_dm->arp_cnt);
+
+ if ((coex_dm->arp_cnt >= 10) && (!under_4way))
+ /* if APR PKT > 10 after connect, do not go to
+ * ActionWifiConnectedSpecificPacket(btcoexist)
+ */
+ coex_sta->wifi_is_high_pri_task = false;
+ else
+ coex_sta->wifi_is_high_pri_task = true;
} else {
+ coex_sta->wifi_is_high_pri_task = true;
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], special Packet DHCP or EAPOL notify\n");
}
} else {
+ coex_sta->wifi_is_high_pri_task = false;
RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], special Packet [Type = %d] notify\n",
type);
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.h b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.h
index 8df1036..b71d4b4 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.h
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.h
@@ -166,6 +166,7 @@ struct coex_sta_8723b_1ant {
bool bt_whck_test;
bool c2h_bt_inquiry_page;
bool c2h_bt_remote_name_req;
+ bool wifi_is_high_pri_task;
u8 bt_retry_cnt;
u8 bt_info_ext;
u8 scan_ap_num;
OpenPOWER on IntegriCloud