mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH wireless] wifi: mac80211: use HT CCFS2 when computing the AP's HE and lower bandwidth
@ 2026-10-26  4:01 John Macias
  2026-10-26 11:07 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: John Macias @ 2026-10-26  4:01 UTC (permalink / raw)
  To: johannes, linux-wireless; +Cc: linux-kernel

If the driver advertises VHT extended NSS BW support, hostapd announces
a 160 MHz BSS the way IEEE 802.11-2020 allows for that case: the VHT
Operation element has channel width 1, CCFS0 is the 80 MHz segment and
CCFS1 is 0, and the 160 MHz centre is in the CCFS2 field of the HT
Operation element.

ieee80211_calc_ap_he_and_lower() only looks at the VHT CCFS1, so it
sets bss_bw.he_and_lower to 80 MHz and ieee80211_sta_usable_bw() then
limits every HE and VHT station to 80 MHz. Stations parse CCFS2 and use
160 MHz towards the AP, but the AP never transmits wider than 80 MHz.

Take CCFS2 from the HT Operation element when the VHT CCFS1 is 0, as
the station side already does in ieee80211_chandef_vht_oper().

Seen with ath11k on IPQ8074 (it advertises extended NSS BW when the
firmware reports an NSS ratio) with an HE160 BSS on channel 36: peers
were created as 11ax-he80 and no frames were sent at 160 MHz. With this
change the peers are 11ax-he160, nearly all downlink data goes out at
160 MHz and an MT7925 client's download went from 810 to 1645 Mb/s.

Fixes: c9b62ab79133 ("wifi: mac80211: fix per-station PHY capability bandwidth")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: John Macias <dencity7@gmail.com>
---
 net/mac80211/cfg.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index a1753335e..e6fd83cb7 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1366,6 +1366,13 @@ ieee80211_calc_ap_he_and_lower(struct cfg80211_beacon_data *params)
 			 */
 			ccfs0 = vht_oper->center_freq_seg0_idx;
 			ccfs1 = vht_oper->center_freq_seg1_idx;
+			/*
+			 * With extended NSS BW support the second segment
+			 * can be in the HT Operation CCFS2 field instead.
+			 */
+			if (!ccfs1 && params->ht_oper)
+				ccfs1 = le16_get_bits(params->ht_oper->operation_mode,
+						      IEEE80211_HT_OP_MODE_CCFS2_MASK);
 			if (!ccfs0)
 				return IEEE80211_STA_RX_BW_80;
 			if (ccfs1 && abs(ccfs1 - ccfs0) == 8)
-- 
2.47.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-26 20:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-26  4:01 [PATCH wireless] wifi: mac80211: use HT CCFS2 when computing the AP's HE and lower bandwidth John Macias
2026-10-26 11:07 ` Johannes Berg
2026-10-26 20:15   ` John Macias

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®