2 * Portions of this file
3 * Copyright(c) 2016 Intel Deutschland GmbH
6 #if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
7 #define __MAC80211_DRIVER_TRACE
9 #include <linux/tracepoint.h>
10 #include <net/mac80211.h>
11 #include "ieee80211_i.h"
14 #define TRACE_SYSTEM mac80211
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
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
28 #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
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" : ""
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
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)
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
65 #define CHANCTX_ENTRY 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
77 #define KEY_ENTRY __field(u32, cipher) \
78 __field(u8, hw_key_idx) \
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
88 #define AMPDU_ACTION_ENTRY __field(enum ieee80211_ampdu_mlme_action, \
89 ieee80211_ampdu_mlme_action) \
93 __field(u8, buf_size) \
94 __field(bool, amsdu) \
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
107 * Tracing for driver callbacks.
110 DECLARE_EVENT_CLASS(local_only_evt
,
111 TP_PROTO(struct ieee80211_local
*local
),
119 TP_printk(LOCAL_PR_FMT
, LOCAL_PR_ARG
)
122 DECLARE_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
),
130 __array(char, addr
, ETH_ALEN
)
136 memcpy(__entry
->addr
, sdata
->vif
.addr
, ETH_ALEN
);
140 LOCAL_PR_FMT VIF_PR_FMT
" addr:%pM",
141 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->addr
145 DECLARE_EVENT_CLASS(local_u32_evt
,
146 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
147 TP_ARGS(local
, value
),
156 __entry
->value
= value
;
160 LOCAL_PR_FMT
" value:%d",
161 LOCAL_PR_ARG
, __entry
->value
165 DECLARE_EVENT_CLASS(local_sdata_evt
,
166 TP_PROTO(struct ieee80211_local
*local
,
167 struct ieee80211_sub_if_data
*sdata
),
168 TP_ARGS(local
, sdata
),
181 LOCAL_PR_FMT VIF_PR_FMT
,
182 LOCAL_PR_ARG
, VIF_PR_ARG
186 DEFINE_EVENT(local_only_evt
, drv_return_void
,
187 TP_PROTO(struct ieee80211_local
*local
),
191 TRACE_EVENT(drv_return_int
,
192 TP_PROTO(struct ieee80211_local
*local
, int ret
),
202 TP_printk(LOCAL_PR_FMT
" - %d", LOCAL_PR_ARG
, __entry
->ret
)
205 TRACE_EVENT(drv_return_bool
,
206 TP_PROTO(struct ieee80211_local
*local
, bool ret
),
216 TP_printk(LOCAL_PR_FMT
" - %s", LOCAL_PR_ARG
, (__entry
->ret
) ?
220 TRACE_EVENT(drv_return_u32
,
221 TP_PROTO(struct ieee80211_local
*local
, u32 ret
),
231 TP_printk(LOCAL_PR_FMT
" - %u", LOCAL_PR_ARG
, __entry
->ret
)
234 TRACE_EVENT(drv_return_u64
,
235 TP_PROTO(struct ieee80211_local
*local
, u64 ret
),
245 TP_printk(LOCAL_PR_FMT
" - %llu", LOCAL_PR_ARG
, __entry
->ret
)
248 DEFINE_EVENT(local_only_evt
, drv_start
,
249 TP_PROTO(struct ieee80211_local
*local
),
253 DEFINE_EVENT(local_u32_evt
, drv_get_et_strings
,
254 TP_PROTO(struct ieee80211_local
*local
, u32 sset
),
258 DEFINE_EVENT(local_u32_evt
, drv_get_et_sset_count
,
259 TP_PROTO(struct ieee80211_local
*local
, u32 sset
),
263 DEFINE_EVENT(local_only_evt
, drv_get_et_stats
,
264 TP_PROTO(struct ieee80211_local
*local
),
268 DEFINE_EVENT(local_only_evt
, drv_suspend
,
269 TP_PROTO(struct ieee80211_local
*local
),
273 DEFINE_EVENT(local_only_evt
, drv_resume
,
274 TP_PROTO(struct ieee80211_local
*local
),
278 TRACE_EVENT(drv_set_wakeup
,
279 TP_PROTO(struct ieee80211_local
*local
, bool enabled
),
280 TP_ARGS(local
, enabled
),
283 __field(bool, enabled
)
287 __entry
->enabled
= enabled
;
289 TP_printk(LOCAL_PR_FMT
" enabled:%d", LOCAL_PR_ARG
, __entry
->enabled
)
292 DEFINE_EVENT(local_only_evt
, drv_stop
,
293 TP_PROTO(struct ieee80211_local
*local
),
297 DEFINE_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
)
303 TRACE_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
),
308 TP_ARGS(local
, sdata
, type
, p2p
),
313 __field(u32
, new_type
)
314 __field(bool, new_p2p
)
320 __entry
->new_type
= type
;
321 __entry
->new_p2p
= p2p
;
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" : ""
331 DEFINE_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
)
337 TRACE_EVENT(drv_config
,
338 TP_PROTO(struct ieee80211_local
*local
,
341 TP_ARGS(local
, changed
),
345 __field(u32
, changed
)
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
)
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
;
372 LOCAL_PR_FMT
" ch:%#x" CHANDEF_PR_FMT
,
373 LOCAL_PR_ARG
, __entry
->changed
, CHANDEF_PR_ARG
377 TRACE_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
,
383 TP_ARGS(local
, sdata
, info
, changed
),
388 __field(u32
, changed
)
390 __field(bool, ibss_joined
)
391 __field(bool, ibss_creator
)
394 __field(bool, shortpre
)
395 __field(bool, shortslot
)
396 __field(bool, enable_beacon
)
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
:
414 __field(int, arp_addr_cnt
);
418 __dynamic_array(u8
, ssid
, info
->ssid_len
);
419 __field(bool, hidden_ssid
);
420 __field(int, txpower
)
421 __field(u8
, p2p_oppps_ctwindow
)
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
;
465 LOCAL_PR_FMT VIF_PR_FMT
" changed:%#x",
466 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->changed
470 TRACE_EVENT(drv_prepare_multicast
,
471 TP_PROTO(struct ieee80211_local
*local
, int mc_count
),
473 TP_ARGS(local
, mc_count
),
477 __field(int, mc_count
)
482 __entry
->mc_count
= mc_count
;
486 LOCAL_PR_FMT
" prepare mc (%d)",
487 LOCAL_PR_ARG
, __entry
->mc_count
491 TRACE_EVENT(drv_configure_filter
,
492 TP_PROTO(struct ieee80211_local
*local
,
493 unsigned int changed_flags
,
494 unsigned int *total_flags
,
497 TP_ARGS(local
, changed_flags
, total_flags
, multicast
),
501 __field(unsigned int, changed
)
502 __field(unsigned int, total
)
503 __field(u64
, multicast
)
508 __entry
->changed
= changed_flags
;
509 __entry
->total
= *total_flags
;
510 __entry
->multicast
= multicast
;
514 LOCAL_PR_FMT
" changed:%#x total:%#x",
515 LOCAL_PR_ARG
, __entry
->changed
, __entry
->total
519 TRACE_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
),
525 TP_ARGS(local
, sdata
, filter_flags
, changed_flags
),
530 __field(unsigned int, filter_flags
)
531 __field(unsigned int, changed_flags
)
537 __entry
->filter_flags
= filter_flags
;
538 __entry
->changed_flags
= changed_flags
;
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
549 TRACE_EVENT(drv_set_tim
,
550 TP_PROTO(struct ieee80211_local
*local
,
551 struct ieee80211_sta
*sta
, bool set
),
553 TP_ARGS(local
, sta
, set
),
568 LOCAL_PR_FMT STA_PR_FMT
" set:%d",
569 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->set
573 TRACE_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
),
579 TP_ARGS(local
, cmd
, sdata
, sta
, key
),
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
601 TRACE_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
),
607 TP_ARGS(local
, sdata
, conf
, sta
, iv32
),
620 __entry
->iv32
= iv32
;
624 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" iv32:%#x",
625 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->iv32
629 DEFINE_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
)
635 DEFINE_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
)
641 DEFINE_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
)
647 DEFINE_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
)
653 TRACE_EVENT(drv_sw_scan_start
,
654 TP_PROTO(struct ieee80211_local
*local
,
655 struct ieee80211_sub_if_data
*sdata
,
658 TP_ARGS(local
, sdata
, mac_addr
),
663 __array(char, mac_addr
, ETH_ALEN
)
669 memcpy(__entry
->mac_addr
, mac_addr
, ETH_ALEN
);
672 TP_printk(LOCAL_PR_FMT
", " VIF_PR_FMT
", addr:%pM",
673 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->mac_addr
)
676 DEFINE_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
)
682 TRACE_EVENT(drv_get_stats
,
683 TP_PROTO(struct ieee80211_local
*local
,
684 struct ieee80211_low_level_stats
*stats
,
687 TP_ARGS(local
, stats
, ret
),
692 __field(unsigned int, ackfail
)
693 __field(unsigned int, rtsfail
)
694 __field(unsigned int, fcserr
)
695 __field(unsigned int, rtssucc
)
701 __entry
->ackfail
= stats
->dot11ACKFailureCount
;
702 __entry
->rtsfail
= stats
->dot11RTSFailureCount
;
703 __entry
->fcserr
= stats
->dot11FCSErrorCount
;
704 __entry
->rtssucc
= stats
->dot11RTSSuccessCount
;
708 LOCAL_PR_FMT
" ret:%d",
709 LOCAL_PR_ARG
, __entry
->ret
713 TRACE_EVENT(drv_get_key_seq
,
714 TP_PROTO(struct ieee80211_local
*local
,
715 struct ieee80211_key_conf
*key
),
730 LOCAL_PR_FMT KEY_PR_FMT
,
731 LOCAL_PR_ARG
, KEY_PR_ARG
735 DEFINE_EVENT(local_u32_evt
, drv_set_frag_threshold
,
736 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
737 TP_ARGS(local
, value
)
740 DEFINE_EVENT(local_u32_evt
, drv_set_rts_threshold
,
741 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
742 TP_ARGS(local
, value
)
745 TRACE_EVENT(drv_set_coverage_class
,
746 TP_PROTO(struct ieee80211_local
*local
, s16 value
),
748 TP_ARGS(local
, value
),
757 __entry
->value
= value
;
761 LOCAL_PR_FMT
" value:%d",
762 LOCAL_PR_ARG
, __entry
->value
766 TRACE_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
),
772 TP_ARGS(local
, sdata
, cmd
, sta
),
789 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" cmd:%d",
790 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->cmd
794 TRACE_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
),
801 TP_ARGS(local
, sdata
, sta
, old_state
, new_state
),
807 __field(u32
, old_state
)
808 __field(u32
, new_state
)
815 __entry
->old_state
= old_state
;
816 __entry
->new_state
= new_state
;
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
826 TRACE_EVENT(drv_sta_rc_update
,
827 TP_PROTO(struct ieee80211_local
*local
,
828 struct ieee80211_sub_if_data
*sdata
,
829 struct ieee80211_sta
*sta
,
832 TP_ARGS(local
, sdata
, sta
, changed
),
838 __field(u32
, changed
)
845 __entry
->changed
= changed
;
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
854 DECLARE_EVENT_CLASS(sta_event
,
855 TP_PROTO(struct ieee80211_local
*local
,
856 struct ieee80211_sub_if_data
*sdata
,
857 struct ieee80211_sta
*sta
),
859 TP_ARGS(local
, sdata
, sta
),
874 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
,
875 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
879 DEFINE_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
)
886 DEFINE_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
)
893 DEFINE_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
)
900 DEFINE_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
)
907 DEFINE_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
)
914 DEFINE_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
)
921 TRACE_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
),
926 TP_ARGS(local
, sdata
, ac
, params
),
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
;
951 LOCAL_PR_FMT VIF_PR_FMT
" AC:%d",
952 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->ac
956 DEFINE_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
)
962 TRACE_EVENT(drv_set_tsf
,
963 TP_PROTO(struct ieee80211_local
*local
,
964 struct ieee80211_sub_if_data
*sdata
,
967 TP_ARGS(local
, sdata
, tsf
),
982 LOCAL_PR_FMT VIF_PR_FMT
" tsf:%llu",
983 LOCAL_PR_ARG
, VIF_PR_ARG
, (unsigned long long)__entry
->tsf
987 TRACE_EVENT(drv_offset_tsf
,
988 TP_PROTO(struct ieee80211_local
*local
,
989 struct ieee80211_sub_if_data
*sdata
,
992 TP_ARGS(local
, sdata
, offset
),
997 __field(s64
, tsf_offset
)
1003 __entry
->tsf_offset
= offset
;
1007 LOCAL_PR_FMT VIF_PR_FMT
" tsf offset:%lld",
1008 LOCAL_PR_ARG
, VIF_PR_ARG
,
1009 (unsigned long long)__entry
->tsf_offset
1013 DEFINE_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
)
1019 DEFINE_EVENT(local_only_evt
, drv_tx_last_beacon
,
1020 TP_PROTO(struct ieee80211_local
*local
),
1024 TRACE_EVENT(drv_ampdu_action
,
1025 TP_PROTO(struct ieee80211_local
*local
,
1026 struct ieee80211_sub_if_data
*sdata
,
1027 struct ieee80211_ampdu_params
*params
),
1029 TP_ARGS(local
, sdata
, params
),
1040 AMPDU_ACTION_ASSIGN
;
1044 LOCAL_PR_FMT VIF_PR_FMT AMPDU_ACTION_PR_FMT
,
1045 LOCAL_PR_ARG
, VIF_PR_ARG
, AMPDU_ACTION_PR_ARG
1049 TRACE_EVENT(drv_get_survey
,
1050 TP_PROTO(struct ieee80211_local
*local
, int idx
,
1051 struct survey_info
*survey
),
1053 TP_ARGS(local
, idx
, survey
),
1066 LOCAL_PR_FMT
" idx:%d",
1067 LOCAL_PR_ARG
, __entry
->idx
1071 TRACE_EVENT(drv_flush
,
1072 TP_PROTO(struct ieee80211_local
*local
,
1073 u32 queues
, bool drop
),
1075 TP_ARGS(local
, queues
, drop
),
1080 __field(u32
, queues
)
1085 __entry
->drop
= drop
;
1086 __entry
->queues
= queues
;
1090 LOCAL_PR_FMT
" queues:0x%x drop:%d",
1091 LOCAL_PR_ARG
, __entry
->queues
, __entry
->drop
1095 TRACE_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
),
1100 TP_ARGS(local
, sdata
, ch_switch
),
1106 __field(u64
, timestamp
)
1107 __field(u32
, device_timestamp
)
1108 __field(bool, block_tx
)
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
;
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
1128 TRACE_EVENT(drv_set_antenna
,
1129 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
1131 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
1135 __field(u32
, tx_ant
)
1136 __field(u32
, rx_ant
)
1142 __entry
->tx_ant
= tx_ant
;
1143 __entry
->rx_ant
= rx_ant
;
1148 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
1149 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
1153 TRACE_EVENT(drv_get_antenna
,
1154 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
1156 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
1160 __field(u32
, tx_ant
)
1161 __field(u32
, rx_ant
)
1167 __entry
->tx_ant
= tx_ant
;
1168 __entry
->rx_ant
= rx_ant
;
1173 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
1174 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
1178 TRACE_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
),
1185 TP_ARGS(local
, sdata
, chan
, duration
, type
),
1190 __field(int, center_freq
)
1191 __field(unsigned int, duration
)
1198 __entry
->center_freq
= chan
->center_freq
;
1199 __entry
->duration
= duration
;
1200 __entry
->type
= type
;
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
1210 DEFINE_EVENT(local_only_evt
, drv_cancel_remain_on_channel
,
1211 TP_PROTO(struct ieee80211_local
*local
),
1215 TRACE_EVENT(drv_set_ringparam
,
1216 TP_PROTO(struct ieee80211_local
*local
, u32 tx
, u32 rx
),
1218 TP_ARGS(local
, tx
, rx
),
1233 LOCAL_PR_FMT
" tx:%d rx %d",
1234 LOCAL_PR_ARG
, __entry
->tx
, __entry
->rx
1238 TRACE_EVENT(drv_get_ringparam
,
1239 TP_PROTO(struct ieee80211_local
*local
, u32
*tx
, u32
*tx_max
,
1240 u32
*rx
, u32
*rx_max
),
1242 TP_ARGS(local
, tx
, tx_max
, rx
, rx_max
),
1247 __field(u32
, tx_max
)
1249 __field(u32
, rx_max
)
1255 __entry
->tx_max
= *tx_max
;
1257 __entry
->rx_max
= *rx_max
;
1261 LOCAL_PR_FMT
" tx:%d tx_max %d rx %d rx_max %d",
1263 __entry
->tx
, __entry
->tx_max
, __entry
->rx
, __entry
->rx_max
1267 DEFINE_EVENT(local_only_evt
, drv_tx_frames_pending
,
1268 TP_PROTO(struct ieee80211_local
*local
),
1272 DEFINE_EVENT(local_only_evt
, drv_offchannel_tx_cancel_wait
,
1273 TP_PROTO(struct ieee80211_local
*local
),
1277 TRACE_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
),
1282 TP_ARGS(local
, sdata
, mask
),
1287 __field(u32
, legacy_2g
)
1288 __field(u32
, legacy_5g
)
1294 __entry
->legacy_2g
= mask
->control
[NL80211_BAND_2GHZ
].legacy
;
1295 __entry
->legacy_5g
= mask
->control
[NL80211_BAND_5GHZ
].legacy
;
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
1304 TRACE_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
),
1309 TP_ARGS(local
, sdata
, data
),
1314 __array(u8
, kek
, NL80211_KEK_LEN
)
1315 __array(u8
, kck
, NL80211_KCK_LEN
)
1316 __array(u8
, replay_ctr
, NL80211_REPLAY_CTR_LEN
)
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
);
1328 TP_printk(LOCAL_PR_FMT VIF_PR_FMT
,
1329 LOCAL_PR_ARG
, VIF_PR_ARG
)
1332 TRACE_EVENT(drv_event_callback
,
1333 TP_PROTO(struct ieee80211_local
*local
,
1334 struct ieee80211_sub_if_data
*sdata
,
1335 const struct ieee80211_event
*_event
),
1337 TP_ARGS(local
, sdata
, _event
),
1348 __entry
->type
= _event
->type
;
1352 LOCAL_PR_FMT VIF_PR_FMT
" event:%d",
1353 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->type
1357 DECLARE_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
,
1364 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
),
1370 __field(int, num_frames
)
1371 __field(int, reason
)
1372 __field(bool, more_data
)
1378 __entry
->tids
= tids
;
1379 __entry
->num_frames
= num_frames
;
1380 __entry
->reason
= reason
;
1381 __entry
->more_data
= more_data
;
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
1392 DEFINE_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
,
1399 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
)
1402 DEFINE_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
,
1409 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
)
1412 DEFINE_EVENT(local_sdata_evt
, drv_mgd_prepare_tx
,
1413 TP_PROTO(struct ieee80211_local
*local
,
1414 struct ieee80211_sub_if_data
*sdata
),
1416 TP_ARGS(local
, sdata
)
1419 DEFINE_EVENT(local_sdata_evt
, drv_mgd_protect_tdls_discover
,
1420 TP_PROTO(struct ieee80211_local
*local
,
1421 struct ieee80211_sub_if_data
*sdata
),
1423 TP_ARGS(local
, sdata
)
1426 DECLARE_EVENT_CLASS(local_chanctx
,
1427 TP_PROTO(struct ieee80211_local
*local
,
1428 struct ieee80211_chanctx
*ctx
),
1430 TP_ARGS(local
, ctx
),
1443 LOCAL_PR_FMT CHANCTX_PR_FMT
,
1444 LOCAL_PR_ARG
, CHANCTX_PR_ARG
1448 DEFINE_EVENT(local_chanctx
, drv_add_chanctx
,
1449 TP_PROTO(struct ieee80211_local
*local
,
1450 struct ieee80211_chanctx
*ctx
),
1454 DEFINE_EVENT(local_chanctx
, drv_remove_chanctx
,
1455 TP_PROTO(struct ieee80211_local
*local
,
1456 struct ieee80211_chanctx
*ctx
),
1460 TRACE_EVENT(drv_change_chanctx
,
1461 TP_PROTO(struct ieee80211_local
*local
,
1462 struct ieee80211_chanctx
*ctx
,
1465 TP_ARGS(local
, ctx
, changed
),
1470 __field(u32
, changed
)
1476 __entry
->changed
= changed
;
1480 LOCAL_PR_FMT CHANCTX_PR_FMT
" changed:%#x",
1481 LOCAL_PR_ARG
, CHANCTX_PR_ARG
, __entry
->changed
1485 #if !defined(__TRACE_VIF_ENTRY)
1486 #define __TRACE_VIF_ENTRY
1487 struct trace_vif_entry
{
1488 enum nl80211_iftype vif_type
;
1490 char vif_name
[IFNAMSIZ
];
1493 struct trace_chandef_entry
{
1500 struct trace_switch_entry
{
1501 struct trace_vif_entry vif
;
1502 struct trace_chandef_entry old_chandef
;
1503 struct trace_chandef_entry new_chandef
;
1506 #define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
1509 TRACE_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
),
1517 __field(int, n_vifs
)
1519 __dynamic_array(u8
, vifs
,
1520 sizeof(struct trace_switch_entry
) * n_vifs
)
1525 __entry
->n_vifs
= n_vifs
;
1526 __entry
->mode
= mode
;
1528 struct trace_switch_entry
*local_vifs
=
1529 __get_dynamic_array(vifs
);
1532 for (i
= 0; i
< n_vifs
; i
++) {
1533 struct ieee80211_sub_if_data
*sdata
;
1535 sdata
= container_of(vifs
[i
].vif
,
1536 struct ieee80211_sub_if_data
,
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
,
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
);
1565 LOCAL_PR_FMT
" n_vifs:%d mode:%d",
1566 LOCAL_PR_ARG
, __entry
->n_vifs
, __entry
->mode
1570 DECLARE_EVENT_CLASS(local_sdata_chanctx
,
1571 TP_PROTO(struct ieee80211_local
*local
,
1572 struct ieee80211_sub_if_data
*sdata
,
1573 struct ieee80211_chanctx
*ctx
),
1575 TP_ARGS(local
, sdata
, ctx
),
1590 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT
,
1591 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANCTX_PR_ARG
1595 DEFINE_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
)
1602 DEFINE_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
)
1609 TRACE_EVENT(drv_start_ap
,
1610 TP_PROTO(struct ieee80211_local
*local
,
1611 struct ieee80211_sub_if_data
*sdata
,
1612 struct ieee80211_bss_conf
*info
),
1614 TP_ARGS(local
, sdata
, info
),
1619 __field(u8
, dtimper
)
1620 __field(u16
, bcnint
)
1621 __dynamic_array(u8
, ssid
, info
->ssid_len
);
1622 __field(bool, hidden_ssid
);
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
;
1635 LOCAL_PR_FMT VIF_PR_FMT
,
1636 LOCAL_PR_ARG
, VIF_PR_ARG
1640 DEFINE_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
)
1646 TRACE_EVENT(drv_reconfig_complete
,
1647 TP_PROTO(struct ieee80211_local
*local
,
1648 enum ieee80211_reconfig_type reconfig_type
),
1649 TP_ARGS(local
, reconfig_type
),
1653 __field(u8
, reconfig_type
)
1658 __entry
->reconfig_type
= reconfig_type
;
1662 LOCAL_PR_FMT
" reconfig_type:%d",
1663 LOCAL_PR_ARG
, __entry
->reconfig_type
1668 #if IS_ENABLED(CONFIG_IPV6)
1669 DEFINE_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
)
1676 TRACE_EVENT(drv_join_ibss
,
1677 TP_PROTO(struct ieee80211_local
*local
,
1678 struct ieee80211_sub_if_data
*sdata
,
1679 struct ieee80211_bss_conf
*info
),
1681 TP_ARGS(local
, sdata
, info
),
1686 __field(u8
, dtimper
)
1687 __field(u16
, bcnint
)
1688 __dynamic_array(u8
, ssid
, info
->ssid_len
);
1694 __entry
->dtimper
= info
->dtim_period
;
1695 __entry
->bcnint
= info
->beacon_int
;
1696 memcpy(__get_dynamic_array(ssid
), info
->ssid
, info
->ssid_len
);
1700 LOCAL_PR_FMT VIF_PR_FMT
,
1701 LOCAL_PR_ARG
, VIF_PR_ARG
1705 DEFINE_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
)
1711 TRACE_EVENT(drv_get_expected_throughput
,
1712 TP_PROTO(struct ieee80211_sta
*sta
),
1725 STA_PR_FMT
, STA_PR_ARG
1729 TRACE_EVENT(drv_start_nan
,
1730 TP_PROTO(struct ieee80211_local
*local
,
1731 struct ieee80211_sub_if_data
*sdata
,
1732 struct cfg80211_nan_conf
*conf
),
1734 TP_ARGS(local
, sdata
, conf
),
1738 __field(u8
, master_pref
)
1745 __entry
->master_pref
= conf
->master_pref
;
1746 __entry
->dual
= conf
->dual
;
1750 LOCAL_PR_FMT VIF_PR_FMT
1751 ", master preference: %u, dual: %d",
1752 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->master_pref
,
1757 TRACE_EVENT(drv_stop_nan
,
1758 TP_PROTO(struct ieee80211_local
*local
,
1759 struct ieee80211_sub_if_data
*sdata
),
1761 TP_ARGS(local
, sdata
),
1774 LOCAL_PR_FMT VIF_PR_FMT
,
1775 LOCAL_PR_ARG
, VIF_PR_ARG
1779 TRACE_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
,
1785 TP_ARGS(local
, sdata
, conf
, changes
),
1789 __field(u8
, master_pref
)
1791 __field(u32
, changes
)
1797 __entry
->master_pref
= conf
->master_pref
;
1798 __entry
->dual
= conf
->dual
;
1799 __entry
->changes
= changes
;
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
1810 TRACE_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
),
1815 TP_ARGS(local
, sdata
, func
),
1820 __field(u8
, inst_id
)
1826 __entry
->type
= func
->type
;
1827 __entry
->inst_id
= func
->instance_id
;
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
1837 TRACE_EVENT(drv_del_nan_func
,
1838 TP_PROTO(struct ieee80211_local
*local
,
1839 struct ieee80211_sub_if_data
*sdata
,
1842 TP_ARGS(local
, sdata
, instance_id
),
1846 __field(u8
, instance_id
)
1852 __entry
->instance_id
= instance_id
;
1856 LOCAL_PR_FMT VIF_PR_FMT
1857 ", instance_id: %u",
1858 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->instance_id
1863 * Tracing for API calls that drivers call.
1866 TRACE_EVENT(api_start_tx_ba_session
,
1867 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
1882 STA_PR_FMT
" tid:%d",
1883 STA_PR_ARG
, __entry
->tid
1887 TRACE_EVENT(api_start_tx_ba_cb
,
1888 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
1890 TP_ARGS(sdata
, ra
, tid
),
1894 __array(u8
, ra
, ETH_ALEN
)
1900 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
1905 VIF_PR_FMT
" ra:%pM tid:%d",
1906 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
1910 TRACE_EVENT(api_stop_tx_ba_session
,
1911 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
1926 STA_PR_FMT
" tid:%d",
1927 STA_PR_ARG
, __entry
->tid
1931 TRACE_EVENT(api_stop_tx_ba_cb
,
1932 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
1934 TP_ARGS(sdata
, ra
, tid
),
1938 __array(u8
, ra
, ETH_ALEN
)
1944 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
1949 VIF_PR_FMT
" ra:%pM tid:%d",
1950 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
1954 DEFINE_EVENT(local_only_evt
, api_restart_hw
,
1955 TP_PROTO(struct ieee80211_local
*local
),
1959 TRACE_EVENT(api_beacon_loss
,
1960 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
1978 TRACE_EVENT(api_connection_loss
,
1979 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
1997 TRACE_EVENT(api_cqm_rssi_notify
,
1998 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
1999 enum nl80211_cqm_rssi_threshold_event rssi_event
),
2001 TP_ARGS(sdata
, rssi_event
),
2005 __field(u32
, rssi_event
)
2010 __entry
->rssi_event
= rssi_event
;
2014 VIF_PR_FMT
" event:%d",
2015 VIF_PR_ARG
, __entry
->rssi_event
2019 DEFINE_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
)
2025 TRACE_EVENT(api_scan_completed
,
2026 TP_PROTO(struct ieee80211_local
*local
, bool aborted
),
2028 TP_ARGS(local
, aborted
),
2032 __field(bool, aborted
)
2037 __entry
->aborted
= aborted
;
2041 LOCAL_PR_FMT
" aborted:%d",
2042 LOCAL_PR_ARG
, __entry
->aborted
2046 TRACE_EVENT(api_sched_scan_results
,
2047 TP_PROTO(struct ieee80211_local
*local
),
2060 LOCAL_PR_FMT
, LOCAL_PR_ARG
2064 TRACE_EVENT(api_sched_scan_stopped
,
2065 TP_PROTO(struct ieee80211_local
*local
),
2078 LOCAL_PR_FMT
, LOCAL_PR_ARG
2082 TRACE_EVENT(api_sta_block_awake
,
2083 TP_PROTO(struct ieee80211_local
*local
,
2084 struct ieee80211_sta
*sta
, bool block
),
2086 TP_ARGS(local
, sta
, block
),
2091 __field(bool, block
)
2097 __entry
->block
= block
;
2101 LOCAL_PR_FMT STA_PR_FMT
" block:%d",
2102 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->block
2106 TRACE_EVENT(api_chswitch_done
,
2107 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, bool success
),
2109 TP_ARGS(sdata
, success
),
2113 __field(bool, success
)
2118 __entry
->success
= success
;
2122 VIF_PR_FMT
" success=%d",
2123 VIF_PR_ARG
, __entry
->success
2127 DEFINE_EVENT(local_only_evt
, api_ready_on_channel
,
2128 TP_PROTO(struct ieee80211_local
*local
),
2132 DEFINE_EVENT(local_only_evt
, api_remain_on_channel_expired
,
2133 TP_PROTO(struct ieee80211_local
*local
),
2137 TRACE_EVENT(api_gtk_rekey_notify
,
2138 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
2139 const u8
*bssid
, const u8
*replay_ctr
),
2141 TP_ARGS(sdata
, bssid
, replay_ctr
),
2145 __array(u8
, bssid
, ETH_ALEN
)
2146 __array(u8
, replay_ctr
, NL80211_REPLAY_CTR_LEN
)
2151 memcpy(__entry
->bssid
, bssid
, ETH_ALEN
);
2152 memcpy(__entry
->replay_ctr
, replay_ctr
, NL80211_REPLAY_CTR_LEN
);
2155 TP_printk(VIF_PR_FMT
, VIF_PR_ARG
)
2158 TRACE_EVENT(api_enable_rssi_reports
,
2159 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
2160 int rssi_min_thold
, int rssi_max_thold
),
2162 TP_ARGS(sdata
, rssi_min_thold
, rssi_max_thold
),
2166 __field(int, rssi_min_thold
)
2167 __field(int, rssi_max_thold
)
2172 __entry
->rssi_min_thold
= rssi_min_thold
;
2173 __entry
->rssi_max_thold
= rssi_max_thold
;
2177 VIF_PR_FMT
" rssi_min_thold =%d, rssi_max_thold = %d",
2178 VIF_PR_ARG
, __entry
->rssi_min_thold
, __entry
->rssi_max_thold
2182 TRACE_EVENT(api_eosp
,
2183 TP_PROTO(struct ieee80211_local
*local
,
2184 struct ieee80211_sta
*sta
),
2186 TP_ARGS(local
, sta
),
2199 LOCAL_PR_FMT STA_PR_FMT
,
2200 LOCAL_PR_ARG
, STA_PR_ARG
2204 TRACE_EVENT(api_send_eosp_nullfunc
,
2205 TP_PROTO(struct ieee80211_local
*local
,
2206 struct ieee80211_sta
*sta
,
2209 TP_ARGS(local
, sta
, tid
),
2224 LOCAL_PR_FMT STA_PR_FMT
" tid:%d",
2225 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->tid
2229 TRACE_EVENT(api_sta_set_buffered
,
2230 TP_PROTO(struct ieee80211_local
*local
,
2231 struct ieee80211_sta
*sta
,
2232 u8 tid
, bool buffered
),
2234 TP_ARGS(local
, sta
, tid
, buffered
),
2240 __field(bool, buffered
)
2247 __entry
->buffered
= buffered
;
2251 LOCAL_PR_FMT STA_PR_FMT
" tid:%d buffered:%d",
2252 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->tid
, __entry
->buffered
2257 * Tracing for internal functions
2258 * (which may also be called in response to driver calls)
2261 TRACE_EVENT(wake_queue
,
2262 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
2263 enum queue_stop_reason reason
),
2265 TP_ARGS(local
, queue
, reason
),
2270 __field(u32
, reason
)
2275 __entry
->queue
= queue
;
2276 __entry
->reason
= reason
;
2280 LOCAL_PR_FMT
" queue:%d, reason:%d",
2281 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
2285 TRACE_EVENT(stop_queue
,
2286 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
2287 enum queue_stop_reason reason
),
2289 TP_ARGS(local
, queue
, reason
),
2294 __field(u32
, reason
)
2299 __entry
->queue
= queue
;
2300 __entry
->reason
= reason
;
2304 LOCAL_PR_FMT
" queue:%d, reason:%d",
2305 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
2309 TRACE_EVENT(drv_set_default_unicast_key
,
2310 TP_PROTO(struct ieee80211_local
*local
,
2311 struct ieee80211_sub_if_data
*sdata
,
2314 TP_ARGS(local
, sdata
, key_idx
),
2319 __field(int, key_idx
)
2325 __entry
->key_idx
= key_idx
;
2328 TP_printk(LOCAL_PR_FMT VIF_PR_FMT
" key_idx:%d",
2329 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->key_idx
)
2332 TRACE_EVENT(api_radar_detected
,
2333 TP_PROTO(struct ieee80211_local
*local
),
2346 LOCAL_PR_FMT
" radar detected",
2351 TRACE_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
),
2356 TP_ARGS(local
, sdata
, chandef
),
2367 CHANDEF_ASSIGN(chandef
);
2371 LOCAL_PR_FMT VIF_PR_FMT
" channel switch to " CHANDEF_PR_FMT
,
2372 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANDEF_PR_ARG
2376 TRACE_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
),
2381 TP_ARGS(local
, sdata
, ch_switch
),
2387 __field(u64
, timestamp
)
2388 __field(u32
, device_timestamp
)
2389 __field(bool, block_tx
)
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
;
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
2411 DEFINE_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
)
2417 TRACE_EVENT(drv_get_txpower
,
2418 TP_PROTO(struct ieee80211_local
*local
,
2419 struct ieee80211_sub_if_data
*sdata
,
2422 TP_ARGS(local
, sdata
, dbm
, ret
),
2439 LOCAL_PR_FMT VIF_PR_FMT
" dbm:%d ret:%d",
2440 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->dbm
, __entry
->ret
2444 TRACE_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
),
2450 TP_ARGS(local
, sdata
, sta
, oper_class
, chandef
),
2456 __field(u8
, oper_class
)
2464 __entry
->oper_class
= oper_class
;
2465 CHANDEF_ASSIGN(chandef
)
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
,
2476 TRACE_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
),
2481 TP_ARGS(local
, sdata
, sta
),
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
2502 TRACE_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
),
2507 TP_ARGS(local
, sdata
, params
),
2512 __field(u8
, action_code
)
2515 __field(u32
, status
)
2516 __field(bool, peer_initiator
)
2517 __field(u32
, timestamp
)
2518 __field(u16
, switch_time
)
2519 __field(u16
, switch_timeout
)
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
;
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
2546 TRACE_EVENT(drv_wake_tx_queue
,
2547 TP_PROTO(struct ieee80211_local
*local
,
2548 struct ieee80211_sub_if_data
*sdata
,
2549 struct txq_info
*txq
),
2551 TP_ARGS(local
, sdata
, txq
),
2562 struct ieee80211_sta
*sta
= txq
->txq
.sta
;
2567 __entry
->ac
= txq
->txq
.ac
;
2568 __entry
->tid
= txq
->txq
.tid
;
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
2577 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
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>