aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-07 07:46:22 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-24 15:05:06 -0400
commit0a2b8bb24d4eb67788edd71d1ef8aa86c2e17e0f (patch)
tree515bc3db1f3d46ce967320b0bb9914ccd64fddbc /net
parent99783e2cde6eccbd31efeb03a79f26bb5f239c36 (diff)
mac80211: driver operation debugging
This makes mac80211 use the event tracing framework to log all operations as given to the driver. This will need to be extended with more information, but as a start it should be good. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/Kconfig12
-rw-r--r--net/mac80211/Makefile3
-rw-r--r--net/mac80211/driver-ops.h85
-rw-r--r--net/mac80211/driver-trace.c6
-rw-r--r--net/mac80211/driver-trace.h648
5 files changed, 732 insertions, 22 deletions
diff --git a/net/mac80211/Kconfig b/net/mac80211/Kconfig
index 182c9c5c6818..19a4c66e143e 100644
--- a/net/mac80211/Kconfig
+++ b/net/mac80211/Kconfig
@@ -206,3 +206,15 @@ config MAC80211_DEBUG_COUNTERS
206 and show them in debugfs. 206 and show them in debugfs.
207 207
208 If unsure, say N. 208 If unsure, say N.
209
210config MAC80211_DRIVER_API_TRACER
211 bool "Driver API tracer"
212 depends on MAC80211_DEBUG_MENU
213 depends on EVENT_TRACING
214 help
215 Say Y here to make mac80211 register with the ftrace
216 framework for the driver API -- you can see which
217 driver methods it is calling then by looking at the
218 trace.
219
220 If unsure, say N.
diff --git a/net/mac80211/Makefile b/net/mac80211/Makefile
index 0e3ab88bb706..91284a74ff91 100644
--- a/net/mac80211/Makefile
+++ b/net/mac80211/Makefile
@@ -41,6 +41,9 @@ mac80211-$(CONFIG_MAC80211_MESH) += \
41 41
42mac80211-$(CONFIG_PM) += pm.o 42mac80211-$(CONFIG_PM) += pm.o
43 43
44mac80211-$(CONFIG_MAC80211_DRIVER_API_TRACER) += driver-trace.o
45CFLAGS_driver-trace.o := -I$(src)
46
44# objects for PID algorithm 47# objects for PID algorithm
45rc80211_pid-y := rc80211_pid_algo.o 48rc80211_pid-y := rc80211_pid_algo.o
46rc80211_pid-$(CONFIG_MAC80211_DEBUGFS) += rc80211_pid_debugfs.o 49rc80211_pid-$(CONFIG_MAC80211_DEBUGFS) += rc80211_pid_debugfs.o
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index b13446afd48f..4100c361a99d 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -3,6 +3,7 @@
3 3
4#include <net/mac80211.h> 4#include <net/mac80211.h>
5#include "ieee80211_i.h" 5#include "ieee80211_i.h"
6#include "driver-trace.h"
6 7
7static inline int drv_tx(struct ieee80211_local *local, struct sk_buff *skb) 8static inline int drv_tx(struct ieee80211_local *local, struct sk_buff *skb)
8{ 9{
@@ -11,29 +12,37 @@ static inline int drv_tx(struct ieee80211_local *local, struct sk_buff *skb)
11 12
12static inline int drv_start(struct ieee80211_local *local) 13static inline int drv_start(struct ieee80211_local *local)
13{ 14{
14 return local->ops->start(&local->hw); 15 int ret = local->ops->start(&local->hw);
16 trace_drv_start(local, ret);
17 return ret;
15} 18}
16 19
17static inline void drv_stop(struct ieee80211_local *local) 20static inline void drv_stop(struct ieee80211_local *local)
18{ 21{
19 local->ops->stop(&local->hw); 22 local->ops->stop(&local->hw);
23 trace_drv_stop(local);
20} 24}
21 25
22static inline int drv_add_interface(struct ieee80211_local *local, 26static inline int drv_add_interface(struct ieee80211_local *local,
23 struct ieee80211_if_init_conf *conf) 27 struct ieee80211_if_init_conf *conf)
24{ 28{
25 return local->ops->add_interface(&local->hw, conf); 29 int ret = local->ops->add_interface(&local->hw, conf);
30 trace_drv_add_interface(local, conf->mac_addr, conf->vif, ret);
31 return ret;
26} 32}
27 33
28static inline void drv_remove_interface(struct ieee80211_local *local, 34static inline void drv_remove_interface(struct ieee80211_local *local,
29 struct ieee80211_if_init_conf *conf) 35 struct ieee80211_if_init_conf *conf)
30{ 36{
31 local->ops->remove_interface(&local->hw, conf); 37 local->ops->remove_interface(&local->hw, conf);
38 trace_drv_remove_interface(local, conf->mac_addr, conf->vif);
32} 39}
33 40
34static inline int drv_config(struct ieee80211_local *local, u32 changed) 41static inline int drv_config(struct ieee80211_local *local, u32 changed)
35{ 42{
36 return local->ops->config(&local->hw, changed); 43 int ret = local->ops->config(&local->hw, changed);
44 trace_drv_config(local, changed, ret);
45 return ret;
37} 46}
38 47
39static inline void drv_bss_info_changed(struct ieee80211_local *local, 48static inline void drv_bss_info_changed(struct ieee80211_local *local,
@@ -43,6 +52,7 @@ static inline void drv_bss_info_changed(struct ieee80211_local *local,
43{ 52{
44 if (local->ops->bss_info_changed) 53 if (local->ops->bss_info_changed)
45 local->ops->bss_info_changed(&local->hw, vif, info, changed); 54 local->ops->bss_info_changed(&local->hw, vif, info, changed);
55 trace_drv_bss_info_changed(local, vif, info, changed);
46} 56}
47 57
48static inline void drv_configure_filter(struct ieee80211_local *local, 58static inline void drv_configure_filter(struct ieee80211_local *local,
@@ -53,14 +63,18 @@ static inline void drv_configure_filter(struct ieee80211_local *local,
53{ 63{
54 local->ops->configure_filter(&local->hw, changed_flags, total_flags, 64 local->ops->configure_filter(&local->hw, changed_flags, total_flags,
55 mc_count, mc_list); 65 mc_count, mc_list);
66 trace_drv_configure_filter(local, changed_flags, total_flags,
67 mc_count);
56} 68}
57 69
58static inline int drv_set_tim(struct ieee80211_local *local, 70static inline int drv_set_tim(struct ieee80211_local *local,
59 struct ieee80211_sta *sta, bool set) 71 struct ieee80211_sta *sta, bool set)
60{ 72{
73 int ret = 0;
61 if (local->ops->set_tim) 74 if (local->ops->set_tim)
62 return local->ops->set_tim(&local->hw, sta, set); 75 ret = local->ops->set_tim(&local->hw, sta, set);
63 return 0; 76 trace_drv_set_tim(local, sta, set, ret);
77 return ret;
64} 78}
65 79
66static inline int drv_set_key(struct ieee80211_local *local, 80static inline int drv_set_key(struct ieee80211_local *local,
@@ -68,7 +82,9 @@ static inline int drv_set_key(struct ieee80211_local *local,
68 struct ieee80211_sta *sta, 82 struct ieee80211_sta *sta,
69 struct ieee80211_key_conf *key) 83 struct ieee80211_key_conf *key)
70{ 84{
71 return local->ops->set_key(&local->hw, cmd, vif, sta, key); 85 int ret = local->ops->set_key(&local->hw, cmd, vif, sta, key);
86 trace_drv_set_key(local, cmd, vif, sta, key, ret);
87 return ret;
72} 88}
73 89
74static inline void drv_update_tkip_key(struct ieee80211_local *local, 90static inline void drv_update_tkip_key(struct ieee80211_local *local,
@@ -79,32 +95,41 @@ static inline void drv_update_tkip_key(struct ieee80211_local *local,
79 if (local->ops->update_tkip_key) 95 if (local->ops->update_tkip_key)
80 local->ops->update_tkip_key(&local->hw, conf, address, 96 local->ops->update_tkip_key(&local->hw, conf, address,
81 iv32, phase1key); 97 iv32, phase1key);
98 trace_drv_update_tkip_key(local, conf, address, iv32);
82} 99}
83 100
84static inline int drv_hw_scan(struct ieee80211_local *local, 101static inline int drv_hw_scan(struct ieee80211_local *local,
85 struct cfg80211_scan_request *req) 102 struct cfg80211_scan_request *req)
86{ 103{
87 return local->ops->hw_scan(&local->hw, req); 104 int ret = local->ops->hw_scan(&local->hw, req);
105 trace_drv_hw_scan(local, req, ret);
106 return ret;
88} 107}
89 108
90static inline void drv_sw_scan_start(struct ieee80211_local *local) 109static inline void drv_sw_scan_start(struct ieee80211_local *local)
91{ 110{
92 if (local->ops->sw_scan_start) 111 if (local->ops->sw_scan_start)
93 local->ops->sw_scan_start(&local->hw); 112 local->ops->sw_scan_start(&local->hw);
113 trace_drv_sw_scan_start(local);
94} 114}
95 115
96static inline void drv_sw_scan_complete(struct ieee80211_local *local) 116static inline void drv_sw_scan_complete(struct ieee80211_local *local)
97{ 117{
98 if (local->ops->sw_scan_complete) 118 if (local->ops->sw_scan_complete)
99 local->ops->sw_scan_complete(&local->hw); 119 local->ops->sw_scan_complete(&local->hw);
120 trace_drv_sw_scan_complete(local);
100} 121}
101 122
102static inline int drv_get_stats(struct ieee80211_local *local, 123static inline int drv_get_stats(struct ieee80211_local *local,
103 struct ieee80211_low_level_stats *stats) 124 struct ieee80211_low_level_stats *stats)
104{ 125{
105 if (!local->ops->get_stats) 126 int ret = -EOPNOTSUPP;
106 return -EOPNOTSUPP; 127
107 return local->ops->get_stats(&local->hw, stats); 128 if (local->ops->get_stats)
129 ret = local->ops->get_stats(&local->hw, stats);
130 trace_drv_get_stats(local, stats, ret);
131
132 return ret;
108} 133}
109 134
110static inline void drv_get_tkip_seq(struct ieee80211_local *local, 135static inline void drv_get_tkip_seq(struct ieee80211_local *local,
@@ -112,14 +137,17 @@ static inline void drv_get_tkip_seq(struct ieee80211_local *local,
112{ 137{
113 if (local->ops->get_tkip_seq) 138 if (local->ops->get_tkip_seq)
114 local->ops->get_tkip_seq(&local->hw, hw_key_idx, iv32, iv16); 139 local->ops->get_tkip_seq(&local->hw, hw_key_idx, iv32, iv16);
140 trace_drv_get_tkip_seq(local, hw_key_idx, iv32, iv16);
115} 141}
116 142
117static inline int drv_set_rts_threshold(struct ieee80211_local *local, 143static inline int drv_set_rts_threshold(struct ieee80211_local *local,
118 u32 value) 144 u32 value)
119{ 145{
146 int ret = 0;
120 if (local->ops->set_rts_threshold) 147 if (local->ops->set_rts_threshold)
121 return local->ops->set_rts_threshold(&local->hw, value); 148 ret = local->ops->set_rts_threshold(&local->hw, value);
122 return 0; 149 trace_drv_set_rts_threshold(local, value, ret);
150 return ret;
123} 151}
124 152
125static inline void drv_sta_notify(struct ieee80211_local *local, 153static inline void drv_sta_notify(struct ieee80211_local *local,
@@ -129,46 +157,57 @@ static inline void drv_sta_notify(struct ieee80211_local *local,
129{ 157{
130 if (local->ops->sta_notify) 158 if (local->ops->sta_notify)
131 local->ops->sta_notify(&local->hw, vif, cmd, sta); 159 local->ops->sta_notify(&local->hw, vif, cmd, sta);
160 trace_drv_sta_notify(local, vif, cmd, sta);
132} 161}
133 162
134static inline int drv_conf_tx(struct ieee80211_local *local, u16 queue, 163static inline int drv_conf_tx(struct ieee80211_local *local, u16 queue,
135 const struct ieee80211_tx_queue_params *params) 164 const struct ieee80211_tx_queue_params *params)
136{ 165{
166 int ret = -EOPNOTSUPP;
137 if (local->ops->conf_tx) 167 if (local->ops->conf_tx)
138 return local->ops->conf_tx(&local->hw, queue, params); 168 ret = local->ops->conf_tx(&local->hw, queue, params);
139 return -EOPNOTSUPP; 169 trace_drv_conf_tx(local, queue, params, ret);
170 return ret;
140} 171}
141 172
142static inline int drv_get_tx_stats(struct ieee80211_local *local, 173static inline int drv_get_tx_stats(struct ieee80211_local *local,
143 struct ieee80211_tx_queue_stats *stats) 174 struct ieee80211_tx_queue_stats *stats)
144{ 175{
145 return local->ops->get_tx_stats(&local->hw, stats); 176 int ret = local->ops->get_tx_stats(&local->hw, stats);
177 trace_drv_get_tx_stats(local, stats, ret);
178 return ret;
146} 179}
147 180
148static inline u64 drv_get_tsf(struct ieee80211_local *local) 181static inline u64 drv_get_tsf(struct ieee80211_local *local)
149{ 182{
183 u64 ret = -1ULL;
150 if (local->ops->get_tsf) 184 if (local->ops->get_tsf)
151 return local->ops->get_tsf(&local->hw); 185 ret = local->ops->get_tsf(&local->hw);
152 return -1ULL; 186 trace_drv_get_tsf(local, ret);
187 return ret;
153} 188}
154 189
155static inline void drv_set_tsf(struct ieee80211_local *local, u64 tsf) 190static inline void drv_set_tsf(struct ieee80211_local *local, u64 tsf)
156{ 191{
157 if (local->ops->set_tsf) 192 if (local->ops->set_tsf)
158 local->ops->set_tsf(&local->hw, tsf); 193 local->ops->set_tsf(&local->hw, tsf);
194 trace_drv_set_tsf(local, tsf);
159} 195}
160 196
161static inline void drv_reset_tsf(struct ieee80211_local *local) 197static inline void drv_reset_tsf(struct ieee80211_local *local)
162{ 198{
163 if (local->ops->reset_tsf) 199 if (local->ops->reset_tsf)
164 local->ops->reset_tsf(&local->hw); 200 local->ops->reset_tsf(&local->hw);
201 trace_drv_reset_tsf(local);
165} 202}
166 203
167static inline int drv_tx_last_beacon(struct ieee80211_local *local) 204static inline int drv_tx_last_beacon(struct ieee80211_local *local)
168{ 205{
206 int ret = 1;
169 if (local->ops->tx_last_beacon) 207 if (local->ops->tx_last_beacon)
170 return local->ops->tx_last_beacon(&local->hw); 208 ret = local->ops->tx_last_beacon(&local->hw);
171 return 1; 209 trace_drv_tx_last_beacon(local, ret);
210 return ret;
172} 211}
173 212
174static inline int drv_ampdu_action(struct ieee80211_local *local, 213static inline int drv_ampdu_action(struct ieee80211_local *local,
@@ -176,10 +215,12 @@ static inline int drv_ampdu_action(struct ieee80211_local *local,
176 struct ieee80211_sta *sta, u16 tid, 215 struct ieee80211_sta *sta, u16 tid,
177 u16 *ssn) 216 u16 *ssn)
178{ 217{
218 int ret = -EOPNOTSUPP;
179 if (local->ops->ampdu_action) 219 if (local->ops->ampdu_action)
180 return local->ops->ampdu_action(&local->hw, action, 220 ret = local->ops->ampdu_action(&local->hw, action,
181 sta, tid, ssn); 221 sta, tid, ssn);
182 return -EOPNOTSUPP; 222 trace_drv_ampdu_action(local, action, sta, tid, ssn, ret);
223 return ret;
183} 224}
184 225
185 226
diff --git a/net/mac80211/driver-trace.c b/net/mac80211/driver-trace.c
new file mode 100644
index 000000000000..6da6f79932fc
--- /dev/null
+++ b/net/mac80211/driver-trace.c
@@ -0,0 +1,6 @@
1/* bug in tracepoint.h, it should include this */
2#include <linux/module.h>
3
4#include "driver-ops.h"
5#define CREATE_TRACE_POINTS
6#include "driver-trace.h"
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h
new file mode 100644
index 000000000000..48c93d13e7b0
--- /dev/null
+++ b/net/mac80211/driver-trace.h
@@ -0,0 +1,648 @@
1#if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
2#define __MAC80211_DRIVER_TRACE
3
4#include <linux/tracepoint.h>
5#include <net/mac80211.h>
6#include "ieee80211_i.h"
7
8#ifndef CONFIG_MAC80211_DRIVER_API_TRACER
9#undef TRACE_EVENT
10#define TRACE_EVENT(name, proto, ...) \
11static inline void trace_ ## name(proto) {}
12#endif
13
14#undef TRACE_SYSTEM
15#define TRACE_SYSTEM mac80211
16
17#define MAXNAME 32
18#define LOCAL_ENTRY __array(char, wiphy_name, 32)
19#define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME)
20#define LOCAL_PR_FMT "%s"
21#define LOCAL_PR_ARG __entry->wiphy_name
22
23#define STA_ENTRY __array(char, sta_addr, ETH_ALEN)
24#define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN))
25#define STA_PR_FMT " sta:%pM"
26#define STA_PR_ARG __entry->sta_addr
27
28#define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, vif)
29#define VIF_ASSIGN __entry->vif_type = vif ? vif->type : 0; __entry->vif = vif
30#define VIF_PR_FMT " vif:%p(%d)"
31#define VIF_PR_ARG __entry->vif, __entry->vif_type
32
33TRACE_EVENT(drv_start,
34 TP_PROTO(struct ieee80211_local *local, int ret),
35
36 TP_ARGS(local, ret),
37
38 TP_STRUCT__entry(
39 LOCAL_ENTRY
40 __field(int, ret)
41 ),
42
43 TP_fast_assign(
44 LOCAL_ASSIGN;
45 __entry->ret = ret;
46 ),
47
48 TP_printk(
49 LOCAL_PR_FMT, LOCAL_PR_ARG
50 )
51);
52
53TRACE_EVENT(drv_stop,
54 TP_PROTO(struct ieee80211_local *local),
55
56 TP_ARGS(local),
57
58 TP_STRUCT__entry(
59 LOCAL_ENTRY
60 ),
61
62 TP_fast_assign(
63 LOCAL_ASSIGN;
64 ),
65
66 TP_printk(
67 LOCAL_PR_FMT, LOCAL_PR_ARG
68 )
69);
70
71TRACE_EVENT(drv_add_interface,
72 TP_PROTO(struct ieee80211_local *local,
73 const u8 *addr,
74 struct ieee80211_vif *vif,
75 int ret),
76
77 TP_ARGS(local, addr, vif, ret),
78
79 TP_STRUCT__entry(
80 LOCAL_ENTRY
81 VIF_ENTRY
82 __array(char, addr, 6)
83 __field(int, ret)
84 ),
85
86 TP_fast_assign(
87 LOCAL_ASSIGN;
88 VIF_ASSIGN;
89 memcpy(__entry->addr, addr, 6);
90 __entry->ret = ret;
91 ),
92
93 TP_printk(
94 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM ret:%d",
95 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr, __entry->ret
96 )
97);
98
99TRACE_EVENT(drv_remove_interface,
100 TP_PROTO(struct ieee80211_local *local,
101 const u8 *addr, struct ieee80211_vif *vif),
102
103 TP_ARGS(local, addr, vif),
104
105 TP_STRUCT__entry(
106 LOCAL_ENTRY
107 VIF_ENTRY
108 __array(char, addr, 6)
109 ),
110
111 TP_fast_assign(
112 LOCAL_ASSIGN;
113 VIF_ASSIGN;
114 memcpy(__entry->addr, addr, 6);
115 ),
116
117 TP_printk(
118 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
119 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
120 )
121);
122
123TRACE_EVENT(drv_config,
124 TP_PROTO(struct ieee80211_local *local,
125 u32 changed,
126 int ret),
127
128 TP_ARGS(local, changed, ret),
129
130 TP_STRUCT__entry(
131 LOCAL_ENTRY
132 __field(u32, changed)
133 __field(int, ret)
134 ),
135
136 TP_fast_assign(
137 LOCAL_ASSIGN;
138 __entry->changed = changed;
139 __entry->ret = ret;
140 ),
141
142 TP_printk(
143 LOCAL_PR_FMT " ch:%#x ret:%d",
144 LOCAL_PR_ARG, __entry->changed, __entry->ret
145 )
146);
147
148TRACE_EVENT(drv_bss_info_changed,
149 TP_PROTO(struct ieee80211_local *local,
150 struct ieee80211_vif *vif,
151 struct ieee80211_bss_conf *info,
152 u32 changed),
153
154 TP_ARGS(local, vif, info, changed),
155
156 TP_STRUCT__entry(
157 LOCAL_ENTRY
158 VIF_ENTRY
159 __field(bool, assoc)
160 __field(u16, aid)
161 __field(bool, cts)
162 __field(bool, shortpre)
163 __field(bool, shortslot)
164 __field(u8, dtimper)
165 __field(u16, bcnint)
166 __field(u16, assoc_cap)
167 __field(u64, timestamp)
168 __field(u32, basic_rates)
169 __field(u32, changed)
170 ),
171
172 TP_fast_assign(
173 LOCAL_ASSIGN;
174 VIF_ASSIGN;
175 __entry->changed = changed;
176 __entry->aid = info->aid;
177 __entry->assoc = info->assoc;
178 __entry->shortpre = info->use_short_preamble;
179 __entry->cts = info->use_cts_prot;
180 __entry->shortslot = info->use_short_slot;
181 __entry->dtimper = info->dtim_period;
182 __entry->bcnint = info->beacon_int;
183 __entry->assoc_cap = info->assoc_capability;
184 __entry->timestamp = info->timestamp;
185 __entry->basic_rates = info->basic_rates;
186 ),
187
188 TP_printk(
189 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
190 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
191 )
192);
193
194TRACE_EVENT(drv_configure_filter,
195 TP_PROTO(struct ieee80211_local *local,
196 unsigned int changed_flags,
197 unsigned int *total_flags,
198 int mc_count),
199
200 TP_ARGS(local, changed_flags, total_flags, mc_count),
201
202 TP_STRUCT__entry(
203 LOCAL_ENTRY
204 __field(unsigned int, changed)
205 __field(unsigned int, total)
206 __field(int, mc)
207 ),
208
209 TP_fast_assign(
210 LOCAL_ASSIGN;
211 __entry->changed = changed_flags;
212 __entry->total = *total_flags;
213 __entry->mc = mc_count;
214 ),
215
216 TP_printk(
217 LOCAL_PR_FMT " changed:%#x total:%#x mc:%d",
218 LOCAL_PR_ARG, __entry->changed, __entry->total, __entry->mc
219 )
220);
221
222TRACE_EVENT(drv_set_tim,
223 TP_PROTO(struct ieee80211_local *local,
224 struct ieee80211_sta *sta, bool set, int ret),
225
226 TP_ARGS(local, sta, set, ret),
227
228 TP_STRUCT__entry(
229 LOCAL_ENTRY
230 STA_ENTRY
231 __field(bool, set)
232 __field(int, ret)
233 ),
234
235 TP_fast_assign(
236 LOCAL_ASSIGN;
237 STA_ASSIGN;
238 __entry->set = set;
239 __entry->ret = ret;
240 ),
241
242 TP_printk(
243 LOCAL_PR_FMT STA_PR_FMT " set:%d ret:%d",
244 LOCAL_PR_ARG, STA_PR_FMT, __entry->set, __entry->ret
245 )
246);
247
248TRACE_EVENT(drv_set_key,
249 TP_PROTO(struct ieee80211_local *local,
250 enum set_key_cmd cmd, struct ieee80211_vif *vif,
251 struct ieee80211_sta *sta,
252 struct ieee80211_key_conf *key, int ret),
253
254 TP_ARGS(local, cmd, vif, sta, key, ret),
255
256 TP_STRUCT__entry(
257 LOCAL_ENTRY
258 VIF_ENTRY
259 STA_ENTRY
260 __field(enum ieee80211_key_alg, alg)
261 __field(u8, hw_key_idx)
262 __field(u8, flags)
263 __field(s8, keyidx)
264 __field(int, ret)
265 ),
266
267 TP_fast_assign(
268 LOCAL_ASSIGN;
269 VIF_ASSIGN;
270 STA_ASSIGN;
271 __entry->alg = key->alg;
272 __entry->flags = key->flags;
273 __entry->keyidx = key->keyidx;
274 __entry->hw_key_idx = key->hw_key_idx;
275 __entry->ret = ret;
276 ),
277
278 TP_printk(
279 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ret:%d",
280 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ret
281 )
282);
283
284TRACE_EVENT(drv_update_tkip_key,
285 TP_PROTO(struct ieee80211_local *local,
286 struct ieee80211_key_conf *conf,
287 const u8 *address, u32 iv32),
288
289 TP_ARGS(local, conf, address, iv32),
290
291 TP_STRUCT__entry(
292 LOCAL_ENTRY
293 __array(u8, addr, 6)
294 __field(u32, iv32)
295 ),
296
297 TP_fast_assign(
298 LOCAL_ASSIGN;
299 memcpy(__entry->addr, address, 6);
300 __entry->iv32 = iv32;
301 ),
302
303 TP_printk(
304 LOCAL_PR_FMT " addr:%pM iv32:%#x",
305 LOCAL_PR_ARG, __entry->addr, __entry->iv32
306 )
307);
308
309TRACE_EVENT(drv_hw_scan,
310 TP_PROTO(struct ieee80211_local *local,
311 struct cfg80211_scan_request *req, int ret),
312
313 TP_ARGS(local, req, ret),
314
315 TP_STRUCT__entry(
316 LOCAL_ENTRY
317 __field(int, ret)
318 ),
319
320 TP_fast_assign(
321 LOCAL_ASSIGN;
322 __entry->ret = ret;
323 ),
324
325 TP_printk(
326 LOCAL_PR_FMT " ret:%d",
327 LOCAL_PR_ARG, __entry->ret
328 )
329);
330
331TRACE_EVENT(drv_sw_scan_start,
332 TP_PROTO(struct ieee80211_local *local),
333
334 TP_ARGS(local),
335
336 TP_STRUCT__entry(
337 LOCAL_ENTRY
338 ),
339
340 TP_fast_assign(
341 LOCAL_ASSIGN;
342 ),
343
344 TP_printk(
345 LOCAL_PR_FMT, LOCAL_PR_ARG
346 )
347);
348
349TRACE_EVENT(drv_sw_scan_complete,
350 TP_PROTO(struct ieee80211_local *local),
351
352 TP_ARGS(local),
353
354 TP_STRUCT__entry(
355 LOCAL_ENTRY
356 ),
357
358 TP_fast_assign(
359 LOCAL_ASSIGN;
360 ),
361
362 TP_printk(
363 LOCAL_PR_FMT, LOCAL_PR_ARG
364 )
365);
366
367TRACE_EVENT(drv_get_stats,
368 TP_PROTO(struct ieee80211_local *local,
369 struct ieee80211_low_level_stats *stats,
370 int ret),
371
372 TP_ARGS(local, stats, ret),
373
374 TP_STRUCT__entry(
375 LOCAL_ENTRY
376 __field(int, ret)
377 __field(unsigned int, ackfail)
378 __field(unsigned int, rtsfail)
379 __field(unsigned int, fcserr)
380 __field(unsigned int, rtssucc)
381 ),
382
383 TP_fast_assign(
384 LOCAL_ASSIGN;
385 __entry->ret = ret;
386 __entry->ackfail = stats->dot11ACKFailureCount;
387 __entry->rtsfail = stats->dot11RTSFailureCount;
388 __entry->fcserr = stats->dot11FCSErrorCount;
389 __entry->rtssucc = stats->dot11RTSSuccessCount;
390 ),
391
392 TP_printk(
393 LOCAL_PR_FMT " ret:%d",
394 LOCAL_PR_ARG, __entry->ret
395 )
396);
397
398TRACE_EVENT(drv_get_tkip_seq,
399 TP_PROTO(struct ieee80211_local *local,
400 u8 hw_key_idx, u32 *iv32, u16 *iv16),
401
402 TP_ARGS(local, hw_key_idx, iv32, iv16),
403
404 TP_STRUCT__entry(
405 LOCAL_ENTRY
406 __field(u8, hw_key_idx)
407 __field(u32, iv32)
408 __field(u16, iv16)
409 ),
410
411 TP_fast_assign(
412 LOCAL_ASSIGN;
413 __entry->hw_key_idx = hw_key_idx;
414 __entry->iv32 = *iv32;
415 __entry->iv16 = *iv16;
416 ),
417
418 TP_printk(
419 LOCAL_PR_FMT, LOCAL_PR_ARG
420 )
421);
422
423TRACE_EVENT(drv_set_rts_threshold,
424 TP_PROTO(struct ieee80211_local *local, u32 value, int ret),
425
426 TP_ARGS(local, value, ret),
427
428 TP_STRUCT__entry(
429 LOCAL_ENTRY
430 __field(u32, value)
431 __field(int, ret)
432 ),
433
434 TP_fast_assign(
435 LOCAL_ASSIGN;
436 __entry->ret = ret;
437 __entry->value = value;
438 ),
439
440 TP_printk(
441 LOCAL_PR_FMT " value:%d ret:%d",
442 LOCAL_PR_ARG, __entry->value, __entry->ret
443 )
444);
445
446TRACE_EVENT(drv_sta_notify,
447 TP_PROTO(struct ieee80211_local *local,
448 struct ieee80211_vif *vif,
449 enum sta_notify_cmd cmd,
450 struct ieee80211_sta *sta),
451
452 TP_ARGS(local, vif, cmd, sta),
453
454 TP_STRUCT__entry(
455 LOCAL_ENTRY
456 VIF_ENTRY
457 STA_ENTRY
458 __field(u32, cmd)
459 ),
460
461 TP_fast_assign(
462 LOCAL_ASSIGN;
463 VIF_ASSIGN;
464 STA_ASSIGN;
465 __entry->cmd = cmd;
466 ),
467
468 TP_printk(
469 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
470 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
471 )
472);
473
474TRACE_EVENT(drv_conf_tx,
475 TP_PROTO(struct ieee80211_local *local, u16 queue,
476 const struct ieee80211_tx_queue_params *params,
477 int ret),
478
479 TP_ARGS(local, queue, params, ret),
480
481 TP_STRUCT__entry(
482 LOCAL_ENTRY
483 __field(u16, queue)
484 __field(u16, txop)
485 __field(u16, cw_min)
486 __field(u16, cw_max)
487 __field(u8, aifs)
488 __field(int, ret)
489 ),
490
491 TP_fast_assign(
492 LOCAL_ASSIGN;
493 __entry->queue = queue;
494 __entry->ret = ret;
495 __entry->txop = params->txop;
496 __entry->cw_max = params->cw_max;
497 __entry->cw_min = params->cw_min;
498 __entry->aifs = params->aifs;
499 ),
500
501 TP_printk(
502 LOCAL_PR_FMT " queue:%d ret:%d",
503 LOCAL_PR_ARG, __entry->queue, __entry->ret
504 )
505);
506
507TRACE_EVENT(drv_get_tx_stats,
508 TP_PROTO(struct ieee80211_local *local,
509 struct ieee80211_tx_queue_stats *stats,
510 int ret),
511
512 TP_ARGS(local, stats, ret),
513
514 TP_STRUCT__entry(
515 LOCAL_ENTRY
516 __field(int, ret)
517 ),
518
519 TP_fast_assign(
520 LOCAL_ASSIGN;
521 __entry->ret = ret;
522 ),
523
524 TP_printk(
525 LOCAL_PR_FMT " ret:%d",
526 LOCAL_PR_ARG, __entry->ret
527 )
528);
529
530TRACE_EVENT(drv_get_tsf,
531 TP_PROTO(struct ieee80211_local *local, u64 ret),
532
533 TP_ARGS(local, ret),
534
535 TP_STRUCT__entry(
536 LOCAL_ENTRY
537 __field(u64, ret)
538 ),
539
540 TP_fast_assign(
541 LOCAL_ASSIGN;
542 __entry->ret = ret;
543 ),
544
545 TP_printk(
546 LOCAL_PR_FMT " ret:%llu",
547 LOCAL_PR_ARG, (unsigned long long)__entry->ret
548 )
549);
550
551TRACE_EVENT(drv_set_tsf,
552 TP_PROTO(struct ieee80211_local *local, u64 tsf),
553
554 TP_ARGS(local, tsf),
555
556 TP_STRUCT__entry(
557 LOCAL_ENTRY
558 __field(u64, tsf)
559 ),
560
561 TP_fast_assign(
562 LOCAL_ASSIGN;
563 __entry->tsf = tsf;
564 ),
565
566 TP_printk(
567 LOCAL_PR_FMT " tsf:%llu",
568 LOCAL_PR_ARG, (unsigned long long)__entry->tsf
569 )
570);
571
572TRACE_EVENT(drv_reset_tsf,
573 TP_PROTO(struct ieee80211_local *local),
574
575 TP_ARGS(local),
576
577 TP_STRUCT__entry(
578 LOCAL_ENTRY
579 ),
580
581 TP_fast_assign(
582 LOCAL_ASSIGN;
583 ),
584
585 TP_printk(
586 LOCAL_PR_FMT, LOCAL_PR_ARG
587 )
588);
589
590TRACE_EVENT(drv_tx_last_beacon,
591 TP_PROTO(struct ieee80211_local *local, int ret),
592
593 TP_ARGS(local, ret),
594
595 TP_STRUCT__entry(
596 LOCAL_ENTRY
597 __field(int, ret)
598 ),
599
600 TP_fast_assign(
601 LOCAL_ASSIGN;
602 __entry->ret = ret;
603 ),
604
605 TP_printk(
606 LOCAL_PR_FMT " ret:%d",
607 LOCAL_PR_ARG, __entry->ret
608 )
609);
610
611TRACE_EVENT(drv_ampdu_action,
612 TP_PROTO(struct ieee80211_local *local,
613 enum ieee80211_ampdu_mlme_action action,
614 struct ieee80211_sta *sta, u16 tid,
615 u16 *ssn, int ret),
616
617 TP_ARGS(local, action, sta, tid, ssn, ret),
618
619 TP_STRUCT__entry(
620 LOCAL_ENTRY
621 STA_ENTRY
622 __field(u32, action)
623 __field(u16, tid)
624 __field(u16, ssn)
625 __field(int, ret)
626 ),
627
628 TP_fast_assign(
629 LOCAL_ASSIGN;
630 STA_ASSIGN;
631 __entry->ret = ret;
632 __entry->action = action;
633 __entry->tid = tid;
634 __entry->ssn = *ssn;
635 ),
636
637 TP_printk(
638 LOCAL_PR_FMT STA_PR_FMT " action:%d tid:%d ret:%d",
639 LOCAL_PR_ARG, STA_PR_ARG, __entry->action, __entry->tid, __entry->ret
640 )
641);
642#endif /* __MAC80211_DRIVER_TRACE */
643
644#undef TRACE_INCLUDE_PATH
645#define TRACE_INCLUDE_PATH .
646#undef TRACE_INCLUDE_FILE
647#define TRACE_INCLUDE_FILE driver-trace
648#include <trace/define_trace.h>