From: Johannes Berg <johannes@sipsolutions.net>
To: Lachlan Hodges <lachlan.hodges@morsemicro.com>
Cc: linux-wireless@vger.kernel.org, arien.judge@morsemicro.com
Subject: Re: [PATCH wireless-next] wifi: cfg80211: don't apply HT flags to S1G channels
Date: Tue, 20 Jan 2026 08:50:05 +0100 [thread overview]
Message-ID: <4dd2558fc13dd974bf551653b3db9c70feed73fe.camel@sipsolutions.net> (raw)
In-Reply-To: <tyreg7kb5ownpgrbcwo72rk5tevk6jpzbthtlqr5z5zykvhaji@wpybm6oversy> (sfid-20260120_062241_374294_7F45D849)
On Tue, 2026-01-20 at 16:22 +1100, Lachlan Hodges wrote:
> > > Playing around with some 5 GHz configurations in OpenWRT it appears that only
> > > so much information can be conveyed and indeed there are configurations that
> > > will be rejected by cfg80211 (or maybe hostapd in some cases, not sure).
> >
> > Really? Got an example, perhaps even with hostapd log to see how it's
> > rejected? That clearly contradicts what I wrote above which I really did
> > believe to be true until this moment ;-)
>
> Sorry, it is indeed cfg80211 that is not accepting the chandef configuration.
Maybe I still know something ;-)
> channel=165
>
> vht_oper_centr_freq_seg0_idx=171
> This is the result of selecting mode AX, channel 165 with a width of 80MHz.
Well, I guess that could be done in some countries, U-NII-4 goes up to
channel 177 inclusive? But not for Australia which only has up to 173
(according to Wikipedia, maybe it's changing, I didn't check better
sources now.)
> The GL-MT3000 using the mt76 driver with mt7915e driver (?)
>
> cfg80211 299008 4 mt7915e,mt76_connac_lib,mt76,mac80211
> compat 12288 3 mt76,mac80211,cfg80211
> mac80211 581632 3 mt7915e,mt76_connac_lib,mt76
> mt76 73728 2 mt7915e,mt76_connac_lib
> mt76_connac_lib 45056 1 mt7915e
>
> And for hostapd output (Sorry I don't have anything more verbose)
>
> Tue Jan 20 04:10:43 2026 daemon.err hostapd: nl80211: kernel reports: (extension) channel is disabled
Right, makes sense, it's at least saying channel 177 doesn't exist or
cannot be used, perhaps already on 169/173 depending on what the device
knows about U-NII-4.
> Tue Jan 20 04:10:43 2026 daemon.err hostapd: Could not set channel for kernel driver
> Tue Jan 20 04:10:43 2026 daemon.err hostapd: Interface initialization failed
>
> where _cfg80211_chandef_usable() is (rightfully) rejecting the configuration.
> This simply appears to be the logic to generate the config doesn't cover this
> case properly.
Right.
> Anyways, I don't think this is all that useful too be honest,
> it just comes down to ensuring the static configurations are known especially
> since this range is specified as AUTO-BW anyway as per the regdom.
Yeah, or checking against the regulatory, or something ... but basically
channel 165 + 80 MHz isn't _really_ possible then, since the
channelization plan says then you should use 171 as it does now.
> > > I
> > > suppose what I'm asking is - how much do we need to protect usermode from
> > > this? Do you feel it's worth including a flag that somewhat emulates
> > > NOHT40+/-? I know much of that logic is quite old and S1G is "modern" ... ?
> >
> > It's always nice to have userspace be aware of things, but I guess if
> > it's a configuration that's statically known to be invalid, it wouldn't
> > matter so much?
But I think in the case you describe above, userspace should well have
been able to, at least in theory, predict that this would happen, based
on the channel flags.
> > But I don't think I've understood the S1G angle - are
> > you talking about primary 1 MHz? Primary 2 MHz?
>
> Putting primaries aside and just thinking of operating - eventually we would
> need a NO_2MHZ flag as India for example only has 1MHz channels.. however
> this is well into the future .. we first need to add support for other
> countries :').
:)
> But yes as you said since these configurations are static it's not really a
> big deal and more up to userspace to be aware of it. I think what we have in
> cfg80211 now is good enough and seems to be working well when integrating
> into an actual userspace stack.
OK, sounds good.
> > We just posted a lot of hwsim changes for NAN - better send yours sooner
> > rather than later ;-)
>
> Yes I have seen, lots of Wi-Fi 8 documents aswell so I assume that will get busy
> soon too. Well see .. Lots to do!!
I don't think hwsim will get too many wifi8 changes, but yeah there are
a lot of things brewing now. Seems you (mostly?) got just ahead of it
though, so it shouldn't be much of an issue, I'd think.
johannes
next prev parent reply other threads:[~2026-01-20 7:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-13 3:09 [PATCH wireless-next] wifi: cfg80211: don't apply HT flags to S1G channels Lachlan Hodges
2026-01-13 3:56 ` Lachlan Hodges
2026-01-13 8:18 ` Johannes Berg
2026-01-20 5:22 ` Lachlan Hodges
2026-01-20 7:50 ` Johannes Berg [this message]
2026-01-20 10:08 ` Lachlan Hodges
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4dd2558fc13dd974bf551653b3db9c70feed73fe.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=arien.judge@morsemicro.com \
--cc=lachlan.hodges@morsemicro.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox