blob: 6de00b2c268c58c07a3c044a2aacc40e6f3c3a7a [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)
309 __field(u64, timestamp)
310 __field(u32, basic_rates)
311 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100312 __field(bool, enable_beacon)
313 __field(u16, ht_operation_mode)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200314 ),
315
316 TP_fast_assign(
317 LOCAL_ASSIGN;
318 VIF_ASSIGN;
319 __entry->changed = changed;
320 __entry->aid = info->aid;
321 __entry->assoc = info->assoc;
322 __entry->shortpre = info->use_short_preamble;
323 __entry->cts = info->use_cts_prot;
324 __entry->shortslot = info->use_short_slot;
325 __entry->dtimper = info->dtim_period;
326 __entry->bcnint = info->beacon_int;
327 __entry->assoc_cap = info->assoc_capability;
Johannes Berge9ac0742012-03-13 14:29:30 +0100328 __entry->timestamp = info->last_tsf;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200329 __entry->basic_rates = info->basic_rates;
Johannes Bergf911ab82009-11-25 19:07:20 +0100330 __entry->enable_beacon = info->enable_beacon;
331 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200332 ),
333
334 TP_printk(
335 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
336 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
337 )
338);
339
Johannes Berg3ac64be2009-08-17 16:16:53 +0200340TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200341 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200342
Johannes Berg4efc76b2010-06-10 10:56:20 +0200343 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200344
345 TP_STRUCT__entry(
346 LOCAL_ENTRY
347 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200348 ),
349
350 TP_fast_assign(
351 LOCAL_ASSIGN;
352 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200353 ),
354
355 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200356 LOCAL_PR_FMT " prepare mc (%d)",
357 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200358 )
359);
360
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200361TRACE_EVENT(drv_configure_filter,
362 TP_PROTO(struct ieee80211_local *local,
363 unsigned int changed_flags,
364 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200365 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200366
Johannes Berg3ac64be2009-08-17 16:16:53 +0200367 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200368
369 TP_STRUCT__entry(
370 LOCAL_ENTRY
371 __field(unsigned int, changed)
372 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200373 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200374 ),
375
376 TP_fast_assign(
377 LOCAL_ASSIGN;
378 __entry->changed = changed_flags;
379 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200380 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200381 ),
382
383 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200384 LOCAL_PR_FMT " changed:%#x total:%#x",
385 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200386 )
387);
388
389TRACE_EVENT(drv_set_tim,
390 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200391 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200392
Johannes Berg4efc76b2010-06-10 10:56:20 +0200393 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200394
395 TP_STRUCT__entry(
396 LOCAL_ENTRY
397 STA_ENTRY
398 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200399 ),
400
401 TP_fast_assign(
402 LOCAL_ASSIGN;
403 STA_ASSIGN;
404 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200405 ),
406
407 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200408 LOCAL_PR_FMT STA_PR_FMT " set:%d",
409 LOCAL_PR_ARG, STA_PR_FMT, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200410 )
411);
412
413TRACE_EVENT(drv_set_key,
414 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100415 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200416 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200417 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200418
Johannes Berg4efc76b2010-06-10 10:56:20 +0200419 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200420
421 TP_STRUCT__entry(
422 LOCAL_ENTRY
423 VIF_ENTRY
424 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200425 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200426 __field(u8, hw_key_idx)
427 __field(u8, flags)
428 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200429 ),
430
431 TP_fast_assign(
432 LOCAL_ASSIGN;
433 VIF_ASSIGN;
434 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200435 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200436 __entry->flags = key->flags;
437 __entry->keyidx = key->keyidx;
438 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200439 ),
440
441 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200442 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
443 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200444 )
445);
446
447TRACE_EVENT(drv_update_tkip_key,
448 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100449 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200450 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100451 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200452
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100453 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200454
455 TP_STRUCT__entry(
456 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100457 VIF_ENTRY
458 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200459 __field(u32, iv32)
460 ),
461
462 TP_fast_assign(
463 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100464 VIF_ASSIGN;
465 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200466 __entry->iv32 = iv32;
467 ),
468
469 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100470 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
471 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200472 )
473);
474
Luciano Coelho79f460c2011-05-11 17:09:36 +0300475DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200476 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300477 struct ieee80211_sub_if_data *sdata),
478 TP_ARGS(local, sdata)
479);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200480
Eliad Pellerb8564392011-06-13 12:47:30 +0300481DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
482 TP_PROTO(struct ieee80211_local *local,
483 struct ieee80211_sub_if_data *sdata),
484 TP_ARGS(local, sdata)
485);
486
Luciano Coelho79f460c2011-05-11 17:09:36 +0300487DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
488 TP_PROTO(struct ieee80211_local *local,
489 struct ieee80211_sub_if_data *sdata),
490 TP_ARGS(local, sdata)
491);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200492
Luciano Coelho79f460c2011-05-11 17:09:36 +0300493DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
494 TP_PROTO(struct ieee80211_local *local,
495 struct ieee80211_sub_if_data *sdata),
496 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200497);
498
Johannes Bergba99d932011-01-26 09:22:15 +0100499DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200500 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100501 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200502);
503
Johannes Bergba99d932011-01-26 09:22:15 +0100504DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
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
509TRACE_EVENT(drv_get_stats,
510 TP_PROTO(struct ieee80211_local *local,
511 struct ieee80211_low_level_stats *stats,
512 int ret),
513
514 TP_ARGS(local, stats, ret),
515
516 TP_STRUCT__entry(
517 LOCAL_ENTRY
518 __field(int, ret)
519 __field(unsigned int, ackfail)
520 __field(unsigned int, rtsfail)
521 __field(unsigned int, fcserr)
522 __field(unsigned int, rtssucc)
523 ),
524
525 TP_fast_assign(
526 LOCAL_ASSIGN;
527 __entry->ret = ret;
528 __entry->ackfail = stats->dot11ACKFailureCount;
529 __entry->rtsfail = stats->dot11RTSFailureCount;
530 __entry->fcserr = stats->dot11FCSErrorCount;
531 __entry->rtssucc = stats->dot11RTSSuccessCount;
532 ),
533
534 TP_printk(
535 LOCAL_PR_FMT " ret:%d",
536 LOCAL_PR_ARG, __entry->ret
537 )
538);
539
540TRACE_EVENT(drv_get_tkip_seq,
541 TP_PROTO(struct ieee80211_local *local,
542 u8 hw_key_idx, u32 *iv32, u16 *iv16),
543
544 TP_ARGS(local, hw_key_idx, iv32, iv16),
545
546 TP_STRUCT__entry(
547 LOCAL_ENTRY
548 __field(u8, hw_key_idx)
549 __field(u32, iv32)
550 __field(u16, iv16)
551 ),
552
553 TP_fast_assign(
554 LOCAL_ASSIGN;
555 __entry->hw_key_idx = hw_key_idx;
556 __entry->iv32 = *iv32;
557 __entry->iv16 = *iv16;
558 ),
559
560 TP_printk(
561 LOCAL_PR_FMT, LOCAL_PR_ARG
562 )
563);
564
Luciano Coelho92ddc112011-05-09 14:40:06 +0300565DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200566 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300567 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200568);
569
Luciano Coelho92ddc112011-05-09 14:40:06 +0300570DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200571 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300572 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200573);
574
Lukáš Turek310bc672009-12-21 22:50:48 +0100575TRACE_EVENT(drv_set_coverage_class,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200576 TP_PROTO(struct ieee80211_local *local, u8 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100577
Johannes Berg4efc76b2010-06-10 10:56:20 +0200578 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100579
580 TP_STRUCT__entry(
581 LOCAL_ENTRY
582 __field(u8, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100583 ),
584
585 TP_fast_assign(
586 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100587 __entry->value = value;
588 ),
589
590 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200591 LOCAL_PR_FMT " value:%d",
592 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100593 )
594);
595
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200596TRACE_EVENT(drv_sta_notify,
597 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100598 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200599 enum sta_notify_cmd cmd,
600 struct ieee80211_sta *sta),
601
Johannes Berg12375ef2009-11-25 20:30:31 +0100602 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200603
604 TP_STRUCT__entry(
605 LOCAL_ENTRY
606 VIF_ENTRY
607 STA_ENTRY
608 __field(u32, cmd)
609 ),
610
611 TP_fast_assign(
612 LOCAL_ASSIGN;
613 VIF_ASSIGN;
614 STA_ASSIGN;
615 __entry->cmd = cmd;
616 ),
617
618 TP_printk(
619 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
620 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
621 )
622);
623
Johannes Bergf09603a2012-01-20 13:55:21 +0100624TRACE_EVENT(drv_sta_state,
625 TP_PROTO(struct ieee80211_local *local,
626 struct ieee80211_sub_if_data *sdata,
627 struct ieee80211_sta *sta,
628 enum ieee80211_sta_state old_state,
629 enum ieee80211_sta_state new_state),
630
631 TP_ARGS(local, sdata, sta, old_state, new_state),
632
633 TP_STRUCT__entry(
634 LOCAL_ENTRY
635 VIF_ENTRY
636 STA_ENTRY
637 __field(u32, old_state)
638 __field(u32, new_state)
639 ),
640
641 TP_fast_assign(
642 LOCAL_ASSIGN;
643 VIF_ASSIGN;
644 STA_ASSIGN;
645 __entry->old_state = old_state;
646 __entry->new_state = new_state;
647 ),
648
649 TP_printk(
650 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
651 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
652 __entry->old_state, __entry->new_state
653 )
654);
655
Johannes Berg8f727ef2012-03-30 08:43:32 +0200656TRACE_EVENT(drv_sta_rc_update,
657 TP_PROTO(struct ieee80211_local *local,
658 struct ieee80211_sub_if_data *sdata,
659 struct ieee80211_sta *sta,
660 u32 changed),
661
662 TP_ARGS(local, sdata, sta, changed),
663
664 TP_STRUCT__entry(
665 LOCAL_ENTRY
666 VIF_ENTRY
667 STA_ENTRY
668 __field(u32, changed)
669 ),
670
671 TP_fast_assign(
672 LOCAL_ASSIGN;
673 VIF_ASSIGN;
674 STA_ASSIGN;
675 __entry->changed = changed;
676 ),
677
678 TP_printk(
679 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
680 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
681 )
682);
683
Johannes Berg34e89502010-02-03 13:59:58 +0100684TRACE_EVENT(drv_sta_add,
685 TP_PROTO(struct ieee80211_local *local,
686 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200687 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100688
Johannes Berg4efc76b2010-06-10 10:56:20 +0200689 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100690
691 TP_STRUCT__entry(
692 LOCAL_ENTRY
693 VIF_ENTRY
694 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100695 ),
696
697 TP_fast_assign(
698 LOCAL_ASSIGN;
699 VIF_ASSIGN;
700 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100701 ),
702
703 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200704 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
705 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100706 )
707);
708
709TRACE_EVENT(drv_sta_remove,
710 TP_PROTO(struct ieee80211_local *local,
711 struct ieee80211_sub_if_data *sdata,
712 struct ieee80211_sta *sta),
713
714 TP_ARGS(local, sdata, sta),
715
716 TP_STRUCT__entry(
717 LOCAL_ENTRY
718 VIF_ENTRY
719 STA_ENTRY
720 ),
721
722 TP_fast_assign(
723 LOCAL_ASSIGN;
724 VIF_ASSIGN;
725 STA_ASSIGN;
726 ),
727
728 TP_printk(
729 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
730 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
731 )
732);
733
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200734TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300735 TP_PROTO(struct ieee80211_local *local,
736 struct ieee80211_sub_if_data *sdata,
Johannes Berga3304b02012-03-28 11:04:24 +0200737 u16 ac, const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200738
Johannes Berga3304b02012-03-28 11:04:24 +0200739 TP_ARGS(local, sdata, ac, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200740
741 TP_STRUCT__entry(
742 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300743 VIF_ENTRY
Johannes Berga3304b02012-03-28 11:04:24 +0200744 __field(u16, ac)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200745 __field(u16, txop)
746 __field(u16, cw_min)
747 __field(u16, cw_max)
748 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300749 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200750 ),
751
752 TP_fast_assign(
753 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300754 VIF_ASSIGN;
Johannes Berga3304b02012-03-28 11:04:24 +0200755 __entry->ac = ac;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200756 __entry->txop = params->txop;
757 __entry->cw_max = params->cw_max;
758 __entry->cw_min = params->cw_min;
759 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300760 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200761 ),
762
763 TP_printk(
Johannes Berga3304b02012-03-28 11:04:24 +0200764 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
765 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200766 )
767);
768
Eliad Peller37a41b42011-09-21 14:06:11 +0300769DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
770 TP_PROTO(struct ieee80211_local *local,
771 struct ieee80211_sub_if_data *sdata),
772 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200773);
774
775TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +0300776 TP_PROTO(struct ieee80211_local *local,
777 struct ieee80211_sub_if_data *sdata,
778 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200779
Eliad Peller37a41b42011-09-21 14:06:11 +0300780 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200781
782 TP_STRUCT__entry(
783 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +0300784 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200785 __field(u64, tsf)
786 ),
787
788 TP_fast_assign(
789 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +0300790 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200791 __entry->tsf = tsf;
792 ),
793
794 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +0300795 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
796 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200797 )
798);
799
Eliad Peller37a41b42011-09-21 14:06:11 +0300800DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
801 TP_PROTO(struct ieee80211_local *local,
802 struct ieee80211_sub_if_data *sdata),
803 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200804);
805
Johannes Bergba99d932011-01-26 09:22:15 +0100806DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200807 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100808 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200809);
810
811TRACE_EVENT(drv_ampdu_action,
812 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100813 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200814 enum ieee80211_ampdu_mlme_action action,
815 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100816 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200817
Johannes Berg0b01f032011-01-18 13:51:05 +0100818 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200819
820 TP_STRUCT__entry(
821 LOCAL_ENTRY
822 STA_ENTRY
823 __field(u32, action)
824 __field(u16, tid)
825 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100826 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100827 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200828 ),
829
830 TP_fast_assign(
831 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100832 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200833 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200834 __entry->action = action;
835 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800836 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100837 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200838 ),
839
840 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100841 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
842 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
843 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200844 )
845);
Johannes Berga80f7c02009-12-23 13:15:32 +0100846
John W. Linvillec466d4e2010-06-29 14:51:23 -0400847TRACE_EVENT(drv_get_survey,
848 TP_PROTO(struct ieee80211_local *local, int idx,
849 struct survey_info *survey),
850
851 TP_ARGS(local, idx, survey),
852
853 TP_STRUCT__entry(
854 LOCAL_ENTRY
855 __field(int, idx)
856 ),
857
858 TP_fast_assign(
859 LOCAL_ASSIGN;
860 __entry->idx = idx;
861 ),
862
863 TP_printk(
864 LOCAL_PR_FMT " idx:%d",
865 LOCAL_PR_ARG, __entry->idx
866 )
867);
868
Johannes Berga80f7c02009-12-23 13:15:32 +0100869TRACE_EVENT(drv_flush,
870 TP_PROTO(struct ieee80211_local *local, bool drop),
871
872 TP_ARGS(local, drop),
873
874 TP_STRUCT__entry(
875 LOCAL_ENTRY
876 __field(bool, drop)
877 ),
878
879 TP_fast_assign(
880 LOCAL_ASSIGN;
881 __entry->drop = drop;
882 ),
883
884 TP_printk(
885 LOCAL_PR_FMT " drop:%d",
886 LOCAL_PR_ARG, __entry->drop
887 )
888);
Johannes Bergb5878a22010-04-07 16:48:40 +0200889
Johannes Berg5ce6e432010-05-11 16:20:57 +0200890TRACE_EVENT(drv_channel_switch,
891 TP_PROTO(struct ieee80211_local *local,
892 struct ieee80211_channel_switch *ch_switch),
893
894 TP_ARGS(local, ch_switch),
895
896 TP_STRUCT__entry(
897 LOCAL_ENTRY
898 __field(u64, timestamp)
899 __field(bool, block_tx)
900 __field(u16, freq)
901 __field(u8, count)
902 ),
903
904 TP_fast_assign(
905 LOCAL_ASSIGN;
906 __entry->timestamp = ch_switch->timestamp;
907 __entry->block_tx = ch_switch->block_tx;
908 __entry->freq = ch_switch->channel->center_freq;
909 __entry->count = ch_switch->count;
910 ),
911
912 TP_printk(
913 LOCAL_PR_FMT " new freq:%u count:%d",
914 LOCAL_PR_ARG, __entry->freq, __entry->count
915 )
916);
917
Bruno Randolf15d96752010-11-10 12:50:56 +0900918TRACE_EVENT(drv_set_antenna,
919 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
920
921 TP_ARGS(local, tx_ant, rx_ant, ret),
922
923 TP_STRUCT__entry(
924 LOCAL_ENTRY
925 __field(u32, tx_ant)
926 __field(u32, rx_ant)
927 __field(int, ret)
928 ),
929
930 TP_fast_assign(
931 LOCAL_ASSIGN;
932 __entry->tx_ant = tx_ant;
933 __entry->rx_ant = rx_ant;
934 __entry->ret = ret;
935 ),
936
937 TP_printk(
938 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
939 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
940 )
941);
942
943TRACE_EVENT(drv_get_antenna,
944 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
945
946 TP_ARGS(local, tx_ant, rx_ant, ret),
947
948 TP_STRUCT__entry(
949 LOCAL_ENTRY
950 __field(u32, tx_ant)
951 __field(u32, rx_ant)
952 __field(int, ret)
953 ),
954
955 TP_fast_assign(
956 LOCAL_ASSIGN;
957 __entry->tx_ant = tx_ant;
958 __entry->rx_ant = rx_ant;
959 __entry->ret = ret;
960 ),
961
962 TP_printk(
963 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
964 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
965 )
966);
967
Johannes Berg21f83582010-12-18 17:20:47 +0100968TRACE_EVENT(drv_remain_on_channel,
969 TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
970 enum nl80211_channel_type chantype, unsigned int duration),
971
972 TP_ARGS(local, chan, chantype, duration),
973
974 TP_STRUCT__entry(
975 LOCAL_ENTRY
976 __field(int, center_freq)
977 __field(int, channel_type)
978 __field(unsigned int, duration)
979 ),
980
981 TP_fast_assign(
982 LOCAL_ASSIGN;
983 __entry->center_freq = chan->center_freq;
984 __entry->channel_type = chantype;
985 __entry->duration = duration;
986 ),
987
988 TP_printk(
989 LOCAL_PR_FMT " freq:%dMHz duration:%dms",
990 LOCAL_PR_ARG, __entry->center_freq, __entry->duration
991 )
992);
993
Johannes Bergba99d932011-01-26 09:22:15 +0100994DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +0100995 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100996 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +0100997);
998
Johannes Berg5f16a432011-02-25 15:36:57 +0100999TRACE_EVENT(drv_offchannel_tx,
1000 TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
1001 struct ieee80211_channel *chan,
1002 enum nl80211_channel_type channel_type,
1003 unsigned int wait),
1004
1005 TP_ARGS(local, skb, chan, channel_type, wait),
1006
1007 TP_STRUCT__entry(
1008 LOCAL_ENTRY
1009 __field(int, center_freq)
1010 __field(int, channel_type)
1011 __field(unsigned int, wait)
1012 ),
1013
1014 TP_fast_assign(
1015 LOCAL_ASSIGN;
1016 __entry->center_freq = chan->center_freq;
1017 __entry->channel_type = channel_type;
1018 __entry->wait = wait;
1019 ),
1020
1021 TP_printk(
1022 LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
1023 LOCAL_PR_ARG, __entry->center_freq, __entry->wait
1024 )
1025);
1026
John W. Linville38c09152011-03-07 16:19:18 -05001027TRACE_EVENT(drv_set_ringparam,
1028 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1029
1030 TP_ARGS(local, tx, rx),
1031
1032 TP_STRUCT__entry(
1033 LOCAL_ENTRY
1034 __field(u32, tx)
1035 __field(u32, rx)
1036 ),
1037
1038 TP_fast_assign(
1039 LOCAL_ASSIGN;
1040 __entry->tx = tx;
1041 __entry->rx = rx;
1042 ),
1043
1044 TP_printk(
1045 LOCAL_PR_FMT " tx:%d rx %d",
1046 LOCAL_PR_ARG, __entry->tx, __entry->rx
1047 )
1048);
1049
1050TRACE_EVENT(drv_get_ringparam,
1051 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1052 u32 *rx, u32 *rx_max),
1053
1054 TP_ARGS(local, tx, tx_max, rx, rx_max),
1055
1056 TP_STRUCT__entry(
1057 LOCAL_ENTRY
1058 __field(u32, tx)
1059 __field(u32, tx_max)
1060 __field(u32, rx)
1061 __field(u32, rx_max)
1062 ),
1063
1064 TP_fast_assign(
1065 LOCAL_ASSIGN;
1066 __entry->tx = *tx;
1067 __entry->tx_max = *tx_max;
1068 __entry->rx = *rx;
1069 __entry->rx_max = *rx_max;
1070 ),
1071
1072 TP_printk(
1073 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1074 LOCAL_PR_ARG,
1075 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1076 )
1077);
1078
Vivek Natarajane8306f92011-04-06 11:41:10 +05301079DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1080 TP_PROTO(struct ieee80211_local *local),
1081 TP_ARGS(local)
1082);
1083
Johannes Berg5f16a432011-02-25 15:36:57 +01001084DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1085 TP_PROTO(struct ieee80211_local *local),
1086 TP_ARGS(local)
1087);
1088
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301089TRACE_EVENT(drv_set_bitrate_mask,
1090 TP_PROTO(struct ieee80211_local *local,
1091 struct ieee80211_sub_if_data *sdata,
1092 const struct cfg80211_bitrate_mask *mask),
1093
1094 TP_ARGS(local, sdata, mask),
1095
1096 TP_STRUCT__entry(
1097 LOCAL_ENTRY
1098 VIF_ENTRY
1099 __field(u32, legacy_2g)
1100 __field(u32, legacy_5g)
1101 ),
1102
1103 TP_fast_assign(
1104 LOCAL_ASSIGN;
1105 VIF_ASSIGN;
1106 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1107 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1108 ),
1109
1110 TP_printk(
1111 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1112 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1113 )
1114);
1115
Johannes Bergc68f4b82011-07-05 16:35:41 +02001116TRACE_EVENT(drv_set_rekey_data,
1117 TP_PROTO(struct ieee80211_local *local,
1118 struct ieee80211_sub_if_data *sdata,
1119 struct cfg80211_gtk_rekey_data *data),
1120
1121 TP_ARGS(local, sdata, data),
1122
1123 TP_STRUCT__entry(
1124 LOCAL_ENTRY
1125 VIF_ENTRY
1126 __array(u8, kek, NL80211_KEK_LEN)
1127 __array(u8, kck, NL80211_KCK_LEN)
1128 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1129 ),
1130
1131 TP_fast_assign(
1132 LOCAL_ASSIGN;
1133 VIF_ASSIGN;
1134 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1135 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1136 memcpy(__entry->replay_ctr, data->replay_ctr,
1137 NL80211_REPLAY_CTR_LEN);
1138 ),
1139
1140 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1141 LOCAL_PR_ARG, VIF_PR_ARG)
1142);
1143
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001144TRACE_EVENT(drv_rssi_callback,
1145 TP_PROTO(struct ieee80211_local *local,
1146 enum ieee80211_rssi_event rssi_event),
1147
1148 TP_ARGS(local, rssi_event),
1149
1150 TP_STRUCT__entry(
1151 LOCAL_ENTRY
1152 __field(u32, rssi_event)
1153 ),
1154
1155 TP_fast_assign(
1156 LOCAL_ASSIGN;
1157 __entry->rssi_event = rssi_event;
1158 ),
1159
1160 TP_printk(
1161 LOCAL_PR_FMT " rssi_event:%d",
1162 LOCAL_PR_ARG, __entry->rssi_event
1163 )
1164);
1165
Johannes Berg40b96402011-09-29 16:04:38 +02001166DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001167 TP_PROTO(struct ieee80211_local *local,
1168 struct ieee80211_sta *sta,
1169 u16 tids, int num_frames,
1170 enum ieee80211_frame_release_type reason,
1171 bool more_data),
1172
1173 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1174
1175 TP_STRUCT__entry(
1176 LOCAL_ENTRY
1177 STA_ENTRY
1178 __field(u16, tids)
1179 __field(int, num_frames)
1180 __field(int, reason)
1181 __field(bool, more_data)
1182 ),
1183
1184 TP_fast_assign(
1185 LOCAL_ASSIGN;
1186 STA_ASSIGN;
1187 __entry->tids = tids;
1188 __entry->num_frames = num_frames;
1189 __entry->reason = reason;
1190 __entry->more_data = more_data;
1191 ),
1192
1193 TP_printk(
1194 LOCAL_PR_FMT STA_PR_FMT
1195 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1196 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1197 __entry->reason, __entry->more_data
1198 )
1199);
1200
Johannes Berg40b96402011-09-29 16:04:38 +02001201DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1202 TP_PROTO(struct ieee80211_local *local,
1203 struct ieee80211_sta *sta,
1204 u16 tids, int num_frames,
1205 enum ieee80211_frame_release_type reason,
1206 bool more_data),
1207
1208 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1209);
1210
1211DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1212 TP_PROTO(struct ieee80211_local *local,
1213 struct ieee80211_sta *sta,
1214 u16 tids, int num_frames,
1215 enum ieee80211_frame_release_type reason,
1216 bool more_data),
1217
1218 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1219);
1220
Johannes Bergb5878a22010-04-07 16:48:40 +02001221/*
1222 * Tracing for API calls that drivers call.
1223 */
1224
1225TRACE_EVENT(api_start_tx_ba_session,
1226 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1227
1228 TP_ARGS(sta, tid),
1229
1230 TP_STRUCT__entry(
1231 STA_ENTRY
1232 __field(u16, tid)
1233 ),
1234
1235 TP_fast_assign(
1236 STA_ASSIGN;
1237 __entry->tid = tid;
1238 ),
1239
1240 TP_printk(
1241 STA_PR_FMT " tid:%d",
1242 STA_PR_ARG, __entry->tid
1243 )
1244);
1245
1246TRACE_EVENT(api_start_tx_ba_cb,
1247 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1248
1249 TP_ARGS(sdata, ra, tid),
1250
1251 TP_STRUCT__entry(
1252 VIF_ENTRY
1253 __array(u8, ra, ETH_ALEN)
1254 __field(u16, tid)
1255 ),
1256
1257 TP_fast_assign(
1258 VIF_ASSIGN;
1259 memcpy(__entry->ra, ra, ETH_ALEN);
1260 __entry->tid = tid;
1261 ),
1262
1263 TP_printk(
1264 VIF_PR_FMT " ra:%pM tid:%d",
1265 VIF_PR_ARG, __entry->ra, __entry->tid
1266 )
1267);
1268
1269TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001270 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001271
Johannes Berg6a8579d2010-05-27 14:41:07 +02001272 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001273
1274 TP_STRUCT__entry(
1275 STA_ENTRY
1276 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001277 ),
1278
1279 TP_fast_assign(
1280 STA_ASSIGN;
1281 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001282 ),
1283
1284 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001285 STA_PR_FMT " tid:%d",
1286 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001287 )
1288);
1289
1290TRACE_EVENT(api_stop_tx_ba_cb,
1291 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1292
1293 TP_ARGS(sdata, ra, tid),
1294
1295 TP_STRUCT__entry(
1296 VIF_ENTRY
1297 __array(u8, ra, ETH_ALEN)
1298 __field(u16, tid)
1299 ),
1300
1301 TP_fast_assign(
1302 VIF_ASSIGN;
1303 memcpy(__entry->ra, ra, ETH_ALEN);
1304 __entry->tid = tid;
1305 ),
1306
1307 TP_printk(
1308 VIF_PR_FMT " ra:%pM tid:%d",
1309 VIF_PR_ARG, __entry->ra, __entry->tid
1310 )
1311);
1312
Johannes Bergba99d932011-01-26 09:22:15 +01001313DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001314 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001315 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001316);
1317
1318TRACE_EVENT(api_beacon_loss,
1319 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1320
1321 TP_ARGS(sdata),
1322
1323 TP_STRUCT__entry(
1324 VIF_ENTRY
1325 ),
1326
1327 TP_fast_assign(
1328 VIF_ASSIGN;
1329 ),
1330
1331 TP_printk(
1332 VIF_PR_FMT,
1333 VIF_PR_ARG
1334 )
1335);
1336
1337TRACE_EVENT(api_connection_loss,
1338 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1339
1340 TP_ARGS(sdata),
1341
1342 TP_STRUCT__entry(
1343 VIF_ENTRY
1344 ),
1345
1346 TP_fast_assign(
1347 VIF_ASSIGN;
1348 ),
1349
1350 TP_printk(
1351 VIF_PR_FMT,
1352 VIF_PR_ARG
1353 )
1354);
1355
1356TRACE_EVENT(api_cqm_rssi_notify,
1357 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1358 enum nl80211_cqm_rssi_threshold_event rssi_event),
1359
1360 TP_ARGS(sdata, rssi_event),
1361
1362 TP_STRUCT__entry(
1363 VIF_ENTRY
1364 __field(u32, rssi_event)
1365 ),
1366
1367 TP_fast_assign(
1368 VIF_ASSIGN;
1369 __entry->rssi_event = rssi_event;
1370 ),
1371
1372 TP_printk(
1373 VIF_PR_FMT " event:%d",
1374 VIF_PR_ARG, __entry->rssi_event
1375 )
1376);
1377
1378TRACE_EVENT(api_scan_completed,
1379 TP_PROTO(struct ieee80211_local *local, bool aborted),
1380
1381 TP_ARGS(local, aborted),
1382
1383 TP_STRUCT__entry(
1384 LOCAL_ENTRY
1385 __field(bool, aborted)
1386 ),
1387
1388 TP_fast_assign(
1389 LOCAL_ASSIGN;
1390 __entry->aborted = aborted;
1391 ),
1392
1393 TP_printk(
1394 LOCAL_PR_FMT " aborted:%d",
1395 LOCAL_PR_ARG, __entry->aborted
1396 )
1397);
1398
Luciano Coelho79f460c2011-05-11 17:09:36 +03001399TRACE_EVENT(api_sched_scan_results,
1400 TP_PROTO(struct ieee80211_local *local),
1401
1402 TP_ARGS(local),
1403
1404 TP_STRUCT__entry(
1405 LOCAL_ENTRY
1406 ),
1407
1408 TP_fast_assign(
1409 LOCAL_ASSIGN;
1410 ),
1411
1412 TP_printk(
1413 LOCAL_PR_FMT, LOCAL_PR_ARG
1414 )
1415);
1416
1417TRACE_EVENT(api_sched_scan_stopped,
1418 TP_PROTO(struct ieee80211_local *local),
1419
1420 TP_ARGS(local),
1421
1422 TP_STRUCT__entry(
1423 LOCAL_ENTRY
1424 ),
1425
1426 TP_fast_assign(
1427 LOCAL_ASSIGN;
1428 ),
1429
1430 TP_printk(
1431 LOCAL_PR_FMT, LOCAL_PR_ARG
1432 )
1433);
1434
Johannes Bergb5878a22010-04-07 16:48:40 +02001435TRACE_EVENT(api_sta_block_awake,
1436 TP_PROTO(struct ieee80211_local *local,
1437 struct ieee80211_sta *sta, bool block),
1438
1439 TP_ARGS(local, sta, block),
1440
1441 TP_STRUCT__entry(
1442 LOCAL_ENTRY
1443 STA_ENTRY
1444 __field(bool, block)
1445 ),
1446
1447 TP_fast_assign(
1448 LOCAL_ASSIGN;
1449 STA_ASSIGN;
1450 __entry->block = block;
1451 ),
1452
1453 TP_printk(
1454 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1455 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
1456 )
1457);
1458
Johannes Berg5ce6e432010-05-11 16:20:57 +02001459TRACE_EVENT(api_chswitch_done,
1460 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1461
1462 TP_ARGS(sdata, success),
1463
1464 TP_STRUCT__entry(
1465 VIF_ENTRY
1466 __field(bool, success)
1467 ),
1468
1469 TP_fast_assign(
1470 VIF_ASSIGN;
1471 __entry->success = success;
1472 ),
1473
1474 TP_printk(
1475 VIF_PR_FMT " success=%d",
1476 VIF_PR_ARG, __entry->success
1477 )
1478);
1479
Johannes Bergba99d932011-01-26 09:22:15 +01001480DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001481 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001482 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001483);
1484
Johannes Bergba99d932011-01-26 09:22:15 +01001485DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001486 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001487 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001488);
1489
Johannes Bergc68f4b82011-07-05 16:35:41 +02001490TRACE_EVENT(api_gtk_rekey_notify,
1491 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1492 const u8 *bssid, const u8 *replay_ctr),
1493
1494 TP_ARGS(sdata, bssid, replay_ctr),
1495
1496 TP_STRUCT__entry(
1497 VIF_ENTRY
1498 __array(u8, bssid, ETH_ALEN)
1499 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1500 ),
1501
1502 TP_fast_assign(
1503 VIF_ASSIGN;
1504 memcpy(__entry->bssid, bssid, ETH_ALEN);
1505 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1506 ),
1507
1508 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1509);
1510
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001511TRACE_EVENT(api_enable_rssi_reports,
1512 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1513 int rssi_min_thold, int rssi_max_thold),
1514
1515 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1516
1517 TP_STRUCT__entry(
1518 VIF_ENTRY
1519 __field(int, rssi_min_thold)
1520 __field(int, rssi_max_thold)
1521 ),
1522
1523 TP_fast_assign(
1524 VIF_ASSIGN;
1525 __entry->rssi_min_thold = rssi_min_thold;
1526 __entry->rssi_max_thold = rssi_max_thold;
1527 ),
1528
1529 TP_printk(
1530 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
1531 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
1532 )
1533);
1534
Johannes Berg37fbd902011-09-29 16:04:39 +02001535TRACE_EVENT(api_eosp,
1536 TP_PROTO(struct ieee80211_local *local,
1537 struct ieee80211_sta *sta),
1538
1539 TP_ARGS(local, sta),
1540
1541 TP_STRUCT__entry(
1542 LOCAL_ENTRY
1543 STA_ENTRY
1544 ),
1545
1546 TP_fast_assign(
1547 LOCAL_ASSIGN;
1548 STA_ASSIGN;
1549 ),
1550
1551 TP_printk(
1552 LOCAL_PR_FMT STA_PR_FMT,
1553 LOCAL_PR_ARG, STA_PR_FMT
1554 )
1555);
1556
Johannes Bergb5878a22010-04-07 16:48:40 +02001557/*
1558 * Tracing for internal functions
1559 * (which may also be called in response to driver calls)
1560 */
1561
1562TRACE_EVENT(wake_queue,
1563 TP_PROTO(struct ieee80211_local *local, u16 queue,
1564 enum queue_stop_reason reason),
1565
1566 TP_ARGS(local, queue, reason),
1567
1568 TP_STRUCT__entry(
1569 LOCAL_ENTRY
1570 __field(u16, queue)
1571 __field(u32, reason)
1572 ),
1573
1574 TP_fast_assign(
1575 LOCAL_ASSIGN;
1576 __entry->queue = queue;
1577 __entry->reason = reason;
1578 ),
1579
1580 TP_printk(
1581 LOCAL_PR_FMT " queue:%d, reason:%d",
1582 LOCAL_PR_ARG, __entry->queue, __entry->reason
1583 )
1584);
1585
1586TRACE_EVENT(stop_queue,
1587 TP_PROTO(struct ieee80211_local *local, u16 queue,
1588 enum queue_stop_reason reason),
1589
1590 TP_ARGS(local, queue, reason),
1591
1592 TP_STRUCT__entry(
1593 LOCAL_ENTRY
1594 __field(u16, queue)
1595 __field(u32, reason)
1596 ),
1597
1598 TP_fast_assign(
1599 LOCAL_ASSIGN;
1600 __entry->queue = queue;
1601 __entry->reason = reason;
1602 ),
1603
1604 TP_printk(
1605 LOCAL_PR_FMT " queue:%d, reason:%d",
1606 LOCAL_PR_ARG, __entry->queue, __entry->reason
1607 )
1608);
Christian Lamparterf7428802009-07-19 23:21:07 +02001609#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001610
1611#undef TRACE_INCLUDE_PATH
1612#define TRACE_INCLUDE_PATH .
1613#undef TRACE_INCLUDE_FILE
1614#define TRACE_INCLUDE_FILE driver-trace
1615#include <trace/define_trace.h>