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 <prgandhi@qti.qualcomm.com>
CRs-Fixed: 1019979
此提交包含在:
Govind Singh
2016-05-12 12:45:51 +05:30
提交者 Vishwajith Upendra
父節點 e8caed0f6f
當前提交 ecf03cdc6b
共有 3 個檔案被更改,包括 896 行新增108 行删除

查看文件

@@ -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