of: MSI: Simplify irqdomain lookup
[linux/fpc-iii.git] / net / mac80211 / trace.h
blob56c6d6cfa5a1a211818ef2b472d0900207fc0b6f
1 #if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
2 #define __MAC80211_DRIVER_TRACE
4 #include <linux/tracepoint.h>
5 #include <net/mac80211.h>
6 #include "ieee80211_i.h"
8 #undef TRACE_SYSTEM
9 #define TRACE_SYSTEM mac80211
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
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
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" : ""
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
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)
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
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
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
86 * Tracing for driver callbacks.
89 DECLARE_EVENT_CLASS(local_only_evt,
90 TP_PROTO(struct ieee80211_local *local),
91 TP_ARGS(local),
92 TP_STRUCT__entry(
93 LOCAL_ENTRY
95 TP_fast_assign(
96 LOCAL_ASSIGN;
98 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
101 DECLARE_EVENT_CLASS(local_sdata_addr_evt,
102 TP_PROTO(struct ieee80211_local *local,
103 struct ieee80211_sub_if_data *sdata),
104 TP_ARGS(local, sdata),
106 TP_STRUCT__entry(
107 LOCAL_ENTRY
108 VIF_ENTRY
109 __array(char, addr, ETH_ALEN)
112 TP_fast_assign(
113 LOCAL_ASSIGN;
114 VIF_ASSIGN;
115 memcpy(__entry->addr, sdata->vif.addr, ETH_ALEN);
118 TP_printk(
119 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
120 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
124 DECLARE_EVENT_CLASS(local_u32_evt,
125 TP_PROTO(struct ieee80211_local *local, u32 value),
126 TP_ARGS(local, value),
128 TP_STRUCT__entry(
129 LOCAL_ENTRY
130 __field(u32, value)
133 TP_fast_assign(
134 LOCAL_ASSIGN;
135 __entry->value = value;
138 TP_printk(
139 LOCAL_PR_FMT " value:%d",
140 LOCAL_PR_ARG, __entry->value
144 DECLARE_EVENT_CLASS(local_sdata_evt,
145 TP_PROTO(struct ieee80211_local *local,
146 struct ieee80211_sub_if_data *sdata),
147 TP_ARGS(local, sdata),
149 TP_STRUCT__entry(
150 LOCAL_ENTRY
151 VIF_ENTRY
154 TP_fast_assign(
155 LOCAL_ASSIGN;
156 VIF_ASSIGN;
159 TP_printk(
160 LOCAL_PR_FMT VIF_PR_FMT,
161 LOCAL_PR_ARG, VIF_PR_ARG
165 DEFINE_EVENT(local_only_evt, drv_return_void,
166 TP_PROTO(struct ieee80211_local *local),
167 TP_ARGS(local)
170 TRACE_EVENT(drv_return_int,
171 TP_PROTO(struct ieee80211_local *local, int ret),
172 TP_ARGS(local, ret),
173 TP_STRUCT__entry(
174 LOCAL_ENTRY
175 __field(int, ret)
177 TP_fast_assign(
178 LOCAL_ASSIGN;
179 __entry->ret = ret;
181 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
184 TRACE_EVENT(drv_return_bool,
185 TP_PROTO(struct ieee80211_local *local, bool ret),
186 TP_ARGS(local, ret),
187 TP_STRUCT__entry(
188 LOCAL_ENTRY
189 __field(bool, ret)
191 TP_fast_assign(
192 LOCAL_ASSIGN;
193 __entry->ret = ret;
195 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
196 "true" : "false")
199 TRACE_EVENT(drv_return_u32,
200 TP_PROTO(struct ieee80211_local *local, u32 ret),
201 TP_ARGS(local, ret),
202 TP_STRUCT__entry(
203 LOCAL_ENTRY
204 __field(u32, ret)
206 TP_fast_assign(
207 LOCAL_ASSIGN;
208 __entry->ret = ret;
210 TP_printk(LOCAL_PR_FMT " - %u", LOCAL_PR_ARG, __entry->ret)
213 TRACE_EVENT(drv_return_u64,
214 TP_PROTO(struct ieee80211_local *local, u64 ret),
215 TP_ARGS(local, ret),
216 TP_STRUCT__entry(
217 LOCAL_ENTRY
218 __field(u64, ret)
220 TP_fast_assign(
221 LOCAL_ASSIGN;
222 __entry->ret = ret;
224 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
227 DEFINE_EVENT(local_only_evt, drv_start,
228 TP_PROTO(struct ieee80211_local *local),
229 TP_ARGS(local)
232 DEFINE_EVENT(local_u32_evt, drv_get_et_strings,
233 TP_PROTO(struct ieee80211_local *local, u32 sset),
234 TP_ARGS(local, sset)
237 DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count,
238 TP_PROTO(struct ieee80211_local *local, u32 sset),
239 TP_ARGS(local, sset)
242 DEFINE_EVENT(local_only_evt, drv_get_et_stats,
243 TP_PROTO(struct ieee80211_local *local),
244 TP_ARGS(local)
247 DEFINE_EVENT(local_only_evt, drv_suspend,
248 TP_PROTO(struct ieee80211_local *local),
249 TP_ARGS(local)
252 DEFINE_EVENT(local_only_evt, drv_resume,
253 TP_PROTO(struct ieee80211_local *local),
254 TP_ARGS(local)
257 TRACE_EVENT(drv_set_wakeup,
258 TP_PROTO(struct ieee80211_local *local, bool enabled),
259 TP_ARGS(local, enabled),
260 TP_STRUCT__entry(
261 LOCAL_ENTRY
262 __field(bool, enabled)
264 TP_fast_assign(
265 LOCAL_ASSIGN;
266 __entry->enabled = enabled;
268 TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
271 DEFINE_EVENT(local_only_evt, drv_stop,
272 TP_PROTO(struct ieee80211_local *local),
273 TP_ARGS(local)
276 DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
277 TP_PROTO(struct ieee80211_local *local,
278 struct ieee80211_sub_if_data *sdata),
279 TP_ARGS(local, sdata)
282 TRACE_EVENT(drv_change_interface,
283 TP_PROTO(struct ieee80211_local *local,
284 struct ieee80211_sub_if_data *sdata,
285 enum nl80211_iftype type, bool p2p),
287 TP_ARGS(local, sdata, type, p2p),
289 TP_STRUCT__entry(
290 LOCAL_ENTRY
291 VIF_ENTRY
292 __field(u32, new_type)
293 __field(bool, new_p2p)
296 TP_fast_assign(
297 LOCAL_ASSIGN;
298 VIF_ASSIGN;
299 __entry->new_type = type;
300 __entry->new_p2p = p2p;
303 TP_printk(
304 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
305 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
306 __entry->new_p2p ? "/p2p" : ""
310 DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
311 TP_PROTO(struct ieee80211_local *local,
312 struct ieee80211_sub_if_data *sdata),
313 TP_ARGS(local, sdata)
316 TRACE_EVENT(drv_config,
317 TP_PROTO(struct ieee80211_local *local,
318 u32 changed),
320 TP_ARGS(local, changed),
322 TP_STRUCT__entry(
323 LOCAL_ENTRY
324 __field(u32, changed)
325 __field(u32, flags)
326 __field(int, power_level)
327 __field(int, dynamic_ps_timeout)
328 __field(u16, listen_interval)
329 __field(u8, long_frame_max_tx_count)
330 __field(u8, short_frame_max_tx_count)
331 CHANDEF_ENTRY
332 __field(int, smps)
335 TP_fast_assign(
336 LOCAL_ASSIGN;
337 __entry->changed = changed;
338 __entry->flags = local->hw.conf.flags;
339 __entry->power_level = local->hw.conf.power_level;
340 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
341 __entry->listen_interval = local->hw.conf.listen_interval;
342 __entry->long_frame_max_tx_count =
343 local->hw.conf.long_frame_max_tx_count;
344 __entry->short_frame_max_tx_count =
345 local->hw.conf.short_frame_max_tx_count;
346 CHANDEF_ASSIGN(&local->hw.conf.chandef)
347 __entry->smps = local->hw.conf.smps_mode;
350 TP_printk(
351 LOCAL_PR_FMT " ch:%#x" CHANDEF_PR_FMT,
352 LOCAL_PR_ARG, __entry->changed, CHANDEF_PR_ARG
356 TRACE_EVENT(drv_bss_info_changed,
357 TP_PROTO(struct ieee80211_local *local,
358 struct ieee80211_sub_if_data *sdata,
359 struct ieee80211_bss_conf *info,
360 u32 changed),
362 TP_ARGS(local, sdata, info, changed),
364 TP_STRUCT__entry(
365 LOCAL_ENTRY
366 VIF_ENTRY
367 __field(u32, changed)
368 __field(bool, assoc)
369 __field(bool, ibss_joined)
370 __field(bool, ibss_creator)
371 __field(u16, aid)
372 __field(bool, cts)
373 __field(bool, shortpre)
374 __field(bool, shortslot)
375 __field(bool, enable_beacon)
376 __field(u8, dtimper)
377 __field(u16, bcnint)
378 __field(u16, assoc_cap)
379 __field(u64, sync_tsf)
380 __field(u32, sync_device_ts)
381 __field(u8, sync_dtim_count)
382 __field(u32, basic_rates)
383 __array(int, mcast_rate, IEEE80211_NUM_BANDS)
384 __field(u16, ht_operation_mode)
385 __field(s32, cqm_rssi_thold);
386 __field(s32, cqm_rssi_hyst);
387 __field(u32, channel_width);
388 __field(u32, channel_cfreq1);
389 __dynamic_array(u32, arp_addr_list,
390 info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
391 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
392 info->arp_addr_cnt);
393 __field(int, arp_addr_cnt);
394 __field(bool, qos);
395 __field(bool, idle);
396 __field(bool, ps);
397 __dynamic_array(u8, ssid, info->ssid_len);
398 __field(bool, hidden_ssid);
399 __field(int, txpower)
400 __field(u8, p2p_oppps_ctwindow)
403 TP_fast_assign(
404 LOCAL_ASSIGN;
405 VIF_ASSIGN;
406 __entry->changed = changed;
407 __entry->aid = info->aid;
408 __entry->assoc = info->assoc;
409 __entry->ibss_joined = info->ibss_joined;
410 __entry->ibss_creator = info->ibss_creator;
411 __entry->shortpre = info->use_short_preamble;
412 __entry->cts = info->use_cts_prot;
413 __entry->shortslot = info->use_short_slot;
414 __entry->enable_beacon = info->enable_beacon;
415 __entry->dtimper = info->dtim_period;
416 __entry->bcnint = info->beacon_int;
417 __entry->assoc_cap = info->assoc_capability;
418 __entry->sync_tsf = info->sync_tsf;
419 __entry->sync_device_ts = info->sync_device_ts;
420 __entry->sync_dtim_count = info->sync_dtim_count;
421 __entry->basic_rates = info->basic_rates;
422 memcpy(__entry->mcast_rate, info->mcast_rate,
423 sizeof(__entry->mcast_rate));
424 __entry->ht_operation_mode = info->ht_operation_mode;
425 __entry->cqm_rssi_thold = info->cqm_rssi_thold;
426 __entry->cqm_rssi_hyst = info->cqm_rssi_hyst;
427 __entry->channel_width = info->chandef.width;
428 __entry->channel_cfreq1 = info->chandef.center_freq1;
429 __entry->arp_addr_cnt = info->arp_addr_cnt;
430 memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list,
431 sizeof(u32) * (info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
432 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
433 info->arp_addr_cnt));
434 __entry->qos = info->qos;
435 __entry->idle = info->idle;
436 __entry->ps = info->ps;
437 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
438 __entry->hidden_ssid = info->hidden_ssid;
439 __entry->txpower = info->txpower;
440 __entry->p2p_oppps_ctwindow = info->p2p_noa_attr.oppps_ctwindow;
443 TP_printk(
444 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
445 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
449 TRACE_EVENT(drv_prepare_multicast,
450 TP_PROTO(struct ieee80211_local *local, int mc_count),
452 TP_ARGS(local, mc_count),
454 TP_STRUCT__entry(
455 LOCAL_ENTRY
456 __field(int, mc_count)
459 TP_fast_assign(
460 LOCAL_ASSIGN;
461 __entry->mc_count = mc_count;
464 TP_printk(
465 LOCAL_PR_FMT " prepare mc (%d)",
466 LOCAL_PR_ARG, __entry->mc_count
470 TRACE_EVENT(drv_configure_filter,
471 TP_PROTO(struct ieee80211_local *local,
472 unsigned int changed_flags,
473 unsigned int *total_flags,
474 u64 multicast),
476 TP_ARGS(local, changed_flags, total_flags, multicast),
478 TP_STRUCT__entry(
479 LOCAL_ENTRY
480 __field(unsigned int, changed)
481 __field(unsigned int, total)
482 __field(u64, multicast)
485 TP_fast_assign(
486 LOCAL_ASSIGN;
487 __entry->changed = changed_flags;
488 __entry->total = *total_flags;
489 __entry->multicast = multicast;
492 TP_printk(
493 LOCAL_PR_FMT " changed:%#x total:%#x",
494 LOCAL_PR_ARG, __entry->changed, __entry->total
498 TRACE_EVENT(drv_config_iface_filter,
499 TP_PROTO(struct ieee80211_local *local,
500 struct ieee80211_sub_if_data *sdata,
501 unsigned int filter_flags,
502 unsigned int changed_flags),
504 TP_ARGS(local, sdata, filter_flags, changed_flags),
506 TP_STRUCT__entry(
507 LOCAL_ENTRY
508 VIF_ENTRY
509 __field(unsigned int, filter_flags)
510 __field(unsigned int, changed_flags)
513 TP_fast_assign(
514 LOCAL_ASSIGN;
515 VIF_ASSIGN;
516 __entry->filter_flags = filter_flags;
517 __entry->changed_flags = changed_flags;
520 TP_printk(
521 LOCAL_PR_FMT VIF_PR_FMT
522 " filter_flags: %#x changed_flags: %#x",
523 LOCAL_PR_ARG, VIF_PR_ARG, __entry->filter_flags,
524 __entry->changed_flags
528 TRACE_EVENT(drv_set_tim,
529 TP_PROTO(struct ieee80211_local *local,
530 struct ieee80211_sta *sta, bool set),
532 TP_ARGS(local, sta, set),
534 TP_STRUCT__entry(
535 LOCAL_ENTRY
536 STA_ENTRY
537 __field(bool, set)
540 TP_fast_assign(
541 LOCAL_ASSIGN;
542 STA_ASSIGN;
543 __entry->set = set;
546 TP_printk(
547 LOCAL_PR_FMT STA_PR_FMT " set:%d",
548 LOCAL_PR_ARG, STA_PR_ARG, __entry->set
552 TRACE_EVENT(drv_set_key,
553 TP_PROTO(struct ieee80211_local *local,
554 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
555 struct ieee80211_sta *sta,
556 struct ieee80211_key_conf *key),
558 TP_ARGS(local, cmd, sdata, sta, key),
560 TP_STRUCT__entry(
561 LOCAL_ENTRY
562 VIF_ENTRY
563 STA_ENTRY
564 KEY_ENTRY
567 TP_fast_assign(
568 LOCAL_ASSIGN;
569 VIF_ASSIGN;
570 STA_ASSIGN;
571 KEY_ASSIGN(key);
574 TP_printk(
575 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT KEY_PR_FMT,
576 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, KEY_PR_ARG
580 TRACE_EVENT(drv_update_tkip_key,
581 TP_PROTO(struct ieee80211_local *local,
582 struct ieee80211_sub_if_data *sdata,
583 struct ieee80211_key_conf *conf,
584 struct ieee80211_sta *sta, u32 iv32),
586 TP_ARGS(local, sdata, conf, sta, iv32),
588 TP_STRUCT__entry(
589 LOCAL_ENTRY
590 VIF_ENTRY
591 STA_ENTRY
592 __field(u32, iv32)
595 TP_fast_assign(
596 LOCAL_ASSIGN;
597 VIF_ASSIGN;
598 STA_ASSIGN;
599 __entry->iv32 = iv32;
602 TP_printk(
603 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
604 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->iv32
608 DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
609 TP_PROTO(struct ieee80211_local *local,
610 struct ieee80211_sub_if_data *sdata),
611 TP_ARGS(local, sdata)
614 DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
615 TP_PROTO(struct ieee80211_local *local,
616 struct ieee80211_sub_if_data *sdata),
617 TP_ARGS(local, sdata)
620 DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
621 TP_PROTO(struct ieee80211_local *local,
622 struct ieee80211_sub_if_data *sdata),
623 TP_ARGS(local, sdata)
626 DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
627 TP_PROTO(struct ieee80211_local *local,
628 struct ieee80211_sub_if_data *sdata),
629 TP_ARGS(local, sdata)
632 TRACE_EVENT(drv_sw_scan_start,
633 TP_PROTO(struct ieee80211_local *local,
634 struct ieee80211_sub_if_data *sdata,
635 const u8 *mac_addr),
637 TP_ARGS(local, sdata, mac_addr),
639 TP_STRUCT__entry(
640 LOCAL_ENTRY
641 VIF_ENTRY
642 __array(char, mac_addr, ETH_ALEN)
645 TP_fast_assign(
646 LOCAL_ASSIGN;
647 VIF_ASSIGN;
648 memcpy(__entry->mac_addr, mac_addr, ETH_ALEN);
651 TP_printk(LOCAL_PR_FMT ", " VIF_PR_FMT ", addr:%pM",
652 LOCAL_PR_ARG, VIF_PR_ARG, __entry->mac_addr)
655 DEFINE_EVENT(local_sdata_evt, drv_sw_scan_complete,
656 TP_PROTO(struct ieee80211_local *local,
657 struct ieee80211_sub_if_data *sdata),
658 TP_ARGS(local, sdata)
661 TRACE_EVENT(drv_get_stats,
662 TP_PROTO(struct ieee80211_local *local,
663 struct ieee80211_low_level_stats *stats,
664 int ret),
666 TP_ARGS(local, stats, ret),
668 TP_STRUCT__entry(
669 LOCAL_ENTRY
670 __field(int, ret)
671 __field(unsigned int, ackfail)
672 __field(unsigned int, rtsfail)
673 __field(unsigned int, fcserr)
674 __field(unsigned int, rtssucc)
677 TP_fast_assign(
678 LOCAL_ASSIGN;
679 __entry->ret = ret;
680 __entry->ackfail = stats->dot11ACKFailureCount;
681 __entry->rtsfail = stats->dot11RTSFailureCount;
682 __entry->fcserr = stats->dot11FCSErrorCount;
683 __entry->rtssucc = stats->dot11RTSSuccessCount;
686 TP_printk(
687 LOCAL_PR_FMT " ret:%d",
688 LOCAL_PR_ARG, __entry->ret
692 TRACE_EVENT(drv_get_key_seq,
693 TP_PROTO(struct ieee80211_local *local,
694 struct ieee80211_key_conf *key),
696 TP_ARGS(local, key),
698 TP_STRUCT__entry(
699 LOCAL_ENTRY
700 KEY_ENTRY
703 TP_fast_assign(
704 LOCAL_ASSIGN;
705 KEY_ASSIGN(key);
708 TP_printk(
709 LOCAL_PR_FMT KEY_PR_FMT,
710 LOCAL_PR_ARG, KEY_PR_ARG
714 DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
715 TP_PROTO(struct ieee80211_local *local, u32 value),
716 TP_ARGS(local, value)
719 DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
720 TP_PROTO(struct ieee80211_local *local, u32 value),
721 TP_ARGS(local, value)
724 TRACE_EVENT(drv_set_coverage_class,
725 TP_PROTO(struct ieee80211_local *local, s16 value),
727 TP_ARGS(local, value),
729 TP_STRUCT__entry(
730 LOCAL_ENTRY
731 __field(s16, value)
734 TP_fast_assign(
735 LOCAL_ASSIGN;
736 __entry->value = value;
739 TP_printk(
740 LOCAL_PR_FMT " value:%d",
741 LOCAL_PR_ARG, __entry->value
745 TRACE_EVENT(drv_sta_notify,
746 TP_PROTO(struct ieee80211_local *local,
747 struct ieee80211_sub_if_data *sdata,
748 enum sta_notify_cmd cmd,
749 struct ieee80211_sta *sta),
751 TP_ARGS(local, sdata, cmd, sta),
753 TP_STRUCT__entry(
754 LOCAL_ENTRY
755 VIF_ENTRY
756 STA_ENTRY
757 __field(u32, cmd)
760 TP_fast_assign(
761 LOCAL_ASSIGN;
762 VIF_ASSIGN;
763 STA_ASSIGN;
764 __entry->cmd = cmd;
767 TP_printk(
768 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
769 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
773 TRACE_EVENT(drv_sta_state,
774 TP_PROTO(struct ieee80211_local *local,
775 struct ieee80211_sub_if_data *sdata,
776 struct ieee80211_sta *sta,
777 enum ieee80211_sta_state old_state,
778 enum ieee80211_sta_state new_state),
780 TP_ARGS(local, sdata, sta, old_state, new_state),
782 TP_STRUCT__entry(
783 LOCAL_ENTRY
784 VIF_ENTRY
785 STA_ENTRY
786 __field(u32, old_state)
787 __field(u32, new_state)
790 TP_fast_assign(
791 LOCAL_ASSIGN;
792 VIF_ASSIGN;
793 STA_ASSIGN;
794 __entry->old_state = old_state;
795 __entry->new_state = new_state;
798 TP_printk(
799 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
800 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
801 __entry->old_state, __entry->new_state
805 TRACE_EVENT(drv_sta_rc_update,
806 TP_PROTO(struct ieee80211_local *local,
807 struct ieee80211_sub_if_data *sdata,
808 struct ieee80211_sta *sta,
809 u32 changed),
811 TP_ARGS(local, sdata, sta, changed),
813 TP_STRUCT__entry(
814 LOCAL_ENTRY
815 VIF_ENTRY
816 STA_ENTRY
817 __field(u32, changed)
820 TP_fast_assign(
821 LOCAL_ASSIGN;
822 VIF_ASSIGN;
823 STA_ASSIGN;
824 __entry->changed = changed;
827 TP_printk(
828 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
829 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
833 DECLARE_EVENT_CLASS(sta_event,
834 TP_PROTO(struct ieee80211_local *local,
835 struct ieee80211_sub_if_data *sdata,
836 struct ieee80211_sta *sta),
838 TP_ARGS(local, sdata, sta),
840 TP_STRUCT__entry(
841 LOCAL_ENTRY
842 VIF_ENTRY
843 STA_ENTRY
846 TP_fast_assign(
847 LOCAL_ASSIGN;
848 VIF_ASSIGN;
849 STA_ASSIGN;
852 TP_printk(
853 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
854 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
858 DEFINE_EVENT(sta_event, drv_sta_statistics,
859 TP_PROTO(struct ieee80211_local *local,
860 struct ieee80211_sub_if_data *sdata,
861 struct ieee80211_sta *sta),
862 TP_ARGS(local, sdata, sta)
865 DEFINE_EVENT(sta_event, drv_sta_add,
866 TP_PROTO(struct ieee80211_local *local,
867 struct ieee80211_sub_if_data *sdata,
868 struct ieee80211_sta *sta),
869 TP_ARGS(local, sdata, sta)
872 DEFINE_EVENT(sta_event, drv_sta_remove,
873 TP_PROTO(struct ieee80211_local *local,
874 struct ieee80211_sub_if_data *sdata,
875 struct ieee80211_sta *sta),
876 TP_ARGS(local, sdata, sta)
879 DEFINE_EVENT(sta_event, drv_sta_pre_rcu_remove,
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)
886 DEFINE_EVENT(sta_event, drv_sta_rate_tbl_update,
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)
893 TRACE_EVENT(drv_conf_tx,
894 TP_PROTO(struct ieee80211_local *local,
895 struct ieee80211_sub_if_data *sdata,
896 u16 ac, const struct ieee80211_tx_queue_params *params),
898 TP_ARGS(local, sdata, ac, params),
900 TP_STRUCT__entry(
901 LOCAL_ENTRY
902 VIF_ENTRY
903 __field(u16, ac)
904 __field(u16, txop)
905 __field(u16, cw_min)
906 __field(u16, cw_max)
907 __field(u8, aifs)
908 __field(bool, uapsd)
911 TP_fast_assign(
912 LOCAL_ASSIGN;
913 VIF_ASSIGN;
914 __entry->ac = ac;
915 __entry->txop = params->txop;
916 __entry->cw_max = params->cw_max;
917 __entry->cw_min = params->cw_min;
918 __entry->aifs = params->aifs;
919 __entry->uapsd = params->uapsd;
922 TP_printk(
923 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
924 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
928 DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
929 TP_PROTO(struct ieee80211_local *local,
930 struct ieee80211_sub_if_data *sdata),
931 TP_ARGS(local, sdata)
934 TRACE_EVENT(drv_set_tsf,
935 TP_PROTO(struct ieee80211_local *local,
936 struct ieee80211_sub_if_data *sdata,
937 u64 tsf),
939 TP_ARGS(local, sdata, tsf),
941 TP_STRUCT__entry(
942 LOCAL_ENTRY
943 VIF_ENTRY
944 __field(u64, tsf)
947 TP_fast_assign(
948 LOCAL_ASSIGN;
949 VIF_ASSIGN;
950 __entry->tsf = tsf;
953 TP_printk(
954 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
955 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
959 DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
960 TP_PROTO(struct ieee80211_local *local,
961 struct ieee80211_sub_if_data *sdata),
962 TP_ARGS(local, sdata)
965 DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
966 TP_PROTO(struct ieee80211_local *local),
967 TP_ARGS(local)
970 TRACE_EVENT(drv_ampdu_action,
971 TP_PROTO(struct ieee80211_local *local,
972 struct ieee80211_sub_if_data *sdata,
973 enum ieee80211_ampdu_mlme_action action,
974 struct ieee80211_sta *sta, u16 tid,
975 u16 *ssn, u8 buf_size, bool amsdu),
977 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size, amsdu),
979 TP_STRUCT__entry(
980 LOCAL_ENTRY
981 STA_ENTRY
982 __field(u32, action)
983 __field(u16, tid)
984 __field(u16, ssn)
985 __field(u8, buf_size)
986 __field(bool, amsdu)
987 VIF_ENTRY
990 TP_fast_assign(
991 LOCAL_ASSIGN;
992 VIF_ASSIGN;
993 STA_ASSIGN;
994 __entry->action = action;
995 __entry->tid = tid;
996 __entry->ssn = ssn ? *ssn : 0;
997 __entry->buf_size = buf_size;
998 __entry->amsdu = amsdu;
1001 TP_printk(
1002 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d amsdu:%d",
1003 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
1004 __entry->tid, __entry->buf_size, __entry->amsdu
1008 TRACE_EVENT(drv_get_survey,
1009 TP_PROTO(struct ieee80211_local *local, int idx,
1010 struct survey_info *survey),
1012 TP_ARGS(local, idx, survey),
1014 TP_STRUCT__entry(
1015 LOCAL_ENTRY
1016 __field(int, idx)
1019 TP_fast_assign(
1020 LOCAL_ASSIGN;
1021 __entry->idx = idx;
1024 TP_printk(
1025 LOCAL_PR_FMT " idx:%d",
1026 LOCAL_PR_ARG, __entry->idx
1030 TRACE_EVENT(drv_flush,
1031 TP_PROTO(struct ieee80211_local *local,
1032 u32 queues, bool drop),
1034 TP_ARGS(local, queues, drop),
1036 TP_STRUCT__entry(
1037 LOCAL_ENTRY
1038 __field(bool, drop)
1039 __field(u32, queues)
1042 TP_fast_assign(
1043 LOCAL_ASSIGN;
1044 __entry->drop = drop;
1045 __entry->queues = queues;
1048 TP_printk(
1049 LOCAL_PR_FMT " queues:0x%x drop:%d",
1050 LOCAL_PR_ARG, __entry->queues, __entry->drop
1054 TRACE_EVENT(drv_channel_switch,
1055 TP_PROTO(struct ieee80211_local *local,
1056 struct ieee80211_sub_if_data *sdata,
1057 struct ieee80211_channel_switch *ch_switch),
1059 TP_ARGS(local, sdata, ch_switch),
1061 TP_STRUCT__entry(
1062 LOCAL_ENTRY
1063 VIF_ENTRY
1064 CHANDEF_ENTRY
1065 __field(u64, timestamp)
1066 __field(u32, device_timestamp)
1067 __field(bool, block_tx)
1068 __field(u8, count)
1071 TP_fast_assign(
1072 LOCAL_ASSIGN;
1073 VIF_ASSIGN;
1074 CHANDEF_ASSIGN(&ch_switch->chandef)
1075 __entry->timestamp = ch_switch->timestamp;
1076 __entry->device_timestamp = ch_switch->device_timestamp;
1077 __entry->block_tx = ch_switch->block_tx;
1078 __entry->count = ch_switch->count;
1081 TP_printk(
1082 LOCAL_PR_FMT VIF_PR_FMT " new " CHANDEF_PR_FMT " count:%d",
1083 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count
1087 TRACE_EVENT(drv_set_antenna,
1088 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1090 TP_ARGS(local, tx_ant, rx_ant, ret),
1092 TP_STRUCT__entry(
1093 LOCAL_ENTRY
1094 __field(u32, tx_ant)
1095 __field(u32, rx_ant)
1096 __field(int, ret)
1099 TP_fast_assign(
1100 LOCAL_ASSIGN;
1101 __entry->tx_ant = tx_ant;
1102 __entry->rx_ant = rx_ant;
1103 __entry->ret = ret;
1106 TP_printk(
1107 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1108 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1112 TRACE_EVENT(drv_get_antenna,
1113 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1115 TP_ARGS(local, tx_ant, rx_ant, ret),
1117 TP_STRUCT__entry(
1118 LOCAL_ENTRY
1119 __field(u32, tx_ant)
1120 __field(u32, rx_ant)
1121 __field(int, ret)
1124 TP_fast_assign(
1125 LOCAL_ASSIGN;
1126 __entry->tx_ant = tx_ant;
1127 __entry->rx_ant = rx_ant;
1128 __entry->ret = ret;
1131 TP_printk(
1132 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1133 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1137 TRACE_EVENT(drv_remain_on_channel,
1138 TP_PROTO(struct ieee80211_local *local,
1139 struct ieee80211_sub_if_data *sdata,
1140 struct ieee80211_channel *chan,
1141 unsigned int duration,
1142 enum ieee80211_roc_type type),
1144 TP_ARGS(local, sdata, chan, duration, type),
1146 TP_STRUCT__entry(
1147 LOCAL_ENTRY
1148 VIF_ENTRY
1149 __field(int, center_freq)
1150 __field(unsigned int, duration)
1151 __field(u32, type)
1154 TP_fast_assign(
1155 LOCAL_ASSIGN;
1156 VIF_ASSIGN;
1157 __entry->center_freq = chan->center_freq;
1158 __entry->duration = duration;
1159 __entry->type = type;
1162 TP_printk(
1163 LOCAL_PR_FMT VIF_PR_FMT " freq:%dMHz duration:%dms type=%d",
1164 LOCAL_PR_ARG, VIF_PR_ARG,
1165 __entry->center_freq, __entry->duration, __entry->type
1169 DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
1170 TP_PROTO(struct ieee80211_local *local),
1171 TP_ARGS(local)
1174 TRACE_EVENT(drv_set_ringparam,
1175 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1177 TP_ARGS(local, tx, rx),
1179 TP_STRUCT__entry(
1180 LOCAL_ENTRY
1181 __field(u32, tx)
1182 __field(u32, rx)
1185 TP_fast_assign(
1186 LOCAL_ASSIGN;
1187 __entry->tx = tx;
1188 __entry->rx = rx;
1191 TP_printk(
1192 LOCAL_PR_FMT " tx:%d rx %d",
1193 LOCAL_PR_ARG, __entry->tx, __entry->rx
1197 TRACE_EVENT(drv_get_ringparam,
1198 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1199 u32 *rx, u32 *rx_max),
1201 TP_ARGS(local, tx, tx_max, rx, rx_max),
1203 TP_STRUCT__entry(
1204 LOCAL_ENTRY
1205 __field(u32, tx)
1206 __field(u32, tx_max)
1207 __field(u32, rx)
1208 __field(u32, rx_max)
1211 TP_fast_assign(
1212 LOCAL_ASSIGN;
1213 __entry->tx = *tx;
1214 __entry->tx_max = *tx_max;
1215 __entry->rx = *rx;
1216 __entry->rx_max = *rx_max;
1219 TP_printk(
1220 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1221 LOCAL_PR_ARG,
1222 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1226 DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1227 TP_PROTO(struct ieee80211_local *local),
1228 TP_ARGS(local)
1231 DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1232 TP_PROTO(struct ieee80211_local *local),
1233 TP_ARGS(local)
1236 TRACE_EVENT(drv_set_bitrate_mask,
1237 TP_PROTO(struct ieee80211_local *local,
1238 struct ieee80211_sub_if_data *sdata,
1239 const struct cfg80211_bitrate_mask *mask),
1241 TP_ARGS(local, sdata, mask),
1243 TP_STRUCT__entry(
1244 LOCAL_ENTRY
1245 VIF_ENTRY
1246 __field(u32, legacy_2g)
1247 __field(u32, legacy_5g)
1250 TP_fast_assign(
1251 LOCAL_ASSIGN;
1252 VIF_ASSIGN;
1253 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1254 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1257 TP_printk(
1258 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1259 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1263 TRACE_EVENT(drv_set_rekey_data,
1264 TP_PROTO(struct ieee80211_local *local,
1265 struct ieee80211_sub_if_data *sdata,
1266 struct cfg80211_gtk_rekey_data *data),
1268 TP_ARGS(local, sdata, data),
1270 TP_STRUCT__entry(
1271 LOCAL_ENTRY
1272 VIF_ENTRY
1273 __array(u8, kek, NL80211_KEK_LEN)
1274 __array(u8, kck, NL80211_KCK_LEN)
1275 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1278 TP_fast_assign(
1279 LOCAL_ASSIGN;
1280 VIF_ASSIGN;
1281 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1282 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1283 memcpy(__entry->replay_ctr, data->replay_ctr,
1284 NL80211_REPLAY_CTR_LEN);
1287 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1288 LOCAL_PR_ARG, VIF_PR_ARG)
1291 TRACE_EVENT(drv_event_callback,
1292 TP_PROTO(struct ieee80211_local *local,
1293 struct ieee80211_sub_if_data *sdata,
1294 const struct ieee80211_event *_event),
1296 TP_ARGS(local, sdata, _event),
1298 TP_STRUCT__entry(
1299 LOCAL_ENTRY
1300 VIF_ENTRY
1301 __field(u32, type)
1304 TP_fast_assign(
1305 LOCAL_ASSIGN;
1306 VIF_ASSIGN;
1307 __entry->type = _event->type;
1310 TP_printk(
1311 LOCAL_PR_FMT VIF_PR_FMT " event:%d",
1312 LOCAL_PR_ARG, VIF_PR_ARG, __entry->type
1316 DECLARE_EVENT_CLASS(release_evt,
1317 TP_PROTO(struct ieee80211_local *local,
1318 struct ieee80211_sta *sta,
1319 u16 tids, int num_frames,
1320 enum ieee80211_frame_release_type reason,
1321 bool more_data),
1323 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1325 TP_STRUCT__entry(
1326 LOCAL_ENTRY
1327 STA_ENTRY
1328 __field(u16, tids)
1329 __field(int, num_frames)
1330 __field(int, reason)
1331 __field(bool, more_data)
1334 TP_fast_assign(
1335 LOCAL_ASSIGN;
1336 STA_ASSIGN;
1337 __entry->tids = tids;
1338 __entry->num_frames = num_frames;
1339 __entry->reason = reason;
1340 __entry->more_data = more_data;
1343 TP_printk(
1344 LOCAL_PR_FMT STA_PR_FMT
1345 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1346 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1347 __entry->reason, __entry->more_data
1351 DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1352 TP_PROTO(struct ieee80211_local *local,
1353 struct ieee80211_sta *sta,
1354 u16 tids, int num_frames,
1355 enum ieee80211_frame_release_type reason,
1356 bool more_data),
1358 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1361 DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1362 TP_PROTO(struct ieee80211_local *local,
1363 struct ieee80211_sta *sta,
1364 u16 tids, int num_frames,
1365 enum ieee80211_frame_release_type reason,
1366 bool more_data),
1368 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1371 DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
1372 TP_PROTO(struct ieee80211_local *local,
1373 struct ieee80211_sub_if_data *sdata),
1375 TP_ARGS(local, sdata)
1378 DEFINE_EVENT(local_sdata_evt, drv_mgd_protect_tdls_discover,
1379 TP_PROTO(struct ieee80211_local *local,
1380 struct ieee80211_sub_if_data *sdata),
1382 TP_ARGS(local, sdata)
1385 DECLARE_EVENT_CLASS(local_chanctx,
1386 TP_PROTO(struct ieee80211_local *local,
1387 struct ieee80211_chanctx *ctx),
1389 TP_ARGS(local, ctx),
1391 TP_STRUCT__entry(
1392 LOCAL_ENTRY
1393 CHANCTX_ENTRY
1396 TP_fast_assign(
1397 LOCAL_ASSIGN;
1398 CHANCTX_ASSIGN;
1401 TP_printk(
1402 LOCAL_PR_FMT CHANCTX_PR_FMT,
1403 LOCAL_PR_ARG, CHANCTX_PR_ARG
1407 DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1408 TP_PROTO(struct ieee80211_local *local,
1409 struct ieee80211_chanctx *ctx),
1410 TP_ARGS(local, ctx)
1413 DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1414 TP_PROTO(struct ieee80211_local *local,
1415 struct ieee80211_chanctx *ctx),
1416 TP_ARGS(local, ctx)
1419 TRACE_EVENT(drv_change_chanctx,
1420 TP_PROTO(struct ieee80211_local *local,
1421 struct ieee80211_chanctx *ctx,
1422 u32 changed),
1424 TP_ARGS(local, ctx, changed),
1426 TP_STRUCT__entry(
1427 LOCAL_ENTRY
1428 CHANCTX_ENTRY
1429 __field(u32, changed)
1432 TP_fast_assign(
1433 LOCAL_ASSIGN;
1434 CHANCTX_ASSIGN;
1435 __entry->changed = changed;
1438 TP_printk(
1439 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1440 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1444 #if !defined(__TRACE_VIF_ENTRY)
1445 #define __TRACE_VIF_ENTRY
1446 struct trace_vif_entry {
1447 enum nl80211_iftype vif_type;
1448 bool p2p;
1449 char vif_name[IFNAMSIZ];
1450 } __packed;
1452 struct trace_chandef_entry {
1453 u32 control_freq;
1454 u32 chan_width;
1455 u32 center_freq1;
1456 u32 center_freq2;
1457 } __packed;
1459 struct trace_switch_entry {
1460 struct trace_vif_entry vif;
1461 struct trace_chandef_entry old_chandef;
1462 struct trace_chandef_entry new_chandef;
1463 } __packed;
1465 #define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
1466 #endif
1468 TRACE_EVENT(drv_switch_vif_chanctx,
1469 TP_PROTO(struct ieee80211_local *local,
1470 struct ieee80211_vif_chanctx_switch *vifs,
1471 int n_vifs, enum ieee80211_chanctx_switch_mode mode),
1472 TP_ARGS(local, vifs, n_vifs, mode),
1474 TP_STRUCT__entry(
1475 LOCAL_ENTRY
1476 __field(int, n_vifs)
1477 __field(u32, mode)
1478 __dynamic_array(u8, vifs,
1479 sizeof(struct trace_switch_entry) * n_vifs)
1482 TP_fast_assign(
1483 LOCAL_ASSIGN;
1484 __entry->n_vifs = n_vifs;
1485 __entry->mode = mode;
1487 struct trace_switch_entry *local_vifs =
1488 __get_dynamic_array(vifs);
1489 int i;
1491 for (i = 0; i < n_vifs; i++) {
1492 struct ieee80211_sub_if_data *sdata;
1494 sdata = container_of(vifs[i].vif,
1495 struct ieee80211_sub_if_data,
1496 vif);
1498 SWITCH_ENTRY_ASSIGN(vif.vif_type, vif->type);
1499 SWITCH_ENTRY_ASSIGN(vif.p2p, vif->p2p);
1500 strncpy(local_vifs[i].vif.vif_name,
1501 sdata->name,
1502 sizeof(local_vifs[i].vif.vif_name));
1503 SWITCH_ENTRY_ASSIGN(old_chandef.control_freq,
1504 old_ctx->def.chan->center_freq);
1505 SWITCH_ENTRY_ASSIGN(old_chandef.chan_width,
1506 old_ctx->def.width);
1507 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq1,
1508 old_ctx->def.center_freq1);
1509 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq2,
1510 old_ctx->def.center_freq2);
1511 SWITCH_ENTRY_ASSIGN(new_chandef.control_freq,
1512 new_ctx->def.chan->center_freq);
1513 SWITCH_ENTRY_ASSIGN(new_chandef.chan_width,
1514 new_ctx->def.width);
1515 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq1,
1516 new_ctx->def.center_freq1);
1517 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq2,
1518 new_ctx->def.center_freq2);
1523 TP_printk(
1524 LOCAL_PR_FMT " n_vifs:%d mode:%d",
1525 LOCAL_PR_ARG, __entry->n_vifs, __entry->mode
1529 DECLARE_EVENT_CLASS(local_sdata_chanctx,
1530 TP_PROTO(struct ieee80211_local *local,
1531 struct ieee80211_sub_if_data *sdata,
1532 struct ieee80211_chanctx *ctx),
1534 TP_ARGS(local, sdata, ctx),
1536 TP_STRUCT__entry(
1537 LOCAL_ENTRY
1538 VIF_ENTRY
1539 CHANCTX_ENTRY
1542 TP_fast_assign(
1543 LOCAL_ASSIGN;
1544 VIF_ASSIGN;
1545 CHANCTX_ASSIGN;
1548 TP_printk(
1549 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
1550 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
1554 DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1555 TP_PROTO(struct ieee80211_local *local,
1556 struct ieee80211_sub_if_data *sdata,
1557 struct ieee80211_chanctx *ctx),
1558 TP_ARGS(local, sdata, ctx)
1561 DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1562 TP_PROTO(struct ieee80211_local *local,
1563 struct ieee80211_sub_if_data *sdata,
1564 struct ieee80211_chanctx *ctx),
1565 TP_ARGS(local, sdata, ctx)
1568 TRACE_EVENT(drv_start_ap,
1569 TP_PROTO(struct ieee80211_local *local,
1570 struct ieee80211_sub_if_data *sdata,
1571 struct ieee80211_bss_conf *info),
1573 TP_ARGS(local, sdata, info),
1575 TP_STRUCT__entry(
1576 LOCAL_ENTRY
1577 VIF_ENTRY
1578 __field(u8, dtimper)
1579 __field(u16, bcnint)
1580 __dynamic_array(u8, ssid, info->ssid_len);
1581 __field(bool, hidden_ssid);
1584 TP_fast_assign(
1585 LOCAL_ASSIGN;
1586 VIF_ASSIGN;
1587 __entry->dtimper = info->dtim_period;
1588 __entry->bcnint = info->beacon_int;
1589 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1590 __entry->hidden_ssid = info->hidden_ssid;
1593 TP_printk(
1594 LOCAL_PR_FMT VIF_PR_FMT,
1595 LOCAL_PR_ARG, VIF_PR_ARG
1599 DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
1600 TP_PROTO(struct ieee80211_local *local,
1601 struct ieee80211_sub_if_data *sdata),
1602 TP_ARGS(local, sdata)
1605 TRACE_EVENT(drv_reconfig_complete,
1606 TP_PROTO(struct ieee80211_local *local,
1607 enum ieee80211_reconfig_type reconfig_type),
1608 TP_ARGS(local, reconfig_type),
1610 TP_STRUCT__entry(
1611 LOCAL_ENTRY
1612 __field(u8, reconfig_type)
1615 TP_fast_assign(
1616 LOCAL_ASSIGN;
1617 __entry->reconfig_type = reconfig_type;
1620 TP_printk(
1621 LOCAL_PR_FMT " reconfig_type:%d",
1622 LOCAL_PR_ARG, __entry->reconfig_type
1627 #if IS_ENABLED(CONFIG_IPV6)
1628 DEFINE_EVENT(local_sdata_evt, drv_ipv6_addr_change,
1629 TP_PROTO(struct ieee80211_local *local,
1630 struct ieee80211_sub_if_data *sdata),
1631 TP_ARGS(local, sdata)
1633 #endif
1635 TRACE_EVENT(drv_join_ibss,
1636 TP_PROTO(struct ieee80211_local *local,
1637 struct ieee80211_sub_if_data *sdata,
1638 struct ieee80211_bss_conf *info),
1640 TP_ARGS(local, sdata, info),
1642 TP_STRUCT__entry(
1643 LOCAL_ENTRY
1644 VIF_ENTRY
1645 __field(u8, dtimper)
1646 __field(u16, bcnint)
1647 __dynamic_array(u8, ssid, info->ssid_len);
1650 TP_fast_assign(
1651 LOCAL_ASSIGN;
1652 VIF_ASSIGN;
1653 __entry->dtimper = info->dtim_period;
1654 __entry->bcnint = info->beacon_int;
1655 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1658 TP_printk(
1659 LOCAL_PR_FMT VIF_PR_FMT,
1660 LOCAL_PR_ARG, VIF_PR_ARG
1664 DEFINE_EVENT(local_sdata_evt, drv_leave_ibss,
1665 TP_PROTO(struct ieee80211_local *local,
1666 struct ieee80211_sub_if_data *sdata),
1667 TP_ARGS(local, sdata)
1670 TRACE_EVENT(drv_get_expected_throughput,
1671 TP_PROTO(struct ieee80211_sta *sta),
1673 TP_ARGS(sta),
1675 TP_STRUCT__entry(
1676 STA_ENTRY
1679 TP_fast_assign(
1680 STA_ASSIGN;
1683 TP_printk(
1684 STA_PR_FMT, STA_PR_ARG
1689 * Tracing for API calls that drivers call.
1692 TRACE_EVENT(api_start_tx_ba_session,
1693 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1695 TP_ARGS(sta, tid),
1697 TP_STRUCT__entry(
1698 STA_ENTRY
1699 __field(u16, tid)
1702 TP_fast_assign(
1703 STA_ASSIGN;
1704 __entry->tid = tid;
1707 TP_printk(
1708 STA_PR_FMT " tid:%d",
1709 STA_PR_ARG, __entry->tid
1713 TRACE_EVENT(api_start_tx_ba_cb,
1714 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1716 TP_ARGS(sdata, ra, tid),
1718 TP_STRUCT__entry(
1719 VIF_ENTRY
1720 __array(u8, ra, ETH_ALEN)
1721 __field(u16, tid)
1724 TP_fast_assign(
1725 VIF_ASSIGN;
1726 memcpy(__entry->ra, ra, ETH_ALEN);
1727 __entry->tid = tid;
1730 TP_printk(
1731 VIF_PR_FMT " ra:%pM tid:%d",
1732 VIF_PR_ARG, __entry->ra, __entry->tid
1736 TRACE_EVENT(api_stop_tx_ba_session,
1737 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1739 TP_ARGS(sta, tid),
1741 TP_STRUCT__entry(
1742 STA_ENTRY
1743 __field(u16, tid)
1746 TP_fast_assign(
1747 STA_ASSIGN;
1748 __entry->tid = tid;
1751 TP_printk(
1752 STA_PR_FMT " tid:%d",
1753 STA_PR_ARG, __entry->tid
1757 TRACE_EVENT(api_stop_tx_ba_cb,
1758 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1760 TP_ARGS(sdata, ra, tid),
1762 TP_STRUCT__entry(
1763 VIF_ENTRY
1764 __array(u8, ra, ETH_ALEN)
1765 __field(u16, tid)
1768 TP_fast_assign(
1769 VIF_ASSIGN;
1770 memcpy(__entry->ra, ra, ETH_ALEN);
1771 __entry->tid = tid;
1774 TP_printk(
1775 VIF_PR_FMT " ra:%pM tid:%d",
1776 VIF_PR_ARG, __entry->ra, __entry->tid
1780 DEFINE_EVENT(local_only_evt, api_restart_hw,
1781 TP_PROTO(struct ieee80211_local *local),
1782 TP_ARGS(local)
1785 TRACE_EVENT(api_beacon_loss,
1786 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1788 TP_ARGS(sdata),
1790 TP_STRUCT__entry(
1791 VIF_ENTRY
1794 TP_fast_assign(
1795 VIF_ASSIGN;
1798 TP_printk(
1799 VIF_PR_FMT,
1800 VIF_PR_ARG
1804 TRACE_EVENT(api_connection_loss,
1805 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1807 TP_ARGS(sdata),
1809 TP_STRUCT__entry(
1810 VIF_ENTRY
1813 TP_fast_assign(
1814 VIF_ASSIGN;
1817 TP_printk(
1818 VIF_PR_FMT,
1819 VIF_PR_ARG
1823 TRACE_EVENT(api_cqm_rssi_notify,
1824 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1825 enum nl80211_cqm_rssi_threshold_event rssi_event),
1827 TP_ARGS(sdata, rssi_event),
1829 TP_STRUCT__entry(
1830 VIF_ENTRY
1831 __field(u32, rssi_event)
1834 TP_fast_assign(
1835 VIF_ASSIGN;
1836 __entry->rssi_event = rssi_event;
1839 TP_printk(
1840 VIF_PR_FMT " event:%d",
1841 VIF_PR_ARG, __entry->rssi_event
1845 DEFINE_EVENT(local_sdata_evt, api_cqm_beacon_loss_notify,
1846 TP_PROTO(struct ieee80211_local *local,
1847 struct ieee80211_sub_if_data *sdata),
1848 TP_ARGS(local, sdata)
1851 TRACE_EVENT(api_scan_completed,
1852 TP_PROTO(struct ieee80211_local *local, bool aborted),
1854 TP_ARGS(local, aborted),
1856 TP_STRUCT__entry(
1857 LOCAL_ENTRY
1858 __field(bool, aborted)
1861 TP_fast_assign(
1862 LOCAL_ASSIGN;
1863 __entry->aborted = aborted;
1866 TP_printk(
1867 LOCAL_PR_FMT " aborted:%d",
1868 LOCAL_PR_ARG, __entry->aborted
1872 TRACE_EVENT(api_sched_scan_results,
1873 TP_PROTO(struct ieee80211_local *local),
1875 TP_ARGS(local),
1877 TP_STRUCT__entry(
1878 LOCAL_ENTRY
1881 TP_fast_assign(
1882 LOCAL_ASSIGN;
1885 TP_printk(
1886 LOCAL_PR_FMT, LOCAL_PR_ARG
1890 TRACE_EVENT(api_sched_scan_stopped,
1891 TP_PROTO(struct ieee80211_local *local),
1893 TP_ARGS(local),
1895 TP_STRUCT__entry(
1896 LOCAL_ENTRY
1899 TP_fast_assign(
1900 LOCAL_ASSIGN;
1903 TP_printk(
1904 LOCAL_PR_FMT, LOCAL_PR_ARG
1908 TRACE_EVENT(api_sta_block_awake,
1909 TP_PROTO(struct ieee80211_local *local,
1910 struct ieee80211_sta *sta, bool block),
1912 TP_ARGS(local, sta, block),
1914 TP_STRUCT__entry(
1915 LOCAL_ENTRY
1916 STA_ENTRY
1917 __field(bool, block)
1920 TP_fast_assign(
1921 LOCAL_ASSIGN;
1922 STA_ASSIGN;
1923 __entry->block = block;
1926 TP_printk(
1927 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1928 LOCAL_PR_ARG, STA_PR_ARG, __entry->block
1932 TRACE_EVENT(api_chswitch_done,
1933 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1935 TP_ARGS(sdata, success),
1937 TP_STRUCT__entry(
1938 VIF_ENTRY
1939 __field(bool, success)
1942 TP_fast_assign(
1943 VIF_ASSIGN;
1944 __entry->success = success;
1947 TP_printk(
1948 VIF_PR_FMT " success=%d",
1949 VIF_PR_ARG, __entry->success
1953 DEFINE_EVENT(local_only_evt, api_ready_on_channel,
1954 TP_PROTO(struct ieee80211_local *local),
1955 TP_ARGS(local)
1958 DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
1959 TP_PROTO(struct ieee80211_local *local),
1960 TP_ARGS(local)
1963 TRACE_EVENT(api_gtk_rekey_notify,
1964 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1965 const u8 *bssid, const u8 *replay_ctr),
1967 TP_ARGS(sdata, bssid, replay_ctr),
1969 TP_STRUCT__entry(
1970 VIF_ENTRY
1971 __array(u8, bssid, ETH_ALEN)
1972 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1975 TP_fast_assign(
1976 VIF_ASSIGN;
1977 memcpy(__entry->bssid, bssid, ETH_ALEN);
1978 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1981 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1984 TRACE_EVENT(api_enable_rssi_reports,
1985 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1986 int rssi_min_thold, int rssi_max_thold),
1988 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1990 TP_STRUCT__entry(
1991 VIF_ENTRY
1992 __field(int, rssi_min_thold)
1993 __field(int, rssi_max_thold)
1996 TP_fast_assign(
1997 VIF_ASSIGN;
1998 __entry->rssi_min_thold = rssi_min_thold;
1999 __entry->rssi_max_thold = rssi_max_thold;
2002 TP_printk(
2003 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
2004 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
2008 TRACE_EVENT(api_eosp,
2009 TP_PROTO(struct ieee80211_local *local,
2010 struct ieee80211_sta *sta),
2012 TP_ARGS(local, sta),
2014 TP_STRUCT__entry(
2015 LOCAL_ENTRY
2016 STA_ENTRY
2019 TP_fast_assign(
2020 LOCAL_ASSIGN;
2021 STA_ASSIGN;
2024 TP_printk(
2025 LOCAL_PR_FMT STA_PR_FMT,
2026 LOCAL_PR_ARG, STA_PR_ARG
2030 TRACE_EVENT(api_sta_set_buffered,
2031 TP_PROTO(struct ieee80211_local *local,
2032 struct ieee80211_sta *sta,
2033 u8 tid, bool buffered),
2035 TP_ARGS(local, sta, tid, buffered),
2037 TP_STRUCT__entry(
2038 LOCAL_ENTRY
2039 STA_ENTRY
2040 __field(u8, tid)
2041 __field(bool, buffered)
2044 TP_fast_assign(
2045 LOCAL_ASSIGN;
2046 STA_ASSIGN;
2047 __entry->tid = tid;
2048 __entry->buffered = buffered;
2051 TP_printk(
2052 LOCAL_PR_FMT STA_PR_FMT " tid:%d buffered:%d",
2053 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid, __entry->buffered
2058 * Tracing for internal functions
2059 * (which may also be called in response to driver calls)
2062 TRACE_EVENT(wake_queue,
2063 TP_PROTO(struct ieee80211_local *local, u16 queue,
2064 enum queue_stop_reason reason),
2066 TP_ARGS(local, queue, reason),
2068 TP_STRUCT__entry(
2069 LOCAL_ENTRY
2070 __field(u16, queue)
2071 __field(u32, reason)
2074 TP_fast_assign(
2075 LOCAL_ASSIGN;
2076 __entry->queue = queue;
2077 __entry->reason = reason;
2080 TP_printk(
2081 LOCAL_PR_FMT " queue:%d, reason:%d",
2082 LOCAL_PR_ARG, __entry->queue, __entry->reason
2086 TRACE_EVENT(stop_queue,
2087 TP_PROTO(struct ieee80211_local *local, u16 queue,
2088 enum queue_stop_reason reason),
2090 TP_ARGS(local, queue, reason),
2092 TP_STRUCT__entry(
2093 LOCAL_ENTRY
2094 __field(u16, queue)
2095 __field(u32, reason)
2098 TP_fast_assign(
2099 LOCAL_ASSIGN;
2100 __entry->queue = queue;
2101 __entry->reason = reason;
2104 TP_printk(
2105 LOCAL_PR_FMT " queue:%d, reason:%d",
2106 LOCAL_PR_ARG, __entry->queue, __entry->reason
2110 TRACE_EVENT(drv_set_default_unicast_key,
2111 TP_PROTO(struct ieee80211_local *local,
2112 struct ieee80211_sub_if_data *sdata,
2113 int key_idx),
2115 TP_ARGS(local, sdata, key_idx),
2117 TP_STRUCT__entry(
2118 LOCAL_ENTRY
2119 VIF_ENTRY
2120 __field(int, key_idx)
2123 TP_fast_assign(
2124 LOCAL_ASSIGN;
2125 VIF_ASSIGN;
2126 __entry->key_idx = key_idx;
2129 TP_printk(LOCAL_PR_FMT VIF_PR_FMT " key_idx:%d",
2130 LOCAL_PR_ARG, VIF_PR_ARG, __entry->key_idx)
2133 TRACE_EVENT(api_radar_detected,
2134 TP_PROTO(struct ieee80211_local *local),
2136 TP_ARGS(local),
2138 TP_STRUCT__entry(
2139 LOCAL_ENTRY
2142 TP_fast_assign(
2143 LOCAL_ASSIGN;
2146 TP_printk(
2147 LOCAL_PR_FMT " radar detected",
2148 LOCAL_PR_ARG
2152 TRACE_EVENT(drv_channel_switch_beacon,
2153 TP_PROTO(struct ieee80211_local *local,
2154 struct ieee80211_sub_if_data *sdata,
2155 struct cfg80211_chan_def *chandef),
2157 TP_ARGS(local, sdata, chandef),
2159 TP_STRUCT__entry(
2160 LOCAL_ENTRY
2161 VIF_ENTRY
2162 CHANDEF_ENTRY
2165 TP_fast_assign(
2166 LOCAL_ASSIGN;
2167 VIF_ASSIGN;
2168 CHANDEF_ASSIGN(chandef);
2171 TP_printk(
2172 LOCAL_PR_FMT VIF_PR_FMT " channel switch to " CHANDEF_PR_FMT,
2173 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG
2177 TRACE_EVENT(drv_pre_channel_switch,
2178 TP_PROTO(struct ieee80211_local *local,
2179 struct ieee80211_sub_if_data *sdata,
2180 struct ieee80211_channel_switch *ch_switch),
2182 TP_ARGS(local, sdata, ch_switch),
2184 TP_STRUCT__entry(
2185 LOCAL_ENTRY
2186 VIF_ENTRY
2187 CHANDEF_ENTRY
2188 __field(u64, timestamp)
2189 __field(u32, device_timestamp)
2190 __field(bool, block_tx)
2191 __field(u8, count)
2194 TP_fast_assign(
2195 LOCAL_ASSIGN;
2196 VIF_ASSIGN;
2197 CHANDEF_ASSIGN(&ch_switch->chandef)
2198 __entry->timestamp = ch_switch->timestamp;
2199 __entry->device_timestamp = ch_switch->device_timestamp;
2200 __entry->block_tx = ch_switch->block_tx;
2201 __entry->count = ch_switch->count;
2204 TP_printk(
2205 LOCAL_PR_FMT VIF_PR_FMT " prepare channel switch to "
2206 CHANDEF_PR_FMT " count:%d block_tx:%d timestamp:%llu",
2207 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count,
2208 __entry->block_tx, __entry->timestamp
2212 DEFINE_EVENT(local_sdata_evt, drv_post_channel_switch,
2213 TP_PROTO(struct ieee80211_local *local,
2214 struct ieee80211_sub_if_data *sdata),
2215 TP_ARGS(local, sdata)
2218 TRACE_EVENT(drv_get_txpower,
2219 TP_PROTO(struct ieee80211_local *local,
2220 struct ieee80211_sub_if_data *sdata,
2221 int dbm, int ret),
2223 TP_ARGS(local, sdata, dbm, ret),
2225 TP_STRUCT__entry(
2226 LOCAL_ENTRY
2227 VIF_ENTRY
2228 __field(int, dbm)
2229 __field(int, ret)
2232 TP_fast_assign(
2233 LOCAL_ASSIGN;
2234 VIF_ASSIGN;
2235 __entry->dbm = dbm;
2236 __entry->ret = ret;
2239 TP_printk(
2240 LOCAL_PR_FMT VIF_PR_FMT " dbm:%d ret:%d",
2241 LOCAL_PR_ARG, VIF_PR_ARG, __entry->dbm, __entry->ret
2245 TRACE_EVENT(drv_tdls_channel_switch,
2246 TP_PROTO(struct ieee80211_local *local,
2247 struct ieee80211_sub_if_data *sdata,
2248 struct ieee80211_sta *sta, u8 oper_class,
2249 struct cfg80211_chan_def *chandef),
2251 TP_ARGS(local, sdata, sta, oper_class, chandef),
2253 TP_STRUCT__entry(
2254 LOCAL_ENTRY
2255 VIF_ENTRY
2256 STA_ENTRY
2257 __field(u8, oper_class)
2258 CHANDEF_ENTRY
2261 TP_fast_assign(
2262 LOCAL_ASSIGN;
2263 VIF_ASSIGN;
2264 STA_ASSIGN;
2265 __entry->oper_class = oper_class;
2266 CHANDEF_ASSIGN(chandef)
2269 TP_printk(
2270 LOCAL_PR_FMT VIF_PR_FMT " tdls channel switch to"
2271 CHANDEF_PR_FMT " oper_class:%d " STA_PR_FMT,
2272 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->oper_class,
2273 STA_PR_ARG
2277 TRACE_EVENT(drv_tdls_cancel_channel_switch,
2278 TP_PROTO(struct ieee80211_local *local,
2279 struct ieee80211_sub_if_data *sdata,
2280 struct ieee80211_sta *sta),
2282 TP_ARGS(local, sdata, sta),
2284 TP_STRUCT__entry(
2285 LOCAL_ENTRY
2286 VIF_ENTRY
2287 STA_ENTRY
2290 TP_fast_assign(
2291 LOCAL_ASSIGN;
2292 VIF_ASSIGN;
2293 STA_ASSIGN;
2296 TP_printk(
2297 LOCAL_PR_FMT VIF_PR_FMT
2298 " tdls cancel channel switch with " STA_PR_FMT,
2299 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
2303 TRACE_EVENT(drv_tdls_recv_channel_switch,
2304 TP_PROTO(struct ieee80211_local *local,
2305 struct ieee80211_sub_if_data *sdata,
2306 struct ieee80211_tdls_ch_sw_params *params),
2308 TP_ARGS(local, sdata, params),
2310 TP_STRUCT__entry(
2311 LOCAL_ENTRY
2312 VIF_ENTRY
2313 __field(u8, action_code)
2314 STA_ENTRY
2315 CHANDEF_ENTRY
2316 __field(u32, status)
2317 __field(bool, peer_initiator)
2318 __field(u32, timestamp)
2319 __field(u16, switch_time)
2320 __field(u16, switch_timeout)
2323 TP_fast_assign(
2324 LOCAL_ASSIGN;
2325 VIF_ASSIGN;
2326 STA_NAMED_ASSIGN(params->sta);
2327 CHANDEF_ASSIGN(params->chandef)
2328 __entry->peer_initiator = params->sta->tdls_initiator;
2329 __entry->action_code = params->action_code;
2330 __entry->status = params->status;
2331 __entry->timestamp = params->timestamp;
2332 __entry->switch_time = params->switch_time;
2333 __entry->switch_timeout = params->switch_timeout;
2336 TP_printk(
2337 LOCAL_PR_FMT VIF_PR_FMT " received tdls channel switch packet"
2338 " action:%d status:%d time:%d switch time:%d switch"
2339 " timeout:%d initiator: %d chan:" CHANDEF_PR_FMT STA_PR_FMT,
2340 LOCAL_PR_ARG, VIF_PR_ARG, __entry->action_code, __entry->status,
2341 __entry->timestamp, __entry->switch_time,
2342 __entry->switch_timeout, __entry->peer_initiator,
2343 CHANDEF_PR_ARG, STA_PR_ARG
2347 TRACE_EVENT(drv_wake_tx_queue,
2348 TP_PROTO(struct ieee80211_local *local,
2349 struct ieee80211_sub_if_data *sdata,
2350 struct txq_info *txq),
2352 TP_ARGS(local, sdata, txq),
2354 TP_STRUCT__entry(
2355 LOCAL_ENTRY
2356 VIF_ENTRY
2357 STA_ENTRY
2358 __field(u8, ac)
2359 __field(u8, tid)
2362 TP_fast_assign(
2363 struct ieee80211_sta *sta = txq->txq.sta;
2365 LOCAL_ASSIGN;
2366 VIF_ASSIGN;
2367 STA_ASSIGN;
2368 __entry->ac = txq->txq.ac;
2369 __entry->tid = txq->txq.tid;
2372 TP_printk(
2373 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ac:%d tid:%d",
2374 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ac, __entry->tid
2378 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
2380 #undef TRACE_INCLUDE_PATH
2381 #define TRACE_INCLUDE_PATH .
2382 #undef TRACE_INCLUDE_FILE
2383 #define TRACE_INCLUDE_FILE trace
2384 #include <trace/define_trace.h>