blob: c2772f23ac9cc534f8f6091c7c1961dc12bf209c [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
Christian Lamparterf7428802009-07-19 23:21:07 +02008#if !defined(CONFIG_MAC80211_DRIVER_API_TRACER) || defined(__CHECKER__)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02009#undef TRACE_EVENT
10#define TRACE_EVENT(name, proto, ...) \
11static inline void trace_ ## name(proto) {}
12#endif
13
14#undef TRACE_SYSTEM
15#define TRACE_SYSTEM mac80211
16
17#define MAXNAME 32
18#define LOCAL_ENTRY __array(char, wiphy_name, 32)
19#define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME)
20#define LOCAL_PR_FMT "%s"
21#define LOCAL_PR_ARG __entry->wiphy_name
22
23#define STA_ENTRY __array(char, sta_addr, ETH_ALEN)
24#define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN))
25#define STA_PR_FMT " sta:%pM"
26#define STA_PR_ARG __entry->sta_addr
27
Johannes Berg2ca27bc2010-09-16 14:58:23 +020028#define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
29 __field(bool, p2p) \
Johannes Berg12375ef2009-11-25 20:30:31 +010030 __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
Johannes Berg2ca27bc2010-09-16 14:58:23 +020031#define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
32 __entry->p2p = sdata->vif.p2p; \
Johannes Berg12375ef2009-11-25 20:30:31 +010033 __assign_str(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
Johannes Berg2ca27bc2010-09-16 14:58:23 +020034#define VIF_PR_FMT " vif:%s(%d%s)"
35#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020036
Johannes Bergb5878a22010-04-07 16:48:40 +020037/*
38 * Tracing for driver callbacks.
39 */
40
Johannes Berg4efc76b2010-06-10 10:56:20 +020041TRACE_EVENT(drv_return_void,
42 TP_PROTO(struct ieee80211_local *local),
43 TP_ARGS(local),
44 TP_STRUCT__entry(
45 LOCAL_ENTRY
46 ),
47 TP_fast_assign(
48 LOCAL_ASSIGN;
49 ),
50 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
51);
52
53TRACE_EVENT(drv_return_int,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020054 TP_PROTO(struct ieee80211_local *local, int ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020055 TP_ARGS(local, ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020056 TP_STRUCT__entry(
57 LOCAL_ENTRY
58 __field(int, ret)
59 ),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020060 TP_fast_assign(
61 LOCAL_ASSIGN;
62 __entry->ret = ret;
63 ),
Johannes Berg4efc76b2010-06-10 10:56:20 +020064 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
65);
66
67TRACE_EVENT(drv_return_u64,
68 TP_PROTO(struct ieee80211_local *local, u64 ret),
69 TP_ARGS(local, ret),
70 TP_STRUCT__entry(
71 LOCAL_ENTRY
72 __field(u64, ret)
73 ),
74 TP_fast_assign(
75 LOCAL_ASSIGN;
76 __entry->ret = ret;
77 ),
78 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
79);
80
81TRACE_EVENT(drv_start,
82 TP_PROTO(struct ieee80211_local *local),
83
84 TP_ARGS(local),
85
86 TP_STRUCT__entry(
87 LOCAL_ENTRY
88 ),
89
90 TP_fast_assign(
91 LOCAL_ASSIGN;
92 ),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020093
94 TP_printk(
95 LOCAL_PR_FMT, LOCAL_PR_ARG
96 )
97);
98
99TRACE_EVENT(drv_stop,
100 TP_PROTO(struct ieee80211_local *local),
101
102 TP_ARGS(local),
103
104 TP_STRUCT__entry(
105 LOCAL_ENTRY
106 ),
107
108 TP_fast_assign(
109 LOCAL_ASSIGN;
110 ),
111
112 TP_printk(
113 LOCAL_PR_FMT, LOCAL_PR_ARG
114 )
115);
116
117TRACE_EVENT(drv_add_interface,
118 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200119 struct ieee80211_sub_if_data *sdata),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200120
Johannes Berg4efc76b2010-06-10 10:56:20 +0200121 TP_ARGS(local, sdata),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200122
123 TP_STRUCT__entry(
124 LOCAL_ENTRY
125 VIF_ENTRY
126 __array(char, addr, 6)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200127 ),
128
129 TP_fast_assign(
130 LOCAL_ASSIGN;
131 VIF_ASSIGN;
Johannes Berg12375ef2009-11-25 20:30:31 +0100132 memcpy(__entry->addr, sdata->vif.addr, 6);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200133 ),
134
135 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200136 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
137 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200138 )
139);
140
Johannes Berg34d4bc42010-08-27 12:35:58 +0200141TRACE_EVENT(drv_change_interface,
142 TP_PROTO(struct ieee80211_local *local,
143 struct ieee80211_sub_if_data *sdata,
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200144 enum nl80211_iftype type, bool p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200145
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200146 TP_ARGS(local, sdata, type, p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200147
148 TP_STRUCT__entry(
149 LOCAL_ENTRY
150 VIF_ENTRY
151 __field(u32, new_type)
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200152 __field(bool, new_p2p)
Johannes Berg34d4bc42010-08-27 12:35:58 +0200153 ),
154
155 TP_fast_assign(
156 LOCAL_ASSIGN;
157 VIF_ASSIGN;
158 __entry->new_type = type;
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200159 __entry->new_p2p = p2p;
Johannes Berg34d4bc42010-08-27 12:35:58 +0200160 ),
161
162 TP_printk(
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200163 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
164 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
165 __entry->new_p2p ? "/p2p" : ""
Johannes Berg34d4bc42010-08-27 12:35:58 +0200166 )
167);
168
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200169TRACE_EVENT(drv_remove_interface,
Johannes Berg12375ef2009-11-25 20:30:31 +0100170 TP_PROTO(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200171
Johannes Berg12375ef2009-11-25 20:30:31 +0100172 TP_ARGS(local, sdata),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200173
174 TP_STRUCT__entry(
175 LOCAL_ENTRY
176 VIF_ENTRY
177 __array(char, addr, 6)
178 ),
179
180 TP_fast_assign(
181 LOCAL_ASSIGN;
182 VIF_ASSIGN;
Johannes Berg12375ef2009-11-25 20:30:31 +0100183 memcpy(__entry->addr, sdata->vif.addr, 6);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200184 ),
185
186 TP_printk(
187 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
188 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
189 )
190);
191
192TRACE_EVENT(drv_config,
193 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200194 u32 changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200195
Johannes Berg4efc76b2010-06-10 10:56:20 +0200196 TP_ARGS(local, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200197
198 TP_STRUCT__entry(
199 LOCAL_ENTRY
200 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100201 __field(u32, flags)
202 __field(int, power_level)
203 __field(int, dynamic_ps_timeout)
204 __field(int, max_sleep_period)
205 __field(u16, listen_interval)
206 __field(u8, long_frame_max_tx_count)
207 __field(u8, short_frame_max_tx_count)
208 __field(int, center_freq)
209 __field(int, channel_type)
Johannes Berg0f782312009-12-01 13:37:02 +0100210 __field(int, smps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200211 ),
212
213 TP_fast_assign(
214 LOCAL_ASSIGN;
215 __entry->changed = changed;
Johannes Bergf911ab82009-11-25 19:07:20 +0100216 __entry->flags = local->hw.conf.flags;
217 __entry->power_level = local->hw.conf.power_level;
218 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
219 __entry->max_sleep_period = local->hw.conf.max_sleep_period;
220 __entry->listen_interval = local->hw.conf.listen_interval;
221 __entry->long_frame_max_tx_count = local->hw.conf.long_frame_max_tx_count;
222 __entry->short_frame_max_tx_count = local->hw.conf.short_frame_max_tx_count;
223 __entry->center_freq = local->hw.conf.channel->center_freq;
224 __entry->channel_type = local->hw.conf.channel_type;
Johannes Berg0f782312009-12-01 13:37:02 +0100225 __entry->smps = local->hw.conf.smps_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200226 ),
227
228 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200229 LOCAL_PR_FMT " ch:%#x freq:%d",
230 LOCAL_PR_ARG, __entry->changed, __entry->center_freq
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200231 )
232);
233
234TRACE_EVENT(drv_bss_info_changed,
235 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100236 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200237 struct ieee80211_bss_conf *info,
238 u32 changed),
239
Johannes Berg12375ef2009-11-25 20:30:31 +0100240 TP_ARGS(local, sdata, info, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200241
242 TP_STRUCT__entry(
243 LOCAL_ENTRY
244 VIF_ENTRY
245 __field(bool, assoc)
246 __field(u16, aid)
247 __field(bool, cts)
248 __field(bool, shortpre)
249 __field(bool, shortslot)
250 __field(u8, dtimper)
251 __field(u16, bcnint)
252 __field(u16, assoc_cap)
253 __field(u64, timestamp)
254 __field(u32, basic_rates)
255 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100256 __field(bool, enable_beacon)
257 __field(u16, ht_operation_mode)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200258 ),
259
260 TP_fast_assign(
261 LOCAL_ASSIGN;
262 VIF_ASSIGN;
263 __entry->changed = changed;
264 __entry->aid = info->aid;
265 __entry->assoc = info->assoc;
266 __entry->shortpre = info->use_short_preamble;
267 __entry->cts = info->use_cts_prot;
268 __entry->shortslot = info->use_short_slot;
269 __entry->dtimper = info->dtim_period;
270 __entry->bcnint = info->beacon_int;
271 __entry->assoc_cap = info->assoc_capability;
272 __entry->timestamp = info->timestamp;
273 __entry->basic_rates = info->basic_rates;
Johannes Bergf911ab82009-11-25 19:07:20 +0100274 __entry->enable_beacon = info->enable_beacon;
275 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200276 ),
277
278 TP_printk(
279 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
280 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
281 )
282);
283
Johannes Berg3ac64be2009-08-17 16:16:53 +0200284TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200285 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200286
Johannes Berg4efc76b2010-06-10 10:56:20 +0200287 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200288
289 TP_STRUCT__entry(
290 LOCAL_ENTRY
291 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200292 ),
293
294 TP_fast_assign(
295 LOCAL_ASSIGN;
296 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200297 ),
298
299 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200300 LOCAL_PR_FMT " prepare mc (%d)",
301 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200302 )
303);
304
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200305TRACE_EVENT(drv_configure_filter,
306 TP_PROTO(struct ieee80211_local *local,
307 unsigned int changed_flags,
308 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200309 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200310
Johannes Berg3ac64be2009-08-17 16:16:53 +0200311 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200312
313 TP_STRUCT__entry(
314 LOCAL_ENTRY
315 __field(unsigned int, changed)
316 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200317 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200318 ),
319
320 TP_fast_assign(
321 LOCAL_ASSIGN;
322 __entry->changed = changed_flags;
323 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200324 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200325 ),
326
327 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200328 LOCAL_PR_FMT " changed:%#x total:%#x",
329 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200330 )
331);
332
333TRACE_EVENT(drv_set_tim,
334 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200335 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200336
Johannes Berg4efc76b2010-06-10 10:56:20 +0200337 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200338
339 TP_STRUCT__entry(
340 LOCAL_ENTRY
341 STA_ENTRY
342 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200343 ),
344
345 TP_fast_assign(
346 LOCAL_ASSIGN;
347 STA_ASSIGN;
348 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200349 ),
350
351 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200352 LOCAL_PR_FMT STA_PR_FMT " set:%d",
353 LOCAL_PR_ARG, STA_PR_FMT, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200354 )
355);
356
357TRACE_EVENT(drv_set_key,
358 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100359 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200360 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200361 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200362
Johannes Berg4efc76b2010-06-10 10:56:20 +0200363 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200364
365 TP_STRUCT__entry(
366 LOCAL_ENTRY
367 VIF_ENTRY
368 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200369 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200370 __field(u8, hw_key_idx)
371 __field(u8, flags)
372 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200373 ),
374
375 TP_fast_assign(
376 LOCAL_ASSIGN;
377 VIF_ASSIGN;
378 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200379 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200380 __entry->flags = key->flags;
381 __entry->keyidx = key->keyidx;
382 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200383 ),
384
385 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200386 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
387 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200388 )
389);
390
391TRACE_EVENT(drv_update_tkip_key,
392 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100393 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200394 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100395 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200396
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100397 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200398
399 TP_STRUCT__entry(
400 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100401 VIF_ENTRY
402 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200403 __field(u32, iv32)
404 ),
405
406 TP_fast_assign(
407 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100408 VIF_ASSIGN;
409 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200410 __entry->iv32 = iv32;
411 ),
412
413 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100414 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
415 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200416 )
417);
418
419TRACE_EVENT(drv_hw_scan,
420 TP_PROTO(struct ieee80211_local *local,
Johannes Berga060bbf2010-04-27 11:59:34 +0200421 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200422 struct cfg80211_scan_request *req),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200423
Johannes Berg4efc76b2010-06-10 10:56:20 +0200424 TP_ARGS(local, sdata, req),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200425
426 TP_STRUCT__entry(
427 LOCAL_ENTRY
Johannes Berga060bbf2010-04-27 11:59:34 +0200428 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200429 ),
430
431 TP_fast_assign(
432 LOCAL_ASSIGN;
Johannes Berga060bbf2010-04-27 11:59:34 +0200433 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200434 ),
435
436 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200437 LOCAL_PR_FMT VIF_PR_FMT,
438 LOCAL_PR_ARG,VIF_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200439 )
440);
441
442TRACE_EVENT(drv_sw_scan_start,
443 TP_PROTO(struct ieee80211_local *local),
444
445 TP_ARGS(local),
446
447 TP_STRUCT__entry(
448 LOCAL_ENTRY
449 ),
450
451 TP_fast_assign(
452 LOCAL_ASSIGN;
453 ),
454
455 TP_printk(
456 LOCAL_PR_FMT, LOCAL_PR_ARG
457 )
458);
459
460TRACE_EVENT(drv_sw_scan_complete,
461 TP_PROTO(struct ieee80211_local *local),
462
463 TP_ARGS(local),
464
465 TP_STRUCT__entry(
466 LOCAL_ENTRY
467 ),
468
469 TP_fast_assign(
470 LOCAL_ASSIGN;
471 ),
472
473 TP_printk(
474 LOCAL_PR_FMT, LOCAL_PR_ARG
475 )
476);
477
478TRACE_EVENT(drv_get_stats,
479 TP_PROTO(struct ieee80211_local *local,
480 struct ieee80211_low_level_stats *stats,
481 int ret),
482
483 TP_ARGS(local, stats, ret),
484
485 TP_STRUCT__entry(
486 LOCAL_ENTRY
487 __field(int, ret)
488 __field(unsigned int, ackfail)
489 __field(unsigned int, rtsfail)
490 __field(unsigned int, fcserr)
491 __field(unsigned int, rtssucc)
492 ),
493
494 TP_fast_assign(
495 LOCAL_ASSIGN;
496 __entry->ret = ret;
497 __entry->ackfail = stats->dot11ACKFailureCount;
498 __entry->rtsfail = stats->dot11RTSFailureCount;
499 __entry->fcserr = stats->dot11FCSErrorCount;
500 __entry->rtssucc = stats->dot11RTSSuccessCount;
501 ),
502
503 TP_printk(
504 LOCAL_PR_FMT " ret:%d",
505 LOCAL_PR_ARG, __entry->ret
506 )
507);
508
509TRACE_EVENT(drv_get_tkip_seq,
510 TP_PROTO(struct ieee80211_local *local,
511 u8 hw_key_idx, u32 *iv32, u16 *iv16),
512
513 TP_ARGS(local, hw_key_idx, iv32, iv16),
514
515 TP_STRUCT__entry(
516 LOCAL_ENTRY
517 __field(u8, hw_key_idx)
518 __field(u32, iv32)
519 __field(u16, iv16)
520 ),
521
522 TP_fast_assign(
523 LOCAL_ASSIGN;
524 __entry->hw_key_idx = hw_key_idx;
525 __entry->iv32 = *iv32;
526 __entry->iv16 = *iv16;
527 ),
528
529 TP_printk(
530 LOCAL_PR_FMT, LOCAL_PR_ARG
531 )
532);
533
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200534TRACE_EVENT(drv_set_frag_threshold,
535 TP_PROTO(struct ieee80211_local *local, u32 value),
536
537 TP_ARGS(local, value),
538
539 TP_STRUCT__entry(
540 LOCAL_ENTRY
541 __field(u32, value)
542 ),
543
544 TP_fast_assign(
545 LOCAL_ASSIGN;
546 __entry->value = value;
547 ),
548
549 TP_printk(
550 LOCAL_PR_FMT " value:%d",
551 LOCAL_PR_ARG, __entry->value
552 )
553);
554
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200555TRACE_EVENT(drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200556 TP_PROTO(struct ieee80211_local *local, u32 value),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200557
Johannes Berg4efc76b2010-06-10 10:56:20 +0200558 TP_ARGS(local, value),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200559
560 TP_STRUCT__entry(
561 LOCAL_ENTRY
562 __field(u32, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200563 ),
564
565 TP_fast_assign(
566 LOCAL_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200567 __entry->value = value;
568 ),
569
570 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200571 LOCAL_PR_FMT " value:%d",
572 LOCAL_PR_ARG, __entry->value
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200573 )
574);
575
Lukáš Turek310bc672009-12-21 22:50:48 +0100576TRACE_EVENT(drv_set_coverage_class,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200577 TP_PROTO(struct ieee80211_local *local, u8 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100578
Johannes Berg4efc76b2010-06-10 10:56:20 +0200579 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100580
581 TP_STRUCT__entry(
582 LOCAL_ENTRY
583 __field(u8, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100584 ),
585
586 TP_fast_assign(
587 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100588 __entry->value = value;
589 ),
590
591 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200592 LOCAL_PR_FMT " value:%d",
593 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100594 )
595);
596
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200597TRACE_EVENT(drv_sta_notify,
598 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100599 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200600 enum sta_notify_cmd cmd,
601 struct ieee80211_sta *sta),
602
Johannes Berg12375ef2009-11-25 20:30:31 +0100603 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200604
605 TP_STRUCT__entry(
606 LOCAL_ENTRY
607 VIF_ENTRY
608 STA_ENTRY
609 __field(u32, cmd)
610 ),
611
612 TP_fast_assign(
613 LOCAL_ASSIGN;
614 VIF_ASSIGN;
615 STA_ASSIGN;
616 __entry->cmd = cmd;
617 ),
618
619 TP_printk(
620 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
621 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
622 )
623);
624
Johannes Berg34e89502010-02-03 13:59:58 +0100625TRACE_EVENT(drv_sta_add,
626 TP_PROTO(struct ieee80211_local *local,
627 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200628 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100629
Johannes Berg4efc76b2010-06-10 10:56:20 +0200630 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100631
632 TP_STRUCT__entry(
633 LOCAL_ENTRY
634 VIF_ENTRY
635 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100636 ),
637
638 TP_fast_assign(
639 LOCAL_ASSIGN;
640 VIF_ASSIGN;
641 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100642 ),
643
644 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200645 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
646 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100647 )
648);
649
650TRACE_EVENT(drv_sta_remove,
651 TP_PROTO(struct ieee80211_local *local,
652 struct ieee80211_sub_if_data *sdata,
653 struct ieee80211_sta *sta),
654
655 TP_ARGS(local, sdata, sta),
656
657 TP_STRUCT__entry(
658 LOCAL_ENTRY
659 VIF_ENTRY
660 STA_ENTRY
661 ),
662
663 TP_fast_assign(
664 LOCAL_ASSIGN;
665 VIF_ASSIGN;
666 STA_ASSIGN;
667 ),
668
669 TP_printk(
670 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
671 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
672 )
673);
674
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200675TRACE_EVENT(drv_conf_tx,
676 TP_PROTO(struct ieee80211_local *local, u16 queue,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200677 const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200678
Johannes Berg4efc76b2010-06-10 10:56:20 +0200679 TP_ARGS(local, queue, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200680
681 TP_STRUCT__entry(
682 LOCAL_ENTRY
683 __field(u16, queue)
684 __field(u16, txop)
685 __field(u16, cw_min)
686 __field(u16, cw_max)
687 __field(u8, aifs)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200688 ),
689
690 TP_fast_assign(
691 LOCAL_ASSIGN;
692 __entry->queue = queue;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200693 __entry->txop = params->txop;
694 __entry->cw_max = params->cw_max;
695 __entry->cw_min = params->cw_min;
696 __entry->aifs = params->aifs;
697 ),
698
699 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200700 LOCAL_PR_FMT " queue:%d",
701 LOCAL_PR_ARG, __entry->queue
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200702 )
703);
704
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200705TRACE_EVENT(drv_get_tsf,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200706 TP_PROTO(struct ieee80211_local *local),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200707
Johannes Berg4efc76b2010-06-10 10:56:20 +0200708 TP_ARGS(local),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200709
710 TP_STRUCT__entry(
711 LOCAL_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200712 ),
713
714 TP_fast_assign(
715 LOCAL_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200716 ),
717
718 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200719 LOCAL_PR_FMT,
720 LOCAL_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200721 )
722);
723
724TRACE_EVENT(drv_set_tsf,
725 TP_PROTO(struct ieee80211_local *local, u64 tsf),
726
727 TP_ARGS(local, tsf),
728
729 TP_STRUCT__entry(
730 LOCAL_ENTRY
731 __field(u64, tsf)
732 ),
733
734 TP_fast_assign(
735 LOCAL_ASSIGN;
736 __entry->tsf = tsf;
737 ),
738
739 TP_printk(
740 LOCAL_PR_FMT " tsf:%llu",
741 LOCAL_PR_ARG, (unsigned long long)__entry->tsf
742 )
743);
744
745TRACE_EVENT(drv_reset_tsf,
746 TP_PROTO(struct ieee80211_local *local),
747
748 TP_ARGS(local),
749
750 TP_STRUCT__entry(
751 LOCAL_ENTRY
752 ),
753
754 TP_fast_assign(
755 LOCAL_ASSIGN;
756 ),
757
758 TP_printk(
759 LOCAL_PR_FMT, LOCAL_PR_ARG
760 )
761);
762
763TRACE_EVENT(drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200764 TP_PROTO(struct ieee80211_local *local),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200765
Johannes Berg4efc76b2010-06-10 10:56:20 +0200766 TP_ARGS(local),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200767
768 TP_STRUCT__entry(
769 LOCAL_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200770 ),
771
772 TP_fast_assign(
773 LOCAL_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200774 ),
775
776 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200777 LOCAL_PR_FMT,
778 LOCAL_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200779 )
780);
781
782TRACE_EVENT(drv_ampdu_action,
783 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100784 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200785 enum ieee80211_ampdu_mlme_action action,
786 struct ieee80211_sta *sta, u16 tid,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200787 u16 *ssn),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200788
Johannes Berg4efc76b2010-06-10 10:56:20 +0200789 TP_ARGS(local, sdata, action, sta, tid, ssn),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200790
791 TP_STRUCT__entry(
792 LOCAL_ENTRY
793 STA_ENTRY
794 __field(u32, action)
795 __field(u16, tid)
796 __field(u16, ssn)
Johannes Bergc951ad32009-11-16 12:00:38 +0100797 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200798 ),
799
800 TP_fast_assign(
801 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100802 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200803 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200804 __entry->action = action;
805 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800806 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200807 ),
808
809 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200810 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d",
811 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action, __entry->tid
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200812 )
813);
Johannes Berga80f7c02009-12-23 13:15:32 +0100814
John W. Linvillec466d4e2010-06-29 14:51:23 -0400815TRACE_EVENT(drv_get_survey,
816 TP_PROTO(struct ieee80211_local *local, int idx,
817 struct survey_info *survey),
818
819 TP_ARGS(local, idx, survey),
820
821 TP_STRUCT__entry(
822 LOCAL_ENTRY
823 __field(int, idx)
824 ),
825
826 TP_fast_assign(
827 LOCAL_ASSIGN;
828 __entry->idx = idx;
829 ),
830
831 TP_printk(
832 LOCAL_PR_FMT " idx:%d",
833 LOCAL_PR_ARG, __entry->idx
834 )
835);
836
Johannes Berga80f7c02009-12-23 13:15:32 +0100837TRACE_EVENT(drv_flush,
838 TP_PROTO(struct ieee80211_local *local, bool drop),
839
840 TP_ARGS(local, drop),
841
842 TP_STRUCT__entry(
843 LOCAL_ENTRY
844 __field(bool, drop)
845 ),
846
847 TP_fast_assign(
848 LOCAL_ASSIGN;
849 __entry->drop = drop;
850 ),
851
852 TP_printk(
853 LOCAL_PR_FMT " drop:%d",
854 LOCAL_PR_ARG, __entry->drop
855 )
856);
Johannes Bergb5878a22010-04-07 16:48:40 +0200857
Johannes Berg5ce6e432010-05-11 16:20:57 +0200858TRACE_EVENT(drv_channel_switch,
859 TP_PROTO(struct ieee80211_local *local,
860 struct ieee80211_channel_switch *ch_switch),
861
862 TP_ARGS(local, ch_switch),
863
864 TP_STRUCT__entry(
865 LOCAL_ENTRY
866 __field(u64, timestamp)
867 __field(bool, block_tx)
868 __field(u16, freq)
869 __field(u8, count)
870 ),
871
872 TP_fast_assign(
873 LOCAL_ASSIGN;
874 __entry->timestamp = ch_switch->timestamp;
875 __entry->block_tx = ch_switch->block_tx;
876 __entry->freq = ch_switch->channel->center_freq;
877 __entry->count = ch_switch->count;
878 ),
879
880 TP_printk(
881 LOCAL_PR_FMT " new freq:%u count:%d",
882 LOCAL_PR_ARG, __entry->freq, __entry->count
883 )
884);
885
Bruno Randolf15d96752010-11-10 12:50:56 +0900886TRACE_EVENT(drv_set_antenna,
887 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
888
889 TP_ARGS(local, tx_ant, rx_ant, ret),
890
891 TP_STRUCT__entry(
892 LOCAL_ENTRY
893 __field(u32, tx_ant)
894 __field(u32, rx_ant)
895 __field(int, ret)
896 ),
897
898 TP_fast_assign(
899 LOCAL_ASSIGN;
900 __entry->tx_ant = tx_ant;
901 __entry->rx_ant = rx_ant;
902 __entry->ret = ret;
903 ),
904
905 TP_printk(
906 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
907 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
908 )
909);
910
911TRACE_EVENT(drv_get_antenna,
912 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
913
914 TP_ARGS(local, tx_ant, rx_ant, ret),
915
916 TP_STRUCT__entry(
917 LOCAL_ENTRY
918 __field(u32, tx_ant)
919 __field(u32, rx_ant)
920 __field(int, ret)
921 ),
922
923 TP_fast_assign(
924 LOCAL_ASSIGN;
925 __entry->tx_ant = tx_ant;
926 __entry->rx_ant = rx_ant;
927 __entry->ret = ret;
928 ),
929
930 TP_printk(
931 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
932 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
933 )
934);
935
Johannes Bergb5878a22010-04-07 16:48:40 +0200936/*
937 * Tracing for API calls that drivers call.
938 */
939
940TRACE_EVENT(api_start_tx_ba_session,
941 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
942
943 TP_ARGS(sta, tid),
944
945 TP_STRUCT__entry(
946 STA_ENTRY
947 __field(u16, tid)
948 ),
949
950 TP_fast_assign(
951 STA_ASSIGN;
952 __entry->tid = tid;
953 ),
954
955 TP_printk(
956 STA_PR_FMT " tid:%d",
957 STA_PR_ARG, __entry->tid
958 )
959);
960
961TRACE_EVENT(api_start_tx_ba_cb,
962 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
963
964 TP_ARGS(sdata, ra, tid),
965
966 TP_STRUCT__entry(
967 VIF_ENTRY
968 __array(u8, ra, ETH_ALEN)
969 __field(u16, tid)
970 ),
971
972 TP_fast_assign(
973 VIF_ASSIGN;
974 memcpy(__entry->ra, ra, ETH_ALEN);
975 __entry->tid = tid;
976 ),
977
978 TP_printk(
979 VIF_PR_FMT " ra:%pM tid:%d",
980 VIF_PR_ARG, __entry->ra, __entry->tid
981 )
982);
983
984TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +0200985 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +0200986
Johannes Berg6a8579d2010-05-27 14:41:07 +0200987 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +0200988
989 TP_STRUCT__entry(
990 STA_ENTRY
991 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +0200992 ),
993
994 TP_fast_assign(
995 STA_ASSIGN;
996 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +0200997 ),
998
999 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001000 STA_PR_FMT " tid:%d",
1001 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001002 )
1003);
1004
1005TRACE_EVENT(api_stop_tx_ba_cb,
1006 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1007
1008 TP_ARGS(sdata, ra, tid),
1009
1010 TP_STRUCT__entry(
1011 VIF_ENTRY
1012 __array(u8, ra, ETH_ALEN)
1013 __field(u16, tid)
1014 ),
1015
1016 TP_fast_assign(
1017 VIF_ASSIGN;
1018 memcpy(__entry->ra, ra, ETH_ALEN);
1019 __entry->tid = tid;
1020 ),
1021
1022 TP_printk(
1023 VIF_PR_FMT " ra:%pM tid:%d",
1024 VIF_PR_ARG, __entry->ra, __entry->tid
1025 )
1026);
1027
1028TRACE_EVENT(api_restart_hw,
1029 TP_PROTO(struct ieee80211_local *local),
1030
1031 TP_ARGS(local),
1032
1033 TP_STRUCT__entry(
1034 LOCAL_ENTRY
1035 ),
1036
1037 TP_fast_assign(
1038 LOCAL_ASSIGN;
1039 ),
1040
1041 TP_printk(
1042 LOCAL_PR_FMT,
1043 LOCAL_PR_ARG
1044 )
1045);
1046
1047TRACE_EVENT(api_beacon_loss,
1048 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1049
1050 TP_ARGS(sdata),
1051
1052 TP_STRUCT__entry(
1053 VIF_ENTRY
1054 ),
1055
1056 TP_fast_assign(
1057 VIF_ASSIGN;
1058 ),
1059
1060 TP_printk(
1061 VIF_PR_FMT,
1062 VIF_PR_ARG
1063 )
1064);
1065
1066TRACE_EVENT(api_connection_loss,
1067 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1068
1069 TP_ARGS(sdata),
1070
1071 TP_STRUCT__entry(
1072 VIF_ENTRY
1073 ),
1074
1075 TP_fast_assign(
1076 VIF_ASSIGN;
1077 ),
1078
1079 TP_printk(
1080 VIF_PR_FMT,
1081 VIF_PR_ARG
1082 )
1083);
1084
1085TRACE_EVENT(api_cqm_rssi_notify,
1086 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1087 enum nl80211_cqm_rssi_threshold_event rssi_event),
1088
1089 TP_ARGS(sdata, rssi_event),
1090
1091 TP_STRUCT__entry(
1092 VIF_ENTRY
1093 __field(u32, rssi_event)
1094 ),
1095
1096 TP_fast_assign(
1097 VIF_ASSIGN;
1098 __entry->rssi_event = rssi_event;
1099 ),
1100
1101 TP_printk(
1102 VIF_PR_FMT " event:%d",
1103 VIF_PR_ARG, __entry->rssi_event
1104 )
1105);
1106
1107TRACE_EVENT(api_scan_completed,
1108 TP_PROTO(struct ieee80211_local *local, bool aborted),
1109
1110 TP_ARGS(local, aborted),
1111
1112 TP_STRUCT__entry(
1113 LOCAL_ENTRY
1114 __field(bool, aborted)
1115 ),
1116
1117 TP_fast_assign(
1118 LOCAL_ASSIGN;
1119 __entry->aborted = aborted;
1120 ),
1121
1122 TP_printk(
1123 LOCAL_PR_FMT " aborted:%d",
1124 LOCAL_PR_ARG, __entry->aborted
1125 )
1126);
1127
1128TRACE_EVENT(api_sta_block_awake,
1129 TP_PROTO(struct ieee80211_local *local,
1130 struct ieee80211_sta *sta, bool block),
1131
1132 TP_ARGS(local, sta, block),
1133
1134 TP_STRUCT__entry(
1135 LOCAL_ENTRY
1136 STA_ENTRY
1137 __field(bool, block)
1138 ),
1139
1140 TP_fast_assign(
1141 LOCAL_ASSIGN;
1142 STA_ASSIGN;
1143 __entry->block = block;
1144 ),
1145
1146 TP_printk(
1147 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1148 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
1149 )
1150);
1151
Johannes Berg5ce6e432010-05-11 16:20:57 +02001152TRACE_EVENT(api_chswitch_done,
1153 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1154
1155 TP_ARGS(sdata, success),
1156
1157 TP_STRUCT__entry(
1158 VIF_ENTRY
1159 __field(bool, success)
1160 ),
1161
1162 TP_fast_assign(
1163 VIF_ASSIGN;
1164 __entry->success = success;
1165 ),
1166
1167 TP_printk(
1168 VIF_PR_FMT " success=%d",
1169 VIF_PR_ARG, __entry->success
1170 )
1171);
1172
Johannes Bergb5878a22010-04-07 16:48:40 +02001173/*
1174 * Tracing for internal functions
1175 * (which may also be called in response to driver calls)
1176 */
1177
1178TRACE_EVENT(wake_queue,
1179 TP_PROTO(struct ieee80211_local *local, u16 queue,
1180 enum queue_stop_reason reason),
1181
1182 TP_ARGS(local, queue, reason),
1183
1184 TP_STRUCT__entry(
1185 LOCAL_ENTRY
1186 __field(u16, queue)
1187 __field(u32, reason)
1188 ),
1189
1190 TP_fast_assign(
1191 LOCAL_ASSIGN;
1192 __entry->queue = queue;
1193 __entry->reason = reason;
1194 ),
1195
1196 TP_printk(
1197 LOCAL_PR_FMT " queue:%d, reason:%d",
1198 LOCAL_PR_ARG, __entry->queue, __entry->reason
1199 )
1200);
1201
1202TRACE_EVENT(stop_queue,
1203 TP_PROTO(struct ieee80211_local *local, u16 queue,
1204 enum queue_stop_reason reason),
1205
1206 TP_ARGS(local, queue, reason),
1207
1208 TP_STRUCT__entry(
1209 LOCAL_ENTRY
1210 __field(u16, queue)
1211 __field(u32, reason)
1212 ),
1213
1214 TP_fast_assign(
1215 LOCAL_ASSIGN;
1216 __entry->queue = queue;
1217 __entry->reason = reason;
1218 ),
1219
1220 TP_printk(
1221 LOCAL_PR_FMT " queue:%d, reason:%d",
1222 LOCAL_PR_ARG, __entry->queue, __entry->reason
1223 )
1224);
Christian Lamparterf7428802009-07-19 23:21:07 +02001225#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001226
1227#undef TRACE_INCLUDE_PATH
1228#define TRACE_INCLUDE_PATH .
1229#undef TRACE_INCLUDE_FILE
1230#define TRACE_INCLUDE_FILE driver-trace
1231#include <trace/define_trace.h>