summaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2020-10-10 18:12:52 +0200
committerJakub Kicinski <kuba@kernel.org>2020-10-10 18:12:52 +0200
commit16573e7cb5ad6f94f1fd41153dfdf2aef85fe310 (patch)
treeed13f780cb94cb10ea289d3cfbbb2b5d68fdfd42 /net/wireless
parentMerge branch 'netlink-export-policy-on-validation-failures' (diff)
parentmac80211: copy configured beacon tx rate to driver (diff)
downloadlinux-16573e7cb5ad6f94f1fd41153dfdf2aef85fe310.tar.xz
linux-16573e7cb5ad6f94f1fd41153dfdf2aef85fe310.zip
Merge tag 'mac80211-next-for-net-next-2020-10-08' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Johannes Berg says: ==================== A handful of changes: * fixes for the recent S1G work * a docbook build time improvement * API to pass beacon rate to lower-level driver ==================== Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/chan.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index 96e24ee4c7e8..22d1779ab2b1 100644
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -207,7 +207,6 @@ bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef)
control_freq = chandef->chan->center_freq;
switch (chandef->width) {
- case NL80211_CHAN_WIDTH_1:
case NL80211_CHAN_WIDTH_5:
case NL80211_CHAN_WIDTH_10:
case NL80211_CHAN_WIDTH_20:
@@ -218,10 +217,14 @@ bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef)
if (chandef->center_freq2)
return false;
break;
+ case NL80211_CHAN_WIDTH_1:
case NL80211_CHAN_WIDTH_2:
case NL80211_CHAN_WIDTH_4:
case NL80211_CHAN_WIDTH_8:
case NL80211_CHAN_WIDTH_16:
+ if (chandef->chan->band != NL80211_BAND_S1GHZ)
+ return false;
+
control_freq = ieee80211_channel_to_khz(chandef->chan);
oper_freq = ieee80211_chandef_to_khz(chandef);
control_width = nl80211_chan_width_to_mhz(