mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-10 08:44:39 +01:00
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@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/20694
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
63c146a464
commit
e740139302
1 changed files with 15 additions and 13 deletions
|
|
@ -214,22 +214,24 @@ function config_init(uci)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let name, data in sections.station) {
|
for (let name, data in sections.station) {
|
||||||
if (!data.iface || !vifs[data.iface])
|
for (let iface, iface_vifs in vifs) {
|
||||||
continue;
|
if (data.iface && data.iface != iface)
|
||||||
|
|
||||||
for (let vif in vifs[data.iface]) {
|
|
||||||
let dev = devices[vif.device];
|
|
||||||
let handler = handlers[vif.device];
|
|
||||||
if (!dev || !handler)
|
|
||||||
continue;
|
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 = {
|
let config = parse_attribute_list(data, handler.station);
|
||||||
name,
|
|
||||||
config
|
let sta = {
|
||||||
};
|
name,
|
||||||
push(vif.sta, sta);
|
config
|
||||||
|
};
|
||||||
|
push(vif.sta, sta);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue