From bd059394ef512c34db908c4521147ce7bf5169e3 Mon Sep 17 00:00:00 2001 From: Saurav Babu Date: Wed, 8 Nov 2017 10:50:48 +0530 Subject: [PATCH] Remove unused function _set_power_save() Change-Id: I7188acb918364de32e02f823228e55e1809acfac Signed-off-by: Saurav Babu --- src/wifi-state.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/src/wifi-state.c b/src/wifi-state.c index 5d89458..1df0c37 100755 --- a/src/wifi-state.c +++ b/src/wifi-state.c @@ -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; } -- 2.7.4