]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath6kl: add tracing point for hif irqs
authorKalle Valo <kvalo@qca.qualcomm.com>
Mon, 18 Mar 2013 11:42:21 +0000 (13:42 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Mon, 18 Mar 2013 11:42:21 +0000 (13:42 +0200)
Add a tracing point for hif irq and dump the register content to user space.
This is in hif.c as we could use the same code also with SPI but, as ath6kl
doesn't SPI and most likely never will be, this is used just by SDIO so
name the trace point as ath6kl_sdio_irq to make it easier to manage filters.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/hif.c
drivers/net/wireless/ath/ath6kl/trace.h

index a6b614421fa409814e1662a78df1507da904b970..fea7709b5dda59aa26fa0fbc5eb70caccea77918 100644 (file)
@@ -22,6 +22,7 @@
 #include "target.h"
 #include "hif-ops.h"
 #include "debug.h"
+#include "trace.h"
 
 #define MAILBOX_FOR_BLOCK_SIZE          1
 
@@ -436,6 +437,8 @@ static int proc_pending_irqs(struct ath6kl_device *dev, bool *done)
 
                ath6kl_dump_registers(dev, &dev->irq_proc_reg,
                                      &dev->irq_en_reg);
+               trace_ath6kl_sdio_irq(&dev->irq_en_reg,
+                                     sizeof(dev->irq_en_reg));
 
                /* Update only those registers that are enabled */
                host_int_status = dev->irq_proc_reg.host_int_status &
index 9db616c2ac96596f522df6c7b583f2a4ec5f3329..541729b3d4c3b32e423c91ca9c759305236c52f6 100644 (file)
@@ -165,6 +165,26 @@ TRACE_EVENT(ath6kl_sdio_scat,
        )
 );
 
+TRACE_EVENT(ath6kl_sdio_irq,
+       TP_PROTO(void *buf, size_t buf_len),
+
+       TP_ARGS(buf, buf_len),
+
+       TP_STRUCT__entry(
+               __field(size_t, buf_len)
+               __dynamic_array(u8, buf, buf_len)
+       ),
+
+       TP_fast_assign(
+               __entry->buf_len = buf_len;
+               memcpy(__get_dynamic_array(buf), buf, buf_len);
+       ),
+
+       TP_printk(
+               "irq len %d\n", __entry->buf_len
+       )
+);
+
 #endif /* _ ATH6KL_TRACE_H || TRACE_HEADER_MULTI_READ*/
 
 /* we don't want to use include/trace/events */