]> git.ipfire.org Git - thirdparty/openwrt.git/commit
wifi-scripts: fix spurious teardown on config_change during setup
authorFelix Fietkau <nbd@nbd.name>
Sun, 8 Feb 2026 18:46:07 +0000 (18:46 +0000)
committerFelix Fietkau <nbd@nbd.name>
Mon, 9 Feb 2026 07:22:10 +0000 (08:22 +0100)
commit910eb0cc4e3f8c2ebc7eaafa9d436b3f2b235091
treec92695707fc3a42f59388c7baad5913c8b8090c4
parent85342bea07f65bdd9a22fc45a4c977c9aa42a5fb
wifi-scripts: fix spurious teardown on config_change during setup

When config_change is set during an active setup (e.g. by a concurrent
reconf call), wdev_mark_up() attempted to call setup() while still in
"setup" state. Since setup() requires state "up" or "down", it silently
returned, leaving the state as "setup". The subsequent wdev_setup_cb()
then treated this as a setup failure, triggering an unnecessary
teardown+restart cycle.

Fix this by removing the config_change handling from wdev_mark_up() and
moving it to wdev_setup_cb() instead. wdev_mark_up() now always
transitions to "up" state. When wdev_setup_cb() runs afterwards and
finds the device already "up" with config_change set, it initiates a
clean re-setup from the "up" state where setup() can run.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 3553eda28379f1074b8c2cc4d3ab9930552f0cad)
package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc