diff options
Diffstat (limited to 'net/mac80211/trace.h')
-rw-r--r-- | net/mac80211/trace.h | 1641 |
1 files changed, 1641 insertions, 0 deletions
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h new file mode 100644 index 000000000000..392bcc9f6a12 --- /dev/null +++ b/net/mac80211/trace.h | |||
@@ -0,0 +1,1641 @@ | |||
1 | #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 | |||
8 | #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 | |||
22 | #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \ | ||
23 | __field(bool, p2p) \ | ||
24 | __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>") | ||
25 | #define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \ | ||
26 | __entry->p2p = sdata->vif.p2p; \ | ||
27 | __assign_str(vif_name, sdata->dev ? sdata->dev->name : "<nodev>") | ||
28 | #define VIF_PR_FMT " vif:%s(%d%s)" | ||
29 | #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : "" | ||
30 | |||
31 | /* | ||
32 | * Tracing for driver callbacks. | ||
33 | */ | ||
34 | |||
35 | DECLARE_EVENT_CLASS(local_only_evt, | ||
36 | 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 | |||
47 | DECLARE_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 | |||
70 | DECLARE_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 | |||
90 | DECLARE_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 | |||
111 | DEFINE_EVENT(local_only_evt, drv_return_void, | ||
112 | TP_PROTO(struct ieee80211_local *local), | ||
113 | TP_ARGS(local) | ||
114 | ); | ||
115 | |||
116 | TRACE_EVENT(drv_return_int, | ||
117 | TP_PROTO(struct ieee80211_local *local, int ret), | ||
118 | TP_ARGS(local, ret), | ||
119 | TP_STRUCT__entry( | ||
120 | LOCAL_ENTRY | ||
121 | __field(int, ret) | ||
122 | ), | ||
123 | TP_fast_assign( | ||
124 | LOCAL_ASSIGN; | ||
125 | __entry->ret = ret; | ||
126 | ), | ||
127 | TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret) | ||
128 | ); | ||
129 | |||
130 | TRACE_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 | |||
145 | TRACE_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 | |||
159 | DEFINE_EVENT(local_only_evt, drv_start, | ||
160 | TP_PROTO(struct ieee80211_local *local), | ||
161 | TP_ARGS(local) | ||
162 | ); | ||
163 | |||
164 | DEFINE_EVENT(local_u32_evt, drv_get_et_strings, | ||
165 | TP_PROTO(struct ieee80211_local *local, u32 sset), | ||
166 | TP_ARGS(local, sset) | ||
167 | ); | ||
168 | |||
169 | DEFINE_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 | |||
174 | DEFINE_EVENT(local_only_evt, drv_get_et_stats, | ||
175 | TP_PROTO(struct ieee80211_local *local), | ||
176 | TP_ARGS(local) | ||
177 | ); | ||
178 | |||
179 | DEFINE_EVENT(local_only_evt, drv_suspend, | ||
180 | TP_PROTO(struct ieee80211_local *local), | ||
181 | TP_ARGS(local) | ||
182 | ); | ||
183 | |||
184 | DEFINE_EVENT(local_only_evt, drv_resume, | ||
185 | TP_PROTO(struct ieee80211_local *local), | ||
186 | TP_ARGS(local) | ||
187 | ); | ||
188 | |||
189 | TRACE_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 | |||
203 | DEFINE_EVENT(local_only_evt, drv_stop, | ||
204 | TP_PROTO(struct ieee80211_local *local), | ||
205 | TP_ARGS(local) | ||
206 | ); | ||
207 | |||
208 | DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface, | ||
209 | TP_PROTO(struct ieee80211_local *local, | ||
210 | struct ieee80211_sub_if_data *sdata), | ||
211 | TP_ARGS(local, sdata) | ||
212 | ); | ||
213 | |||
214 | TRACE_EVENT(drv_change_interface, | ||
215 | TP_PROTO(struct ieee80211_local *local, | ||
216 | struct ieee80211_sub_if_data *sdata, | ||
217 | enum nl80211_iftype type, bool p2p), | ||
218 | |||
219 | TP_ARGS(local, sdata, type, p2p), | ||
220 | |||
221 | TP_STRUCT__entry( | ||
222 | LOCAL_ENTRY | ||
223 | VIF_ENTRY | ||
224 | __field(u32, new_type) | ||
225 | __field(bool, new_p2p) | ||
226 | ), | ||
227 | |||
228 | TP_fast_assign( | ||
229 | LOCAL_ASSIGN; | ||
230 | VIF_ASSIGN; | ||
231 | __entry->new_type = type; | ||
232 | __entry->new_p2p = p2p; | ||
233 | ), | ||
234 | |||
235 | TP_printk( | ||
236 | 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" : "" | ||
239 | ) | ||
240 | ); | ||
241 | |||
242 | DEFINE_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) | ||
246 | ); | ||
247 | |||
248 | TRACE_EVENT(drv_config, | ||
249 | TP_PROTO(struct ieee80211_local *local, | ||
250 | u32 changed), | ||
251 | |||
252 | TP_ARGS(local, changed), | ||
253 | |||
254 | TP_STRUCT__entry( | ||
255 | LOCAL_ENTRY | ||
256 | __field(u32, changed) | ||
257 | __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) | ||
266 | __field(int, smps) | ||
267 | ), | ||
268 | |||
269 | TP_fast_assign( | ||
270 | LOCAL_ASSIGN; | ||
271 | __entry->changed = changed; | ||
272 | __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; | ||
281 | __entry->smps = local->hw.conf.smps_mode; | ||
282 | ), | ||
283 | |||
284 | TP_printk( | ||
285 | LOCAL_PR_FMT " ch:%#x freq:%d", | ||
286 | LOCAL_PR_ARG, __entry->changed, __entry->center_freq | ||
287 | ) | ||
288 | ); | ||
289 | |||
290 | TRACE_EVENT(drv_bss_info_changed, | ||
291 | TP_PROTO(struct ieee80211_local *local, | ||
292 | struct ieee80211_sub_if_data *sdata, | ||
293 | struct ieee80211_bss_conf *info, | ||
294 | u32 changed), | ||
295 | |||
296 | TP_ARGS(local, sdata, info, changed), | ||
297 | |||
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) | ||
312 | __field(bool, enable_beacon) | ||
313 | __field(u16, ht_operation_mode) | ||
314 | ), | ||
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; | ||
328 | __entry->timestamp = info->last_tsf; | ||
329 | __entry->basic_rates = info->basic_rates; | ||
330 | __entry->enable_beacon = info->enable_beacon; | ||
331 | __entry->ht_operation_mode = info->ht_operation_mode; | ||
332 | ), | ||
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 | |||
340 | TRACE_EVENT(drv_prepare_multicast, | ||
341 | TP_PROTO(struct ieee80211_local *local, int mc_count), | ||
342 | |||
343 | TP_ARGS(local, mc_count), | ||
344 | |||
345 | TP_STRUCT__entry( | ||
346 | LOCAL_ENTRY | ||
347 | __field(int, mc_count) | ||
348 | ), | ||
349 | |||
350 | TP_fast_assign( | ||
351 | LOCAL_ASSIGN; | ||
352 | __entry->mc_count = mc_count; | ||
353 | ), | ||
354 | |||
355 | TP_printk( | ||
356 | LOCAL_PR_FMT " prepare mc (%d)", | ||
357 | LOCAL_PR_ARG, __entry->mc_count | ||
358 | ) | ||
359 | ); | ||
360 | |||
361 | TRACE_EVENT(drv_configure_filter, | ||
362 | TP_PROTO(struct ieee80211_local *local, | ||
363 | unsigned int changed_flags, | ||
364 | unsigned int *total_flags, | ||
365 | u64 multicast), | ||
366 | |||
367 | TP_ARGS(local, changed_flags, total_flags, multicast), | ||
368 | |||
369 | TP_STRUCT__entry( | ||
370 | LOCAL_ENTRY | ||
371 | __field(unsigned int, changed) | ||
372 | __field(unsigned int, total) | ||
373 | __field(u64, multicast) | ||
374 | ), | ||
375 | |||
376 | TP_fast_assign( | ||
377 | LOCAL_ASSIGN; | ||
378 | __entry->changed = changed_flags; | ||
379 | __entry->total = *total_flags; | ||
380 | __entry->multicast = multicast; | ||
381 | ), | ||
382 | |||
383 | TP_printk( | ||
384 | LOCAL_PR_FMT " changed:%#x total:%#x", | ||
385 | LOCAL_PR_ARG, __entry->changed, __entry->total | ||
386 | ) | ||
387 | ); | ||
388 | |||
389 | TRACE_EVENT(drv_set_tim, | ||
390 | TP_PROTO(struct ieee80211_local *local, | ||
391 | struct ieee80211_sta *sta, bool set), | ||
392 | |||
393 | TP_ARGS(local, sta, set), | ||
394 | |||
395 | TP_STRUCT__entry( | ||
396 | LOCAL_ENTRY | ||
397 | STA_ENTRY | ||
398 | __field(bool, set) | ||
399 | ), | ||
400 | |||
401 | TP_fast_assign( | ||
402 | LOCAL_ASSIGN; | ||
403 | STA_ASSIGN; | ||
404 | __entry->set = set; | ||
405 | ), | ||
406 | |||
407 | TP_printk( | ||
408 | LOCAL_PR_FMT STA_PR_FMT " set:%d", | ||
409 | LOCAL_PR_ARG, STA_PR_FMT, __entry->set | ||
410 | ) | ||
411 | ); | ||
412 | |||
413 | TRACE_EVENT(drv_set_key, | ||
414 | TP_PROTO(struct ieee80211_local *local, | ||
415 | enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata, | ||
416 | struct ieee80211_sta *sta, | ||
417 | struct ieee80211_key_conf *key), | ||
418 | |||
419 | TP_ARGS(local, cmd, sdata, sta, key), | ||
420 | |||
421 | TP_STRUCT__entry( | ||
422 | LOCAL_ENTRY | ||
423 | VIF_ENTRY | ||
424 | STA_ENTRY | ||
425 | __field(u32, cipher) | ||
426 | __field(u8, hw_key_idx) | ||
427 | __field(u8, flags) | ||
428 | __field(s8, keyidx) | ||
429 | ), | ||
430 | |||
431 | TP_fast_assign( | ||
432 | LOCAL_ASSIGN; | ||
433 | VIF_ASSIGN; | ||
434 | STA_ASSIGN; | ||
435 | __entry->cipher = key->cipher; | ||
436 | __entry->flags = key->flags; | ||
437 | __entry->keyidx = key->keyidx; | ||
438 | __entry->hw_key_idx = key->hw_key_idx; | ||
439 | ), | ||
440 | |||
441 | TP_printk( | ||
442 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT, | ||
443 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG | ||
444 | ) | ||
445 | ); | ||
446 | |||
447 | TRACE_EVENT(drv_update_tkip_key, | ||
448 | TP_PROTO(struct ieee80211_local *local, | ||
449 | struct ieee80211_sub_if_data *sdata, | ||
450 | struct ieee80211_key_conf *conf, | ||
451 | struct ieee80211_sta *sta, u32 iv32), | ||
452 | |||
453 | TP_ARGS(local, sdata, conf, sta, iv32), | ||
454 | |||
455 | TP_STRUCT__entry( | ||
456 | LOCAL_ENTRY | ||
457 | VIF_ENTRY | ||
458 | STA_ENTRY | ||
459 | __field(u32, iv32) | ||
460 | ), | ||
461 | |||
462 | TP_fast_assign( | ||
463 | LOCAL_ASSIGN; | ||
464 | VIF_ASSIGN; | ||
465 | STA_ASSIGN; | ||
466 | __entry->iv32 = iv32; | ||
467 | ), | ||
468 | |||
469 | TP_printk( | ||
470 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x", | ||
471 | LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32 | ||
472 | ) | ||
473 | ); | ||
474 | |||
475 | DEFINE_EVENT(local_sdata_evt, drv_hw_scan, | ||
476 | TP_PROTO(struct ieee80211_local *local, | ||
477 | struct ieee80211_sub_if_data *sdata), | ||
478 | TP_ARGS(local, sdata) | ||
479 | ); | ||
480 | |||
481 | DEFINE_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 | |||
487 | DEFINE_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 | ); | ||
492 | |||
493 | DEFINE_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) | ||
497 | ); | ||
498 | |||
499 | DEFINE_EVENT(local_only_evt, drv_sw_scan_start, | ||
500 | TP_PROTO(struct ieee80211_local *local), | ||
501 | TP_ARGS(local) | ||
502 | ); | ||
503 | |||
504 | DEFINE_EVENT(local_only_evt, drv_sw_scan_complete, | ||
505 | TP_PROTO(struct ieee80211_local *local), | ||
506 | TP_ARGS(local) | ||
507 | ); | ||
508 | |||
509 | TRACE_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 | |||
540 | TRACE_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 | |||
565 | DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold, | ||
566 | TP_PROTO(struct ieee80211_local *local, u32 value), | ||
567 | TP_ARGS(local, value) | ||
568 | ); | ||
569 | |||
570 | DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold, | ||
571 | TP_PROTO(struct ieee80211_local *local, u32 value), | ||
572 | TP_ARGS(local, value) | ||
573 | ); | ||
574 | |||
575 | TRACE_EVENT(drv_set_coverage_class, | ||
576 | TP_PROTO(struct ieee80211_local *local, u8 value), | ||
577 | |||
578 | TP_ARGS(local, value), | ||
579 | |||
580 | TP_STRUCT__entry( | ||
581 | LOCAL_ENTRY | ||
582 | __field(u8, value) | ||
583 | ), | ||
584 | |||
585 | TP_fast_assign( | ||
586 | LOCAL_ASSIGN; | ||
587 | __entry->value = value; | ||
588 | ), | ||
589 | |||
590 | TP_printk( | ||
591 | LOCAL_PR_FMT " value:%d", | ||
592 | LOCAL_PR_ARG, __entry->value | ||
593 | ) | ||
594 | ); | ||
595 | |||
596 | TRACE_EVENT(drv_sta_notify, | ||
597 | TP_PROTO(struct ieee80211_local *local, | ||
598 | struct ieee80211_sub_if_data *sdata, | ||
599 | enum sta_notify_cmd cmd, | ||
600 | struct ieee80211_sta *sta), | ||
601 | |||
602 | TP_ARGS(local, sdata, cmd, sta), | ||
603 | |||
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 | |||
624 | TRACE_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 | |||
656 | TRACE_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 | |||
684 | TRACE_EVENT(drv_sta_add, | ||
685 | TP_PROTO(struct ieee80211_local *local, | ||
686 | struct ieee80211_sub_if_data *sdata, | ||
687 | struct ieee80211_sta *sta), | ||
688 | |||
689 | TP_ARGS(local, sdata, sta), | ||
690 | |||
691 | TP_STRUCT__entry( | ||
692 | LOCAL_ENTRY | ||
693 | VIF_ENTRY | ||
694 | STA_ENTRY | ||
695 | ), | ||
696 | |||
697 | TP_fast_assign( | ||
698 | LOCAL_ASSIGN; | ||
699 | VIF_ASSIGN; | ||
700 | STA_ASSIGN; | ||
701 | ), | ||
702 | |||
703 | TP_printk( | ||
704 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT, | ||
705 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG | ||
706 | ) | ||
707 | ); | ||
708 | |||
709 | TRACE_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 | |||
734 | TRACE_EVENT(drv_conf_tx, | ||
735 | TP_PROTO(struct ieee80211_local *local, | ||
736 | struct ieee80211_sub_if_data *sdata, | ||
737 | u16 ac, const struct ieee80211_tx_queue_params *params), | ||
738 | |||
739 | TP_ARGS(local, sdata, ac, params), | ||
740 | |||
741 | TP_STRUCT__entry( | ||
742 | LOCAL_ENTRY | ||
743 | VIF_ENTRY | ||
744 | __field(u16, ac) | ||
745 | __field(u16, txop) | ||
746 | __field(u16, cw_min) | ||
747 | __field(u16, cw_max) | ||
748 | __field(u8, aifs) | ||
749 | __field(bool, uapsd) | ||
750 | ), | ||
751 | |||
752 | TP_fast_assign( | ||
753 | LOCAL_ASSIGN; | ||
754 | VIF_ASSIGN; | ||
755 | __entry->ac = ac; | ||
756 | __entry->txop = params->txop; | ||
757 | __entry->cw_max = params->cw_max; | ||
758 | __entry->cw_min = params->cw_min; | ||
759 | __entry->aifs = params->aifs; | ||
760 | __entry->uapsd = params->uapsd; | ||
761 | ), | ||
762 | |||
763 | TP_printk( | ||
764 | LOCAL_PR_FMT VIF_PR_FMT " AC:%d", | ||
765 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac | ||
766 | ) | ||
767 | ); | ||
768 | |||
769 | DEFINE_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) | ||
773 | ); | ||
774 | |||
775 | TRACE_EVENT(drv_set_tsf, | ||
776 | TP_PROTO(struct ieee80211_local *local, | ||
777 | struct ieee80211_sub_if_data *sdata, | ||
778 | u64 tsf), | ||
779 | |||
780 | TP_ARGS(local, sdata, tsf), | ||
781 | |||
782 | TP_STRUCT__entry( | ||
783 | LOCAL_ENTRY | ||
784 | VIF_ENTRY | ||
785 | __field(u64, tsf) | ||
786 | ), | ||
787 | |||
788 | TP_fast_assign( | ||
789 | LOCAL_ASSIGN; | ||
790 | VIF_ASSIGN; | ||
791 | __entry->tsf = tsf; | ||
792 | ), | ||
793 | |||
794 | TP_printk( | ||
795 | LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu", | ||
796 | LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf | ||
797 | ) | ||
798 | ); | ||
799 | |||
800 | DEFINE_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) | ||
804 | ); | ||
805 | |||
806 | DEFINE_EVENT(local_only_evt, drv_tx_last_beacon, | ||
807 | TP_PROTO(struct ieee80211_local *local), | ||
808 | TP_ARGS(local) | ||
809 | ); | ||
810 | |||
811 | TRACE_EVENT(drv_ampdu_action, | ||
812 | TP_PROTO(struct ieee80211_local *local, | ||
813 | struct ieee80211_sub_if_data *sdata, | ||
814 | enum ieee80211_ampdu_mlme_action action, | ||
815 | struct ieee80211_sta *sta, u16 tid, | ||
816 | u16 *ssn, u8 buf_size), | ||
817 | |||
818 | TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size), | ||
819 | |||
820 | TP_STRUCT__entry( | ||
821 | LOCAL_ENTRY | ||
822 | STA_ENTRY | ||
823 | __field(u32, action) | ||
824 | __field(u16, tid) | ||
825 | __field(u16, ssn) | ||
826 | __field(u8, buf_size) | ||
827 | VIF_ENTRY | ||
828 | ), | ||
829 | |||
830 | TP_fast_assign( | ||
831 | LOCAL_ASSIGN; | ||
832 | VIF_ASSIGN; | ||
833 | STA_ASSIGN; | ||
834 | __entry->action = action; | ||
835 | __entry->tid = tid; | ||
836 | __entry->ssn = ssn ? *ssn : 0; | ||
837 | __entry->buf_size = buf_size; | ||
838 | ), | ||
839 | |||
840 | TP_printk( | ||
841 | 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 | ||
844 | ) | ||
845 | ); | ||
846 | |||
847 | TRACE_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 | |||
869 | TRACE_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 | ); | ||
889 | |||
890 | TRACE_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 | |||
918 | TRACE_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 | |||
943 | TRACE_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 | |||
968 | TRACE_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 | |||
994 | DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel, | ||
995 | TP_PROTO(struct ieee80211_local *local), | ||
996 | TP_ARGS(local) | ||
997 | ); | ||
998 | |||
999 | TRACE_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 | |||
1027 | TRACE_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 | |||
1050 | TRACE_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 | |||
1079 | DEFINE_EVENT(local_only_evt, drv_tx_frames_pending, | ||
1080 | TP_PROTO(struct ieee80211_local *local), | ||
1081 | TP_ARGS(local) | ||
1082 | ); | ||
1083 | |||
1084 | DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait, | ||
1085 | TP_PROTO(struct ieee80211_local *local), | ||
1086 | TP_ARGS(local) | ||
1087 | ); | ||
1088 | |||
1089 | TRACE_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 | |||
1116 | TRACE_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 | |||
1144 | TRACE_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 | |||
1166 | DECLARE_EVENT_CLASS(release_evt, | ||
1167 | 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 | |||
1201 | DEFINE_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 | |||
1211 | DEFINE_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 | |||
1221 | TRACE_EVENT(drv_get_rssi, | ||
1222 | TP_PROTO(struct ieee80211_local *local, struct ieee80211_sta *sta, | ||
1223 | s8 rssi, int ret), | ||
1224 | |||
1225 | TP_ARGS(local, sta, rssi, ret), | ||
1226 | |||
1227 | TP_STRUCT__entry( | ||
1228 | LOCAL_ENTRY | ||
1229 | STA_ENTRY | ||
1230 | __field(s8, rssi) | ||
1231 | __field(int, ret) | ||
1232 | ), | ||
1233 | |||
1234 | TP_fast_assign( | ||
1235 | LOCAL_ASSIGN; | ||
1236 | STA_ASSIGN; | ||
1237 | __entry->rssi = rssi; | ||
1238 | __entry->ret = ret; | ||
1239 | ), | ||
1240 | |||
1241 | TP_printk( | ||
1242 | LOCAL_PR_FMT STA_PR_FMT " rssi:%d ret:%d", | ||
1243 | LOCAL_PR_ARG, STA_PR_ARG, __entry->rssi, __entry->ret | ||
1244 | ) | ||
1245 | ); | ||
1246 | |||
1247 | /* | ||
1248 | * Tracing for API calls that drivers call. | ||
1249 | */ | ||
1250 | |||
1251 | TRACE_EVENT(api_start_tx_ba_session, | ||
1252 | TP_PROTO(struct ieee80211_sta *sta, u16 tid), | ||
1253 | |||
1254 | TP_ARGS(sta, tid), | ||
1255 | |||
1256 | TP_STRUCT__entry( | ||
1257 | STA_ENTRY | ||
1258 | __field(u16, tid) | ||
1259 | ), | ||
1260 | |||
1261 | TP_fast_assign( | ||
1262 | STA_ASSIGN; | ||
1263 | __entry->tid = tid; | ||
1264 | ), | ||
1265 | |||
1266 | TP_printk( | ||
1267 | STA_PR_FMT " tid:%d", | ||
1268 | STA_PR_ARG, __entry->tid | ||
1269 | ) | ||
1270 | ); | ||
1271 | |||
1272 | TRACE_EVENT(api_start_tx_ba_cb, | ||
1273 | TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid), | ||
1274 | |||
1275 | TP_ARGS(sdata, ra, tid), | ||
1276 | |||
1277 | TP_STRUCT__entry( | ||
1278 | VIF_ENTRY | ||
1279 | __array(u8, ra, ETH_ALEN) | ||
1280 | __field(u16, tid) | ||
1281 | ), | ||
1282 | |||
1283 | TP_fast_assign( | ||
1284 | VIF_ASSIGN; | ||
1285 | memcpy(__entry->ra, ra, ETH_ALEN); | ||
1286 | __entry->tid = tid; | ||
1287 | ), | ||
1288 | |||
1289 | TP_printk( | ||
1290 | VIF_PR_FMT " ra:%pM tid:%d", | ||
1291 | VIF_PR_ARG, __entry->ra, __entry->tid | ||
1292 | ) | ||
1293 | ); | ||
1294 | |||
1295 | TRACE_EVENT(api_stop_tx_ba_session, | ||
1296 | TP_PROTO(struct ieee80211_sta *sta, u16 tid), | ||
1297 | |||
1298 | TP_ARGS(sta, tid), | ||
1299 | |||
1300 | TP_STRUCT__entry( | ||
1301 | STA_ENTRY | ||
1302 | __field(u16, tid) | ||
1303 | ), | ||
1304 | |||
1305 | TP_fast_assign( | ||
1306 | STA_ASSIGN; | ||
1307 | __entry->tid = tid; | ||
1308 | ), | ||
1309 | |||
1310 | TP_printk( | ||
1311 | STA_PR_FMT " tid:%d", | ||
1312 | STA_PR_ARG, __entry->tid | ||
1313 | ) | ||
1314 | ); | ||
1315 | |||
1316 | TRACE_EVENT(api_stop_tx_ba_cb, | ||
1317 | TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid), | ||
1318 | |||
1319 | TP_ARGS(sdata, ra, tid), | ||
1320 | |||
1321 | TP_STRUCT__entry( | ||
1322 | VIF_ENTRY | ||
1323 | __array(u8, ra, ETH_ALEN) | ||
1324 | __field(u16, tid) | ||
1325 | ), | ||
1326 | |||
1327 | TP_fast_assign( | ||
1328 | VIF_ASSIGN; | ||
1329 | memcpy(__entry->ra, ra, ETH_ALEN); | ||
1330 | __entry->tid = tid; | ||
1331 | ), | ||
1332 | |||
1333 | TP_printk( | ||
1334 | VIF_PR_FMT " ra:%pM tid:%d", | ||
1335 | VIF_PR_ARG, __entry->ra, __entry->tid | ||
1336 | ) | ||
1337 | ); | ||
1338 | |||
1339 | DEFINE_EVENT(local_only_evt, api_restart_hw, | ||
1340 | TP_PROTO(struct ieee80211_local *local), | ||
1341 | TP_ARGS(local) | ||
1342 | ); | ||
1343 | |||
1344 | TRACE_EVENT(api_beacon_loss, | ||
1345 | TP_PROTO(struct ieee80211_sub_if_data *sdata), | ||
1346 | |||
1347 | TP_ARGS(sdata), | ||
1348 | |||
1349 | TP_STRUCT__entry( | ||
1350 | VIF_ENTRY | ||
1351 | ), | ||
1352 | |||
1353 | TP_fast_assign( | ||
1354 | VIF_ASSIGN; | ||
1355 | ), | ||
1356 | |||
1357 | TP_printk( | ||
1358 | VIF_PR_FMT, | ||
1359 | VIF_PR_ARG | ||
1360 | ) | ||
1361 | ); | ||
1362 | |||
1363 | TRACE_EVENT(api_connection_loss, | ||
1364 | TP_PROTO(struct ieee80211_sub_if_data *sdata), | ||
1365 | |||
1366 | TP_ARGS(sdata), | ||
1367 | |||
1368 | TP_STRUCT__entry( | ||
1369 | VIF_ENTRY | ||
1370 | ), | ||
1371 | |||
1372 | TP_fast_assign( | ||
1373 | VIF_ASSIGN; | ||
1374 | ), | ||
1375 | |||
1376 | TP_printk( | ||
1377 | VIF_PR_FMT, | ||
1378 | VIF_PR_ARG | ||
1379 | ) | ||
1380 | ); | ||
1381 | |||
1382 | TRACE_EVENT(api_cqm_rssi_notify, | ||
1383 | TP_PROTO(struct ieee80211_sub_if_data *sdata, | ||
1384 | enum nl80211_cqm_rssi_threshold_event rssi_event), | ||
1385 | |||
1386 | TP_ARGS(sdata, rssi_event), | ||
1387 | |||
1388 | TP_STRUCT__entry( | ||
1389 | VIF_ENTRY | ||
1390 | __field(u32, rssi_event) | ||
1391 | ), | ||
1392 | |||
1393 | TP_fast_assign( | ||
1394 | VIF_ASSIGN; | ||
1395 | __entry->rssi_event = rssi_event; | ||
1396 | ), | ||
1397 | |||
1398 | TP_printk( | ||
1399 | VIF_PR_FMT " event:%d", | ||
1400 | VIF_PR_ARG, __entry->rssi_event | ||
1401 | ) | ||
1402 | ); | ||
1403 | |||
1404 | TRACE_EVENT(api_scan_completed, | ||
1405 | TP_PROTO(struct ieee80211_local *local, bool aborted), | ||
1406 | |||
1407 | TP_ARGS(local, aborted), | ||
1408 | |||
1409 | TP_STRUCT__entry( | ||
1410 | LOCAL_ENTRY | ||
1411 | __field(bool, aborted) | ||
1412 | ), | ||
1413 | |||
1414 | TP_fast_assign( | ||
1415 | LOCAL_ASSIGN; | ||
1416 | __entry->aborted = aborted; | ||
1417 | ), | ||
1418 | |||
1419 | TP_printk( | ||
1420 | LOCAL_PR_FMT " aborted:%d", | ||
1421 | LOCAL_PR_ARG, __entry->aborted | ||
1422 | ) | ||
1423 | ); | ||
1424 | |||
1425 | TRACE_EVENT(api_sched_scan_results, | ||
1426 | TP_PROTO(struct ieee80211_local *local), | ||
1427 | |||
1428 | TP_ARGS(local), | ||
1429 | |||
1430 | TP_STRUCT__entry( | ||
1431 | LOCAL_ENTRY | ||
1432 | ), | ||
1433 | |||
1434 | TP_fast_assign( | ||
1435 | LOCAL_ASSIGN; | ||
1436 | ), | ||
1437 | |||
1438 | TP_printk( | ||
1439 | LOCAL_PR_FMT, LOCAL_PR_ARG | ||
1440 | ) | ||
1441 | ); | ||
1442 | |||
1443 | TRACE_EVENT(api_sched_scan_stopped, | ||
1444 | TP_PROTO(struct ieee80211_local *local), | ||
1445 | |||
1446 | TP_ARGS(local), | ||
1447 | |||
1448 | TP_STRUCT__entry( | ||
1449 | LOCAL_ENTRY | ||
1450 | ), | ||
1451 | |||
1452 | TP_fast_assign( | ||
1453 | LOCAL_ASSIGN; | ||
1454 | ), | ||
1455 | |||
1456 | TP_printk( | ||
1457 | LOCAL_PR_FMT, LOCAL_PR_ARG | ||
1458 | ) | ||
1459 | ); | ||
1460 | |||
1461 | TRACE_EVENT(api_sta_block_awake, | ||
1462 | TP_PROTO(struct ieee80211_local *local, | ||
1463 | struct ieee80211_sta *sta, bool block), | ||
1464 | |||
1465 | TP_ARGS(local, sta, block), | ||
1466 | |||
1467 | TP_STRUCT__entry( | ||
1468 | LOCAL_ENTRY | ||
1469 | STA_ENTRY | ||
1470 | __field(bool, block) | ||
1471 | ), | ||
1472 | |||
1473 | TP_fast_assign( | ||
1474 | LOCAL_ASSIGN; | ||
1475 | STA_ASSIGN; | ||
1476 | __entry->block = block; | ||
1477 | ), | ||
1478 | |||
1479 | TP_printk( | ||
1480 | LOCAL_PR_FMT STA_PR_FMT " block:%d", | ||
1481 | LOCAL_PR_ARG, STA_PR_FMT, __entry->block | ||
1482 | ) | ||
1483 | ); | ||
1484 | |||
1485 | TRACE_EVENT(api_chswitch_done, | ||
1486 | TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success), | ||
1487 | |||
1488 | TP_ARGS(sdata, success), | ||
1489 | |||
1490 | TP_STRUCT__entry( | ||
1491 | VIF_ENTRY | ||
1492 | __field(bool, success) | ||
1493 | ), | ||
1494 | |||
1495 | TP_fast_assign( | ||
1496 | VIF_ASSIGN; | ||
1497 | __entry->success = success; | ||
1498 | ), | ||
1499 | |||
1500 | TP_printk( | ||
1501 | VIF_PR_FMT " success=%d", | ||
1502 | VIF_PR_ARG, __entry->success | ||
1503 | ) | ||
1504 | ); | ||
1505 | |||
1506 | DEFINE_EVENT(local_only_evt, api_ready_on_channel, | ||
1507 | TP_PROTO(struct ieee80211_local *local), | ||
1508 | TP_ARGS(local) | ||
1509 | ); | ||
1510 | |||
1511 | DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired, | ||
1512 | TP_PROTO(struct ieee80211_local *local), | ||
1513 | TP_ARGS(local) | ||
1514 | ); | ||
1515 | |||
1516 | TRACE_EVENT(api_gtk_rekey_notify, | ||
1517 | TP_PROTO(struct ieee80211_sub_if_data *sdata, | ||
1518 | const u8 *bssid, const u8 *replay_ctr), | ||
1519 | |||
1520 | TP_ARGS(sdata, bssid, replay_ctr), | ||
1521 | |||
1522 | TP_STRUCT__entry( | ||
1523 | VIF_ENTRY | ||
1524 | __array(u8, bssid, ETH_ALEN) | ||
1525 | __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN) | ||
1526 | ), | ||
1527 | |||
1528 | TP_fast_assign( | ||
1529 | VIF_ASSIGN; | ||
1530 | memcpy(__entry->bssid, bssid, ETH_ALEN); | ||
1531 | memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN); | ||
1532 | ), | ||
1533 | |||
1534 | TP_printk(VIF_PR_FMT, VIF_PR_ARG) | ||
1535 | ); | ||
1536 | |||
1537 | TRACE_EVENT(api_enable_rssi_reports, | ||
1538 | TP_PROTO(struct ieee80211_sub_if_data *sdata, | ||
1539 | int rssi_min_thold, int rssi_max_thold), | ||
1540 | |||
1541 | TP_ARGS(sdata, rssi_min_thold, rssi_max_thold), | ||
1542 | |||
1543 | TP_STRUCT__entry( | ||
1544 | VIF_ENTRY | ||
1545 | __field(int, rssi_min_thold) | ||
1546 | __field(int, rssi_max_thold) | ||
1547 | ), | ||
1548 | |||
1549 | TP_fast_assign( | ||
1550 | VIF_ASSIGN; | ||
1551 | __entry->rssi_min_thold = rssi_min_thold; | ||
1552 | __entry->rssi_max_thold = rssi_max_thold; | ||
1553 | ), | ||
1554 | |||
1555 | TP_printk( | ||
1556 | VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d", | ||
1557 | VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold | ||
1558 | ) | ||
1559 | ); | ||
1560 | |||
1561 | TRACE_EVENT(api_eosp, | ||
1562 | TP_PROTO(struct ieee80211_local *local, | ||
1563 | struct ieee80211_sta *sta), | ||
1564 | |||
1565 | TP_ARGS(local, sta), | ||
1566 | |||
1567 | TP_STRUCT__entry( | ||
1568 | LOCAL_ENTRY | ||
1569 | STA_ENTRY | ||
1570 | ), | ||
1571 | |||
1572 | TP_fast_assign( | ||
1573 | LOCAL_ASSIGN; | ||
1574 | STA_ASSIGN; | ||
1575 | ), | ||
1576 | |||
1577 | TP_printk( | ||
1578 | LOCAL_PR_FMT STA_PR_FMT, | ||
1579 | LOCAL_PR_ARG, STA_PR_FMT | ||
1580 | ) | ||
1581 | ); | ||
1582 | |||
1583 | /* | ||
1584 | * Tracing for internal functions | ||
1585 | * (which may also be called in response to driver calls) | ||
1586 | */ | ||
1587 | |||
1588 | TRACE_EVENT(wake_queue, | ||
1589 | TP_PROTO(struct ieee80211_local *local, u16 queue, | ||
1590 | enum queue_stop_reason reason), | ||
1591 | |||
1592 | TP_ARGS(local, queue, reason), | ||
1593 | |||
1594 | TP_STRUCT__entry( | ||
1595 | LOCAL_ENTRY | ||
1596 | __field(u16, queue) | ||
1597 | __field(u32, reason) | ||
1598 | ), | ||
1599 | |||
1600 | TP_fast_assign( | ||
1601 | LOCAL_ASSIGN; | ||
1602 | __entry->queue = queue; | ||
1603 | __entry->reason = reason; | ||
1604 | ), | ||
1605 | |||
1606 | TP_printk( | ||
1607 | LOCAL_PR_FMT " queue:%d, reason:%d", | ||
1608 | LOCAL_PR_ARG, __entry->queue, __entry->reason | ||
1609 | ) | ||
1610 | ); | ||
1611 | |||
1612 | TRACE_EVENT(stop_queue, | ||
1613 | TP_PROTO(struct ieee80211_local *local, u16 queue, | ||
1614 | enum queue_stop_reason reason), | ||
1615 | |||
1616 | TP_ARGS(local, queue, reason), | ||
1617 | |||
1618 | TP_STRUCT__entry( | ||
1619 | LOCAL_ENTRY | ||
1620 | __field(u16, queue) | ||
1621 | __field(u32, reason) | ||
1622 | ), | ||
1623 | |||
1624 | TP_fast_assign( | ||
1625 | LOCAL_ASSIGN; | ||
1626 | __entry->queue = queue; | ||
1627 | __entry->reason = reason; | ||
1628 | ), | ||
1629 | |||
1630 | TP_printk( | ||
1631 | LOCAL_PR_FMT " queue:%d, reason:%d", | ||
1632 | LOCAL_PR_ARG, __entry->queue, __entry->reason | ||
1633 | ) | ||
1634 | ); | ||
1635 | #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ | ||
1636 | |||
1637 | #undef TRACE_INCLUDE_PATH | ||
1638 | #define TRACE_INCLUDE_PATH . | ||
1639 | #undef TRACE_INCLUDE_FILE | ||
1640 | #define TRACE_INCLUDE_FILE trace | ||
1641 | #include <trace/define_trace.h> | ||