浏览代码

qcacmn: Add WMI_UNIT_TEST_EVENTID extraction code

Add corresponding host side extraction for WMI_UNIT_TEST_EVENTID

CRs-Fixed: 2073983
Change-Id: Id8455f58d1ba1accdee7095b211abf9a25c7538c
Adil Saeed Musthafa 7 年之前
父节点
当前提交
0b6c7605c7
共有 3 个文件被更改,包括 37 次插入0 次删除
  1. 3 0
      wmi_unified_api.h
  2. 31 0
      wmi_unified_param.h
  3. 3 0
      wmi_unified_priv.h

+ 3 - 0
wmi_unified_api.h

@@ -1448,6 +1448,9 @@ QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf,
 					 uint32_t index,
 					 wmi_host_pdev_stats *pdev_stats);
 
+QDF_STATUS wmi_extract_unit_test(void *wmi_hdl, void *evt_buf,
+			wmi_unit_test_event *unit_test, uint32_t maxspace);
+
 QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf,
 			uint32_t index,
 			wmi_host_pdev_ext_stats *pdev_ext_stats);

+ 31 - 0
wmi_unified_param.h

@@ -3576,12 +3576,16 @@ struct ssid_hotlist_request_params {
  * @vdev_id: vdev id
  * @module_id: module id
  * @num_args: number of arguments
+ * @diag_token: dialog token, which identifies the transaction.
+ *              this number is generated by wifitool and may be used to
+ *              identify the transaction in the event path
  * @args: arguments
  */
 struct wmi_unit_test_cmd {
 	uint32_t vdev_id;
 	uint32_t module_id;
 	uint32_t num_args;
+	uint32_t diag_token;
 	uint32_t args[WMI_MAX_NUM_ARGS];
 };
 
@@ -5136,6 +5140,32 @@ typedef struct {
 	uint32_t	mib_int_count;
 } wmi_host_pdev_stats;
 
+
+/**
+ * struct wmi_unit_test_event - Structure corresponding to WMI Unit test event
+ * @vdev_id: VDEV ID
+ * @module_id: MODULE ID
+ * @diag_token: Diag Token (the number that was generated in the unit-test cmd)
+ * @flag: flag has 2 bits 0x1 indicates status, and 0x2 indicates done-bit
+ * @payload_len: payload_len (blindly copied from payload_len field in WMI)
+ * @buffer_len: actual number of data bytes in the variable data size TLV
+ *              buffer_len is likely to be the nearest multiple of 4 (from
+ *              payload_len). both buffer_len and payload_len need to be
+ *              passed to wifitool so that the driver can be agnostic
+ *              regarding these differences.
+ * @buffer: data buffer
+ */
+typedef struct {
+	uint32_t vdev_id;
+	uint32_t module_id;
+	uint32_t diag_token;
+	uint32_t flag;
+	uint32_t payload_len;
+	uint32_t buffer_len;
+	uint8_t buffer[1];
+} wmi_unit_test_event;
+
+
 /**
  * struct wmi_host_snr_info - WMI host Signal to noise ration info
  * @bcn_snr: beacon SNR
@@ -5407,6 +5437,7 @@ typedef enum {
 	wmi_update_whal_mib_stats_event_id,
 	wmi_update_vdev_rate_stats_event_id,
 	wmi_diag_event_id,
+	wmi_unit_test_event_id,
 	wmi_ocb_set_sched_event_id,
 	wmi_dbg_mesg_flush_complete_event_id,
 	wmi_rssi_breach_event_id,

+ 3 - 0
wmi_unified_priv.h

@@ -1223,6 +1223,9 @@ QDF_STATUS (*extract_all_stats_count)(wmi_unified_t wmi_handle, void *evt_buf,
 QDF_STATUS (*extract_pdev_stats)(wmi_unified_t wmi_handle, void *evt_buf,
 			 uint32_t index, wmi_host_pdev_stats *pdev_stats);
 
+QDF_STATUS (*extract_unit_test)(wmi_unified_t wmi_handle, void *evt_buf,
+		wmi_unit_test_event *unit_test, uint32_t maxspace);
+
 QDF_STATUS (*extract_pdev_ext_stats)(wmi_unified_t wmi_handle, void *evt_buf,
 		 uint32_t index, wmi_host_pdev_ext_stats *pdev_ext_stats);