Browse Source

qcacld-3.0: Add new bit in wow flag

In order to apply modulated DTIM only on system suspend display off use
case, in RTPM wow mode, for display on and display off, FW will stick to
DTIM 1.

Change-Id: Id282c11c39d38e8a5d55574783d280b092dbb485
CRs-Fixed: 2784872
Alan Chen 4 years ago
parent
commit
91177c2f86
1 changed files with 16 additions and 2 deletions
  1. 16 2
      components/pmo/core/src/wlan_pmo_suspend_resume.c

+ 16 - 2
components/pmo/core/src/wlan_pmo_suspend_resume.c

@@ -727,16 +727,19 @@ out:
  * @psoc: objmgr psoc handle
  * @psoc_ctx: pmo psoc private ctx
  * @wow_params: collection of wow enable override parameters
+ * @type: type of wow suspend
  *
  * Return: QDF status
  */
 static QDF_STATUS
 pmo_core_enable_wow_in_fw(struct wlan_objmgr_psoc *psoc,
 			  struct pmo_psoc_priv_obj *psoc_ctx,
-			  struct pmo_wow_enable_params *wow_params)
+			  struct pmo_wow_enable_params *wow_params,
+			  enum qdf_suspend_type type)
 {
 	int host_credits, wmi_pending_cmds;
 	struct pmo_wow_cmd_params param = {0};
+	struct pmo_psoc_cfg *psoc_cfg = &psoc_ctx->psoc_cfg;
 	QDF_STATUS status;
 
 	pmo_enter();
@@ -807,6 +810,15 @@ pmo_core_enable_wow_in_fw(struct wlan_objmgr_psoc *psoc,
 		pmo_info("Prevent link down, non-drv wow is enabled");
 	}
 
+	if (type == QDF_SYSTEM_SUSPEND) {
+		pmo_info("system suspend wow");
+		if ((psoc_cfg) &&
+		    (psoc_cfg->is_mod_dtim_on_sys_suspend_enabled))
+			param.flags |= WMI_WOW_FLAG_SYSTEM_SUSPEND_WOW;
+	} else {
+		pmo_info("RTPM wow");
+	}
+
 	status = pmo_tgt_psoc_send_wow_enable_req(psoc, &param);
 	if (status != QDF_STATUS_SUCCESS) {
 		pmo_err("Failed to enable wow in fw");
@@ -926,7 +938,9 @@ QDF_STATUS pmo_core_psoc_bus_suspend_req(struct wlan_objmgr_psoc *psoc,
 
 	begin = qdf_get_log_timestamp_usecs();
 	if (wow_mode_selected)
-		status = pmo_core_enable_wow_in_fw(psoc, psoc_ctx, wow_params);
+		status = pmo_core_enable_wow_in_fw(psoc, psoc_ctx,
+						   wow_params,
+						   type);
 	else
 		status = pmo_core_psoc_suspend_target(psoc, 0);
 	end = qdf_get_log_timestamp_usecs();