diff mbox series

[15/23] mac80211: update condition for HE disablement

Message ID 20200131111300.891737-16-luca@coelho.fi
State New
Headers show
Series cfg80211/mac80211 patches from our internal tree 2020-01-31 | expand

Commit Message

Luca Coelho Jan. 31, 2020, 11:12 a.m. UTC
From: Daniel Gabay <daniel.gabay@intel.com>

Disable HE if the beacon does not contain an HE operation IE.

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 net/mac80211/mlme.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index f78e7aa67991..9ab0842a7c37 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -313,8 +313,8 @@  ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata,
 		ret |= ieee80211_chandef_downgrade(chandef);
 	}
 
-	if (!cfg80211_chandef_usable(sdata->wdev.wiphy, chandef,
-				     IEEE80211_CHAN_NO_HE))
+	if (!he_oper || !cfg80211_chandef_usable(sdata->wdev.wiphy, chandef,
+						 IEEE80211_CHAN_NO_HE))
 		ret |= IEEE80211_STA_DISABLE_HE;
 
 	if (chandef->width != vht_chandef.width && !tracking)