From e7401393026c742d143aa770a7617b3996430ea0 Mon Sep 17 00:00:00 2001 From: Rany Hany Date: Sun, 16 Nov 2025 14:37:49 +0000 Subject: [PATCH] wifi-scripts: iface should be optional in wifi-station definition Similar to "wifi-scripts: iface should be optional in wifi-vlan definition" (98435a3), wifi-station iface should also be optional. By default, it is supposed to match all interfaces if omitted. Fixes: https://github.com/openwrt/openwrt/issues/20705 Signed-off-by: Rany Hany Link: https://github.com/openwrt/openwrt/pull/20694 Signed-off-by: Robert Marko --- .../wifi-scripts/files/lib/netifd/wireless.uc | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc index 5f64104c8b..ad935ce414 100644 --- a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc +++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc @@ -214,22 +214,24 @@ function config_init(uci) } for (let name, data in sections.station) { - if (!data.iface || !vifs[data.iface]) - continue; - - for (let vif in vifs[data.iface]) { - let dev = devices[vif.device]; - let handler = handlers[vif.device]; - if (!dev || !handler) + for (let iface, iface_vifs in vifs) { + if (data.iface && data.iface != iface) continue; - let config = parse_attribute_list(data, handler.station); + for (let vif in iface_vifs) { + let dev = devices[vif.device]; + let handler = handlers[vif.device]; + if (!dev || !handler) + continue; - let sta = { - name, - config - }; - push(vif.sta, sta); + let config = parse_attribute_list(data, handler.station); + + let sta = { + name, + config + }; + push(vif.sta, sta); + } } } -- 2.30.2