qcacld-3.0: Address the error path during WLAN suspend

In __wlan_hdd_cfg80211_suspend_wlan(), suspend process is bailed out
if hdd_suspend_wlan() < 0 due to which RX thread waits for completion
of ol_resume_rx_event.

Do completion of ol_resume_rx_event in __wlan_hdd_cfg80211_suspend_wlan
for error path to resume RX thread.

Change-Id: I8bf056f82d80e063b2e32a1a6573d7a36ced67dc
CRs-Fixed: 2327238
This commit is contained in:
Alok Kumar 2018-10-08 16:53:39 +05:30 • committed by nshrivas
commit 62bf738e15
2 changed files with 9 additions and 2 deletions

View file

@ -106,7 +106,7 @@ typedef struct _cds_sched_context {
/* Completion object to suspend OL rx thread */
struct completion ol_suspend_rx_event;
/* Completion objext to resume OL rx thread */
/* Completion object to resume OL rx thread */
struct completion ol_resume_rx_event;
/* Completion object for OL Rxthread shutdown */

View file

@ -1789,8 +1789,10 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
if (hdd_ctx->enable_dp_rx_threads)
dp_txrx_suspend(cds_get_context(QDF_MODULE_ID_SOC));
if (hdd_suspend_wlan() < 0)
if (hdd_suspend_wlan() < 0) {
hdd_err("Failed to suspend WLAN");
goto resume_all;
}
MTRACE(qdf_trace(QDF_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_SUSPEND_WLAN,
@ -1803,6 +1805,11 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
return 0;
resume_all:
/* Resume tlshim Rx thread */
if (hdd_ctx->is_ol_rx_thread_suspended) {
cds_resume_rx_thread();
hdd_ctx->is_ol_rx_thread_suspended = false;
}
scheduler_resume();
hdd_ctx->is_scheduler_suspended = false;
resume_tx: