aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/driver-trace.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-11-25 14:30:31 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-21 18:38:54 -0500
commit12375ef933fa8271396ed0c1e318cb1bd2e2689d (patch)
treeb05ccc4573cb8f0a1b89edeeae7e6c5805f75f67 /net/mac80211/driver-trace.h
parent47846c9b0c10808d9337d2e7d09361f3e0a0a71a (diff)
mac80211: trace interface name
It's not all that useful to have the vif/sdata pointer, we'd rather refer to the interfaces by their name. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/driver-trace.h')
-rw-r--r--net/mac80211/driver-trace.h38
1 files changed, 20 insertions, 18 deletions
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h
index 7b155b947209..ee2d19a25ce1 100644
--- a/net/mac80211/driver-trace.h
+++ b/net/mac80211/driver-trace.h
@@ -25,10 +25,12 @@ static inline void trace_ ## name(proto) {}
25#define STA_PR_FMT " sta:%pM" 25#define STA_PR_FMT " sta:%pM"
26#define STA_PR_ARG __entry->sta_addr 26#define STA_PR_ARG __entry->sta_addr
27 27
28#define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, vif) 28#define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
29#define VIF_ASSIGN __entry->vif_type = vif ? vif->type : 0; __entry->vif = vif 29 __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
30#define VIF_PR_FMT " vif:%p(%d)" 30#define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
31#define VIF_PR_ARG __entry->vif, __entry->vif_type 31 __assign_str(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
32#define VIF_PR_FMT " vif:%s(%d)"
33#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type
32 34
33TRACE_EVENT(drv_start, 35TRACE_EVENT(drv_start,
34 TP_PROTO(struct ieee80211_local *local, int ret), 36 TP_PROTO(struct ieee80211_local *local, int ret),
@@ -70,10 +72,10 @@ TRACE_EVENT(drv_stop,
70 72
71TRACE_EVENT(drv_add_interface, 73TRACE_EVENT(drv_add_interface,
72 TP_PROTO(struct ieee80211_local *local, 74 TP_PROTO(struct ieee80211_local *local,
73 struct ieee80211_vif *vif, 75 struct ieee80211_sub_if_data *sdata,
74 int ret), 76 int ret),
75 77
76 TP_ARGS(local, vif, ret), 78 TP_ARGS(local, sdata, ret),
77 79
78 TP_STRUCT__entry( 80 TP_STRUCT__entry(
79 LOCAL_ENTRY 81 LOCAL_ENTRY
@@ -85,7 +87,7 @@ TRACE_EVENT(drv_add_interface,
85 TP_fast_assign( 87 TP_fast_assign(
86 LOCAL_ASSIGN; 88 LOCAL_ASSIGN;
87 VIF_ASSIGN; 89 VIF_ASSIGN;
88 memcpy(__entry->addr, vif->addr, 6); 90 memcpy(__entry->addr, sdata->vif.addr, 6);
89 __entry->ret = ret; 91 __entry->ret = ret;
90 ), 92 ),
91 93
@@ -96,9 +98,9 @@ TRACE_EVENT(drv_add_interface,
96); 98);
97 99
98TRACE_EVENT(drv_remove_interface, 100TRACE_EVENT(drv_remove_interface,
99 TP_PROTO(struct ieee80211_local *local, struct ieee80211_vif *vif), 101 TP_PROTO(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata),
100 102
101 TP_ARGS(local, vif), 103 TP_ARGS(local, sdata),
102 104
103 TP_STRUCT__entry( 105 TP_STRUCT__entry(
104 LOCAL_ENTRY 106 LOCAL_ENTRY
@@ -109,7 +111,7 @@ TRACE_EVENT(drv_remove_interface,
109 TP_fast_assign( 111 TP_fast_assign(
110 LOCAL_ASSIGN; 112 LOCAL_ASSIGN;
111 VIF_ASSIGN; 113 VIF_ASSIGN;
112 memcpy(__entry->addr, vif->addr, 6); 114 memcpy(__entry->addr, sdata->vif.addr, 6);
113 ), 115 ),
114 116
115 TP_printk( 117 TP_printk(
@@ -163,11 +165,11 @@ TRACE_EVENT(drv_config,
163 165
164TRACE_EVENT(drv_bss_info_changed, 166TRACE_EVENT(drv_bss_info_changed,
165 TP_PROTO(struct ieee80211_local *local, 167 TP_PROTO(struct ieee80211_local *local,
166 struct ieee80211_vif *vif, 168 struct ieee80211_sub_if_data *sdata,
167 struct ieee80211_bss_conf *info, 169 struct ieee80211_bss_conf *info,
168 u32 changed), 170 u32 changed),
169 171
170 TP_ARGS(local, vif, info, changed), 172 TP_ARGS(local, sdata, info, changed),
171 173
172 TP_STRUCT__entry( 174 TP_STRUCT__entry(
173 LOCAL_ENTRY 175 LOCAL_ENTRY
@@ -291,11 +293,11 @@ TRACE_EVENT(drv_set_tim,
291 293
292TRACE_EVENT(drv_set_key, 294TRACE_EVENT(drv_set_key,
293 TP_PROTO(struct ieee80211_local *local, 295 TP_PROTO(struct ieee80211_local *local,
294 enum set_key_cmd cmd, struct ieee80211_vif *vif, 296 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
295 struct ieee80211_sta *sta, 297 struct ieee80211_sta *sta,
296 struct ieee80211_key_conf *key, int ret), 298 struct ieee80211_key_conf *key, int ret),
297 299
298 TP_ARGS(local, cmd, vif, sta, key, ret), 300 TP_ARGS(local, cmd, sdata, sta, key, ret),
299 301
300 TP_STRUCT__entry( 302 TP_STRUCT__entry(
301 LOCAL_ENTRY 303 LOCAL_ENTRY
@@ -489,11 +491,11 @@ TRACE_EVENT(drv_set_rts_threshold,
489 491
490TRACE_EVENT(drv_sta_notify, 492TRACE_EVENT(drv_sta_notify,
491 TP_PROTO(struct ieee80211_local *local, 493 TP_PROTO(struct ieee80211_local *local,
492 struct ieee80211_vif *vif, 494 struct ieee80211_sub_if_data *sdata,
493 enum sta_notify_cmd cmd, 495 enum sta_notify_cmd cmd,
494 struct ieee80211_sta *sta), 496 struct ieee80211_sta *sta),
495 497
496 TP_ARGS(local, vif, cmd, sta), 498 TP_ARGS(local, sdata, cmd, sta),
497 499
498 TP_STRUCT__entry( 500 TP_STRUCT__entry(
499 LOCAL_ENTRY 501 LOCAL_ENTRY
@@ -654,12 +656,12 @@ TRACE_EVENT(drv_tx_last_beacon,
654 656
655TRACE_EVENT(drv_ampdu_action, 657TRACE_EVENT(drv_ampdu_action,
656 TP_PROTO(struct ieee80211_local *local, 658 TP_PROTO(struct ieee80211_local *local,
657 struct ieee80211_vif *vif, 659 struct ieee80211_sub_if_data *sdata,
658 enum ieee80211_ampdu_mlme_action action, 660 enum ieee80211_ampdu_mlme_action action,
659 struct ieee80211_sta *sta, u16 tid, 661 struct ieee80211_sta *sta, u16 tid,
660 u16 *ssn, int ret), 662 u16 *ssn, int ret),
661 663
662 TP_ARGS(local, vif, action, sta, tid, ssn, ret), 664 TP_ARGS(local, sdata, action, sta, tid, ssn, ret),
663 665
664 TP_STRUCT__entry( 666 TP_STRUCT__entry(
665 LOCAL_ENTRY 667 LOCAL_ENTRY