Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

wifi: cfg80211: restrict cfg80211_chandef_create() to only HT-based bands

cfg80211_chandef_create() should only be used by bands that are
HT-based and the chantype argument makes sense. Insert a WARN such
that it isn't used on 60GHz and S1GHz bands and to catch any
potential existing uses by those bands.

Suggested-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Lachlan Hodges <lachlan.hodges@morsemicro.com>
Link: https://patch.msgid.link/20260312045804.362974-3-lachlan.hodges@morsemicro.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Lachlan Hodges and committed by
Johannes Berg
92d77e06 a6d4291e

+3 -1
+3 -1
net/wireless/chan.c
··· 29 29 30 30 *chandef = (struct cfg80211_chan_def) { 31 31 .chan = chan, 32 - .freq1_offset = chan->freq_offset, 33 32 }; 33 + 34 + WARN_ON(chan->band == NL80211_BAND_60GHZ || 35 + chan->band == NL80211_BAND_S1GHZ); 34 36 35 37 switch (chan_type) { 36 38 case NL80211_CHAN_NO_HT: