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
),
26 TP_ARGS(ar
, buf
, buf_len
),
29 __string(device
, dev_name(ar
->ab
->dev
))
30 __string(driver
, dev_driver_string(ar
->ab
->dev
))
32 __dynamic_array(u8
, pktlog
, buf_len
)
36 __assign_str(device
, dev_name(ar
->ab
->dev
));
37 __assign_str(driver
, dev_driver_string(ar
->ab
->dev
));
38 __entry
->buf_len
= buf_len
;
39 memcpy(__get_dynamic_array(pktlog
), buf
, buf_len
);
50 TRACE_EVENT(ath11k_htt_ppdu_stats
,
51 TP_PROTO(struct ath11k
*ar
, const void *data
, size_t len
),
53 TP_ARGS(ar
, data
, len
),
56 __string(device
, dev_name(ar
->ab
->dev
))
57 __string(driver
, dev_driver_string(ar
->ab
->dev
))
59 __dynamic_array(u8
, ppdu
, len
)
63 __assign_str(device
, dev_name(ar
->ab
->dev
));
64 __assign_str(driver
, dev_driver_string(ar
->ab
->dev
));
66 memcpy(__get_dynamic_array(ppdu
), data
, len
);
77 TRACE_EVENT(ath11k_htt_rxdesc
,
78 TP_PROTO(struct ath11k
*ar
, const void *data
, size_t len
),
80 TP_ARGS(ar
, data
, len
),
83 __string(device
, dev_name(ar
->ab
->dev
))
84 __string(driver
, dev_driver_string(ar
->ab
->dev
))
86 __dynamic_array(u8
, rxdesc
, len
)
90 __assign_str(device
, dev_name(ar
->ab
->dev
));
91 __assign_str(driver
, dev_driver_string(ar
->ab
->dev
));
93 memcpy(__get_dynamic_array(rxdesc
), data
, len
);
97 "%s %s rxdesc len %d",
104 #endif /* _TRACE_H_ || TRACE_HEADER_MULTI_READ*/
106 /* we don't want to use include/trace/events */
107 #undef TRACE_INCLUDE_PATH
108 #define TRACE_INCLUDE_PATH .
109 #undef TRACE_INCLUDE_FILE
110 #define TRACE_INCLUDE_FILE trace
112 /* This part must be outside protection */
113 #include <trace/define_trace.h>