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
This commit is contained in:
Govind Singh
2016-05-12 12:45:51 +05:30
committed by Vishwajith Upendra
parent e8caed0f6f
commit ecf03cdc6b
3 changed files with 896 additions and 108 deletions

View File

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