blob: 18d9c8a52e9e72d98686778bb7bcab974119e638 [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
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;
Johannes Berg3d01be72012-07-26 14:27:39 +0200277 __entry->long_frame_max_tx_count =
278 local->hw.conf.long_frame_max_tx_count;
279 __entry->short_frame_max_tx_count =
280 local->hw.conf.short_frame_max_tx_count;
281 __entry->center_freq = local->hw.conf.channel ?
282 local->hw.conf.channel->center_freq : 0;
Johannes Bergf911ab82009-11-25 19:07:20 +0100283 __entry->channel_type = local->hw.conf.channel_type;
Johannes Berg0f782312009-12-01 13:37:02 +0100284 __entry->smps = local->hw.conf.smps_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200285 ),
286
287 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200288 LOCAL_PR_FMT " ch:%#x freq:%d",
289 LOCAL_PR_ARG, __entry->changed, __entry->center_freq
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200290 )
291);
292
293TRACE_EVENT(drv_bss_info_changed,
294 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100295 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200296 struct ieee80211_bss_conf *info,
297 u32 changed),
298
Johannes Berg12375ef2009-11-25 20:30:31 +0100299 TP_ARGS(local, sdata, info, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200300
301 TP_STRUCT__entry(
302 LOCAL_ENTRY
303 VIF_ENTRY
304 __field(bool, assoc)
305 __field(u16, aid)
306 __field(bool, cts)
307 __field(bool, shortpre)
308 __field(bool, shortslot)
309 __field(u8, dtimper)
310 __field(u16, bcnint)
311 __field(u16, assoc_cap)
Johannes Berg8c358bc2012-05-22 22:13:05 +0200312 __field(u64, sync_tsf)
313 __field(u32, sync_device_ts)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200314 __field(u32, basic_rates)
315 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100316 __field(bool, enable_beacon)
317 __field(u16, ht_operation_mode)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200318 ),
319
320 TP_fast_assign(
321 LOCAL_ASSIGN;
322 VIF_ASSIGN;
323 __entry->changed = changed;
324 __entry->aid = info->aid;
325 __entry->assoc = info->assoc;
326 __entry->shortpre = info->use_short_preamble;
327 __entry->cts = info->use_cts_prot;
328 __entry->shortslot = info->use_short_slot;
329 __entry->dtimper = info->dtim_period;
330 __entry->bcnint = info->beacon_int;
331 __entry->assoc_cap = info->assoc_capability;
Johannes Berg8c358bc2012-05-22 22:13:05 +0200332 __entry->sync_tsf = info->sync_tsf;
333 __entry->sync_device_ts = info->sync_device_ts;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200334 __entry->basic_rates = info->basic_rates;
Johannes Bergf911ab82009-11-25 19:07:20 +0100335 __entry->enable_beacon = info->enable_beacon;
336 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200337 ),
338
339 TP_printk(
340 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
341 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
342 )
343);
344
Johannes Berg3ac64be2009-08-17 16:16:53 +0200345TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200346 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200347
Johannes Berg4efc76b2010-06-10 10:56:20 +0200348 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200349
350 TP_STRUCT__entry(
351 LOCAL_ENTRY
352 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200353 ),
354
355 TP_fast_assign(
356 LOCAL_ASSIGN;
357 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200358 ),
359
360 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200361 LOCAL_PR_FMT " prepare mc (%d)",
362 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200363 )
364);
365
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200366TRACE_EVENT(drv_configure_filter,
367 TP_PROTO(struct ieee80211_local *local,
368 unsigned int changed_flags,
369 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200370 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200371
Johannes Berg3ac64be2009-08-17 16:16:53 +0200372 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200373
374 TP_STRUCT__entry(
375 LOCAL_ENTRY
376 __field(unsigned int, changed)
377 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200378 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200379 ),
380
381 TP_fast_assign(
382 LOCAL_ASSIGN;
383 __entry->changed = changed_flags;
384 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200385 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200386 ),
387
388 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200389 LOCAL_PR_FMT " changed:%#x total:%#x",
390 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200391 )
392);
393
394TRACE_EVENT(drv_set_tim,
395 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200396 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200397
Johannes Berg4efc76b2010-06-10 10:56:20 +0200398 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200399
400 TP_STRUCT__entry(
401 LOCAL_ENTRY
402 STA_ENTRY
403 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200404 ),
405
406 TP_fast_assign(
407 LOCAL_ASSIGN;
408 STA_ASSIGN;
409 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200410 ),
411
412 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200413 LOCAL_PR_FMT STA_PR_FMT " set:%d",
414 LOCAL_PR_ARG, STA_PR_FMT, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200415 )
416);
417
418TRACE_EVENT(drv_set_key,
419 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100420 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200421 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200422 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200423
Johannes Berg4efc76b2010-06-10 10:56:20 +0200424 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200425
426 TP_STRUCT__entry(
427 LOCAL_ENTRY
428 VIF_ENTRY
429 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200430 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200431 __field(u8, hw_key_idx)
432 __field(u8, flags)
433 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200434 ),
435
436 TP_fast_assign(
437 LOCAL_ASSIGN;
438 VIF_ASSIGN;
439 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200440 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200441 __entry->flags = key->flags;
442 __entry->keyidx = key->keyidx;
443 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200444 ),
445
446 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200447 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
448 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200449 )
450);
451
452TRACE_EVENT(drv_update_tkip_key,
453 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100454 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200455 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100456 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200457
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100458 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200459
460 TP_STRUCT__entry(
461 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100462 VIF_ENTRY
463 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200464 __field(u32, iv32)
465 ),
466
467 TP_fast_assign(
468 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100469 VIF_ASSIGN;
470 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200471 __entry->iv32 = iv32;
472 ),
473
474 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100475 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
476 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200477 )
478);
479
Luciano Coelho79f460c2011-05-11 17:09:36 +0300480DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200481 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300482 struct ieee80211_sub_if_data *sdata),
483 TP_ARGS(local, sdata)
484);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200485
Eliad Pellerb8564392011-06-13 12:47:30 +0300486DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
487 TP_PROTO(struct ieee80211_local *local,
488 struct ieee80211_sub_if_data *sdata),
489 TP_ARGS(local, sdata)
490);
491
Luciano Coelho79f460c2011-05-11 17:09:36 +0300492DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
493 TP_PROTO(struct ieee80211_local *local,
494 struct ieee80211_sub_if_data *sdata),
495 TP_ARGS(local, sdata)
496);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200497
Luciano Coelho79f460c2011-05-11 17:09:36 +0300498DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
499 TP_PROTO(struct ieee80211_local *local,
500 struct ieee80211_sub_if_data *sdata),
501 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200502);
503
Johannes Bergba99d932011-01-26 09:22:15 +0100504DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200505 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100506 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200507);
508
Johannes Bergba99d932011-01-26 09:22:15 +0100509DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200510 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100511 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200512);
513
514TRACE_EVENT(drv_get_stats,
515 TP_PROTO(struct ieee80211_local *local,
516 struct ieee80211_low_level_stats *stats,
517 int ret),
518
519 TP_ARGS(local, stats, ret),
520
521 TP_STRUCT__entry(
522 LOCAL_ENTRY
523 __field(int, ret)
524 __field(unsigned int, ackfail)
525 __field(unsigned int, rtsfail)
526 __field(unsigned int, fcserr)
527 __field(unsigned int, rtssucc)
528 ),
529
530 TP_fast_assign(
531 LOCAL_ASSIGN;
532 __entry->ret = ret;
533 __entry->ackfail = stats->dot11ACKFailureCount;
534 __entry->rtsfail = stats->dot11RTSFailureCount;
535 __entry->fcserr = stats->dot11FCSErrorCount;
536 __entry->rtssucc = stats->dot11RTSSuccessCount;
537 ),
538
539 TP_printk(
540 LOCAL_PR_FMT " ret:%d",
541 LOCAL_PR_ARG, __entry->ret
542 )
543);
544
545TRACE_EVENT(drv_get_tkip_seq,
546 TP_PROTO(struct ieee80211_local *local,
547 u8 hw_key_idx, u32 *iv32, u16 *iv16),
548
549 TP_ARGS(local, hw_key_idx, iv32, iv16),
550
551 TP_STRUCT__entry(
552 LOCAL_ENTRY
553 __field(u8, hw_key_idx)
554 __field(u32, iv32)
555 __field(u16, iv16)
556 ),
557
558 TP_fast_assign(
559 LOCAL_ASSIGN;
560 __entry->hw_key_idx = hw_key_idx;
561 __entry->iv32 = *iv32;
562 __entry->iv16 = *iv16;
563 ),
564
565 TP_printk(
566 LOCAL_PR_FMT, LOCAL_PR_ARG
567 )
568);
569
Luciano Coelho92ddc112011-05-09 14:40:06 +0300570DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200571 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300572 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200573);
574
Luciano Coelho92ddc112011-05-09 14:40:06 +0300575DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200576 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300577 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200578);
579
Lukáš Turek310bc672009-12-21 22:50:48 +0100580TRACE_EVENT(drv_set_coverage_class,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200581 TP_PROTO(struct ieee80211_local *local, u8 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100582
Johannes Berg4efc76b2010-06-10 10:56:20 +0200583 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100584
585 TP_STRUCT__entry(
586 LOCAL_ENTRY
587 __field(u8, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100588 ),
589
590 TP_fast_assign(
591 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100592 __entry->value = value;
593 ),
594
595 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200596 LOCAL_PR_FMT " value:%d",
597 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100598 )
599);
600
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200601TRACE_EVENT(drv_sta_notify,
602 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100603 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200604 enum sta_notify_cmd cmd,
605 struct ieee80211_sta *sta),
606
Johannes Berg12375ef2009-11-25 20:30:31 +0100607 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200608
609 TP_STRUCT__entry(
610 LOCAL_ENTRY
611 VIF_ENTRY
612 STA_ENTRY
613 __field(u32, cmd)
614 ),
615
616 TP_fast_assign(
617 LOCAL_ASSIGN;
618 VIF_ASSIGN;
619 STA_ASSIGN;
620 __entry->cmd = cmd;
621 ),
622
623 TP_printk(
624 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
625 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
626 )
627);
628
Johannes Bergf09603a2012-01-20 13:55:21 +0100629TRACE_EVENT(drv_sta_state,
630 TP_PROTO(struct ieee80211_local *local,
631 struct ieee80211_sub_if_data *sdata,
632 struct ieee80211_sta *sta,
633 enum ieee80211_sta_state old_state,
634 enum ieee80211_sta_state new_state),
635
636 TP_ARGS(local, sdata, sta, old_state, new_state),
637
638 TP_STRUCT__entry(
639 LOCAL_ENTRY
640 VIF_ENTRY
641 STA_ENTRY
642 __field(u32, old_state)
643 __field(u32, new_state)
644 ),
645
646 TP_fast_assign(
647 LOCAL_ASSIGN;
648 VIF_ASSIGN;
649 STA_ASSIGN;
650 __entry->old_state = old_state;
651 __entry->new_state = new_state;
652 ),
653
654 TP_printk(
655 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
656 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
657 __entry->old_state, __entry->new_state
658 )
659);
660
Johannes Berg8f727ef2012-03-30 08:43:32 +0200661TRACE_EVENT(drv_sta_rc_update,
662 TP_PROTO(struct ieee80211_local *local,
663 struct ieee80211_sub_if_data *sdata,
664 struct ieee80211_sta *sta,
665 u32 changed),
666
667 TP_ARGS(local, sdata, sta, changed),
668
669 TP_STRUCT__entry(
670 LOCAL_ENTRY
671 VIF_ENTRY
672 STA_ENTRY
673 __field(u32, changed)
674 ),
675
676 TP_fast_assign(
677 LOCAL_ASSIGN;
678 VIF_ASSIGN;
679 STA_ASSIGN;
680 __entry->changed = changed;
681 ),
682
683 TP_printk(
684 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
685 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
686 )
687);
688
Johannes Berg34e89502010-02-03 13:59:58 +0100689TRACE_EVENT(drv_sta_add,
690 TP_PROTO(struct ieee80211_local *local,
691 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200692 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100693
Johannes Berg4efc76b2010-06-10 10:56:20 +0200694 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100695
696 TP_STRUCT__entry(
697 LOCAL_ENTRY
698 VIF_ENTRY
699 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100700 ),
701
702 TP_fast_assign(
703 LOCAL_ASSIGN;
704 VIF_ASSIGN;
705 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100706 ),
707
708 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200709 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
710 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100711 )
712);
713
714TRACE_EVENT(drv_sta_remove,
715 TP_PROTO(struct ieee80211_local *local,
716 struct ieee80211_sub_if_data *sdata,
717 struct ieee80211_sta *sta),
718
719 TP_ARGS(local, sdata, sta),
720
721 TP_STRUCT__entry(
722 LOCAL_ENTRY
723 VIF_ENTRY
724 STA_ENTRY
725 ),
726
727 TP_fast_assign(
728 LOCAL_ASSIGN;
729 VIF_ASSIGN;
730 STA_ASSIGN;
731 ),
732
733 TP_printk(
734 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
735 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
736 )
737);
738
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200739TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300740 TP_PROTO(struct ieee80211_local *local,
741 struct ieee80211_sub_if_data *sdata,
Johannes Berga3304b02012-03-28 11:04:24 +0200742 u16 ac, const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200743
Johannes Berga3304b02012-03-28 11:04:24 +0200744 TP_ARGS(local, sdata, ac, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200745
746 TP_STRUCT__entry(
747 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300748 VIF_ENTRY
Johannes Berga3304b02012-03-28 11:04:24 +0200749 __field(u16, ac)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200750 __field(u16, txop)
751 __field(u16, cw_min)
752 __field(u16, cw_max)
753 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300754 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200755 ),
756
757 TP_fast_assign(
758 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300759 VIF_ASSIGN;
Johannes Berga3304b02012-03-28 11:04:24 +0200760 __entry->ac = ac;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200761 __entry->txop = params->txop;
762 __entry->cw_max = params->cw_max;
763 __entry->cw_min = params->cw_min;
764 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300765 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200766 ),
767
768 TP_printk(
Johannes Berga3304b02012-03-28 11:04:24 +0200769 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
770 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200771 )
772);
773
Eliad Peller37a41b42011-09-21 14:06:11 +0300774DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
775 TP_PROTO(struct ieee80211_local *local,
776 struct ieee80211_sub_if_data *sdata),
777 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200778);
779
780TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +0300781 TP_PROTO(struct ieee80211_local *local,
782 struct ieee80211_sub_if_data *sdata,
783 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200784
Eliad Peller37a41b42011-09-21 14:06:11 +0300785 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200786
787 TP_STRUCT__entry(
788 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +0300789 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200790 __field(u64, tsf)
791 ),
792
793 TP_fast_assign(
794 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +0300795 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200796 __entry->tsf = tsf;
797 ),
798
799 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +0300800 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
801 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200802 )
803);
804
Eliad Peller37a41b42011-09-21 14:06:11 +0300805DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
806 TP_PROTO(struct ieee80211_local *local,
807 struct ieee80211_sub_if_data *sdata),
808 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200809);
810
Johannes Bergba99d932011-01-26 09:22:15 +0100811DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200812 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100813 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200814);
815
816TRACE_EVENT(drv_ampdu_action,
817 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100818 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200819 enum ieee80211_ampdu_mlme_action action,
820 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100821 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200822
Johannes Berg0b01f032011-01-18 13:51:05 +0100823 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200824
825 TP_STRUCT__entry(
826 LOCAL_ENTRY
827 STA_ENTRY
828 __field(u32, action)
829 __field(u16, tid)
830 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100831 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100832 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200833 ),
834
835 TP_fast_assign(
836 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100837 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200838 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200839 __entry->action = action;
840 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800841 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100842 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200843 ),
844
845 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100846 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
847 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
848 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200849 )
850);
Johannes Berga80f7c02009-12-23 13:15:32 +0100851
John W. Linvillec466d4e2010-06-29 14:51:23 -0400852TRACE_EVENT(drv_get_survey,
853 TP_PROTO(struct ieee80211_local *local, int idx,
854 struct survey_info *survey),
855
856 TP_ARGS(local, idx, survey),
857
858 TP_STRUCT__entry(
859 LOCAL_ENTRY
860 __field(int, idx)
861 ),
862
863 TP_fast_assign(
864 LOCAL_ASSIGN;
865 __entry->idx = idx;
866 ),
867
868 TP_printk(
869 LOCAL_PR_FMT " idx:%d",
870 LOCAL_PR_ARG, __entry->idx
871 )
872);
873
Johannes Berga80f7c02009-12-23 13:15:32 +0100874TRACE_EVENT(drv_flush,
875 TP_PROTO(struct ieee80211_local *local, bool drop),
876
877 TP_ARGS(local, drop),
878
879 TP_STRUCT__entry(
880 LOCAL_ENTRY
881 __field(bool, drop)
882 ),
883
884 TP_fast_assign(
885 LOCAL_ASSIGN;
886 __entry->drop = drop;
887 ),
888
889 TP_printk(
890 LOCAL_PR_FMT " drop:%d",
891 LOCAL_PR_ARG, __entry->drop
892 )
893);
Johannes Bergb5878a22010-04-07 16:48:40 +0200894
Johannes Berg5ce6e432010-05-11 16:20:57 +0200895TRACE_EVENT(drv_channel_switch,
896 TP_PROTO(struct ieee80211_local *local,
897 struct ieee80211_channel_switch *ch_switch),
898
899 TP_ARGS(local, ch_switch),
900
901 TP_STRUCT__entry(
902 LOCAL_ENTRY
903 __field(u64, timestamp)
904 __field(bool, block_tx)
905 __field(u16, freq)
906 __field(u8, count)
907 ),
908
909 TP_fast_assign(
910 LOCAL_ASSIGN;
911 __entry->timestamp = ch_switch->timestamp;
912 __entry->block_tx = ch_switch->block_tx;
913 __entry->freq = ch_switch->channel->center_freq;
914 __entry->count = ch_switch->count;
915 ),
916
917 TP_printk(
918 LOCAL_PR_FMT " new freq:%u count:%d",
919 LOCAL_PR_ARG, __entry->freq, __entry->count
920 )
921);
922
Bruno Randolf15d96752010-11-10 12:50:56 +0900923TRACE_EVENT(drv_set_antenna,
924 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
925
926 TP_ARGS(local, tx_ant, rx_ant, ret),
927
928 TP_STRUCT__entry(
929 LOCAL_ENTRY
930 __field(u32, tx_ant)
931 __field(u32, rx_ant)
932 __field(int, ret)
933 ),
934
935 TP_fast_assign(
936 LOCAL_ASSIGN;
937 __entry->tx_ant = tx_ant;
938 __entry->rx_ant = rx_ant;
939 __entry->ret = ret;
940 ),
941
942 TP_printk(
943 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
944 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
945 )
946);
947
948TRACE_EVENT(drv_get_antenna,
949 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
950
951 TP_ARGS(local, tx_ant, rx_ant, ret),
952
953 TP_STRUCT__entry(
954 LOCAL_ENTRY
955 __field(u32, tx_ant)
956 __field(u32, rx_ant)
957 __field(int, ret)
958 ),
959
960 TP_fast_assign(
961 LOCAL_ASSIGN;
962 __entry->tx_ant = tx_ant;
963 __entry->rx_ant = rx_ant;
964 __entry->ret = ret;
965 ),
966
967 TP_printk(
968 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
969 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
970 )
971);
972
Johannes Berg21f83582010-12-18 17:20:47 +0100973TRACE_EVENT(drv_remain_on_channel,
974 TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
975 enum nl80211_channel_type chantype, unsigned int duration),
976
977 TP_ARGS(local, chan, chantype, duration),
978
979 TP_STRUCT__entry(
980 LOCAL_ENTRY
981 __field(int, center_freq)
982 __field(int, channel_type)
983 __field(unsigned int, duration)
984 ),
985
986 TP_fast_assign(
987 LOCAL_ASSIGN;
988 __entry->center_freq = chan->center_freq;
989 __entry->channel_type = chantype;
990 __entry->duration = duration;
991 ),
992
993 TP_printk(
994 LOCAL_PR_FMT " freq:%dMHz duration:%dms",
995 LOCAL_PR_ARG, __entry->center_freq, __entry->duration
996 )
997);
998
Johannes Bergba99d932011-01-26 09:22:15 +0100999DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001000 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001001 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001002);
1003
Johannes Berg5f16a432011-02-25 15:36:57 +01001004TRACE_EVENT(drv_offchannel_tx,
1005 TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
1006 struct ieee80211_channel *chan,
1007 enum nl80211_channel_type channel_type,
1008 unsigned int wait),
1009
1010 TP_ARGS(local, skb, chan, channel_type, wait),
1011
1012 TP_STRUCT__entry(
1013 LOCAL_ENTRY
1014 __field(int, center_freq)
1015 __field(int, channel_type)
1016 __field(unsigned int, wait)
1017 ),
1018
1019 TP_fast_assign(
1020 LOCAL_ASSIGN;
1021 __entry->center_freq = chan->center_freq;
1022 __entry->channel_type = channel_type;
1023 __entry->wait = wait;
1024 ),
1025
1026 TP_printk(
1027 LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
1028 LOCAL_PR_ARG, __entry->center_freq, __entry->wait
1029 )
1030);
1031
John W. Linville38c09152011-03-07 16:19:18 -05001032TRACE_EVENT(drv_set_ringparam,
1033 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1034
1035 TP_ARGS(local, tx, rx),
1036
1037 TP_STRUCT__entry(
1038 LOCAL_ENTRY
1039 __field(u32, tx)
1040 __field(u32, rx)
1041 ),
1042
1043 TP_fast_assign(
1044 LOCAL_ASSIGN;
1045 __entry->tx = tx;
1046 __entry->rx = rx;
1047 ),
1048
1049 TP_printk(
1050 LOCAL_PR_FMT " tx:%d rx %d",
1051 LOCAL_PR_ARG, __entry->tx, __entry->rx
1052 )
1053);
1054
1055TRACE_EVENT(drv_get_ringparam,
1056 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1057 u32 *rx, u32 *rx_max),
1058
1059 TP_ARGS(local, tx, tx_max, rx, rx_max),
1060
1061 TP_STRUCT__entry(
1062 LOCAL_ENTRY
1063 __field(u32, tx)
1064 __field(u32, tx_max)
1065 __field(u32, rx)
1066 __field(u32, rx_max)
1067 ),
1068
1069 TP_fast_assign(
1070 LOCAL_ASSIGN;
1071 __entry->tx = *tx;
1072 __entry->tx_max = *tx_max;
1073 __entry->rx = *rx;
1074 __entry->rx_max = *rx_max;
1075 ),
1076
1077 TP_printk(
1078 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1079 LOCAL_PR_ARG,
1080 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1081 )
1082);
1083
Vivek Natarajane8306f92011-04-06 11:41:10 +05301084DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1085 TP_PROTO(struct ieee80211_local *local),
1086 TP_ARGS(local)
1087);
1088
Johannes Berg5f16a432011-02-25 15:36:57 +01001089DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1090 TP_PROTO(struct ieee80211_local *local),
1091 TP_ARGS(local)
1092);
1093
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301094TRACE_EVENT(drv_set_bitrate_mask,
1095 TP_PROTO(struct ieee80211_local *local,
1096 struct ieee80211_sub_if_data *sdata,
1097 const struct cfg80211_bitrate_mask *mask),
1098
1099 TP_ARGS(local, sdata, mask),
1100
1101 TP_STRUCT__entry(
1102 LOCAL_ENTRY
1103 VIF_ENTRY
1104 __field(u32, legacy_2g)
1105 __field(u32, legacy_5g)
1106 ),
1107
1108 TP_fast_assign(
1109 LOCAL_ASSIGN;
1110 VIF_ASSIGN;
1111 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1112 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1113 ),
1114
1115 TP_printk(
1116 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1117 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1118 )
1119);
1120
Johannes Bergc68f4b82011-07-05 16:35:41 +02001121TRACE_EVENT(drv_set_rekey_data,
1122 TP_PROTO(struct ieee80211_local *local,
1123 struct ieee80211_sub_if_data *sdata,
1124 struct cfg80211_gtk_rekey_data *data),
1125
1126 TP_ARGS(local, sdata, data),
1127
1128 TP_STRUCT__entry(
1129 LOCAL_ENTRY
1130 VIF_ENTRY
1131 __array(u8, kek, NL80211_KEK_LEN)
1132 __array(u8, kck, NL80211_KCK_LEN)
1133 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1134 ),
1135
1136 TP_fast_assign(
1137 LOCAL_ASSIGN;
1138 VIF_ASSIGN;
1139 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1140 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1141 memcpy(__entry->replay_ctr, data->replay_ctr,
1142 NL80211_REPLAY_CTR_LEN);
1143 ),
1144
1145 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1146 LOCAL_PR_ARG, VIF_PR_ARG)
1147);
1148
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001149TRACE_EVENT(drv_rssi_callback,
1150 TP_PROTO(struct ieee80211_local *local,
1151 enum ieee80211_rssi_event rssi_event),
1152
1153 TP_ARGS(local, rssi_event),
1154
1155 TP_STRUCT__entry(
1156 LOCAL_ENTRY
1157 __field(u32, rssi_event)
1158 ),
1159
1160 TP_fast_assign(
1161 LOCAL_ASSIGN;
1162 __entry->rssi_event = rssi_event;
1163 ),
1164
1165 TP_printk(
1166 LOCAL_PR_FMT " rssi_event:%d",
1167 LOCAL_PR_ARG, __entry->rssi_event
1168 )
1169);
1170
Johannes Berg40b96402011-09-29 16:04:38 +02001171DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001172 TP_PROTO(struct ieee80211_local *local,
1173 struct ieee80211_sta *sta,
1174 u16 tids, int num_frames,
1175 enum ieee80211_frame_release_type reason,
1176 bool more_data),
1177
1178 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1179
1180 TP_STRUCT__entry(
1181 LOCAL_ENTRY
1182 STA_ENTRY
1183 __field(u16, tids)
1184 __field(int, num_frames)
1185 __field(int, reason)
1186 __field(bool, more_data)
1187 ),
1188
1189 TP_fast_assign(
1190 LOCAL_ASSIGN;
1191 STA_ASSIGN;
1192 __entry->tids = tids;
1193 __entry->num_frames = num_frames;
1194 __entry->reason = reason;
1195 __entry->more_data = more_data;
1196 ),
1197
1198 TP_printk(
1199 LOCAL_PR_FMT STA_PR_FMT
1200 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1201 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1202 __entry->reason, __entry->more_data
1203 )
1204);
1205
Johannes Berg40b96402011-09-29 16:04:38 +02001206DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1207 TP_PROTO(struct ieee80211_local *local,
1208 struct ieee80211_sta *sta,
1209 u16 tids, int num_frames,
1210 enum ieee80211_frame_release_type reason,
1211 bool more_data),
1212
1213 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1214);
1215
1216DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1217 TP_PROTO(struct ieee80211_local *local,
1218 struct ieee80211_sta *sta,
1219 u16 tids, int num_frames,
1220 enum ieee80211_frame_release_type reason,
1221 bool more_data),
1222
1223 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1224);
1225
Victor Goldenshtein66572cf2012-06-21 10:56:46 +03001226TRACE_EVENT(drv_get_rssi,
1227 TP_PROTO(struct ieee80211_local *local, struct ieee80211_sta *sta,
1228 s8 rssi, int ret),
1229
1230 TP_ARGS(local, sta, rssi, ret),
1231
1232 TP_STRUCT__entry(
1233 LOCAL_ENTRY
1234 STA_ENTRY
1235 __field(s8, rssi)
1236 __field(int, ret)
1237 ),
1238
1239 TP_fast_assign(
1240 LOCAL_ASSIGN;
1241 STA_ASSIGN;
1242 __entry->rssi = rssi;
1243 __entry->ret = ret;
1244 ),
1245
1246 TP_printk(
1247 LOCAL_PR_FMT STA_PR_FMT " rssi:%d ret:%d",
1248 LOCAL_PR_ARG, STA_PR_ARG, __entry->rssi, __entry->ret
1249 )
1250);
1251
Johannes Berga1845fc2012-06-27 13:18:36 +02001252DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
1253 TP_PROTO(struct ieee80211_local *local,
1254 struct ieee80211_sub_if_data *sdata),
1255
1256 TP_ARGS(local, sdata)
1257);
1258
Johannes Bergb5878a22010-04-07 16:48:40 +02001259/*
1260 * Tracing for API calls that drivers call.
1261 */
1262
1263TRACE_EVENT(api_start_tx_ba_session,
1264 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1265
1266 TP_ARGS(sta, tid),
1267
1268 TP_STRUCT__entry(
1269 STA_ENTRY
1270 __field(u16, tid)
1271 ),
1272
1273 TP_fast_assign(
1274 STA_ASSIGN;
1275 __entry->tid = tid;
1276 ),
1277
1278 TP_printk(
1279 STA_PR_FMT " tid:%d",
1280 STA_PR_ARG, __entry->tid
1281 )
1282);
1283
1284TRACE_EVENT(api_start_tx_ba_cb,
1285 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1286
1287 TP_ARGS(sdata, ra, tid),
1288
1289 TP_STRUCT__entry(
1290 VIF_ENTRY
1291 __array(u8, ra, ETH_ALEN)
1292 __field(u16, tid)
1293 ),
1294
1295 TP_fast_assign(
1296 VIF_ASSIGN;
1297 memcpy(__entry->ra, ra, ETH_ALEN);
1298 __entry->tid = tid;
1299 ),
1300
1301 TP_printk(
1302 VIF_PR_FMT " ra:%pM tid:%d",
1303 VIF_PR_ARG, __entry->ra, __entry->tid
1304 )
1305);
1306
1307TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001308 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001309
Johannes Berg6a8579d2010-05-27 14:41:07 +02001310 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001311
1312 TP_STRUCT__entry(
1313 STA_ENTRY
1314 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001315 ),
1316
1317 TP_fast_assign(
1318 STA_ASSIGN;
1319 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001320 ),
1321
1322 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001323 STA_PR_FMT " tid:%d",
1324 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001325 )
1326);
1327
1328TRACE_EVENT(api_stop_tx_ba_cb,
1329 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1330
1331 TP_ARGS(sdata, ra, tid),
1332
1333 TP_STRUCT__entry(
1334 VIF_ENTRY
1335 __array(u8, ra, ETH_ALEN)
1336 __field(u16, tid)
1337 ),
1338
1339 TP_fast_assign(
1340 VIF_ASSIGN;
1341 memcpy(__entry->ra, ra, ETH_ALEN);
1342 __entry->tid = tid;
1343 ),
1344
1345 TP_printk(
1346 VIF_PR_FMT " ra:%pM tid:%d",
1347 VIF_PR_ARG, __entry->ra, __entry->tid
1348 )
1349);
1350
Johannes Bergba99d932011-01-26 09:22:15 +01001351DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001352 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001353 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001354);
1355
1356TRACE_EVENT(api_beacon_loss,
1357 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1358
1359 TP_ARGS(sdata),
1360
1361 TP_STRUCT__entry(
1362 VIF_ENTRY
1363 ),
1364
1365 TP_fast_assign(
1366 VIF_ASSIGN;
1367 ),
1368
1369 TP_printk(
1370 VIF_PR_FMT,
1371 VIF_PR_ARG
1372 )
1373);
1374
1375TRACE_EVENT(api_connection_loss,
1376 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1377
1378 TP_ARGS(sdata),
1379
1380 TP_STRUCT__entry(
1381 VIF_ENTRY
1382 ),
1383
1384 TP_fast_assign(
1385 VIF_ASSIGN;
1386 ),
1387
1388 TP_printk(
1389 VIF_PR_FMT,
1390 VIF_PR_ARG
1391 )
1392);
1393
1394TRACE_EVENT(api_cqm_rssi_notify,
1395 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1396 enum nl80211_cqm_rssi_threshold_event rssi_event),
1397
1398 TP_ARGS(sdata, rssi_event),
1399
1400 TP_STRUCT__entry(
1401 VIF_ENTRY
1402 __field(u32, rssi_event)
1403 ),
1404
1405 TP_fast_assign(
1406 VIF_ASSIGN;
1407 __entry->rssi_event = rssi_event;
1408 ),
1409
1410 TP_printk(
1411 VIF_PR_FMT " event:%d",
1412 VIF_PR_ARG, __entry->rssi_event
1413 )
1414);
1415
1416TRACE_EVENT(api_scan_completed,
1417 TP_PROTO(struct ieee80211_local *local, bool aborted),
1418
1419 TP_ARGS(local, aborted),
1420
1421 TP_STRUCT__entry(
1422 LOCAL_ENTRY
1423 __field(bool, aborted)
1424 ),
1425
1426 TP_fast_assign(
1427 LOCAL_ASSIGN;
1428 __entry->aborted = aborted;
1429 ),
1430
1431 TP_printk(
1432 LOCAL_PR_FMT " aborted:%d",
1433 LOCAL_PR_ARG, __entry->aborted
1434 )
1435);
1436
Luciano Coelho79f460c2011-05-11 17:09:36 +03001437TRACE_EVENT(api_sched_scan_results,
1438 TP_PROTO(struct ieee80211_local *local),
1439
1440 TP_ARGS(local),
1441
1442 TP_STRUCT__entry(
1443 LOCAL_ENTRY
1444 ),
1445
1446 TP_fast_assign(
1447 LOCAL_ASSIGN;
1448 ),
1449
1450 TP_printk(
1451 LOCAL_PR_FMT, LOCAL_PR_ARG
1452 )
1453);
1454
1455TRACE_EVENT(api_sched_scan_stopped,
1456 TP_PROTO(struct ieee80211_local *local),
1457
1458 TP_ARGS(local),
1459
1460 TP_STRUCT__entry(
1461 LOCAL_ENTRY
1462 ),
1463
1464 TP_fast_assign(
1465 LOCAL_ASSIGN;
1466 ),
1467
1468 TP_printk(
1469 LOCAL_PR_FMT, LOCAL_PR_ARG
1470 )
1471);
1472
Johannes Bergb5878a22010-04-07 16:48:40 +02001473TRACE_EVENT(api_sta_block_awake,
1474 TP_PROTO(struct ieee80211_local *local,
1475 struct ieee80211_sta *sta, bool block),
1476
1477 TP_ARGS(local, sta, block),
1478
1479 TP_STRUCT__entry(
1480 LOCAL_ENTRY
1481 STA_ENTRY
1482 __field(bool, block)
1483 ),
1484
1485 TP_fast_assign(
1486 LOCAL_ASSIGN;
1487 STA_ASSIGN;
1488 __entry->block = block;
1489 ),
1490
1491 TP_printk(
1492 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1493 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
1494 )
1495);
1496
Johannes Berg5ce6e432010-05-11 16:20:57 +02001497TRACE_EVENT(api_chswitch_done,
1498 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1499
1500 TP_ARGS(sdata, success),
1501
1502 TP_STRUCT__entry(
1503 VIF_ENTRY
1504 __field(bool, success)
1505 ),
1506
1507 TP_fast_assign(
1508 VIF_ASSIGN;
1509 __entry->success = success;
1510 ),
1511
1512 TP_printk(
1513 VIF_PR_FMT " success=%d",
1514 VIF_PR_ARG, __entry->success
1515 )
1516);
1517
Johannes Bergba99d932011-01-26 09:22:15 +01001518DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001519 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001520 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001521);
1522
Johannes Bergba99d932011-01-26 09:22:15 +01001523DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001524 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001525 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001526);
1527
Johannes Bergc68f4b82011-07-05 16:35:41 +02001528TRACE_EVENT(api_gtk_rekey_notify,
1529 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1530 const u8 *bssid, const u8 *replay_ctr),
1531
1532 TP_ARGS(sdata, bssid, replay_ctr),
1533
1534 TP_STRUCT__entry(
1535 VIF_ENTRY
1536 __array(u8, bssid, ETH_ALEN)
1537 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1538 ),
1539
1540 TP_fast_assign(
1541 VIF_ASSIGN;
1542 memcpy(__entry->bssid, bssid, ETH_ALEN);
1543 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1544 ),
1545
1546 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1547);
1548
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001549TRACE_EVENT(api_enable_rssi_reports,
1550 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1551 int rssi_min_thold, int rssi_max_thold),
1552
1553 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1554
1555 TP_STRUCT__entry(
1556 VIF_ENTRY
1557 __field(int, rssi_min_thold)
1558 __field(int, rssi_max_thold)
1559 ),
1560
1561 TP_fast_assign(
1562 VIF_ASSIGN;
1563 __entry->rssi_min_thold = rssi_min_thold;
1564 __entry->rssi_max_thold = rssi_max_thold;
1565 ),
1566
1567 TP_printk(
1568 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
1569 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
1570 )
1571);
1572
Johannes Berg37fbd902011-09-29 16:04:39 +02001573TRACE_EVENT(api_eosp,
1574 TP_PROTO(struct ieee80211_local *local,
1575 struct ieee80211_sta *sta),
1576
1577 TP_ARGS(local, sta),
1578
1579 TP_STRUCT__entry(
1580 LOCAL_ENTRY
1581 STA_ENTRY
1582 ),
1583
1584 TP_fast_assign(
1585 LOCAL_ASSIGN;
1586 STA_ASSIGN;
1587 ),
1588
1589 TP_printk(
1590 LOCAL_PR_FMT STA_PR_FMT,
1591 LOCAL_PR_ARG, STA_PR_FMT
1592 )
1593);
1594
Johannes Bergb5878a22010-04-07 16:48:40 +02001595/*
1596 * Tracing for internal functions
1597 * (which may also be called in response to driver calls)
1598 */
1599
1600TRACE_EVENT(wake_queue,
1601 TP_PROTO(struct ieee80211_local *local, u16 queue,
1602 enum queue_stop_reason reason),
1603
1604 TP_ARGS(local, queue, reason),
1605
1606 TP_STRUCT__entry(
1607 LOCAL_ENTRY
1608 __field(u16, queue)
1609 __field(u32, reason)
1610 ),
1611
1612 TP_fast_assign(
1613 LOCAL_ASSIGN;
1614 __entry->queue = queue;
1615 __entry->reason = reason;
1616 ),
1617
1618 TP_printk(
1619 LOCAL_PR_FMT " queue:%d, reason:%d",
1620 LOCAL_PR_ARG, __entry->queue, __entry->reason
1621 )
1622);
1623
1624TRACE_EVENT(stop_queue,
1625 TP_PROTO(struct ieee80211_local *local, u16 queue,
1626 enum queue_stop_reason reason),
1627
1628 TP_ARGS(local, queue, reason),
1629
1630 TP_STRUCT__entry(
1631 LOCAL_ENTRY
1632 __field(u16, queue)
1633 __field(u32, reason)
1634 ),
1635
1636 TP_fast_assign(
1637 LOCAL_ASSIGN;
1638 __entry->queue = queue;
1639 __entry->reason = reason;
1640 ),
1641
1642 TP_printk(
1643 LOCAL_PR_FMT " queue:%d, reason:%d",
1644 LOCAL_PR_ARG, __entry->queue, __entry->reason
1645 )
1646);
Johannes Berg3fae0272012-06-22 13:36:25 +02001647
1648#ifdef CONFIG_MAC80211_MESSAGE_TRACING
1649#undef TRACE_SYSTEM
1650#define TRACE_SYSTEM mac80211_msg
1651
1652#define MAX_MSG_LEN 100
1653
1654DECLARE_EVENT_CLASS(mac80211_msg_event,
1655 TP_PROTO(struct va_format *vaf),
1656
1657 TP_ARGS(vaf),
1658
1659 TP_STRUCT__entry(
1660 __dynamic_array(char, msg, MAX_MSG_LEN)
1661 ),
1662
1663 TP_fast_assign(
1664 WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
1665 MAX_MSG_LEN, vaf->fmt,
1666 *vaf->va) >= MAX_MSG_LEN);
1667 ),
1668
1669 TP_printk("%s", __get_str(msg))
1670);
1671
1672DEFINE_EVENT(mac80211_msg_event, mac80211_info,
1673 TP_PROTO(struct va_format *vaf),
1674 TP_ARGS(vaf)
1675);
1676DEFINE_EVENT(mac80211_msg_event, mac80211_dbg,
1677 TP_PROTO(struct va_format *vaf),
1678 TP_ARGS(vaf)
1679);
1680DEFINE_EVENT(mac80211_msg_event, mac80211_err,
1681 TP_PROTO(struct va_format *vaf),
1682 TP_ARGS(vaf)
1683);
1684#endif
1685
Christian Lamparterf7428802009-07-19 23:21:07 +02001686#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001687
1688#undef TRACE_INCLUDE_PATH
1689#define TRACE_INCLUDE_PATH .
1690#undef TRACE_INCLUDE_FILE
Johannes Berg011ad0e2012-06-22 12:55:52 +02001691#define TRACE_INCLUDE_FILE trace
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001692#include <trace/define_trace.h>