summaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2021-06-18 12:41:50 +0200
committerJohannes Berg <johannes.berg@intel.com>2021-06-23 11:33:26 +0200
commitbac2fd3d753430032043098dd55543037e3f7a60 (patch)
treec2fe8c5cf969c05d77f3543a243171db24b49bbf /net/mac80211/main.c
parentcfg80211: trace more information in assoc trace event (diff)
downloadlinux-bac2fd3d753430032043098dd55543037e3f7a60.tar.xz
linux-bac2fd3d753430032043098dd55543037e3f7a60.zip
mac80211: remove use of ieee80211_get_he_sta_cap()
All uses of ieee80211_get_he_sta_cap() were actually wrong, in net/mac80211/mlme.c they were wrong because that code is also used for P2P (which is a different interface type), in net/mac80211/main.c that should check all interface types. Fix all that. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210618133832.ede114bc8b46.Ibcd9a5d98430e936344eb6d242ef8a65c2f59b74@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index cde142fa8cb3..95a8300da2d0 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -1010,8 +1010,13 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
supp_ht = supp_ht || sband->ht_cap.ht_supported;
supp_vht = supp_vht || sband->vht_cap.vht_supported;
- if (!supp_he)
- supp_he = !!ieee80211_get_he_sta_cap(sband);
+ for (i = 0; i < sband->n_iftype_data; i++) {
+ const struct ieee80211_sband_iftype_data *iftd;
+
+ iftd = &sband->iftype_data[i];
+
+ supp_he = supp_he || (iftd && iftd->he_cap.has_he);
+ }
/* HT, VHT, HE require QoS, thus >= 4 queues */
if (WARN_ON(local->hw.queues < IEEE80211_NUM_ACS &&