2 * Copyright (c) 2011 Broadcom Corporation
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 #if !defined(__TRACE_BRCMSMAC_H) || defined(TRACE_HEADER_MULTI_READ)
18 #define __TRACE_BRCMSMAC_H
20 #include <linux/tracepoint.h>
23 #define TRACE_SYSTEM brcmsmac
26 * We define a tracepoint, its arguments, its printk format and its
27 * 'fast binary record' layout.
29 TRACE_EVENT(brcms_timer
,
30 /* TPPROTO is the prototype of the function called by this tracepoint */
31 TP_PROTO(struct brcms_timer
*t
),
33 * TPARGS(firstarg, p) are the parameters names, same as found in the
38 * Fast binary tracing: define the trace record via TP_STRUCT__entry().
39 * You can think about it like a regular C structure local variable
45 __field(uint
, periodic
)
49 __entry
->set
= t
->set
;
50 __entry
->periodic
= t
->periodic
;
53 "ms=%u set=%u periodic=%u",
54 __entry
->ms
, __entry
->set
, __entry
->periodic
58 TRACE_EVENT(brcms_dpc
,
59 TP_PROTO(unsigned long data
),
62 __field(unsigned long, data
)
73 TRACE_EVENT(brcms_macintstatus
,
74 TP_PROTO(const struct device
*dev
, int in_isr
, u32 macintstatus
,
76 TP_ARGS(dev
, in_isr
, macintstatus
, mask
),
78 __string(dev
, dev_name(dev
))
80 __field(u32
, macintstatus
)
84 __assign_str(dev
, dev_name(dev
));
85 __entry
->in_isr
= in_isr
;
86 __entry
->macintstatus
= macintstatus
;
89 TP_printk("[%s] in_isr=%d macintstatus=%#x mask=%#x", __get_str(dev
),
90 __entry
->in_isr
, __entry
->macintstatus
, __entry
->mask
)
92 #endif /* __TRACE_BRCMSMAC_H */
94 #ifdef CONFIG_BRCM_TRACING
96 #undef TRACE_INCLUDE_PATH
97 #define TRACE_INCLUDE_PATH .
98 #undef TRACE_INCLUDE_FILE
99 #define TRACE_INCLUDE_FILE brcms_trace_brcmsmac
100 #include <trace/define_trace.h>
102 #endif /* CONFIG_BRCM_TRACING */