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>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user