Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / net / mac80211 / trace_msg.h
blob366b9e6f043e2df89eccb4d63a9fb3ab1d7db023
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifdef CONFIG_MAC80211_MESSAGE_TRACING
4 #if !defined(__MAC80211_MSG_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
5 #define __MAC80211_MSG_DRIVER_TRACE
7 #include <linux/tracepoint.h>
8 #include <net/mac80211.h>
9 #include "ieee80211_i.h"
11 #undef TRACE_SYSTEM
12 #define TRACE_SYSTEM mac80211_msg
14 #define MAX_MSG_LEN 100
16 DECLARE_EVENT_CLASS(mac80211_msg_event,
17 TP_PROTO(struct va_format *vaf),
19 TP_ARGS(vaf),
21 TP_STRUCT__entry(
22 __dynamic_array(char, msg, MAX_MSG_LEN)
25 TP_fast_assign(
26 WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
27 MAX_MSG_LEN, vaf->fmt,
28 *vaf->va) >= MAX_MSG_LEN);
31 TP_printk("%s", __get_str(msg))
34 DEFINE_EVENT(mac80211_msg_event, mac80211_info,
35 TP_PROTO(struct va_format *vaf),
36 TP_ARGS(vaf)
38 DEFINE_EVENT(mac80211_msg_event, mac80211_dbg,
39 TP_PROTO(struct va_format *vaf),
40 TP_ARGS(vaf)
42 DEFINE_EVENT(mac80211_msg_event, mac80211_err,
43 TP_PROTO(struct va_format *vaf),
44 TP_ARGS(vaf)
46 #endif /* !__MAC80211_MSG_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
48 #undef TRACE_INCLUDE_PATH
49 #define TRACE_INCLUDE_PATH .
50 #undef TRACE_INCLUDE_FILE
51 #define TRACE_INCLUDE_FILE trace_msg
52 #include <trace/define_trace.h>
54 #endif