summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorSara Sharon <sara.sharon@intel.com>2019-01-16 23:02:03 +0200
committerJohannes Berg <johannes.berg@intel.com>2019-02-08 13:51:50 +0100
commit213ed579d38ef47c55694a4a411926af3dfc6558 (patch)
tree1eaffbf2a7c3251739cfd8a62f0027930917bf86 /net/wireless
parent7011ba583f425780ab1ee52f41161a0171197365 (diff)
cfg80211: parse multi-bssid only if HW supports it
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>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/scan.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 325323a842d8..ab0f0178ee0e 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -1417,6 +1417,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;
new_ie = kmalloc(IEEE80211_MAX_DATA_LEN, gfp);
if (!new_ie)
@@ -1701,7 +1706,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 */