wifi: Do not start autoscan if interface was not ready
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Tue, 16 Oct 2012 05:35:17 +0000 (08:35 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Tue, 16 Oct 2012 10:45:54 +0000 (13:45 +0300)
plugins/wifi.c

index 2984de0e8ef088f61ea48e860a4c23dc919a2b23..631d0cc3a2b9096fc6b8ea3bd63e88fd08d1a623 100644 (file)
@@ -516,7 +516,10 @@ static void scan_callback(int result, GSupplicantInterface *interface,
                connman_device_reset_scanning(device);
 
        connman_device_set_scanning(device, FALSE);
-       start_autoscan(device);
+
+       if (result != -ENOLINK)
+               start_autoscan(device);
+
        connman_device_unref(device);
 }