Merge "Maintain list for active wifi interfaces" into tizen
[platform/core/connectivity/net-config.git] / src / wifi-power.c
index d5c16cc..1d3368b 100755 (executable)
@@ -206,7 +206,7 @@ static int _remove_driver_and_supplicant(const char *interface_name)
        wifi_state_set_technology_state(interface_name, NETCONFIG_WIFI_TECH_OFF);
 
        // reset service state
-       wifi_state_set_service_state(interface_name, NETCONFIG_WIFI_IDLE);
+       wifi_state_set_service_state(interface_name, NULL, NETCONFIG_WIFI_IDLE);
 
        if (wifi_firmware_recovery_mode == TRUE) {
                if (wifi_power_on(interface_name) < 0)
@@ -855,9 +855,7 @@ gboolean handle_remove_driver(Wifi *wifi, GDBusMethodInvocation *context,
 
        err = wifi_power_off(ifname);
        if (err < 0) {
-               if (err == -EINPROGRESS)
-                       netconfig_error_inprogress(context);
-               else if (err == -EALREADY)
+               if (err == -EALREADY)
                        netconfig_error_already_exists(context);
                else if (err == -EPERM)
                        netconfig_error_permission_denied(context);