projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
461ce35
)
cfg80211: require HE capabilities for 6 GHz band
author
Johannes Berg
<johannes.berg@intel.com>
Thu, 28 May 2020 19:34:42 +0000
(21:34 +0200)
committer
Johannes Berg
<johannes.berg@intel.com>
Sun, 31 May 2020 09:27:14 +0000
(11:27 +0200)
On 6 GHz band, HE capabilities must be available for all of
the interface types, otherwise we shouldn't use 6 GHz. Check
this.
Link:
https://lore.kernel.org/r/20200528213443.5881cb3c8c4a.I583b54172f91f98d44af64a16c5826fe458cbb27@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/core.c
patch
|
blob
|
history
diff --git
a/net/wireless/core.c
b/net/wireless/core.c
index 1651f86db6caeb0b381b9bf604e59a799fb896fe..5b671446049080a2dfc59d9e98f37295fdb48d02 100644
(file)
--- a/
net/wireless/core.c
+++ b/
net/wireless/core.c
@@
-791,6
+791,7
@@
int wiphy_register(struct wiphy *wiphy)
/* sanity check supported bands/channels */
for (band = 0; band < NUM_NL80211_BANDS; band++) {
u16 types = 0;
+ bool have_he = false;
sband = wiphy->bands[band];
if (!sband)
@@
-859,8
+860,17
@@
int wiphy_register(struct wiphy *wiphy)
return -EINVAL;
types |= iftd->types_mask;
+
+ if (i == 0)
+ have_he = iftd->he_cap.has_he;
+ else
+ have_he = have_he &&
+ iftd->he_cap.has_he;
}
+ if (WARN_ON(!have_he && band == NL80211_BAND_6GHZ))
+ return -EINVAL;
+
have_band = true;
}