소스 검색

qcacmn: Changes to converge WMI Recording feature

1.Logging of all WMI activities(commands, tx complete, events)
is adapted for WIN.
2. WIN and MCL continues to use existing approach of memory
allocation and it is managed using feature flag in common code.
3. Use debugfs for WMI event debugging.

example to read buffer through debugfs interface -
- Navigate to WMI directory under debugfs (/sys/kernel/debug/WMIx)
- It will display elements/files for all command/event buffers
- "cat wmi_command_log" (desired buffer name)
- Output will display something like this:
CMD ID = 16001
CMD = d 0 d8c6de24 e1cf
CMD ID = 16001
CMD = 8 0 0 0
CMD ID = 16001
CMD = d 0 d8c6de24 e1cf
CMD ID = 16001

Change-Id: I26895b480b9eaa400183c4667b9ac6980939cab9
Acked-by: Pratik Gandhi <[email protected]>
CRs-Fixed: 1019979
Govind Singh 9 년 전
부모
커밋
ecf03cdc6b
3개의 변경된 파일858개의 추가작업 그리고 88개의 파일을 삭제
  1. 823 88
      wmi_unified.c
  2. 21 0
      wmi_unified_non_tlv.c
  3. 14 0
      wmi_unified_tlv.c

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 823 - 88
wmi_unified.c


+ 21 - 0
wmi_unified_non_tlv.c

@@ -7146,6 +7146,19 @@ static QDF_STATUS extract_tx_data_traffic_ctrl_ev_non_tlv(
 	return QDF_STATUS_SUCCESS;
 }
 
+#ifdef WMI_INTERFACE_EVENT_LOGGING
+static bool is_management_record_non_tlv(uint32_t cmd_id)
+{
+	if ((cmd_id == WMI_BCN_TX_CMDID) ||
+		(cmd_id == WMI_PDEV_SEND_BCN_CMDID) ||
+		(cmd_id == WMI_MGMT_TX_CMDID)) {
+		return true;
+	}
+
+	return false;
+}
+#endif
+
 struct wmi_ops non_tlv_ops =  {
 	.send_vdev_create_cmd = send_vdev_create_cmd_non_tlv,
 	.send_vdev_delete_cmd = send_vdev_delete_cmd_non_tlv,
@@ -7918,6 +7931,14 @@ void wmi_non_tlv_attach(struct wmi_unified *wmi_handle)
 	populate_non_tlv_events_id(wmi_handle->wmi_events);
 	populate_pdev_param_non_tlv(wmi_handle->pdev_param);
 	populate_vdev_param_non_tlv(wmi_handle->vdev_param);
+
+#ifdef WMI_INTERFACE_EVENT_LOGGING
+	wmi_handle->log_info.buf_offset_command = 0;
+	wmi_handle->log_info.buf_offset_event = 0;
+	wmi_handle->log_info.is_management_record =
+		is_management_record_non_tlv;
+	/*(uint8 *)(*wmi_id_to_name)(uint32_t cmd_id);*/
+#endif
 #else
 	qdf_print("%s: Not supported\n", __func__);
 #endif

+ 14 - 0
wmi_unified_tlv.c

@@ -10377,6 +10377,14 @@ error:
 	return status;
 }
 
+static bool is_management_record_tlv(uint32_t cmd_id)
+{
+	if ((cmd_id == WMI_MGMT_TX_SEND_CMDID) ||
+			(cmd_id == WMI_MGMT_TX_COMPLETION_EVENTID))
+		return true;
+	return false;
+}
+
 struct wmi_ops tlv_ops =  {
 	.send_vdev_create_cmd = send_vdev_create_cmd_tlv,
 	.send_vdev_delete_cmd = send_vdev_delete_cmd_tlv,
@@ -10590,4 +10598,10 @@ struct wmi_ops tlv_ops =  {
 void wmi_tlv_attach(wmi_unified_t wmi_handle)
 {
 	wmi_handle->ops = &tlv_ops;
+#ifdef WMI_INTERFACE_EVENT_LOGGING
+	wmi_handle->log_info.buf_offset_command = 2;
+	wmi_handle->log_info.buf_offset_event = 4;
+	wmi_handle->log_info.is_management_record =
+		is_management_record_tlv;
+#endif
 }

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.