netifd: always call setup for disabled radios
authorFelix Fietkau <[email protected]>
Thu, 2 Oct 2025 08:33:29 +0000 (10:33 +0200)
committerFelix Fietkau <[email protected]>
Thu, 2 Oct 2025 08:47:34 +0000 (10:47 +0200)
Ensures that renaming is handled properly. For disabled radios, setup is
performed with an empty list of interfaces.

Signed-off-by: Felix Fietkau <[email protected]>
package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
package/network/config/wifi-scripts/files/lib/netifd/wireless.uc

index fa9a5faafb7d0db779d10ae349f4602cd7bd12e9..36ec3e7d35786ec6be1dde1635e71718c6f49bb0 100644 (file)
@@ -287,7 +287,7 @@ function setup()
                return;
 
        this.dbg("setup, state=" + this.state);
-       if (!this.autostart || this.retry_setup_failed || this.data.config.disabled)
+       if (!this.autostart || this.retry_setup_failed)
                return;
 
        wdev_proc_reset(this);
@@ -384,8 +384,6 @@ function start()
 
        this.dbg("start, state=" + this.state);
        this.autostart = true;
-       if (this.data.config.disabled)
-               return;
 
        wdev_reset(this);
 
@@ -418,10 +416,7 @@ function check()
                return;
 
        wdev_config_init(this);
-       if (this.data.config.disabled)
-               this.teardown();
-       else
-               this.setup();
+       this.setup();
 }
 
 function wdev_mark_up(wdev)
index 19c38d11e566cd57a83ac4d190c5cab5d98d621d..500033be975a1525187a987dbdb3ff1d35af3325 100644 (file)
@@ -138,7 +138,7 @@ function config_init(uci)
 
                for (let dev_name in dev_names) {
                        let dev = devices[dev_name];
-                       if (!dev)
+                       if (!dev || dev.config.disabled)
                                continue;
 
                        let handler = handlers[dev_name];