kernel_optimize_test/net/mac80211/trace.c
Steven Rostedt (Red Hat) 1bc1e4d048 mac80211: Move message tracepoints to their own header
Every tracing file must have its own TRACE_SYSTEM defined.
The mac80211 tracepoint header broke this and add in the middle
of the file had:

 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM mac80211_msg

Unfortunately, this broke new code in the ftrace infrastructure.
Moving the mac80211_msg into its own trace file with its own
TRACE_SYSTEM defined fixes the issue.

Link: http://lkml.kernel.org/r/1428389938.1841.1.camel@sipsolutions.net

Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2015-04-07 12:32:09 -04:00

77 lines
1.2 KiB
C

/* bug in tracepoint.h, it should include this */
#include <linux/module.h>
/* sparse isn't too happy with all macros... */
#ifndef __CHECKER__
#include <net/cfg80211.h>
#include "driver-ops.h"
#include "debug.h"
#define CREATE_TRACE_POINTS
#include "trace.h"
#include "trace_msg.h"
#ifdef CONFIG_MAC80211_MESSAGE_TRACING
void __sdata_info(const char *fmt, ...)
{
struct va_format vaf = {
.fmt = fmt,
};
va_list args;
va_start(args, fmt);
vaf.va = &args;
pr_info("%pV", &vaf);
trace_mac80211_info(&vaf);
va_end(args);
}
void __sdata_dbg(bool print, const char *fmt, ...)
{
struct va_format vaf = {
.fmt = fmt,
};
va_list args;
va_start(args, fmt);
vaf.va = &args;
if (print)
pr_debug("%pV", &vaf);
trace_mac80211_dbg(&vaf);
va_end(args);
}
void __sdata_err(const char *fmt, ...)
{
struct va_format vaf = {
.fmt = fmt,
};
va_list args;
va_start(args, fmt);
vaf.va = &args;
pr_err("%pV", &vaf);
trace_mac80211_err(&vaf);
va_end(args);
}
void __wiphy_dbg(struct wiphy *wiphy, bool print, const char *fmt, ...)
{
struct va_format vaf = {
.fmt = fmt,
};
va_list args;
va_start(args, fmt);
vaf.va = &args;
if (print)
wiphy_dbg(wiphy, "%pV", &vaf);
trace_mac80211_dbg(&vaf);
va_end(args);
}
#endif
#endif