1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #if !defined(_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
18 #define _TRACE_H
19
20 #include <linux/tracepoint.h>
21 #include "ath.h"
22
23 #undef TRACE_SYSTEM
24 #define TRACE_SYSTEM ath
25
26 #if !defined(CONFIG_ATH_TRACEPOINTS)
27
28 #undef TRACE_EVENT
29 #define TRACE_EVENT(name, proto, ...) static inline void trace_ ## name(proto) {}
30
31 #endif
32
33 TRACE_EVENT(ath_log,
34
35 TP_PROTO(struct wiphy *wiphy,
36 struct va_format *vaf),
37
38 TP_ARGS(wiphy, vaf),
39
40 TP_STRUCT__entry(
41 __string(device, wiphy_name(wiphy))
42 __string(driver, KBUILD_MODNAME)
43 __dynamic_array(char, msg, ATH_DBG_MAX_LEN)
44 ),
45
46 TP_fast_assign(
47 __assign_str(device, wiphy_name(wiphy));
48 __assign_str(driver, KBUILD_MODNAME);
49 WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
50 ATH_DBG_MAX_LEN,
51 vaf->fmt,
52 *vaf->va) >= ATH_DBG_MAX_LEN);
53 ),
54
55 TP_printk(
56 "%s %s %s",
57 __get_str(driver),
58 __get_str(device),
59 __get_str(msg)
60 )
61 );
62
63 #endif
64
65 #undef TRACE_INCLUDE_PATH
66 #define TRACE_INCLUDE_PATH .
67 #undef TRACE_INCLUDE_FILE
68 #define TRACE_INCLUDE_FILE trace
69
70
71 #include <trace/define_trace.h>