mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
qcacld-3.0: Prevent race between suspend and idle shutdown
Idle shutdown is running in Thread 1 and in parallel suspend request comes which is getting executed in thread 2. As a part of idle shutdown the CE buffers are freed.As a result of this WoW Ack is not reaped which leads to panic. To avoid this issue, flush the idle shutdown delayed work before proceeding for suspend. CRs-Fixed: 2839296 Change-Id: I449bb1960776bf3d60e329a189b7bad998929240
This commit is contained in:
parent
43304f663c
commit
9d7aa9bb8c
2 changed files with 10 additions and 7 deletions
|
|
@ -1128,10 +1128,13 @@ static int __wlan_hdd_bus_suspend(struct wow_enable_params wow_params)
|
|||
hdd_info("starting bus suspend");
|
||||
|
||||
hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
||||
if (!hdd_ctx) {
|
||||
hdd_err_rl("hdd context is NULL");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
err = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* Wait for the stop module if already in progress */
|
||||
hdd_psoc_idle_timer_stop(hdd_ctx);
|
||||
|
||||
/* If Wifi is off, return success for system suspend */
|
||||
if (hdd_ctx->driver_status != DRIVER_MODULES_ENABLED) {
|
||||
|
|
@ -1139,9 +1142,6 @@ static int __wlan_hdd_bus_suspend(struct wow_enable_params wow_params)
|
|||
return 0;
|
||||
}
|
||||
|
||||
err = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
|
||||
if (!hif_ctx) {
|
||||
|
|
|
|||
|
|
@ -2023,6 +2023,9 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
|
|||
if (0 != rc)
|
||||
return rc;
|
||||
|
||||
/* Wait for the stop module if already in progress */
|
||||
hdd_psoc_idle_timer_stop(hdd_ctx);
|
||||
|
||||
if (hdd_ctx->config->is_wow_disabled) {
|
||||
hdd_info_rl("wow is disabled");
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue