wifi-scripts: only manage wdev interfaces recorded in the statefile
wdev.uc adopted every operstate-down netdev on the phy and then removed any not in its new config. hostapd BSS netdevs are legitimately operstate-down while stopped (co-located STA down, or start_disabled), so a reload deleted them and hostapd, seeing an unchanged config, never recreated them. Drop the adopt-existing step; the statefile already tracks the interfaces wdev.uc owns. Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
@@ -90,17 +90,6 @@ function delete_ifname(config)
|
||||
delete config[key].ifname;
|
||||
}
|
||||
|
||||
function add_existing(phydev, config)
|
||||
{
|
||||
phydev.for_each_wdev((wdev) => {
|
||||
if (config[wdev])
|
||||
return;
|
||||
|
||||
if (trim(readfile(`/sys/class/net/${wdev}/operstate`)) == "down")
|
||||
config[wdev] = {};
|
||||
});
|
||||
}
|
||||
|
||||
function usage()
|
||||
{
|
||||
warn(`Usage: ${basename(sourcepath())} <phy> <command> [<arguments>]
|
||||
@@ -137,7 +126,6 @@ const commands = {
|
||||
if (type(old_config) == "object")
|
||||
config.data = old_config;
|
||||
|
||||
add_existing(phydev, config.data);
|
||||
add_ifname(config.data);
|
||||
drop_inactive(config.data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user