From: Lachlan Hodges <lachlan.hodges@morsemicro.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, arien.judge@morsemicro.com,
Lachlan Hodges <lachlan.hodges@morsemicro.com>
Subject: [PATCH wireless-next v2 1/2] wifi: mac80211: skip NSS and BW init for S1G sta
Date: Wed, 6 May 2026 23:19:24 +1000 [thread overview]
Message-ID: <20260506131925.2088353-2-lachlan.hodges@morsemicro.com> (raw)
In-Reply-To: <20260506131925.2088353-1-lachlan.hodges@morsemicro.com>
Currently there is no S1G STA bandwidth support throughout mac80211
as existing support is all based on 20MHz widths. With the recent
STA NSS/BW handling rework, S1G associations now hit the new WARN within
ieee80211_chan_width_to_rx_bw() as the chandef is not a 20MHz based
width. For now, skip initialisating link_sta->pub->bandwidth for
S1G chandefs to avoid the WARN though this should at some point be
properly implemented since there are vendors that offer differing
maximum bandwidths.
Additionally, currently all S1G hardware out there is 1SS so rather
then introducing new parsing code which wouldn't be used anyway, just
initialise the NSS related fields to 1 and skip initialising the STA
bandwidth for S1G chandefs within ieee80211_sta_init_nss_bw_capa().
Fixes: d879d4da4579 ("wifi: mac80211: clean up initial STA NSS/bandwidth handling")
Signed-off-by: Lachlan Hodges <lachlan.hodges@morsemicro.com>
---
net/mac80211/sta_info.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index aba2fabfe0db..0ea37016cd4f 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -3516,6 +3516,23 @@ static u8 ieee80211_sta_nss_capability(struct link_sta_info *link_sta)
void ieee80211_sta_init_nss_bw_capa(struct link_sta_info *link_sta,
struct cfg80211_chan_def *chandef)
{
+ /*
+ * TODO: The entirety of the STA Tx/Rx bandwidth handling
+ * assumes 20MHz based widths, so for now don't initialise
+ * pubsta->bandwidth for S1G bands. Since enum
+ * ieee80211_sta_rx_bandwidth is ordered, we will probably
+ * need to introduce ieee80211_s1g_sta_rx_bandwidth with
+ * S1G widths and associated S1G specific code. Additionally,
+ * existing S1G hardware is all 1SS, in the future if hardware
+ * starts supporting >1SS this should be implemented in
+ * ieee80211_sta_nss_capability().
+ */
+ if (cfg80211_chandef_is_s1g(chandef)) {
+ link_sta->capa_nss = 1;
+ link_sta->pub->rx_nss = 1;
+ return;
+ }
+
link_sta->capa_nss = ieee80211_sta_nss_capability(link_sta);
link_sta->pub->rx_nss = link_sta->capa_nss;
--
2.43.0
next prev parent reply other threads:[~2026-05-06 13:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 13:19 [PATCH wireless-next v2 0/2] S1G channel fixes Lachlan Hodges
2026-05-06 13:19 ` Lachlan Hodges [this message]
2026-05-06 13:19 ` [PATCH wireless-next v2 2/2] wifi: mac80211: don't recalc min def for S1G chan ctx 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=20260506131925.2088353-2-lachlan.hodges@morsemicro.com \
--to=lachlan.hodges@morsemicro.com \
--cc=arien.judge@morsemicro.com \
--cc=johannes@sipsolutions.net \
--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