diff options
author | Johannes Berg <johannes.berg@intel.com> | 2020-01-31 13:12:39 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2020-02-07 12:37:54 +0100 |
commit | 75e296e9b22aef6fa467523ace87ef623dac1fad (patch) | |
tree | fd90823f4adc314d90d298bbfed423296acb4b77 /net/mac80211/main.c | |
parent | d6039a3416f7af37c04f22c411f120ad46f51663 (diff) |
mac80211: simplify and improve HT/VHT/HE disable code
Check early on that a device has support for QoS (at least 4
queues) when it supports HT/VHT/HE, so we don't have to check
this while connecting.
This lets us clean up the code there: move some of it into
channel preparation to clean up a bit more, and then change
the logic to only check the "wmm_used" flag.
Additionally, disable HE consistently when VHT is disabled.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/20200131111300.891737-3-luca@coelho.fi
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 4c2b5ba3ac09..34728cf94172 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -981,6 +981,11 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) if (!supp_he) supp_he = !!ieee80211_get_he_sta_cap(sband); + /* HT, VHT, HE require QoS, thus >= 4 queues */ + if (WARN_ON(local->hw.queues < IEEE80211_NUM_ACS && + (supp_ht || supp_vht || supp_he))) + return -EINVAL; + if (!sband->ht_cap.ht_supported) continue; |