Remove unused function _set_power_save() 91/159291/1
authorSaurav Babu <saurav.babu@samsung.com>
Wed, 8 Nov 2017 05:20:48 +0000 (10:50 +0530)
committerSaurav Babu <saurav.babu@samsung.com>
Wed, 8 Nov 2017 05:20:48 +0000 (10:50 +0530)
Change-Id: I7188acb918364de32e02f823228e55e1809acfac
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
src/wifi-state.c

index 5d89458..1df0c37 100755 (executable)
@@ -349,45 +349,6 @@ static void _deregister_network_notification(void)
        vconf_ignore_key_changed(VCONFKEY_WIFI_ENABLE_QS, __notification_value_changed_cb);
 }
 
-static void _set_power_save(gboolean power_save)
-{
-       gboolean result;
-       char *if_path;
-       GVariant *input_args = NULL;
-       static gboolean old_state = TRUE;
-       const gchar *args_disable = "POWERMODE 1";
-       const gchar *args_enable = "POWERMODE 0";
-       if (old_state == power_save)
-               return;
-
-       if_path = netconfig_wifi_get_supplicant_interface();
-       if (if_path == NULL) {
-               ERR("Fail to get wpa_supplicant DBus path");
-               return;
-       }
-
-       if (power_save)
-               input_args = g_variant_new("(s)", args_enable);
-       else
-               input_args = g_variant_new("(s)", args_disable);
-
-       result = netconfig_supplicant_invoke_dbus_method_nonblock(
-                       SUPPLICANT_SERVICE,
-                       if_path,
-                       SUPPLICANT_INTERFACE ".Interface",
-                       "Driver",
-                       input_args,
-                       NULL);
-       if (result == FALSE)
-               ERR("Fail to set power save mode POWERMODE %d", power_save);
-       else
-               old_state = power_save;
-
-       g_free(if_path);
-
-       return;
-}
-
 static void _set_power_lock(gboolean power_lock)
 {
        gint32 ret = 0;
@@ -582,11 +543,9 @@ void wifi_state_set_service_state(wifi_service_state_e new_state)
        /* During DHCP, temporarily disable Wi-Fi power saving */
        if ((old_state < NETCONFIG_WIFI_ASSOCIATION || old_state == NETCONFIG_WIFI_FAILURE) && new_state == NETCONFIG_WIFI_CONFIGURATION) {
                _set_power_lock(TRUE);
-               _set_power_save(FALSE);
                dhcp_stage = TRUE;
        } else if (dhcp_stage == TRUE) {
                _set_power_lock(FALSE);
-               _set_power_save(TRUE);
                dhcp_stage = FALSE;
        }