1 /* SPDX-License-Identifier: GPL-2.0 */
2 #if !defined(__TRACE_ATH5K_H) || defined(TRACE_HEADER_MULTI_READ)
3 #define __TRACE_ATH5K_H
5 #include <linux/tracepoint.h>
8 #if !defined(CONFIG_ATH5K_TRACER) || defined(__CHECKER__)
10 #define TRACE_EVENT(name, proto, ...) \
11 static inline void trace_ ## name(proto) {}
16 struct ath5k_tx_status
;
19 #define TRACE_SYSTEM ath5k
22 TP_PROTO(struct ath5k_hw
*priv
, struct sk_buff
*skb
),
25 __field(struct ath5k_hw
*, priv
)
26 __field(unsigned long, skbaddr
)
27 __dynamic_array(u8
, frame
, skb
->len
)
31 __entry
->skbaddr
= (unsigned long) skb
;
32 memcpy(__get_dynamic_array(frame
), skb
->data
, skb
->len
);
35 "[%p] RX skb=%lx", __entry
->priv
, __entry
->skbaddr
40 TP_PROTO(struct ath5k_hw
*priv
, struct sk_buff
*skb
,
43 TP_ARGS(priv
, skb
, q
),
46 __field(struct ath5k_hw
*, priv
)
47 __field(unsigned long, skbaddr
)
49 __dynamic_array(u8
, frame
, skb
->len
)
54 __entry
->skbaddr
= (unsigned long) skb
;
55 __entry
->qnum
= (u8
) q
->qnum
;
56 memcpy(__get_dynamic_array(frame
), skb
->data
, skb
->len
);
60 "[%p] TX skb=%lx q=%d", __entry
->priv
, __entry
->skbaddr
,
65 TRACE_EVENT(ath5k_tx_complete
,
66 TP_PROTO(struct ath5k_hw
*priv
, struct sk_buff
*skb
,
67 struct ath5k_txq
*q
, struct ath5k_tx_status
*ts
),
69 TP_ARGS(priv
, skb
, q
, ts
),
72 __field(struct ath5k_hw
*, priv
)
73 __field(unsigned long, skbaddr
)
75 __field(u8
, ts_status
)
77 __field(u8
, ts_antenna
)
82 __entry
->skbaddr
= (unsigned long) skb
;
83 __entry
->qnum
= (u8
) q
->qnum
;
84 __entry
->ts_status
= ts
->ts_status
;
85 __entry
->ts_rssi
= ts
->ts_rssi
;
86 __entry
->ts_antenna
= ts
->ts_antenna
;
90 "[%p] TX end skb=%lx q=%d stat=%x rssi=%d ant=%x",
91 __entry
->priv
, __entry
->skbaddr
, __entry
->qnum
,
92 __entry
->ts_status
, __entry
->ts_rssi
, __entry
->ts_antenna
96 #endif /* __TRACE_ATH5K_H */
98 #if defined(CONFIG_ATH5K_TRACER) && !defined(__CHECKER__)
100 #undef TRACE_INCLUDE_PATH
101 #define TRACE_INCLUDE_PATH .
102 #undef TRACE_INCLUDE_FILE
103 #define TRACE_INCLUDE_FILE trace
105 #include <trace/define_trace.h>