ath10k: implement diag data container event
Some firmware revisions may report this event as part of their diagnostics. This avoids `unknown event` warnings and adds tracing for the event. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:

committed by
Kalle Valo

parent
6d48161678
commit
04de6c6ce6
@@ -453,6 +453,47 @@ TRACE_EVENT(ath10k_htt_rx_desc,
|
||||
)
|
||||
);
|
||||
|
||||
TRACE_EVENT(ath10k_wmi_diag_container,
|
||||
TP_PROTO(struct ath10k *ar,
|
||||
u8 type,
|
||||
u32 timestamp,
|
||||
u32 code,
|
||||
u16 len,
|
||||
const void *data),
|
||||
|
||||
TP_ARGS(ar, type, timestamp, code, len, data),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__string(device, dev_name(ar->dev))
|
||||
__string(driver, dev_driver_string(ar->dev))
|
||||
__field(u8, type)
|
||||
__field(u32, timestamp)
|
||||
__field(u32, code)
|
||||
__field(u16, len)
|
||||
__dynamic_array(u8, data, len)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__assign_str(device, dev_name(ar->dev));
|
||||
__assign_str(driver, dev_driver_string(ar->dev));
|
||||
__entry->type = type;
|
||||
__entry->timestamp = timestamp;
|
||||
__entry->code = code;
|
||||
__entry->len = len;
|
||||
memcpy(__get_dynamic_array(data), data, len);
|
||||
),
|
||||
|
||||
TP_printk(
|
||||
"%s %s diag container type %hhu timestamp %u code %u len %d",
|
||||
__get_str(driver),
|
||||
__get_str(device),
|
||||
__entry->type,
|
||||
__entry->timestamp,
|
||||
__entry->code,
|
||||
__entry->len
|
||||
)
|
||||
);
|
||||
|
||||
#endif /* _TRACE_H_ || TRACE_HEADER_MULTI_READ*/
|
||||
|
||||
/* we don't want to use include/trace/events */
|
||||
|
Reference in New Issue
Block a user