1 #if !defined(__TRACE_ATH5K_H) || defined(TRACE_HEADER_MULTI_READ)
2 #define __TRACE_ATH5K_H
4 #include <linux/tracepoint.h>
7 #if !defined(CONFIG_ATH5K_TRACER) || defined(__CHECKER__)
9 #define TRACE_EVENT(name, proto, ...) \
10 static inline void trace_ ## name(proto) {}
15 struct ath5k_tx_status
;
18 #define TRACE_SYSTEM ath5k
21 TP_PROTO(struct ath5k_hw
*priv
, struct sk_buff
*skb
),
24 __field(struct ath5k_hw
*, priv
)
25 __field(unsigned long, skbaddr
)
26 __dynamic_array(u8
, frame
, skb
->len
)
30 __entry
->skbaddr
= (unsigned long) skb
;
31 memcpy(__get_dynamic_array(frame
), skb
->data
, skb
->len
);
34 "[%p] RX skb=%lx", __entry
->priv
, __entry
->skbaddr
39 TP_PROTO(struct ath5k_hw
*priv
, struct sk_buff
*skb
,
42 TP_ARGS(priv
, skb
, q
),
45 __field(struct ath5k_hw
*, priv
)
46 __field(unsigned long, skbaddr
)
48 __dynamic_array(u8
, frame
, skb
->len
)
53 __entry
->skbaddr
= (unsigned long) skb
;
54 __entry
->qnum
= (u8
) q
->qnum
;
55 memcpy(__get_dynamic_array(frame
), skb
->data
, skb
->len
);
59 "[%p] TX skb=%lx q=%d", __entry
->priv
, __entry
->skbaddr
,
64 TRACE_EVENT(ath5k_tx_complete
,
65 TP_PROTO(struct ath5k_hw
*priv
, struct sk_buff
*skb
,
66 struct ath5k_txq
*q
, struct ath5k_tx_status
*ts
),
68 TP_ARGS(priv
, skb
, q
, ts
),
71 __field(struct ath5k_hw
*, priv
)
72 __field(unsigned long, skbaddr
)
74 __field(u8
, ts_status
)
76 __field(u8
, ts_antenna
)
81 __entry
->skbaddr
= (unsigned long) skb
;
82 __entry
->qnum
= (u8
) q
->qnum
;
83 __entry
->ts_status
= ts
->ts_status
;
84 __entry
->ts_rssi
= ts
->ts_rssi
;
85 __entry
->ts_antenna
= ts
->ts_antenna
;
89 "[%p] TX end skb=%lx q=%d stat=%x rssi=%d ant=%x",
90 __entry
->priv
, __entry
->skbaddr
, __entry
->qnum
,
91 __entry
->ts_status
, __entry
->ts_rssi
, __entry
->ts_antenna
95 #endif /* __TRACE_ATH5K_H */
97 #if defined(CONFIG_ATH5K_TRACER) && !defined(__CHECKER__)
99 #undef TRACE_INCLUDE_PATH
100 #define TRACE_INCLUDE_PATH .
101 #undef TRACE_INCLUDE_FILE
102 #define TRACE_INCLUDE_FILE trace
104 #include <trace/define_trace.h>