mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
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
This commit is contained in:
parent
6b727a4ca7
commit
07bd875c18
3 changed files with 15 additions and 2 deletions
|
|
@ -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)
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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!");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue