wifi-scripts: mld_ap rejected on HE htmode links ("Cannot enable mld_ap when IEEE 802.11be is disabled")
Describe the bug
wifi-scripts (files-ucode hostapd.uc) only enters the EHT branch when htmode matches EHT*. An MLO wifi-iface on an HE htmode link therefore gets an ieee80211ax-only configuration, and hostapd rejects the whole MLD:
Cannot enable mld_ap when IEEE 802.11be is disabledWorse: during the failure/retry the MLD's interfaces end up on the wrong band - the 2.4 GHz MLD came up on 5 GHz ch36, which took every 2.4 GHz client on the box offline until fixed.
MLO requires 802.11be on every link by spec, so a 2.4 GHz MLO link must run EHT20 even when the user selected HE20 (a plain non-MLO 2.4 GHz VIF keeps running HE20 fine). Today wifi-scripts silently produces a configuration hostapd can never accept for that combination.
OpenWrt version
r0+1-99598e539d (wireless stack: kernel 6.18.53, backports 7.2, mt76 be5ce791, hostapd 831364bf, current wifi-scripts and netifd)
OpenWrt release
Self-built image (iStoreOS-based fork of OpenWrt master; affected components are unmodified mainline versions)
OpenWrt target/subtarget
airoha/an7581
Device
Airoha AN7581 (Econet XR1710G retail tri-band router, MT7996)
Image kind
Self-built image
Steps to reproduce
- Configure a 2.4+5 GHz AP-MLD: wifi-iface sections with
option mlo '1'and the device list radio0+radio1, 2.4 GHz radio htmodeHE20. - (Re)start wifi, watch the hostapd log.
Actual behaviour
hostapd refuses the MLD with "Cannot enable mld_ap when IEEE 802.11be is disabled"; the ap-mld fails to start, and the failed MLD's retry lands an interface on the wrong band (2.4 GHz MLD observed up on 5 GHz ch36). All 2.4 GHz clients drop offline.
Expected behaviour
An MLO link configured with an HE htmode should be generated as an EHT-capable link (802.11be is mandatory for MLO), or at minimum fail validation with a clear user-facing error instead of a broken MLD on the wrong band.
Additional info
Proposed fix in package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc - treat an HE htmode on MLO links as EHT:
--- 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
@@ -444,7 +444,12 @@
]);
}
- if (wildcard(config.htmode, 'EHT*')) {
+ /* MLO (mlo=1) requires every link to be EHT: hostapd rejects
+ * "mld_ap=1" with "Cannot enable mld_ap when IEEE 802.11be is
+ * disabled", which kills the entire MLD (seen with 2.4G+5G MLO
+ * on an HE20 2.4G link). Treat an HE htmode on MLO links as EHT. */
+ if (wildcard(config.htmode, 'EHT*') ||
+ (config.mlo && wildcard(config.htmode, 'HE*'))) {
let eht_phy_cap = phy_capabilities.eht_phy_cap;
config.ieee80211be = true;Verified on two MT7996 devices: 2.4+5 GHz AP-MLD with the 2.4 GHz link on EHT20 carrying 7-13 IoT clients, zero hostapd errors, the 5+6 GHz MLD and 6 GHz mesh unaffected; a separate plain-HE20 2.4 GHz VIF (no mlo) continues to run without EHT.
Diffconfig
Built from a fork tree, so scripts/diffconfig.sh output is not directly comparable to a mainline build; specific CONFIG excerpts available on request.
Terms
- I am reporting an issue for OpenWrt, not an unsupported fork.
Source: openwrt/openwrt