mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-02-09 15:52:51 +01:00
wifi-scripts: fix handling changes to the wifi device disabled flag
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Allow toggling autostart even for disabled devices When switching from enabled to disabled, call teardown instead of setup Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
f3dd291b62
commit
de447b93e0
1 changed files with 8 additions and 2 deletions
|
|
@ -391,11 +391,14 @@ function update(data)
|
|||
|
||||
function start()
|
||||
{
|
||||
if (this.delete || this.data.config.disabled)
|
||||
if (this.delete)
|
||||
return;
|
||||
|
||||
this.dbg("start, state=" + this.state);
|
||||
this.autostart = true;
|
||||
if (this.data.config.disabled)
|
||||
return;
|
||||
|
||||
wdev_reset(this);
|
||||
|
||||
if (this.state != "down")
|
||||
|
|
@ -427,7 +430,10 @@ function check()
|
|||
return;
|
||||
|
||||
wdev_config_init(this);
|
||||
this.setup();
|
||||
if (this.data.config.disabled)
|
||||
this.teardown();
|
||||
else
|
||||
this.setup();
|
||||
}
|
||||
|
||||
function wdev_mark_up(wdev)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue