enum netconfig_wifi_tech_state ret = NETCONFIG_WIFI_TECH_OFF;
gboolean wifi_tech_powered = FALSE;
gboolean wifi_tech_connected = FALSE;
+ gboolean wifi_tethering = FALSE;
message = netconfig_invoke_dbus_method(CONNMAN_SERVICE,
CONNMAN_MANAGER_PATH, CONNMAN_MANAGER_INTERFACE,
} else if (strcmp(key, "Connected") == 0 && data) {
wifi_tech_connected = TRUE;
} else if (strcmp(key, "Tethering") == 0 && data) {
- /* For further use */
+ wifi_tethering = TRUE;
}
} else if (dbus_message_iter_get_arg_type(&value1) ==
DBUS_TYPE_STRING) {
if (wifi_tech_connected)
ret = NETCONFIG_WIFI_TECH_CONNECTED;
+ if (wifi_tethering)
+ ret = NETCONFIG_WIFI_TECH_TETHERING_ON;
+
return ret;
}
netconfig_wifi_device_picker_service_stop();
- netconfig_wifi_remove_driver();
+ if (netconfig_is_wifi_tethering_on() != TRUE)
+ netconfig_wifi_remove_driver();
vconf_set_int(VCONFKEY_NETWORK_WIFI_STATE, VCONFKEY_NETWORK_WIFI_OFF);
vconf_set_int(VCONF_WIFI_LAST_POWER_STATE, WIFI_POWER_OFF);