Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[linux-2.6.git] / net / mac80211 / trace.c
blob386e45d8a95818ba4a447b764288d935b9476638
1 /* bug in tracepoint.h, it should include this */
2 #include <linux/module.h>
4 /* sparse isn't too happy with all macros... */
5 #ifndef __CHECKER__
6 #include <net/cfg80211.h>
7 #include "driver-ops.h"
8 #include "debug.h"
9 #define CREATE_TRACE_POINTS
10 #include "trace.h"
12 #ifdef CONFIG_MAC80211_MESSAGE_TRACING
13 void __sdata_info(const char *fmt, ...)
15 struct va_format vaf = {
16 .fmt = fmt,
18 va_list args;
20 va_start(args, fmt);
21 vaf.va = &args;
23 pr_info("%pV", &vaf);
24 trace_mac80211_info(&vaf);
25 va_end(args);
28 void __sdata_dbg(bool print, const char *fmt, ...)
30 struct va_format vaf = {
31 .fmt = fmt,
33 va_list args;
35 va_start(args, fmt);
36 vaf.va = &args;
38 if (print)
39 pr_debug("%pV", &vaf);
40 trace_mac80211_dbg(&vaf);
41 va_end(args);
44 void __sdata_err(const char *fmt, ...)
46 struct va_format vaf = {
47 .fmt = fmt,
49 va_list args;
51 va_start(args, fmt);
52 vaf.va = &args;
54 pr_err("%pV", &vaf);
55 trace_mac80211_err(&vaf);
56 va_end(args);
59 void __wiphy_dbg(struct wiphy *wiphy, bool print, const char *fmt, ...)
61 struct va_format vaf = {
62 .fmt = fmt,
64 va_list args;
66 va_start(args, fmt);
67 vaf.va = &args;
69 if (print)
70 wiphy_dbg(wiphy, "%pV", &vaf);
71 trace_mac80211_dbg(&vaf);
72 va_end(args);
74 #endif
75 #endif