Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / drivers / net / wireless / broadcom / brcm80211 / brcmsmac / brcms_trace_brcmsmac.h
bloba0da3248b942fd92cadbe68c96547b8fa9f80a5c
1 /*
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>
22 #undef TRACE_SYSTEM
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
34 * prototype.
36 TP_ARGS(t),
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
40 * definition.
42 TP_STRUCT__entry(
43 __field(uint, ms)
44 __field(uint, set)
45 __field(uint, periodic)
47 TP_fast_assign(
48 __entry->ms = t->ms;
49 __entry->set = t->set;
50 __entry->periodic = t->periodic;
52 TP_printk(
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),
60 TP_ARGS(data),
61 TP_STRUCT__entry(
62 __field(unsigned long, data)
64 TP_fast_assign(
65 __entry->data = data;
67 TP_printk(
68 "data=%p",
69 (void *)__entry->data
73 TRACE_EVENT(brcms_macintstatus,
74 TP_PROTO(const struct device *dev, int in_isr, u32 macintstatus,
75 u32 mask),
76 TP_ARGS(dev, in_isr, macintstatus, mask),
77 TP_STRUCT__entry(
78 __string(dev, dev_name(dev))
79 __field(int, in_isr)
80 __field(u32, macintstatus)
81 __field(u32, mask)
83 TP_fast_assign(
84 __assign_str(dev, dev_name(dev));
85 __entry->in_isr = in_isr;
86 __entry->macintstatus = macintstatus;
87 __entry->mask = mask;
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 */