brcmsmac: Add tracepoint for macintstatus
authorSeth Forshee <seth.forshee@canonical.com>
Thu, 15 Nov 2012 14:08:10 +0000 (08:08 -0600)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 20 Nov 2012 19:07:52 +0000 (14:07 -0500)
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmsmac/brcms_trace_events.h
drivers/net/wireless/brcm80211/brcmsmac/main.c

index 96a962abc89a7929375ed854582d9dbd10275ce0..2ef7580af6799046968da8bd009575ab25f6ff47 100644 (file)
@@ -85,6 +85,26 @@ TRACE_EVENT(brcms_dpc,
        )
 );
 
+TRACE_EVENT(brcms_macintstatus,
+       TP_PROTO(const struct device *dev, int in_isr, u32 macintstatus,
+                u32 mask),
+       TP_ARGS(dev, in_isr, macintstatus, mask),
+       TP_STRUCT__entry(
+               __string(dev, dev_name(dev))
+               __field(int, in_isr)
+               __field(u32, macintstatus)
+               __field(u32, mask)
+       ),
+       TP_fast_assign(
+               __assign_str(dev, dev_name(dev));
+               __entry->in_isr = in_isr;
+               __entry->macintstatus = macintstatus;
+               __entry->mask = mask;
+       ),
+       TP_printk("[%s] in_isr=%d macintstatus=%#x mask=%#x", __get_str(dev),
+                 __entry->in_isr, __entry->macintstatus, __entry->mask)
+);
+
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM brcmsmac_tx
 
index 9480debef75511342e43543ade134c8ed0172dbc..241bc25512358a9e1643bdb399739b03de7b181f 100644 (file)
@@ -2552,13 +2552,13 @@ static inline u32 wlc_intstatus(struct brcms_c_info *wlc, bool in_isr)
 {
        struct brcms_hardware *wlc_hw = wlc->hw;
        struct bcma_device *core = wlc_hw->d11core;
-       u32 macintstatus;
+       u32 macintstatus, mask;
 
        /* macintstatus includes a DMA interrupt summary bit */
        macintstatus = bcma_read32(core, D11REGOFFS(macintstatus));
+       mask = in_isr ? wlc->macintmask : wlc->defmacintmask;
 
-       brcms_dbg_int(core, "wl%d: macintstatus: 0x%x\n", wlc_hw->unit,
-                     macintstatus);
+       trace_brcms_macintstatus(&core->dev, in_isr, macintstatus, mask);
 
        /* detect cardbus removed, in power down(suspend) and in reset */
        if (brcms_deviceremoved(wlc))
@@ -2571,7 +2571,7 @@ static inline u32 wlc_intstatus(struct brcms_c_info *wlc, bool in_isr)
                return 0;
 
        /* defer unsolicited interrupts */
-       macintstatus &= (in_isr ? wlc->macintmask : wlc->defmacintmask);
+       macintstatus &= mask;
 
        /* if not for us */
        if (macintstatus == 0)