aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2021-06-18 13:41:42 +0300
committerJohannes Berg <johannes.berg@intel.com>2021-06-23 13:10:44 +0200
commit7d29bc50b30e58102dd0e7a6beb1a72cc41029c5 (patch)
tree9200959b37351a1bde3d4e46ff0a040360749405
parentcfg80211: Support hidden AP discovery over 6GHz band (diff)
downloadlinux-dev-7d29bc50b30e58102dd0e7a6beb1a72cc41029c5.tar.xz
linux-dev-7d29bc50b30e58102dd0e7a6beb1a72cc41029c5.zip
mac80211: always include HE 6GHz capability in probe request
If HE/6GHz is available (thus we consider dot11HE6GOptionImplemented to be true), then always include the corresponding capability in the probe request as required by the spec. 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.25ee4a54a7d0.I8cebd799c85524c8123a11941a104dbdefc03762@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/util.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index fab4bb1948e3..d1ecac00bddb 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1945,8 +1945,18 @@ static int ieee80211_build_preq_ies_band(struct ieee80211_sub_if_data *sdata,
pos = ieee80211_ie_build_he_cap(pos, he_cap, end);
if (!pos)
goto out_err;
+ }
+
+ if (cfg80211_any_usable_channels(local->hw.wiphy,
+ BIT(NL80211_BAND_6GHZ),
+ IEEE80211_CHAN_NO_HE)) {
+ struct ieee80211_supported_band *sband6;
+
+ sband6 = local->hw.wiphy->bands[NL80211_BAND_6GHZ];
+ he_cap = ieee80211_get_he_iftype_cap(sband6,
+ ieee80211_vif_type_p2p(&sdata->vif));
- if (sband->band == NL80211_BAND_6GHZ) {
+ if (he_cap) {
enum nl80211_iftype iftype =
ieee80211_vif_type_p2p(&sdata->vif);
__le16 cap = ieee80211_get_he_6ghz_capa(sband, iftype);