]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
wifi-scripts: do not report a disabled wifi-device as up
authorFelix Fietkau <nbd@nbd.name>
Fri, 10 Jul 2026 12:19:48 +0000 (14:19 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 16 Jul 2026 09:50:21 +0000 (11:50 +0200)
A disabled wifi-device is intentionally still run through the setup path
(with no interfaces) to reliably tear down hostapd/wpa_supplicant and to
handle disabled/enabled flapping, so it reaches state "up" and status
reported up: true alongside disabled: true. Exclude disabled devices from
the up state in status instead.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc

index d32948c711cb17760e6f4b41a26fc804d06032e7..2f16d26ff6c94545f72c2bf05bd74cae8e959f5e 100644 (file)
@@ -600,7 +600,7 @@ function status()
                });
        }
        return {
-               up: this.state == "up",
+               up: this.state == "up" && !this.data.config.disabled,
                pending: this.state == "setup" || this.state == "teardown",
                autostart: this.autostart,
                disabled: !!this.data.config.disabled,