[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5fda29626ca04e7c2ad46ca4a3d0eb1d992789d9.camel@sipsolutions.net>
Date: Thu, 03 Jul 2025 18:54:09 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Moonhee Lee <moonhee.lee.ca@...il.com>
Cc: Nicolas Escande <nico.escande@...il.com>,
linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kernel-mentees@...ts.linux.dev,
syzbot+ededba317ddeca8b3f08@...kaller.appspotmail.com
Subject: Re: [PATCH wireless-next] wifi: mac80211: reject VHT opmode for
unsupported channel widths
On Thu, 2025-07-03 at 09:35 -0700, Moonhee Lee wrote:
>
> To address this, I plan to reject the set of channel widths that are not valid
> with VHT opmode. This includes all channel widths below 20 MHz, as well as
> 20 MHz without HT (20_NOHT), which is also incompatible.
>
> Would the following logic for v2 be acceptable?
>
> /* reject channel widths not valid with VHT opmode */
> switch (width) {
> case NL80211_CHAN_WIDTH_5:
> case NL80211_CHAN_WIDTH_10:
> 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:
> case NL80211_CHAN_WIDTH_20_NOHT:
> return -EINVAL;
> default:
> break;
> }
>
> This allows valid HT/VHT channel widths, including 20, 40, 80, 80+80, 160, and
> 320, to pass through while filtering out values that would otherwise trigger a
> WARN_ON.
I think it'd make more sense to go the other way around and list the
bandwidths that are _valid_ here, even if I don't see it getting
extended any time soon (anyone working on TVHT? ;-) )
But in some way I also have a feeling we _should_ be able to reject this
in cfg80211 already - although it seems that right now we cannot. Hmm. I
guess better to have this validation here now than fail/WARN, but then
I'd like a positive list of allowed values, rather than forbidden ones.
johannes
Powered by blists - more mailing lists