DBG("Wi-Fi service state, old state[%s] ==> new state[%s]",
_convert_wifi_service_state_to_string(old_state), _convert_wifi_service_state_to_string(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) {
+ /* From association, temporarily disable Wi-Fi power saving */
+ if ((old_state < NETCONFIG_WIFI_ASSOCIATION || old_state == NETCONFIG_WIFI_FAILURE) && new_state == NETCONFIG_WIFI_ASSOCIATION) {
_set_power_lock(TRUE);
+ wifi_set_early_suspend(FALSE);
dhcp_stage = TRUE;
- } else if (dhcp_stage == TRUE) {
+ } else if (dhcp_stage == TRUE && new_state != NETCONFIG_WIFI_CONFIGURATION) {
_set_power_lock(FALSE);
+ wifi_set_early_suspend(TRUE);
dhcp_stage = FALSE;
}
*/
gboolean handle_get_wifi_state(Wifi *wifi, GDBusMethodInvocation *context)
{
- g_return_val_if_fail(wifi != NULL, FALSE);
+ g_return_val_if_fail(wifi != NULL, TRUE);
GVariant *param = NULL;
wifi_tech_state_e tech_state = NETCONFIG_WIFI_TECH_UNKNOWN;
wifi_service_state_e service_state = NETCONFIG_WIFI_UNKNOWN;