Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07399fd9 authored by Peng Xu's avatar Peng Xu
Browse files

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: default avatarSara Sharon <sara.sharon@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Change-Id: If43a6ae9143a0dd607fd9b479819f4b1ca313512
CRs-fixed: 2399972
Git-commit: 213ed579d38ef47c55694a4a411926af3dfc6558
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git


Signed-off-by: default avatarPeng Xu <pxu@codeaurora.org>
parent d79a5f68
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -3983,6 +3983,12 @@ struct wiphy_iftype_ext_capab {
 * @txq_limit: configuration of internal TX queue frame limit
 * @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.
 *
 */
struct wiphy {
	/* assign these fields before you register the wiphy */
@@ -4121,6 +4127,9 @@ struct wiphy {
	u32 txq_memory_limit;
	u32 txq_quantum;

	u8 support_mbssid:1,
	   support_only_he_mbssid:1;

	char priv[0] __aligned(NETDEV_ALIGN);
};

+10 −1
Original line number Diff line number Diff line
@@ -1422,6 +1422,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)
@@ -1706,7 +1711,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 */