qcacld-3.0: Do not send DTIM related commands for runtime resume

Since system is awake when runtime PM suspend/resume happens, there is
no need to send DTIM related WMI commands with WOW sequence during runtime
PM resume as unlike system suspend, these commands are able to be sent from
other paths. It will just trigger runtime PM resume which is expected
behavior.

Change-Id: I51d0f45c0223a0c0e3c61bbcb7135a590359b08d
CRs-Fixed: 2475111
diff --git a/components/pmo/core/src/wlan_pmo_suspend_resume.c b/components/pmo/core/src/wlan_pmo_suspend_resume.c
index 9ee8720..4e0492a 100644
--- a/components/pmo/core/src/wlan_pmo_suspend_resume.c
+++ b/components/pmo/core/src/wlan_pmo_suspend_resume.c
@@ -622,12 +622,14 @@
 /**
  * pmo_core_psoc_configure_resume(): configure events after bus resume
  * @psoc: objmgr psoc
+ * @is_runtime_pm: indicate if it is used by runtime PM
  *
  * Responsibility of the caller to take the psoc reference.
  *
  * Return: QDF_STATUS_SUCCESS for success or error code
  */
-static QDF_STATUS pmo_core_psoc_configure_resume(struct wlan_objmgr_psoc *psoc)
+static QDF_STATUS pmo_core_psoc_configure_resume(struct wlan_objmgr_psoc *psoc,
+						 bool is_runtime_pm)
 {
 	struct pmo_psoc_priv_obj *psoc_ctx;
 
@@ -635,7 +637,13 @@
 
 	psoc_ctx = pmo_psoc_get_priv(psoc);
 
-	pmo_core_set_resume_dtim(psoc);
+	/*
+	 * For runtime PM, since system is awake, DTIM related commands
+	 * do not have to be sent with WOW sequence. They can be sent
+	 * through other paths which will just trigger a runtime resume.
+	 */
+	if (!is_runtime_pm)
+		pmo_core_set_resume_dtim(psoc);
 	pmo_core_update_wow_bus_suspend(psoc, psoc_ctx, false);
 	pmo_unpause_all_vdev(psoc, psoc_ctx);
 
@@ -664,7 +672,7 @@
 		goto dec_psoc_ref;
 	}
 
-	status = pmo_core_psoc_configure_resume(psoc);
+	status = pmo_core_psoc_configure_resume(psoc, false);
 	if (status != QDF_STATUS_SUCCESS)
 		pmo_err("Failed to configure resume");
 
@@ -977,7 +985,7 @@
 
 pmo_resume_configure:
 	QDF_BUG(QDF_STATUS_SUCCESS ==
-		pmo_core_psoc_configure_resume(psoc));
+		pmo_core_psoc_configure_resume(psoc, true));
 
 resume_htc:
 	QDF_BUG(QDF_STATUS_SUCCESS ==
@@ -1053,7 +1061,7 @@
 	if (status != QDF_STATUS_SUCCESS)
 		goto fail;
 
-	status = pmo_core_psoc_configure_resume(psoc);
+	status = pmo_core_psoc_configure_resume(psoc, true);
 	if (status != QDF_STATUS_SUCCESS)
 		goto fail;