As interface_added can potentially show up before the interface creation
callback, the device powered flag can be set from the latter.
unsigned int *ssid_len);
GSupplicantWpsState g_supplicant_interface_get_wps_state(GSupplicantInterface *interface);
unsigned int g_supplicant_interface_get_mode(GSupplicantInterface *interface);
+dbus_bool_t g_supplicant_interface_get_ready(GSupplicantInterface *interface);
unsigned int g_supplicant_interface_get_max_scan_ssids(
GSupplicantInterface *interface);
set_network_enabled, NULL, &enable);
}
+dbus_bool_t g_supplicant_interface_get_ready(GSupplicantInterface *interface)
+{
+ if (interface == NULL)
+ return FALSE;
+
+ return interface->ready;
+}
+
GSupplicantInterface *g_supplicant_network_get_interface(
GSupplicantNetwork *network)
{
wifi->interface = interface;
g_supplicant_interface_set_data(interface, wifi);
+
+ if (g_supplicant_interface_get_ready(interface) == FALSE)
+ return;
+
+ DBG("interface is ready wifi %p tethering %d", wifi, wifi->tethering);
+
+ if (wifi->device == NULL) {
+ connman_error("WiFi device not set");
+ return;
+ }
+
+ connman_device_set_powered(wifi->device, TRUE);
}
static void interface_remove_callback(int result,