blob: 384e2f08c187051f3bfb647adb66204a6c2153e0 [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
Johannes Bergeecc4802011-05-04 15:37:29 +0200164DEFINE_EVENT(local_only_evt, drv_suspend,
165 TP_PROTO(struct ieee80211_local *local),
166 TP_ARGS(local)
167);
168
169DEFINE_EVENT(local_only_evt, drv_resume,
170 TP_PROTO(struct ieee80211_local *local),
171 TP_ARGS(local)
172);
173
Johannes Bergba99d932011-01-26 09:22:15 +0100174DEFINE_EVENT(local_only_evt, drv_stop,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200175 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100176 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200177);
178
Luciano Coelho92ddc112011-05-09 14:40:06 +0300179DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200180 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200181 struct ieee80211_sub_if_data *sdata),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300182 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200183);
184
Johannes Berg34d4bc42010-08-27 12:35:58 +0200185TRACE_EVENT(drv_change_interface,
186 TP_PROTO(struct ieee80211_local *local,
187 struct ieee80211_sub_if_data *sdata,
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200188 enum nl80211_iftype type, bool p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200189
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200190 TP_ARGS(local, sdata, type, p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200191
192 TP_STRUCT__entry(
193 LOCAL_ENTRY
194 VIF_ENTRY
195 __field(u32, new_type)
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200196 __field(bool, new_p2p)
Johannes Berg34d4bc42010-08-27 12:35:58 +0200197 ),
198
199 TP_fast_assign(
200 LOCAL_ASSIGN;
201 VIF_ASSIGN;
202 __entry->new_type = type;
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200203 __entry->new_p2p = p2p;
Johannes Berg34d4bc42010-08-27 12:35:58 +0200204 ),
205
206 TP_printk(
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200207 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
208 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
209 __entry->new_p2p ? "/p2p" : ""
Johannes Berg34d4bc42010-08-27 12:35:58 +0200210 )
211);
212
Luciano Coelho92ddc112011-05-09 14:40:06 +0300213DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
214 TP_PROTO(struct ieee80211_local *local,
215 struct ieee80211_sub_if_data *sdata),
216 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200217);
218
219TRACE_EVENT(drv_config,
220 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200221 u32 changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200222
Johannes Berg4efc76b2010-06-10 10:56:20 +0200223 TP_ARGS(local, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200224
225 TP_STRUCT__entry(
226 LOCAL_ENTRY
227 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100228 __field(u32, flags)
229 __field(int, power_level)
230 __field(int, dynamic_ps_timeout)
231 __field(int, max_sleep_period)
232 __field(u16, listen_interval)
233 __field(u8, long_frame_max_tx_count)
234 __field(u8, short_frame_max_tx_count)
235 __field(int, center_freq)
236 __field(int, channel_type)
Johannes Berg0f782312009-12-01 13:37:02 +0100237 __field(int, smps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200238 ),
239
240 TP_fast_assign(
241 LOCAL_ASSIGN;
242 __entry->changed = changed;
Johannes Bergf911ab82009-11-25 19:07:20 +0100243 __entry->flags = local->hw.conf.flags;
244 __entry->power_level = local->hw.conf.power_level;
245 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
246 __entry->max_sleep_period = local->hw.conf.max_sleep_period;
247 __entry->listen_interval = local->hw.conf.listen_interval;
248 __entry->long_frame_max_tx_count = local->hw.conf.long_frame_max_tx_count;
249 __entry->short_frame_max_tx_count = local->hw.conf.short_frame_max_tx_count;
250 __entry->center_freq = local->hw.conf.channel->center_freq;
251 __entry->channel_type = local->hw.conf.channel_type;
Johannes Berg0f782312009-12-01 13:37:02 +0100252 __entry->smps = local->hw.conf.smps_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200253 ),
254
255 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200256 LOCAL_PR_FMT " ch:%#x freq:%d",
257 LOCAL_PR_ARG, __entry->changed, __entry->center_freq
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200258 )
259);
260
261TRACE_EVENT(drv_bss_info_changed,
262 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100263 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200264 struct ieee80211_bss_conf *info,
265 u32 changed),
266
Johannes Berg12375ef2009-11-25 20:30:31 +0100267 TP_ARGS(local, sdata, info, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200268
269 TP_STRUCT__entry(
270 LOCAL_ENTRY
271 VIF_ENTRY
272 __field(bool, assoc)
273 __field(u16, aid)
274 __field(bool, cts)
275 __field(bool, shortpre)
276 __field(bool, shortslot)
277 __field(u8, dtimper)
278 __field(u16, bcnint)
279 __field(u16, assoc_cap)
280 __field(u64, timestamp)
281 __field(u32, basic_rates)
282 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100283 __field(bool, enable_beacon)
284 __field(u16, ht_operation_mode)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200285 ),
286
287 TP_fast_assign(
288 LOCAL_ASSIGN;
289 VIF_ASSIGN;
290 __entry->changed = changed;
291 __entry->aid = info->aid;
292 __entry->assoc = info->assoc;
293 __entry->shortpre = info->use_short_preamble;
294 __entry->cts = info->use_cts_prot;
295 __entry->shortslot = info->use_short_slot;
296 __entry->dtimper = info->dtim_period;
297 __entry->bcnint = info->beacon_int;
298 __entry->assoc_cap = info->assoc_capability;
299 __entry->timestamp = info->timestamp;
300 __entry->basic_rates = info->basic_rates;
Johannes Bergf911ab82009-11-25 19:07:20 +0100301 __entry->enable_beacon = info->enable_beacon;
302 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200303 ),
304
305 TP_printk(
306 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
307 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
308 )
309);
310
Johannes Bergb2abb6e2011-07-19 10:39:53 +0200311DECLARE_EVENT_CLASS(tx_sync_evt,
312 TP_PROTO(struct ieee80211_local *local,
313 struct ieee80211_sub_if_data *sdata,
314 const u8 *bssid,
315 enum ieee80211_tx_sync_type type),
316 TP_ARGS(local, sdata, bssid, type),
317
318 TP_STRUCT__entry(
319 LOCAL_ENTRY
320 VIF_ENTRY
321 __array(char, bssid, ETH_ALEN)
322 __field(u32, sync_type)
323 ),
324
325 TP_fast_assign(
326 LOCAL_ASSIGN;
327 VIF_ASSIGN;
328 memcpy(__entry->bssid, bssid, ETH_ALEN);
329 __entry->sync_type = type;
330 ),
331
332 TP_printk(
333 LOCAL_PR_FMT VIF_PR_FMT " bssid:%pM type:%d",
334 LOCAL_PR_ARG, VIF_PR_ARG, __entry->bssid, __entry->sync_type
335 )
336);
337
338DEFINE_EVENT(tx_sync_evt, drv_tx_sync,
339 TP_PROTO(struct ieee80211_local *local,
340 struct ieee80211_sub_if_data *sdata,
341 const u8 *bssid,
342 enum ieee80211_tx_sync_type type),
343 TP_ARGS(local, sdata, bssid, type)
344);
345
346DEFINE_EVENT(tx_sync_evt, drv_finish_tx_sync,
347 TP_PROTO(struct ieee80211_local *local,
348 struct ieee80211_sub_if_data *sdata,
349 const u8 *bssid,
350 enum ieee80211_tx_sync_type type),
351 TP_ARGS(local, sdata, bssid, type)
352);
353
Johannes Berg3ac64be2009-08-17 16:16:53 +0200354TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200355 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200356
Johannes Berg4efc76b2010-06-10 10:56:20 +0200357 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200358
359 TP_STRUCT__entry(
360 LOCAL_ENTRY
361 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200362 ),
363
364 TP_fast_assign(
365 LOCAL_ASSIGN;
366 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200367 ),
368
369 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200370 LOCAL_PR_FMT " prepare mc (%d)",
371 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200372 )
373);
374
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200375TRACE_EVENT(drv_configure_filter,
376 TP_PROTO(struct ieee80211_local *local,
377 unsigned int changed_flags,
378 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200379 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200380
Johannes Berg3ac64be2009-08-17 16:16:53 +0200381 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200382
383 TP_STRUCT__entry(
384 LOCAL_ENTRY
385 __field(unsigned int, changed)
386 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200387 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200388 ),
389
390 TP_fast_assign(
391 LOCAL_ASSIGN;
392 __entry->changed = changed_flags;
393 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200394 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200395 ),
396
397 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200398 LOCAL_PR_FMT " changed:%#x total:%#x",
399 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200400 )
401);
402
403TRACE_EVENT(drv_set_tim,
404 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200405 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200406
Johannes Berg4efc76b2010-06-10 10:56:20 +0200407 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200408
409 TP_STRUCT__entry(
410 LOCAL_ENTRY
411 STA_ENTRY
412 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200413 ),
414
415 TP_fast_assign(
416 LOCAL_ASSIGN;
417 STA_ASSIGN;
418 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200419 ),
420
421 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200422 LOCAL_PR_FMT STA_PR_FMT " set:%d",
423 LOCAL_PR_ARG, STA_PR_FMT, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200424 )
425);
426
427TRACE_EVENT(drv_set_key,
428 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100429 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200430 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200431 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200432
Johannes Berg4efc76b2010-06-10 10:56:20 +0200433 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200434
435 TP_STRUCT__entry(
436 LOCAL_ENTRY
437 VIF_ENTRY
438 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200439 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200440 __field(u8, hw_key_idx)
441 __field(u8, flags)
442 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200443 ),
444
445 TP_fast_assign(
446 LOCAL_ASSIGN;
447 VIF_ASSIGN;
448 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200449 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200450 __entry->flags = key->flags;
451 __entry->keyidx = key->keyidx;
452 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200453 ),
454
455 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200456 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
457 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200458 )
459);
460
461TRACE_EVENT(drv_update_tkip_key,
462 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100463 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200464 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100465 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200466
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100467 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200468
469 TP_STRUCT__entry(
470 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100471 VIF_ENTRY
472 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200473 __field(u32, iv32)
474 ),
475
476 TP_fast_assign(
477 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100478 VIF_ASSIGN;
479 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200480 __entry->iv32 = iv32;
481 ),
482
483 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100484 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
485 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200486 )
487);
488
Luciano Coelho79f460c2011-05-11 17:09:36 +0300489DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200490 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300491 struct ieee80211_sub_if_data *sdata),
492 TP_ARGS(local, sdata)
493);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200494
Eliad Pellerb8564392011-06-13 12:47:30 +0300495DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
496 TP_PROTO(struct ieee80211_local *local,
497 struct ieee80211_sub_if_data *sdata),
498 TP_ARGS(local, sdata)
499);
500
Luciano Coelho79f460c2011-05-11 17:09:36 +0300501DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
502 TP_PROTO(struct ieee80211_local *local,
503 struct ieee80211_sub_if_data *sdata),
504 TP_ARGS(local, sdata)
505);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200506
Luciano Coelho79f460c2011-05-11 17:09:36 +0300507DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
508 TP_PROTO(struct ieee80211_local *local,
509 struct ieee80211_sub_if_data *sdata),
510 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200511);
512
Johannes Bergba99d932011-01-26 09:22:15 +0100513DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200514 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100515 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200516);
517
Johannes Bergba99d932011-01-26 09:22:15 +0100518DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200519 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100520 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200521);
522
523TRACE_EVENT(drv_get_stats,
524 TP_PROTO(struct ieee80211_local *local,
525 struct ieee80211_low_level_stats *stats,
526 int ret),
527
528 TP_ARGS(local, stats, ret),
529
530 TP_STRUCT__entry(
531 LOCAL_ENTRY
532 __field(int, ret)
533 __field(unsigned int, ackfail)
534 __field(unsigned int, rtsfail)
535 __field(unsigned int, fcserr)
536 __field(unsigned int, rtssucc)
537 ),
538
539 TP_fast_assign(
540 LOCAL_ASSIGN;
541 __entry->ret = ret;
542 __entry->ackfail = stats->dot11ACKFailureCount;
543 __entry->rtsfail = stats->dot11RTSFailureCount;
544 __entry->fcserr = stats->dot11FCSErrorCount;
545 __entry->rtssucc = stats->dot11RTSSuccessCount;
546 ),
547
548 TP_printk(
549 LOCAL_PR_FMT " ret:%d",
550 LOCAL_PR_ARG, __entry->ret
551 )
552);
553
554TRACE_EVENT(drv_get_tkip_seq,
555 TP_PROTO(struct ieee80211_local *local,
556 u8 hw_key_idx, u32 *iv32, u16 *iv16),
557
558 TP_ARGS(local, hw_key_idx, iv32, iv16),
559
560 TP_STRUCT__entry(
561 LOCAL_ENTRY
562 __field(u8, hw_key_idx)
563 __field(u32, iv32)
564 __field(u16, iv16)
565 ),
566
567 TP_fast_assign(
568 LOCAL_ASSIGN;
569 __entry->hw_key_idx = hw_key_idx;
570 __entry->iv32 = *iv32;
571 __entry->iv16 = *iv16;
572 ),
573
574 TP_printk(
575 LOCAL_PR_FMT, LOCAL_PR_ARG
576 )
577);
578
Luciano Coelho92ddc112011-05-09 14:40:06 +0300579DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200580 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300581 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200582);
583
Luciano Coelho92ddc112011-05-09 14:40:06 +0300584DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200585 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300586 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200587);
588
Lukáš Turek310bc672009-12-21 22:50:48 +0100589TRACE_EVENT(drv_set_coverage_class,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200590 TP_PROTO(struct ieee80211_local *local, u8 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100591
Johannes Berg4efc76b2010-06-10 10:56:20 +0200592 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100593
594 TP_STRUCT__entry(
595 LOCAL_ENTRY
596 __field(u8, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100597 ),
598
599 TP_fast_assign(
600 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100601 __entry->value = value;
602 ),
603
604 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200605 LOCAL_PR_FMT " value:%d",
606 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100607 )
608);
609
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200610TRACE_EVENT(drv_sta_notify,
611 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100612 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200613 enum sta_notify_cmd cmd,
614 struct ieee80211_sta *sta),
615
Johannes Berg12375ef2009-11-25 20:30:31 +0100616 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200617
618 TP_STRUCT__entry(
619 LOCAL_ENTRY
620 VIF_ENTRY
621 STA_ENTRY
622 __field(u32, cmd)
623 ),
624
625 TP_fast_assign(
626 LOCAL_ASSIGN;
627 VIF_ASSIGN;
628 STA_ASSIGN;
629 __entry->cmd = cmd;
630 ),
631
632 TP_printk(
633 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
634 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
635 )
636);
637
Johannes Bergf09603a2012-01-20 13:55:21 +0100638TRACE_EVENT(drv_sta_state,
639 TP_PROTO(struct ieee80211_local *local,
640 struct ieee80211_sub_if_data *sdata,
641 struct ieee80211_sta *sta,
642 enum ieee80211_sta_state old_state,
643 enum ieee80211_sta_state new_state),
644
645 TP_ARGS(local, sdata, sta, old_state, new_state),
646
647 TP_STRUCT__entry(
648 LOCAL_ENTRY
649 VIF_ENTRY
650 STA_ENTRY
651 __field(u32, old_state)
652 __field(u32, new_state)
653 ),
654
655 TP_fast_assign(
656 LOCAL_ASSIGN;
657 VIF_ASSIGN;
658 STA_ASSIGN;
659 __entry->old_state = old_state;
660 __entry->new_state = new_state;
661 ),
662
663 TP_printk(
664 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
665 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
666 __entry->old_state, __entry->new_state
667 )
668);
669
Johannes Berg34e89502010-02-03 13:59:58 +0100670TRACE_EVENT(drv_sta_add,
671 TP_PROTO(struct ieee80211_local *local,
672 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200673 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100674
Johannes Berg4efc76b2010-06-10 10:56:20 +0200675 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100676
677 TP_STRUCT__entry(
678 LOCAL_ENTRY
679 VIF_ENTRY
680 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100681 ),
682
683 TP_fast_assign(
684 LOCAL_ASSIGN;
685 VIF_ASSIGN;
686 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100687 ),
688
689 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200690 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
691 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100692 )
693);
694
695TRACE_EVENT(drv_sta_remove,
696 TP_PROTO(struct ieee80211_local *local,
697 struct ieee80211_sub_if_data *sdata,
698 struct ieee80211_sta *sta),
699
700 TP_ARGS(local, sdata, sta),
701
702 TP_STRUCT__entry(
703 LOCAL_ENTRY
704 VIF_ENTRY
705 STA_ENTRY
706 ),
707
708 TP_fast_assign(
709 LOCAL_ASSIGN;
710 VIF_ASSIGN;
711 STA_ASSIGN;
712 ),
713
714 TP_printk(
715 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
716 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
717 )
718);
719
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200720TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300721 TP_PROTO(struct ieee80211_local *local,
722 struct ieee80211_sub_if_data *sdata,
723 u16 queue,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200724 const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200725
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300726 TP_ARGS(local, sdata, queue, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200727
728 TP_STRUCT__entry(
729 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300730 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200731 __field(u16, queue)
732 __field(u16, txop)
733 __field(u16, cw_min)
734 __field(u16, cw_max)
735 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300736 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200737 ),
738
739 TP_fast_assign(
740 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300741 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200742 __entry->queue = queue;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200743 __entry->txop = params->txop;
744 __entry->cw_max = params->cw_max;
745 __entry->cw_min = params->cw_min;
746 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300747 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200748 ),
749
750 TP_printk(
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300751 LOCAL_PR_FMT VIF_PR_FMT " queue:%d",
752 LOCAL_PR_ARG, VIF_PR_ARG, __entry->queue
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200753 )
754);
755
Eliad Peller37a41b42011-09-21 14:06:11 +0300756DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
757 TP_PROTO(struct ieee80211_local *local,
758 struct ieee80211_sub_if_data *sdata),
759 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200760);
761
762TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +0300763 TP_PROTO(struct ieee80211_local *local,
764 struct ieee80211_sub_if_data *sdata,
765 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200766
Eliad Peller37a41b42011-09-21 14:06:11 +0300767 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200768
769 TP_STRUCT__entry(
770 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +0300771 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200772 __field(u64, tsf)
773 ),
774
775 TP_fast_assign(
776 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +0300777 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200778 __entry->tsf = tsf;
779 ),
780
781 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +0300782 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
783 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200784 )
785);
786
Eliad Peller37a41b42011-09-21 14:06:11 +0300787DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
788 TP_PROTO(struct ieee80211_local *local,
789 struct ieee80211_sub_if_data *sdata),
790 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200791);
792
Johannes Bergba99d932011-01-26 09:22:15 +0100793DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200794 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100795 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200796);
797
798TRACE_EVENT(drv_ampdu_action,
799 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100800 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200801 enum ieee80211_ampdu_mlme_action action,
802 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100803 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200804
Johannes Berg0b01f032011-01-18 13:51:05 +0100805 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200806
807 TP_STRUCT__entry(
808 LOCAL_ENTRY
809 STA_ENTRY
810 __field(u32, action)
811 __field(u16, tid)
812 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100813 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100814 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200815 ),
816
817 TP_fast_assign(
818 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100819 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200820 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200821 __entry->action = action;
822 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800823 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100824 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200825 ),
826
827 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100828 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
829 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
830 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200831 )
832);
Johannes Berga80f7c02009-12-23 13:15:32 +0100833
John W. Linvillec466d4e2010-06-29 14:51:23 -0400834TRACE_EVENT(drv_get_survey,
835 TP_PROTO(struct ieee80211_local *local, int idx,
836 struct survey_info *survey),
837
838 TP_ARGS(local, idx, survey),
839
840 TP_STRUCT__entry(
841 LOCAL_ENTRY
842 __field(int, idx)
843 ),
844
845 TP_fast_assign(
846 LOCAL_ASSIGN;
847 __entry->idx = idx;
848 ),
849
850 TP_printk(
851 LOCAL_PR_FMT " idx:%d",
852 LOCAL_PR_ARG, __entry->idx
853 )
854);
855
Johannes Berga80f7c02009-12-23 13:15:32 +0100856TRACE_EVENT(drv_flush,
857 TP_PROTO(struct ieee80211_local *local, bool drop),
858
859 TP_ARGS(local, drop),
860
861 TP_STRUCT__entry(
862 LOCAL_ENTRY
863 __field(bool, drop)
864 ),
865
866 TP_fast_assign(
867 LOCAL_ASSIGN;
868 __entry->drop = drop;
869 ),
870
871 TP_printk(
872 LOCAL_PR_FMT " drop:%d",
873 LOCAL_PR_ARG, __entry->drop
874 )
875);
Johannes Bergb5878a22010-04-07 16:48:40 +0200876
Johannes Berg5ce6e432010-05-11 16:20:57 +0200877TRACE_EVENT(drv_channel_switch,
878 TP_PROTO(struct ieee80211_local *local,
879 struct ieee80211_channel_switch *ch_switch),
880
881 TP_ARGS(local, ch_switch),
882
883 TP_STRUCT__entry(
884 LOCAL_ENTRY
885 __field(u64, timestamp)
886 __field(bool, block_tx)
887 __field(u16, freq)
888 __field(u8, count)
889 ),
890
891 TP_fast_assign(
892 LOCAL_ASSIGN;
893 __entry->timestamp = ch_switch->timestamp;
894 __entry->block_tx = ch_switch->block_tx;
895 __entry->freq = ch_switch->channel->center_freq;
896 __entry->count = ch_switch->count;
897 ),
898
899 TP_printk(
900 LOCAL_PR_FMT " new freq:%u count:%d",
901 LOCAL_PR_ARG, __entry->freq, __entry->count
902 )
903);
904
Bruno Randolf15d96752010-11-10 12:50:56 +0900905TRACE_EVENT(drv_set_antenna,
906 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
907
908 TP_ARGS(local, tx_ant, rx_ant, ret),
909
910 TP_STRUCT__entry(
911 LOCAL_ENTRY
912 __field(u32, tx_ant)
913 __field(u32, rx_ant)
914 __field(int, ret)
915 ),
916
917 TP_fast_assign(
918 LOCAL_ASSIGN;
919 __entry->tx_ant = tx_ant;
920 __entry->rx_ant = rx_ant;
921 __entry->ret = ret;
922 ),
923
924 TP_printk(
925 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
926 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
927 )
928);
929
930TRACE_EVENT(drv_get_antenna,
931 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
932
933 TP_ARGS(local, tx_ant, rx_ant, ret),
934
935 TP_STRUCT__entry(
936 LOCAL_ENTRY
937 __field(u32, tx_ant)
938 __field(u32, rx_ant)
939 __field(int, ret)
940 ),
941
942 TP_fast_assign(
943 LOCAL_ASSIGN;
944 __entry->tx_ant = tx_ant;
945 __entry->rx_ant = rx_ant;
946 __entry->ret = ret;
947 ),
948
949 TP_printk(
950 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
951 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
952 )
953);
954
Johannes Berg21f83582010-12-18 17:20:47 +0100955TRACE_EVENT(drv_remain_on_channel,
956 TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
957 enum nl80211_channel_type chantype, unsigned int duration),
958
959 TP_ARGS(local, chan, chantype, duration),
960
961 TP_STRUCT__entry(
962 LOCAL_ENTRY
963 __field(int, center_freq)
964 __field(int, channel_type)
965 __field(unsigned int, duration)
966 ),
967
968 TP_fast_assign(
969 LOCAL_ASSIGN;
970 __entry->center_freq = chan->center_freq;
971 __entry->channel_type = chantype;
972 __entry->duration = duration;
973 ),
974
975 TP_printk(
976 LOCAL_PR_FMT " freq:%dMHz duration:%dms",
977 LOCAL_PR_ARG, __entry->center_freq, __entry->duration
978 )
979);
980
Johannes Bergba99d932011-01-26 09:22:15 +0100981DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +0100982 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100983 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +0100984);
985
Johannes Berg5f16a432011-02-25 15:36:57 +0100986TRACE_EVENT(drv_offchannel_tx,
987 TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
988 struct ieee80211_channel *chan,
989 enum nl80211_channel_type channel_type,
990 unsigned int wait),
991
992 TP_ARGS(local, skb, chan, channel_type, wait),
993
994 TP_STRUCT__entry(
995 LOCAL_ENTRY
996 __field(int, center_freq)
997 __field(int, channel_type)
998 __field(unsigned int, wait)
999 ),
1000
1001 TP_fast_assign(
1002 LOCAL_ASSIGN;
1003 __entry->center_freq = chan->center_freq;
1004 __entry->channel_type = channel_type;
1005 __entry->wait = wait;
1006 ),
1007
1008 TP_printk(
1009 LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
1010 LOCAL_PR_ARG, __entry->center_freq, __entry->wait
1011 )
1012);
1013
John W. Linville38c09152011-03-07 16:19:18 -05001014TRACE_EVENT(drv_set_ringparam,
1015 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1016
1017 TP_ARGS(local, tx, rx),
1018
1019 TP_STRUCT__entry(
1020 LOCAL_ENTRY
1021 __field(u32, tx)
1022 __field(u32, rx)
1023 ),
1024
1025 TP_fast_assign(
1026 LOCAL_ASSIGN;
1027 __entry->tx = tx;
1028 __entry->rx = rx;
1029 ),
1030
1031 TP_printk(
1032 LOCAL_PR_FMT " tx:%d rx %d",
1033 LOCAL_PR_ARG, __entry->tx, __entry->rx
1034 )
1035);
1036
1037TRACE_EVENT(drv_get_ringparam,
1038 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1039 u32 *rx, u32 *rx_max),
1040
1041 TP_ARGS(local, tx, tx_max, rx, rx_max),
1042
1043 TP_STRUCT__entry(
1044 LOCAL_ENTRY
1045 __field(u32, tx)
1046 __field(u32, tx_max)
1047 __field(u32, rx)
1048 __field(u32, rx_max)
1049 ),
1050
1051 TP_fast_assign(
1052 LOCAL_ASSIGN;
1053 __entry->tx = *tx;
1054 __entry->tx_max = *tx_max;
1055 __entry->rx = *rx;
1056 __entry->rx_max = *rx_max;
1057 ),
1058
1059 TP_printk(
1060 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1061 LOCAL_PR_ARG,
1062 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1063 )
1064);
1065
Vivek Natarajane8306f92011-04-06 11:41:10 +05301066DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1067 TP_PROTO(struct ieee80211_local *local),
1068 TP_ARGS(local)
1069);
1070
Johannes Berg5f16a432011-02-25 15:36:57 +01001071DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1072 TP_PROTO(struct ieee80211_local *local),
1073 TP_ARGS(local)
1074);
1075
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301076TRACE_EVENT(drv_set_bitrate_mask,
1077 TP_PROTO(struct ieee80211_local *local,
1078 struct ieee80211_sub_if_data *sdata,
1079 const struct cfg80211_bitrate_mask *mask),
1080
1081 TP_ARGS(local, sdata, mask),
1082
1083 TP_STRUCT__entry(
1084 LOCAL_ENTRY
1085 VIF_ENTRY
1086 __field(u32, legacy_2g)
1087 __field(u32, legacy_5g)
1088 ),
1089
1090 TP_fast_assign(
1091 LOCAL_ASSIGN;
1092 VIF_ASSIGN;
1093 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1094 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1095 ),
1096
1097 TP_printk(
1098 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1099 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1100 )
1101);
1102
Johannes Bergc68f4b82011-07-05 16:35:41 +02001103TRACE_EVENT(drv_set_rekey_data,
1104 TP_PROTO(struct ieee80211_local *local,
1105 struct ieee80211_sub_if_data *sdata,
1106 struct cfg80211_gtk_rekey_data *data),
1107
1108 TP_ARGS(local, sdata, data),
1109
1110 TP_STRUCT__entry(
1111 LOCAL_ENTRY
1112 VIF_ENTRY
1113 __array(u8, kek, NL80211_KEK_LEN)
1114 __array(u8, kck, NL80211_KCK_LEN)
1115 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1116 ),
1117
1118 TP_fast_assign(
1119 LOCAL_ASSIGN;
1120 VIF_ASSIGN;
1121 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1122 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1123 memcpy(__entry->replay_ctr, data->replay_ctr,
1124 NL80211_REPLAY_CTR_LEN);
1125 ),
1126
1127 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1128 LOCAL_PR_ARG, VIF_PR_ARG)
1129);
1130
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001131TRACE_EVENT(drv_rssi_callback,
1132 TP_PROTO(struct ieee80211_local *local,
1133 enum ieee80211_rssi_event rssi_event),
1134
1135 TP_ARGS(local, rssi_event),
1136
1137 TP_STRUCT__entry(
1138 LOCAL_ENTRY
1139 __field(u32, rssi_event)
1140 ),
1141
1142 TP_fast_assign(
1143 LOCAL_ASSIGN;
1144 __entry->rssi_event = rssi_event;
1145 ),
1146
1147 TP_printk(
1148 LOCAL_PR_FMT " rssi_event:%d",
1149 LOCAL_PR_ARG, __entry->rssi_event
1150 )
1151);
1152
Johannes Berg40b96402011-09-29 16:04:38 +02001153DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001154 TP_PROTO(struct ieee80211_local *local,
1155 struct ieee80211_sta *sta,
1156 u16 tids, int num_frames,
1157 enum ieee80211_frame_release_type reason,
1158 bool more_data),
1159
1160 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1161
1162 TP_STRUCT__entry(
1163 LOCAL_ENTRY
1164 STA_ENTRY
1165 __field(u16, tids)
1166 __field(int, num_frames)
1167 __field(int, reason)
1168 __field(bool, more_data)
1169 ),
1170
1171 TP_fast_assign(
1172 LOCAL_ASSIGN;
1173 STA_ASSIGN;
1174 __entry->tids = tids;
1175 __entry->num_frames = num_frames;
1176 __entry->reason = reason;
1177 __entry->more_data = more_data;
1178 ),
1179
1180 TP_printk(
1181 LOCAL_PR_FMT STA_PR_FMT
1182 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1183 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1184 __entry->reason, __entry->more_data
1185 )
1186);
1187
Johannes Berg40b96402011-09-29 16:04:38 +02001188DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1189 TP_PROTO(struct ieee80211_local *local,
1190 struct ieee80211_sta *sta,
1191 u16 tids, int num_frames,
1192 enum ieee80211_frame_release_type reason,
1193 bool more_data),
1194
1195 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1196);
1197
1198DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1199 TP_PROTO(struct ieee80211_local *local,
1200 struct ieee80211_sta *sta,
1201 u16 tids, int num_frames,
1202 enum ieee80211_frame_release_type reason,
1203 bool more_data),
1204
1205 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1206);
1207
Johannes Bergb5878a22010-04-07 16:48:40 +02001208/*
1209 * Tracing for API calls that drivers call.
1210 */
1211
1212TRACE_EVENT(api_start_tx_ba_session,
1213 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1214
1215 TP_ARGS(sta, tid),
1216
1217 TP_STRUCT__entry(
1218 STA_ENTRY
1219 __field(u16, tid)
1220 ),
1221
1222 TP_fast_assign(
1223 STA_ASSIGN;
1224 __entry->tid = tid;
1225 ),
1226
1227 TP_printk(
1228 STA_PR_FMT " tid:%d",
1229 STA_PR_ARG, __entry->tid
1230 )
1231);
1232
1233TRACE_EVENT(api_start_tx_ba_cb,
1234 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1235
1236 TP_ARGS(sdata, ra, tid),
1237
1238 TP_STRUCT__entry(
1239 VIF_ENTRY
1240 __array(u8, ra, ETH_ALEN)
1241 __field(u16, tid)
1242 ),
1243
1244 TP_fast_assign(
1245 VIF_ASSIGN;
1246 memcpy(__entry->ra, ra, ETH_ALEN);
1247 __entry->tid = tid;
1248 ),
1249
1250 TP_printk(
1251 VIF_PR_FMT " ra:%pM tid:%d",
1252 VIF_PR_ARG, __entry->ra, __entry->tid
1253 )
1254);
1255
1256TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001257 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001258
Johannes Berg6a8579d2010-05-27 14:41:07 +02001259 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001260
1261 TP_STRUCT__entry(
1262 STA_ENTRY
1263 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001264 ),
1265
1266 TP_fast_assign(
1267 STA_ASSIGN;
1268 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001269 ),
1270
1271 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001272 STA_PR_FMT " tid:%d",
1273 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001274 )
1275);
1276
1277TRACE_EVENT(api_stop_tx_ba_cb,
1278 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1279
1280 TP_ARGS(sdata, ra, tid),
1281
1282 TP_STRUCT__entry(
1283 VIF_ENTRY
1284 __array(u8, ra, ETH_ALEN)
1285 __field(u16, tid)
1286 ),
1287
1288 TP_fast_assign(
1289 VIF_ASSIGN;
1290 memcpy(__entry->ra, ra, ETH_ALEN);
1291 __entry->tid = tid;
1292 ),
1293
1294 TP_printk(
1295 VIF_PR_FMT " ra:%pM tid:%d",
1296 VIF_PR_ARG, __entry->ra, __entry->tid
1297 )
1298);
1299
Johannes Bergba99d932011-01-26 09:22:15 +01001300DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001301 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001302 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001303);
1304
1305TRACE_EVENT(api_beacon_loss,
1306 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1307
1308 TP_ARGS(sdata),
1309
1310 TP_STRUCT__entry(
1311 VIF_ENTRY
1312 ),
1313
1314 TP_fast_assign(
1315 VIF_ASSIGN;
1316 ),
1317
1318 TP_printk(
1319 VIF_PR_FMT,
1320 VIF_PR_ARG
1321 )
1322);
1323
1324TRACE_EVENT(api_connection_loss,
1325 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1326
1327 TP_ARGS(sdata),
1328
1329 TP_STRUCT__entry(
1330 VIF_ENTRY
1331 ),
1332
1333 TP_fast_assign(
1334 VIF_ASSIGN;
1335 ),
1336
1337 TP_printk(
1338 VIF_PR_FMT,
1339 VIF_PR_ARG
1340 )
1341);
1342
1343TRACE_EVENT(api_cqm_rssi_notify,
1344 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1345 enum nl80211_cqm_rssi_threshold_event rssi_event),
1346
1347 TP_ARGS(sdata, rssi_event),
1348
1349 TP_STRUCT__entry(
1350 VIF_ENTRY
1351 __field(u32, rssi_event)
1352 ),
1353
1354 TP_fast_assign(
1355 VIF_ASSIGN;
1356 __entry->rssi_event = rssi_event;
1357 ),
1358
1359 TP_printk(
1360 VIF_PR_FMT " event:%d",
1361 VIF_PR_ARG, __entry->rssi_event
1362 )
1363);
1364
1365TRACE_EVENT(api_scan_completed,
1366 TP_PROTO(struct ieee80211_local *local, bool aborted),
1367
1368 TP_ARGS(local, aborted),
1369
1370 TP_STRUCT__entry(
1371 LOCAL_ENTRY
1372 __field(bool, aborted)
1373 ),
1374
1375 TP_fast_assign(
1376 LOCAL_ASSIGN;
1377 __entry->aborted = aborted;
1378 ),
1379
1380 TP_printk(
1381 LOCAL_PR_FMT " aborted:%d",
1382 LOCAL_PR_ARG, __entry->aborted
1383 )
1384);
1385
Luciano Coelho79f460c2011-05-11 17:09:36 +03001386TRACE_EVENT(api_sched_scan_results,
1387 TP_PROTO(struct ieee80211_local *local),
1388
1389 TP_ARGS(local),
1390
1391 TP_STRUCT__entry(
1392 LOCAL_ENTRY
1393 ),
1394
1395 TP_fast_assign(
1396 LOCAL_ASSIGN;
1397 ),
1398
1399 TP_printk(
1400 LOCAL_PR_FMT, LOCAL_PR_ARG
1401 )
1402);
1403
1404TRACE_EVENT(api_sched_scan_stopped,
1405 TP_PROTO(struct ieee80211_local *local),
1406
1407 TP_ARGS(local),
1408
1409 TP_STRUCT__entry(
1410 LOCAL_ENTRY
1411 ),
1412
1413 TP_fast_assign(
1414 LOCAL_ASSIGN;
1415 ),
1416
1417 TP_printk(
1418 LOCAL_PR_FMT, LOCAL_PR_ARG
1419 )
1420);
1421
Johannes Bergb5878a22010-04-07 16:48:40 +02001422TRACE_EVENT(api_sta_block_awake,
1423 TP_PROTO(struct ieee80211_local *local,
1424 struct ieee80211_sta *sta, bool block),
1425
1426 TP_ARGS(local, sta, block),
1427
1428 TP_STRUCT__entry(
1429 LOCAL_ENTRY
1430 STA_ENTRY
1431 __field(bool, block)
1432 ),
1433
1434 TP_fast_assign(
1435 LOCAL_ASSIGN;
1436 STA_ASSIGN;
1437 __entry->block = block;
1438 ),
1439
1440 TP_printk(
1441 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1442 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
1443 )
1444);
1445
Johannes Berg5ce6e432010-05-11 16:20:57 +02001446TRACE_EVENT(api_chswitch_done,
1447 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1448
1449 TP_ARGS(sdata, success),
1450
1451 TP_STRUCT__entry(
1452 VIF_ENTRY
1453 __field(bool, success)
1454 ),
1455
1456 TP_fast_assign(
1457 VIF_ASSIGN;
1458 __entry->success = success;
1459 ),
1460
1461 TP_printk(
1462 VIF_PR_FMT " success=%d",
1463 VIF_PR_ARG, __entry->success
1464 )
1465);
1466
Johannes Bergba99d932011-01-26 09:22:15 +01001467DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001468 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001469 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001470);
1471
Johannes Bergba99d932011-01-26 09:22:15 +01001472DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001473 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001474 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001475);
1476
Johannes Bergc68f4b82011-07-05 16:35:41 +02001477TRACE_EVENT(api_gtk_rekey_notify,
1478 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1479 const u8 *bssid, const u8 *replay_ctr),
1480
1481 TP_ARGS(sdata, bssid, replay_ctr),
1482
1483 TP_STRUCT__entry(
1484 VIF_ENTRY
1485 __array(u8, bssid, ETH_ALEN)
1486 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1487 ),
1488
1489 TP_fast_assign(
1490 VIF_ASSIGN;
1491 memcpy(__entry->bssid, bssid, ETH_ALEN);
1492 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1493 ),
1494
1495 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1496);
1497
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001498TRACE_EVENT(api_enable_rssi_reports,
1499 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1500 int rssi_min_thold, int rssi_max_thold),
1501
1502 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1503
1504 TP_STRUCT__entry(
1505 VIF_ENTRY
1506 __field(int, rssi_min_thold)
1507 __field(int, rssi_max_thold)
1508 ),
1509
1510 TP_fast_assign(
1511 VIF_ASSIGN;
1512 __entry->rssi_min_thold = rssi_min_thold;
1513 __entry->rssi_max_thold = rssi_max_thold;
1514 ),
1515
1516 TP_printk(
1517 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
1518 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
1519 )
1520);
1521
Johannes Berg37fbd902011-09-29 16:04:39 +02001522TRACE_EVENT(api_eosp,
1523 TP_PROTO(struct ieee80211_local *local,
1524 struct ieee80211_sta *sta),
1525
1526 TP_ARGS(local, sta),
1527
1528 TP_STRUCT__entry(
1529 LOCAL_ENTRY
1530 STA_ENTRY
1531 ),
1532
1533 TP_fast_assign(
1534 LOCAL_ASSIGN;
1535 STA_ASSIGN;
1536 ),
1537
1538 TP_printk(
1539 LOCAL_PR_FMT STA_PR_FMT,
1540 LOCAL_PR_ARG, STA_PR_FMT
1541 )
1542);
1543
Johannes Bergb5878a22010-04-07 16:48:40 +02001544/*
1545 * Tracing for internal functions
1546 * (which may also be called in response to driver calls)
1547 */
1548
1549TRACE_EVENT(wake_queue,
1550 TP_PROTO(struct ieee80211_local *local, u16 queue,
1551 enum queue_stop_reason reason),
1552
1553 TP_ARGS(local, queue, reason),
1554
1555 TP_STRUCT__entry(
1556 LOCAL_ENTRY
1557 __field(u16, queue)
1558 __field(u32, reason)
1559 ),
1560
1561 TP_fast_assign(
1562 LOCAL_ASSIGN;
1563 __entry->queue = queue;
1564 __entry->reason = reason;
1565 ),
1566
1567 TP_printk(
1568 LOCAL_PR_FMT " queue:%d, reason:%d",
1569 LOCAL_PR_ARG, __entry->queue, __entry->reason
1570 )
1571);
1572
1573TRACE_EVENT(stop_queue,
1574 TP_PROTO(struct ieee80211_local *local, u16 queue,
1575 enum queue_stop_reason reason),
1576
1577 TP_ARGS(local, queue, reason),
1578
1579 TP_STRUCT__entry(
1580 LOCAL_ENTRY
1581 __field(u16, queue)
1582 __field(u32, reason)
1583 ),
1584
1585 TP_fast_assign(
1586 LOCAL_ASSIGN;
1587 __entry->queue = queue;
1588 __entry->reason = reason;
1589 ),
1590
1591 TP_printk(
1592 LOCAL_PR_FMT " queue:%d, reason:%d",
1593 LOCAL_PR_ARG, __entry->queue, __entry->reason
1594 )
1595);
Christian Lamparterf7428802009-07-19 23:21:07 +02001596#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001597
1598#undef TRACE_INCLUDE_PATH
1599#define TRACE_INCLUDE_PATH .
1600#undef TRACE_INCLUDE_FILE
1601#define TRACE_INCLUDE_FILE driver-trace
1602#include <trace/define_trace.h>