1 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
3 * Copyright (c) 2019 The Linux Foundation. All rights reserved.
6 #if !defined(_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
8 #include <linux/tracepoint.h>
13 /* create empty functions when tracing is disabled */
14 #if !defined(CONFIG_ATH11K_TRACING)
16 #define TRACE_EVENT(name, proto, ...) \
17 static inline void trace_ ## name(proto) {}
18 #endif /* !CONFIG_ATH11K_TRACING || __CHECKER__ */
21 #define TRACE_SYSTEM ath11k
23 TRACE_EVENT(ath11k_htt_pktlog
,
24 TP_PROTO(struct ath11k
*ar
, const void *buf
, u16 buf_len
,
27 TP_ARGS(ar
, buf
, buf_len
, pktlog_checksum
),
30 __string(device
, dev_name(ar
->ab
->dev
))
31 __string(driver
, dev_driver_string(ar
->ab
->dev
))
33 __field(u32
, pktlog_checksum
)
34 __dynamic_array(u8
, pktlog
, buf_len
)
38 __assign_str(device
, dev_name(ar
->ab
->dev
));
39 __assign_str(driver
, dev_driver_string(ar
->ab
->dev
));
40 __entry
->buf_len
= buf_len
;
41 __entry
->pktlog_checksum
= pktlog_checksum
;
42 memcpy(__get_dynamic_array(pktlog
), buf
, buf_len
);
46 "%s %s size %hu pktlog_checksum %d",
50 __entry
->pktlog_checksum
54 TRACE_EVENT(ath11k_htt_ppdu_stats
,
55 TP_PROTO(struct ath11k
*ar
, const void *data
, size_t len
),
57 TP_ARGS(ar
, data
, len
),
60 __string(device
, dev_name(ar
->ab
->dev
))
61 __string(driver
, dev_driver_string(ar
->ab
->dev
))
63 __dynamic_array(u8
, ppdu
, len
)
67 __assign_str(device
, dev_name(ar
->ab
->dev
));
68 __assign_str(driver
, dev_driver_string(ar
->ab
->dev
));
70 memcpy(__get_dynamic_array(ppdu
), data
, len
);
81 TRACE_EVENT(ath11k_htt_rxdesc
,
82 TP_PROTO(struct ath11k
*ar
, const void *data
, size_t len
),
84 TP_ARGS(ar
, data
, len
),
87 __string(device
, dev_name(ar
->ab
->dev
))
88 __string(driver
, dev_driver_string(ar
->ab
->dev
))
90 __dynamic_array(u8
, rxdesc
, len
)
94 __assign_str(device
, dev_name(ar
->ab
->dev
));
95 __assign_str(driver
, dev_driver_string(ar
->ab
->dev
));
97 memcpy(__get_dynamic_array(rxdesc
), data
, len
);
101 "%s %s rxdesc len %d",
108 #endif /* _TRACE_H_ || TRACE_HEADER_MULTI_READ*/
110 /* we don't want to use include/trace/events */
111 #undef TRACE_INCLUDE_PATH
112 #define TRACE_INCLUDE_PATH .
113 #undef TRACE_INCLUDE_FILE
114 #define TRACE_INCLUDE_FILE trace
116 /* This part must be outside protection */
117 #include <trace/define_trace.h>