-static void hidden_free(struct hidden_params *hidden)
-{
- if (hidden == NULL)
- return;
-
- g_free(hidden->identity);
- g_free(hidden->passphrase);
- g_free(hidden);
-}
-
-static void scan_callback(int result, GSupplicantInterface *interface,
- void *user_data)
-{
- struct connman_device *device = user_data;
- struct wifi_data *wifi = connman_device_get_data(device);
-
- DBG("result %d", result);
-
- if (wifi != NULL && wifi->hidden != NULL) {
- hidden_free(wifi->hidden);
- wifi->hidden = NULL;
- }
-
- if (result < 0)
- connman_device_reset_scanning(device);
-
- connman_device_set_scanning(device, FALSE);
- connman_device_unref(device);
-
- start_autoscan(device);
-}
-