summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/wireless/chan.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index 3e483fb27c4e..fa0764ede9c5 100644
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -405,6 +405,14 @@ bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef)
control_freq = chandef->chan->center_freq;
+ if (cfg80211_chandef_is_s1g(chandef) &&
+ chandef->width != NL80211_CHAN_WIDTH_1 &&
+ chandef->width != NL80211_CHAN_WIDTH_2 &&
+ chandef->width != NL80211_CHAN_WIDTH_4 &&
+ chandef->width != NL80211_CHAN_WIDTH_8 &&
+ chandef->width != NL80211_CHAN_WIDTH_16)
+ return false;
+
switch (chandef->width) {
case NL80211_CHAN_WIDTH_5:
case NL80211_CHAN_WIDTH_10: