From b5a86faf5f18f7235fdceaa73e6730a56527a9ec Mon Sep 17 00:00:00 2001 From: taesub kim Date: Wed, 28 Dec 2016 11:27:15 +0900 Subject: [PATCH] Removed unused netconfig_wifi_on/off function Change-Id: I17d5db001686824bd27e51e3435ee667883e37f2 Signed-off-by: Taesub Kim --- src/utils/util.c | 4 ++-- src/wifi-power.c | 56 -------------------------------------------------------- 2 files changed, 2 insertions(+), 58 deletions(-) diff --git a/src/utils/util.c b/src/utils/util.c index b18cae2..3124924 100755 --- a/src/utils/util.c +++ b/src/utils/util.c @@ -362,7 +362,7 @@ gboolean netconfig_interface_up(const char *ifname) close(fd); - DBG("Successfully activated wireless interface"); + DBG("Successfully activated wireless interface %s", ifname); return TRUE; } @@ -391,7 +391,7 @@ gboolean netconfig_interface_down(const char *ifname) close(fd); - DBG("Successfully de-activated wireless interface"); + DBG("Successfully de-activated wireless interface %s", ifname); return TRUE; } diff --git a/src/wifi-power.c b/src/wifi-power.c index 2ef365e..fe43bf5 100755 --- a/src/wifi-power.c +++ b/src/wifi-power.c @@ -365,62 +365,6 @@ void netconfig_wifi_disable_technology_state_by_only_connman_signal(void) connman_wifi_technology_state = FALSE; } -int netconfig_wifi_on(void) -{ - int err = 0; - wifi_tech_state_e wifi_tech_state; - - wifi_tech_state = wifi_state_get_technology_state(); - if (wifi_tech_state >= NETCONFIG_WIFI_TECH_POWERED) - return -EALREADY; - - if (__is_wifi_restricted() == TRUE) - return -EPERM; - - if (netconfig_is_wifi_tethering_on() == TRUE) { - /* TODO: Wi-Fi tethering turns off here */ - /* return TRUE; */ - ERR("Failed to turn tethering off"); - return -EBUSY; - } - -#if defined TIZEN_P2P_ENABLE && !defined WLAN_CONCURRENT_MODE - if (netconfig_is_wifi_direct_on() == TRUE) { - if (__netconfig_wifi_direct_power_off() == TRUE) - return -EINPROGRESS; - else { - ERR("Failed to turn Wi-Fi direct off"); - return -EBUSY; - } - } -#endif - - err = wifi_power_driver_and_supplicant(TRUE); - if (err < 0 && err != -EALREADY) - return err; - - err = _set_connman_technology_power(TRUE); - - __netconfig_set_wifi_bssid(); - - return err; -} - -int netconfig_wifi_off(void) -{ - int err; - -#if defined TIZEN_P2P_ENABLE && defined WLAN_CONCURRENT_MODE - __netconfig_p2p_supplicant(FALSE); -#endif - - err = _set_connman_technology_power(FALSE); - if (err == -EALREADY) - wifi_state_update_power_state(FALSE); - - return 0; -} - #if defined TIZEN_WEARABLE int netconfig_wifi_on_wearable(gboolean device_picker_test) { -- 2.7.4