Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / net / wireless / ath / ath5k / trace.h
bloba41e3bf42dfc877894376ba7034d650654708f3a
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__)
9 #undef TRACE_EVENT
10 #define TRACE_EVENT(name, proto, ...) \
11 static inline void trace_ ## name(proto) {}
12 #endif
14 struct sk_buff;
15 struct ath5k_txq;
16 struct ath5k_tx_status;
18 #undef TRACE_SYSTEM
19 #define TRACE_SYSTEM ath5k
21 TRACE_EVENT(ath5k_rx,
22 TP_PROTO(struct ath5k_hw *priv, struct sk_buff *skb),
23 TP_ARGS(priv, skb),
24 TP_STRUCT__entry(
25 __field(struct ath5k_hw *, priv)
26 __field(unsigned long, skbaddr)
27 __dynamic_array(u8, frame, skb->len)
29 TP_fast_assign(
30 __entry->priv = priv;
31 __entry->skbaddr = (unsigned long) skb;
32 memcpy(__get_dynamic_array(frame), skb->data, skb->len);
34 TP_printk(
35 "[%p] RX skb=%lx", __entry->priv, __entry->skbaddr
39 TRACE_EVENT(ath5k_tx,
40 TP_PROTO(struct ath5k_hw *priv, struct sk_buff *skb,
41 struct ath5k_txq *q),
43 TP_ARGS(priv, skb, q),
45 TP_STRUCT__entry(
46 __field(struct ath5k_hw *, priv)
47 __field(unsigned long, skbaddr)
48 __field(u8, qnum)
49 __dynamic_array(u8, frame, skb->len)
52 TP_fast_assign(
53 __entry->priv = priv;
54 __entry->skbaddr = (unsigned long) skb;
55 __entry->qnum = (u8) q->qnum;
56 memcpy(__get_dynamic_array(frame), skb->data, skb->len);
59 TP_printk(
60 "[%p] TX skb=%lx q=%d", __entry->priv, __entry->skbaddr,
61 __entry->qnum
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),
71 TP_STRUCT__entry(
72 __field(struct ath5k_hw *, priv)
73 __field(unsigned long, skbaddr)
74 __field(u8, qnum)
75 __field(u8, ts_status)
76 __field(s8, ts_rssi)
77 __field(u8, ts_antenna)
80 TP_fast_assign(
81 __entry->priv = priv;
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;
89 TP_printk(
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>
107 #endif