summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2026-03-13 15:01:06 +0300
committerJohannes Berg <johannes.berg@intel.com>2026-03-13 16:53:06 +0300
commitd3947aac97c3e57ee2f85fd1bef8e7674e609c45 (patch)
tree9d5a333c76b71d1d2933eff99820db3a085fe6d5
parentcb0caadb64ca0894c4a24e1a34841f260d462f90 (diff)
downloadlinux-d3947aac97c3e57ee2f85fd1bef8e7674e609c45.tar.xz
wifi: nl80211: reject S1G/60G with HT chantype
This configuration doesn't make sense, neither S1G nor 60G have 20 or 40 MHz channel width. Reject it to not run into the new cfg80211_chandef_create() warning. Fixes: 92d77e06e73c ("wifi: cfg80211: restrict cfg80211_chandef_create() to only HT-based bands") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/wireless/nl80211.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 3e867930e253..d2ef13ab1a20 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3634,6 +3634,9 @@ static int _nl80211_parse_chandef(struct cfg80211_registered_device *rdev,
case NL80211_CHAN_HT20:
case NL80211_CHAN_HT40PLUS:
case NL80211_CHAN_HT40MINUS:
+ if (chandef->chan->band == NL80211_BAND_60GHZ ||
+ chandef->chan->band == NL80211_BAND_S1GHZ)
+ return -EINVAL;
cfg80211_chandef_create(chandef, chandef->chan,
chantype);
/* user input for center_freq is incorrect */