1 #if !defined(__TRACE_ATH5K_H) || defined(TRACE_HEADER_MULTI_READ) 2 #define __TRACE_ATH5K_H 3 4 #include <linux/tracepoint.h> 5 6 7 #if !defined(CONFIG_ATH5K_TRACER) || defined(__CHECKER__) 8 #undef TRACE_EVENT 9 #define TRACE_EVENT(name, proto, ...) \ 10 static inline void trace_ ## name(proto) {} 11 #endif 12 13 struct sk_buff; 14 struct ath5k_txq; 15 struct ath5k_tx_status; 16 17 #undef TRACE_SYSTEM 18 #define TRACE_SYSTEM ath5k 19 20 TRACE_EVENT(ath5k_rx, 21 TP_PROTO(struct ath5k_hw *priv, struct sk_buff *skb), 22 TP_ARGS(priv, skb), 23 TP_STRUCT__entry( 24 __field(struct ath5k_hw *, priv) 25 __field(unsigned long, skbaddr) 26 __dynamic_array(u8, frame, skb->len) 27 ), 28 TP_fast_assign( 29 __entry->priv = priv; 30 __entry->skbaddr = (unsigned long) skb; 31 memcpy(__get_dynamic_array(frame), skb->data, skb->len); 32 ), 33 TP_printk( 34 "[%p] RX skb=%lx", __entry->priv, __entry->skbaddr 35 ) 36 ); 37 38 TRACE_EVENT(ath5k_tx, 39 TP_PROTO(struct ath5k_hw *priv, struct sk_buff *skb, 40 struct ath5k_txq *q), 41 42 TP_ARGS(priv, skb, q), 43 44 TP_STRUCT__entry( 45 __field(struct ath5k_hw *, priv) 46 __field(unsigned long, skbaddr) 47 __field(u8, qnum) 48 __dynamic_array(u8, frame, skb->len) 49 ), 50 51 TP_fast_assign( 52 __entry->priv = priv; 53 __entry->skbaddr = (unsigned long) skb; 54 __entry->qnum = (u8) q->qnum; 55 memcpy(__get_dynamic_array(frame), skb->data, skb->len); 56 ), 57 58 TP_printk( 59 "[%p] TX skb=%lx q=%d", __entry->priv, __entry->skbaddr, 60 __entry->qnum 61 ) 62 ); 63 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), 67 68 TP_ARGS(priv, skb, q, ts), 69 70 TP_STRUCT__entry( 71 __field(struct ath5k_hw *, priv) 72 __field(unsigned long, skbaddr) 73 __field(u8, qnum) 74 __field(u8, ts_status) 75 __field(s8, ts_rssi) 76 __field(u8, ts_antenna) 77 ), 78 79 TP_fast_assign( 80 __entry->priv = priv; 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; 86 ), 87 88 TP_printk( 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 92 ) 93 ); 94 95 #endif /* __TRACE_ATH5K_H */ 96 97 #if defined(CONFIG_ATH5K_TRACER) && !defined(__CHECKER__) 98 99 #undef TRACE_INCLUDE_PATH 100 #define TRACE_INCLUDE_PATH . 101 #undef TRACE_INCLUDE_FILE 102 #define TRACE_INCLUDE_FILE trace 103 104 #include <trace/define_trace.h> 105 106 #endif 107