linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <pkshih@realtek.com>
To: <kvalo@codeaurora.org>
Cc: <Larry.Finger@lwfinger.net>, <linux-wireless@vger.kernel.org>
Subject: [PATCH 09/15] rtlwifi: btcoex: add assoc type v2 to connection notify
Date: Wed, 28 Feb 2018 11:07:12 +0800	[thread overview]
Message-ID: <20180228030718.19510-10-pkshih@realtek.com> (raw)
In-Reply-To: <20180228030718.19510-1-pkshih@realtek.com>

From: Ping-Ke Shih <pkshih@realtek.com>

In connection notify v1, btcoex only need to know start/end association,
and it will discriminate 2G and 5G band in v2.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 .../net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c  | 14 +++++++++++---
 .../net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h  |  2 ++
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
index 0f664a0490a7..05300b466d34 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
@@ -1610,7 +1610,8 @@ void exhalbtc_scan_notify_wifi_only(struct wifi_only_cfg *wifionly_cfg,
 
 void exhalbtc_connect_notify(struct btc_coexist *btcoexist, u8 action)
 {
-	u8 asso_type;
+	u8 asso_type, asso_type_v2;
+	bool wifi_under_5g;
 
 	if (!halbtc_is_bt_coexist_available(btcoexist))
 		return;
@@ -1618,10 +1619,17 @@ void exhalbtc_connect_notify(struct btc_coexist *btcoexist, u8 action)
 	if (btcoexist->manual_control)
 		return;
 
-	if (action)
+	btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_UNDER_5G, &wifi_under_5g);
+
+	if (action) {
 		asso_type = BTC_ASSOCIATE_START;
-	else
+		asso_type_v2 = wifi_under_5g ? BTC_ASSOCIATE_5G_START :
+					       BTC_ASSOCIATE_START;
+	} else {
 		asso_type = BTC_ASSOCIATE_FINISH;
+		asso_type_v2 = wifi_under_5g ? BTC_ASSOCIATE_5G_FINISH :
+					       BTC_ASSOCIATE_FINISH;
+	}
 
 	halbtc_leave_low_power(btcoexist);
 
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h
index ad80ec05975e..0a7b09305bc3 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h
@@ -401,6 +401,8 @@ enum btc_notify_type_switchband {
 enum btc_notify_type_associate {
 	BTC_ASSOCIATE_FINISH = 0x0,
 	BTC_ASSOCIATE_START = 0x1,
+	BTC_ASSOCIATE_5G_FINISH = 0x2,
+	BTC_ASSOCIATE_5G_START = 0x3,
 	BTC_ASSOCIATE_MAX
 };
 
-- 
2.15.1

  parent reply	other threads:[~2018-02-28  3:07 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28  3:07 [PATCH 00/15] rtlwifi: Add 8822b 1ant/2ant btcoex files pkshih
2018-02-28  3:07 ` [PATCH 01/15] rtlwifi: Add modifier static to functions reported by sparse pkshih
2018-03-02 22:06   ` Larry Finger
2018-02-28  3:07 ` [PATCH 02/15] rtlwifi: remove redundant statement found by static checker pkshih
2018-03-02 22:07   ` Larry Finger
2018-02-28  3:07 ` [PATCH 03/15] rtlwifi: btcoex: Add enum DM_INFO for btcoex to query dm's counters pkshih
2018-03-02 22:19   ` Larry Finger
2018-03-03  5:12     ` Pkshih
2018-02-28  3:07 ` [PATCH 04/15] rtlwifi: btcoex: Add customer_id to do special deal to oem vendor pkshih
2018-03-02 22:12   ` Larry Finger
2018-02-28  3:07 ` [PATCH 05/15] rtlwifi: btcoex: Get status of multichannel concurrence pkshih
2018-03-02 22:20   ` Larry Finger
2018-02-28  3:07 ` [PATCH 06/15] rtlwifi: btcoex: Add rate table for the use of btcoex pkshih
2018-02-28  3:07 ` [PATCH 07/15] rtlwifi: btcoex: Add interaction with phydm pkshih
2018-02-28  3:07 ` [PATCH 08/15] rtlwifi: btcoex: Add pre- and post- normal LPS function pkshih
2018-02-28  3:07 ` pkshih [this message]
2018-02-28  3:07 ` [PATCH 10/15] rtlwifi: btcoex: new definitions introduced by 8822be pkshih
2018-02-28  3:07 ` [PATCH 11/15] rtlwifi: btcoex: Add new but dummy definitions introduced by 8822b pkshih
2018-02-28  3:07 ` [PATCH 12/15] rtlwifi: btcoex: Add 8822b 1ant/2ant coex files pkshih
2018-03-27  7:32   ` Kalle Valo
2018-03-27  9:32     ` Pkshih
2018-03-27 14:17       ` Kalle Valo
2018-02-28  3:07 ` [PATCH 13/15] rtlwifi: btcoex: Add 8822b header files to precomp.h pkshih
2018-02-28  3:07 ` [PATCH 14/15] rtlwifi: btcoex: Add 8822b to Makefile pkshih
2018-02-28  3:07 ` [PATCH 15/15] rtlwifi: btcoex: Add 8822b routine to btc interfaces pkshih

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180228030718.19510-10-pkshih@realtek.com \
    --to=pkshih@realtek.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).