wireless: only process setup retries in setup/up state
authorFelix Fietkau <nbd@openwrt.org>
Mon, 2 Dec 2013 15:42:45 +0000 (16:42 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 2 Dec 2013 15:46:07 +0000 (16:46 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
wireless.c

index fb66e7f3b136384abb1825f5b6d58d399687f308..6e71fc6f07607d854711fbc9068d30a64e896fc3 100644 (file)
@@ -338,6 +338,9 @@ __wireless_device_set_down(struct wireless_device *wdev)
 static void
 wireless_device_retry_setup(struct wireless_device *wdev)
 {
+       if (wdev->state == IFS_TEARDOWN || wdev->state == IFS_DOWN || wdev->cancel)
+               return;
+
        if (--wdev->retry < 0)
                wdev->autostart = false;