mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
qcacld-3.0: Start the psoc idle timer in cfg80211 resume
During system suspend, the psoc idle timer is stopped. So it may happen that work was not scheduled and it got removed from the workqueue. This will result into the module state as enabled after system resume which will lead to extra power consumption. So, to avoid this issue, start the psoc idle timer in the system reume if all interfaces are down and module state is ENABLED. CRs-Fixed: 2867472 Change-Id: I2151e825919b45727a279a2285293e578ce86ffa
This commit is contained in:
parent
7ba97fee58
commit
8edf3678c3
1 changed files with 13 additions and 0 deletions
|
|
@ -1968,6 +1968,19 @@ static int _wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
|
|||
|
||||
errno = __wlan_hdd_cfg80211_resume_wlan(wiphy);
|
||||
|
||||
/* It may happen during cfg80211 suspend this timer is stopped.
|
||||
* This means that if
|
||||
* 1) work was queued in the workqueue, it was removed from the
|
||||
* workqueue and suspend proceeded.
|
||||
* 2) The work was scheduled and cfg80211 suspend waited for this
|
||||
* work to complete and then suspend proceeded.
|
||||
* So here in cfg80211 resume, check if no interface is up and
|
||||
* the module state is enabled then trigger idle timer start.
|
||||
*/
|
||||
if (!hdd_is_any_interface_open(hdd_ctx) &&
|
||||
hdd_ctx->driver_status == DRIVER_MODULES_ENABLED)
|
||||
hdd_psoc_idle_timer_start(hdd_ctx);
|
||||
|
||||
return errno;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue