Browse Source

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
Alok Kumar 6 years ago
parent
commit
62bf738e15
2 changed files with 9 additions and 2 deletions
  1. 1 1
      core/cds/inc/cds_sched.h
  2. 8 1
      core/hdd/src/wlan_hdd_power.c

+ 1 - 1
core/cds/inc/cds_sched.h

@@ -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 */

+ 8 - 1
core/hdd/src/wlan_hdd_power.c

@@ -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: