summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhi-Jun You2025-11-13 10:00:17 +0000
committerHauke Mehrtens2025-11-15 18:45:37 +0000
commit7ea377ed715078c9559891d69a455e0796be4eed (patch)
tree7fb9ebe6e09acbfdead24373b2218652eae7fa55
parentc4986bf921faebe49396a49402c17160609fec93 (diff)
downloadopenwrt-7ea377ed715078c9559891d69a455e0796be4eed.tar.gz
wifi-scripts: ucode: fix init value of config.ht_capab under 20MHz
Currently the path for setting 20MHz doesn't set ht_capab to '' at the beginning which results in null in ht_capab in hostapd.conf. Fix this by setting config.ht_capab to '' for 20MHz htmode. Fixes: #20762 Signed-off-by: Zhi-Jun You <hujy652@protonmail.com> Link: https://github.com/openwrt/openwrt/pull/20768 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc4
1 files changed, 3 insertions, 1 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 db3bffe9ef..5604eb1266 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
@@ -150,8 +150,10 @@ function device_htmode_append(config) {
/* 802.11n */
config.ieee80211n = 0;
if (config.band != '6g') {
- if (config.htmode in [ 'VHT20', 'HT20', 'HE20', 'EHT20' ])
+ if (config.htmode in [ 'VHT20', 'HT20', 'HE20', 'EHT20' ]) {
config.ieee80211n = 1;
+ config.ht_capab = '';
+ }
if (config.htmode in [ 'HT40', 'HT40+', 'HT40-', 'VHT40', 'VHT80', 'VHT160', 'HE40', 'HE80', 'HE160', 'EHT40', 'EHT80', 'EHT160' ]) {
config.ieee80211n = 1;
if (!config.channel)