diff options
| author | Mukul Sharma <mukul@codeaurora.org> | 2017-08-21 17:46:46 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappara@codeaurora.org> | 2017-09-07 23:08:34 -0700 |
| commit | 2c8c316aaf3ec3bd03f9b31fcd4d45dba06460ba (patch) | |
| tree | 4fe404c5a8227adea2d0c421123f5d16b25bb732 | |
| parent | 3e1a4161ee9711aaf382e615c0d6c0b7cda17400 (diff) | |
qcacld-3.0: Acquire wakelock until change iface timer expires
Currently, when wifi is disabled from UI, and if the device goes
to suspend before the interface change timer expires, then until
the next APPS wakeup wifi remains enabled hence power numbers are
high.
As a part of fix, Host acquire wakelock when it start change
interface timer.
Change-Id: I41662596725315a6cfe185ee23ae889b69938e0b
CRs-Fixed: 2091154
| -rw-r--r-- | core/hdd/inc/wlan_hdd_cfg.h | 2 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 9 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_p2p.c | 3 | ||||
| -rw-r--r-- | core/utils/host_diag_log/inc/host_diag_core_event.h | 2 |
4 files changed, 15 insertions, 1 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 1ee07a46970c..ffcc027716bd 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -2128,7 +2128,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 (15000) +#define CFG_INTERFACE_CHANGE_WAIT_DEFAULT (10000) /* * <ini> diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 6af63301f500..2bbe05b7a079 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2375,6 +2375,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(); @@ -9474,6 +9477,9 @@ int hdd_wlan_stop_modules(hdd_context_t *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; cds_set_module_stop_in_progress(false); return 0; @@ -9910,6 +9916,9 @@ int hdd_wlan_startup(struct device *dev) 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 22e1e0f9e43b..da84742cd7c0 100644 --- a/core/hdd/src/wlan_hdd_p2p.c +++ b/core/hdd/src/wlan_hdd_p2p.c @@ -2790,6 +2790,9 @@ stop_modules: hdd_debug("Closing all modules from the add_virt_iface"); qdf_mc_timer_start(&pHddCtx->iface_change_timer, pHddCtx->config->iface_change_wait_time); + hdd_prevent_suspend_timeout( + pHddCtx->config->iface_change_wait_time, + WIFI_POWER_EVENT_WAKELOCK_IFACE_CHANGE_TIMER); } else hdd_debug("Other interfaces are still up dont close modules!"); diff --git a/core/utils/host_diag_log/inc/host_diag_core_event.h b/core/utils/host_diag_log/inc/host_diag_core_event.h index 08ed1cb829ee..de93dd573b1f 100644 --- a/core/utils/host_diag_log/inc/host_diag_core_event.h +++ b/core/utils/host_diag_log/inc/host_diag_core_event.h @@ -623,6 +623,7 @@ enum wifi_connectivity_events { * @WIFI_POWER_EVENT_WAKELOCK_DHCP: DHCP negotiation under way * @WIFI_POWER_EVENT_WAKELOCK_MGMT_TX: MGMT Tx wake lock * @WIFI_POWER_EVENT_WAKELOCK_CONNECT: connection in progress + * @WIFI_POWER_EVENT_WAKELOCK_IFACE_CHANGE_TIMER: iface change timer running * * Indicates the reason for which the wakelock was taken/released */ @@ -648,6 +649,7 @@ enum wake_lock_reason { WIFI_POWER_EVENT_WAKELOCK_DHCP, WIFI_POWER_EVENT_WAKELOCK_MGMT_TX, WIFI_POWER_EVENT_WAKELOCK_CONNECT, + WIFI_POWER_EVENT_WAKELOCK_IFACE_CHANGE_TIMER, }; #ifdef __cplusplus |
