wireless: fix issues with cancelling device setup
authorFelix Fietkau <nbd@openwrt.org>
Sun, 1 Dec 2013 21:00:28 +0000 (22:00 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 1 Dec 2013 21:00:28 +0000 (22:00 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
wireless.c

index c099a3334de44828a8019cb5bed8a33459c21aa4..c19d12c073df92d418c379839a37bae740b8fc43 100644 (file)
@@ -167,6 +167,7 @@ wireless_device_free_state(struct wireless_device *wdev)
 {
        struct wireless_interface *vif;
 
+       uloop_timeout_cancel(&wdev->timeout);
        wireless_complete_kill_request(wdev);
        free(wdev->data);
        wdev->data = NULL;
@@ -258,6 +259,7 @@ wireless_device_mark_down(struct wireless_device *wdev)
 
        wireless_process_kill_all(wdev, SIGTERM, true);
 
+       wdev->cancel = false;
        wdev->state = IFS_DOWN;
        wireless_device_free_state(wdev);