blob: c6d33b55b2dfd51602d7fc40dcbbbb0ef6a0a451 [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 Berg12375ef2009-11-25 20:30:31 +010027 __assign_str(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
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
Johannes Bergb5878a22010-04-07 16:48:40 +020031/*
32 * Tracing for driver callbacks.
33 */
34
Johannes Bergba99d932011-01-26 09:22:15 +010035DECLARE_EVENT_CLASS(local_only_evt,
Johannes Berg4efc76b2010-06-10 10:56:20 +020036 TP_PROTO(struct ieee80211_local *local),
37 TP_ARGS(local),
38 TP_STRUCT__entry(
39 LOCAL_ENTRY
40 ),
41 TP_fast_assign(
42 LOCAL_ASSIGN;
43 ),
44 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
45);
46
Luciano Coelho92ddc112011-05-09 14:40:06 +030047DECLARE_EVENT_CLASS(local_sdata_addr_evt,
48 TP_PROTO(struct ieee80211_local *local,
49 struct ieee80211_sub_if_data *sdata),
50 TP_ARGS(local, sdata),
51
52 TP_STRUCT__entry(
53 LOCAL_ENTRY
54 VIF_ENTRY
55 __array(char, addr, 6)
56 ),
57
58 TP_fast_assign(
59 LOCAL_ASSIGN;
60 VIF_ASSIGN;
61 memcpy(__entry->addr, sdata->vif.addr, 6);
62 ),
63
64 TP_printk(
65 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
66 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
67 )
68);
69
70DECLARE_EVENT_CLASS(local_u32_evt,
71 TP_PROTO(struct ieee80211_local *local, u32 value),
72 TP_ARGS(local, value),
73
74 TP_STRUCT__entry(
75 LOCAL_ENTRY
76 __field(u32, value)
77 ),
78
79 TP_fast_assign(
80 LOCAL_ASSIGN;
81 __entry->value = value;
82 ),
83
84 TP_printk(
85 LOCAL_PR_FMT " value:%d",
86 LOCAL_PR_ARG, __entry->value
87 )
88);
89
Luciano Coelho79f460c2011-05-11 17:09:36 +030090DECLARE_EVENT_CLASS(local_sdata_evt,
91 TP_PROTO(struct ieee80211_local *local,
92 struct ieee80211_sub_if_data *sdata),
93 TP_ARGS(local, sdata),
94
95 TP_STRUCT__entry(
96 LOCAL_ENTRY
97 VIF_ENTRY
98 ),
99
100 TP_fast_assign(
101 LOCAL_ASSIGN;
102 VIF_ASSIGN;
103 ),
104
105 TP_printk(
106 LOCAL_PR_FMT VIF_PR_FMT,
107 LOCAL_PR_ARG, VIF_PR_ARG
108 )
109);
110
Johannes Bergba99d932011-01-26 09:22:15 +0100111DEFINE_EVENT(local_only_evt, drv_return_void,
112 TP_PROTO(struct ieee80211_local *local),
113 TP_ARGS(local)
114);
115
Johannes Berg4efc76b2010-06-10 10:56:20 +0200116TRACE_EVENT(drv_return_int,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200117 TP_PROTO(struct ieee80211_local *local, int ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200118 TP_ARGS(local, ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200119 TP_STRUCT__entry(
120 LOCAL_ENTRY
121 __field(int, ret)
122 ),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200123 TP_fast_assign(
124 LOCAL_ASSIGN;
125 __entry->ret = ret;
126 ),
Johannes Berg4efc76b2010-06-10 10:56:20 +0200127 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
128);
129
Vivek Natarajane8306f92011-04-06 11:41:10 +0530130TRACE_EVENT(drv_return_bool,
131 TP_PROTO(struct ieee80211_local *local, bool ret),
132 TP_ARGS(local, ret),
133 TP_STRUCT__entry(
134 LOCAL_ENTRY
135 __field(bool, ret)
136 ),
137 TP_fast_assign(
138 LOCAL_ASSIGN;
139 __entry->ret = ret;
140 ),
141 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
142 "true" : "false")
143);
144
Johannes Berg4efc76b2010-06-10 10:56:20 +0200145TRACE_EVENT(drv_return_u64,
146 TP_PROTO(struct ieee80211_local *local, u64 ret),
147 TP_ARGS(local, ret),
148 TP_STRUCT__entry(
149 LOCAL_ENTRY
150 __field(u64, ret)
151 ),
152 TP_fast_assign(
153 LOCAL_ASSIGN;
154 __entry->ret = ret;
155 ),
156 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
157);
158
Johannes Bergba99d932011-01-26 09:22:15 +0100159DEFINE_EVENT(local_only_evt, drv_start,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200160 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100161 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200162);
163
Ben Greeare3521142012-04-23 12:50:31 -0700164DEFINE_EVENT(local_u32_evt, drv_get_et_strings,
165 TP_PROTO(struct ieee80211_local *local, u32 sset),
166 TP_ARGS(local, sset)
167);
168
169DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count,
170 TP_PROTO(struct ieee80211_local *local, u32 sset),
171 TP_ARGS(local, sset)
172);
173
174DEFINE_EVENT(local_only_evt, drv_get_et_stats,
175 TP_PROTO(struct ieee80211_local *local),
176 TP_ARGS(local)
177);
178
Johannes Bergeecc4802011-05-04 15:37:29 +0200179DEFINE_EVENT(local_only_evt, drv_suspend,
180 TP_PROTO(struct ieee80211_local *local),
181 TP_ARGS(local)
182);
183
184DEFINE_EVENT(local_only_evt, drv_resume,
185 TP_PROTO(struct ieee80211_local *local),
186 TP_ARGS(local)
187);
188
Johannes Berg6d525632012-04-04 15:05:25 +0200189TRACE_EVENT(drv_set_wakeup,
190 TP_PROTO(struct ieee80211_local *local, bool enabled),
191 TP_ARGS(local, enabled),
192 TP_STRUCT__entry(
193 LOCAL_ENTRY
194 __field(bool, enabled)
195 ),
196 TP_fast_assign(
197 LOCAL_ASSIGN;
198 __entry->enabled = enabled;
199 ),
200 TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
201);
202
Johannes Bergba99d932011-01-26 09:22:15 +0100203DEFINE_EVENT(local_only_evt, drv_stop,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200204 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100205 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200206);
207
Luciano Coelho92ddc112011-05-09 14:40:06 +0300208DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200209 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200210 struct ieee80211_sub_if_data *sdata),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300211 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200212);
213
Johannes Berg34d4bc42010-08-27 12:35:58 +0200214TRACE_EVENT(drv_change_interface,
215 TP_PROTO(struct ieee80211_local *local,
216 struct ieee80211_sub_if_data *sdata,
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200217 enum nl80211_iftype type, bool p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200218
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200219 TP_ARGS(local, sdata, type, p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200220
221 TP_STRUCT__entry(
222 LOCAL_ENTRY
223 VIF_ENTRY
224 __field(u32, new_type)
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200225 __field(bool, new_p2p)
Johannes Berg34d4bc42010-08-27 12:35:58 +0200226 ),
227
228 TP_fast_assign(
229 LOCAL_ASSIGN;
230 VIF_ASSIGN;
231 __entry->new_type = type;
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200232 __entry->new_p2p = p2p;
Johannes Berg34d4bc42010-08-27 12:35:58 +0200233 ),
234
235 TP_printk(
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200236 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
237 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
238 __entry->new_p2p ? "/p2p" : ""
Johannes Berg34d4bc42010-08-27 12:35:58 +0200239 )
240);
241
Luciano Coelho92ddc112011-05-09 14:40:06 +0300242DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
243 TP_PROTO(struct ieee80211_local *local,
244 struct ieee80211_sub_if_data *sdata),
245 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200246);
247
248TRACE_EVENT(drv_config,
249 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200250 u32 changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200251
Johannes Berg4efc76b2010-06-10 10:56:20 +0200252 TP_ARGS(local, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200253
254 TP_STRUCT__entry(
255 LOCAL_ENTRY
256 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100257 __field(u32, flags)
258 __field(int, power_level)
259 __field(int, dynamic_ps_timeout)
260 __field(int, max_sleep_period)
261 __field(u16, listen_interval)
262 __field(u8, long_frame_max_tx_count)
263 __field(u8, short_frame_max_tx_count)
264 __field(int, center_freq)
265 __field(int, channel_type)
Johannes Berg0f782312009-12-01 13:37:02 +0100266 __field(int, smps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200267 ),
268
269 TP_fast_assign(
270 LOCAL_ASSIGN;
271 __entry->changed = changed;
Johannes Bergf911ab82009-11-25 19:07:20 +0100272 __entry->flags = local->hw.conf.flags;
273 __entry->power_level = local->hw.conf.power_level;
274 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
275 __entry->max_sleep_period = local->hw.conf.max_sleep_period;
276 __entry->listen_interval = local->hw.conf.listen_interval;
277 __entry->long_frame_max_tx_count = local->hw.conf.long_frame_max_tx_count;
278 __entry->short_frame_max_tx_count = local->hw.conf.short_frame_max_tx_count;
279 __entry->center_freq = local->hw.conf.channel->center_freq;
280 __entry->channel_type = local->hw.conf.channel_type;
Johannes Berg0f782312009-12-01 13:37:02 +0100281 __entry->smps = local->hw.conf.smps_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200282 ),
283
284 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200285 LOCAL_PR_FMT " ch:%#x freq:%d",
286 LOCAL_PR_ARG, __entry->changed, __entry->center_freq
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200287 )
288);
289
290TRACE_EVENT(drv_bss_info_changed,
291 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100292 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200293 struct ieee80211_bss_conf *info,
294 u32 changed),
295
Johannes Berg12375ef2009-11-25 20:30:31 +0100296 TP_ARGS(local, sdata, info, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200297
298 TP_STRUCT__entry(
299 LOCAL_ENTRY
300 VIF_ENTRY
301 __field(bool, assoc)
302 __field(u16, aid)
303 __field(bool, cts)
304 __field(bool, shortpre)
305 __field(bool, shortslot)
306 __field(u8, dtimper)
307 __field(u16, bcnint)
308 __field(u16, assoc_cap)
Johannes Berg8c358bc2012-05-22 22:13:05 +0200309 __field(u64, sync_tsf)
310 __field(u32, sync_device_ts)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200311 __field(u32, basic_rates)
312 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100313 __field(bool, enable_beacon)
314 __field(u16, ht_operation_mode)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200315 ),
316
317 TP_fast_assign(
318 LOCAL_ASSIGN;
319 VIF_ASSIGN;
320 __entry->changed = changed;
321 __entry->aid = info->aid;
322 __entry->assoc = info->assoc;
323 __entry->shortpre = info->use_short_preamble;
324 __entry->cts = info->use_cts_prot;
325 __entry->shortslot = info->use_short_slot;
326 __entry->dtimper = info->dtim_period;
327 __entry->bcnint = info->beacon_int;
328 __entry->assoc_cap = info->assoc_capability;
Johannes Berg8c358bc2012-05-22 22:13:05 +0200329 __entry->sync_tsf = info->sync_tsf;
330 __entry->sync_device_ts = info->sync_device_ts;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200331 __entry->basic_rates = info->basic_rates;
Johannes Bergf911ab82009-11-25 19:07:20 +0100332 __entry->enable_beacon = info->enable_beacon;
333 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200334 ),
335
336 TP_printk(
337 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
338 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
339 )
340);
341
Johannes Berg3ac64be2009-08-17 16:16:53 +0200342TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200343 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200344
Johannes Berg4efc76b2010-06-10 10:56:20 +0200345 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200346
347 TP_STRUCT__entry(
348 LOCAL_ENTRY
349 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200350 ),
351
352 TP_fast_assign(
353 LOCAL_ASSIGN;
354 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200355 ),
356
357 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200358 LOCAL_PR_FMT " prepare mc (%d)",
359 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200360 )
361);
362
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200363TRACE_EVENT(drv_configure_filter,
364 TP_PROTO(struct ieee80211_local *local,
365 unsigned int changed_flags,
366 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200367 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200368
Johannes Berg3ac64be2009-08-17 16:16:53 +0200369 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200370
371 TP_STRUCT__entry(
372 LOCAL_ENTRY
373 __field(unsigned int, changed)
374 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200375 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200376 ),
377
378 TP_fast_assign(
379 LOCAL_ASSIGN;
380 __entry->changed = changed_flags;
381 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200382 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200383 ),
384
385 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200386 LOCAL_PR_FMT " changed:%#x total:%#x",
387 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200388 )
389);
390
391TRACE_EVENT(drv_set_tim,
392 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200393 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200394
Johannes Berg4efc76b2010-06-10 10:56:20 +0200395 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200396
397 TP_STRUCT__entry(
398 LOCAL_ENTRY
399 STA_ENTRY
400 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200401 ),
402
403 TP_fast_assign(
404 LOCAL_ASSIGN;
405 STA_ASSIGN;
406 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200407 ),
408
409 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200410 LOCAL_PR_FMT STA_PR_FMT " set:%d",
411 LOCAL_PR_ARG, STA_PR_FMT, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200412 )
413);
414
415TRACE_EVENT(drv_set_key,
416 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100417 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200418 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200419 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200420
Johannes Berg4efc76b2010-06-10 10:56:20 +0200421 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200422
423 TP_STRUCT__entry(
424 LOCAL_ENTRY
425 VIF_ENTRY
426 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200427 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200428 __field(u8, hw_key_idx)
429 __field(u8, flags)
430 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200431 ),
432
433 TP_fast_assign(
434 LOCAL_ASSIGN;
435 VIF_ASSIGN;
436 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200437 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200438 __entry->flags = key->flags;
439 __entry->keyidx = key->keyidx;
440 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200441 ),
442
443 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200444 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
445 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200446 )
447);
448
449TRACE_EVENT(drv_update_tkip_key,
450 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100451 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200452 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100453 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200454
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100455 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200456
457 TP_STRUCT__entry(
458 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100459 VIF_ENTRY
460 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200461 __field(u32, iv32)
462 ),
463
464 TP_fast_assign(
465 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100466 VIF_ASSIGN;
467 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200468 __entry->iv32 = iv32;
469 ),
470
471 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100472 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
473 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200474 )
475);
476
Luciano Coelho79f460c2011-05-11 17:09:36 +0300477DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200478 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300479 struct ieee80211_sub_if_data *sdata),
480 TP_ARGS(local, sdata)
481);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200482
Eliad Pellerb8564392011-06-13 12:47:30 +0300483DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
484 TP_PROTO(struct ieee80211_local *local,
485 struct ieee80211_sub_if_data *sdata),
486 TP_ARGS(local, sdata)
487);
488
Luciano Coelho79f460c2011-05-11 17:09:36 +0300489DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
490 TP_PROTO(struct ieee80211_local *local,
491 struct ieee80211_sub_if_data *sdata),
492 TP_ARGS(local, sdata)
493);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200494
Luciano Coelho79f460c2011-05-11 17:09:36 +0300495DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
496 TP_PROTO(struct ieee80211_local *local,
497 struct ieee80211_sub_if_data *sdata),
498 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200499);
500
Johannes Bergba99d932011-01-26 09:22:15 +0100501DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200502 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100503 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200504);
505
Johannes Bergba99d932011-01-26 09:22:15 +0100506DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200507 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100508 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200509);
510
511TRACE_EVENT(drv_get_stats,
512 TP_PROTO(struct ieee80211_local *local,
513 struct ieee80211_low_level_stats *stats,
514 int ret),
515
516 TP_ARGS(local, stats, ret),
517
518 TP_STRUCT__entry(
519 LOCAL_ENTRY
520 __field(int, ret)
521 __field(unsigned int, ackfail)
522 __field(unsigned int, rtsfail)
523 __field(unsigned int, fcserr)
524 __field(unsigned int, rtssucc)
525 ),
526
527 TP_fast_assign(
528 LOCAL_ASSIGN;
529 __entry->ret = ret;
530 __entry->ackfail = stats->dot11ACKFailureCount;
531 __entry->rtsfail = stats->dot11RTSFailureCount;
532 __entry->fcserr = stats->dot11FCSErrorCount;
533 __entry->rtssucc = stats->dot11RTSSuccessCount;
534 ),
535
536 TP_printk(
537 LOCAL_PR_FMT " ret:%d",
538 LOCAL_PR_ARG, __entry->ret
539 )
540);
541
542TRACE_EVENT(drv_get_tkip_seq,
543 TP_PROTO(struct ieee80211_local *local,
544 u8 hw_key_idx, u32 *iv32, u16 *iv16),
545
546 TP_ARGS(local, hw_key_idx, iv32, iv16),
547
548 TP_STRUCT__entry(
549 LOCAL_ENTRY
550 __field(u8, hw_key_idx)
551 __field(u32, iv32)
552 __field(u16, iv16)
553 ),
554
555 TP_fast_assign(
556 LOCAL_ASSIGN;
557 __entry->hw_key_idx = hw_key_idx;
558 __entry->iv32 = *iv32;
559 __entry->iv16 = *iv16;
560 ),
561
562 TP_printk(
563 LOCAL_PR_FMT, LOCAL_PR_ARG
564 )
565);
566
Luciano Coelho92ddc112011-05-09 14:40:06 +0300567DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200568 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300569 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200570);
571
Luciano Coelho92ddc112011-05-09 14:40:06 +0300572DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200573 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300574 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200575);
576
Lukáš Turek310bc672009-12-21 22:50:48 +0100577TRACE_EVENT(drv_set_coverage_class,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200578 TP_PROTO(struct ieee80211_local *local, u8 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100579
Johannes Berg4efc76b2010-06-10 10:56:20 +0200580 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100581
582 TP_STRUCT__entry(
583 LOCAL_ENTRY
584 __field(u8, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100585 ),
586
587 TP_fast_assign(
588 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100589 __entry->value = value;
590 ),
591
592 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200593 LOCAL_PR_FMT " value:%d",
594 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100595 )
596);
597
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200598TRACE_EVENT(drv_sta_notify,
599 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100600 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200601 enum sta_notify_cmd cmd,
602 struct ieee80211_sta *sta),
603
Johannes Berg12375ef2009-11-25 20:30:31 +0100604 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200605
606 TP_STRUCT__entry(
607 LOCAL_ENTRY
608 VIF_ENTRY
609 STA_ENTRY
610 __field(u32, cmd)
611 ),
612
613 TP_fast_assign(
614 LOCAL_ASSIGN;
615 VIF_ASSIGN;
616 STA_ASSIGN;
617 __entry->cmd = cmd;
618 ),
619
620 TP_printk(
621 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
622 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
623 )
624);
625
Johannes Bergf09603a2012-01-20 13:55:21 +0100626TRACE_EVENT(drv_sta_state,
627 TP_PROTO(struct ieee80211_local *local,
628 struct ieee80211_sub_if_data *sdata,
629 struct ieee80211_sta *sta,
630 enum ieee80211_sta_state old_state,
631 enum ieee80211_sta_state new_state),
632
633 TP_ARGS(local, sdata, sta, old_state, new_state),
634
635 TP_STRUCT__entry(
636 LOCAL_ENTRY
637 VIF_ENTRY
638 STA_ENTRY
639 __field(u32, old_state)
640 __field(u32, new_state)
641 ),
642
643 TP_fast_assign(
644 LOCAL_ASSIGN;
645 VIF_ASSIGN;
646 STA_ASSIGN;
647 __entry->old_state = old_state;
648 __entry->new_state = new_state;
649 ),
650
651 TP_printk(
652 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
653 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
654 __entry->old_state, __entry->new_state
655 )
656);
657
Johannes Berg8f727ef2012-03-30 08:43:32 +0200658TRACE_EVENT(drv_sta_rc_update,
659 TP_PROTO(struct ieee80211_local *local,
660 struct ieee80211_sub_if_data *sdata,
661 struct ieee80211_sta *sta,
662 u32 changed),
663
664 TP_ARGS(local, sdata, sta, changed),
665
666 TP_STRUCT__entry(
667 LOCAL_ENTRY
668 VIF_ENTRY
669 STA_ENTRY
670 __field(u32, changed)
671 ),
672
673 TP_fast_assign(
674 LOCAL_ASSIGN;
675 VIF_ASSIGN;
676 STA_ASSIGN;
677 __entry->changed = changed;
678 ),
679
680 TP_printk(
681 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
682 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
683 )
684);
685
Johannes Berg34e89502010-02-03 13:59:58 +0100686TRACE_EVENT(drv_sta_add,
687 TP_PROTO(struct ieee80211_local *local,
688 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200689 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100690
Johannes Berg4efc76b2010-06-10 10:56:20 +0200691 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100692
693 TP_STRUCT__entry(
694 LOCAL_ENTRY
695 VIF_ENTRY
696 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100697 ),
698
699 TP_fast_assign(
700 LOCAL_ASSIGN;
701 VIF_ASSIGN;
702 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100703 ),
704
705 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200706 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
707 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100708 )
709);
710
711TRACE_EVENT(drv_sta_remove,
712 TP_PROTO(struct ieee80211_local *local,
713 struct ieee80211_sub_if_data *sdata,
714 struct ieee80211_sta *sta),
715
716 TP_ARGS(local, sdata, sta),
717
718 TP_STRUCT__entry(
719 LOCAL_ENTRY
720 VIF_ENTRY
721 STA_ENTRY
722 ),
723
724 TP_fast_assign(
725 LOCAL_ASSIGN;
726 VIF_ASSIGN;
727 STA_ASSIGN;
728 ),
729
730 TP_printk(
731 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
732 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
733 )
734);
735
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200736TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300737 TP_PROTO(struct ieee80211_local *local,
738 struct ieee80211_sub_if_data *sdata,
Johannes Berga3304b02012-03-28 11:04:24 +0200739 u16 ac, const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200740
Johannes Berga3304b02012-03-28 11:04:24 +0200741 TP_ARGS(local, sdata, ac, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200742
743 TP_STRUCT__entry(
744 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300745 VIF_ENTRY
Johannes Berga3304b02012-03-28 11:04:24 +0200746 __field(u16, ac)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200747 __field(u16, txop)
748 __field(u16, cw_min)
749 __field(u16, cw_max)
750 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300751 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200752 ),
753
754 TP_fast_assign(
755 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300756 VIF_ASSIGN;
Johannes Berga3304b02012-03-28 11:04:24 +0200757 __entry->ac = ac;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200758 __entry->txop = params->txop;
759 __entry->cw_max = params->cw_max;
760 __entry->cw_min = params->cw_min;
761 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300762 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200763 ),
764
765 TP_printk(
Johannes Berga3304b02012-03-28 11:04:24 +0200766 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
767 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200768 )
769);
770
Eliad Peller37a41b42011-09-21 14:06:11 +0300771DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
772 TP_PROTO(struct ieee80211_local *local,
773 struct ieee80211_sub_if_data *sdata),
774 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200775);
776
777TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +0300778 TP_PROTO(struct ieee80211_local *local,
779 struct ieee80211_sub_if_data *sdata,
780 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200781
Eliad Peller37a41b42011-09-21 14:06:11 +0300782 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200783
784 TP_STRUCT__entry(
785 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +0300786 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200787 __field(u64, tsf)
788 ),
789
790 TP_fast_assign(
791 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +0300792 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200793 __entry->tsf = tsf;
794 ),
795
796 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +0300797 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
798 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200799 )
800);
801
Eliad Peller37a41b42011-09-21 14:06:11 +0300802DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
803 TP_PROTO(struct ieee80211_local *local,
804 struct ieee80211_sub_if_data *sdata),
805 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200806);
807
Johannes Bergba99d932011-01-26 09:22:15 +0100808DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200809 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100810 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200811);
812
813TRACE_EVENT(drv_ampdu_action,
814 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100815 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200816 enum ieee80211_ampdu_mlme_action action,
817 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100818 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200819
Johannes Berg0b01f032011-01-18 13:51:05 +0100820 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200821
822 TP_STRUCT__entry(
823 LOCAL_ENTRY
824 STA_ENTRY
825 __field(u32, action)
826 __field(u16, tid)
827 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100828 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100829 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200830 ),
831
832 TP_fast_assign(
833 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100834 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200835 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200836 __entry->action = action;
837 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800838 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100839 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200840 ),
841
842 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100843 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
844 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
845 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200846 )
847);
Johannes Berga80f7c02009-12-23 13:15:32 +0100848
John W. Linvillec466d4e2010-06-29 14:51:23 -0400849TRACE_EVENT(drv_get_survey,
850 TP_PROTO(struct ieee80211_local *local, int idx,
851 struct survey_info *survey),
852
853 TP_ARGS(local, idx, survey),
854
855 TP_STRUCT__entry(
856 LOCAL_ENTRY
857 __field(int, idx)
858 ),
859
860 TP_fast_assign(
861 LOCAL_ASSIGN;
862 __entry->idx = idx;
863 ),
864
865 TP_printk(
866 LOCAL_PR_FMT " idx:%d",
867 LOCAL_PR_ARG, __entry->idx
868 )
869);
870
Johannes Berga80f7c02009-12-23 13:15:32 +0100871TRACE_EVENT(drv_flush,
872 TP_PROTO(struct ieee80211_local *local, bool drop),
873
874 TP_ARGS(local, drop),
875
876 TP_STRUCT__entry(
877 LOCAL_ENTRY
878 __field(bool, drop)
879 ),
880
881 TP_fast_assign(
882 LOCAL_ASSIGN;
883 __entry->drop = drop;
884 ),
885
886 TP_printk(
887 LOCAL_PR_FMT " drop:%d",
888 LOCAL_PR_ARG, __entry->drop
889 )
890);
Johannes Bergb5878a22010-04-07 16:48:40 +0200891
Johannes Berg5ce6e432010-05-11 16:20:57 +0200892TRACE_EVENT(drv_channel_switch,
893 TP_PROTO(struct ieee80211_local *local,
894 struct ieee80211_channel_switch *ch_switch),
895
896 TP_ARGS(local, ch_switch),
897
898 TP_STRUCT__entry(
899 LOCAL_ENTRY
900 __field(u64, timestamp)
901 __field(bool, block_tx)
902 __field(u16, freq)
903 __field(u8, count)
904 ),
905
906 TP_fast_assign(
907 LOCAL_ASSIGN;
908 __entry->timestamp = ch_switch->timestamp;
909 __entry->block_tx = ch_switch->block_tx;
910 __entry->freq = ch_switch->channel->center_freq;
911 __entry->count = ch_switch->count;
912 ),
913
914 TP_printk(
915 LOCAL_PR_FMT " new freq:%u count:%d",
916 LOCAL_PR_ARG, __entry->freq, __entry->count
917 )
918);
919
Bruno Randolf15d96752010-11-10 12:50:56 +0900920TRACE_EVENT(drv_set_antenna,
921 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
922
923 TP_ARGS(local, tx_ant, rx_ant, ret),
924
925 TP_STRUCT__entry(
926 LOCAL_ENTRY
927 __field(u32, tx_ant)
928 __field(u32, rx_ant)
929 __field(int, ret)
930 ),
931
932 TP_fast_assign(
933 LOCAL_ASSIGN;
934 __entry->tx_ant = tx_ant;
935 __entry->rx_ant = rx_ant;
936 __entry->ret = ret;
937 ),
938
939 TP_printk(
940 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
941 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
942 )
943);
944
945TRACE_EVENT(drv_get_antenna,
946 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
947
948 TP_ARGS(local, tx_ant, rx_ant, ret),
949
950 TP_STRUCT__entry(
951 LOCAL_ENTRY
952 __field(u32, tx_ant)
953 __field(u32, rx_ant)
954 __field(int, ret)
955 ),
956
957 TP_fast_assign(
958 LOCAL_ASSIGN;
959 __entry->tx_ant = tx_ant;
960 __entry->rx_ant = rx_ant;
961 __entry->ret = ret;
962 ),
963
964 TP_printk(
965 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
966 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
967 )
968);
969
Johannes Berg21f83582010-12-18 17:20:47 +0100970TRACE_EVENT(drv_remain_on_channel,
971 TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
972 enum nl80211_channel_type chantype, unsigned int duration),
973
974 TP_ARGS(local, chan, chantype, duration),
975
976 TP_STRUCT__entry(
977 LOCAL_ENTRY
978 __field(int, center_freq)
979 __field(int, channel_type)
980 __field(unsigned int, duration)
981 ),
982
983 TP_fast_assign(
984 LOCAL_ASSIGN;
985 __entry->center_freq = chan->center_freq;
986 __entry->channel_type = chantype;
987 __entry->duration = duration;
988 ),
989
990 TP_printk(
991 LOCAL_PR_FMT " freq:%dMHz duration:%dms",
992 LOCAL_PR_ARG, __entry->center_freq, __entry->duration
993 )
994);
995
Johannes Bergba99d932011-01-26 09:22:15 +0100996DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +0100997 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100998 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +0100999);
1000
Johannes Berg5f16a432011-02-25 15:36:57 +01001001TRACE_EVENT(drv_offchannel_tx,
1002 TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
1003 struct ieee80211_channel *chan,
1004 enum nl80211_channel_type channel_type,
1005 unsigned int wait),
1006
1007 TP_ARGS(local, skb, chan, channel_type, wait),
1008
1009 TP_STRUCT__entry(
1010 LOCAL_ENTRY
1011 __field(int, center_freq)
1012 __field(int, channel_type)
1013 __field(unsigned int, wait)
1014 ),
1015
1016 TP_fast_assign(
1017 LOCAL_ASSIGN;
1018 __entry->center_freq = chan->center_freq;
1019 __entry->channel_type = channel_type;
1020 __entry->wait = wait;
1021 ),
1022
1023 TP_printk(
1024 LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
1025 LOCAL_PR_ARG, __entry->center_freq, __entry->wait
1026 )
1027);
1028
John W. Linville38c09152011-03-07 16:19:18 -05001029TRACE_EVENT(drv_set_ringparam,
1030 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1031
1032 TP_ARGS(local, tx, rx),
1033
1034 TP_STRUCT__entry(
1035 LOCAL_ENTRY
1036 __field(u32, tx)
1037 __field(u32, rx)
1038 ),
1039
1040 TP_fast_assign(
1041 LOCAL_ASSIGN;
1042 __entry->tx = tx;
1043 __entry->rx = rx;
1044 ),
1045
1046 TP_printk(
1047 LOCAL_PR_FMT " tx:%d rx %d",
1048 LOCAL_PR_ARG, __entry->tx, __entry->rx
1049 )
1050);
1051
1052TRACE_EVENT(drv_get_ringparam,
1053 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1054 u32 *rx, u32 *rx_max),
1055
1056 TP_ARGS(local, tx, tx_max, rx, rx_max),
1057
1058 TP_STRUCT__entry(
1059 LOCAL_ENTRY
1060 __field(u32, tx)
1061 __field(u32, tx_max)
1062 __field(u32, rx)
1063 __field(u32, rx_max)
1064 ),
1065
1066 TP_fast_assign(
1067 LOCAL_ASSIGN;
1068 __entry->tx = *tx;
1069 __entry->tx_max = *tx_max;
1070 __entry->rx = *rx;
1071 __entry->rx_max = *rx_max;
1072 ),
1073
1074 TP_printk(
1075 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1076 LOCAL_PR_ARG,
1077 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1078 )
1079);
1080
Vivek Natarajane8306f92011-04-06 11:41:10 +05301081DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1082 TP_PROTO(struct ieee80211_local *local),
1083 TP_ARGS(local)
1084);
1085
Johannes Berg5f16a432011-02-25 15:36:57 +01001086DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1087 TP_PROTO(struct ieee80211_local *local),
1088 TP_ARGS(local)
1089);
1090
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301091TRACE_EVENT(drv_set_bitrate_mask,
1092 TP_PROTO(struct ieee80211_local *local,
1093 struct ieee80211_sub_if_data *sdata,
1094 const struct cfg80211_bitrate_mask *mask),
1095
1096 TP_ARGS(local, sdata, mask),
1097
1098 TP_STRUCT__entry(
1099 LOCAL_ENTRY
1100 VIF_ENTRY
1101 __field(u32, legacy_2g)
1102 __field(u32, legacy_5g)
1103 ),
1104
1105 TP_fast_assign(
1106 LOCAL_ASSIGN;
1107 VIF_ASSIGN;
1108 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1109 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1110 ),
1111
1112 TP_printk(
1113 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1114 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1115 )
1116);
1117
Johannes Bergc68f4b82011-07-05 16:35:41 +02001118TRACE_EVENT(drv_set_rekey_data,
1119 TP_PROTO(struct ieee80211_local *local,
1120 struct ieee80211_sub_if_data *sdata,
1121 struct cfg80211_gtk_rekey_data *data),
1122
1123 TP_ARGS(local, sdata, data),
1124
1125 TP_STRUCT__entry(
1126 LOCAL_ENTRY
1127 VIF_ENTRY
1128 __array(u8, kek, NL80211_KEK_LEN)
1129 __array(u8, kck, NL80211_KCK_LEN)
1130 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1131 ),
1132
1133 TP_fast_assign(
1134 LOCAL_ASSIGN;
1135 VIF_ASSIGN;
1136 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1137 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1138 memcpy(__entry->replay_ctr, data->replay_ctr,
1139 NL80211_REPLAY_CTR_LEN);
1140 ),
1141
1142 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1143 LOCAL_PR_ARG, VIF_PR_ARG)
1144);
1145
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001146TRACE_EVENT(drv_rssi_callback,
1147 TP_PROTO(struct ieee80211_local *local,
1148 enum ieee80211_rssi_event rssi_event),
1149
1150 TP_ARGS(local, rssi_event),
1151
1152 TP_STRUCT__entry(
1153 LOCAL_ENTRY
1154 __field(u32, rssi_event)
1155 ),
1156
1157 TP_fast_assign(
1158 LOCAL_ASSIGN;
1159 __entry->rssi_event = rssi_event;
1160 ),
1161
1162 TP_printk(
1163 LOCAL_PR_FMT " rssi_event:%d",
1164 LOCAL_PR_ARG, __entry->rssi_event
1165 )
1166);
1167
Johannes Berg40b96402011-09-29 16:04:38 +02001168DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001169 TP_PROTO(struct ieee80211_local *local,
1170 struct ieee80211_sta *sta,
1171 u16 tids, int num_frames,
1172 enum ieee80211_frame_release_type reason,
1173 bool more_data),
1174
1175 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1176
1177 TP_STRUCT__entry(
1178 LOCAL_ENTRY
1179 STA_ENTRY
1180 __field(u16, tids)
1181 __field(int, num_frames)
1182 __field(int, reason)
1183 __field(bool, more_data)
1184 ),
1185
1186 TP_fast_assign(
1187 LOCAL_ASSIGN;
1188 STA_ASSIGN;
1189 __entry->tids = tids;
1190 __entry->num_frames = num_frames;
1191 __entry->reason = reason;
1192 __entry->more_data = more_data;
1193 ),
1194
1195 TP_printk(
1196 LOCAL_PR_FMT STA_PR_FMT
1197 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1198 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1199 __entry->reason, __entry->more_data
1200 )
1201);
1202
Johannes Berg40b96402011-09-29 16:04:38 +02001203DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1204 TP_PROTO(struct ieee80211_local *local,
1205 struct ieee80211_sta *sta,
1206 u16 tids, int num_frames,
1207 enum ieee80211_frame_release_type reason,
1208 bool more_data),
1209
1210 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1211);
1212
1213DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1214 TP_PROTO(struct ieee80211_local *local,
1215 struct ieee80211_sta *sta,
1216 u16 tids, int num_frames,
1217 enum ieee80211_frame_release_type reason,
1218 bool more_data),
1219
1220 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1221);
1222
Victor Goldenshtein66572cf2012-06-21 10:56:46 +03001223TRACE_EVENT(drv_get_rssi,
1224 TP_PROTO(struct ieee80211_local *local, struct ieee80211_sta *sta,
1225 s8 rssi, int ret),
1226
1227 TP_ARGS(local, sta, rssi, ret),
1228
1229 TP_STRUCT__entry(
1230 LOCAL_ENTRY
1231 STA_ENTRY
1232 __field(s8, rssi)
1233 __field(int, ret)
1234 ),
1235
1236 TP_fast_assign(
1237 LOCAL_ASSIGN;
1238 STA_ASSIGN;
1239 __entry->rssi = rssi;
1240 __entry->ret = ret;
1241 ),
1242
1243 TP_printk(
1244 LOCAL_PR_FMT STA_PR_FMT " rssi:%d ret:%d",
1245 LOCAL_PR_ARG, STA_PR_ARG, __entry->rssi, __entry->ret
1246 )
1247);
1248
Johannes Berga1845fc2012-06-27 13:18:36 +02001249DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
1250 TP_PROTO(struct ieee80211_local *local,
1251 struct ieee80211_sub_if_data *sdata),
1252
1253 TP_ARGS(local, sdata)
1254);
1255
Johannes Bergb5878a22010-04-07 16:48:40 +02001256/*
1257 * Tracing for API calls that drivers call.
1258 */
1259
1260TRACE_EVENT(api_start_tx_ba_session,
1261 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1262
1263 TP_ARGS(sta, tid),
1264
1265 TP_STRUCT__entry(
1266 STA_ENTRY
1267 __field(u16, tid)
1268 ),
1269
1270 TP_fast_assign(
1271 STA_ASSIGN;
1272 __entry->tid = tid;
1273 ),
1274
1275 TP_printk(
1276 STA_PR_FMT " tid:%d",
1277 STA_PR_ARG, __entry->tid
1278 )
1279);
1280
1281TRACE_EVENT(api_start_tx_ba_cb,
1282 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1283
1284 TP_ARGS(sdata, ra, tid),
1285
1286 TP_STRUCT__entry(
1287 VIF_ENTRY
1288 __array(u8, ra, ETH_ALEN)
1289 __field(u16, tid)
1290 ),
1291
1292 TP_fast_assign(
1293 VIF_ASSIGN;
1294 memcpy(__entry->ra, ra, ETH_ALEN);
1295 __entry->tid = tid;
1296 ),
1297
1298 TP_printk(
1299 VIF_PR_FMT " ra:%pM tid:%d",
1300 VIF_PR_ARG, __entry->ra, __entry->tid
1301 )
1302);
1303
1304TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001305 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001306
Johannes Berg6a8579d2010-05-27 14:41:07 +02001307 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001308
1309 TP_STRUCT__entry(
1310 STA_ENTRY
1311 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001312 ),
1313
1314 TP_fast_assign(
1315 STA_ASSIGN;
1316 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001317 ),
1318
1319 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001320 STA_PR_FMT " tid:%d",
1321 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001322 )
1323);
1324
1325TRACE_EVENT(api_stop_tx_ba_cb,
1326 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1327
1328 TP_ARGS(sdata, ra, tid),
1329
1330 TP_STRUCT__entry(
1331 VIF_ENTRY
1332 __array(u8, ra, ETH_ALEN)
1333 __field(u16, tid)
1334 ),
1335
1336 TP_fast_assign(
1337 VIF_ASSIGN;
1338 memcpy(__entry->ra, ra, ETH_ALEN);
1339 __entry->tid = tid;
1340 ),
1341
1342 TP_printk(
1343 VIF_PR_FMT " ra:%pM tid:%d",
1344 VIF_PR_ARG, __entry->ra, __entry->tid
1345 )
1346);
1347
Johannes Bergba99d932011-01-26 09:22:15 +01001348DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001349 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001350 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001351);
1352
1353TRACE_EVENT(api_beacon_loss,
1354 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1355
1356 TP_ARGS(sdata),
1357
1358 TP_STRUCT__entry(
1359 VIF_ENTRY
1360 ),
1361
1362 TP_fast_assign(
1363 VIF_ASSIGN;
1364 ),
1365
1366 TP_printk(
1367 VIF_PR_FMT,
1368 VIF_PR_ARG
1369 )
1370);
1371
1372TRACE_EVENT(api_connection_loss,
1373 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1374
1375 TP_ARGS(sdata),
1376
1377 TP_STRUCT__entry(
1378 VIF_ENTRY
1379 ),
1380
1381 TP_fast_assign(
1382 VIF_ASSIGN;
1383 ),
1384
1385 TP_printk(
1386 VIF_PR_FMT,
1387 VIF_PR_ARG
1388 )
1389);
1390
1391TRACE_EVENT(api_cqm_rssi_notify,
1392 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1393 enum nl80211_cqm_rssi_threshold_event rssi_event),
1394
1395 TP_ARGS(sdata, rssi_event),
1396
1397 TP_STRUCT__entry(
1398 VIF_ENTRY
1399 __field(u32, rssi_event)
1400 ),
1401
1402 TP_fast_assign(
1403 VIF_ASSIGN;
1404 __entry->rssi_event = rssi_event;
1405 ),
1406
1407 TP_printk(
1408 VIF_PR_FMT " event:%d",
1409 VIF_PR_ARG, __entry->rssi_event
1410 )
1411);
1412
1413TRACE_EVENT(api_scan_completed,
1414 TP_PROTO(struct ieee80211_local *local, bool aborted),
1415
1416 TP_ARGS(local, aborted),
1417
1418 TP_STRUCT__entry(
1419 LOCAL_ENTRY
1420 __field(bool, aborted)
1421 ),
1422
1423 TP_fast_assign(
1424 LOCAL_ASSIGN;
1425 __entry->aborted = aborted;
1426 ),
1427
1428 TP_printk(
1429 LOCAL_PR_FMT " aborted:%d",
1430 LOCAL_PR_ARG, __entry->aborted
1431 )
1432);
1433
Luciano Coelho79f460c2011-05-11 17:09:36 +03001434TRACE_EVENT(api_sched_scan_results,
1435 TP_PROTO(struct ieee80211_local *local),
1436
1437 TP_ARGS(local),
1438
1439 TP_STRUCT__entry(
1440 LOCAL_ENTRY
1441 ),
1442
1443 TP_fast_assign(
1444 LOCAL_ASSIGN;
1445 ),
1446
1447 TP_printk(
1448 LOCAL_PR_FMT, LOCAL_PR_ARG
1449 )
1450);
1451
1452TRACE_EVENT(api_sched_scan_stopped,
1453 TP_PROTO(struct ieee80211_local *local),
1454
1455 TP_ARGS(local),
1456
1457 TP_STRUCT__entry(
1458 LOCAL_ENTRY
1459 ),
1460
1461 TP_fast_assign(
1462 LOCAL_ASSIGN;
1463 ),
1464
1465 TP_printk(
1466 LOCAL_PR_FMT, LOCAL_PR_ARG
1467 )
1468);
1469
Johannes Bergb5878a22010-04-07 16:48:40 +02001470TRACE_EVENT(api_sta_block_awake,
1471 TP_PROTO(struct ieee80211_local *local,
1472 struct ieee80211_sta *sta, bool block),
1473
1474 TP_ARGS(local, sta, block),
1475
1476 TP_STRUCT__entry(
1477 LOCAL_ENTRY
1478 STA_ENTRY
1479 __field(bool, block)
1480 ),
1481
1482 TP_fast_assign(
1483 LOCAL_ASSIGN;
1484 STA_ASSIGN;
1485 __entry->block = block;
1486 ),
1487
1488 TP_printk(
1489 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1490 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
1491 )
1492);
1493
Johannes Berg5ce6e432010-05-11 16:20:57 +02001494TRACE_EVENT(api_chswitch_done,
1495 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1496
1497 TP_ARGS(sdata, success),
1498
1499 TP_STRUCT__entry(
1500 VIF_ENTRY
1501 __field(bool, success)
1502 ),
1503
1504 TP_fast_assign(
1505 VIF_ASSIGN;
1506 __entry->success = success;
1507 ),
1508
1509 TP_printk(
1510 VIF_PR_FMT " success=%d",
1511 VIF_PR_ARG, __entry->success
1512 )
1513);
1514
Johannes Bergba99d932011-01-26 09:22:15 +01001515DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001516 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001517 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001518);
1519
Johannes Bergba99d932011-01-26 09:22:15 +01001520DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001521 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001522 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001523);
1524
Johannes Bergc68f4b82011-07-05 16:35:41 +02001525TRACE_EVENT(api_gtk_rekey_notify,
1526 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1527 const u8 *bssid, const u8 *replay_ctr),
1528
1529 TP_ARGS(sdata, bssid, replay_ctr),
1530
1531 TP_STRUCT__entry(
1532 VIF_ENTRY
1533 __array(u8, bssid, ETH_ALEN)
1534 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1535 ),
1536
1537 TP_fast_assign(
1538 VIF_ASSIGN;
1539 memcpy(__entry->bssid, bssid, ETH_ALEN);
1540 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1541 ),
1542
1543 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1544);
1545
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001546TRACE_EVENT(api_enable_rssi_reports,
1547 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1548 int rssi_min_thold, int rssi_max_thold),
1549
1550 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1551
1552 TP_STRUCT__entry(
1553 VIF_ENTRY
1554 __field(int, rssi_min_thold)
1555 __field(int, rssi_max_thold)
1556 ),
1557
1558 TP_fast_assign(
1559 VIF_ASSIGN;
1560 __entry->rssi_min_thold = rssi_min_thold;
1561 __entry->rssi_max_thold = rssi_max_thold;
1562 ),
1563
1564 TP_printk(
1565 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
1566 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
1567 )
1568);
1569
Johannes Berg37fbd902011-09-29 16:04:39 +02001570TRACE_EVENT(api_eosp,
1571 TP_PROTO(struct ieee80211_local *local,
1572 struct ieee80211_sta *sta),
1573
1574 TP_ARGS(local, sta),
1575
1576 TP_STRUCT__entry(
1577 LOCAL_ENTRY
1578 STA_ENTRY
1579 ),
1580
1581 TP_fast_assign(
1582 LOCAL_ASSIGN;
1583 STA_ASSIGN;
1584 ),
1585
1586 TP_printk(
1587 LOCAL_PR_FMT STA_PR_FMT,
1588 LOCAL_PR_ARG, STA_PR_FMT
1589 )
1590);
1591
Johannes Bergb5878a22010-04-07 16:48:40 +02001592/*
1593 * Tracing for internal functions
1594 * (which may also be called in response to driver calls)
1595 */
1596
1597TRACE_EVENT(wake_queue,
1598 TP_PROTO(struct ieee80211_local *local, u16 queue,
1599 enum queue_stop_reason reason),
1600
1601 TP_ARGS(local, queue, reason),
1602
1603 TP_STRUCT__entry(
1604 LOCAL_ENTRY
1605 __field(u16, queue)
1606 __field(u32, reason)
1607 ),
1608
1609 TP_fast_assign(
1610 LOCAL_ASSIGN;
1611 __entry->queue = queue;
1612 __entry->reason = reason;
1613 ),
1614
1615 TP_printk(
1616 LOCAL_PR_FMT " queue:%d, reason:%d",
1617 LOCAL_PR_ARG, __entry->queue, __entry->reason
1618 )
1619);
1620
1621TRACE_EVENT(stop_queue,
1622 TP_PROTO(struct ieee80211_local *local, u16 queue,
1623 enum queue_stop_reason reason),
1624
1625 TP_ARGS(local, queue, reason),
1626
1627 TP_STRUCT__entry(
1628 LOCAL_ENTRY
1629 __field(u16, queue)
1630 __field(u32, reason)
1631 ),
1632
1633 TP_fast_assign(
1634 LOCAL_ASSIGN;
1635 __entry->queue = queue;
1636 __entry->reason = reason;
1637 ),
1638
1639 TP_printk(
1640 LOCAL_PR_FMT " queue:%d, reason:%d",
1641 LOCAL_PR_ARG, __entry->queue, __entry->reason
1642 )
1643);
Johannes Berg3fae0272012-06-22 13:36:25 +02001644
1645#ifdef CONFIG_MAC80211_MESSAGE_TRACING
1646#undef TRACE_SYSTEM
1647#define TRACE_SYSTEM mac80211_msg
1648
1649#define MAX_MSG_LEN 100
1650
1651DECLARE_EVENT_CLASS(mac80211_msg_event,
1652 TP_PROTO(struct va_format *vaf),
1653
1654 TP_ARGS(vaf),
1655
1656 TP_STRUCT__entry(
1657 __dynamic_array(char, msg, MAX_MSG_LEN)
1658 ),
1659
1660 TP_fast_assign(
1661 WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
1662 MAX_MSG_LEN, vaf->fmt,
1663 *vaf->va) >= MAX_MSG_LEN);
1664 ),
1665
1666 TP_printk("%s", __get_str(msg))
1667);
1668
1669DEFINE_EVENT(mac80211_msg_event, mac80211_info,
1670 TP_PROTO(struct va_format *vaf),
1671 TP_ARGS(vaf)
1672);
1673DEFINE_EVENT(mac80211_msg_event, mac80211_dbg,
1674 TP_PROTO(struct va_format *vaf),
1675 TP_ARGS(vaf)
1676);
1677DEFINE_EVENT(mac80211_msg_event, mac80211_err,
1678 TP_PROTO(struct va_format *vaf),
1679 TP_ARGS(vaf)
1680);
1681#endif
1682
Christian Lamparterf7428802009-07-19 23:21:07 +02001683#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001684
1685#undef TRACE_INCLUDE_PATH
1686#define TRACE_INCLUDE_PATH .
1687#undef TRACE_INCLUDE_FILE
Johannes Berg011ad0e2012-06-22 12:55:52 +02001688#define TRACE_INCLUDE_FILE trace
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001689#include <trace/define_trace.h>