From 8a40ffd07ff2919f944d1bca3e80ddbd95affa8d Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 7 Aug 2026 12:10:49 +0200 Subject: [PATCH] wifi-scripts: reserve the addresses of MLD interfaces macaddr_init() calls for_each_wdev() to mark the addresses that are in use. for_each_wdev() kept a wdev only if the radio mask of the wdev named the radio of the allocation and no other radio. An MLD uses more than one radio. Therefore no MLD matched, and the address of each MLD stayed free. The configuration describes the AP MLDs, and the code reserves them with the configuration. The MLD of the supplicant is different: hostapd is the only source of its address. The code gave that address a second time, and the new interface failed to start: Could not set interface phy0.0-ap1 flags (UP) Failed to add BSS (BSSID=a2:ad:9f:70:fb:46) Keep a wdev if it uses the radio, also when it uses other radios. Signed-off-by: Felix Fietkau --- .../config/wifi-scripts/files/usr/share/hostap/common.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/config/wifi-scripts/files/usr/share/hostap/common.uc b/package/network/config/wifi-scripts/files/usr/share/hostap/common.uc index a3b4ae8248b..5988a0208b0 100644 --- a/package/network/config/wifi-scripts/files/usr/share/hostap/common.uc +++ b/package/network/config/wifi-scripts/files/usr/share/hostap/common.uc @@ -316,7 +316,7 @@ const phy_proto = { if (wdev.iftype == nl80211.const.NL80211_IFTYPE_AP_VLAN) continue; if (this.radio != null && wdev.vif_radio_mask != null && - wdev.vif_radio_mask != (1 << this.radio)) + !(wdev.vif_radio_mask & (1 << this.radio))) continue; mac_wdev[wdev.mac] = wdev; }