Commit 40c1c249 authored by Arend van Spriel's avatar Arend van Spriel Committed by John W. Linville

brcmfmac: add hexadecimal trace of message payload

Adds a trace function used in brcmf_dbg_hex_dump() which adds the
raw binary data to the trace. It requires trace-cmd plugin to see
this data.
Reviewed-by: default avatarPiotr Haber <phaber@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 86dcd937
......@@ -93,6 +93,7 @@ do { \
#define brcmf_dbg_hex_dump(test, data, len, fmt, ...) \
do { \
trace_brcmf_hexdump((void *)data, len); \
if (test) \
brcmu_dbg_hex_dump(data, len, fmt, ##__VA_ARGS__); \
} while (0)
......
......@@ -94,6 +94,7 @@ struct rte_console {
#include "dhd_bus.h"
#include "dhd_dbg.h"
#include "tracepoint.h"
#define TXQLEN 2048 /* bulk tx queue length */
#define TXHI (TXQLEN - 256) /* turn on flow control above TXHI */
......
......@@ -20,6 +20,7 @@
#include "dhd.h"
#include "dhd_dbg.h"
#include "tracepoint.h"
#include "fwsignal.h"
#include "fweh.h"
#include "fwil.h"
......
......@@ -25,6 +25,7 @@
#include "dhd.h"
#include "dhd_bus.h"
#include "dhd_dbg.h"
#include "tracepoint.h"
#include "fwil.h"
......
......@@ -73,6 +73,20 @@ TRACE_EVENT(brcmf_dbg,
TP_printk("%s: %s", __get_str(func), __get_str(msg))
);
TRACE_EVENT(brcmf_hexdump,
TP_PROTO(void *data, size_t len),
TP_ARGS(data, len),
TP_STRUCT__entry(
__field(unsigned long, len)
__dynamic_array(u8, hdata, len)
),
TP_fast_assign(
__entry->len = len;
memcpy(__get_dynamic_array(hdata), data, len);
),
TP_printk("hexdump [length=%lu]", __entry->len)
);
#ifdef CONFIG_BRCM_TRACING
#undef TRACE_INCLUDE_PATH
......
......@@ -26,6 +26,7 @@
#include <brcmu_wifi.h>
#include "dhd.h"
#include "dhd_dbg.h"
#include "tracepoint.h"
#include "fwil_types.h"
#include "p2p.h"
#include "wl_cfg80211.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment