summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajeev Kumar <rajekuma@qca.qualcomm.com>2014-05-09 17:05:23 -0700
committerPitani Venkata Rajesh Kumar <c_vpitan@qti.qualcomm.com>2014-05-14 12:47:25 +0530
commit31f3ff2d97a3c7ddb411edeeb3e891453da1b28f (patch)
treeaae3db3430ab4821673a57f1002c9f7743c0b2eb
parent7fa5aa4156fb6de6a712b121dec7434108182c89 (diff)
qcacld: Record 16 bytes of WMI event data
Record 16 bytes of WMI event data in WMI interface log buffers Change-Id: I413fd064e16ce1f862b563676dc42c37afc43524 CRs-Fixed: 655733
-rw-r--r--CORE/SERVICES/WMI/wmi_unified.c6
-rw-r--r--CORE/SERVICES/WMI/wmi_unified_priv.h1
2 files changed, 5 insertions, 2 deletions
diff --git a/CORE/SERVICES/WMI/wmi_unified.c b/CORE/SERVICES/WMI/wmi_unified.c
index 83546826e967..0f7a4dbcaf21 100644
--- a/CORE/SERVICES/WMI/wmi_unified.c
+++ b/CORE/SERVICES/WMI/wmi_unified.c
@@ -74,10 +74,11 @@ struct wmi_event_debug wmi_event_log_buffer[WMI_EVENT_DEBUG_MAX_ENTRY];
g_wmi_command_buf_idx++; \
}
-#define WMI_EVENT_RECORD(a) { \
+#define WMI_EVENT_RECORD(a, b) { \
if (WMI_EVENT_DEBUG_MAX_ENTRY <= g_wmi_event_buf_idx) \
g_wmi_event_buf_idx = 0; \
wmi_event_log_buffer[g_wmi_event_buf_idx].event = a; \
+ adf_os_mem_copy(wmi_event_log_buffer[g_wmi_event_buf_idx].data, b , 16);\
wmi_event_log_buffer[g_wmi_event_buf_idx].time = \
adf_os_ticks_to_msecs(adf_os_ticks()); \
g_wmi_event_buf_idx++; \
@@ -782,7 +783,8 @@ void __wmi_control_rx(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf)
#ifdef WMI_INTERFACE_EVENT_LOGGING
adf_os_spin_lock_bh(&wmi_handle->wmi_record_lock);
- WMI_EVENT_RECORD(id);
+ /* Exclude 4 bytes of TLV header */
+ WMI_EVENT_RECORD(id, ((u_int8_t *)data + 4));
adf_os_spin_unlock_bh(&wmi_handle->wmi_record_lock);
#endif
/* Call the WMI registered event handler */
diff --git a/CORE/SERVICES/WMI/wmi_unified_priv.h b/CORE/SERVICES/WMI/wmi_unified_priv.h
index 15962c9cef69..97bab04195c1 100644
--- a/CORE/SERVICES/WMI/wmi_unified_priv.h
+++ b/CORE/SERVICES/WMI/wmi_unified_priv.h
@@ -54,6 +54,7 @@ struct wmi_command_debug{
struct wmi_event_debug{
u_int32_t event;
+ u_int32_t data[4]; /*16 bytes of WMI event data excluding TLV header*/
u_int32_t time;
};