blob: 629364705f7b193f210980217d18223a3683e474 [file] [log] [blame]
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001#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
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02008#undef TRACE_SYSTEM
9#define TRACE_SYSTEM mac80211
10
11#define MAXNAME 32
12#define LOCAL_ENTRY __array(char, wiphy_name, 32)
13#define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME)
14#define LOCAL_PR_FMT "%s"
15#define LOCAL_PR_ARG __entry->wiphy_name
16
17#define STA_ENTRY __array(char, sta_addr, ETH_ALEN)
18#define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN))
19#define STA_PR_FMT " sta:%pM"
20#define STA_PR_ARG __entry->sta_addr
21
Johannes Berg2ca27bc2010-09-16 14:58:23 +020022#define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
23 __field(bool, p2p) \
Johannes Berg12375ef2009-11-25 20:30:31 +010024 __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
Johannes Berg2ca27bc2010-09-16 14:58:23 +020025#define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
26 __entry->p2p = sdata->vif.p2p; \
Johannes Bergf142c6b2012-06-18 20:07:15 +020027 __assign_str(vif_name, sdata->dev ? sdata->dev->name : sdata->name)
Johannes Berg2ca27bc2010-09-16 14:58:23 +020028#define VIF_PR_FMT " vif:%s(%d%s)"
29#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020030
Michal Kaziorc3645ea2012-06-26 14:37:17 +020031#define CHANCTX_ENTRY __field(int, freq) \
Johannes Berg04ecd252012-09-11 14:34:12 +020032 __field(int, chantype) \
33 __field(u8, rx_chains_static) \
34 __field(u8, rx_chains_dynamic)
Michal Kaziorc3645ea2012-06-26 14:37:17 +020035#define CHANCTX_ASSIGN __entry->freq = ctx->conf.channel->center_freq; \
Johannes Berg04ecd252012-09-11 14:34:12 +020036 __entry->chantype = ctx->conf.channel_type; \
37 __entry->rx_chains_static = ctx->conf.rx_chains_static; \
38 __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic
39#define CHANCTX_PR_FMT " freq:%d MHz chantype:%d chains:%d/%d"
40#define CHANCTX_PR_ARG __entry->freq, __entry->chantype, \
41 __entry->rx_chains_static, __entry->rx_chains_dynamic
Michal Kaziorc3645ea2012-06-26 14:37:17 +020042
43
44
Johannes Bergb5878a22010-04-07 16:48:40 +020045/*
46 * Tracing for driver callbacks.
47 */
48
Johannes Bergba99d932011-01-26 09:22:15 +010049DECLARE_EVENT_CLASS(local_only_evt,
Johannes Berg4efc76b2010-06-10 10:56:20 +020050 TP_PROTO(struct ieee80211_local *local),
51 TP_ARGS(local),
52 TP_STRUCT__entry(
53 LOCAL_ENTRY
54 ),
55 TP_fast_assign(
56 LOCAL_ASSIGN;
57 ),
58 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
59);
60
Luciano Coelho92ddc112011-05-09 14:40:06 +030061DECLARE_EVENT_CLASS(local_sdata_addr_evt,
62 TP_PROTO(struct ieee80211_local *local,
63 struct ieee80211_sub_if_data *sdata),
64 TP_ARGS(local, sdata),
65
66 TP_STRUCT__entry(
67 LOCAL_ENTRY
68 VIF_ENTRY
69 __array(char, addr, 6)
70 ),
71
72 TP_fast_assign(
73 LOCAL_ASSIGN;
74 VIF_ASSIGN;
75 memcpy(__entry->addr, sdata->vif.addr, 6);
76 ),
77
78 TP_printk(
79 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
80 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
81 )
82);
83
84DECLARE_EVENT_CLASS(local_u32_evt,
85 TP_PROTO(struct ieee80211_local *local, u32 value),
86 TP_ARGS(local, value),
87
88 TP_STRUCT__entry(
89 LOCAL_ENTRY
90 __field(u32, value)
91 ),
92
93 TP_fast_assign(
94 LOCAL_ASSIGN;
95 __entry->value = value;
96 ),
97
98 TP_printk(
99 LOCAL_PR_FMT " value:%d",
100 LOCAL_PR_ARG, __entry->value
101 )
102);
103
Luciano Coelho79f460c2011-05-11 17:09:36 +0300104DECLARE_EVENT_CLASS(local_sdata_evt,
105 TP_PROTO(struct ieee80211_local *local,
106 struct ieee80211_sub_if_data *sdata),
107 TP_ARGS(local, sdata),
108
109 TP_STRUCT__entry(
110 LOCAL_ENTRY
111 VIF_ENTRY
112 ),
113
114 TP_fast_assign(
115 LOCAL_ASSIGN;
116 VIF_ASSIGN;
117 ),
118
119 TP_printk(
120 LOCAL_PR_FMT VIF_PR_FMT,
121 LOCAL_PR_ARG, VIF_PR_ARG
122 )
123);
124
Johannes Bergba99d932011-01-26 09:22:15 +0100125DEFINE_EVENT(local_only_evt, drv_return_void,
126 TP_PROTO(struct ieee80211_local *local),
127 TP_ARGS(local)
128);
129
Johannes Berg4efc76b2010-06-10 10:56:20 +0200130TRACE_EVENT(drv_return_int,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200131 TP_PROTO(struct ieee80211_local *local, int ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200132 TP_ARGS(local, ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200133 TP_STRUCT__entry(
134 LOCAL_ENTRY
135 __field(int, ret)
136 ),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200137 TP_fast_assign(
138 LOCAL_ASSIGN;
139 __entry->ret = ret;
140 ),
Johannes Berg4efc76b2010-06-10 10:56:20 +0200141 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
142);
143
Vivek Natarajane8306f92011-04-06 11:41:10 +0530144TRACE_EVENT(drv_return_bool,
145 TP_PROTO(struct ieee80211_local *local, bool ret),
146 TP_ARGS(local, ret),
147 TP_STRUCT__entry(
148 LOCAL_ENTRY
149 __field(bool, ret)
150 ),
151 TP_fast_assign(
152 LOCAL_ASSIGN;
153 __entry->ret = ret;
154 ),
155 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
156 "true" : "false")
157);
158
Johannes Berg4efc76b2010-06-10 10:56:20 +0200159TRACE_EVENT(drv_return_u64,
160 TP_PROTO(struct ieee80211_local *local, u64 ret),
161 TP_ARGS(local, ret),
162 TP_STRUCT__entry(
163 LOCAL_ENTRY
164 __field(u64, ret)
165 ),
166 TP_fast_assign(
167 LOCAL_ASSIGN;
168 __entry->ret = ret;
169 ),
170 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
171);
172
Johannes Bergba99d932011-01-26 09:22:15 +0100173DEFINE_EVENT(local_only_evt, drv_start,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200174 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100175 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200176);
177
Ben Greeare3521142012-04-23 12:50:31 -0700178DEFINE_EVENT(local_u32_evt, drv_get_et_strings,
179 TP_PROTO(struct ieee80211_local *local, u32 sset),
180 TP_ARGS(local, sset)
181);
182
183DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count,
184 TP_PROTO(struct ieee80211_local *local, u32 sset),
185 TP_ARGS(local, sset)
186);
187
188DEFINE_EVENT(local_only_evt, drv_get_et_stats,
189 TP_PROTO(struct ieee80211_local *local),
190 TP_ARGS(local)
191);
192
Johannes Bergeecc4802011-05-04 15:37:29 +0200193DEFINE_EVENT(local_only_evt, drv_suspend,
194 TP_PROTO(struct ieee80211_local *local),
195 TP_ARGS(local)
196);
197
198DEFINE_EVENT(local_only_evt, drv_resume,
199 TP_PROTO(struct ieee80211_local *local),
200 TP_ARGS(local)
201);
202
Johannes Berg6d525632012-04-04 15:05:25 +0200203TRACE_EVENT(drv_set_wakeup,
204 TP_PROTO(struct ieee80211_local *local, bool enabled),
205 TP_ARGS(local, enabled),
206 TP_STRUCT__entry(
207 LOCAL_ENTRY
208 __field(bool, enabled)
209 ),
210 TP_fast_assign(
211 LOCAL_ASSIGN;
212 __entry->enabled = enabled;
213 ),
214 TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
215);
216
Johannes Bergba99d932011-01-26 09:22:15 +0100217DEFINE_EVENT(local_only_evt, drv_stop,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200218 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100219 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200220);
221
Luciano Coelho92ddc112011-05-09 14:40:06 +0300222DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200223 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200224 struct ieee80211_sub_if_data *sdata),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300225 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200226);
227
Johannes Berg34d4bc42010-08-27 12:35:58 +0200228TRACE_EVENT(drv_change_interface,
229 TP_PROTO(struct ieee80211_local *local,
230 struct ieee80211_sub_if_data *sdata,
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200231 enum nl80211_iftype type, bool p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200232
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200233 TP_ARGS(local, sdata, type, p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200234
235 TP_STRUCT__entry(
236 LOCAL_ENTRY
237 VIF_ENTRY
238 __field(u32, new_type)
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200239 __field(bool, new_p2p)
Johannes Berg34d4bc42010-08-27 12:35:58 +0200240 ),
241
242 TP_fast_assign(
243 LOCAL_ASSIGN;
244 VIF_ASSIGN;
245 __entry->new_type = type;
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200246 __entry->new_p2p = p2p;
Johannes Berg34d4bc42010-08-27 12:35:58 +0200247 ),
248
249 TP_printk(
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200250 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
251 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
252 __entry->new_p2p ? "/p2p" : ""
Johannes Berg34d4bc42010-08-27 12:35:58 +0200253 )
254);
255
Luciano Coelho92ddc112011-05-09 14:40:06 +0300256DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
257 TP_PROTO(struct ieee80211_local *local,
258 struct ieee80211_sub_if_data *sdata),
259 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200260);
261
262TRACE_EVENT(drv_config,
263 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200264 u32 changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200265
Johannes Berg4efc76b2010-06-10 10:56:20 +0200266 TP_ARGS(local, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200267
268 TP_STRUCT__entry(
269 LOCAL_ENTRY
270 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100271 __field(u32, flags)
272 __field(int, power_level)
273 __field(int, dynamic_ps_timeout)
274 __field(int, max_sleep_period)
275 __field(u16, listen_interval)
276 __field(u8, long_frame_max_tx_count)
277 __field(u8, short_frame_max_tx_count)
278 __field(int, center_freq)
279 __field(int, channel_type)
Johannes Berg0f782312009-12-01 13:37:02 +0100280 __field(int, smps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200281 ),
282
283 TP_fast_assign(
284 LOCAL_ASSIGN;
285 __entry->changed = changed;
Johannes Bergf911ab82009-11-25 19:07:20 +0100286 __entry->flags = local->hw.conf.flags;
287 __entry->power_level = local->hw.conf.power_level;
288 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
289 __entry->max_sleep_period = local->hw.conf.max_sleep_period;
290 __entry->listen_interval = local->hw.conf.listen_interval;
Johannes Berg3d01be72012-07-26 14:27:39 +0200291 __entry->long_frame_max_tx_count =
292 local->hw.conf.long_frame_max_tx_count;
293 __entry->short_frame_max_tx_count =
294 local->hw.conf.short_frame_max_tx_count;
295 __entry->center_freq = local->hw.conf.channel ?
296 local->hw.conf.channel->center_freq : 0;
Johannes Bergf911ab82009-11-25 19:07:20 +0100297 __entry->channel_type = local->hw.conf.channel_type;
Johannes Berg0f782312009-12-01 13:37:02 +0100298 __entry->smps = local->hw.conf.smps_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200299 ),
300
301 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200302 LOCAL_PR_FMT " ch:%#x freq:%d",
303 LOCAL_PR_ARG, __entry->changed, __entry->center_freq
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200304 )
305);
306
307TRACE_EVENT(drv_bss_info_changed,
308 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100309 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200310 struct ieee80211_bss_conf *info,
311 u32 changed),
312
Johannes Berg12375ef2009-11-25 20:30:31 +0100313 TP_ARGS(local, sdata, info, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200314
315 TP_STRUCT__entry(
316 LOCAL_ENTRY
317 VIF_ENTRY
318 __field(bool, assoc)
319 __field(u16, aid)
320 __field(bool, cts)
321 __field(bool, shortpre)
322 __field(bool, shortslot)
323 __field(u8, dtimper)
324 __field(u16, bcnint)
325 __field(u16, assoc_cap)
Johannes Berg8c358bc2012-05-22 22:13:05 +0200326 __field(u64, sync_tsf)
327 __field(u32, sync_device_ts)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200328 __field(u32, basic_rates)
329 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100330 __field(bool, enable_beacon)
331 __field(u16, ht_operation_mode)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200332 ),
333
334 TP_fast_assign(
335 LOCAL_ASSIGN;
336 VIF_ASSIGN;
337 __entry->changed = changed;
338 __entry->aid = info->aid;
339 __entry->assoc = info->assoc;
340 __entry->shortpre = info->use_short_preamble;
341 __entry->cts = info->use_cts_prot;
342 __entry->shortslot = info->use_short_slot;
343 __entry->dtimper = info->dtim_period;
344 __entry->bcnint = info->beacon_int;
345 __entry->assoc_cap = info->assoc_capability;
Johannes Berg8c358bc2012-05-22 22:13:05 +0200346 __entry->sync_tsf = info->sync_tsf;
347 __entry->sync_device_ts = info->sync_device_ts;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200348 __entry->basic_rates = info->basic_rates;
Johannes Bergf911ab82009-11-25 19:07:20 +0100349 __entry->enable_beacon = info->enable_beacon;
350 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200351 ),
352
353 TP_printk(
354 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
355 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
356 )
357);
358
Johannes Berg3ac64be2009-08-17 16:16:53 +0200359TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200360 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200361
Johannes Berg4efc76b2010-06-10 10:56:20 +0200362 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200363
364 TP_STRUCT__entry(
365 LOCAL_ENTRY
366 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200367 ),
368
369 TP_fast_assign(
370 LOCAL_ASSIGN;
371 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200372 ),
373
374 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200375 LOCAL_PR_FMT " prepare mc (%d)",
376 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200377 )
378);
379
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200380TRACE_EVENT(drv_configure_filter,
381 TP_PROTO(struct ieee80211_local *local,
382 unsigned int changed_flags,
383 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200384 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200385
Johannes Berg3ac64be2009-08-17 16:16:53 +0200386 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200387
388 TP_STRUCT__entry(
389 LOCAL_ENTRY
390 __field(unsigned int, changed)
391 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200392 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200393 ),
394
395 TP_fast_assign(
396 LOCAL_ASSIGN;
397 __entry->changed = changed_flags;
398 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200399 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200400 ),
401
402 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200403 LOCAL_PR_FMT " changed:%#x total:%#x",
404 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200405 )
406);
407
408TRACE_EVENT(drv_set_tim,
409 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200410 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200411
Johannes Berg4efc76b2010-06-10 10:56:20 +0200412 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200413
414 TP_STRUCT__entry(
415 LOCAL_ENTRY
416 STA_ENTRY
417 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200418 ),
419
420 TP_fast_assign(
421 LOCAL_ASSIGN;
422 STA_ASSIGN;
423 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200424 ),
425
426 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200427 LOCAL_PR_FMT STA_PR_FMT " set:%d",
428 LOCAL_PR_ARG, STA_PR_FMT, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200429 )
430);
431
432TRACE_EVENT(drv_set_key,
433 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100434 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200435 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200436 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200437
Johannes Berg4efc76b2010-06-10 10:56:20 +0200438 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200439
440 TP_STRUCT__entry(
441 LOCAL_ENTRY
442 VIF_ENTRY
443 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200444 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200445 __field(u8, hw_key_idx)
446 __field(u8, flags)
447 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200448 ),
449
450 TP_fast_assign(
451 LOCAL_ASSIGN;
452 VIF_ASSIGN;
453 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200454 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200455 __entry->flags = key->flags;
456 __entry->keyidx = key->keyidx;
457 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200458 ),
459
460 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200461 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
462 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200463 )
464);
465
466TRACE_EVENT(drv_update_tkip_key,
467 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100468 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200469 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100470 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200471
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100472 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200473
474 TP_STRUCT__entry(
475 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100476 VIF_ENTRY
477 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200478 __field(u32, iv32)
479 ),
480
481 TP_fast_assign(
482 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100483 VIF_ASSIGN;
484 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200485 __entry->iv32 = iv32;
486 ),
487
488 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100489 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
490 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200491 )
492);
493
Luciano Coelho79f460c2011-05-11 17:09:36 +0300494DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200495 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300496 struct ieee80211_sub_if_data *sdata),
497 TP_ARGS(local, sdata)
498);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200499
Eliad Pellerb8564392011-06-13 12:47:30 +0300500DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
501 TP_PROTO(struct ieee80211_local *local,
502 struct ieee80211_sub_if_data *sdata),
503 TP_ARGS(local, sdata)
504);
505
Luciano Coelho79f460c2011-05-11 17:09:36 +0300506DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
507 TP_PROTO(struct ieee80211_local *local,
508 struct ieee80211_sub_if_data *sdata),
509 TP_ARGS(local, sdata)
510);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200511
Luciano Coelho79f460c2011-05-11 17:09:36 +0300512DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
513 TP_PROTO(struct ieee80211_local *local,
514 struct ieee80211_sub_if_data *sdata),
515 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200516);
517
Johannes Bergba99d932011-01-26 09:22:15 +0100518DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200519 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100520 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200521);
522
Johannes Bergba99d932011-01-26 09:22:15 +0100523DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200524 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100525 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200526);
527
528TRACE_EVENT(drv_get_stats,
529 TP_PROTO(struct ieee80211_local *local,
530 struct ieee80211_low_level_stats *stats,
531 int ret),
532
533 TP_ARGS(local, stats, ret),
534
535 TP_STRUCT__entry(
536 LOCAL_ENTRY
537 __field(int, ret)
538 __field(unsigned int, ackfail)
539 __field(unsigned int, rtsfail)
540 __field(unsigned int, fcserr)
541 __field(unsigned int, rtssucc)
542 ),
543
544 TP_fast_assign(
545 LOCAL_ASSIGN;
546 __entry->ret = ret;
547 __entry->ackfail = stats->dot11ACKFailureCount;
548 __entry->rtsfail = stats->dot11RTSFailureCount;
549 __entry->fcserr = stats->dot11FCSErrorCount;
550 __entry->rtssucc = stats->dot11RTSSuccessCount;
551 ),
552
553 TP_printk(
554 LOCAL_PR_FMT " ret:%d",
555 LOCAL_PR_ARG, __entry->ret
556 )
557);
558
559TRACE_EVENT(drv_get_tkip_seq,
560 TP_PROTO(struct ieee80211_local *local,
561 u8 hw_key_idx, u32 *iv32, u16 *iv16),
562
563 TP_ARGS(local, hw_key_idx, iv32, iv16),
564
565 TP_STRUCT__entry(
566 LOCAL_ENTRY
567 __field(u8, hw_key_idx)
568 __field(u32, iv32)
569 __field(u16, iv16)
570 ),
571
572 TP_fast_assign(
573 LOCAL_ASSIGN;
574 __entry->hw_key_idx = hw_key_idx;
575 __entry->iv32 = *iv32;
576 __entry->iv16 = *iv16;
577 ),
578
579 TP_printk(
580 LOCAL_PR_FMT, LOCAL_PR_ARG
581 )
582);
583
Luciano Coelho92ddc112011-05-09 14:40:06 +0300584DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200585 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300586 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200587);
588
Luciano Coelho92ddc112011-05-09 14:40:06 +0300589DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200590 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300591 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200592);
593
Lukáš Turek310bc672009-12-21 22:50:48 +0100594TRACE_EVENT(drv_set_coverage_class,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200595 TP_PROTO(struct ieee80211_local *local, u8 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100596
Johannes Berg4efc76b2010-06-10 10:56:20 +0200597 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100598
599 TP_STRUCT__entry(
600 LOCAL_ENTRY
601 __field(u8, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100602 ),
603
604 TP_fast_assign(
605 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100606 __entry->value = value;
607 ),
608
609 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200610 LOCAL_PR_FMT " value:%d",
611 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100612 )
613);
614
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200615TRACE_EVENT(drv_sta_notify,
616 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100617 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200618 enum sta_notify_cmd cmd,
619 struct ieee80211_sta *sta),
620
Johannes Berg12375ef2009-11-25 20:30:31 +0100621 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200622
623 TP_STRUCT__entry(
624 LOCAL_ENTRY
625 VIF_ENTRY
626 STA_ENTRY
627 __field(u32, cmd)
628 ),
629
630 TP_fast_assign(
631 LOCAL_ASSIGN;
632 VIF_ASSIGN;
633 STA_ASSIGN;
634 __entry->cmd = cmd;
635 ),
636
637 TP_printk(
638 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
639 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
640 )
641);
642
Johannes Bergf09603a2012-01-20 13:55:21 +0100643TRACE_EVENT(drv_sta_state,
644 TP_PROTO(struct ieee80211_local *local,
645 struct ieee80211_sub_if_data *sdata,
646 struct ieee80211_sta *sta,
647 enum ieee80211_sta_state old_state,
648 enum ieee80211_sta_state new_state),
649
650 TP_ARGS(local, sdata, sta, old_state, new_state),
651
652 TP_STRUCT__entry(
653 LOCAL_ENTRY
654 VIF_ENTRY
655 STA_ENTRY
656 __field(u32, old_state)
657 __field(u32, new_state)
658 ),
659
660 TP_fast_assign(
661 LOCAL_ASSIGN;
662 VIF_ASSIGN;
663 STA_ASSIGN;
664 __entry->old_state = old_state;
665 __entry->new_state = new_state;
666 ),
667
668 TP_printk(
669 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
670 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
671 __entry->old_state, __entry->new_state
672 )
673);
674
Johannes Berg8f727ef2012-03-30 08:43:32 +0200675TRACE_EVENT(drv_sta_rc_update,
676 TP_PROTO(struct ieee80211_local *local,
677 struct ieee80211_sub_if_data *sdata,
678 struct ieee80211_sta *sta,
679 u32 changed),
680
681 TP_ARGS(local, sdata, sta, changed),
682
683 TP_STRUCT__entry(
684 LOCAL_ENTRY
685 VIF_ENTRY
686 STA_ENTRY
687 __field(u32, changed)
688 ),
689
690 TP_fast_assign(
691 LOCAL_ASSIGN;
692 VIF_ASSIGN;
693 STA_ASSIGN;
694 __entry->changed = changed;
695 ),
696
697 TP_printk(
698 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
699 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
700 )
701);
702
Johannes Berg34e89502010-02-03 13:59:58 +0100703TRACE_EVENT(drv_sta_add,
704 TP_PROTO(struct ieee80211_local *local,
705 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200706 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100707
Johannes Berg4efc76b2010-06-10 10:56:20 +0200708 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100709
710 TP_STRUCT__entry(
711 LOCAL_ENTRY
712 VIF_ENTRY
713 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100714 ),
715
716 TP_fast_assign(
717 LOCAL_ASSIGN;
718 VIF_ASSIGN;
719 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100720 ),
721
722 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200723 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
724 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100725 )
726);
727
728TRACE_EVENT(drv_sta_remove,
729 TP_PROTO(struct ieee80211_local *local,
730 struct ieee80211_sub_if_data *sdata,
731 struct ieee80211_sta *sta),
732
733 TP_ARGS(local, sdata, sta),
734
735 TP_STRUCT__entry(
736 LOCAL_ENTRY
737 VIF_ENTRY
738 STA_ENTRY
739 ),
740
741 TP_fast_assign(
742 LOCAL_ASSIGN;
743 VIF_ASSIGN;
744 STA_ASSIGN;
745 ),
746
747 TP_printk(
748 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
749 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
750 )
751);
752
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200753TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300754 TP_PROTO(struct ieee80211_local *local,
755 struct ieee80211_sub_if_data *sdata,
Johannes Berga3304b02012-03-28 11:04:24 +0200756 u16 ac, const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200757
Johannes Berga3304b02012-03-28 11:04:24 +0200758 TP_ARGS(local, sdata, ac, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200759
760 TP_STRUCT__entry(
761 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300762 VIF_ENTRY
Johannes Berga3304b02012-03-28 11:04:24 +0200763 __field(u16, ac)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200764 __field(u16, txop)
765 __field(u16, cw_min)
766 __field(u16, cw_max)
767 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300768 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200769 ),
770
771 TP_fast_assign(
772 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300773 VIF_ASSIGN;
Johannes Berga3304b02012-03-28 11:04:24 +0200774 __entry->ac = ac;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200775 __entry->txop = params->txop;
776 __entry->cw_max = params->cw_max;
777 __entry->cw_min = params->cw_min;
778 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300779 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200780 ),
781
782 TP_printk(
Johannes Berga3304b02012-03-28 11:04:24 +0200783 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
784 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200785 )
786);
787
Eliad Peller37a41b42011-09-21 14:06:11 +0300788DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
789 TP_PROTO(struct ieee80211_local *local,
790 struct ieee80211_sub_if_data *sdata),
791 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200792);
793
794TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +0300795 TP_PROTO(struct ieee80211_local *local,
796 struct ieee80211_sub_if_data *sdata,
797 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200798
Eliad Peller37a41b42011-09-21 14:06:11 +0300799 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200800
801 TP_STRUCT__entry(
802 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +0300803 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200804 __field(u64, tsf)
805 ),
806
807 TP_fast_assign(
808 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +0300809 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200810 __entry->tsf = tsf;
811 ),
812
813 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +0300814 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
815 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200816 )
817);
818
Eliad Peller37a41b42011-09-21 14:06:11 +0300819DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
820 TP_PROTO(struct ieee80211_local *local,
821 struct ieee80211_sub_if_data *sdata),
822 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200823);
824
Johannes Bergba99d932011-01-26 09:22:15 +0100825DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200826 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100827 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200828);
829
830TRACE_EVENT(drv_ampdu_action,
831 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100832 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200833 enum ieee80211_ampdu_mlme_action action,
834 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100835 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200836
Johannes Berg0b01f032011-01-18 13:51:05 +0100837 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200838
839 TP_STRUCT__entry(
840 LOCAL_ENTRY
841 STA_ENTRY
842 __field(u32, action)
843 __field(u16, tid)
844 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100845 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100846 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200847 ),
848
849 TP_fast_assign(
850 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100851 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200852 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200853 __entry->action = action;
854 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800855 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100856 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200857 ),
858
859 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100860 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
861 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
862 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200863 )
864);
Johannes Berga80f7c02009-12-23 13:15:32 +0100865
John W. Linvillec466d4e2010-06-29 14:51:23 -0400866TRACE_EVENT(drv_get_survey,
867 TP_PROTO(struct ieee80211_local *local, int idx,
868 struct survey_info *survey),
869
870 TP_ARGS(local, idx, survey),
871
872 TP_STRUCT__entry(
873 LOCAL_ENTRY
874 __field(int, idx)
875 ),
876
877 TP_fast_assign(
878 LOCAL_ASSIGN;
879 __entry->idx = idx;
880 ),
881
882 TP_printk(
883 LOCAL_PR_FMT " idx:%d",
884 LOCAL_PR_ARG, __entry->idx
885 )
886);
887
Johannes Berga80f7c02009-12-23 13:15:32 +0100888TRACE_EVENT(drv_flush,
889 TP_PROTO(struct ieee80211_local *local, bool drop),
890
891 TP_ARGS(local, drop),
892
893 TP_STRUCT__entry(
894 LOCAL_ENTRY
895 __field(bool, drop)
896 ),
897
898 TP_fast_assign(
899 LOCAL_ASSIGN;
900 __entry->drop = drop;
901 ),
902
903 TP_printk(
904 LOCAL_PR_FMT " drop:%d",
905 LOCAL_PR_ARG, __entry->drop
906 )
907);
Johannes Bergb5878a22010-04-07 16:48:40 +0200908
Johannes Berg5ce6e432010-05-11 16:20:57 +0200909TRACE_EVENT(drv_channel_switch,
910 TP_PROTO(struct ieee80211_local *local,
911 struct ieee80211_channel_switch *ch_switch),
912
913 TP_ARGS(local, ch_switch),
914
915 TP_STRUCT__entry(
916 LOCAL_ENTRY
917 __field(u64, timestamp)
918 __field(bool, block_tx)
919 __field(u16, freq)
920 __field(u8, count)
921 ),
922
923 TP_fast_assign(
924 LOCAL_ASSIGN;
925 __entry->timestamp = ch_switch->timestamp;
926 __entry->block_tx = ch_switch->block_tx;
927 __entry->freq = ch_switch->channel->center_freq;
928 __entry->count = ch_switch->count;
929 ),
930
931 TP_printk(
932 LOCAL_PR_FMT " new freq:%u count:%d",
933 LOCAL_PR_ARG, __entry->freq, __entry->count
934 )
935);
936
Bruno Randolf15d96752010-11-10 12:50:56 +0900937TRACE_EVENT(drv_set_antenna,
938 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
939
940 TP_ARGS(local, tx_ant, rx_ant, ret),
941
942 TP_STRUCT__entry(
943 LOCAL_ENTRY
944 __field(u32, tx_ant)
945 __field(u32, rx_ant)
946 __field(int, ret)
947 ),
948
949 TP_fast_assign(
950 LOCAL_ASSIGN;
951 __entry->tx_ant = tx_ant;
952 __entry->rx_ant = rx_ant;
953 __entry->ret = ret;
954 ),
955
956 TP_printk(
957 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
958 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
959 )
960);
961
962TRACE_EVENT(drv_get_antenna,
963 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
964
965 TP_ARGS(local, tx_ant, rx_ant, ret),
966
967 TP_STRUCT__entry(
968 LOCAL_ENTRY
969 __field(u32, tx_ant)
970 __field(u32, rx_ant)
971 __field(int, ret)
972 ),
973
974 TP_fast_assign(
975 LOCAL_ASSIGN;
976 __entry->tx_ant = tx_ant;
977 __entry->rx_ant = rx_ant;
978 __entry->ret = ret;
979 ),
980
981 TP_printk(
982 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
983 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
984 )
985);
986
Johannes Berg21f83582010-12-18 17:20:47 +0100987TRACE_EVENT(drv_remain_on_channel,
988 TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
989 enum nl80211_channel_type chantype, unsigned int duration),
990
991 TP_ARGS(local, chan, chantype, duration),
992
993 TP_STRUCT__entry(
994 LOCAL_ENTRY
995 __field(int, center_freq)
996 __field(int, channel_type)
997 __field(unsigned int, duration)
998 ),
999
1000 TP_fast_assign(
1001 LOCAL_ASSIGN;
1002 __entry->center_freq = chan->center_freq;
1003 __entry->channel_type = chantype;
1004 __entry->duration = duration;
1005 ),
1006
1007 TP_printk(
1008 LOCAL_PR_FMT " freq:%dMHz duration:%dms",
1009 LOCAL_PR_ARG, __entry->center_freq, __entry->duration
1010 )
1011);
1012
Johannes Bergba99d932011-01-26 09:22:15 +01001013DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001014 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001015 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001016);
1017
Johannes Berg5f16a432011-02-25 15:36:57 +01001018TRACE_EVENT(drv_offchannel_tx,
1019 TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
1020 struct ieee80211_channel *chan,
1021 enum nl80211_channel_type channel_type,
1022 unsigned int wait),
1023
1024 TP_ARGS(local, skb, chan, channel_type, wait),
1025
1026 TP_STRUCT__entry(
1027 LOCAL_ENTRY
1028 __field(int, center_freq)
1029 __field(int, channel_type)
1030 __field(unsigned int, wait)
1031 ),
1032
1033 TP_fast_assign(
1034 LOCAL_ASSIGN;
1035 __entry->center_freq = chan->center_freq;
1036 __entry->channel_type = channel_type;
1037 __entry->wait = wait;
1038 ),
1039
1040 TP_printk(
1041 LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
1042 LOCAL_PR_ARG, __entry->center_freq, __entry->wait
1043 )
1044);
1045
John W. Linville38c09152011-03-07 16:19:18 -05001046TRACE_EVENT(drv_set_ringparam,
1047 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1048
1049 TP_ARGS(local, tx, rx),
1050
1051 TP_STRUCT__entry(
1052 LOCAL_ENTRY
1053 __field(u32, tx)
1054 __field(u32, rx)
1055 ),
1056
1057 TP_fast_assign(
1058 LOCAL_ASSIGN;
1059 __entry->tx = tx;
1060 __entry->rx = rx;
1061 ),
1062
1063 TP_printk(
1064 LOCAL_PR_FMT " tx:%d rx %d",
1065 LOCAL_PR_ARG, __entry->tx, __entry->rx
1066 )
1067);
1068
1069TRACE_EVENT(drv_get_ringparam,
1070 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1071 u32 *rx, u32 *rx_max),
1072
1073 TP_ARGS(local, tx, tx_max, rx, rx_max),
1074
1075 TP_STRUCT__entry(
1076 LOCAL_ENTRY
1077 __field(u32, tx)
1078 __field(u32, tx_max)
1079 __field(u32, rx)
1080 __field(u32, rx_max)
1081 ),
1082
1083 TP_fast_assign(
1084 LOCAL_ASSIGN;
1085 __entry->tx = *tx;
1086 __entry->tx_max = *tx_max;
1087 __entry->rx = *rx;
1088 __entry->rx_max = *rx_max;
1089 ),
1090
1091 TP_printk(
1092 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1093 LOCAL_PR_ARG,
1094 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1095 )
1096);
1097
Vivek Natarajane8306f92011-04-06 11:41:10 +05301098DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1099 TP_PROTO(struct ieee80211_local *local),
1100 TP_ARGS(local)
1101);
1102
Johannes Berg5f16a432011-02-25 15:36:57 +01001103DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1104 TP_PROTO(struct ieee80211_local *local),
1105 TP_ARGS(local)
1106);
1107
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301108TRACE_EVENT(drv_set_bitrate_mask,
1109 TP_PROTO(struct ieee80211_local *local,
1110 struct ieee80211_sub_if_data *sdata,
1111 const struct cfg80211_bitrate_mask *mask),
1112
1113 TP_ARGS(local, sdata, mask),
1114
1115 TP_STRUCT__entry(
1116 LOCAL_ENTRY
1117 VIF_ENTRY
1118 __field(u32, legacy_2g)
1119 __field(u32, legacy_5g)
1120 ),
1121
1122 TP_fast_assign(
1123 LOCAL_ASSIGN;
1124 VIF_ASSIGN;
1125 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1126 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1127 ),
1128
1129 TP_printk(
1130 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1131 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1132 )
1133);
1134
Johannes Bergc68f4b82011-07-05 16:35:41 +02001135TRACE_EVENT(drv_set_rekey_data,
1136 TP_PROTO(struct ieee80211_local *local,
1137 struct ieee80211_sub_if_data *sdata,
1138 struct cfg80211_gtk_rekey_data *data),
1139
1140 TP_ARGS(local, sdata, data),
1141
1142 TP_STRUCT__entry(
1143 LOCAL_ENTRY
1144 VIF_ENTRY
1145 __array(u8, kek, NL80211_KEK_LEN)
1146 __array(u8, kck, NL80211_KCK_LEN)
1147 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1148 ),
1149
1150 TP_fast_assign(
1151 LOCAL_ASSIGN;
1152 VIF_ASSIGN;
1153 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1154 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1155 memcpy(__entry->replay_ctr, data->replay_ctr,
1156 NL80211_REPLAY_CTR_LEN);
1157 ),
1158
1159 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1160 LOCAL_PR_ARG, VIF_PR_ARG)
1161);
1162
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001163TRACE_EVENT(drv_rssi_callback,
1164 TP_PROTO(struct ieee80211_local *local,
1165 enum ieee80211_rssi_event rssi_event),
1166
1167 TP_ARGS(local, rssi_event),
1168
1169 TP_STRUCT__entry(
1170 LOCAL_ENTRY
1171 __field(u32, rssi_event)
1172 ),
1173
1174 TP_fast_assign(
1175 LOCAL_ASSIGN;
1176 __entry->rssi_event = rssi_event;
1177 ),
1178
1179 TP_printk(
1180 LOCAL_PR_FMT " rssi_event:%d",
1181 LOCAL_PR_ARG, __entry->rssi_event
1182 )
1183);
1184
Johannes Berg40b96402011-09-29 16:04:38 +02001185DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001186 TP_PROTO(struct ieee80211_local *local,
1187 struct ieee80211_sta *sta,
1188 u16 tids, int num_frames,
1189 enum ieee80211_frame_release_type reason,
1190 bool more_data),
1191
1192 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1193
1194 TP_STRUCT__entry(
1195 LOCAL_ENTRY
1196 STA_ENTRY
1197 __field(u16, tids)
1198 __field(int, num_frames)
1199 __field(int, reason)
1200 __field(bool, more_data)
1201 ),
1202
1203 TP_fast_assign(
1204 LOCAL_ASSIGN;
1205 STA_ASSIGN;
1206 __entry->tids = tids;
1207 __entry->num_frames = num_frames;
1208 __entry->reason = reason;
1209 __entry->more_data = more_data;
1210 ),
1211
1212 TP_printk(
1213 LOCAL_PR_FMT STA_PR_FMT
1214 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1215 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1216 __entry->reason, __entry->more_data
1217 )
1218);
1219
Johannes Berg40b96402011-09-29 16:04:38 +02001220DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1221 TP_PROTO(struct ieee80211_local *local,
1222 struct ieee80211_sta *sta,
1223 u16 tids, int num_frames,
1224 enum ieee80211_frame_release_type reason,
1225 bool more_data),
1226
1227 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1228);
1229
1230DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1231 TP_PROTO(struct ieee80211_local *local,
1232 struct ieee80211_sta *sta,
1233 u16 tids, int num_frames,
1234 enum ieee80211_frame_release_type reason,
1235 bool more_data),
1236
1237 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1238);
1239
Victor Goldenshtein66572cf2012-06-21 10:56:46 +03001240TRACE_EVENT(drv_get_rssi,
1241 TP_PROTO(struct ieee80211_local *local, struct ieee80211_sta *sta,
1242 s8 rssi, int ret),
1243
1244 TP_ARGS(local, sta, rssi, ret),
1245
1246 TP_STRUCT__entry(
1247 LOCAL_ENTRY
1248 STA_ENTRY
1249 __field(s8, rssi)
1250 __field(int, ret)
1251 ),
1252
1253 TP_fast_assign(
1254 LOCAL_ASSIGN;
1255 STA_ASSIGN;
1256 __entry->rssi = rssi;
1257 __entry->ret = ret;
1258 ),
1259
1260 TP_printk(
1261 LOCAL_PR_FMT STA_PR_FMT " rssi:%d ret:%d",
1262 LOCAL_PR_ARG, STA_PR_ARG, __entry->rssi, __entry->ret
1263 )
1264);
1265
Johannes Berga1845fc2012-06-27 13:18:36 +02001266DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
1267 TP_PROTO(struct ieee80211_local *local,
1268 struct ieee80211_sub_if_data *sdata),
1269
1270 TP_ARGS(local, sdata)
1271);
1272
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001273DECLARE_EVENT_CLASS(local_chanctx,
1274 TP_PROTO(struct ieee80211_local *local,
1275 struct ieee80211_chanctx *ctx),
1276
1277 TP_ARGS(local, ctx),
1278
1279 TP_STRUCT__entry(
1280 LOCAL_ENTRY
1281 CHANCTX_ENTRY
1282 ),
1283
1284 TP_fast_assign(
1285 LOCAL_ASSIGN;
1286 CHANCTX_ASSIGN;
1287 ),
1288
1289 TP_printk(
1290 LOCAL_PR_FMT CHANCTX_PR_FMT,
1291 LOCAL_PR_ARG, CHANCTX_PR_ARG
1292 )
1293);
1294
1295DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1296 TP_PROTO(struct ieee80211_local *local,
1297 struct ieee80211_chanctx *ctx),
1298 TP_ARGS(local, ctx)
1299);
1300
1301DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1302 TP_PROTO(struct ieee80211_local *local,
1303 struct ieee80211_chanctx *ctx),
1304 TP_ARGS(local, ctx)
1305);
1306
1307TRACE_EVENT(drv_change_chanctx,
1308 TP_PROTO(struct ieee80211_local *local,
1309 struct ieee80211_chanctx *ctx,
1310 u32 changed),
1311
1312 TP_ARGS(local, ctx, changed),
1313
1314 TP_STRUCT__entry(
1315 LOCAL_ENTRY
1316 CHANCTX_ENTRY
1317 __field(u32, changed)
1318 ),
1319
1320 TP_fast_assign(
1321 LOCAL_ASSIGN;
1322 CHANCTX_ASSIGN;
1323 __entry->changed = changed;
1324 ),
1325
1326 TP_printk(
1327 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1328 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1329 )
1330);
1331
1332DECLARE_EVENT_CLASS(local_sdata_chanctx,
1333 TP_PROTO(struct ieee80211_local *local,
1334 struct ieee80211_sub_if_data *sdata,
1335 struct ieee80211_chanctx *ctx),
1336
1337 TP_ARGS(local, sdata, ctx),
1338
1339 TP_STRUCT__entry(
1340 LOCAL_ENTRY
1341 VIF_ENTRY
1342 CHANCTX_ENTRY
1343 ),
1344
1345 TP_fast_assign(
1346 LOCAL_ASSIGN;
1347 VIF_ASSIGN;
1348 CHANCTX_ASSIGN;
1349 ),
1350
1351 TP_printk(
1352 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
1353 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
1354 )
1355);
1356
1357DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1358 TP_PROTO(struct ieee80211_local *local,
1359 struct ieee80211_sub_if_data *sdata,
1360 struct ieee80211_chanctx *ctx),
1361 TP_ARGS(local, sdata, ctx)
1362);
1363
1364DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1365 TP_PROTO(struct ieee80211_local *local,
1366 struct ieee80211_sub_if_data *sdata,
1367 struct ieee80211_chanctx *ctx),
1368 TP_ARGS(local, sdata, ctx)
1369);
1370
Johannes Bergb5878a22010-04-07 16:48:40 +02001371/*
1372 * Tracing for API calls that drivers call.
1373 */
1374
1375TRACE_EVENT(api_start_tx_ba_session,
1376 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1377
1378 TP_ARGS(sta, tid),
1379
1380 TP_STRUCT__entry(
1381 STA_ENTRY
1382 __field(u16, tid)
1383 ),
1384
1385 TP_fast_assign(
1386 STA_ASSIGN;
1387 __entry->tid = tid;
1388 ),
1389
1390 TP_printk(
1391 STA_PR_FMT " tid:%d",
1392 STA_PR_ARG, __entry->tid
1393 )
1394);
1395
1396TRACE_EVENT(api_start_tx_ba_cb,
1397 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1398
1399 TP_ARGS(sdata, ra, tid),
1400
1401 TP_STRUCT__entry(
1402 VIF_ENTRY
1403 __array(u8, ra, ETH_ALEN)
1404 __field(u16, tid)
1405 ),
1406
1407 TP_fast_assign(
1408 VIF_ASSIGN;
1409 memcpy(__entry->ra, ra, ETH_ALEN);
1410 __entry->tid = tid;
1411 ),
1412
1413 TP_printk(
1414 VIF_PR_FMT " ra:%pM tid:%d",
1415 VIF_PR_ARG, __entry->ra, __entry->tid
1416 )
1417);
1418
1419TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001420 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001421
Johannes Berg6a8579d2010-05-27 14:41:07 +02001422 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001423
1424 TP_STRUCT__entry(
1425 STA_ENTRY
1426 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001427 ),
1428
1429 TP_fast_assign(
1430 STA_ASSIGN;
1431 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001432 ),
1433
1434 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001435 STA_PR_FMT " tid:%d",
1436 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001437 )
1438);
1439
1440TRACE_EVENT(api_stop_tx_ba_cb,
1441 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1442
1443 TP_ARGS(sdata, ra, tid),
1444
1445 TP_STRUCT__entry(
1446 VIF_ENTRY
1447 __array(u8, ra, ETH_ALEN)
1448 __field(u16, tid)
1449 ),
1450
1451 TP_fast_assign(
1452 VIF_ASSIGN;
1453 memcpy(__entry->ra, ra, ETH_ALEN);
1454 __entry->tid = tid;
1455 ),
1456
1457 TP_printk(
1458 VIF_PR_FMT " ra:%pM tid:%d",
1459 VIF_PR_ARG, __entry->ra, __entry->tid
1460 )
1461);
1462
Johannes Bergba99d932011-01-26 09:22:15 +01001463DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001464 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001465 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001466);
1467
1468TRACE_EVENT(api_beacon_loss,
1469 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1470
1471 TP_ARGS(sdata),
1472
1473 TP_STRUCT__entry(
1474 VIF_ENTRY
1475 ),
1476
1477 TP_fast_assign(
1478 VIF_ASSIGN;
1479 ),
1480
1481 TP_printk(
1482 VIF_PR_FMT,
1483 VIF_PR_ARG
1484 )
1485);
1486
1487TRACE_EVENT(api_connection_loss,
1488 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1489
1490 TP_ARGS(sdata),
1491
1492 TP_STRUCT__entry(
1493 VIF_ENTRY
1494 ),
1495
1496 TP_fast_assign(
1497 VIF_ASSIGN;
1498 ),
1499
1500 TP_printk(
1501 VIF_PR_FMT,
1502 VIF_PR_ARG
1503 )
1504);
1505
1506TRACE_EVENT(api_cqm_rssi_notify,
1507 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1508 enum nl80211_cqm_rssi_threshold_event rssi_event),
1509
1510 TP_ARGS(sdata, rssi_event),
1511
1512 TP_STRUCT__entry(
1513 VIF_ENTRY
1514 __field(u32, rssi_event)
1515 ),
1516
1517 TP_fast_assign(
1518 VIF_ASSIGN;
1519 __entry->rssi_event = rssi_event;
1520 ),
1521
1522 TP_printk(
1523 VIF_PR_FMT " event:%d",
1524 VIF_PR_ARG, __entry->rssi_event
1525 )
1526);
1527
1528TRACE_EVENT(api_scan_completed,
1529 TP_PROTO(struct ieee80211_local *local, bool aborted),
1530
1531 TP_ARGS(local, aborted),
1532
1533 TP_STRUCT__entry(
1534 LOCAL_ENTRY
1535 __field(bool, aborted)
1536 ),
1537
1538 TP_fast_assign(
1539 LOCAL_ASSIGN;
1540 __entry->aborted = aborted;
1541 ),
1542
1543 TP_printk(
1544 LOCAL_PR_FMT " aborted:%d",
1545 LOCAL_PR_ARG, __entry->aborted
1546 )
1547);
1548
Luciano Coelho79f460c2011-05-11 17:09:36 +03001549TRACE_EVENT(api_sched_scan_results,
1550 TP_PROTO(struct ieee80211_local *local),
1551
1552 TP_ARGS(local),
1553
1554 TP_STRUCT__entry(
1555 LOCAL_ENTRY
1556 ),
1557
1558 TP_fast_assign(
1559 LOCAL_ASSIGN;
1560 ),
1561
1562 TP_printk(
1563 LOCAL_PR_FMT, LOCAL_PR_ARG
1564 )
1565);
1566
1567TRACE_EVENT(api_sched_scan_stopped,
1568 TP_PROTO(struct ieee80211_local *local),
1569
1570 TP_ARGS(local),
1571
1572 TP_STRUCT__entry(
1573 LOCAL_ENTRY
1574 ),
1575
1576 TP_fast_assign(
1577 LOCAL_ASSIGN;
1578 ),
1579
1580 TP_printk(
1581 LOCAL_PR_FMT, LOCAL_PR_ARG
1582 )
1583);
1584
Johannes Bergb5878a22010-04-07 16:48:40 +02001585TRACE_EVENT(api_sta_block_awake,
1586 TP_PROTO(struct ieee80211_local *local,
1587 struct ieee80211_sta *sta, bool block),
1588
1589 TP_ARGS(local, sta, block),
1590
1591 TP_STRUCT__entry(
1592 LOCAL_ENTRY
1593 STA_ENTRY
1594 __field(bool, block)
1595 ),
1596
1597 TP_fast_assign(
1598 LOCAL_ASSIGN;
1599 STA_ASSIGN;
1600 __entry->block = block;
1601 ),
1602
1603 TP_printk(
1604 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1605 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
1606 )
1607);
1608
Johannes Berg5ce6e432010-05-11 16:20:57 +02001609TRACE_EVENT(api_chswitch_done,
1610 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1611
1612 TP_ARGS(sdata, success),
1613
1614 TP_STRUCT__entry(
1615 VIF_ENTRY
1616 __field(bool, success)
1617 ),
1618
1619 TP_fast_assign(
1620 VIF_ASSIGN;
1621 __entry->success = success;
1622 ),
1623
1624 TP_printk(
1625 VIF_PR_FMT " success=%d",
1626 VIF_PR_ARG, __entry->success
1627 )
1628);
1629
Johannes Bergba99d932011-01-26 09:22:15 +01001630DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001631 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001632 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001633);
1634
Johannes Bergba99d932011-01-26 09:22:15 +01001635DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001636 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001637 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001638);
1639
Johannes Bergc68f4b82011-07-05 16:35:41 +02001640TRACE_EVENT(api_gtk_rekey_notify,
1641 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1642 const u8 *bssid, const u8 *replay_ctr),
1643
1644 TP_ARGS(sdata, bssid, replay_ctr),
1645
1646 TP_STRUCT__entry(
1647 VIF_ENTRY
1648 __array(u8, bssid, ETH_ALEN)
1649 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1650 ),
1651
1652 TP_fast_assign(
1653 VIF_ASSIGN;
1654 memcpy(__entry->bssid, bssid, ETH_ALEN);
1655 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1656 ),
1657
1658 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1659);
1660
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001661TRACE_EVENT(api_enable_rssi_reports,
1662 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1663 int rssi_min_thold, int rssi_max_thold),
1664
1665 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1666
1667 TP_STRUCT__entry(
1668 VIF_ENTRY
1669 __field(int, rssi_min_thold)
1670 __field(int, rssi_max_thold)
1671 ),
1672
1673 TP_fast_assign(
1674 VIF_ASSIGN;
1675 __entry->rssi_min_thold = rssi_min_thold;
1676 __entry->rssi_max_thold = rssi_max_thold;
1677 ),
1678
1679 TP_printk(
1680 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
1681 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
1682 )
1683);
1684
Johannes Berg37fbd902011-09-29 16:04:39 +02001685TRACE_EVENT(api_eosp,
1686 TP_PROTO(struct ieee80211_local *local,
1687 struct ieee80211_sta *sta),
1688
1689 TP_ARGS(local, sta),
1690
1691 TP_STRUCT__entry(
1692 LOCAL_ENTRY
1693 STA_ENTRY
1694 ),
1695
1696 TP_fast_assign(
1697 LOCAL_ASSIGN;
1698 STA_ASSIGN;
1699 ),
1700
1701 TP_printk(
1702 LOCAL_PR_FMT STA_PR_FMT,
1703 LOCAL_PR_ARG, STA_PR_FMT
1704 )
1705);
1706
Johannes Bergb5878a22010-04-07 16:48:40 +02001707/*
1708 * Tracing for internal functions
1709 * (which may also be called in response to driver calls)
1710 */
1711
1712TRACE_EVENT(wake_queue,
1713 TP_PROTO(struct ieee80211_local *local, u16 queue,
1714 enum queue_stop_reason reason),
1715
1716 TP_ARGS(local, queue, reason),
1717
1718 TP_STRUCT__entry(
1719 LOCAL_ENTRY
1720 __field(u16, queue)
1721 __field(u32, reason)
1722 ),
1723
1724 TP_fast_assign(
1725 LOCAL_ASSIGN;
1726 __entry->queue = queue;
1727 __entry->reason = reason;
1728 ),
1729
1730 TP_printk(
1731 LOCAL_PR_FMT " queue:%d, reason:%d",
1732 LOCAL_PR_ARG, __entry->queue, __entry->reason
1733 )
1734);
1735
1736TRACE_EVENT(stop_queue,
1737 TP_PROTO(struct ieee80211_local *local, u16 queue,
1738 enum queue_stop_reason reason),
1739
1740 TP_ARGS(local, queue, reason),
1741
1742 TP_STRUCT__entry(
1743 LOCAL_ENTRY
1744 __field(u16, queue)
1745 __field(u32, reason)
1746 ),
1747
1748 TP_fast_assign(
1749 LOCAL_ASSIGN;
1750 __entry->queue = queue;
1751 __entry->reason = reason;
1752 ),
1753
1754 TP_printk(
1755 LOCAL_PR_FMT " queue:%d, reason:%d",
1756 LOCAL_PR_ARG, __entry->queue, __entry->reason
1757 )
1758);
Johannes Berg3fae0272012-06-22 13:36:25 +02001759
1760#ifdef CONFIG_MAC80211_MESSAGE_TRACING
1761#undef TRACE_SYSTEM
1762#define TRACE_SYSTEM mac80211_msg
1763
1764#define MAX_MSG_LEN 100
1765
1766DECLARE_EVENT_CLASS(mac80211_msg_event,
1767 TP_PROTO(struct va_format *vaf),
1768
1769 TP_ARGS(vaf),
1770
1771 TP_STRUCT__entry(
1772 __dynamic_array(char, msg, MAX_MSG_LEN)
1773 ),
1774
1775 TP_fast_assign(
1776 WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
1777 MAX_MSG_LEN, vaf->fmt,
1778 *vaf->va) >= MAX_MSG_LEN);
1779 ),
1780
1781 TP_printk("%s", __get_str(msg))
1782);
1783
1784DEFINE_EVENT(mac80211_msg_event, mac80211_info,
1785 TP_PROTO(struct va_format *vaf),
1786 TP_ARGS(vaf)
1787);
1788DEFINE_EVENT(mac80211_msg_event, mac80211_dbg,
1789 TP_PROTO(struct va_format *vaf),
1790 TP_ARGS(vaf)
1791);
1792DEFINE_EVENT(mac80211_msg_event, mac80211_err,
1793 TP_PROTO(struct va_format *vaf),
1794 TP_ARGS(vaf)
1795);
1796#endif
1797
Christian Lamparterf7428802009-07-19 23:21:07 +02001798#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001799
1800#undef TRACE_INCLUDE_PATH
1801#define TRACE_INCLUDE_PATH .
1802#undef TRACE_INCLUDE_FILE
Johannes Berg011ad0e2012-06-22 12:55:52 +02001803#define TRACE_INCLUDE_FILE trace
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001804#include <trace/define_trace.h>