summaryrefslogtreecommitdiffstats
path: root/net/mac80211/trace.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-06-26 14:27:34 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-06-26 14:27:34 -0400
commit2c443443e715fc79da9b7c3e4f31a71fcf315b09 (patch)
tree5b73cea04b13c888d94e29000c0a66ed2c23980f /net/mac80211/trace.c
parent5ea276963eacbef742fe4854883c0f69c903fcfd (diff)
parent371a255e863857f988a91a3850d6feeaa4f3c536 (diff)
downloadop-kernel-dev-2c443443e715fc79da9b7c3e4f31a71fcf315b09.zip
op-kernel-dev-2c443443e715fc79da9b7c3e4f31a71fcf315b09.tar.gz
Merge branch 'for-john' of git://git.sipsolutions.net/mac80211-next
Diffstat (limited to 'net/mac80211/trace.c')
-rw-r--r--net/mac80211/trace.c75
1 files changed, 75 insertions, 0 deletions
diff --git a/net/mac80211/trace.c b/net/mac80211/trace.c
new file mode 100644
index 0000000..386e45d8
--- /dev/null
+++ b/net/mac80211/trace.c
@@ -0,0 +1,75 @@
+/* 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"
+
+#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
OpenPOWER on IntegriCloud