aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/trace.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-06-22 07:36:25 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-06-24 05:33:18 -0400
commit3fae0273168026ed7b6065674f1410f531d58164 (patch)
tree18333b3760f1c5fea83d1f92a1a6c8a0c1e0212d /net/mac80211/trace.h
parent011ad0e9f8533cd003fb760663713df2655a2114 (diff)
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.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index 392bcc9f6a12..2e60f4acd027 100644
--- a/net/mac80211/trace.h
+++ b/net/mac80211/trace.h
@@ -1632,6 +1632,45 @@ TRACE_EVENT(stop_queue,
1632 LOCAL_PR_ARG, __entry->queue, __entry->reason 1632 LOCAL_PR_ARG, __entry->queue, __entry->reason
1633 ) 1633 )
1634); 1634);
1635
1636#ifdef CONFIG_MAC80211_MESSAGE_TRACING
1637#undef TRACE_SYSTEM
1638#define TRACE_SYSTEM mac80211_msg
1639
1640#define MAX_MSG_LEN 100
1641
1642DECLARE_EVENT_CLASS(mac80211_msg_event,
1643 TP_PROTO(struct va_format *vaf),
1644
1645 TP_ARGS(vaf),
1646
1647 TP_STRUCT__entry(
1648 __dynamic_array(char, msg, MAX_MSG_LEN)
1649 ),
1650
1651 TP_fast_assign(
1652 WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
1653 MAX_MSG_LEN, vaf->fmt,
1654 *vaf->va) >= MAX_MSG_LEN);
1655 ),
1656
1657 TP_printk("%s", __get_str(msg))
1658);
1659
1660DEFINE_EVENT(mac80211_msg_event, mac80211_info,
1661 TP_PROTO(struct va_format *vaf),
1662 TP_ARGS(vaf)
1663);
1664DEFINE_EVENT(mac80211_msg_event, mac80211_dbg,
1665 TP_PROTO(struct va_format *vaf),
1666 TP_ARGS(vaf)
1667);
1668DEFINE_EVENT(mac80211_msg_event, mac80211_err,
1669 TP_PROTO(struct va_format *vaf),
1670 TP_ARGS(vaf)
1671);
1672#endif
1673
1635#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ 1674#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
1636 1675
1637#undef TRACE_INCLUDE_PATH 1676#undef TRACE_INCLUDE_PATH