[openwrt/openwrt] wifi-scripts: iface should be optional in wifi-station definition

LEDE Commits lede-commits at lists.infradead.org
Tue Nov 25 02:45:27 PST 2025


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e7401393026c742d143aa770a7617b3996430ea0

commit e7401393026c742d143aa770a7617b3996430ea0
Author: Rany Hany <rany_hany at riseup.net>
AuthorDate: Sun Nov 16 14:37:49 2025 +0000

    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 <rany_hany at riseup.net>
    Link: https://github.com/openwrt/openwrt/pull/20694
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../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);
+			}
 		}
 	}
 




More information about the lede-commits mailing list