qcacmn: Fix compilation with WMI_INTERFACE_EVENT_LOGGING disabled

Compilation error occurs due to undefined struct when
WMI_INTERFACE_EVENT_LOGGING disabled.

Use void pointer as argument to wmi_mgmt_cmd_record() and cast as header
struct inside logging function to avoid casting as undeclared type.

Change-Id: I7d0922ee2009b235473febdbcbc3317e432a1386
CRs-Fixed: 1043597
diff --git a/wmi/inc/wmi_unified_api.h b/wmi/inc/wmi_unified_api.h
index 55951f4..8086231 100644
--- a/wmi/inc/wmi_unified_api.h
+++ b/wmi/inc/wmi_unified_api.h
@@ -112,9 +112,19 @@
 			 bool use_cookie, struct wmi_rx_ops *ops);
 
 
+/**
+ * wmi_mgmt_cmd_record() - Wrapper function for mgmt command logging macro
+ *
+ * @wmi_handle: wmi handle
+ * @cmd: mgmt command
+ * @header: pointer to 802.11 header
+ * @vdev_id: vdev id
+ * @chanfreq: channel frequency
+ *
+ * Return: none
+ */
 void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, WMI_CMD_ID cmd,
-			uint32_t type, uint32_t subtype,
-			uint32_t vdev_id, uint32_t chanfreq);
+			void *header, uint32_t vdev_id, uint32_t chanfreq);
 
 /**
  * detach for unified WMI
diff --git a/wmi/src/wmi_unified.c b/wmi/src/wmi_unified.c
index 26006ab..fa51a84 100644
--- a/wmi/src/wmi_unified.c
+++ b/wmi/src/wmi_unified.c
@@ -892,20 +892,21 @@
  *
  * @wmi_handle: wmi handle
  * @cmd: mgmt command
- * @type: 802.11 frame type
- * @subtype: 802.11 fram subtype
+ * @header: pointer to 802.11 header
  * @vdev_id: vdev id
  * @chanfreq: channel frequency
  *
  * Return: none
  */
 void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, WMI_CMD_ID cmd,
-				uint32_t type, uint32_t subtype,
-				uint32_t vdev_id, uint32_t chanfreq)
+			void *header, uint32_t vdev_id, uint32_t chanfreq)
 {
 	qdf_spin_lock_bh(&wmi_handle->log_info.wmi_record_lock);
 
-	WMI_MGMT_COMMAND_RECORD(cmd, type, subtype, vdev_id, chanfreq);
+	WMI_MGMT_COMMAND_RECORD(cmd,
+				((struct wmi_command_header *)header)->type,
+				((struct wmi_command_header *)header)->sub_type,
+				vdev_id, chanfreq);
 
 	qdf_spin_unlock_bh(&wmi_handle->log_info.wmi_record_lock);
 }
@@ -920,8 +921,7 @@
  */
 static void wmi_debugfs_remove(wmi_unified_t wmi_handle) { }
 void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, WMI_CMD_ID cmd,
-				uint32_t type, uint32_t subtype,
-				uint32_t vdev_id, uint32_t chanfreq) { }
+			void *header, uint32_t vdev_id, uint32_t chanfreq) { }
 #endif /*WMI_INTERFACE_EVENT_LOGGING */
 
 int wmi_get_host_credits(wmi_unified_t wmi_handle);
diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c
index 76287d8..c9f0b0d 100644
--- a/wmi/src/wmi_unified_tlv.c
+++ b/wmi/src/wmi_unified_tlv.c
@@ -1641,9 +1641,7 @@
 	cmd->buf_len = bufp_len;
 
 	wmi_mgmt_cmd_record(wmi_handle, WMI_MGMT_TX_SEND_CMDID,
-			((struct wmi_command_header *)bufp)->type,
-			((struct wmi_command_header *)bufp)->sub_type,
-			cmd->vdev_id, cmd->chanfreq);
+			bufp, cmd->vdev_id, cmd->chanfreq);
 
 	if (wmi_unified_cmd_send(wmi_handle, buf, cmd_len,
 				      WMI_MGMT_TX_SEND_CMDID)) {