0001
0002
0003 #include <linux/module.h>
0004
0005
0006 #ifndef __CHECKER__
0007 #include <net/cfg80211.h>
0008 #include "driver-ops.h"
0009 #include "debug.h"
0010 #define CREATE_TRACE_POINTS
0011 #include "trace.h"
0012 #include "trace_msg.h"
0013
0014 #ifdef CONFIG_MAC80211_MESSAGE_TRACING
0015 void __sdata_info(const char *fmt, ...)
0016 {
0017 struct va_format vaf = {
0018 .fmt = fmt,
0019 };
0020 va_list args;
0021
0022 va_start(args, fmt);
0023 vaf.va = &args;
0024
0025 pr_info("%pV", &vaf);
0026 trace_mac80211_info(&vaf);
0027 va_end(args);
0028 }
0029
0030 void __sdata_dbg(bool print, const char *fmt, ...)
0031 {
0032 struct va_format vaf = {
0033 .fmt = fmt,
0034 };
0035 va_list args;
0036
0037 va_start(args, fmt);
0038 vaf.va = &args;
0039
0040 if (print)
0041 pr_debug("%pV", &vaf);
0042 trace_mac80211_dbg(&vaf);
0043 va_end(args);
0044 }
0045
0046 void __sdata_err(const char *fmt, ...)
0047 {
0048 struct va_format vaf = {
0049 .fmt = fmt,
0050 };
0051 va_list args;
0052
0053 va_start(args, fmt);
0054 vaf.va = &args;
0055
0056 pr_err("%pV", &vaf);
0057 trace_mac80211_err(&vaf);
0058 va_end(args);
0059 }
0060
0061 void __wiphy_dbg(struct wiphy *wiphy, bool print, const char *fmt, ...)
0062 {
0063 struct va_format vaf = {
0064 .fmt = fmt,
0065 };
0066 va_list args;
0067
0068 va_start(args, fmt);
0069 vaf.va = &args;
0070
0071 if (print)
0072 wiphy_dbg(wiphy, "%pV", &vaf);
0073 trace_mac80211_dbg(&vaf);
0074 va_end(args);
0075 }
0076 #endif
0077 #endif