diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-06-22 13:36:25 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-06-24 11:33:18 +0200 |
commit | 3fae0273168026ed7b6065674f1410f531d58164 (patch) | |
tree | 18333b3760f1c5fea83d1f92a1a6c8a0c1e0212d /net/mac80211/trace.h | |
parent | 011ad0e9f8533cd003fb760663713df2655a2114 (diff) | |
download | op-kernel-dev-3fae0273168026ed7b6065674f1410f531d58164.zip op-kernel-dev-3fae0273168026ed7b6065674f1410f531d58164.tar.gz |
mac80211: trace debug messages
It can be very useful to have all debug messages
available when debugging, but hard to correlate
between different sources, so add a trace event
for all mac80211 debug messages.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/trace.h')
-rw-r--r-- | net/mac80211/trace.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h index 392bcc9..2e60f4a 100644 --- a/net/mac80211/trace.h +++ b/net/mac80211/trace.h @@ -1632,6 +1632,45 @@ TRACE_EVENT(stop_queue, LOCAL_PR_ARG, __entry->queue, __entry->reason ) ); + +#ifdef CONFIG_MAC80211_MESSAGE_TRACING +#undef TRACE_SYSTEM +#define TRACE_SYSTEM mac80211_msg + +#define MAX_MSG_LEN 100 + +DECLARE_EVENT_CLASS(mac80211_msg_event, + TP_PROTO(struct va_format *vaf), + + TP_ARGS(vaf), + + TP_STRUCT__entry( + __dynamic_array(char, msg, MAX_MSG_LEN) + ), + + TP_fast_assign( + WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg), + MAX_MSG_LEN, vaf->fmt, + *vaf->va) >= MAX_MSG_LEN); + ), + + TP_printk("%s", __get_str(msg)) +); + +DEFINE_EVENT(mac80211_msg_event, mac80211_info, + TP_PROTO(struct va_format *vaf), + TP_ARGS(vaf) +); +DEFINE_EVENT(mac80211_msg_event, mac80211_dbg, + TP_PROTO(struct va_format *vaf), + TP_ARGS(vaf) +); +DEFINE_EVENT(mac80211_msg_event, mac80211_err, + TP_PROTO(struct va_format *vaf), + TP_ARGS(vaf) +); +#endif + #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ #undef TRACE_INCLUDE_PATH |