[LEDE-DEV] [PATCH] netifd: remove wireless device when device fails to setup
Eduardo Abinader
eduardo.abinader at riverbed.com
Thu Jun 30 07:26:00 PDT 2016
Ensure wireless device struct is removed, when it fails to be set up,
due to a invalid configuration, hence enabling the wireless dev
to be set up again, when a new valid configuration is set.
Signed-off-by: Eduardo Abinader <eduardo.abinader at riverbed.com>
---
wireless.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/wireless.c b/wireless.c
index 34dd328..bc31d4a 100644
--- a/wireless.c
+++ b/wireless.c
@@ -336,6 +336,10 @@ wireless_device_mark_down(struct wireless_device *wdev)
wireless_process_kill_all(wdev, SIGTERM, true);
+ if (wdev->state == IFS_SETUP && !wdev->autostart) {
+ wdev->config_state = IFC_REMOVE;
+ }
+
wdev->cancel = false;
wdev->state = IFS_DOWN;
wireless_device_free_state(wdev);
--
2.5.0
More information about the Lede-dev
mailing list