diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index fd04a684b41d..96dbcb34eb7f 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -2110,7 +2110,7 @@ enum hdd_dot11_mode { #define CFG_INTERFACE_CHANGE_WAIT_NAME "gInterfaceChangeWait" #define CFG_INTERFACE_CHANGE_WAIT_MIN (10) #define CFG_INTERFACE_CHANGE_WAIT_MAX (500000) -#define CFG_INTERFACE_CHANGE_WAIT_DEFAULT (5000) +#define CFG_INTERFACE_CHANGE_WAIT_DEFAULT (10000) /* * diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index df6c3ffd4986..daff287dda01 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2651,6 +2651,9 @@ static int __hdd_stop(struct net_device *dev) hdd_debug("Closing all modules from the hdd_stop"); qdf_mc_timer_start(&hdd_ctx->iface_change_timer, hdd_ctx->config->iface_change_wait_time); + hdd_prevent_suspend_timeout( + hdd_ctx->config->iface_change_wait_time, + WIFI_POWER_EVENT_WAKELOCK_IFACE_CHANGE_TIMER); } EXIT(); @@ -9543,6 +9546,9 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode) mutex_unlock(&hdd_ctx->iface_change_lock); qdf_mc_timer_start(&hdd_ctx->iface_change_timer, hdd_ctx->config->iface_change_wait_time); + hdd_prevent_suspend_timeout( + hdd_ctx->config->iface_change_wait_time, + WIFI_POWER_EVENT_WAKELOCK_IFACE_CHANGE_TIMER); hdd_ctx->stop_modules_in_progress = false; return 0; } @@ -9913,9 +9919,13 @@ int hdd_wlan_startup(struct device *dev) if (hdd_ctx->config->fIsImpsEnabled) hdd_set_idle_ps_config(hdd_ctx, true); - if (QDF_GLOBAL_FTM_MODE != hdd_get_conparam()) + if (QDF_GLOBAL_FTM_MODE != hdd_get_conparam()) { qdf_mc_timer_start(&hdd_ctx->iface_change_timer, hdd_ctx->config->iface_change_wait_time); + hdd_prevent_suspend_timeout( + hdd_ctx->config->iface_change_wait_time, + WIFI_POWER_EVENT_WAKELOCK_IFACE_CHANGE_TIMER); + } hdd_start_complete(0); goto success; diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c index 7c02960e1361..37beed15a21f 100644 --- a/core/hdd/src/wlan_hdd_p2p.c +++ b/core/hdd/src/wlan_hdd_p2p.c @@ -2380,6 +2380,9 @@ stop_modules: hdd_debug("Closing all modules from the add_virt_iface"); qdf_mc_timer_start(&hdd_ctx->iface_change_timer, hdd_ctx->config->iface_change_wait_time); + hdd_prevent_suspend_timeout( + hdd_ctx->config->iface_change_wait_time, + WIFI_POWER_EVENT_WAKELOCK_IFACE_CHANGE_TIMER); } else hdd_debug("Other interfaces are still up dont close modules!");