[openwrt/openwrt] netifd: always call setup for disabled radios

LEDE Commits lede-commits at lists.infradead.org
Thu Oct 2 01:47:40 PDT 2025


nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4b7323e3bfa82ed8279f1e757f82d4961d8e3ae7

commit 4b7323e3bfa82ed8279f1e757f82d4961d8e3ae7
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Oct 2 10:33:29 2025 +0200

    netifd: always call setup for disabled radios
    
    Ensures that renaming is handled properly. For disabled radios, setup is
    performed with an empty list of interfaces.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../config/wifi-scripts/files/lib/netifd/wireless-device.uc      | 9 ++-------
 package/network/config/wifi-scripts/files/lib/netifd/wireless.uc | 2 +-
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
index fa9a5faafb..36ec3e7d35 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
@@ -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)
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 19c38d11e5..500033be97 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
@@ -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];




More information about the lede-commits mailing list