Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / net / mac80211 / trace.c
blob837857261b6645572041a12fd66325105bc877b9
1 // SPDX-License-Identifier: GPL-2.0
2 /* bug in tracepoint.h, it should include this */
3 #include <linux/module.h>
5 /* sparse isn't too happy with all macros... */
6 #ifndef __CHECKER__
7 #include <net/cfg80211.h>
8 #include "driver-ops.h"
9 #include "debug.h"
10 #define CREATE_TRACE_POINTS
11 #include "trace.h"
12 #include "trace_msg.h"
14 #ifdef CONFIG_MAC80211_MESSAGE_TRACING
15 void __sdata_info(const char *fmt, ...)
17 struct va_format vaf = {
18 .fmt = fmt,
20 va_list args;
22 va_start(args, fmt);
23 vaf.va = &args;
25 pr_info("%pV", &vaf);
26 trace_mac80211_info(&vaf);
27 va_end(args);
30 void __sdata_dbg(bool print, const char *fmt, ...)
32 struct va_format vaf = {
33 .fmt = fmt,
35 va_list args;
37 va_start(args, fmt);
38 vaf.va = &args;
40 if (print)
41 pr_debug("%pV", &vaf);
42 trace_mac80211_dbg(&vaf);
43 va_end(args);
46 void __sdata_err(const char *fmt, ...)
48 struct va_format vaf = {
49 .fmt = fmt,
51 va_list args;
53 va_start(args, fmt);
54 vaf.va = &args;
56 pr_err("%pV", &vaf);
57 trace_mac80211_err(&vaf);
58 va_end(args);
61 void __wiphy_dbg(struct wiphy *wiphy, bool print, const char *fmt, ...)
63 struct va_format vaf = {
64 .fmt = fmt,
66 va_list args;
68 va_start(args, fmt);
69 vaf.va = &args;
71 if (print)
72 wiphy_dbg(wiphy, "%pV", &vaf);
73 trace_mac80211_dbg(&vaf);
74 va_end(args);
76 #endif
77 #endif