brcmfmac: add hexadecimal trace of message payload
authorArend van Spriel <arend@broadcom.com>
Fri, 5 Apr 2013 08:57:44 +0000 (10:57 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 8 Apr 2013 19:28:43 +0000 (15:28 -0400)
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: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
drivers/net/wireless/brcm80211/brcmfmac/fweh.c
drivers/net/wireless/brcm80211/brcmfmac/fwil.c
drivers/net/wireless/brcm80211/brcmfmac/tracepoint.h
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c

index d259ae5d22370f0b25ef09764aff784389e79404..009c87bfd9ae45e292af73082e6eccba3e1e3b1e 100644 (file)
@@ -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)
index 5d5c02cea3e0620155883a963fe18a36d18c8c1b..c1cab4034958dcb108d2ef78f251416898be2578 100644 (file)
@@ -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 */
index dad94147b6b5ddb8c7863cc32f3ab68b3573aa2d..01d39a9481187c3857dc5533c8baa514cb877301 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "dhd.h"
 #include "dhd_dbg.h"
+#include "tracepoint.h"
 #include "fwsignal.h"
 #include "fweh.h"
 #include "fwil.h"
index 8d1def935b8d0de1232572382602afe6816a5366..04f395930d86742372585ff42b3ce3837f0d606d 100644 (file)
@@ -25,6 +25,7 @@
 #include "dhd.h"
 #include "dhd_bus.h"
 #include "dhd_dbg.h"
+#include "tracepoint.h"
 #include "fwil.h"
 
 
index 35efc7a676448b51d631c88debdcecc30fe81372..9df1f7a681e07e9ee32b15672e7ba9de3a795fef 100644 (file)
@@ -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
index c7459ae8254a43a7aedb243418a29496694b3d9e..beba7f69577b9708614837bf00fa972a7795e347 100644 (file)
@@ -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"