Forráskód Böngészése

qcacmn: Add logs in wmi_unified_cmd_send()

In wmi_unified_cmd_send() function, pass function name and
line number of caller and log the same in case of failure,
this approach helps to remove error logs in caller function
there by reducing text segment.

Change-Id: Ib70d55959087021c4495c175d5363375037afe00
CRs-Fixed: 2281983
Arif Hussain 7 éve
szülő
commit
6acb51f50c
1 módosított fájl, 15 hozzáadás és 8 törlés
  1. 15 8
      wmi_unified_api.h

+ 15 - 8
wmi_unified_api.h

@@ -223,17 +223,24 @@ wmi_buf_t wmi_buf_alloc_fl(wmi_unified_t wmi_handle, uint32_t len,
 void wmi_buf_free(wmi_buf_t net_buf);
 
 /**
- * generic function to send unified WMI command
+ * wmi_unified_cmd_send() -  generic function to send unified WMI command
+ * @wmi_handle: handle to WMI.
+ * @buf: wmi command buffer
+ * @buflen: wmi command buffer length
+ * @cmd_id: WMI cmd id
  *
- *  @param wmi_handle      : handle to WMI.
- *  @param buf             : wmi command buffer
- *  @param buflen          : wmi command buffer length
- *  @param cmd_id          : WMI cmd id
- *  @return 0  on success and -ve on failure.
+ * Note, it is NOT safe to access buf after calling this function!
+ *
+ * Return: QDF_STATUS
  */
+#define wmi_unified_cmd_send(wmi_handle, buf, buflen, cmd_id) \
+	wmi_unified_cmd_send_fl(wmi_handle, buf, buflen, \
+				cmd_id, __func__, __LINE__)
+
 QDF_STATUS
-wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, uint32_t buflen,
-			uint32_t cmd_id);
+wmi_unified_cmd_send_fl(wmi_unified_t wmi_handle, wmi_buf_t buf,
+			uint32_t buflen, uint32_t cmd_id,
+			const char *func, uint32_t line);
 
 /**
  * wmi_unified_register_event() - WMI event handler