Browse Source

qcacmn: Runtime PM packets tagging after wow suspend

qcacld-2.0 to qcacmn propagation.

Don't Tag Non-WoW packets as Runtime PM packets after
wow suspend. Some WMI Commands can be send in Runtime
PM context and MC thread context. Packets coming via
MC Thread Context can be tagged as Runtime PM packets
when runtime pm in progress.

Packets should be tagged in the same caller context to
avoid any race condition. Being stability issue, addressing
this issue by not tagging any non-wow commands as runtime pm
after wow suspend. This will ensure all the non-wow packets
coming after wow_suspend flag is set as non runtime pm packets
and will trigger a runtime resume.

Git-commit: 4a396d80c5cc2ded75098c61426521b9b2762c17
Git-commit: 2ee4bf4791cc5db30ec03eceaf591367deffe39a

CRs-Fixed: 1106496
Change-Id: I4e55733ad8403581aca0b49ce9442fc5591335c0
Sarada Prasanna Garnayak 8 years ago
parent
commit
d49444cf6f
2 changed files with 18 additions and 2 deletions
  1. 14 1
      wmi_unified_api.h
  2. 4 1
      wmi_unified_priv.h

+ 14 - 1
wmi_unified_api.h

@@ -246,6 +246,20 @@ int wmi_get_pending_cmds(wmi_unified_t wmi_handle);
  */
 void wmi_set_target_suspend(wmi_unified_t wmi_handle, bool val);
 
+/**
+ * WMI API to set bus suspend state
+ * @param wmi_handle:	handle to WMI.
+ * @param val:		suspend state boolean
+ */
+void wmi_set_is_wow_bus_suspended(wmi_unified_t wmi_handle, A_BOOL val);
+
+/**
+ * WMI API to set crash injection state
+ * @param wmi_handle:	handle to WMI.
+ * @param val:		crash injection state boolean
+ */
+void wmi_tag_crash_inject(wmi_unified_t wmi_handle, A_BOOL flag);
+
 /**
  * generic function to block unified WMI command
  * @param wmi_handle      : handle to WMI.
@@ -286,7 +300,6 @@ static inline bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle)
 }
 #endif
 
-
 /**
  * UMAC Callback to process fw event.
  * @param wmi_handle      : handle to WMI.

+ 4 - 1
wmi_unified_priv.h

@@ -1210,6 +1210,8 @@ QDF_STATUS (*extract_reg_cap_service_ready_ext)(
 			wmi_unified_t wmi_handle,
 			uint8_t *evt_buf, uint8_t phy_idx,
 			struct WMI_HOST_HAL_REG_CAPABILITIES_EXT *param);
+uint16_t (*wmi_set_htc_tx_tag)(wmi_unified_t wmi_handle,
+				wmi_buf_t buf, uint32_t cmd_id);
 };
 
 struct target_abi_version {
@@ -1274,7 +1276,8 @@ struct wmi_unified {
 #ifdef FEATURE_RUNTIME_PM
 	qdf_atomic_t runtime_pm_inprogress;
 #endif
-
+	qdf_atomic_t is_wow_bus_suspended;
+	bool tag_crash_inject;
 	enum wmi_target_type target_type;
 	struct wmi_rx_ops rx_ops;
 	struct wmi_ops *ops;