Loading...
1/*
2* Portions of this file
3* Copyright(c) 2016 Intel Deutschland GmbH
4*/
5
6#if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
7#define __MAC80211_DRIVER_TRACE
8
9#include <linux/tracepoint.h>
10#include <net/mac80211.h>
11#include "ieee80211_i.h"
12
13#undef TRACE_SYSTEM
14#define TRACE_SYSTEM mac80211
15
16#define MAXNAME 32
17#define LOCAL_ENTRY __array(char, wiphy_name, 32)
18#define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME)
19#define LOCAL_PR_FMT "%s"
20#define LOCAL_PR_ARG __entry->wiphy_name
21
22#define STA_ENTRY __array(char, sta_addr, ETH_ALEN)
23#define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN))
24#define STA_NAMED_ASSIGN(s) memcpy(__entry->sta_addr, (s)->addr, ETH_ALEN)
25#define STA_PR_FMT " sta:%pM"
26#define STA_PR_ARG __entry->sta_addr
27
28#define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
29 __field(bool, p2p) \
30 __string(vif_name, sdata->name)
31#define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
32 __entry->p2p = sdata->vif.p2p; \
33 __assign_str(vif_name, sdata->name)
34#define VIF_PR_FMT " vif:%s(%d%s)"
35#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
36
37#define CHANDEF_ENTRY __field(u32, control_freq) \
38 __field(u32, chan_width) \
39 __field(u32, center_freq1) \
40 __field(u32, center_freq2)
41#define CHANDEF_ASSIGN(c) \
42 __entry->control_freq = (c) ? ((c)->chan ? (c)->chan->center_freq : 0) : 0; \
43 __entry->chan_width = (c) ? (c)->width : 0; \
44 __entry->center_freq1 = (c) ? (c)->center_freq1 : 0; \
45 __entry->center_freq2 = (c) ? (c)->center_freq2 : 0;
46#define CHANDEF_PR_FMT " control:%d MHz width:%d center: %d/%d MHz"
47#define CHANDEF_PR_ARG __entry->control_freq, __entry->chan_width, \
48 __entry->center_freq1, __entry->center_freq2
49
50#define MIN_CHANDEF_ENTRY \
51 __field(u32, min_control_freq) \
52 __field(u32, min_chan_width) \
53 __field(u32, min_center_freq1) \
54 __field(u32, min_center_freq2)
55
56#define MIN_CHANDEF_ASSIGN(c) \
57 __entry->min_control_freq = (c)->chan ? (c)->chan->center_freq : 0; \
58 __entry->min_chan_width = (c)->width; \
59 __entry->min_center_freq1 = (c)->center_freq1; \
60 __entry->min_center_freq2 = (c)->center_freq2;
61#define MIN_CHANDEF_PR_FMT " min_control:%d MHz min_width:%d min_center: %d/%d MHz"
62#define MIN_CHANDEF_PR_ARG __entry->min_control_freq, __entry->min_chan_width, \
63 __entry->min_center_freq1, __entry->min_center_freq2
64
65#define CHANCTX_ENTRY CHANDEF_ENTRY \
66 MIN_CHANDEF_ENTRY \
67 __field(u8, rx_chains_static) \
68 __field(u8, rx_chains_dynamic)
69#define CHANCTX_ASSIGN CHANDEF_ASSIGN(&ctx->conf.def) \
70 MIN_CHANDEF_ASSIGN(&ctx->conf.min_def) \
71 __entry->rx_chains_static = ctx->conf.rx_chains_static; \
72 __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic
73#define CHANCTX_PR_FMT CHANDEF_PR_FMT MIN_CHANDEF_PR_FMT " chains:%d/%d"
74#define CHANCTX_PR_ARG CHANDEF_PR_ARG, MIN_CHANDEF_PR_ARG, \
75 __entry->rx_chains_static, __entry->rx_chains_dynamic
76
77#define KEY_ENTRY __field(u32, cipher) \
78 __field(u8, hw_key_idx) \
79 __field(u8, flags) \
80 __field(s8, keyidx)
81#define KEY_ASSIGN(k) __entry->cipher = (k)->cipher; \
82 __entry->flags = (k)->flags; \
83 __entry->keyidx = (k)->keyidx; \
84 __entry->hw_key_idx = (k)->hw_key_idx;
85#define KEY_PR_FMT " cipher:0x%x, flags=%#x, keyidx=%d, hw_key_idx=%d"
86#define KEY_PR_ARG __entry->cipher, __entry->flags, __entry->keyidx, __entry->hw_key_idx
87
88#define AMPDU_ACTION_ENTRY __field(enum ieee80211_ampdu_mlme_action, \
89 ieee80211_ampdu_mlme_action) \
90 STA_ENTRY \
91 __field(u16, tid) \
92 __field(u16, ssn) \
93 __field(u8, buf_size) \
94 __field(bool, amsdu) \
95 __field(u16, timeout)
96#define AMPDU_ACTION_ASSIGN STA_NAMED_ASSIGN(params->sta); \
97 __entry->tid = params->tid; \
98 __entry->ssn = params->ssn; \
99 __entry->buf_size = params->buf_size; \
100 __entry->amsdu = params->amsdu; \
101 __entry->timeout = params->timeout;
102#define AMPDU_ACTION_PR_FMT STA_PR_FMT " tid %d, ssn %d, buf_size %u, amsdu %d, timeout %d"
103#define AMPDU_ACTION_PR_ARG STA_PR_ARG, __entry->tid, __entry->ssn, \
104 __entry->buf_size, __entry->amsdu, __entry->timeout
105
106/*
107 * Tracing for driver callbacks.
108 */
109
110DECLARE_EVENT_CLASS(local_only_evt,
111 TP_PROTO(struct ieee80211_local *local),
112 TP_ARGS(local),
113 TP_STRUCT__entry(
114 LOCAL_ENTRY
115 ),
116 TP_fast_assign(
117 LOCAL_ASSIGN;
118 ),
119 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
120);
121
122DECLARE_EVENT_CLASS(local_sdata_addr_evt,
123 TP_PROTO(struct ieee80211_local *local,
124 struct ieee80211_sub_if_data *sdata),
125 TP_ARGS(local, sdata),
126
127 TP_STRUCT__entry(
128 LOCAL_ENTRY
129 VIF_ENTRY
130 __array(char, addr, ETH_ALEN)
131 ),
132
133 TP_fast_assign(
134 LOCAL_ASSIGN;
135 VIF_ASSIGN;
136 memcpy(__entry->addr, sdata->vif.addr, ETH_ALEN);
137 ),
138
139 TP_printk(
140 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
141 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
142 )
143);
144
145DECLARE_EVENT_CLASS(local_u32_evt,
146 TP_PROTO(struct ieee80211_local *local, u32 value),
147 TP_ARGS(local, value),
148
149 TP_STRUCT__entry(
150 LOCAL_ENTRY
151 __field(u32, value)
152 ),
153
154 TP_fast_assign(
155 LOCAL_ASSIGN;
156 __entry->value = value;
157 ),
158
159 TP_printk(
160 LOCAL_PR_FMT " value:%d",
161 LOCAL_PR_ARG, __entry->value
162 )
163);
164
165DECLARE_EVENT_CLASS(local_sdata_evt,
166 TP_PROTO(struct ieee80211_local *local,
167 struct ieee80211_sub_if_data *sdata),
168 TP_ARGS(local, sdata),
169
170 TP_STRUCT__entry(
171 LOCAL_ENTRY
172 VIF_ENTRY
173 ),
174
175 TP_fast_assign(
176 LOCAL_ASSIGN;
177 VIF_ASSIGN;
178 ),
179
180 TP_printk(
181 LOCAL_PR_FMT VIF_PR_FMT,
182 LOCAL_PR_ARG, VIF_PR_ARG
183 )
184);
185
186DEFINE_EVENT(local_only_evt, drv_return_void,
187 TP_PROTO(struct ieee80211_local *local),
188 TP_ARGS(local)
189);
190
191TRACE_EVENT(drv_return_int,
192 TP_PROTO(struct ieee80211_local *local, int ret),
193 TP_ARGS(local, ret),
194 TP_STRUCT__entry(
195 LOCAL_ENTRY
196 __field(int, ret)
197 ),
198 TP_fast_assign(
199 LOCAL_ASSIGN;
200 __entry->ret = ret;
201 ),
202 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
203);
204
205TRACE_EVENT(drv_return_bool,
206 TP_PROTO(struct ieee80211_local *local, bool ret),
207 TP_ARGS(local, ret),
208 TP_STRUCT__entry(
209 LOCAL_ENTRY
210 __field(bool, ret)
211 ),
212 TP_fast_assign(
213 LOCAL_ASSIGN;
214 __entry->ret = ret;
215 ),
216 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
217 "true" : "false")
218);
219
220TRACE_EVENT(drv_return_u32,
221 TP_PROTO(struct ieee80211_local *local, u32 ret),
222 TP_ARGS(local, ret),
223 TP_STRUCT__entry(
224 LOCAL_ENTRY
225 __field(u32, ret)
226 ),
227 TP_fast_assign(
228 LOCAL_ASSIGN;
229 __entry->ret = ret;
230 ),
231 TP_printk(LOCAL_PR_FMT " - %u", LOCAL_PR_ARG, __entry->ret)
232);
233
234TRACE_EVENT(drv_return_u64,
235 TP_PROTO(struct ieee80211_local *local, u64 ret),
236 TP_ARGS(local, ret),
237 TP_STRUCT__entry(
238 LOCAL_ENTRY
239 __field(u64, ret)
240 ),
241 TP_fast_assign(
242 LOCAL_ASSIGN;
243 __entry->ret = ret;
244 ),
245 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
246);
247
248DEFINE_EVENT(local_only_evt, drv_start,
249 TP_PROTO(struct ieee80211_local *local),
250 TP_ARGS(local)
251);
252
253DEFINE_EVENT(local_u32_evt, drv_get_et_strings,
254 TP_PROTO(struct ieee80211_local *local, u32 sset),
255 TP_ARGS(local, sset)
256);
257
258DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count,
259 TP_PROTO(struct ieee80211_local *local, u32 sset),
260 TP_ARGS(local, sset)
261);
262
263DEFINE_EVENT(local_only_evt, drv_get_et_stats,
264 TP_PROTO(struct ieee80211_local *local),
265 TP_ARGS(local)
266);
267
268DEFINE_EVENT(local_only_evt, drv_suspend,
269 TP_PROTO(struct ieee80211_local *local),
270 TP_ARGS(local)
271);
272
273DEFINE_EVENT(local_only_evt, drv_resume,
274 TP_PROTO(struct ieee80211_local *local),
275 TP_ARGS(local)
276);
277
278TRACE_EVENT(drv_set_wakeup,
279 TP_PROTO(struct ieee80211_local *local, bool enabled),
280 TP_ARGS(local, enabled),
281 TP_STRUCT__entry(
282 LOCAL_ENTRY
283 __field(bool, enabled)
284 ),
285 TP_fast_assign(
286 LOCAL_ASSIGN;
287 __entry->enabled = enabled;
288 ),
289 TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
290);
291
292DEFINE_EVENT(local_only_evt, drv_stop,
293 TP_PROTO(struct ieee80211_local *local),
294 TP_ARGS(local)
295);
296
297DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
298 TP_PROTO(struct ieee80211_local *local,
299 struct ieee80211_sub_if_data *sdata),
300 TP_ARGS(local, sdata)
301);
302
303TRACE_EVENT(drv_change_interface,
304 TP_PROTO(struct ieee80211_local *local,
305 struct ieee80211_sub_if_data *sdata,
306 enum nl80211_iftype type, bool p2p),
307
308 TP_ARGS(local, sdata, type, p2p),
309
310 TP_STRUCT__entry(
311 LOCAL_ENTRY
312 VIF_ENTRY
313 __field(u32, new_type)
314 __field(bool, new_p2p)
315 ),
316
317 TP_fast_assign(
318 LOCAL_ASSIGN;
319 VIF_ASSIGN;
320 __entry->new_type = type;
321 __entry->new_p2p = p2p;
322 ),
323
324 TP_printk(
325 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
326 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
327 __entry->new_p2p ? "/p2p" : ""
328 )
329);
330
331DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
332 TP_PROTO(struct ieee80211_local *local,
333 struct ieee80211_sub_if_data *sdata),
334 TP_ARGS(local, sdata)
335);
336
337TRACE_EVENT(drv_config,
338 TP_PROTO(struct ieee80211_local *local,
339 u32 changed),
340
341 TP_ARGS(local, changed),
342
343 TP_STRUCT__entry(
344 LOCAL_ENTRY
345 __field(u32, changed)
346 __field(u32, flags)
347 __field(int, power_level)
348 __field(int, dynamic_ps_timeout)
349 __field(u16, listen_interval)
350 __field(u8, long_frame_max_tx_count)
351 __field(u8, short_frame_max_tx_count)
352 CHANDEF_ENTRY
353 __field(int, smps)
354 ),
355
356 TP_fast_assign(
357 LOCAL_ASSIGN;
358 __entry->changed = changed;
359 __entry->flags = local->hw.conf.flags;
360 __entry->power_level = local->hw.conf.power_level;
361 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
362 __entry->listen_interval = local->hw.conf.listen_interval;
363 __entry->long_frame_max_tx_count =
364 local->hw.conf.long_frame_max_tx_count;
365 __entry->short_frame_max_tx_count =
366 local->hw.conf.short_frame_max_tx_count;
367 CHANDEF_ASSIGN(&local->hw.conf.chandef)
368 __entry->smps = local->hw.conf.smps_mode;
369 ),
370
371 TP_printk(
372 LOCAL_PR_FMT " ch:%#x" CHANDEF_PR_FMT,
373 LOCAL_PR_ARG, __entry->changed, CHANDEF_PR_ARG
374 )
375);
376
377TRACE_EVENT(drv_bss_info_changed,
378 TP_PROTO(struct ieee80211_local *local,
379 struct ieee80211_sub_if_data *sdata,
380 struct ieee80211_bss_conf *info,
381 u32 changed),
382
383 TP_ARGS(local, sdata, info, changed),
384
385 TP_STRUCT__entry(
386 LOCAL_ENTRY
387 VIF_ENTRY
388 __field(u32, changed)
389 __field(bool, assoc)
390 __field(bool, ibss_joined)
391 __field(bool, ibss_creator)
392 __field(u16, aid)
393 __field(bool, cts)
394 __field(bool, shortpre)
395 __field(bool, shortslot)
396 __field(bool, enable_beacon)
397 __field(u8, dtimper)
398 __field(u16, bcnint)
399 __field(u16, assoc_cap)
400 __field(u64, sync_tsf)
401 __field(u32, sync_device_ts)
402 __field(u8, sync_dtim_count)
403 __field(u32, basic_rates)
404 __array(int, mcast_rate, NUM_NL80211_BANDS)
405 __field(u16, ht_operation_mode)
406 __field(s32, cqm_rssi_thold);
407 __field(s32, cqm_rssi_hyst);
408 __field(u32, channel_width);
409 __field(u32, channel_cfreq1);
410 __dynamic_array(u32, arp_addr_list,
411 info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
412 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
413 info->arp_addr_cnt);
414 __field(int, arp_addr_cnt);
415 __field(bool, qos);
416 __field(bool, idle);
417 __field(bool, ps);
418 __dynamic_array(u8, ssid, info->ssid_len);
419 __field(bool, hidden_ssid);
420 __field(int, txpower)
421 __field(u8, p2p_oppps_ctwindow)
422 ),
423
424 TP_fast_assign(
425 LOCAL_ASSIGN;
426 VIF_ASSIGN;
427 __entry->changed = changed;
428 __entry->aid = info->aid;
429 __entry->assoc = info->assoc;
430 __entry->ibss_joined = info->ibss_joined;
431 __entry->ibss_creator = info->ibss_creator;
432 __entry->shortpre = info->use_short_preamble;
433 __entry->cts = info->use_cts_prot;
434 __entry->shortslot = info->use_short_slot;
435 __entry->enable_beacon = info->enable_beacon;
436 __entry->dtimper = info->dtim_period;
437 __entry->bcnint = info->beacon_int;
438 __entry->assoc_cap = info->assoc_capability;
439 __entry->sync_tsf = info->sync_tsf;
440 __entry->sync_device_ts = info->sync_device_ts;
441 __entry->sync_dtim_count = info->sync_dtim_count;
442 __entry->basic_rates = info->basic_rates;
443 memcpy(__entry->mcast_rate, info->mcast_rate,
444 sizeof(__entry->mcast_rate));
445 __entry->ht_operation_mode = info->ht_operation_mode;
446 __entry->cqm_rssi_thold = info->cqm_rssi_thold;
447 __entry->cqm_rssi_hyst = info->cqm_rssi_hyst;
448 __entry->channel_width = info->chandef.width;
449 __entry->channel_cfreq1 = info->chandef.center_freq1;
450 __entry->arp_addr_cnt = info->arp_addr_cnt;
451 memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list,
452 sizeof(u32) * (info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
453 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
454 info->arp_addr_cnt));
455 __entry->qos = info->qos;
456 __entry->idle = info->idle;
457 __entry->ps = info->ps;
458 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
459 __entry->hidden_ssid = info->hidden_ssid;
460 __entry->txpower = info->txpower;
461 __entry->p2p_oppps_ctwindow = info->p2p_noa_attr.oppps_ctwindow;
462 ),
463
464 TP_printk(
465 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
466 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
467 )
468);
469
470TRACE_EVENT(drv_prepare_multicast,
471 TP_PROTO(struct ieee80211_local *local, int mc_count),
472
473 TP_ARGS(local, mc_count),
474
475 TP_STRUCT__entry(
476 LOCAL_ENTRY
477 __field(int, mc_count)
478 ),
479
480 TP_fast_assign(
481 LOCAL_ASSIGN;
482 __entry->mc_count = mc_count;
483 ),
484
485 TP_printk(
486 LOCAL_PR_FMT " prepare mc (%d)",
487 LOCAL_PR_ARG, __entry->mc_count
488 )
489);
490
491TRACE_EVENT(drv_configure_filter,
492 TP_PROTO(struct ieee80211_local *local,
493 unsigned int changed_flags,
494 unsigned int *total_flags,
495 u64 multicast),
496
497 TP_ARGS(local, changed_flags, total_flags, multicast),
498
499 TP_STRUCT__entry(
500 LOCAL_ENTRY
501 __field(unsigned int, changed)
502 __field(unsigned int, total)
503 __field(u64, multicast)
504 ),
505
506 TP_fast_assign(
507 LOCAL_ASSIGN;
508 __entry->changed = changed_flags;
509 __entry->total = *total_flags;
510 __entry->multicast = multicast;
511 ),
512
513 TP_printk(
514 LOCAL_PR_FMT " changed:%#x total:%#x",
515 LOCAL_PR_ARG, __entry->changed, __entry->total
516 )
517);
518
519TRACE_EVENT(drv_config_iface_filter,
520 TP_PROTO(struct ieee80211_local *local,
521 struct ieee80211_sub_if_data *sdata,
522 unsigned int filter_flags,
523 unsigned int changed_flags),
524
525 TP_ARGS(local, sdata, filter_flags, changed_flags),
526
527 TP_STRUCT__entry(
528 LOCAL_ENTRY
529 VIF_ENTRY
530 __field(unsigned int, filter_flags)
531 __field(unsigned int, changed_flags)
532 ),
533
534 TP_fast_assign(
535 LOCAL_ASSIGN;
536 VIF_ASSIGN;
537 __entry->filter_flags = filter_flags;
538 __entry->changed_flags = changed_flags;
539 ),
540
541 TP_printk(
542 LOCAL_PR_FMT VIF_PR_FMT
543 " filter_flags: %#x changed_flags: %#x",
544 LOCAL_PR_ARG, VIF_PR_ARG, __entry->filter_flags,
545 __entry->changed_flags
546 )
547);
548
549TRACE_EVENT(drv_set_tim,
550 TP_PROTO(struct ieee80211_local *local,
551 struct ieee80211_sta *sta, bool set),
552
553 TP_ARGS(local, sta, set),
554
555 TP_STRUCT__entry(
556 LOCAL_ENTRY
557 STA_ENTRY
558 __field(bool, set)
559 ),
560
561 TP_fast_assign(
562 LOCAL_ASSIGN;
563 STA_ASSIGN;
564 __entry->set = set;
565 ),
566
567 TP_printk(
568 LOCAL_PR_FMT STA_PR_FMT " set:%d",
569 LOCAL_PR_ARG, STA_PR_ARG, __entry->set
570 )
571);
572
573TRACE_EVENT(drv_set_key,
574 TP_PROTO(struct ieee80211_local *local,
575 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
576 struct ieee80211_sta *sta,
577 struct ieee80211_key_conf *key),
578
579 TP_ARGS(local, cmd, sdata, sta, key),
580
581 TP_STRUCT__entry(
582 LOCAL_ENTRY
583 VIF_ENTRY
584 STA_ENTRY
585 KEY_ENTRY
586 ),
587
588 TP_fast_assign(
589 LOCAL_ASSIGN;
590 VIF_ASSIGN;
591 STA_ASSIGN;
592 KEY_ASSIGN(key);
593 ),
594
595 TP_printk(
596 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT KEY_PR_FMT,
597 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, KEY_PR_ARG
598 )
599);
600
601TRACE_EVENT(drv_update_tkip_key,
602 TP_PROTO(struct ieee80211_local *local,
603 struct ieee80211_sub_if_data *sdata,
604 struct ieee80211_key_conf *conf,
605 struct ieee80211_sta *sta, u32 iv32),
606
607 TP_ARGS(local, sdata, conf, sta, iv32),
608
609 TP_STRUCT__entry(
610 LOCAL_ENTRY
611 VIF_ENTRY
612 STA_ENTRY
613 __field(u32, iv32)
614 ),
615
616 TP_fast_assign(
617 LOCAL_ASSIGN;
618 VIF_ASSIGN;
619 STA_ASSIGN;
620 __entry->iv32 = iv32;
621 ),
622
623 TP_printk(
624 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
625 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->iv32
626 )
627);
628
629DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
630 TP_PROTO(struct ieee80211_local *local,
631 struct ieee80211_sub_if_data *sdata),
632 TP_ARGS(local, sdata)
633);
634
635DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
636 TP_PROTO(struct ieee80211_local *local,
637 struct ieee80211_sub_if_data *sdata),
638 TP_ARGS(local, sdata)
639);
640
641DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
642 TP_PROTO(struct ieee80211_local *local,
643 struct ieee80211_sub_if_data *sdata),
644 TP_ARGS(local, sdata)
645);
646
647DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
648 TP_PROTO(struct ieee80211_local *local,
649 struct ieee80211_sub_if_data *sdata),
650 TP_ARGS(local, sdata)
651);
652
653TRACE_EVENT(drv_sw_scan_start,
654 TP_PROTO(struct ieee80211_local *local,
655 struct ieee80211_sub_if_data *sdata,
656 const u8 *mac_addr),
657
658 TP_ARGS(local, sdata, mac_addr),
659
660 TP_STRUCT__entry(
661 LOCAL_ENTRY
662 VIF_ENTRY
663 __array(char, mac_addr, ETH_ALEN)
664 ),
665
666 TP_fast_assign(
667 LOCAL_ASSIGN;
668 VIF_ASSIGN;
669 memcpy(__entry->mac_addr, mac_addr, ETH_ALEN);
670 ),
671
672 TP_printk(LOCAL_PR_FMT ", " VIF_PR_FMT ", addr:%pM",
673 LOCAL_PR_ARG, VIF_PR_ARG, __entry->mac_addr)
674);
675
676DEFINE_EVENT(local_sdata_evt, drv_sw_scan_complete,
677 TP_PROTO(struct ieee80211_local *local,
678 struct ieee80211_sub_if_data *sdata),
679 TP_ARGS(local, sdata)
680);
681
682TRACE_EVENT(drv_get_stats,
683 TP_PROTO(struct ieee80211_local *local,
684 struct ieee80211_low_level_stats *stats,
685 int ret),
686
687 TP_ARGS(local, stats, ret),
688
689 TP_STRUCT__entry(
690 LOCAL_ENTRY
691 __field(int, ret)
692 __field(unsigned int, ackfail)
693 __field(unsigned int, rtsfail)
694 __field(unsigned int, fcserr)
695 __field(unsigned int, rtssucc)
696 ),
697
698 TP_fast_assign(
699 LOCAL_ASSIGN;
700 __entry->ret = ret;
701 __entry->ackfail = stats->dot11ACKFailureCount;
702 __entry->rtsfail = stats->dot11RTSFailureCount;
703 __entry->fcserr = stats->dot11FCSErrorCount;
704 __entry->rtssucc = stats->dot11RTSSuccessCount;
705 ),
706
707 TP_printk(
708 LOCAL_PR_FMT " ret:%d",
709 LOCAL_PR_ARG, __entry->ret
710 )
711);
712
713TRACE_EVENT(drv_get_key_seq,
714 TP_PROTO(struct ieee80211_local *local,
715 struct ieee80211_key_conf *key),
716
717 TP_ARGS(local, key),
718
719 TP_STRUCT__entry(
720 LOCAL_ENTRY
721 KEY_ENTRY
722 ),
723
724 TP_fast_assign(
725 LOCAL_ASSIGN;
726 KEY_ASSIGN(key);
727 ),
728
729 TP_printk(
730 LOCAL_PR_FMT KEY_PR_FMT,
731 LOCAL_PR_ARG, KEY_PR_ARG
732 )
733);
734
735DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
736 TP_PROTO(struct ieee80211_local *local, u32 value),
737 TP_ARGS(local, value)
738);
739
740DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
741 TP_PROTO(struct ieee80211_local *local, u32 value),
742 TP_ARGS(local, value)
743);
744
745TRACE_EVENT(drv_set_coverage_class,
746 TP_PROTO(struct ieee80211_local *local, s16 value),
747
748 TP_ARGS(local, value),
749
750 TP_STRUCT__entry(
751 LOCAL_ENTRY
752 __field(s16, value)
753 ),
754
755 TP_fast_assign(
756 LOCAL_ASSIGN;
757 __entry->value = value;
758 ),
759
760 TP_printk(
761 LOCAL_PR_FMT " value:%d",
762 LOCAL_PR_ARG, __entry->value
763 )
764);
765
766TRACE_EVENT(drv_sta_notify,
767 TP_PROTO(struct ieee80211_local *local,
768 struct ieee80211_sub_if_data *sdata,
769 enum sta_notify_cmd cmd,
770 struct ieee80211_sta *sta),
771
772 TP_ARGS(local, sdata, cmd, sta),
773
774 TP_STRUCT__entry(
775 LOCAL_ENTRY
776 VIF_ENTRY
777 STA_ENTRY
778 __field(u32, cmd)
779 ),
780
781 TP_fast_assign(
782 LOCAL_ASSIGN;
783 VIF_ASSIGN;
784 STA_ASSIGN;
785 __entry->cmd = cmd;
786 ),
787
788 TP_printk(
789 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
790 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
791 )
792);
793
794TRACE_EVENT(drv_sta_state,
795 TP_PROTO(struct ieee80211_local *local,
796 struct ieee80211_sub_if_data *sdata,
797 struct ieee80211_sta *sta,
798 enum ieee80211_sta_state old_state,
799 enum ieee80211_sta_state new_state),
800
801 TP_ARGS(local, sdata, sta, old_state, new_state),
802
803 TP_STRUCT__entry(
804 LOCAL_ENTRY
805 VIF_ENTRY
806 STA_ENTRY
807 __field(u32, old_state)
808 __field(u32, new_state)
809 ),
810
811 TP_fast_assign(
812 LOCAL_ASSIGN;
813 VIF_ASSIGN;
814 STA_ASSIGN;
815 __entry->old_state = old_state;
816 __entry->new_state = new_state;
817 ),
818
819 TP_printk(
820 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
821 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
822 __entry->old_state, __entry->new_state
823 )
824);
825
826TRACE_EVENT(drv_sta_rc_update,
827 TP_PROTO(struct ieee80211_local *local,
828 struct ieee80211_sub_if_data *sdata,
829 struct ieee80211_sta *sta,
830 u32 changed),
831
832 TP_ARGS(local, sdata, sta, changed),
833
834 TP_STRUCT__entry(
835 LOCAL_ENTRY
836 VIF_ENTRY
837 STA_ENTRY
838 __field(u32, changed)
839 ),
840
841 TP_fast_assign(
842 LOCAL_ASSIGN;
843 VIF_ASSIGN;
844 STA_ASSIGN;
845 __entry->changed = changed;
846 ),
847
848 TP_printk(
849 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
850 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
851 )
852);
853
854DECLARE_EVENT_CLASS(sta_event,
855 TP_PROTO(struct ieee80211_local *local,
856 struct ieee80211_sub_if_data *sdata,
857 struct ieee80211_sta *sta),
858
859 TP_ARGS(local, sdata, sta),
860
861 TP_STRUCT__entry(
862 LOCAL_ENTRY
863 VIF_ENTRY
864 STA_ENTRY
865 ),
866
867 TP_fast_assign(
868 LOCAL_ASSIGN;
869 VIF_ASSIGN;
870 STA_ASSIGN;
871 ),
872
873 TP_printk(
874 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
875 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
876 )
877);
878
879DEFINE_EVENT(sta_event, drv_sta_statistics,
880 TP_PROTO(struct ieee80211_local *local,
881 struct ieee80211_sub_if_data *sdata,
882 struct ieee80211_sta *sta),
883 TP_ARGS(local, sdata, sta)
884);
885
886DEFINE_EVENT(sta_event, drv_sta_add,
887 TP_PROTO(struct ieee80211_local *local,
888 struct ieee80211_sub_if_data *sdata,
889 struct ieee80211_sta *sta),
890 TP_ARGS(local, sdata, sta)
891);
892
893DEFINE_EVENT(sta_event, drv_sta_remove,
894 TP_PROTO(struct ieee80211_local *local,
895 struct ieee80211_sub_if_data *sdata,
896 struct ieee80211_sta *sta),
897 TP_ARGS(local, sdata, sta)
898);
899
900DEFINE_EVENT(sta_event, drv_sta_pre_rcu_remove,
901 TP_PROTO(struct ieee80211_local *local,
902 struct ieee80211_sub_if_data *sdata,
903 struct ieee80211_sta *sta),
904 TP_ARGS(local, sdata, sta)
905);
906
907DEFINE_EVENT(sta_event, drv_sync_rx_queues,
908 TP_PROTO(struct ieee80211_local *local,
909 struct ieee80211_sub_if_data *sdata,
910 struct ieee80211_sta *sta),
911 TP_ARGS(local, sdata, sta)
912);
913
914DEFINE_EVENT(sta_event, drv_sta_rate_tbl_update,
915 TP_PROTO(struct ieee80211_local *local,
916 struct ieee80211_sub_if_data *sdata,
917 struct ieee80211_sta *sta),
918 TP_ARGS(local, sdata, sta)
919);
920
921TRACE_EVENT(drv_conf_tx,
922 TP_PROTO(struct ieee80211_local *local,
923 struct ieee80211_sub_if_data *sdata,
924 u16 ac, const struct ieee80211_tx_queue_params *params),
925
926 TP_ARGS(local, sdata, ac, params),
927
928 TP_STRUCT__entry(
929 LOCAL_ENTRY
930 VIF_ENTRY
931 __field(u16, ac)
932 __field(u16, txop)
933 __field(u16, cw_min)
934 __field(u16, cw_max)
935 __field(u8, aifs)
936 __field(bool, uapsd)
937 ),
938
939 TP_fast_assign(
940 LOCAL_ASSIGN;
941 VIF_ASSIGN;
942 __entry->ac = ac;
943 __entry->txop = params->txop;
944 __entry->cw_max = params->cw_max;
945 __entry->cw_min = params->cw_min;
946 __entry->aifs = params->aifs;
947 __entry->uapsd = params->uapsd;
948 ),
949
950 TP_printk(
951 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
952 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
953 )
954);
955
956DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
957 TP_PROTO(struct ieee80211_local *local,
958 struct ieee80211_sub_if_data *sdata),
959 TP_ARGS(local, sdata)
960);
961
962TRACE_EVENT(drv_set_tsf,
963 TP_PROTO(struct ieee80211_local *local,
964 struct ieee80211_sub_if_data *sdata,
965 u64 tsf),
966
967 TP_ARGS(local, sdata, tsf),
968
969 TP_STRUCT__entry(
970 LOCAL_ENTRY
971 VIF_ENTRY
972 __field(u64, tsf)
973 ),
974
975 TP_fast_assign(
976 LOCAL_ASSIGN;
977 VIF_ASSIGN;
978 __entry->tsf = tsf;
979 ),
980
981 TP_printk(
982 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
983 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
984 )
985);
986
987TRACE_EVENT(drv_offset_tsf,
988 TP_PROTO(struct ieee80211_local *local,
989 struct ieee80211_sub_if_data *sdata,
990 s64 offset),
991
992 TP_ARGS(local, sdata, offset),
993
994 TP_STRUCT__entry(
995 LOCAL_ENTRY
996 VIF_ENTRY
997 __field(s64, tsf_offset)
998 ),
999
1000 TP_fast_assign(
1001 LOCAL_ASSIGN;
1002 VIF_ASSIGN;
1003 __entry->tsf_offset = offset;
1004 ),
1005
1006 TP_printk(
1007 LOCAL_PR_FMT VIF_PR_FMT " tsf offset:%lld",
1008 LOCAL_PR_ARG, VIF_PR_ARG,
1009 (unsigned long long)__entry->tsf_offset
1010 )
1011);
1012
1013DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
1014 TP_PROTO(struct ieee80211_local *local,
1015 struct ieee80211_sub_if_data *sdata),
1016 TP_ARGS(local, sdata)
1017);
1018
1019DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
1020 TP_PROTO(struct ieee80211_local *local),
1021 TP_ARGS(local)
1022);
1023
1024TRACE_EVENT(drv_ampdu_action,
1025 TP_PROTO(struct ieee80211_local *local,
1026 struct ieee80211_sub_if_data *sdata,
1027 struct ieee80211_ampdu_params *params),
1028
1029 TP_ARGS(local, sdata, params),
1030
1031 TP_STRUCT__entry(
1032 LOCAL_ENTRY
1033 VIF_ENTRY
1034 AMPDU_ACTION_ENTRY
1035 ),
1036
1037 TP_fast_assign(
1038 LOCAL_ASSIGN;
1039 VIF_ASSIGN;
1040 AMPDU_ACTION_ASSIGN;
1041 ),
1042
1043 TP_printk(
1044 LOCAL_PR_FMT VIF_PR_FMT AMPDU_ACTION_PR_FMT,
1045 LOCAL_PR_ARG, VIF_PR_ARG, AMPDU_ACTION_PR_ARG
1046 )
1047);
1048
1049TRACE_EVENT(drv_get_survey,
1050 TP_PROTO(struct ieee80211_local *local, int idx,
1051 struct survey_info *survey),
1052
1053 TP_ARGS(local, idx, survey),
1054
1055 TP_STRUCT__entry(
1056 LOCAL_ENTRY
1057 __field(int, idx)
1058 ),
1059
1060 TP_fast_assign(
1061 LOCAL_ASSIGN;
1062 __entry->idx = idx;
1063 ),
1064
1065 TP_printk(
1066 LOCAL_PR_FMT " idx:%d",
1067 LOCAL_PR_ARG, __entry->idx
1068 )
1069);
1070
1071TRACE_EVENT(drv_flush,
1072 TP_PROTO(struct ieee80211_local *local,
1073 u32 queues, bool drop),
1074
1075 TP_ARGS(local, queues, drop),
1076
1077 TP_STRUCT__entry(
1078 LOCAL_ENTRY
1079 __field(bool, drop)
1080 __field(u32, queues)
1081 ),
1082
1083 TP_fast_assign(
1084 LOCAL_ASSIGN;
1085 __entry->drop = drop;
1086 __entry->queues = queues;
1087 ),
1088
1089 TP_printk(
1090 LOCAL_PR_FMT " queues:0x%x drop:%d",
1091 LOCAL_PR_ARG, __entry->queues, __entry->drop
1092 )
1093);
1094
1095TRACE_EVENT(drv_channel_switch,
1096 TP_PROTO(struct ieee80211_local *local,
1097 struct ieee80211_sub_if_data *sdata,
1098 struct ieee80211_channel_switch *ch_switch),
1099
1100 TP_ARGS(local, sdata, ch_switch),
1101
1102 TP_STRUCT__entry(
1103 LOCAL_ENTRY
1104 VIF_ENTRY
1105 CHANDEF_ENTRY
1106 __field(u64, timestamp)
1107 __field(u32, device_timestamp)
1108 __field(bool, block_tx)
1109 __field(u8, count)
1110 ),
1111
1112 TP_fast_assign(
1113 LOCAL_ASSIGN;
1114 VIF_ASSIGN;
1115 CHANDEF_ASSIGN(&ch_switch->chandef)
1116 __entry->timestamp = ch_switch->timestamp;
1117 __entry->device_timestamp = ch_switch->device_timestamp;
1118 __entry->block_tx = ch_switch->block_tx;
1119 __entry->count = ch_switch->count;
1120 ),
1121
1122 TP_printk(
1123 LOCAL_PR_FMT VIF_PR_FMT " new " CHANDEF_PR_FMT " count:%d",
1124 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count
1125 )
1126);
1127
1128TRACE_EVENT(drv_set_antenna,
1129 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1130
1131 TP_ARGS(local, tx_ant, rx_ant, ret),
1132
1133 TP_STRUCT__entry(
1134 LOCAL_ENTRY
1135 __field(u32, tx_ant)
1136 __field(u32, rx_ant)
1137 __field(int, ret)
1138 ),
1139
1140 TP_fast_assign(
1141 LOCAL_ASSIGN;
1142 __entry->tx_ant = tx_ant;
1143 __entry->rx_ant = rx_ant;
1144 __entry->ret = ret;
1145 ),
1146
1147 TP_printk(
1148 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1149 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1150 )
1151);
1152
1153TRACE_EVENT(drv_get_antenna,
1154 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1155
1156 TP_ARGS(local, tx_ant, rx_ant, ret),
1157
1158 TP_STRUCT__entry(
1159 LOCAL_ENTRY
1160 __field(u32, tx_ant)
1161 __field(u32, rx_ant)
1162 __field(int, ret)
1163 ),
1164
1165 TP_fast_assign(
1166 LOCAL_ASSIGN;
1167 __entry->tx_ant = tx_ant;
1168 __entry->rx_ant = rx_ant;
1169 __entry->ret = ret;
1170 ),
1171
1172 TP_printk(
1173 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1174 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1175 )
1176);
1177
1178TRACE_EVENT(drv_remain_on_channel,
1179 TP_PROTO(struct ieee80211_local *local,
1180 struct ieee80211_sub_if_data *sdata,
1181 struct ieee80211_channel *chan,
1182 unsigned int duration,
1183 enum ieee80211_roc_type type),
1184
1185 TP_ARGS(local, sdata, chan, duration, type),
1186
1187 TP_STRUCT__entry(
1188 LOCAL_ENTRY
1189 VIF_ENTRY
1190 __field(int, center_freq)
1191 __field(unsigned int, duration)
1192 __field(u32, type)
1193 ),
1194
1195 TP_fast_assign(
1196 LOCAL_ASSIGN;
1197 VIF_ASSIGN;
1198 __entry->center_freq = chan->center_freq;
1199 __entry->duration = duration;
1200 __entry->type = type;
1201 ),
1202
1203 TP_printk(
1204 LOCAL_PR_FMT VIF_PR_FMT " freq:%dMHz duration:%dms type=%d",
1205 LOCAL_PR_ARG, VIF_PR_ARG,
1206 __entry->center_freq, __entry->duration, __entry->type
1207 )
1208);
1209
1210DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
1211 TP_PROTO(struct ieee80211_local *local),
1212 TP_ARGS(local)
1213);
1214
1215TRACE_EVENT(drv_set_ringparam,
1216 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1217
1218 TP_ARGS(local, tx, rx),
1219
1220 TP_STRUCT__entry(
1221 LOCAL_ENTRY
1222 __field(u32, tx)
1223 __field(u32, rx)
1224 ),
1225
1226 TP_fast_assign(
1227 LOCAL_ASSIGN;
1228 __entry->tx = tx;
1229 __entry->rx = rx;
1230 ),
1231
1232 TP_printk(
1233 LOCAL_PR_FMT " tx:%d rx %d",
1234 LOCAL_PR_ARG, __entry->tx, __entry->rx
1235 )
1236);
1237
1238TRACE_EVENT(drv_get_ringparam,
1239 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1240 u32 *rx, u32 *rx_max),
1241
1242 TP_ARGS(local, tx, tx_max, rx, rx_max),
1243
1244 TP_STRUCT__entry(
1245 LOCAL_ENTRY
1246 __field(u32, tx)
1247 __field(u32, tx_max)
1248 __field(u32, rx)
1249 __field(u32, rx_max)
1250 ),
1251
1252 TP_fast_assign(
1253 LOCAL_ASSIGN;
1254 __entry->tx = *tx;
1255 __entry->tx_max = *tx_max;
1256 __entry->rx = *rx;
1257 __entry->rx_max = *rx_max;
1258 ),
1259
1260 TP_printk(
1261 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1262 LOCAL_PR_ARG,
1263 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1264 )
1265);
1266
1267DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1268 TP_PROTO(struct ieee80211_local *local),
1269 TP_ARGS(local)
1270);
1271
1272DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1273 TP_PROTO(struct ieee80211_local *local),
1274 TP_ARGS(local)
1275);
1276
1277TRACE_EVENT(drv_set_bitrate_mask,
1278 TP_PROTO(struct ieee80211_local *local,
1279 struct ieee80211_sub_if_data *sdata,
1280 const struct cfg80211_bitrate_mask *mask),
1281
1282 TP_ARGS(local, sdata, mask),
1283
1284 TP_STRUCT__entry(
1285 LOCAL_ENTRY
1286 VIF_ENTRY
1287 __field(u32, legacy_2g)
1288 __field(u32, legacy_5g)
1289 ),
1290
1291 TP_fast_assign(
1292 LOCAL_ASSIGN;
1293 VIF_ASSIGN;
1294 __entry->legacy_2g = mask->control[NL80211_BAND_2GHZ].legacy;
1295 __entry->legacy_5g = mask->control[NL80211_BAND_5GHZ].legacy;
1296 ),
1297
1298 TP_printk(
1299 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1300 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1301 )
1302);
1303
1304TRACE_EVENT(drv_set_rekey_data,
1305 TP_PROTO(struct ieee80211_local *local,
1306 struct ieee80211_sub_if_data *sdata,
1307 struct cfg80211_gtk_rekey_data *data),
1308
1309 TP_ARGS(local, sdata, data),
1310
1311 TP_STRUCT__entry(
1312 LOCAL_ENTRY
1313 VIF_ENTRY
1314 __array(u8, kek, NL80211_KEK_LEN)
1315 __array(u8, kck, NL80211_KCK_LEN)
1316 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1317 ),
1318
1319 TP_fast_assign(
1320 LOCAL_ASSIGN;
1321 VIF_ASSIGN;
1322 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1323 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1324 memcpy(__entry->replay_ctr, data->replay_ctr,
1325 NL80211_REPLAY_CTR_LEN);
1326 ),
1327
1328 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1329 LOCAL_PR_ARG, VIF_PR_ARG)
1330);
1331
1332TRACE_EVENT(drv_event_callback,
1333 TP_PROTO(struct ieee80211_local *local,
1334 struct ieee80211_sub_if_data *sdata,
1335 const struct ieee80211_event *_event),
1336
1337 TP_ARGS(local, sdata, _event),
1338
1339 TP_STRUCT__entry(
1340 LOCAL_ENTRY
1341 VIF_ENTRY
1342 __field(u32, type)
1343 ),
1344
1345 TP_fast_assign(
1346 LOCAL_ASSIGN;
1347 VIF_ASSIGN;
1348 __entry->type = _event->type;
1349 ),
1350
1351 TP_printk(
1352 LOCAL_PR_FMT VIF_PR_FMT " event:%d",
1353 LOCAL_PR_ARG, VIF_PR_ARG, __entry->type
1354 )
1355);
1356
1357DECLARE_EVENT_CLASS(release_evt,
1358 TP_PROTO(struct ieee80211_local *local,
1359 struct ieee80211_sta *sta,
1360 u16 tids, int num_frames,
1361 enum ieee80211_frame_release_type reason,
1362 bool more_data),
1363
1364 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1365
1366 TP_STRUCT__entry(
1367 LOCAL_ENTRY
1368 STA_ENTRY
1369 __field(u16, tids)
1370 __field(int, num_frames)
1371 __field(int, reason)
1372 __field(bool, more_data)
1373 ),
1374
1375 TP_fast_assign(
1376 LOCAL_ASSIGN;
1377 STA_ASSIGN;
1378 __entry->tids = tids;
1379 __entry->num_frames = num_frames;
1380 __entry->reason = reason;
1381 __entry->more_data = more_data;
1382 ),
1383
1384 TP_printk(
1385 LOCAL_PR_FMT STA_PR_FMT
1386 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1387 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1388 __entry->reason, __entry->more_data
1389 )
1390);
1391
1392DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1393 TP_PROTO(struct ieee80211_local *local,
1394 struct ieee80211_sta *sta,
1395 u16 tids, int num_frames,
1396 enum ieee80211_frame_release_type reason,
1397 bool more_data),
1398
1399 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1400);
1401
1402DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1403 TP_PROTO(struct ieee80211_local *local,
1404 struct ieee80211_sta *sta,
1405 u16 tids, int num_frames,
1406 enum ieee80211_frame_release_type reason,
1407 bool more_data),
1408
1409 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1410);
1411
1412DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
1413 TP_PROTO(struct ieee80211_local *local,
1414 struct ieee80211_sub_if_data *sdata),
1415
1416 TP_ARGS(local, sdata)
1417);
1418
1419DEFINE_EVENT(local_sdata_evt, drv_mgd_protect_tdls_discover,
1420 TP_PROTO(struct ieee80211_local *local,
1421 struct ieee80211_sub_if_data *sdata),
1422
1423 TP_ARGS(local, sdata)
1424);
1425
1426DECLARE_EVENT_CLASS(local_chanctx,
1427 TP_PROTO(struct ieee80211_local *local,
1428 struct ieee80211_chanctx *ctx),
1429
1430 TP_ARGS(local, ctx),
1431
1432 TP_STRUCT__entry(
1433 LOCAL_ENTRY
1434 CHANCTX_ENTRY
1435 ),
1436
1437 TP_fast_assign(
1438 LOCAL_ASSIGN;
1439 CHANCTX_ASSIGN;
1440 ),
1441
1442 TP_printk(
1443 LOCAL_PR_FMT CHANCTX_PR_FMT,
1444 LOCAL_PR_ARG, CHANCTX_PR_ARG
1445 )
1446);
1447
1448DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1449 TP_PROTO(struct ieee80211_local *local,
1450 struct ieee80211_chanctx *ctx),
1451 TP_ARGS(local, ctx)
1452);
1453
1454DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1455 TP_PROTO(struct ieee80211_local *local,
1456 struct ieee80211_chanctx *ctx),
1457 TP_ARGS(local, ctx)
1458);
1459
1460TRACE_EVENT(drv_change_chanctx,
1461 TP_PROTO(struct ieee80211_local *local,
1462 struct ieee80211_chanctx *ctx,
1463 u32 changed),
1464
1465 TP_ARGS(local, ctx, changed),
1466
1467 TP_STRUCT__entry(
1468 LOCAL_ENTRY
1469 CHANCTX_ENTRY
1470 __field(u32, changed)
1471 ),
1472
1473 TP_fast_assign(
1474 LOCAL_ASSIGN;
1475 CHANCTX_ASSIGN;
1476 __entry->changed = changed;
1477 ),
1478
1479 TP_printk(
1480 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1481 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1482 )
1483);
1484
1485#if !defined(__TRACE_VIF_ENTRY)
1486#define __TRACE_VIF_ENTRY
1487struct trace_vif_entry {
1488 enum nl80211_iftype vif_type;
1489 bool p2p;
1490 char vif_name[IFNAMSIZ];
1491} __packed;
1492
1493struct trace_chandef_entry {
1494 u32 control_freq;
1495 u32 chan_width;
1496 u32 center_freq1;
1497 u32 center_freq2;
1498} __packed;
1499
1500struct trace_switch_entry {
1501 struct trace_vif_entry vif;
1502 struct trace_chandef_entry old_chandef;
1503 struct trace_chandef_entry new_chandef;
1504} __packed;
1505
1506#define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
1507#endif
1508
1509TRACE_EVENT(drv_switch_vif_chanctx,
1510 TP_PROTO(struct ieee80211_local *local,
1511 struct ieee80211_vif_chanctx_switch *vifs,
1512 int n_vifs, enum ieee80211_chanctx_switch_mode mode),
1513 TP_ARGS(local, vifs, n_vifs, mode),
1514
1515 TP_STRUCT__entry(
1516 LOCAL_ENTRY
1517 __field(int, n_vifs)
1518 __field(u32, mode)
1519 __dynamic_array(u8, vifs,
1520 sizeof(struct trace_switch_entry) * n_vifs)
1521 ),
1522
1523 TP_fast_assign(
1524 LOCAL_ASSIGN;
1525 __entry->n_vifs = n_vifs;
1526 __entry->mode = mode;
1527 {
1528 struct trace_switch_entry *local_vifs =
1529 __get_dynamic_array(vifs);
1530 int i;
1531
1532 for (i = 0; i < n_vifs; i++) {
1533 struct ieee80211_sub_if_data *sdata;
1534
1535 sdata = container_of(vifs[i].vif,
1536 struct ieee80211_sub_if_data,
1537 vif);
1538
1539 SWITCH_ENTRY_ASSIGN(vif.vif_type, vif->type);
1540 SWITCH_ENTRY_ASSIGN(vif.p2p, vif->p2p);
1541 strncpy(local_vifs[i].vif.vif_name,
1542 sdata->name,
1543 sizeof(local_vifs[i].vif.vif_name));
1544 SWITCH_ENTRY_ASSIGN(old_chandef.control_freq,
1545 old_ctx->def.chan->center_freq);
1546 SWITCH_ENTRY_ASSIGN(old_chandef.chan_width,
1547 old_ctx->def.width);
1548 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq1,
1549 old_ctx->def.center_freq1);
1550 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq2,
1551 old_ctx->def.center_freq2);
1552 SWITCH_ENTRY_ASSIGN(new_chandef.control_freq,
1553 new_ctx->def.chan->center_freq);
1554 SWITCH_ENTRY_ASSIGN(new_chandef.chan_width,
1555 new_ctx->def.width);
1556 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq1,
1557 new_ctx->def.center_freq1);
1558 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq2,
1559 new_ctx->def.center_freq2);
1560 }
1561 }
1562 ),
1563
1564 TP_printk(
1565 LOCAL_PR_FMT " n_vifs:%d mode:%d",
1566 LOCAL_PR_ARG, __entry->n_vifs, __entry->mode
1567 )
1568);
1569
1570DECLARE_EVENT_CLASS(local_sdata_chanctx,
1571 TP_PROTO(struct ieee80211_local *local,
1572 struct ieee80211_sub_if_data *sdata,
1573 struct ieee80211_chanctx *ctx),
1574
1575 TP_ARGS(local, sdata, ctx),
1576
1577 TP_STRUCT__entry(
1578 LOCAL_ENTRY
1579 VIF_ENTRY
1580 CHANCTX_ENTRY
1581 ),
1582
1583 TP_fast_assign(
1584 LOCAL_ASSIGN;
1585 VIF_ASSIGN;
1586 CHANCTX_ASSIGN;
1587 ),
1588
1589 TP_printk(
1590 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
1591 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
1592 )
1593);
1594
1595DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1596 TP_PROTO(struct ieee80211_local *local,
1597 struct ieee80211_sub_if_data *sdata,
1598 struct ieee80211_chanctx *ctx),
1599 TP_ARGS(local, sdata, ctx)
1600);
1601
1602DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1603 TP_PROTO(struct ieee80211_local *local,
1604 struct ieee80211_sub_if_data *sdata,
1605 struct ieee80211_chanctx *ctx),
1606 TP_ARGS(local, sdata, ctx)
1607);
1608
1609TRACE_EVENT(drv_start_ap,
1610 TP_PROTO(struct ieee80211_local *local,
1611 struct ieee80211_sub_if_data *sdata,
1612 struct ieee80211_bss_conf *info),
1613
1614 TP_ARGS(local, sdata, info),
1615
1616 TP_STRUCT__entry(
1617 LOCAL_ENTRY
1618 VIF_ENTRY
1619 __field(u8, dtimper)
1620 __field(u16, bcnint)
1621 __dynamic_array(u8, ssid, info->ssid_len);
1622 __field(bool, hidden_ssid);
1623 ),
1624
1625 TP_fast_assign(
1626 LOCAL_ASSIGN;
1627 VIF_ASSIGN;
1628 __entry->dtimper = info->dtim_period;
1629 __entry->bcnint = info->beacon_int;
1630 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1631 __entry->hidden_ssid = info->hidden_ssid;
1632 ),
1633
1634 TP_printk(
1635 LOCAL_PR_FMT VIF_PR_FMT,
1636 LOCAL_PR_ARG, VIF_PR_ARG
1637 )
1638);
1639
1640DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
1641 TP_PROTO(struct ieee80211_local *local,
1642 struct ieee80211_sub_if_data *sdata),
1643 TP_ARGS(local, sdata)
1644);
1645
1646TRACE_EVENT(drv_reconfig_complete,
1647 TP_PROTO(struct ieee80211_local *local,
1648 enum ieee80211_reconfig_type reconfig_type),
1649 TP_ARGS(local, reconfig_type),
1650
1651 TP_STRUCT__entry(
1652 LOCAL_ENTRY
1653 __field(u8, reconfig_type)
1654 ),
1655
1656 TP_fast_assign(
1657 LOCAL_ASSIGN;
1658 __entry->reconfig_type = reconfig_type;
1659 ),
1660
1661 TP_printk(
1662 LOCAL_PR_FMT " reconfig_type:%d",
1663 LOCAL_PR_ARG, __entry->reconfig_type
1664 )
1665
1666);
1667
1668#if IS_ENABLED(CONFIG_IPV6)
1669DEFINE_EVENT(local_sdata_evt, drv_ipv6_addr_change,
1670 TP_PROTO(struct ieee80211_local *local,
1671 struct ieee80211_sub_if_data *sdata),
1672 TP_ARGS(local, sdata)
1673);
1674#endif
1675
1676TRACE_EVENT(drv_join_ibss,
1677 TP_PROTO(struct ieee80211_local *local,
1678 struct ieee80211_sub_if_data *sdata,
1679 struct ieee80211_bss_conf *info),
1680
1681 TP_ARGS(local, sdata, info),
1682
1683 TP_STRUCT__entry(
1684 LOCAL_ENTRY
1685 VIF_ENTRY
1686 __field(u8, dtimper)
1687 __field(u16, bcnint)
1688 __dynamic_array(u8, ssid, info->ssid_len);
1689 ),
1690
1691 TP_fast_assign(
1692 LOCAL_ASSIGN;
1693 VIF_ASSIGN;
1694 __entry->dtimper = info->dtim_period;
1695 __entry->bcnint = info->beacon_int;
1696 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1697 ),
1698
1699 TP_printk(
1700 LOCAL_PR_FMT VIF_PR_FMT,
1701 LOCAL_PR_ARG, VIF_PR_ARG
1702 )
1703);
1704
1705DEFINE_EVENT(local_sdata_evt, drv_leave_ibss,
1706 TP_PROTO(struct ieee80211_local *local,
1707 struct ieee80211_sub_if_data *sdata),
1708 TP_ARGS(local, sdata)
1709);
1710
1711TRACE_EVENT(drv_get_expected_throughput,
1712 TP_PROTO(struct ieee80211_sta *sta),
1713
1714 TP_ARGS(sta),
1715
1716 TP_STRUCT__entry(
1717 STA_ENTRY
1718 ),
1719
1720 TP_fast_assign(
1721 STA_ASSIGN;
1722 ),
1723
1724 TP_printk(
1725 STA_PR_FMT, STA_PR_ARG
1726 )
1727);
1728
1729TRACE_EVENT(drv_start_nan,
1730 TP_PROTO(struct ieee80211_local *local,
1731 struct ieee80211_sub_if_data *sdata,
1732 struct cfg80211_nan_conf *conf),
1733
1734 TP_ARGS(local, sdata, conf),
1735 TP_STRUCT__entry(
1736 LOCAL_ENTRY
1737 VIF_ENTRY
1738 __field(u8, master_pref)
1739 __field(u8, dual)
1740 ),
1741
1742 TP_fast_assign(
1743 LOCAL_ASSIGN;
1744 VIF_ASSIGN;
1745 __entry->master_pref = conf->master_pref;
1746 __entry->dual = conf->dual;
1747 ),
1748
1749 TP_printk(
1750 LOCAL_PR_FMT VIF_PR_FMT
1751 ", master preference: %u, dual: %d",
1752 LOCAL_PR_ARG, VIF_PR_ARG, __entry->master_pref,
1753 __entry->dual
1754 )
1755);
1756
1757TRACE_EVENT(drv_stop_nan,
1758 TP_PROTO(struct ieee80211_local *local,
1759 struct ieee80211_sub_if_data *sdata),
1760
1761 TP_ARGS(local, sdata),
1762
1763 TP_STRUCT__entry(
1764 LOCAL_ENTRY
1765 VIF_ENTRY
1766 ),
1767
1768 TP_fast_assign(
1769 LOCAL_ASSIGN;
1770 VIF_ASSIGN;
1771 ),
1772
1773 TP_printk(
1774 LOCAL_PR_FMT VIF_PR_FMT,
1775 LOCAL_PR_ARG, VIF_PR_ARG
1776 )
1777);
1778
1779TRACE_EVENT(drv_nan_change_conf,
1780 TP_PROTO(struct ieee80211_local *local,
1781 struct ieee80211_sub_if_data *sdata,
1782 struct cfg80211_nan_conf *conf,
1783 u32 changes),
1784
1785 TP_ARGS(local, sdata, conf, changes),
1786 TP_STRUCT__entry(
1787 LOCAL_ENTRY
1788 VIF_ENTRY
1789 __field(u8, master_pref)
1790 __field(u8, dual)
1791 __field(u32, changes)
1792 ),
1793
1794 TP_fast_assign(
1795 LOCAL_ASSIGN;
1796 VIF_ASSIGN;
1797 __entry->master_pref = conf->master_pref;
1798 __entry->dual = conf->dual;
1799 __entry->changes = changes;
1800 ),
1801
1802 TP_printk(
1803 LOCAL_PR_FMT VIF_PR_FMT
1804 ", master preference: %u, dual: %d, changes: 0x%x",
1805 LOCAL_PR_ARG, VIF_PR_ARG, __entry->master_pref,
1806 __entry->dual, __entry->changes
1807 )
1808);
1809
1810TRACE_EVENT(drv_add_nan_func,
1811 TP_PROTO(struct ieee80211_local *local,
1812 struct ieee80211_sub_if_data *sdata,
1813 const struct cfg80211_nan_func *func),
1814
1815 TP_ARGS(local, sdata, func),
1816 TP_STRUCT__entry(
1817 LOCAL_ENTRY
1818 VIF_ENTRY
1819 __field(u8, type)
1820 __field(u8, inst_id)
1821 ),
1822
1823 TP_fast_assign(
1824 LOCAL_ASSIGN;
1825 VIF_ASSIGN;
1826 __entry->type = func->type;
1827 __entry->inst_id = func->instance_id;
1828 ),
1829
1830 TP_printk(
1831 LOCAL_PR_FMT VIF_PR_FMT
1832 ", type: %u, inst_id: %u",
1833 LOCAL_PR_ARG, VIF_PR_ARG, __entry->type, __entry->inst_id
1834 )
1835);
1836
1837TRACE_EVENT(drv_del_nan_func,
1838 TP_PROTO(struct ieee80211_local *local,
1839 struct ieee80211_sub_if_data *sdata,
1840 u8 instance_id),
1841
1842 TP_ARGS(local, sdata, instance_id),
1843 TP_STRUCT__entry(
1844 LOCAL_ENTRY
1845 VIF_ENTRY
1846 __field(u8, instance_id)
1847 ),
1848
1849 TP_fast_assign(
1850 LOCAL_ASSIGN;
1851 VIF_ASSIGN;
1852 __entry->instance_id = instance_id;
1853 ),
1854
1855 TP_printk(
1856 LOCAL_PR_FMT VIF_PR_FMT
1857 ", instance_id: %u",
1858 LOCAL_PR_ARG, VIF_PR_ARG, __entry->instance_id
1859 )
1860);
1861
1862/*
1863 * Tracing for API calls that drivers call.
1864 */
1865
1866TRACE_EVENT(api_start_tx_ba_session,
1867 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1868
1869 TP_ARGS(sta, tid),
1870
1871 TP_STRUCT__entry(
1872 STA_ENTRY
1873 __field(u16, tid)
1874 ),
1875
1876 TP_fast_assign(
1877 STA_ASSIGN;
1878 __entry->tid = tid;
1879 ),
1880
1881 TP_printk(
1882 STA_PR_FMT " tid:%d",
1883 STA_PR_ARG, __entry->tid
1884 )
1885);
1886
1887TRACE_EVENT(api_start_tx_ba_cb,
1888 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1889
1890 TP_ARGS(sdata, ra, tid),
1891
1892 TP_STRUCT__entry(
1893 VIF_ENTRY
1894 __array(u8, ra, ETH_ALEN)
1895 __field(u16, tid)
1896 ),
1897
1898 TP_fast_assign(
1899 VIF_ASSIGN;
1900 memcpy(__entry->ra, ra, ETH_ALEN);
1901 __entry->tid = tid;
1902 ),
1903
1904 TP_printk(
1905 VIF_PR_FMT " ra:%pM tid:%d",
1906 VIF_PR_ARG, __entry->ra, __entry->tid
1907 )
1908);
1909
1910TRACE_EVENT(api_stop_tx_ba_session,
1911 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1912
1913 TP_ARGS(sta, tid),
1914
1915 TP_STRUCT__entry(
1916 STA_ENTRY
1917 __field(u16, tid)
1918 ),
1919
1920 TP_fast_assign(
1921 STA_ASSIGN;
1922 __entry->tid = tid;
1923 ),
1924
1925 TP_printk(
1926 STA_PR_FMT " tid:%d",
1927 STA_PR_ARG, __entry->tid
1928 )
1929);
1930
1931TRACE_EVENT(api_stop_tx_ba_cb,
1932 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1933
1934 TP_ARGS(sdata, ra, tid),
1935
1936 TP_STRUCT__entry(
1937 VIF_ENTRY
1938 __array(u8, ra, ETH_ALEN)
1939 __field(u16, tid)
1940 ),
1941
1942 TP_fast_assign(
1943 VIF_ASSIGN;
1944 memcpy(__entry->ra, ra, ETH_ALEN);
1945 __entry->tid = tid;
1946 ),
1947
1948 TP_printk(
1949 VIF_PR_FMT " ra:%pM tid:%d",
1950 VIF_PR_ARG, __entry->ra, __entry->tid
1951 )
1952);
1953
1954DEFINE_EVENT(local_only_evt, api_restart_hw,
1955 TP_PROTO(struct ieee80211_local *local),
1956 TP_ARGS(local)
1957);
1958
1959TRACE_EVENT(api_beacon_loss,
1960 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1961
1962 TP_ARGS(sdata),
1963
1964 TP_STRUCT__entry(
1965 VIF_ENTRY
1966 ),
1967
1968 TP_fast_assign(
1969 VIF_ASSIGN;
1970 ),
1971
1972 TP_printk(
1973 VIF_PR_FMT,
1974 VIF_PR_ARG
1975 )
1976);
1977
1978TRACE_EVENT(api_connection_loss,
1979 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1980
1981 TP_ARGS(sdata),
1982
1983 TP_STRUCT__entry(
1984 VIF_ENTRY
1985 ),
1986
1987 TP_fast_assign(
1988 VIF_ASSIGN;
1989 ),
1990
1991 TP_printk(
1992 VIF_PR_FMT,
1993 VIF_PR_ARG
1994 )
1995);
1996
1997TRACE_EVENT(api_cqm_rssi_notify,
1998 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1999 enum nl80211_cqm_rssi_threshold_event rssi_event),
2000
2001 TP_ARGS(sdata, rssi_event),
2002
2003 TP_STRUCT__entry(
2004 VIF_ENTRY
2005 __field(u32, rssi_event)
2006 ),
2007
2008 TP_fast_assign(
2009 VIF_ASSIGN;
2010 __entry->rssi_event = rssi_event;
2011 ),
2012
2013 TP_printk(
2014 VIF_PR_FMT " event:%d",
2015 VIF_PR_ARG, __entry->rssi_event
2016 )
2017);
2018
2019DEFINE_EVENT(local_sdata_evt, api_cqm_beacon_loss_notify,
2020 TP_PROTO(struct ieee80211_local *local,
2021 struct ieee80211_sub_if_data *sdata),
2022 TP_ARGS(local, sdata)
2023);
2024
2025TRACE_EVENT(api_scan_completed,
2026 TP_PROTO(struct ieee80211_local *local, bool aborted),
2027
2028 TP_ARGS(local, aborted),
2029
2030 TP_STRUCT__entry(
2031 LOCAL_ENTRY
2032 __field(bool, aborted)
2033 ),
2034
2035 TP_fast_assign(
2036 LOCAL_ASSIGN;
2037 __entry->aborted = aborted;
2038 ),
2039
2040 TP_printk(
2041 LOCAL_PR_FMT " aborted:%d",
2042 LOCAL_PR_ARG, __entry->aborted
2043 )
2044);
2045
2046TRACE_EVENT(api_sched_scan_results,
2047 TP_PROTO(struct ieee80211_local *local),
2048
2049 TP_ARGS(local),
2050
2051 TP_STRUCT__entry(
2052 LOCAL_ENTRY
2053 ),
2054
2055 TP_fast_assign(
2056 LOCAL_ASSIGN;
2057 ),
2058
2059 TP_printk(
2060 LOCAL_PR_FMT, LOCAL_PR_ARG
2061 )
2062);
2063
2064TRACE_EVENT(api_sched_scan_stopped,
2065 TP_PROTO(struct ieee80211_local *local),
2066
2067 TP_ARGS(local),
2068
2069 TP_STRUCT__entry(
2070 LOCAL_ENTRY
2071 ),
2072
2073 TP_fast_assign(
2074 LOCAL_ASSIGN;
2075 ),
2076
2077 TP_printk(
2078 LOCAL_PR_FMT, LOCAL_PR_ARG
2079 )
2080);
2081
2082TRACE_EVENT(api_sta_block_awake,
2083 TP_PROTO(struct ieee80211_local *local,
2084 struct ieee80211_sta *sta, bool block),
2085
2086 TP_ARGS(local, sta, block),
2087
2088 TP_STRUCT__entry(
2089 LOCAL_ENTRY
2090 STA_ENTRY
2091 __field(bool, block)
2092 ),
2093
2094 TP_fast_assign(
2095 LOCAL_ASSIGN;
2096 STA_ASSIGN;
2097 __entry->block = block;
2098 ),
2099
2100 TP_printk(
2101 LOCAL_PR_FMT STA_PR_FMT " block:%d",
2102 LOCAL_PR_ARG, STA_PR_ARG, __entry->block
2103 )
2104);
2105
2106TRACE_EVENT(api_chswitch_done,
2107 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
2108
2109 TP_ARGS(sdata, success),
2110
2111 TP_STRUCT__entry(
2112 VIF_ENTRY
2113 __field(bool, success)
2114 ),
2115
2116 TP_fast_assign(
2117 VIF_ASSIGN;
2118 __entry->success = success;
2119 ),
2120
2121 TP_printk(
2122 VIF_PR_FMT " success=%d",
2123 VIF_PR_ARG, __entry->success
2124 )
2125);
2126
2127DEFINE_EVENT(local_only_evt, api_ready_on_channel,
2128 TP_PROTO(struct ieee80211_local *local),
2129 TP_ARGS(local)
2130);
2131
2132DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
2133 TP_PROTO(struct ieee80211_local *local),
2134 TP_ARGS(local)
2135);
2136
2137TRACE_EVENT(api_gtk_rekey_notify,
2138 TP_PROTO(struct ieee80211_sub_if_data *sdata,
2139 const u8 *bssid, const u8 *replay_ctr),
2140
2141 TP_ARGS(sdata, bssid, replay_ctr),
2142
2143 TP_STRUCT__entry(
2144 VIF_ENTRY
2145 __array(u8, bssid, ETH_ALEN)
2146 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
2147 ),
2148
2149 TP_fast_assign(
2150 VIF_ASSIGN;
2151 memcpy(__entry->bssid, bssid, ETH_ALEN);
2152 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
2153 ),
2154
2155 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
2156);
2157
2158TRACE_EVENT(api_enable_rssi_reports,
2159 TP_PROTO(struct ieee80211_sub_if_data *sdata,
2160 int rssi_min_thold, int rssi_max_thold),
2161
2162 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
2163
2164 TP_STRUCT__entry(
2165 VIF_ENTRY
2166 __field(int, rssi_min_thold)
2167 __field(int, rssi_max_thold)
2168 ),
2169
2170 TP_fast_assign(
2171 VIF_ASSIGN;
2172 __entry->rssi_min_thold = rssi_min_thold;
2173 __entry->rssi_max_thold = rssi_max_thold;
2174 ),
2175
2176 TP_printk(
2177 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
2178 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
2179 )
2180);
2181
2182TRACE_EVENT(api_eosp,
2183 TP_PROTO(struct ieee80211_local *local,
2184 struct ieee80211_sta *sta),
2185
2186 TP_ARGS(local, sta),
2187
2188 TP_STRUCT__entry(
2189 LOCAL_ENTRY
2190 STA_ENTRY
2191 ),
2192
2193 TP_fast_assign(
2194 LOCAL_ASSIGN;
2195 STA_ASSIGN;
2196 ),
2197
2198 TP_printk(
2199 LOCAL_PR_FMT STA_PR_FMT,
2200 LOCAL_PR_ARG, STA_PR_ARG
2201 )
2202);
2203
2204TRACE_EVENT(api_send_eosp_nullfunc,
2205 TP_PROTO(struct ieee80211_local *local,
2206 struct ieee80211_sta *sta,
2207 u8 tid),
2208
2209 TP_ARGS(local, sta, tid),
2210
2211 TP_STRUCT__entry(
2212 LOCAL_ENTRY
2213 STA_ENTRY
2214 __field(u8, tid)
2215 ),
2216
2217 TP_fast_assign(
2218 LOCAL_ASSIGN;
2219 STA_ASSIGN;
2220 __entry->tid = tid;
2221 ),
2222
2223 TP_printk(
2224 LOCAL_PR_FMT STA_PR_FMT " tid:%d",
2225 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid
2226 )
2227);
2228
2229TRACE_EVENT(api_sta_set_buffered,
2230 TP_PROTO(struct ieee80211_local *local,
2231 struct ieee80211_sta *sta,
2232 u8 tid, bool buffered),
2233
2234 TP_ARGS(local, sta, tid, buffered),
2235
2236 TP_STRUCT__entry(
2237 LOCAL_ENTRY
2238 STA_ENTRY
2239 __field(u8, tid)
2240 __field(bool, buffered)
2241 ),
2242
2243 TP_fast_assign(
2244 LOCAL_ASSIGN;
2245 STA_ASSIGN;
2246 __entry->tid = tid;
2247 __entry->buffered = buffered;
2248 ),
2249
2250 TP_printk(
2251 LOCAL_PR_FMT STA_PR_FMT " tid:%d buffered:%d",
2252 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid, __entry->buffered
2253 )
2254);
2255
2256/*
2257 * Tracing for internal functions
2258 * (which may also be called in response to driver calls)
2259 */
2260
2261TRACE_EVENT(wake_queue,
2262 TP_PROTO(struct ieee80211_local *local, u16 queue,
2263 enum queue_stop_reason reason),
2264
2265 TP_ARGS(local, queue, reason),
2266
2267 TP_STRUCT__entry(
2268 LOCAL_ENTRY
2269 __field(u16, queue)
2270 __field(u32, reason)
2271 ),
2272
2273 TP_fast_assign(
2274 LOCAL_ASSIGN;
2275 __entry->queue = queue;
2276 __entry->reason = reason;
2277 ),
2278
2279 TP_printk(
2280 LOCAL_PR_FMT " queue:%d, reason:%d",
2281 LOCAL_PR_ARG, __entry->queue, __entry->reason
2282 )
2283);
2284
2285TRACE_EVENT(stop_queue,
2286 TP_PROTO(struct ieee80211_local *local, u16 queue,
2287 enum queue_stop_reason reason),
2288
2289 TP_ARGS(local, queue, reason),
2290
2291 TP_STRUCT__entry(
2292 LOCAL_ENTRY
2293 __field(u16, queue)
2294 __field(u32, reason)
2295 ),
2296
2297 TP_fast_assign(
2298 LOCAL_ASSIGN;
2299 __entry->queue = queue;
2300 __entry->reason = reason;
2301 ),
2302
2303 TP_printk(
2304 LOCAL_PR_FMT " queue:%d, reason:%d",
2305 LOCAL_PR_ARG, __entry->queue, __entry->reason
2306 )
2307);
2308
2309TRACE_EVENT(drv_set_default_unicast_key,
2310 TP_PROTO(struct ieee80211_local *local,
2311 struct ieee80211_sub_if_data *sdata,
2312 int key_idx),
2313
2314 TP_ARGS(local, sdata, key_idx),
2315
2316 TP_STRUCT__entry(
2317 LOCAL_ENTRY
2318 VIF_ENTRY
2319 __field(int, key_idx)
2320 ),
2321
2322 TP_fast_assign(
2323 LOCAL_ASSIGN;
2324 VIF_ASSIGN;
2325 __entry->key_idx = key_idx;
2326 ),
2327
2328 TP_printk(LOCAL_PR_FMT VIF_PR_FMT " key_idx:%d",
2329 LOCAL_PR_ARG, VIF_PR_ARG, __entry->key_idx)
2330);
2331
2332TRACE_EVENT(api_radar_detected,
2333 TP_PROTO(struct ieee80211_local *local),
2334
2335 TP_ARGS(local),
2336
2337 TP_STRUCT__entry(
2338 LOCAL_ENTRY
2339 ),
2340
2341 TP_fast_assign(
2342 LOCAL_ASSIGN;
2343 ),
2344
2345 TP_printk(
2346 LOCAL_PR_FMT " radar detected",
2347 LOCAL_PR_ARG
2348 )
2349);
2350
2351TRACE_EVENT(drv_channel_switch_beacon,
2352 TP_PROTO(struct ieee80211_local *local,
2353 struct ieee80211_sub_if_data *sdata,
2354 struct cfg80211_chan_def *chandef),
2355
2356 TP_ARGS(local, sdata, chandef),
2357
2358 TP_STRUCT__entry(
2359 LOCAL_ENTRY
2360 VIF_ENTRY
2361 CHANDEF_ENTRY
2362 ),
2363
2364 TP_fast_assign(
2365 LOCAL_ASSIGN;
2366 VIF_ASSIGN;
2367 CHANDEF_ASSIGN(chandef);
2368 ),
2369
2370 TP_printk(
2371 LOCAL_PR_FMT VIF_PR_FMT " channel switch to " CHANDEF_PR_FMT,
2372 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG
2373 )
2374);
2375
2376TRACE_EVENT(drv_pre_channel_switch,
2377 TP_PROTO(struct ieee80211_local *local,
2378 struct ieee80211_sub_if_data *sdata,
2379 struct ieee80211_channel_switch *ch_switch),
2380
2381 TP_ARGS(local, sdata, ch_switch),
2382
2383 TP_STRUCT__entry(
2384 LOCAL_ENTRY
2385 VIF_ENTRY
2386 CHANDEF_ENTRY
2387 __field(u64, timestamp)
2388 __field(u32, device_timestamp)
2389 __field(bool, block_tx)
2390 __field(u8, count)
2391 ),
2392
2393 TP_fast_assign(
2394 LOCAL_ASSIGN;
2395 VIF_ASSIGN;
2396 CHANDEF_ASSIGN(&ch_switch->chandef)
2397 __entry->timestamp = ch_switch->timestamp;
2398 __entry->device_timestamp = ch_switch->device_timestamp;
2399 __entry->block_tx = ch_switch->block_tx;
2400 __entry->count = ch_switch->count;
2401 ),
2402
2403 TP_printk(
2404 LOCAL_PR_FMT VIF_PR_FMT " prepare channel switch to "
2405 CHANDEF_PR_FMT " count:%d block_tx:%d timestamp:%llu",
2406 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count,
2407 __entry->block_tx, __entry->timestamp
2408 )
2409);
2410
2411DEFINE_EVENT(local_sdata_evt, drv_post_channel_switch,
2412 TP_PROTO(struct ieee80211_local *local,
2413 struct ieee80211_sub_if_data *sdata),
2414 TP_ARGS(local, sdata)
2415);
2416
2417TRACE_EVENT(drv_get_txpower,
2418 TP_PROTO(struct ieee80211_local *local,
2419 struct ieee80211_sub_if_data *sdata,
2420 int dbm, int ret),
2421
2422 TP_ARGS(local, sdata, dbm, ret),
2423
2424 TP_STRUCT__entry(
2425 LOCAL_ENTRY
2426 VIF_ENTRY
2427 __field(int, dbm)
2428 __field(int, ret)
2429 ),
2430
2431 TP_fast_assign(
2432 LOCAL_ASSIGN;
2433 VIF_ASSIGN;
2434 __entry->dbm = dbm;
2435 __entry->ret = ret;
2436 ),
2437
2438 TP_printk(
2439 LOCAL_PR_FMT VIF_PR_FMT " dbm:%d ret:%d",
2440 LOCAL_PR_ARG, VIF_PR_ARG, __entry->dbm, __entry->ret
2441 )
2442);
2443
2444TRACE_EVENT(drv_tdls_channel_switch,
2445 TP_PROTO(struct ieee80211_local *local,
2446 struct ieee80211_sub_if_data *sdata,
2447 struct ieee80211_sta *sta, u8 oper_class,
2448 struct cfg80211_chan_def *chandef),
2449
2450 TP_ARGS(local, sdata, sta, oper_class, chandef),
2451
2452 TP_STRUCT__entry(
2453 LOCAL_ENTRY
2454 VIF_ENTRY
2455 STA_ENTRY
2456 __field(u8, oper_class)
2457 CHANDEF_ENTRY
2458 ),
2459
2460 TP_fast_assign(
2461 LOCAL_ASSIGN;
2462 VIF_ASSIGN;
2463 STA_ASSIGN;
2464 __entry->oper_class = oper_class;
2465 CHANDEF_ASSIGN(chandef)
2466 ),
2467
2468 TP_printk(
2469 LOCAL_PR_FMT VIF_PR_FMT " tdls channel switch to"
2470 CHANDEF_PR_FMT " oper_class:%d " STA_PR_FMT,
2471 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->oper_class,
2472 STA_PR_ARG
2473 )
2474);
2475
2476TRACE_EVENT(drv_tdls_cancel_channel_switch,
2477 TP_PROTO(struct ieee80211_local *local,
2478 struct ieee80211_sub_if_data *sdata,
2479 struct ieee80211_sta *sta),
2480
2481 TP_ARGS(local, sdata, sta),
2482
2483 TP_STRUCT__entry(
2484 LOCAL_ENTRY
2485 VIF_ENTRY
2486 STA_ENTRY
2487 ),
2488
2489 TP_fast_assign(
2490 LOCAL_ASSIGN;
2491 VIF_ASSIGN;
2492 STA_ASSIGN;
2493 ),
2494
2495 TP_printk(
2496 LOCAL_PR_FMT VIF_PR_FMT
2497 " tdls cancel channel switch with " STA_PR_FMT,
2498 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
2499 )
2500);
2501
2502TRACE_EVENT(drv_tdls_recv_channel_switch,
2503 TP_PROTO(struct ieee80211_local *local,
2504 struct ieee80211_sub_if_data *sdata,
2505 struct ieee80211_tdls_ch_sw_params *params),
2506
2507 TP_ARGS(local, sdata, params),
2508
2509 TP_STRUCT__entry(
2510 LOCAL_ENTRY
2511 VIF_ENTRY
2512 __field(u8, action_code)
2513 STA_ENTRY
2514 CHANDEF_ENTRY
2515 __field(u32, status)
2516 __field(bool, peer_initiator)
2517 __field(u32, timestamp)
2518 __field(u16, switch_time)
2519 __field(u16, switch_timeout)
2520 ),
2521
2522 TP_fast_assign(
2523 LOCAL_ASSIGN;
2524 VIF_ASSIGN;
2525 STA_NAMED_ASSIGN(params->sta);
2526 CHANDEF_ASSIGN(params->chandef)
2527 __entry->peer_initiator = params->sta->tdls_initiator;
2528 __entry->action_code = params->action_code;
2529 __entry->status = params->status;
2530 __entry->timestamp = params->timestamp;
2531 __entry->switch_time = params->switch_time;
2532 __entry->switch_timeout = params->switch_timeout;
2533 ),
2534
2535 TP_printk(
2536 LOCAL_PR_FMT VIF_PR_FMT " received tdls channel switch packet"
2537 " action:%d status:%d time:%d switch time:%d switch"
2538 " timeout:%d initiator: %d chan:" CHANDEF_PR_FMT STA_PR_FMT,
2539 LOCAL_PR_ARG, VIF_PR_ARG, __entry->action_code, __entry->status,
2540 __entry->timestamp, __entry->switch_time,
2541 __entry->switch_timeout, __entry->peer_initiator,
2542 CHANDEF_PR_ARG, STA_PR_ARG
2543 )
2544);
2545
2546TRACE_EVENT(drv_wake_tx_queue,
2547 TP_PROTO(struct ieee80211_local *local,
2548 struct ieee80211_sub_if_data *sdata,
2549 struct txq_info *txq),
2550
2551 TP_ARGS(local, sdata, txq),
2552
2553 TP_STRUCT__entry(
2554 LOCAL_ENTRY
2555 VIF_ENTRY
2556 STA_ENTRY
2557 __field(u8, ac)
2558 __field(u8, tid)
2559 ),
2560
2561 TP_fast_assign(
2562 struct ieee80211_sta *sta = txq->txq.sta;
2563
2564 LOCAL_ASSIGN;
2565 VIF_ASSIGN;
2566 STA_ASSIGN;
2567 __entry->ac = txq->txq.ac;
2568 __entry->tid = txq->txq.tid;
2569 ),
2570
2571 TP_printk(
2572 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ac:%d tid:%d",
2573 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ac, __entry->tid
2574 )
2575);
2576
2577#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
2578
2579#undef TRACE_INCLUDE_PATH
2580#define TRACE_INCLUDE_PATH .
2581#undef TRACE_INCLUDE_FILE
2582#define TRACE_INCLUDE_FILE trace
2583#include <trace/define_trace.h>
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_NAMED_ASSIGN(s) memcpy(__entry->sta_addr, (s)->addr, ETH_ALEN)
20#define STA_PR_FMT " sta:%pM"
21#define STA_PR_ARG __entry->sta_addr
22
23#define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
24 __field(bool, p2p) \
25 __string(vif_name, sdata->name)
26#define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
27 __entry->p2p = sdata->vif.p2p; \
28 __assign_str(vif_name, sdata->name)
29#define VIF_PR_FMT " vif:%s(%d%s)"
30#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
31
32#define CHANDEF_ENTRY __field(u32, control_freq) \
33 __field(u32, chan_width) \
34 __field(u32, center_freq1) \
35 __field(u32, center_freq2)
36#define CHANDEF_ASSIGN(c) \
37 __entry->control_freq = (c) ? ((c)->chan ? (c)->chan->center_freq : 0) : 0; \
38 __entry->chan_width = (c) ? (c)->width : 0; \
39 __entry->center_freq1 = (c) ? (c)->center_freq1 : 0; \
40 __entry->center_freq2 = (c) ? (c)->center_freq2 : 0;
41#define CHANDEF_PR_FMT " control:%d MHz width:%d center: %d/%d MHz"
42#define CHANDEF_PR_ARG __entry->control_freq, __entry->chan_width, \
43 __entry->center_freq1, __entry->center_freq2
44
45#define MIN_CHANDEF_ENTRY \
46 __field(u32, min_control_freq) \
47 __field(u32, min_chan_width) \
48 __field(u32, min_center_freq1) \
49 __field(u32, min_center_freq2)
50
51#define MIN_CHANDEF_ASSIGN(c) \
52 __entry->min_control_freq = (c)->chan ? (c)->chan->center_freq : 0; \
53 __entry->min_chan_width = (c)->width; \
54 __entry->min_center_freq1 = (c)->center_freq1; \
55 __entry->min_center_freq2 = (c)->center_freq2;
56#define MIN_CHANDEF_PR_FMT " min_control:%d MHz min_width:%d min_center: %d/%d MHz"
57#define MIN_CHANDEF_PR_ARG __entry->min_control_freq, __entry->min_chan_width, \
58 __entry->min_center_freq1, __entry->min_center_freq2
59
60#define CHANCTX_ENTRY CHANDEF_ENTRY \
61 MIN_CHANDEF_ENTRY \
62 __field(u8, rx_chains_static) \
63 __field(u8, rx_chains_dynamic)
64#define CHANCTX_ASSIGN CHANDEF_ASSIGN(&ctx->conf.def) \
65 MIN_CHANDEF_ASSIGN(&ctx->conf.min_def) \
66 __entry->rx_chains_static = ctx->conf.rx_chains_static; \
67 __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic
68#define CHANCTX_PR_FMT CHANDEF_PR_FMT MIN_CHANDEF_PR_FMT " chains:%d/%d"
69#define CHANCTX_PR_ARG CHANDEF_PR_ARG, MIN_CHANDEF_PR_ARG, \
70 __entry->rx_chains_static, __entry->rx_chains_dynamic
71
72#define KEY_ENTRY __field(u32, cipher) \
73 __field(u8, hw_key_idx) \
74 __field(u8, flags) \
75 __field(s8, keyidx)
76#define KEY_ASSIGN(k) __entry->cipher = (k)->cipher; \
77 __entry->flags = (k)->flags; \
78 __entry->keyidx = (k)->keyidx; \
79 __entry->hw_key_idx = (k)->hw_key_idx;
80#define KEY_PR_FMT " cipher:0x%x, flags=%#x, keyidx=%d, hw_key_idx=%d"
81#define KEY_PR_ARG __entry->cipher, __entry->flags, __entry->keyidx, __entry->hw_key_idx
82
83#define AMPDU_ACTION_ENTRY __field(enum ieee80211_ampdu_mlme_action, \
84 ieee80211_ampdu_mlme_action) \
85 STA_ENTRY \
86 __field(u16, tid) \
87 __field(u16, ssn) \
88 __field(u8, buf_size) \
89 __field(bool, amsdu) \
90 __field(u16, timeout)
91#define AMPDU_ACTION_ASSIGN STA_NAMED_ASSIGN(params->sta); \
92 __entry->tid = params->tid; \
93 __entry->ssn = params->ssn; \
94 __entry->buf_size = params->buf_size; \
95 __entry->amsdu = params->amsdu; \
96 __entry->timeout = params->timeout;
97#define AMPDU_ACTION_PR_FMT STA_PR_FMT " tid %d, ssn %d, buf_size %u, amsdu %d, timeout %d"
98#define AMPDU_ACTION_PR_ARG STA_PR_ARG, __entry->tid, __entry->ssn, \
99 __entry->buf_size, __entry->amsdu, __entry->timeout
100
101/*
102 * Tracing for driver callbacks.
103 */
104
105DECLARE_EVENT_CLASS(local_only_evt,
106 TP_PROTO(struct ieee80211_local *local),
107 TP_ARGS(local),
108 TP_STRUCT__entry(
109 LOCAL_ENTRY
110 ),
111 TP_fast_assign(
112 LOCAL_ASSIGN;
113 ),
114 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
115);
116
117DECLARE_EVENT_CLASS(local_sdata_addr_evt,
118 TP_PROTO(struct ieee80211_local *local,
119 struct ieee80211_sub_if_data *sdata),
120 TP_ARGS(local, sdata),
121
122 TP_STRUCT__entry(
123 LOCAL_ENTRY
124 VIF_ENTRY
125 __array(char, addr, ETH_ALEN)
126 ),
127
128 TP_fast_assign(
129 LOCAL_ASSIGN;
130 VIF_ASSIGN;
131 memcpy(__entry->addr, sdata->vif.addr, ETH_ALEN);
132 ),
133
134 TP_printk(
135 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
136 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
137 )
138);
139
140DECLARE_EVENT_CLASS(local_u32_evt,
141 TP_PROTO(struct ieee80211_local *local, u32 value),
142 TP_ARGS(local, value),
143
144 TP_STRUCT__entry(
145 LOCAL_ENTRY
146 __field(u32, value)
147 ),
148
149 TP_fast_assign(
150 LOCAL_ASSIGN;
151 __entry->value = value;
152 ),
153
154 TP_printk(
155 LOCAL_PR_FMT " value:%d",
156 LOCAL_PR_ARG, __entry->value
157 )
158);
159
160DECLARE_EVENT_CLASS(local_sdata_evt,
161 TP_PROTO(struct ieee80211_local *local,
162 struct ieee80211_sub_if_data *sdata),
163 TP_ARGS(local, sdata),
164
165 TP_STRUCT__entry(
166 LOCAL_ENTRY
167 VIF_ENTRY
168 ),
169
170 TP_fast_assign(
171 LOCAL_ASSIGN;
172 VIF_ASSIGN;
173 ),
174
175 TP_printk(
176 LOCAL_PR_FMT VIF_PR_FMT,
177 LOCAL_PR_ARG, VIF_PR_ARG
178 )
179);
180
181DEFINE_EVENT(local_only_evt, drv_return_void,
182 TP_PROTO(struct ieee80211_local *local),
183 TP_ARGS(local)
184);
185
186TRACE_EVENT(drv_return_int,
187 TP_PROTO(struct ieee80211_local *local, int ret),
188 TP_ARGS(local, ret),
189 TP_STRUCT__entry(
190 LOCAL_ENTRY
191 __field(int, ret)
192 ),
193 TP_fast_assign(
194 LOCAL_ASSIGN;
195 __entry->ret = ret;
196 ),
197 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
198);
199
200TRACE_EVENT(drv_return_bool,
201 TP_PROTO(struct ieee80211_local *local, bool ret),
202 TP_ARGS(local, ret),
203 TP_STRUCT__entry(
204 LOCAL_ENTRY
205 __field(bool, ret)
206 ),
207 TP_fast_assign(
208 LOCAL_ASSIGN;
209 __entry->ret = ret;
210 ),
211 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
212 "true" : "false")
213);
214
215TRACE_EVENT(drv_return_u32,
216 TP_PROTO(struct ieee80211_local *local, u32 ret),
217 TP_ARGS(local, ret),
218 TP_STRUCT__entry(
219 LOCAL_ENTRY
220 __field(u32, ret)
221 ),
222 TP_fast_assign(
223 LOCAL_ASSIGN;
224 __entry->ret = ret;
225 ),
226 TP_printk(LOCAL_PR_FMT " - %u", LOCAL_PR_ARG, __entry->ret)
227);
228
229TRACE_EVENT(drv_return_u64,
230 TP_PROTO(struct ieee80211_local *local, u64 ret),
231 TP_ARGS(local, ret),
232 TP_STRUCT__entry(
233 LOCAL_ENTRY
234 __field(u64, ret)
235 ),
236 TP_fast_assign(
237 LOCAL_ASSIGN;
238 __entry->ret = ret;
239 ),
240 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
241);
242
243DEFINE_EVENT(local_only_evt, drv_start,
244 TP_PROTO(struct ieee80211_local *local),
245 TP_ARGS(local)
246);
247
248DEFINE_EVENT(local_u32_evt, drv_get_et_strings,
249 TP_PROTO(struct ieee80211_local *local, u32 sset),
250 TP_ARGS(local, sset)
251);
252
253DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count,
254 TP_PROTO(struct ieee80211_local *local, u32 sset),
255 TP_ARGS(local, sset)
256);
257
258DEFINE_EVENT(local_only_evt, drv_get_et_stats,
259 TP_PROTO(struct ieee80211_local *local),
260 TP_ARGS(local)
261);
262
263DEFINE_EVENT(local_only_evt, drv_suspend,
264 TP_PROTO(struct ieee80211_local *local),
265 TP_ARGS(local)
266);
267
268DEFINE_EVENT(local_only_evt, drv_resume,
269 TP_PROTO(struct ieee80211_local *local),
270 TP_ARGS(local)
271);
272
273TRACE_EVENT(drv_set_wakeup,
274 TP_PROTO(struct ieee80211_local *local, bool enabled),
275 TP_ARGS(local, enabled),
276 TP_STRUCT__entry(
277 LOCAL_ENTRY
278 __field(bool, enabled)
279 ),
280 TP_fast_assign(
281 LOCAL_ASSIGN;
282 __entry->enabled = enabled;
283 ),
284 TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
285);
286
287DEFINE_EVENT(local_only_evt, drv_stop,
288 TP_PROTO(struct ieee80211_local *local),
289 TP_ARGS(local)
290);
291
292DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
293 TP_PROTO(struct ieee80211_local *local,
294 struct ieee80211_sub_if_data *sdata),
295 TP_ARGS(local, sdata)
296);
297
298TRACE_EVENT(drv_change_interface,
299 TP_PROTO(struct ieee80211_local *local,
300 struct ieee80211_sub_if_data *sdata,
301 enum nl80211_iftype type, bool p2p),
302
303 TP_ARGS(local, sdata, type, p2p),
304
305 TP_STRUCT__entry(
306 LOCAL_ENTRY
307 VIF_ENTRY
308 __field(u32, new_type)
309 __field(bool, new_p2p)
310 ),
311
312 TP_fast_assign(
313 LOCAL_ASSIGN;
314 VIF_ASSIGN;
315 __entry->new_type = type;
316 __entry->new_p2p = p2p;
317 ),
318
319 TP_printk(
320 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
321 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
322 __entry->new_p2p ? "/p2p" : ""
323 )
324);
325
326DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
327 TP_PROTO(struct ieee80211_local *local,
328 struct ieee80211_sub_if_data *sdata),
329 TP_ARGS(local, sdata)
330);
331
332TRACE_EVENT(drv_config,
333 TP_PROTO(struct ieee80211_local *local,
334 u32 changed),
335
336 TP_ARGS(local, changed),
337
338 TP_STRUCT__entry(
339 LOCAL_ENTRY
340 __field(u32, changed)
341 __field(u32, flags)
342 __field(int, power_level)
343 __field(int, dynamic_ps_timeout)
344 __field(u16, listen_interval)
345 __field(u8, long_frame_max_tx_count)
346 __field(u8, short_frame_max_tx_count)
347 CHANDEF_ENTRY
348 __field(int, smps)
349 ),
350
351 TP_fast_assign(
352 LOCAL_ASSIGN;
353 __entry->changed = changed;
354 __entry->flags = local->hw.conf.flags;
355 __entry->power_level = local->hw.conf.power_level;
356 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
357 __entry->listen_interval = local->hw.conf.listen_interval;
358 __entry->long_frame_max_tx_count =
359 local->hw.conf.long_frame_max_tx_count;
360 __entry->short_frame_max_tx_count =
361 local->hw.conf.short_frame_max_tx_count;
362 CHANDEF_ASSIGN(&local->hw.conf.chandef)
363 __entry->smps = local->hw.conf.smps_mode;
364 ),
365
366 TP_printk(
367 LOCAL_PR_FMT " ch:%#x" CHANDEF_PR_FMT,
368 LOCAL_PR_ARG, __entry->changed, CHANDEF_PR_ARG
369 )
370);
371
372TRACE_EVENT(drv_bss_info_changed,
373 TP_PROTO(struct ieee80211_local *local,
374 struct ieee80211_sub_if_data *sdata,
375 struct ieee80211_bss_conf *info,
376 u32 changed),
377
378 TP_ARGS(local, sdata, info, changed),
379
380 TP_STRUCT__entry(
381 LOCAL_ENTRY
382 VIF_ENTRY
383 __field(u32, changed)
384 __field(bool, assoc)
385 __field(bool, ibss_joined)
386 __field(bool, ibss_creator)
387 __field(u16, aid)
388 __field(bool, cts)
389 __field(bool, shortpre)
390 __field(bool, shortslot)
391 __field(bool, enable_beacon)
392 __field(u8, dtimper)
393 __field(u16, bcnint)
394 __field(u16, assoc_cap)
395 __field(u64, sync_tsf)
396 __field(u32, sync_device_ts)
397 __field(u8, sync_dtim_count)
398 __field(u32, basic_rates)
399 __array(int, mcast_rate, IEEE80211_NUM_BANDS)
400 __field(u16, ht_operation_mode)
401 __field(s32, cqm_rssi_thold);
402 __field(s32, cqm_rssi_hyst);
403 __field(u32, channel_width);
404 __field(u32, channel_cfreq1);
405 __dynamic_array(u32, arp_addr_list,
406 info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
407 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
408 info->arp_addr_cnt);
409 __field(int, arp_addr_cnt);
410 __field(bool, qos);
411 __field(bool, idle);
412 __field(bool, ps);
413 __dynamic_array(u8, ssid, info->ssid_len);
414 __field(bool, hidden_ssid);
415 __field(int, txpower)
416 __field(u8, p2p_oppps_ctwindow)
417 ),
418
419 TP_fast_assign(
420 LOCAL_ASSIGN;
421 VIF_ASSIGN;
422 __entry->changed = changed;
423 __entry->aid = info->aid;
424 __entry->assoc = info->assoc;
425 __entry->ibss_joined = info->ibss_joined;
426 __entry->ibss_creator = info->ibss_creator;
427 __entry->shortpre = info->use_short_preamble;
428 __entry->cts = info->use_cts_prot;
429 __entry->shortslot = info->use_short_slot;
430 __entry->enable_beacon = info->enable_beacon;
431 __entry->dtimper = info->dtim_period;
432 __entry->bcnint = info->beacon_int;
433 __entry->assoc_cap = info->assoc_capability;
434 __entry->sync_tsf = info->sync_tsf;
435 __entry->sync_device_ts = info->sync_device_ts;
436 __entry->sync_dtim_count = info->sync_dtim_count;
437 __entry->basic_rates = info->basic_rates;
438 memcpy(__entry->mcast_rate, info->mcast_rate,
439 sizeof(__entry->mcast_rate));
440 __entry->ht_operation_mode = info->ht_operation_mode;
441 __entry->cqm_rssi_thold = info->cqm_rssi_thold;
442 __entry->cqm_rssi_hyst = info->cqm_rssi_hyst;
443 __entry->channel_width = info->chandef.width;
444 __entry->channel_cfreq1 = info->chandef.center_freq1;
445 __entry->arp_addr_cnt = info->arp_addr_cnt;
446 memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list,
447 sizeof(u32) * (info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
448 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
449 info->arp_addr_cnt));
450 __entry->qos = info->qos;
451 __entry->idle = info->idle;
452 __entry->ps = info->ps;
453 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
454 __entry->hidden_ssid = info->hidden_ssid;
455 __entry->txpower = info->txpower;
456 __entry->p2p_oppps_ctwindow = info->p2p_noa_attr.oppps_ctwindow;
457 ),
458
459 TP_printk(
460 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
461 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
462 )
463);
464
465TRACE_EVENT(drv_prepare_multicast,
466 TP_PROTO(struct ieee80211_local *local, int mc_count),
467
468 TP_ARGS(local, mc_count),
469
470 TP_STRUCT__entry(
471 LOCAL_ENTRY
472 __field(int, mc_count)
473 ),
474
475 TP_fast_assign(
476 LOCAL_ASSIGN;
477 __entry->mc_count = mc_count;
478 ),
479
480 TP_printk(
481 LOCAL_PR_FMT " prepare mc (%d)",
482 LOCAL_PR_ARG, __entry->mc_count
483 )
484);
485
486TRACE_EVENT(drv_configure_filter,
487 TP_PROTO(struct ieee80211_local *local,
488 unsigned int changed_flags,
489 unsigned int *total_flags,
490 u64 multicast),
491
492 TP_ARGS(local, changed_flags, total_flags, multicast),
493
494 TP_STRUCT__entry(
495 LOCAL_ENTRY
496 __field(unsigned int, changed)
497 __field(unsigned int, total)
498 __field(u64, multicast)
499 ),
500
501 TP_fast_assign(
502 LOCAL_ASSIGN;
503 __entry->changed = changed_flags;
504 __entry->total = *total_flags;
505 __entry->multicast = multicast;
506 ),
507
508 TP_printk(
509 LOCAL_PR_FMT " changed:%#x total:%#x",
510 LOCAL_PR_ARG, __entry->changed, __entry->total
511 )
512);
513
514TRACE_EVENT(drv_config_iface_filter,
515 TP_PROTO(struct ieee80211_local *local,
516 struct ieee80211_sub_if_data *sdata,
517 unsigned int filter_flags,
518 unsigned int changed_flags),
519
520 TP_ARGS(local, sdata, filter_flags, changed_flags),
521
522 TP_STRUCT__entry(
523 LOCAL_ENTRY
524 VIF_ENTRY
525 __field(unsigned int, filter_flags)
526 __field(unsigned int, changed_flags)
527 ),
528
529 TP_fast_assign(
530 LOCAL_ASSIGN;
531 VIF_ASSIGN;
532 __entry->filter_flags = filter_flags;
533 __entry->changed_flags = changed_flags;
534 ),
535
536 TP_printk(
537 LOCAL_PR_FMT VIF_PR_FMT
538 " filter_flags: %#x changed_flags: %#x",
539 LOCAL_PR_ARG, VIF_PR_ARG, __entry->filter_flags,
540 __entry->changed_flags
541 )
542);
543
544TRACE_EVENT(drv_set_tim,
545 TP_PROTO(struct ieee80211_local *local,
546 struct ieee80211_sta *sta, bool set),
547
548 TP_ARGS(local, sta, set),
549
550 TP_STRUCT__entry(
551 LOCAL_ENTRY
552 STA_ENTRY
553 __field(bool, set)
554 ),
555
556 TP_fast_assign(
557 LOCAL_ASSIGN;
558 STA_ASSIGN;
559 __entry->set = set;
560 ),
561
562 TP_printk(
563 LOCAL_PR_FMT STA_PR_FMT " set:%d",
564 LOCAL_PR_ARG, STA_PR_ARG, __entry->set
565 )
566);
567
568TRACE_EVENT(drv_set_key,
569 TP_PROTO(struct ieee80211_local *local,
570 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
571 struct ieee80211_sta *sta,
572 struct ieee80211_key_conf *key),
573
574 TP_ARGS(local, cmd, sdata, sta, key),
575
576 TP_STRUCT__entry(
577 LOCAL_ENTRY
578 VIF_ENTRY
579 STA_ENTRY
580 KEY_ENTRY
581 ),
582
583 TP_fast_assign(
584 LOCAL_ASSIGN;
585 VIF_ASSIGN;
586 STA_ASSIGN;
587 KEY_ASSIGN(key);
588 ),
589
590 TP_printk(
591 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT KEY_PR_FMT,
592 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, KEY_PR_ARG
593 )
594);
595
596TRACE_EVENT(drv_update_tkip_key,
597 TP_PROTO(struct ieee80211_local *local,
598 struct ieee80211_sub_if_data *sdata,
599 struct ieee80211_key_conf *conf,
600 struct ieee80211_sta *sta, u32 iv32),
601
602 TP_ARGS(local, sdata, conf, sta, iv32),
603
604 TP_STRUCT__entry(
605 LOCAL_ENTRY
606 VIF_ENTRY
607 STA_ENTRY
608 __field(u32, iv32)
609 ),
610
611 TP_fast_assign(
612 LOCAL_ASSIGN;
613 VIF_ASSIGN;
614 STA_ASSIGN;
615 __entry->iv32 = iv32;
616 ),
617
618 TP_printk(
619 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
620 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->iv32
621 )
622);
623
624DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
625 TP_PROTO(struct ieee80211_local *local,
626 struct ieee80211_sub_if_data *sdata),
627 TP_ARGS(local, sdata)
628);
629
630DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
631 TP_PROTO(struct ieee80211_local *local,
632 struct ieee80211_sub_if_data *sdata),
633 TP_ARGS(local, sdata)
634);
635
636DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
637 TP_PROTO(struct ieee80211_local *local,
638 struct ieee80211_sub_if_data *sdata),
639 TP_ARGS(local, sdata)
640);
641
642DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
643 TP_PROTO(struct ieee80211_local *local,
644 struct ieee80211_sub_if_data *sdata),
645 TP_ARGS(local, sdata)
646);
647
648TRACE_EVENT(drv_sw_scan_start,
649 TP_PROTO(struct ieee80211_local *local,
650 struct ieee80211_sub_if_data *sdata,
651 const u8 *mac_addr),
652
653 TP_ARGS(local, sdata, mac_addr),
654
655 TP_STRUCT__entry(
656 LOCAL_ENTRY
657 VIF_ENTRY
658 __array(char, mac_addr, ETH_ALEN)
659 ),
660
661 TP_fast_assign(
662 LOCAL_ASSIGN;
663 VIF_ASSIGN;
664 memcpy(__entry->mac_addr, mac_addr, ETH_ALEN);
665 ),
666
667 TP_printk(LOCAL_PR_FMT ", " VIF_PR_FMT ", addr:%pM",
668 LOCAL_PR_ARG, VIF_PR_ARG, __entry->mac_addr)
669);
670
671DEFINE_EVENT(local_sdata_evt, drv_sw_scan_complete,
672 TP_PROTO(struct ieee80211_local *local,
673 struct ieee80211_sub_if_data *sdata),
674 TP_ARGS(local, sdata)
675);
676
677TRACE_EVENT(drv_get_stats,
678 TP_PROTO(struct ieee80211_local *local,
679 struct ieee80211_low_level_stats *stats,
680 int ret),
681
682 TP_ARGS(local, stats, ret),
683
684 TP_STRUCT__entry(
685 LOCAL_ENTRY
686 __field(int, ret)
687 __field(unsigned int, ackfail)
688 __field(unsigned int, rtsfail)
689 __field(unsigned int, fcserr)
690 __field(unsigned int, rtssucc)
691 ),
692
693 TP_fast_assign(
694 LOCAL_ASSIGN;
695 __entry->ret = ret;
696 __entry->ackfail = stats->dot11ACKFailureCount;
697 __entry->rtsfail = stats->dot11RTSFailureCount;
698 __entry->fcserr = stats->dot11FCSErrorCount;
699 __entry->rtssucc = stats->dot11RTSSuccessCount;
700 ),
701
702 TP_printk(
703 LOCAL_PR_FMT " ret:%d",
704 LOCAL_PR_ARG, __entry->ret
705 )
706);
707
708TRACE_EVENT(drv_get_key_seq,
709 TP_PROTO(struct ieee80211_local *local,
710 struct ieee80211_key_conf *key),
711
712 TP_ARGS(local, key),
713
714 TP_STRUCT__entry(
715 LOCAL_ENTRY
716 KEY_ENTRY
717 ),
718
719 TP_fast_assign(
720 LOCAL_ASSIGN;
721 KEY_ASSIGN(key);
722 ),
723
724 TP_printk(
725 LOCAL_PR_FMT KEY_PR_FMT,
726 LOCAL_PR_ARG, KEY_PR_ARG
727 )
728);
729
730DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
731 TP_PROTO(struct ieee80211_local *local, u32 value),
732 TP_ARGS(local, value)
733);
734
735DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
736 TP_PROTO(struct ieee80211_local *local, u32 value),
737 TP_ARGS(local, value)
738);
739
740TRACE_EVENT(drv_set_coverage_class,
741 TP_PROTO(struct ieee80211_local *local, s16 value),
742
743 TP_ARGS(local, value),
744
745 TP_STRUCT__entry(
746 LOCAL_ENTRY
747 __field(s16, value)
748 ),
749
750 TP_fast_assign(
751 LOCAL_ASSIGN;
752 __entry->value = value;
753 ),
754
755 TP_printk(
756 LOCAL_PR_FMT " value:%d",
757 LOCAL_PR_ARG, __entry->value
758 )
759);
760
761TRACE_EVENT(drv_sta_notify,
762 TP_PROTO(struct ieee80211_local *local,
763 struct ieee80211_sub_if_data *sdata,
764 enum sta_notify_cmd cmd,
765 struct ieee80211_sta *sta),
766
767 TP_ARGS(local, sdata, cmd, sta),
768
769 TP_STRUCT__entry(
770 LOCAL_ENTRY
771 VIF_ENTRY
772 STA_ENTRY
773 __field(u32, cmd)
774 ),
775
776 TP_fast_assign(
777 LOCAL_ASSIGN;
778 VIF_ASSIGN;
779 STA_ASSIGN;
780 __entry->cmd = cmd;
781 ),
782
783 TP_printk(
784 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
785 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
786 )
787);
788
789TRACE_EVENT(drv_sta_state,
790 TP_PROTO(struct ieee80211_local *local,
791 struct ieee80211_sub_if_data *sdata,
792 struct ieee80211_sta *sta,
793 enum ieee80211_sta_state old_state,
794 enum ieee80211_sta_state new_state),
795
796 TP_ARGS(local, sdata, sta, old_state, new_state),
797
798 TP_STRUCT__entry(
799 LOCAL_ENTRY
800 VIF_ENTRY
801 STA_ENTRY
802 __field(u32, old_state)
803 __field(u32, new_state)
804 ),
805
806 TP_fast_assign(
807 LOCAL_ASSIGN;
808 VIF_ASSIGN;
809 STA_ASSIGN;
810 __entry->old_state = old_state;
811 __entry->new_state = new_state;
812 ),
813
814 TP_printk(
815 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
816 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
817 __entry->old_state, __entry->new_state
818 )
819);
820
821TRACE_EVENT(drv_sta_rc_update,
822 TP_PROTO(struct ieee80211_local *local,
823 struct ieee80211_sub_if_data *sdata,
824 struct ieee80211_sta *sta,
825 u32 changed),
826
827 TP_ARGS(local, sdata, sta, changed),
828
829 TP_STRUCT__entry(
830 LOCAL_ENTRY
831 VIF_ENTRY
832 STA_ENTRY
833 __field(u32, changed)
834 ),
835
836 TP_fast_assign(
837 LOCAL_ASSIGN;
838 VIF_ASSIGN;
839 STA_ASSIGN;
840 __entry->changed = changed;
841 ),
842
843 TP_printk(
844 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
845 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
846 )
847);
848
849DECLARE_EVENT_CLASS(sta_event,
850 TP_PROTO(struct ieee80211_local *local,
851 struct ieee80211_sub_if_data *sdata,
852 struct ieee80211_sta *sta),
853
854 TP_ARGS(local, sdata, sta),
855
856 TP_STRUCT__entry(
857 LOCAL_ENTRY
858 VIF_ENTRY
859 STA_ENTRY
860 ),
861
862 TP_fast_assign(
863 LOCAL_ASSIGN;
864 VIF_ASSIGN;
865 STA_ASSIGN;
866 ),
867
868 TP_printk(
869 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
870 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
871 )
872);
873
874DEFINE_EVENT(sta_event, drv_sta_statistics,
875 TP_PROTO(struct ieee80211_local *local,
876 struct ieee80211_sub_if_data *sdata,
877 struct ieee80211_sta *sta),
878 TP_ARGS(local, sdata, sta)
879);
880
881DEFINE_EVENT(sta_event, drv_sta_add,
882 TP_PROTO(struct ieee80211_local *local,
883 struct ieee80211_sub_if_data *sdata,
884 struct ieee80211_sta *sta),
885 TP_ARGS(local, sdata, sta)
886);
887
888DEFINE_EVENT(sta_event, drv_sta_remove,
889 TP_PROTO(struct ieee80211_local *local,
890 struct ieee80211_sub_if_data *sdata,
891 struct ieee80211_sta *sta),
892 TP_ARGS(local, sdata, sta)
893);
894
895DEFINE_EVENT(sta_event, drv_sta_pre_rcu_remove,
896 TP_PROTO(struct ieee80211_local *local,
897 struct ieee80211_sub_if_data *sdata,
898 struct ieee80211_sta *sta),
899 TP_ARGS(local, sdata, sta)
900);
901
902DEFINE_EVENT(sta_event, drv_sta_rate_tbl_update,
903 TP_PROTO(struct ieee80211_local *local,
904 struct ieee80211_sub_if_data *sdata,
905 struct ieee80211_sta *sta),
906 TP_ARGS(local, sdata, sta)
907);
908
909TRACE_EVENT(drv_conf_tx,
910 TP_PROTO(struct ieee80211_local *local,
911 struct ieee80211_sub_if_data *sdata,
912 u16 ac, const struct ieee80211_tx_queue_params *params),
913
914 TP_ARGS(local, sdata, ac, params),
915
916 TP_STRUCT__entry(
917 LOCAL_ENTRY
918 VIF_ENTRY
919 __field(u16, ac)
920 __field(u16, txop)
921 __field(u16, cw_min)
922 __field(u16, cw_max)
923 __field(u8, aifs)
924 __field(bool, uapsd)
925 ),
926
927 TP_fast_assign(
928 LOCAL_ASSIGN;
929 VIF_ASSIGN;
930 __entry->ac = ac;
931 __entry->txop = params->txop;
932 __entry->cw_max = params->cw_max;
933 __entry->cw_min = params->cw_min;
934 __entry->aifs = params->aifs;
935 __entry->uapsd = params->uapsd;
936 ),
937
938 TP_printk(
939 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
940 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
941 )
942);
943
944DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
945 TP_PROTO(struct ieee80211_local *local,
946 struct ieee80211_sub_if_data *sdata),
947 TP_ARGS(local, sdata)
948);
949
950TRACE_EVENT(drv_set_tsf,
951 TP_PROTO(struct ieee80211_local *local,
952 struct ieee80211_sub_if_data *sdata,
953 u64 tsf),
954
955 TP_ARGS(local, sdata, tsf),
956
957 TP_STRUCT__entry(
958 LOCAL_ENTRY
959 VIF_ENTRY
960 __field(u64, tsf)
961 ),
962
963 TP_fast_assign(
964 LOCAL_ASSIGN;
965 VIF_ASSIGN;
966 __entry->tsf = tsf;
967 ),
968
969 TP_printk(
970 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
971 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
972 )
973);
974
975DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
976 TP_PROTO(struct ieee80211_local *local,
977 struct ieee80211_sub_if_data *sdata),
978 TP_ARGS(local, sdata)
979);
980
981DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
982 TP_PROTO(struct ieee80211_local *local),
983 TP_ARGS(local)
984);
985
986TRACE_EVENT(drv_ampdu_action,
987 TP_PROTO(struct ieee80211_local *local,
988 struct ieee80211_sub_if_data *sdata,
989 struct ieee80211_ampdu_params *params),
990
991 TP_ARGS(local, sdata, params),
992
993 TP_STRUCT__entry(
994 LOCAL_ENTRY
995 VIF_ENTRY
996 AMPDU_ACTION_ENTRY
997 ),
998
999 TP_fast_assign(
1000 LOCAL_ASSIGN;
1001 VIF_ASSIGN;
1002 AMPDU_ACTION_ASSIGN;
1003 ),
1004
1005 TP_printk(
1006 LOCAL_PR_FMT VIF_PR_FMT AMPDU_ACTION_PR_FMT,
1007 LOCAL_PR_ARG, VIF_PR_ARG, AMPDU_ACTION_PR_ARG
1008 )
1009);
1010
1011TRACE_EVENT(drv_get_survey,
1012 TP_PROTO(struct ieee80211_local *local, int idx,
1013 struct survey_info *survey),
1014
1015 TP_ARGS(local, idx, survey),
1016
1017 TP_STRUCT__entry(
1018 LOCAL_ENTRY
1019 __field(int, idx)
1020 ),
1021
1022 TP_fast_assign(
1023 LOCAL_ASSIGN;
1024 __entry->idx = idx;
1025 ),
1026
1027 TP_printk(
1028 LOCAL_PR_FMT " idx:%d",
1029 LOCAL_PR_ARG, __entry->idx
1030 )
1031);
1032
1033TRACE_EVENT(drv_flush,
1034 TP_PROTO(struct ieee80211_local *local,
1035 u32 queues, bool drop),
1036
1037 TP_ARGS(local, queues, drop),
1038
1039 TP_STRUCT__entry(
1040 LOCAL_ENTRY
1041 __field(bool, drop)
1042 __field(u32, queues)
1043 ),
1044
1045 TP_fast_assign(
1046 LOCAL_ASSIGN;
1047 __entry->drop = drop;
1048 __entry->queues = queues;
1049 ),
1050
1051 TP_printk(
1052 LOCAL_PR_FMT " queues:0x%x drop:%d",
1053 LOCAL_PR_ARG, __entry->queues, __entry->drop
1054 )
1055);
1056
1057TRACE_EVENT(drv_channel_switch,
1058 TP_PROTO(struct ieee80211_local *local,
1059 struct ieee80211_sub_if_data *sdata,
1060 struct ieee80211_channel_switch *ch_switch),
1061
1062 TP_ARGS(local, sdata, ch_switch),
1063
1064 TP_STRUCT__entry(
1065 LOCAL_ENTRY
1066 VIF_ENTRY
1067 CHANDEF_ENTRY
1068 __field(u64, timestamp)
1069 __field(u32, device_timestamp)
1070 __field(bool, block_tx)
1071 __field(u8, count)
1072 ),
1073
1074 TP_fast_assign(
1075 LOCAL_ASSIGN;
1076 VIF_ASSIGN;
1077 CHANDEF_ASSIGN(&ch_switch->chandef)
1078 __entry->timestamp = ch_switch->timestamp;
1079 __entry->device_timestamp = ch_switch->device_timestamp;
1080 __entry->block_tx = ch_switch->block_tx;
1081 __entry->count = ch_switch->count;
1082 ),
1083
1084 TP_printk(
1085 LOCAL_PR_FMT VIF_PR_FMT " new " CHANDEF_PR_FMT " count:%d",
1086 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count
1087 )
1088);
1089
1090TRACE_EVENT(drv_set_antenna,
1091 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1092
1093 TP_ARGS(local, tx_ant, rx_ant, ret),
1094
1095 TP_STRUCT__entry(
1096 LOCAL_ENTRY
1097 __field(u32, tx_ant)
1098 __field(u32, rx_ant)
1099 __field(int, ret)
1100 ),
1101
1102 TP_fast_assign(
1103 LOCAL_ASSIGN;
1104 __entry->tx_ant = tx_ant;
1105 __entry->rx_ant = rx_ant;
1106 __entry->ret = ret;
1107 ),
1108
1109 TP_printk(
1110 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1111 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1112 )
1113);
1114
1115TRACE_EVENT(drv_get_antenna,
1116 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1117
1118 TP_ARGS(local, tx_ant, rx_ant, ret),
1119
1120 TP_STRUCT__entry(
1121 LOCAL_ENTRY
1122 __field(u32, tx_ant)
1123 __field(u32, rx_ant)
1124 __field(int, ret)
1125 ),
1126
1127 TP_fast_assign(
1128 LOCAL_ASSIGN;
1129 __entry->tx_ant = tx_ant;
1130 __entry->rx_ant = rx_ant;
1131 __entry->ret = ret;
1132 ),
1133
1134 TP_printk(
1135 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1136 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1137 )
1138);
1139
1140TRACE_EVENT(drv_remain_on_channel,
1141 TP_PROTO(struct ieee80211_local *local,
1142 struct ieee80211_sub_if_data *sdata,
1143 struct ieee80211_channel *chan,
1144 unsigned int duration,
1145 enum ieee80211_roc_type type),
1146
1147 TP_ARGS(local, sdata, chan, duration, type),
1148
1149 TP_STRUCT__entry(
1150 LOCAL_ENTRY
1151 VIF_ENTRY
1152 __field(int, center_freq)
1153 __field(unsigned int, duration)
1154 __field(u32, type)
1155 ),
1156
1157 TP_fast_assign(
1158 LOCAL_ASSIGN;
1159 VIF_ASSIGN;
1160 __entry->center_freq = chan->center_freq;
1161 __entry->duration = duration;
1162 __entry->type = type;
1163 ),
1164
1165 TP_printk(
1166 LOCAL_PR_FMT VIF_PR_FMT " freq:%dMHz duration:%dms type=%d",
1167 LOCAL_PR_ARG, VIF_PR_ARG,
1168 __entry->center_freq, __entry->duration, __entry->type
1169 )
1170);
1171
1172DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
1173 TP_PROTO(struct ieee80211_local *local),
1174 TP_ARGS(local)
1175);
1176
1177TRACE_EVENT(drv_set_ringparam,
1178 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1179
1180 TP_ARGS(local, tx, rx),
1181
1182 TP_STRUCT__entry(
1183 LOCAL_ENTRY
1184 __field(u32, tx)
1185 __field(u32, rx)
1186 ),
1187
1188 TP_fast_assign(
1189 LOCAL_ASSIGN;
1190 __entry->tx = tx;
1191 __entry->rx = rx;
1192 ),
1193
1194 TP_printk(
1195 LOCAL_PR_FMT " tx:%d rx %d",
1196 LOCAL_PR_ARG, __entry->tx, __entry->rx
1197 )
1198);
1199
1200TRACE_EVENT(drv_get_ringparam,
1201 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1202 u32 *rx, u32 *rx_max),
1203
1204 TP_ARGS(local, tx, tx_max, rx, rx_max),
1205
1206 TP_STRUCT__entry(
1207 LOCAL_ENTRY
1208 __field(u32, tx)
1209 __field(u32, tx_max)
1210 __field(u32, rx)
1211 __field(u32, rx_max)
1212 ),
1213
1214 TP_fast_assign(
1215 LOCAL_ASSIGN;
1216 __entry->tx = *tx;
1217 __entry->tx_max = *tx_max;
1218 __entry->rx = *rx;
1219 __entry->rx_max = *rx_max;
1220 ),
1221
1222 TP_printk(
1223 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1224 LOCAL_PR_ARG,
1225 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1226 )
1227);
1228
1229DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1230 TP_PROTO(struct ieee80211_local *local),
1231 TP_ARGS(local)
1232);
1233
1234DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1235 TP_PROTO(struct ieee80211_local *local),
1236 TP_ARGS(local)
1237);
1238
1239TRACE_EVENT(drv_set_bitrate_mask,
1240 TP_PROTO(struct ieee80211_local *local,
1241 struct ieee80211_sub_if_data *sdata,
1242 const struct cfg80211_bitrate_mask *mask),
1243
1244 TP_ARGS(local, sdata, mask),
1245
1246 TP_STRUCT__entry(
1247 LOCAL_ENTRY
1248 VIF_ENTRY
1249 __field(u32, legacy_2g)
1250 __field(u32, legacy_5g)
1251 ),
1252
1253 TP_fast_assign(
1254 LOCAL_ASSIGN;
1255 VIF_ASSIGN;
1256 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1257 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1258 ),
1259
1260 TP_printk(
1261 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1262 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1263 )
1264);
1265
1266TRACE_EVENT(drv_set_rekey_data,
1267 TP_PROTO(struct ieee80211_local *local,
1268 struct ieee80211_sub_if_data *sdata,
1269 struct cfg80211_gtk_rekey_data *data),
1270
1271 TP_ARGS(local, sdata, data),
1272
1273 TP_STRUCT__entry(
1274 LOCAL_ENTRY
1275 VIF_ENTRY
1276 __array(u8, kek, NL80211_KEK_LEN)
1277 __array(u8, kck, NL80211_KCK_LEN)
1278 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1279 ),
1280
1281 TP_fast_assign(
1282 LOCAL_ASSIGN;
1283 VIF_ASSIGN;
1284 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1285 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1286 memcpy(__entry->replay_ctr, data->replay_ctr,
1287 NL80211_REPLAY_CTR_LEN);
1288 ),
1289
1290 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1291 LOCAL_PR_ARG, VIF_PR_ARG)
1292);
1293
1294TRACE_EVENT(drv_event_callback,
1295 TP_PROTO(struct ieee80211_local *local,
1296 struct ieee80211_sub_if_data *sdata,
1297 const struct ieee80211_event *_event),
1298
1299 TP_ARGS(local, sdata, _event),
1300
1301 TP_STRUCT__entry(
1302 LOCAL_ENTRY
1303 VIF_ENTRY
1304 __field(u32, type)
1305 ),
1306
1307 TP_fast_assign(
1308 LOCAL_ASSIGN;
1309 VIF_ASSIGN;
1310 __entry->type = _event->type;
1311 ),
1312
1313 TP_printk(
1314 LOCAL_PR_FMT VIF_PR_FMT " event:%d",
1315 LOCAL_PR_ARG, VIF_PR_ARG, __entry->type
1316 )
1317);
1318
1319DECLARE_EVENT_CLASS(release_evt,
1320 TP_PROTO(struct ieee80211_local *local,
1321 struct ieee80211_sta *sta,
1322 u16 tids, int num_frames,
1323 enum ieee80211_frame_release_type reason,
1324 bool more_data),
1325
1326 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1327
1328 TP_STRUCT__entry(
1329 LOCAL_ENTRY
1330 STA_ENTRY
1331 __field(u16, tids)
1332 __field(int, num_frames)
1333 __field(int, reason)
1334 __field(bool, more_data)
1335 ),
1336
1337 TP_fast_assign(
1338 LOCAL_ASSIGN;
1339 STA_ASSIGN;
1340 __entry->tids = tids;
1341 __entry->num_frames = num_frames;
1342 __entry->reason = reason;
1343 __entry->more_data = more_data;
1344 ),
1345
1346 TP_printk(
1347 LOCAL_PR_FMT STA_PR_FMT
1348 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1349 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1350 __entry->reason, __entry->more_data
1351 )
1352);
1353
1354DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1355 TP_PROTO(struct ieee80211_local *local,
1356 struct ieee80211_sta *sta,
1357 u16 tids, int num_frames,
1358 enum ieee80211_frame_release_type reason,
1359 bool more_data),
1360
1361 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1362);
1363
1364DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1365 TP_PROTO(struct ieee80211_local *local,
1366 struct ieee80211_sta *sta,
1367 u16 tids, int num_frames,
1368 enum ieee80211_frame_release_type reason,
1369 bool more_data),
1370
1371 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1372);
1373
1374DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
1375 TP_PROTO(struct ieee80211_local *local,
1376 struct ieee80211_sub_if_data *sdata),
1377
1378 TP_ARGS(local, sdata)
1379);
1380
1381DEFINE_EVENT(local_sdata_evt, drv_mgd_protect_tdls_discover,
1382 TP_PROTO(struct ieee80211_local *local,
1383 struct ieee80211_sub_if_data *sdata),
1384
1385 TP_ARGS(local, sdata)
1386);
1387
1388DECLARE_EVENT_CLASS(local_chanctx,
1389 TP_PROTO(struct ieee80211_local *local,
1390 struct ieee80211_chanctx *ctx),
1391
1392 TP_ARGS(local, ctx),
1393
1394 TP_STRUCT__entry(
1395 LOCAL_ENTRY
1396 CHANCTX_ENTRY
1397 ),
1398
1399 TP_fast_assign(
1400 LOCAL_ASSIGN;
1401 CHANCTX_ASSIGN;
1402 ),
1403
1404 TP_printk(
1405 LOCAL_PR_FMT CHANCTX_PR_FMT,
1406 LOCAL_PR_ARG, CHANCTX_PR_ARG
1407 )
1408);
1409
1410DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1411 TP_PROTO(struct ieee80211_local *local,
1412 struct ieee80211_chanctx *ctx),
1413 TP_ARGS(local, ctx)
1414);
1415
1416DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1417 TP_PROTO(struct ieee80211_local *local,
1418 struct ieee80211_chanctx *ctx),
1419 TP_ARGS(local, ctx)
1420);
1421
1422TRACE_EVENT(drv_change_chanctx,
1423 TP_PROTO(struct ieee80211_local *local,
1424 struct ieee80211_chanctx *ctx,
1425 u32 changed),
1426
1427 TP_ARGS(local, ctx, changed),
1428
1429 TP_STRUCT__entry(
1430 LOCAL_ENTRY
1431 CHANCTX_ENTRY
1432 __field(u32, changed)
1433 ),
1434
1435 TP_fast_assign(
1436 LOCAL_ASSIGN;
1437 CHANCTX_ASSIGN;
1438 __entry->changed = changed;
1439 ),
1440
1441 TP_printk(
1442 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1443 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1444 )
1445);
1446
1447#if !defined(__TRACE_VIF_ENTRY)
1448#define __TRACE_VIF_ENTRY
1449struct trace_vif_entry {
1450 enum nl80211_iftype vif_type;
1451 bool p2p;
1452 char vif_name[IFNAMSIZ];
1453} __packed;
1454
1455struct trace_chandef_entry {
1456 u32 control_freq;
1457 u32 chan_width;
1458 u32 center_freq1;
1459 u32 center_freq2;
1460} __packed;
1461
1462struct trace_switch_entry {
1463 struct trace_vif_entry vif;
1464 struct trace_chandef_entry old_chandef;
1465 struct trace_chandef_entry new_chandef;
1466} __packed;
1467
1468#define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
1469#endif
1470
1471TRACE_EVENT(drv_switch_vif_chanctx,
1472 TP_PROTO(struct ieee80211_local *local,
1473 struct ieee80211_vif_chanctx_switch *vifs,
1474 int n_vifs, enum ieee80211_chanctx_switch_mode mode),
1475 TP_ARGS(local, vifs, n_vifs, mode),
1476
1477 TP_STRUCT__entry(
1478 LOCAL_ENTRY
1479 __field(int, n_vifs)
1480 __field(u32, mode)
1481 __dynamic_array(u8, vifs,
1482 sizeof(struct trace_switch_entry) * n_vifs)
1483 ),
1484
1485 TP_fast_assign(
1486 LOCAL_ASSIGN;
1487 __entry->n_vifs = n_vifs;
1488 __entry->mode = mode;
1489 {
1490 struct trace_switch_entry *local_vifs =
1491 __get_dynamic_array(vifs);
1492 int i;
1493
1494 for (i = 0; i < n_vifs; i++) {
1495 struct ieee80211_sub_if_data *sdata;
1496
1497 sdata = container_of(vifs[i].vif,
1498 struct ieee80211_sub_if_data,
1499 vif);
1500
1501 SWITCH_ENTRY_ASSIGN(vif.vif_type, vif->type);
1502 SWITCH_ENTRY_ASSIGN(vif.p2p, vif->p2p);
1503 strncpy(local_vifs[i].vif.vif_name,
1504 sdata->name,
1505 sizeof(local_vifs[i].vif.vif_name));
1506 SWITCH_ENTRY_ASSIGN(old_chandef.control_freq,
1507 old_ctx->def.chan->center_freq);
1508 SWITCH_ENTRY_ASSIGN(old_chandef.chan_width,
1509 old_ctx->def.width);
1510 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq1,
1511 old_ctx->def.center_freq1);
1512 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq2,
1513 old_ctx->def.center_freq2);
1514 SWITCH_ENTRY_ASSIGN(new_chandef.control_freq,
1515 new_ctx->def.chan->center_freq);
1516 SWITCH_ENTRY_ASSIGN(new_chandef.chan_width,
1517 new_ctx->def.width);
1518 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq1,
1519 new_ctx->def.center_freq1);
1520 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq2,
1521 new_ctx->def.center_freq2);
1522 }
1523 }
1524 ),
1525
1526 TP_printk(
1527 LOCAL_PR_FMT " n_vifs:%d mode:%d",
1528 LOCAL_PR_ARG, __entry->n_vifs, __entry->mode
1529 )
1530);
1531
1532DECLARE_EVENT_CLASS(local_sdata_chanctx,
1533 TP_PROTO(struct ieee80211_local *local,
1534 struct ieee80211_sub_if_data *sdata,
1535 struct ieee80211_chanctx *ctx),
1536
1537 TP_ARGS(local, sdata, ctx),
1538
1539 TP_STRUCT__entry(
1540 LOCAL_ENTRY
1541 VIF_ENTRY
1542 CHANCTX_ENTRY
1543 ),
1544
1545 TP_fast_assign(
1546 LOCAL_ASSIGN;
1547 VIF_ASSIGN;
1548 CHANCTX_ASSIGN;
1549 ),
1550
1551 TP_printk(
1552 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
1553 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
1554 )
1555);
1556
1557DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1558 TP_PROTO(struct ieee80211_local *local,
1559 struct ieee80211_sub_if_data *sdata,
1560 struct ieee80211_chanctx *ctx),
1561 TP_ARGS(local, sdata, ctx)
1562);
1563
1564DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1565 TP_PROTO(struct ieee80211_local *local,
1566 struct ieee80211_sub_if_data *sdata,
1567 struct ieee80211_chanctx *ctx),
1568 TP_ARGS(local, sdata, ctx)
1569);
1570
1571TRACE_EVENT(drv_start_ap,
1572 TP_PROTO(struct ieee80211_local *local,
1573 struct ieee80211_sub_if_data *sdata,
1574 struct ieee80211_bss_conf *info),
1575
1576 TP_ARGS(local, sdata, info),
1577
1578 TP_STRUCT__entry(
1579 LOCAL_ENTRY
1580 VIF_ENTRY
1581 __field(u8, dtimper)
1582 __field(u16, bcnint)
1583 __dynamic_array(u8, ssid, info->ssid_len);
1584 __field(bool, hidden_ssid);
1585 ),
1586
1587 TP_fast_assign(
1588 LOCAL_ASSIGN;
1589 VIF_ASSIGN;
1590 __entry->dtimper = info->dtim_period;
1591 __entry->bcnint = info->beacon_int;
1592 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1593 __entry->hidden_ssid = info->hidden_ssid;
1594 ),
1595
1596 TP_printk(
1597 LOCAL_PR_FMT VIF_PR_FMT,
1598 LOCAL_PR_ARG, VIF_PR_ARG
1599 )
1600);
1601
1602DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
1603 TP_PROTO(struct ieee80211_local *local,
1604 struct ieee80211_sub_if_data *sdata),
1605 TP_ARGS(local, sdata)
1606);
1607
1608TRACE_EVENT(drv_reconfig_complete,
1609 TP_PROTO(struct ieee80211_local *local,
1610 enum ieee80211_reconfig_type reconfig_type),
1611 TP_ARGS(local, reconfig_type),
1612
1613 TP_STRUCT__entry(
1614 LOCAL_ENTRY
1615 __field(u8, reconfig_type)
1616 ),
1617
1618 TP_fast_assign(
1619 LOCAL_ASSIGN;
1620 __entry->reconfig_type = reconfig_type;
1621 ),
1622
1623 TP_printk(
1624 LOCAL_PR_FMT " reconfig_type:%d",
1625 LOCAL_PR_ARG, __entry->reconfig_type
1626 )
1627
1628);
1629
1630#if IS_ENABLED(CONFIG_IPV6)
1631DEFINE_EVENT(local_sdata_evt, drv_ipv6_addr_change,
1632 TP_PROTO(struct ieee80211_local *local,
1633 struct ieee80211_sub_if_data *sdata),
1634 TP_ARGS(local, sdata)
1635);
1636#endif
1637
1638TRACE_EVENT(drv_join_ibss,
1639 TP_PROTO(struct ieee80211_local *local,
1640 struct ieee80211_sub_if_data *sdata,
1641 struct ieee80211_bss_conf *info),
1642
1643 TP_ARGS(local, sdata, info),
1644
1645 TP_STRUCT__entry(
1646 LOCAL_ENTRY
1647 VIF_ENTRY
1648 __field(u8, dtimper)
1649 __field(u16, bcnint)
1650 __dynamic_array(u8, ssid, info->ssid_len);
1651 ),
1652
1653 TP_fast_assign(
1654 LOCAL_ASSIGN;
1655 VIF_ASSIGN;
1656 __entry->dtimper = info->dtim_period;
1657 __entry->bcnint = info->beacon_int;
1658 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1659 ),
1660
1661 TP_printk(
1662 LOCAL_PR_FMT VIF_PR_FMT,
1663 LOCAL_PR_ARG, VIF_PR_ARG
1664 )
1665);
1666
1667DEFINE_EVENT(local_sdata_evt, drv_leave_ibss,
1668 TP_PROTO(struct ieee80211_local *local,
1669 struct ieee80211_sub_if_data *sdata),
1670 TP_ARGS(local, sdata)
1671);
1672
1673TRACE_EVENT(drv_get_expected_throughput,
1674 TP_PROTO(struct ieee80211_sta *sta),
1675
1676 TP_ARGS(sta),
1677
1678 TP_STRUCT__entry(
1679 STA_ENTRY
1680 ),
1681
1682 TP_fast_assign(
1683 STA_ASSIGN;
1684 ),
1685
1686 TP_printk(
1687 STA_PR_FMT, STA_PR_ARG
1688 )
1689);
1690
1691/*
1692 * Tracing for API calls that drivers call.
1693 */
1694
1695TRACE_EVENT(api_start_tx_ba_session,
1696 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1697
1698 TP_ARGS(sta, tid),
1699
1700 TP_STRUCT__entry(
1701 STA_ENTRY
1702 __field(u16, tid)
1703 ),
1704
1705 TP_fast_assign(
1706 STA_ASSIGN;
1707 __entry->tid = tid;
1708 ),
1709
1710 TP_printk(
1711 STA_PR_FMT " tid:%d",
1712 STA_PR_ARG, __entry->tid
1713 )
1714);
1715
1716TRACE_EVENT(api_start_tx_ba_cb,
1717 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1718
1719 TP_ARGS(sdata, ra, tid),
1720
1721 TP_STRUCT__entry(
1722 VIF_ENTRY
1723 __array(u8, ra, ETH_ALEN)
1724 __field(u16, tid)
1725 ),
1726
1727 TP_fast_assign(
1728 VIF_ASSIGN;
1729 memcpy(__entry->ra, ra, ETH_ALEN);
1730 __entry->tid = tid;
1731 ),
1732
1733 TP_printk(
1734 VIF_PR_FMT " ra:%pM tid:%d",
1735 VIF_PR_ARG, __entry->ra, __entry->tid
1736 )
1737);
1738
1739TRACE_EVENT(api_stop_tx_ba_session,
1740 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1741
1742 TP_ARGS(sta, tid),
1743
1744 TP_STRUCT__entry(
1745 STA_ENTRY
1746 __field(u16, tid)
1747 ),
1748
1749 TP_fast_assign(
1750 STA_ASSIGN;
1751 __entry->tid = tid;
1752 ),
1753
1754 TP_printk(
1755 STA_PR_FMT " tid:%d",
1756 STA_PR_ARG, __entry->tid
1757 )
1758);
1759
1760TRACE_EVENT(api_stop_tx_ba_cb,
1761 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1762
1763 TP_ARGS(sdata, ra, tid),
1764
1765 TP_STRUCT__entry(
1766 VIF_ENTRY
1767 __array(u8, ra, ETH_ALEN)
1768 __field(u16, tid)
1769 ),
1770
1771 TP_fast_assign(
1772 VIF_ASSIGN;
1773 memcpy(__entry->ra, ra, ETH_ALEN);
1774 __entry->tid = tid;
1775 ),
1776
1777 TP_printk(
1778 VIF_PR_FMT " ra:%pM tid:%d",
1779 VIF_PR_ARG, __entry->ra, __entry->tid
1780 )
1781);
1782
1783DEFINE_EVENT(local_only_evt, api_restart_hw,
1784 TP_PROTO(struct ieee80211_local *local),
1785 TP_ARGS(local)
1786);
1787
1788TRACE_EVENT(api_beacon_loss,
1789 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1790
1791 TP_ARGS(sdata),
1792
1793 TP_STRUCT__entry(
1794 VIF_ENTRY
1795 ),
1796
1797 TP_fast_assign(
1798 VIF_ASSIGN;
1799 ),
1800
1801 TP_printk(
1802 VIF_PR_FMT,
1803 VIF_PR_ARG
1804 )
1805);
1806
1807TRACE_EVENT(api_connection_loss,
1808 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1809
1810 TP_ARGS(sdata),
1811
1812 TP_STRUCT__entry(
1813 VIF_ENTRY
1814 ),
1815
1816 TP_fast_assign(
1817 VIF_ASSIGN;
1818 ),
1819
1820 TP_printk(
1821 VIF_PR_FMT,
1822 VIF_PR_ARG
1823 )
1824);
1825
1826TRACE_EVENT(api_cqm_rssi_notify,
1827 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1828 enum nl80211_cqm_rssi_threshold_event rssi_event),
1829
1830 TP_ARGS(sdata, rssi_event),
1831
1832 TP_STRUCT__entry(
1833 VIF_ENTRY
1834 __field(u32, rssi_event)
1835 ),
1836
1837 TP_fast_assign(
1838 VIF_ASSIGN;
1839 __entry->rssi_event = rssi_event;
1840 ),
1841
1842 TP_printk(
1843 VIF_PR_FMT " event:%d",
1844 VIF_PR_ARG, __entry->rssi_event
1845 )
1846);
1847
1848DEFINE_EVENT(local_sdata_evt, api_cqm_beacon_loss_notify,
1849 TP_PROTO(struct ieee80211_local *local,
1850 struct ieee80211_sub_if_data *sdata),
1851 TP_ARGS(local, sdata)
1852);
1853
1854TRACE_EVENT(api_scan_completed,
1855 TP_PROTO(struct ieee80211_local *local, bool aborted),
1856
1857 TP_ARGS(local, aborted),
1858
1859 TP_STRUCT__entry(
1860 LOCAL_ENTRY
1861 __field(bool, aborted)
1862 ),
1863
1864 TP_fast_assign(
1865 LOCAL_ASSIGN;
1866 __entry->aborted = aborted;
1867 ),
1868
1869 TP_printk(
1870 LOCAL_PR_FMT " aborted:%d",
1871 LOCAL_PR_ARG, __entry->aborted
1872 )
1873);
1874
1875TRACE_EVENT(api_sched_scan_results,
1876 TP_PROTO(struct ieee80211_local *local),
1877
1878 TP_ARGS(local),
1879
1880 TP_STRUCT__entry(
1881 LOCAL_ENTRY
1882 ),
1883
1884 TP_fast_assign(
1885 LOCAL_ASSIGN;
1886 ),
1887
1888 TP_printk(
1889 LOCAL_PR_FMT, LOCAL_PR_ARG
1890 )
1891);
1892
1893TRACE_EVENT(api_sched_scan_stopped,
1894 TP_PROTO(struct ieee80211_local *local),
1895
1896 TP_ARGS(local),
1897
1898 TP_STRUCT__entry(
1899 LOCAL_ENTRY
1900 ),
1901
1902 TP_fast_assign(
1903 LOCAL_ASSIGN;
1904 ),
1905
1906 TP_printk(
1907 LOCAL_PR_FMT, LOCAL_PR_ARG
1908 )
1909);
1910
1911TRACE_EVENT(api_sta_block_awake,
1912 TP_PROTO(struct ieee80211_local *local,
1913 struct ieee80211_sta *sta, bool block),
1914
1915 TP_ARGS(local, sta, block),
1916
1917 TP_STRUCT__entry(
1918 LOCAL_ENTRY
1919 STA_ENTRY
1920 __field(bool, block)
1921 ),
1922
1923 TP_fast_assign(
1924 LOCAL_ASSIGN;
1925 STA_ASSIGN;
1926 __entry->block = block;
1927 ),
1928
1929 TP_printk(
1930 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1931 LOCAL_PR_ARG, STA_PR_ARG, __entry->block
1932 )
1933);
1934
1935TRACE_EVENT(api_chswitch_done,
1936 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1937
1938 TP_ARGS(sdata, success),
1939
1940 TP_STRUCT__entry(
1941 VIF_ENTRY
1942 __field(bool, success)
1943 ),
1944
1945 TP_fast_assign(
1946 VIF_ASSIGN;
1947 __entry->success = success;
1948 ),
1949
1950 TP_printk(
1951 VIF_PR_FMT " success=%d",
1952 VIF_PR_ARG, __entry->success
1953 )
1954);
1955
1956DEFINE_EVENT(local_only_evt, api_ready_on_channel,
1957 TP_PROTO(struct ieee80211_local *local),
1958 TP_ARGS(local)
1959);
1960
1961DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
1962 TP_PROTO(struct ieee80211_local *local),
1963 TP_ARGS(local)
1964);
1965
1966TRACE_EVENT(api_gtk_rekey_notify,
1967 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1968 const u8 *bssid, const u8 *replay_ctr),
1969
1970 TP_ARGS(sdata, bssid, replay_ctr),
1971
1972 TP_STRUCT__entry(
1973 VIF_ENTRY
1974 __array(u8, bssid, ETH_ALEN)
1975 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1976 ),
1977
1978 TP_fast_assign(
1979 VIF_ASSIGN;
1980 memcpy(__entry->bssid, bssid, ETH_ALEN);
1981 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1982 ),
1983
1984 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1985);
1986
1987TRACE_EVENT(api_enable_rssi_reports,
1988 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1989 int rssi_min_thold, int rssi_max_thold),
1990
1991 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1992
1993 TP_STRUCT__entry(
1994 VIF_ENTRY
1995 __field(int, rssi_min_thold)
1996 __field(int, rssi_max_thold)
1997 ),
1998
1999 TP_fast_assign(
2000 VIF_ASSIGN;
2001 __entry->rssi_min_thold = rssi_min_thold;
2002 __entry->rssi_max_thold = rssi_max_thold;
2003 ),
2004
2005 TP_printk(
2006 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
2007 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
2008 )
2009);
2010
2011TRACE_EVENT(api_eosp,
2012 TP_PROTO(struct ieee80211_local *local,
2013 struct ieee80211_sta *sta),
2014
2015 TP_ARGS(local, sta),
2016
2017 TP_STRUCT__entry(
2018 LOCAL_ENTRY
2019 STA_ENTRY
2020 ),
2021
2022 TP_fast_assign(
2023 LOCAL_ASSIGN;
2024 STA_ASSIGN;
2025 ),
2026
2027 TP_printk(
2028 LOCAL_PR_FMT STA_PR_FMT,
2029 LOCAL_PR_ARG, STA_PR_ARG
2030 )
2031);
2032
2033TRACE_EVENT(api_send_eosp_nullfunc,
2034 TP_PROTO(struct ieee80211_local *local,
2035 struct ieee80211_sta *sta,
2036 u8 tid),
2037
2038 TP_ARGS(local, sta, tid),
2039
2040 TP_STRUCT__entry(
2041 LOCAL_ENTRY
2042 STA_ENTRY
2043 __field(u8, tid)
2044 ),
2045
2046 TP_fast_assign(
2047 LOCAL_ASSIGN;
2048 STA_ASSIGN;
2049 __entry->tid = tid;
2050 ),
2051
2052 TP_printk(
2053 LOCAL_PR_FMT STA_PR_FMT " tid:%d",
2054 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid
2055 )
2056);
2057
2058TRACE_EVENT(api_sta_set_buffered,
2059 TP_PROTO(struct ieee80211_local *local,
2060 struct ieee80211_sta *sta,
2061 u8 tid, bool buffered),
2062
2063 TP_ARGS(local, sta, tid, buffered),
2064
2065 TP_STRUCT__entry(
2066 LOCAL_ENTRY
2067 STA_ENTRY
2068 __field(u8, tid)
2069 __field(bool, buffered)
2070 ),
2071
2072 TP_fast_assign(
2073 LOCAL_ASSIGN;
2074 STA_ASSIGN;
2075 __entry->tid = tid;
2076 __entry->buffered = buffered;
2077 ),
2078
2079 TP_printk(
2080 LOCAL_PR_FMT STA_PR_FMT " tid:%d buffered:%d",
2081 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid, __entry->buffered
2082 )
2083);
2084
2085/*
2086 * Tracing for internal functions
2087 * (which may also be called in response to driver calls)
2088 */
2089
2090TRACE_EVENT(wake_queue,
2091 TP_PROTO(struct ieee80211_local *local, u16 queue,
2092 enum queue_stop_reason reason),
2093
2094 TP_ARGS(local, queue, reason),
2095
2096 TP_STRUCT__entry(
2097 LOCAL_ENTRY
2098 __field(u16, queue)
2099 __field(u32, reason)
2100 ),
2101
2102 TP_fast_assign(
2103 LOCAL_ASSIGN;
2104 __entry->queue = queue;
2105 __entry->reason = reason;
2106 ),
2107
2108 TP_printk(
2109 LOCAL_PR_FMT " queue:%d, reason:%d",
2110 LOCAL_PR_ARG, __entry->queue, __entry->reason
2111 )
2112);
2113
2114TRACE_EVENT(stop_queue,
2115 TP_PROTO(struct ieee80211_local *local, u16 queue,
2116 enum queue_stop_reason reason),
2117
2118 TP_ARGS(local, queue, reason),
2119
2120 TP_STRUCT__entry(
2121 LOCAL_ENTRY
2122 __field(u16, queue)
2123 __field(u32, reason)
2124 ),
2125
2126 TP_fast_assign(
2127 LOCAL_ASSIGN;
2128 __entry->queue = queue;
2129 __entry->reason = reason;
2130 ),
2131
2132 TP_printk(
2133 LOCAL_PR_FMT " queue:%d, reason:%d",
2134 LOCAL_PR_ARG, __entry->queue, __entry->reason
2135 )
2136);
2137
2138TRACE_EVENT(drv_set_default_unicast_key,
2139 TP_PROTO(struct ieee80211_local *local,
2140 struct ieee80211_sub_if_data *sdata,
2141 int key_idx),
2142
2143 TP_ARGS(local, sdata, key_idx),
2144
2145 TP_STRUCT__entry(
2146 LOCAL_ENTRY
2147 VIF_ENTRY
2148 __field(int, key_idx)
2149 ),
2150
2151 TP_fast_assign(
2152 LOCAL_ASSIGN;
2153 VIF_ASSIGN;
2154 __entry->key_idx = key_idx;
2155 ),
2156
2157 TP_printk(LOCAL_PR_FMT VIF_PR_FMT " key_idx:%d",
2158 LOCAL_PR_ARG, VIF_PR_ARG, __entry->key_idx)
2159);
2160
2161TRACE_EVENT(api_radar_detected,
2162 TP_PROTO(struct ieee80211_local *local),
2163
2164 TP_ARGS(local),
2165
2166 TP_STRUCT__entry(
2167 LOCAL_ENTRY
2168 ),
2169
2170 TP_fast_assign(
2171 LOCAL_ASSIGN;
2172 ),
2173
2174 TP_printk(
2175 LOCAL_PR_FMT " radar detected",
2176 LOCAL_PR_ARG
2177 )
2178);
2179
2180TRACE_EVENT(drv_channel_switch_beacon,
2181 TP_PROTO(struct ieee80211_local *local,
2182 struct ieee80211_sub_if_data *sdata,
2183 struct cfg80211_chan_def *chandef),
2184
2185 TP_ARGS(local, sdata, chandef),
2186
2187 TP_STRUCT__entry(
2188 LOCAL_ENTRY
2189 VIF_ENTRY
2190 CHANDEF_ENTRY
2191 ),
2192
2193 TP_fast_assign(
2194 LOCAL_ASSIGN;
2195 VIF_ASSIGN;
2196 CHANDEF_ASSIGN(chandef);
2197 ),
2198
2199 TP_printk(
2200 LOCAL_PR_FMT VIF_PR_FMT " channel switch to " CHANDEF_PR_FMT,
2201 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG
2202 )
2203);
2204
2205TRACE_EVENT(drv_pre_channel_switch,
2206 TP_PROTO(struct ieee80211_local *local,
2207 struct ieee80211_sub_if_data *sdata,
2208 struct ieee80211_channel_switch *ch_switch),
2209
2210 TP_ARGS(local, sdata, ch_switch),
2211
2212 TP_STRUCT__entry(
2213 LOCAL_ENTRY
2214 VIF_ENTRY
2215 CHANDEF_ENTRY
2216 __field(u64, timestamp)
2217 __field(u32, device_timestamp)
2218 __field(bool, block_tx)
2219 __field(u8, count)
2220 ),
2221
2222 TP_fast_assign(
2223 LOCAL_ASSIGN;
2224 VIF_ASSIGN;
2225 CHANDEF_ASSIGN(&ch_switch->chandef)
2226 __entry->timestamp = ch_switch->timestamp;
2227 __entry->device_timestamp = ch_switch->device_timestamp;
2228 __entry->block_tx = ch_switch->block_tx;
2229 __entry->count = ch_switch->count;
2230 ),
2231
2232 TP_printk(
2233 LOCAL_PR_FMT VIF_PR_FMT " prepare channel switch to "
2234 CHANDEF_PR_FMT " count:%d block_tx:%d timestamp:%llu",
2235 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count,
2236 __entry->block_tx, __entry->timestamp
2237 )
2238);
2239
2240DEFINE_EVENT(local_sdata_evt, drv_post_channel_switch,
2241 TP_PROTO(struct ieee80211_local *local,
2242 struct ieee80211_sub_if_data *sdata),
2243 TP_ARGS(local, sdata)
2244);
2245
2246TRACE_EVENT(drv_get_txpower,
2247 TP_PROTO(struct ieee80211_local *local,
2248 struct ieee80211_sub_if_data *sdata,
2249 int dbm, int ret),
2250
2251 TP_ARGS(local, sdata, dbm, ret),
2252
2253 TP_STRUCT__entry(
2254 LOCAL_ENTRY
2255 VIF_ENTRY
2256 __field(int, dbm)
2257 __field(int, ret)
2258 ),
2259
2260 TP_fast_assign(
2261 LOCAL_ASSIGN;
2262 VIF_ASSIGN;
2263 __entry->dbm = dbm;
2264 __entry->ret = ret;
2265 ),
2266
2267 TP_printk(
2268 LOCAL_PR_FMT VIF_PR_FMT " dbm:%d ret:%d",
2269 LOCAL_PR_ARG, VIF_PR_ARG, __entry->dbm, __entry->ret
2270 )
2271);
2272
2273TRACE_EVENT(drv_tdls_channel_switch,
2274 TP_PROTO(struct ieee80211_local *local,
2275 struct ieee80211_sub_if_data *sdata,
2276 struct ieee80211_sta *sta, u8 oper_class,
2277 struct cfg80211_chan_def *chandef),
2278
2279 TP_ARGS(local, sdata, sta, oper_class, chandef),
2280
2281 TP_STRUCT__entry(
2282 LOCAL_ENTRY
2283 VIF_ENTRY
2284 STA_ENTRY
2285 __field(u8, oper_class)
2286 CHANDEF_ENTRY
2287 ),
2288
2289 TP_fast_assign(
2290 LOCAL_ASSIGN;
2291 VIF_ASSIGN;
2292 STA_ASSIGN;
2293 __entry->oper_class = oper_class;
2294 CHANDEF_ASSIGN(chandef)
2295 ),
2296
2297 TP_printk(
2298 LOCAL_PR_FMT VIF_PR_FMT " tdls channel switch to"
2299 CHANDEF_PR_FMT " oper_class:%d " STA_PR_FMT,
2300 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->oper_class,
2301 STA_PR_ARG
2302 )
2303);
2304
2305TRACE_EVENT(drv_tdls_cancel_channel_switch,
2306 TP_PROTO(struct ieee80211_local *local,
2307 struct ieee80211_sub_if_data *sdata,
2308 struct ieee80211_sta *sta),
2309
2310 TP_ARGS(local, sdata, sta),
2311
2312 TP_STRUCT__entry(
2313 LOCAL_ENTRY
2314 VIF_ENTRY
2315 STA_ENTRY
2316 ),
2317
2318 TP_fast_assign(
2319 LOCAL_ASSIGN;
2320 VIF_ASSIGN;
2321 STA_ASSIGN;
2322 ),
2323
2324 TP_printk(
2325 LOCAL_PR_FMT VIF_PR_FMT
2326 " tdls cancel channel switch with " STA_PR_FMT,
2327 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
2328 )
2329);
2330
2331TRACE_EVENT(drv_tdls_recv_channel_switch,
2332 TP_PROTO(struct ieee80211_local *local,
2333 struct ieee80211_sub_if_data *sdata,
2334 struct ieee80211_tdls_ch_sw_params *params),
2335
2336 TP_ARGS(local, sdata, params),
2337
2338 TP_STRUCT__entry(
2339 LOCAL_ENTRY
2340 VIF_ENTRY
2341 __field(u8, action_code)
2342 STA_ENTRY
2343 CHANDEF_ENTRY
2344 __field(u32, status)
2345 __field(bool, peer_initiator)
2346 __field(u32, timestamp)
2347 __field(u16, switch_time)
2348 __field(u16, switch_timeout)
2349 ),
2350
2351 TP_fast_assign(
2352 LOCAL_ASSIGN;
2353 VIF_ASSIGN;
2354 STA_NAMED_ASSIGN(params->sta);
2355 CHANDEF_ASSIGN(params->chandef)
2356 __entry->peer_initiator = params->sta->tdls_initiator;
2357 __entry->action_code = params->action_code;
2358 __entry->status = params->status;
2359 __entry->timestamp = params->timestamp;
2360 __entry->switch_time = params->switch_time;
2361 __entry->switch_timeout = params->switch_timeout;
2362 ),
2363
2364 TP_printk(
2365 LOCAL_PR_FMT VIF_PR_FMT " received tdls channel switch packet"
2366 " action:%d status:%d time:%d switch time:%d switch"
2367 " timeout:%d initiator: %d chan:" CHANDEF_PR_FMT STA_PR_FMT,
2368 LOCAL_PR_ARG, VIF_PR_ARG, __entry->action_code, __entry->status,
2369 __entry->timestamp, __entry->switch_time,
2370 __entry->switch_timeout, __entry->peer_initiator,
2371 CHANDEF_PR_ARG, STA_PR_ARG
2372 )
2373);
2374
2375TRACE_EVENT(drv_wake_tx_queue,
2376 TP_PROTO(struct ieee80211_local *local,
2377 struct ieee80211_sub_if_data *sdata,
2378 struct txq_info *txq),
2379
2380 TP_ARGS(local, sdata, txq),
2381
2382 TP_STRUCT__entry(
2383 LOCAL_ENTRY
2384 VIF_ENTRY
2385 STA_ENTRY
2386 __field(u8, ac)
2387 __field(u8, tid)
2388 ),
2389
2390 TP_fast_assign(
2391 struct ieee80211_sta *sta = txq->txq.sta;
2392
2393 LOCAL_ASSIGN;
2394 VIF_ASSIGN;
2395 STA_ASSIGN;
2396 __entry->ac = txq->txq.ac;
2397 __entry->tid = txq->txq.tid;
2398 ),
2399
2400 TP_printk(
2401 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ac:%d tid:%d",
2402 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ac, __entry->tid
2403 )
2404);
2405
2406#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
2407
2408#undef TRACE_INCLUDE_PATH
2409#define TRACE_INCLUDE_PATH .
2410#undef TRACE_INCLUDE_FILE
2411#define TRACE_INCLUDE_FILE trace
2412#include <trace/define_trace.h>