All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org
Cc: Sara Sharon <sara.sharon@intel.com>
Subject: [PATCH 07/12] cfg80211: parse mbssid only if HW supports it
Date: Fri, 25 Jan 2019 12:48:20 +0100	[thread overview]
Message-ID: <20190125114825.5872-7-johannes@sipsolutions.net> (raw)
In-Reply-To: <20190125114825.5872-1-johannes@sipsolutions.net>

From: Sara Sharon <sara.sharon@intel.com>

Parsing and exposing nontransmitted APs is problematic
when underlying HW doesn't support it. Do it only if
driver indicated support. Allow HE restriction as well,
since the HE spec defined the exact manner that Multiple
BSSID set should behave. APs that not support the HE
spec will have less predictable Multiple BSSID set
support/behavior

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 include/net/cfg80211.h |  8 ++++++++
 net/wireless/scan.c    | 11 ++++++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 38ccbc106480..ceb27fec4710 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4283,6 +4283,11 @@ struct cfg80211_pmsr_capabilities {
  * @txq_memory_limit: configuration internal TX queue memory limit
  * @txq_quantum: configuration of internal TX queue scheduler quantum
  *
+ * @support_mbssid: can HW support association with nontransmitted AP
+ * @support_only_he_mbssid: don't parse MBSSID elements if it is not
+ *	HE AP, in order to avoid compatibility issues.
+ *	@support_mbssid must be set for this to have any effect.
+ *
  * @pmsr_capa: peer measurement capabilities
  */
 struct wiphy {
@@ -4420,6 +4425,9 @@ struct wiphy {
 	u32 txq_memory_limit;
 	u32 txq_quantum;
 
+	u8 support_mbssid:1,
+	   support_only_he_mbssid:1;
+
 	const struct cfg80211_pmsr_capabilities *pmsr_capa;
 
 	char priv[0] __aligned(NETDEV_ALIGN);
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 1f5535ec4b01..8fea029df134 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -1445,6 +1445,11 @@ static void cfg80211_parse_mbssid_data(struct wiphy *wiphy,
 		return;
 	if (!cfg80211_find_ie(WLAN_EID_MULTIPLE_BSSID, ie, ielen))
 		return;
+	if (!wiphy->support_mbssid)
+		return;
+	if (wiphy->support_only_he_mbssid &&
+	    !cfg80211_find_ext_ie(WLAN_EID_EXT_HE_CAPABILITY, ie, ielen))
+		return;
 
 	pos = ie;
 
@@ -1746,7 +1751,11 @@ cfg80211_inform_bss_frame_data(struct wiphy *wiphy,
 
 	res = cfg80211_inform_single_bss_frame_data(wiphy, data, mgmt,
 						    len, NULL, gfp);
-	if (!res || !cfg80211_find_ie(WLAN_EID_MULTIPLE_BSSID, ie, ielen))
+	if (!res || !wiphy->support_mbssid ||
+	    !cfg80211_find_ie(WLAN_EID_MULTIPLE_BSSID, ie, ielen))
+		return res;
+	if (wiphy->support_only_he_mbssid &&
+	    !cfg80211_find_ext_ie(WLAN_EID_EXT_HE_CAPABILITY, ie, ielen))
 		return res;
 
 	/* process each non-transmitting bss */
-- 
2.17.2


  parent reply	other threads:[~2019-01-25 11:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25 11:48 [PATCH 01/12] mac80211: pass bssids to elements parsing function Johannes Berg
2019-01-25 11:48 ` [PATCH 02/12] mac80211: move the bss update from elements to an helper Johannes Berg
2019-01-25 11:48 ` [PATCH 03/12] cfg80211: Parsing of Multiple BSSID information in scanning Johannes Berg
2019-01-25 11:48 ` [PATCH 04/12] cfg80211: Properly track transmitting and non-transmitting BSS Johannes Berg
2019-01-25 11:48 ` [PATCH 05/12] cfg80211: Move Multiple BSS info to struct cfg80211_bss to be visible Johannes Berg
2019-01-25 11:48 ` [PATCH 06/12] cfg80211: properly free nontransmitted list on all paths Johannes Berg
2019-01-25 11:48 ` Johannes Berg [this message]
2019-01-25 11:48 ` [PATCH 08/12] cfg80211: make BSSID generation function inline Johannes Berg
2019-01-25 11:48 ` [PATCH 09/12] cfg80211: save mbssid properties Johannes Berg
2019-01-25 11:48 ` [PATCH 10/12] mac80211: support mbssid Johannes Berg
2019-01-25 11:48 ` [PATCH 11/12] mac80211: indicate support for multiple BSSID Johannes Berg
2019-01-25 11:48 ` [PATCH 12/12] mac80211_hwsim: Declare support for Multi-BSSID Johannes Berg
2019-01-25 12:16 ` [PATCH 01/12] mac80211: pass bssids to elements parsing function Johannes Berg

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=20190125114825.5872-7-johannes@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sara.sharon@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.