Browse Source

qcacld-3.0: Prevent suspend if DP drain fails

Check for DP drain status and prevent suspend if
we fail to drain txrx succefully.

Change-Id: I76c5587719cb162e3e7802586d5ddde24f18e755
CRs-Fixed: 3718937
Karthik Kantamneni 1 year ago
parent
commit
9370f7c3a2
1 changed files with 11 additions and 1 deletions
  1. 11 1
      components/pmo/core/src/wlan_pmo_suspend_resume.c

+ 11 - 1
components/pmo/core/src/wlan_pmo_suspend_resume.c

@@ -1045,7 +1045,17 @@ QDF_STATUS pmo_core_txrx_suspend(struct wlan_objmgr_psoc *psoc)
 		goto out;
 	}
 
-	cdp_drain_txrx(dp_soc, 0);
+	status = cdp_drain_txrx(dp_soc, 0);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		pmo_err("Prevent suspend unable to drain txrx");
+		ret = hif_enable_grp_irqs(hif_ctx);
+		if (ret && ret != -EOPNOTSUPP) {
+			pmo_err("Failed to enable grp irqs: %d", ret);
+			QDF_BUG(0);
+		}
+		goto out;
+	}
+
 	pmo_ctx->wow.txrx_suspended = true;
 out:
 	pmo_psoc_put_ref(psoc);