Date: Sat, 3 May 2025 15:39:13 GMT From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 363846a7e31b - main - net80211: fix VHT80/VHT160 transmit width checks Message-ID: <202505031539.543FdDxU083077@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=363846a7e31b013dc7ebccd8017578fe79ee5103 commit 363846a7e31b013dc7ebccd8017578fe79ee5103 Author: Adrian Chadd <adrian@FreeBSD.org> AuthorDate: 2025-05-01 04:09:52 +0000 Commit: Adrian Chadd <adrian@FreeBSD.org> CommitDate: 2025-05-03 15:38:25 +0000 net80211: fix VHT80/VHT160 transmit width checks I didn't double check to see if ni_chw had been updated to actually implement values other than 20/40. It's just implementing the HT channel width stuff during both association and upon receiving a HT TX channel width action frame. This meant the VHT80/VHT160 transmit width checks were never going to be true, as ni_chw is never set to VHT80 / VHT160. After checking the HT action frame and looking for VHT changes, I'm pretty sure there's nothing explicit about VHT width, as it's normally done via CCA (clear channel access) and/or RTS/CTS exchanges - each 20MHz subchannel is RTS/CTS'ed / will be checked and if they're busy, a narrower frame will be transmitted. So, change the VHT80 / VHT160 checks to only check if ni_chw is 20MHz. If it's 20MHz then a HT action frame has come out saying to TX at 20MHz, and we should obey it. Otherwise, do 80/160MHz as available. Differential Revision: https://reviews.freebsd.org/D50096 Reviewed by: bz --- sys/net80211/ieee80211_vht.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/net80211/ieee80211_vht.c b/sys/net80211/ieee80211_vht.c index 0df95d87d01a..eb4ea615da75 100644 --- a/sys/net80211/ieee80211_vht.c +++ b/sys/net80211/ieee80211_vht.c @@ -992,9 +992,15 @@ ieee80211_vht_check_tx_vht80(const struct ieee80211_node *ni) vap = ni->ni_vap; bss_chan = vap->iv_bss->ni_chan; + /* + * ni_chw represents 20MHz or 40MHz from the HT + * TX width action frame / HT channel negotiation. + * If a HT TX width action frame sets it to 20MHz + * then reject doing 80MHz. + */ return (IEEE80211_IS_CHAN_VHT80(bss_chan) && IEEE80211_IS_CHAN_VHT80(ni->ni_chan) && - (ni->ni_chw == IEEE80211_STA_RX_BW_80)); + (ni->ni_chw != IEEE80211_STA_RX_BW_20)); } /* @@ -1015,7 +1021,13 @@ ieee80211_vht_check_tx_vht160(const struct ieee80211_node *ni) vap = ni->ni_vap; bss_chan = vap->iv_bss->ni_chan; - if (ni->ni_chw != IEEE80211_STA_RX_BW_160) + /* + * ni_chw represents 20MHz or 40MHz from the HT + * TX width action frame / HT channel negotiation. + * If a HT TX width action frame sets it to 20MHz + * then reject doing 160MHz. + */ + if (ni->ni_chw == IEEE80211_STA_RX_BW_20) return (false); if (IEEE80211_IS_CHAN_VHT160(bss_chan) &&
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202505031539.543FdDxU083077>