From eb68434835b956a2cba2df74fcfb4f5367b8d757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miika=20Sundstr=C3=B6m?= Date: Sun, 15 Mar 2026 18:40:42 +0200 Subject: [PATCH] wifi-scripts: fix [VHT160]/[VHT160-80PLUS80] usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't set vht_capab [VHT160] or [VHT160-80PLUS80] when the AP is not configured to operate in 160 MHz. Fixes an issue degrading station upload speed. Fixes: https://github.com/openwrt/openwrt/issues/22435 Signed-off-by: Miika Sundström Link: https://github.com/openwrt/openwrt/pull/22436 Signed-off-by: Hauke Mehrtens (cherry picked from commit 02e2065203c5e6c95f88e3501644d3e6ad740f89) --- .../files-ucode/usr/share/ucode/wifi/hostapd.uc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc index 61570d76f2..49262c9d61 100644 --- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc +++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc @@ -354,10 +354,10 @@ function device_htmode_append(config) { config.vht_capab += '[BF-ANTENNA-' + min(((vht_capab >> 13) & 3) + 1, config.beamformer_antennas) + ']'; /* supported Channel widths */ - if ((vht_capab & 0xc) == 8 && config.vht160 <= 2) - config.vht_capab += '[VHT160-80PLUS80]'; - else if ((vht_capab & 0xc) == 4 && config.vht160 <= 2) + if (((vht_capab & 0xc) == 4 || (vht_capab & 0xc) == 8) && config.vht160 >= 1) config.vht_capab += '[VHT160]'; + if ((vht_capab & 0xc) == 8 && config.vht160 >= 2) + config.vht_capab += '[VHT160-80PLUS80]'; /* maximum MPDU length */ if ((vht_capab & 3) > 1 && config.vht_max_mpdu >= 11454)