Fix issue with missing scanning after power up
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 14 Sep 2009 00:30:59 +0000 (17:30 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 14 Sep 2009 00:30:59 +0000 (17:30 -0700)
plugins/supplicant.c
plugins/wifi.c

index 405aac6..c3fc07c 100644 (file)
@@ -898,6 +898,9 @@ static int initiate_scan(struct supplicant_task *task)
 
        DBG("task %p", task);
 
+       if (task->path == NULL)
+               return -EINVAL;
+
        if (task->scan_call != NULL)
                return -EALREADY;
 
index 4dfaf27..85b4e86 100644 (file)
@@ -97,6 +97,8 @@ static void wifi_newlink(unsigned flags, unsigned change, void *user_data)
        if ((wifi->flags & IFF_UP) != (flags & IFF_UP)) {
                if (flags & IFF_UP) {
                        DBG("power on");
+
+                       supplicant_scan(device);
                } else {
                        DBG("power off");
                }