Remove supplicant and device scanning state cleaning
authorSamuel Ortiz <sameo@linux.intel.com>
Fri, 16 Apr 2010 09:52:09 +0000 (11:52 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 16 Apr 2010 09:52:09 +0000 (11:52 +0200)
With wpa_supplicant 0.7, there is no need to handle potential issues with scan
results not being sent. Also, the state change is sent before the actual scan
results, so marking all networks available at that point is misleading.

include/device.h
plugins/supplicant.c
src/device.c

index bdaf2b0..b4bb297 100644 (file)
@@ -79,7 +79,6 @@ int connman_device_set_powered(struct connman_device *device,
                                                connman_bool_t powered);
 int connman_device_set_scanning(struct connman_device *device,
                                                connman_bool_t scanning);
-void connman_device_cleanup_scanning(struct connman_device *device);
 
 int connman_device_set_disconnected(struct connman_device *device,
                                                connman_bool_t disconnected);
index bdb21cd..62aac11 100644 (file)
@@ -1876,11 +1876,6 @@ static void state_change(struct supplicant_task *task, DBusMessage *msg)
        if (state == WPA_INVALID)
                return;
 
-       if (task->scanning == TRUE && state != WPA_SCANNING) {
-               connman_device_cleanup_scanning(task->device);
-               task->scanning = FALSE;
-       }
-
        prevstate = task->state;
        task->state = state;
 
index 75561c9..619fe5e 100644 (file)
@@ -1184,24 +1184,6 @@ static void scanning_changed(struct connman_device *device)
                                        DBUS_TYPE_BOOLEAN, &device->scanning);
 }
 
-static void mark_network_available(gpointer key, gpointer value,
-                                               gpointer user_data)
-{
-       struct connman_network *network = value;
-
-       connman_network_set_available(network, TRUE);
-}
-
-void connman_device_cleanup_scanning(struct connman_device *device)
-{
-       device->scanning = FALSE;
-
-       scanning_changed(device);
-
-       g_hash_table_foreach(device->networks,
-                               mark_network_available, NULL);
-}
-
 /**
  * connman_device_set_scanning:
  * @device: device structure