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) \
95 __field(u16, timeout) \
97 #define AMPDU_ACTION_ASSIGN STA_NAMED_ASSIGN(params->sta); \
98 __entry->tid = params->tid; \
99 __entry->ssn = params->ssn; \
100 __entry->buf_size = params->buf_size; \
101 __entry->amsdu = params->amsdu; \
102 __entry->timeout = params->timeout; \
103 __entry->action = params->action;
104 #define AMPDU_ACTION_PR_FMT STA_PR_FMT " tid %d, ssn %d, buf_size %u, amsdu %d, timeout %d action %d"
105 #define AMPDU_ACTION_PR_ARG STA_PR_ARG, __entry->tid, __entry->ssn, \
106 __entry->buf_size, __entry->amsdu, __entry->timeout, \
110 * Tracing for driver callbacks.
113 DECLARE_EVENT_CLASS(local_only_evt
,
114 TP_PROTO(struct ieee80211_local
*local
),
122 TP_printk(LOCAL_PR_FMT
, LOCAL_PR_ARG
)
125 DECLARE_EVENT_CLASS(local_sdata_addr_evt
,
126 TP_PROTO(struct ieee80211_local
*local
,
127 struct ieee80211_sub_if_data
*sdata
),
128 TP_ARGS(local
, sdata
),
133 __array(char, addr
, ETH_ALEN
)
139 memcpy(__entry
->addr
, sdata
->vif
.addr
, ETH_ALEN
);
143 LOCAL_PR_FMT VIF_PR_FMT
" addr:%pM",
144 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->addr
148 DECLARE_EVENT_CLASS(local_u32_evt
,
149 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
150 TP_ARGS(local
, value
),
159 __entry
->value
= value
;
163 LOCAL_PR_FMT
" value:%d",
164 LOCAL_PR_ARG
, __entry
->value
168 DECLARE_EVENT_CLASS(local_sdata_evt
,
169 TP_PROTO(struct ieee80211_local
*local
,
170 struct ieee80211_sub_if_data
*sdata
),
171 TP_ARGS(local
, sdata
),
184 LOCAL_PR_FMT VIF_PR_FMT
,
185 LOCAL_PR_ARG
, VIF_PR_ARG
189 DEFINE_EVENT(local_only_evt
, drv_return_void
,
190 TP_PROTO(struct ieee80211_local
*local
),
194 TRACE_EVENT(drv_return_int
,
195 TP_PROTO(struct ieee80211_local
*local
, int ret
),
205 TP_printk(LOCAL_PR_FMT
" - %d", LOCAL_PR_ARG
, __entry
->ret
)
208 TRACE_EVENT(drv_return_bool
,
209 TP_PROTO(struct ieee80211_local
*local
, bool ret
),
219 TP_printk(LOCAL_PR_FMT
" - %s", LOCAL_PR_ARG
, (__entry
->ret
) ?
223 TRACE_EVENT(drv_return_u32
,
224 TP_PROTO(struct ieee80211_local
*local
, u32 ret
),
234 TP_printk(LOCAL_PR_FMT
" - %u", LOCAL_PR_ARG
, __entry
->ret
)
237 TRACE_EVENT(drv_return_u64
,
238 TP_PROTO(struct ieee80211_local
*local
, u64 ret
),
248 TP_printk(LOCAL_PR_FMT
" - %llu", LOCAL_PR_ARG
, __entry
->ret
)
251 DEFINE_EVENT(local_only_evt
, drv_start
,
252 TP_PROTO(struct ieee80211_local
*local
),
256 DEFINE_EVENT(local_u32_evt
, drv_get_et_strings
,
257 TP_PROTO(struct ieee80211_local
*local
, u32 sset
),
261 DEFINE_EVENT(local_u32_evt
, drv_get_et_sset_count
,
262 TP_PROTO(struct ieee80211_local
*local
, u32 sset
),
266 DEFINE_EVENT(local_only_evt
, drv_get_et_stats
,
267 TP_PROTO(struct ieee80211_local
*local
),
271 DEFINE_EVENT(local_only_evt
, drv_suspend
,
272 TP_PROTO(struct ieee80211_local
*local
),
276 DEFINE_EVENT(local_only_evt
, drv_resume
,
277 TP_PROTO(struct ieee80211_local
*local
),
281 TRACE_EVENT(drv_set_wakeup
,
282 TP_PROTO(struct ieee80211_local
*local
, bool enabled
),
283 TP_ARGS(local
, enabled
),
286 __field(bool, enabled
)
290 __entry
->enabled
= enabled
;
292 TP_printk(LOCAL_PR_FMT
" enabled:%d", LOCAL_PR_ARG
, __entry
->enabled
)
295 DEFINE_EVENT(local_only_evt
, drv_stop
,
296 TP_PROTO(struct ieee80211_local
*local
),
300 DEFINE_EVENT(local_sdata_addr_evt
, drv_add_interface
,
301 TP_PROTO(struct ieee80211_local
*local
,
302 struct ieee80211_sub_if_data
*sdata
),
303 TP_ARGS(local
, sdata
)
306 TRACE_EVENT(drv_change_interface
,
307 TP_PROTO(struct ieee80211_local
*local
,
308 struct ieee80211_sub_if_data
*sdata
,
309 enum nl80211_iftype type
, bool p2p
),
311 TP_ARGS(local
, sdata
, type
, p2p
),
316 __field(u32
, new_type
)
317 __field(bool, new_p2p
)
323 __entry
->new_type
= type
;
324 __entry
->new_p2p
= p2p
;
328 LOCAL_PR_FMT VIF_PR_FMT
" new type:%d%s",
329 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->new_type
,
330 __entry
->new_p2p
? "/p2p" : ""
334 DEFINE_EVENT(local_sdata_addr_evt
, drv_remove_interface
,
335 TP_PROTO(struct ieee80211_local
*local
,
336 struct ieee80211_sub_if_data
*sdata
),
337 TP_ARGS(local
, sdata
)
340 TRACE_EVENT(drv_config
,
341 TP_PROTO(struct ieee80211_local
*local
,
344 TP_ARGS(local
, changed
),
348 __field(u32
, changed
)
350 __field(int, power_level
)
351 __field(int, dynamic_ps_timeout
)
352 __field(u16
, listen_interval
)
353 __field(u8
, long_frame_max_tx_count
)
354 __field(u8
, short_frame_max_tx_count
)
361 __entry
->changed
= changed
;
362 __entry
->flags
= local
->hw
.conf
.flags
;
363 __entry
->power_level
= local
->hw
.conf
.power_level
;
364 __entry
->dynamic_ps_timeout
= local
->hw
.conf
.dynamic_ps_timeout
;
365 __entry
->listen_interval
= local
->hw
.conf
.listen_interval
;
366 __entry
->long_frame_max_tx_count
=
367 local
->hw
.conf
.long_frame_max_tx_count
;
368 __entry
->short_frame_max_tx_count
=
369 local
->hw
.conf
.short_frame_max_tx_count
;
370 CHANDEF_ASSIGN(&local
->hw
.conf
.chandef
)
371 __entry
->smps
= local
->hw
.conf
.smps_mode
;
375 LOCAL_PR_FMT
" ch:%#x" CHANDEF_PR_FMT
,
376 LOCAL_PR_ARG
, __entry
->changed
, CHANDEF_PR_ARG
380 TRACE_EVENT(drv_bss_info_changed
,
381 TP_PROTO(struct ieee80211_local
*local
,
382 struct ieee80211_sub_if_data
*sdata
,
383 struct ieee80211_bss_conf
*info
,
386 TP_ARGS(local
, sdata
, info
, changed
),
391 __field(u32
, changed
)
393 __field(bool, ibss_joined
)
394 __field(bool, ibss_creator
)
397 __field(bool, shortpre
)
398 __field(bool, shortslot
)
399 __field(bool, enable_beacon
)
402 __field(u16
, assoc_cap
)
403 __field(u64
, sync_tsf
)
404 __field(u32
, sync_device_ts
)
405 __field(u8
, sync_dtim_count
)
406 __field(u32
, basic_rates
)
407 __array(int, mcast_rate
, NUM_NL80211_BANDS
)
408 __field(u16
, ht_operation_mode
)
409 __field(s32
, cqm_rssi_thold
);
410 __field(s32
, cqm_rssi_hyst
);
411 __field(u32
, channel_width
);
412 __field(u32
, channel_cfreq1
);
413 __dynamic_array(u32
, arp_addr_list
,
414 info
->arp_addr_cnt
> IEEE80211_BSS_ARP_ADDR_LIST_LEN
?
415 IEEE80211_BSS_ARP_ADDR_LIST_LEN
:
417 __field(int, arp_addr_cnt
);
421 __dynamic_array(u8
, ssid
, info
->ssid_len
);
422 __field(bool, hidden_ssid
);
423 __field(int, txpower
)
424 __field(u8
, p2p_oppps_ctwindow
)
430 __entry
->changed
= changed
;
431 __entry
->aid
= info
->aid
;
432 __entry
->assoc
= info
->assoc
;
433 __entry
->ibss_joined
= info
->ibss_joined
;
434 __entry
->ibss_creator
= info
->ibss_creator
;
435 __entry
->shortpre
= info
->use_short_preamble
;
436 __entry
->cts
= info
->use_cts_prot
;
437 __entry
->shortslot
= info
->use_short_slot
;
438 __entry
->enable_beacon
= info
->enable_beacon
;
439 __entry
->dtimper
= info
->dtim_period
;
440 __entry
->bcnint
= info
->beacon_int
;
441 __entry
->assoc_cap
= info
->assoc_capability
;
442 __entry
->sync_tsf
= info
->sync_tsf
;
443 __entry
->sync_device_ts
= info
->sync_device_ts
;
444 __entry
->sync_dtim_count
= info
->sync_dtim_count
;
445 __entry
->basic_rates
= info
->basic_rates
;
446 memcpy(__entry
->mcast_rate
, info
->mcast_rate
,
447 sizeof(__entry
->mcast_rate
));
448 __entry
->ht_operation_mode
= info
->ht_operation_mode
;
449 __entry
->cqm_rssi_thold
= info
->cqm_rssi_thold
;
450 __entry
->cqm_rssi_hyst
= info
->cqm_rssi_hyst
;
451 __entry
->channel_width
= info
->chandef
.width
;
452 __entry
->channel_cfreq1
= info
->chandef
.center_freq1
;
453 __entry
->arp_addr_cnt
= info
->arp_addr_cnt
;
454 memcpy(__get_dynamic_array(arp_addr_list
), info
->arp_addr_list
,
455 sizeof(u32
) * (info
->arp_addr_cnt
> IEEE80211_BSS_ARP_ADDR_LIST_LEN
?
456 IEEE80211_BSS_ARP_ADDR_LIST_LEN
:
457 info
->arp_addr_cnt
));
458 __entry
->qos
= info
->qos
;
459 __entry
->idle
= info
->idle
;
460 __entry
->ps
= info
->ps
;
461 memcpy(__get_dynamic_array(ssid
), info
->ssid
, info
->ssid_len
);
462 __entry
->hidden_ssid
= info
->hidden_ssid
;
463 __entry
->txpower
= info
->txpower
;
464 __entry
->p2p_oppps_ctwindow
= info
->p2p_noa_attr
.oppps_ctwindow
;
468 LOCAL_PR_FMT VIF_PR_FMT
" changed:%#x",
469 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->changed
473 TRACE_EVENT(drv_prepare_multicast
,
474 TP_PROTO(struct ieee80211_local
*local
, int mc_count
),
476 TP_ARGS(local
, mc_count
),
480 __field(int, mc_count
)
485 __entry
->mc_count
= mc_count
;
489 LOCAL_PR_FMT
" prepare mc (%d)",
490 LOCAL_PR_ARG
, __entry
->mc_count
494 TRACE_EVENT(drv_configure_filter
,
495 TP_PROTO(struct ieee80211_local
*local
,
496 unsigned int changed_flags
,
497 unsigned int *total_flags
,
500 TP_ARGS(local
, changed_flags
, total_flags
, multicast
),
504 __field(unsigned int, changed
)
505 __field(unsigned int, total
)
506 __field(u64
, multicast
)
511 __entry
->changed
= changed_flags
;
512 __entry
->total
= *total_flags
;
513 __entry
->multicast
= multicast
;
517 LOCAL_PR_FMT
" changed:%#x total:%#x",
518 LOCAL_PR_ARG
, __entry
->changed
, __entry
->total
522 TRACE_EVENT(drv_config_iface_filter
,
523 TP_PROTO(struct ieee80211_local
*local
,
524 struct ieee80211_sub_if_data
*sdata
,
525 unsigned int filter_flags
,
526 unsigned int changed_flags
),
528 TP_ARGS(local
, sdata
, filter_flags
, changed_flags
),
533 __field(unsigned int, filter_flags
)
534 __field(unsigned int, changed_flags
)
540 __entry
->filter_flags
= filter_flags
;
541 __entry
->changed_flags
= changed_flags
;
545 LOCAL_PR_FMT VIF_PR_FMT
546 " filter_flags: %#x changed_flags: %#x",
547 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->filter_flags
,
548 __entry
->changed_flags
552 TRACE_EVENT(drv_set_tim
,
553 TP_PROTO(struct ieee80211_local
*local
,
554 struct ieee80211_sta
*sta
, bool set
),
556 TP_ARGS(local
, sta
, set
),
571 LOCAL_PR_FMT STA_PR_FMT
" set:%d",
572 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->set
576 TRACE_EVENT(drv_set_key
,
577 TP_PROTO(struct ieee80211_local
*local
,
578 enum set_key_cmd cmd
, struct ieee80211_sub_if_data
*sdata
,
579 struct ieee80211_sta
*sta
,
580 struct ieee80211_key_conf
*key
),
582 TP_ARGS(local
, cmd
, sdata
, sta
, key
),
599 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT KEY_PR_FMT
,
600 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, KEY_PR_ARG
604 TRACE_EVENT(drv_update_tkip_key
,
605 TP_PROTO(struct ieee80211_local
*local
,
606 struct ieee80211_sub_if_data
*sdata
,
607 struct ieee80211_key_conf
*conf
,
608 struct ieee80211_sta
*sta
, u32 iv32
),
610 TP_ARGS(local
, sdata
, conf
, sta
, iv32
),
623 __entry
->iv32
= iv32
;
627 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" iv32:%#x",
628 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->iv32
632 DEFINE_EVENT(local_sdata_evt
, drv_hw_scan
,
633 TP_PROTO(struct ieee80211_local
*local
,
634 struct ieee80211_sub_if_data
*sdata
),
635 TP_ARGS(local
, sdata
)
638 DEFINE_EVENT(local_sdata_evt
, drv_cancel_hw_scan
,
639 TP_PROTO(struct ieee80211_local
*local
,
640 struct ieee80211_sub_if_data
*sdata
),
641 TP_ARGS(local
, sdata
)
644 DEFINE_EVENT(local_sdata_evt
, drv_sched_scan_start
,
645 TP_PROTO(struct ieee80211_local
*local
,
646 struct ieee80211_sub_if_data
*sdata
),
647 TP_ARGS(local
, sdata
)
650 DEFINE_EVENT(local_sdata_evt
, drv_sched_scan_stop
,
651 TP_PROTO(struct ieee80211_local
*local
,
652 struct ieee80211_sub_if_data
*sdata
),
653 TP_ARGS(local
, sdata
)
656 TRACE_EVENT(drv_sw_scan_start
,
657 TP_PROTO(struct ieee80211_local
*local
,
658 struct ieee80211_sub_if_data
*sdata
,
661 TP_ARGS(local
, sdata
, mac_addr
),
666 __array(char, mac_addr
, ETH_ALEN
)
672 memcpy(__entry
->mac_addr
, mac_addr
, ETH_ALEN
);
675 TP_printk(LOCAL_PR_FMT
", " VIF_PR_FMT
", addr:%pM",
676 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->mac_addr
)
679 DEFINE_EVENT(local_sdata_evt
, drv_sw_scan_complete
,
680 TP_PROTO(struct ieee80211_local
*local
,
681 struct ieee80211_sub_if_data
*sdata
),
682 TP_ARGS(local
, sdata
)
685 TRACE_EVENT(drv_get_stats
,
686 TP_PROTO(struct ieee80211_local
*local
,
687 struct ieee80211_low_level_stats
*stats
,
690 TP_ARGS(local
, stats
, ret
),
695 __field(unsigned int, ackfail
)
696 __field(unsigned int, rtsfail
)
697 __field(unsigned int, fcserr
)
698 __field(unsigned int, rtssucc
)
704 __entry
->ackfail
= stats
->dot11ACKFailureCount
;
705 __entry
->rtsfail
= stats
->dot11RTSFailureCount
;
706 __entry
->fcserr
= stats
->dot11FCSErrorCount
;
707 __entry
->rtssucc
= stats
->dot11RTSSuccessCount
;
711 LOCAL_PR_FMT
" ret:%d",
712 LOCAL_PR_ARG
, __entry
->ret
716 TRACE_EVENT(drv_get_key_seq
,
717 TP_PROTO(struct ieee80211_local
*local
,
718 struct ieee80211_key_conf
*key
),
733 LOCAL_PR_FMT KEY_PR_FMT
,
734 LOCAL_PR_ARG
, KEY_PR_ARG
738 DEFINE_EVENT(local_u32_evt
, drv_set_frag_threshold
,
739 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
740 TP_ARGS(local
, value
)
743 DEFINE_EVENT(local_u32_evt
, drv_set_rts_threshold
,
744 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
745 TP_ARGS(local
, value
)
748 TRACE_EVENT(drv_set_coverage_class
,
749 TP_PROTO(struct ieee80211_local
*local
, s16 value
),
751 TP_ARGS(local
, value
),
760 __entry
->value
= value
;
764 LOCAL_PR_FMT
" value:%d",
765 LOCAL_PR_ARG
, __entry
->value
769 TRACE_EVENT(drv_sta_notify
,
770 TP_PROTO(struct ieee80211_local
*local
,
771 struct ieee80211_sub_if_data
*sdata
,
772 enum sta_notify_cmd cmd
,
773 struct ieee80211_sta
*sta
),
775 TP_ARGS(local
, sdata
, cmd
, sta
),
792 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" cmd:%d",
793 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->cmd
797 TRACE_EVENT(drv_sta_state
,
798 TP_PROTO(struct ieee80211_local
*local
,
799 struct ieee80211_sub_if_data
*sdata
,
800 struct ieee80211_sta
*sta
,
801 enum ieee80211_sta_state old_state
,
802 enum ieee80211_sta_state new_state
),
804 TP_ARGS(local
, sdata
, sta
, old_state
, new_state
),
810 __field(u32
, old_state
)
811 __field(u32
, new_state
)
818 __entry
->old_state
= old_state
;
819 __entry
->new_state
= new_state
;
823 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" state: %d->%d",
824 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
,
825 __entry
->old_state
, __entry
->new_state
829 TRACE_EVENT(drv_sta_rc_update
,
830 TP_PROTO(struct ieee80211_local
*local
,
831 struct ieee80211_sub_if_data
*sdata
,
832 struct ieee80211_sta
*sta
,
835 TP_ARGS(local
, sdata
, sta
, changed
),
841 __field(u32
, changed
)
848 __entry
->changed
= changed
;
852 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" changed: 0x%x",
853 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->changed
857 DECLARE_EVENT_CLASS(sta_event
,
858 TP_PROTO(struct ieee80211_local
*local
,
859 struct ieee80211_sub_if_data
*sdata
,
860 struct ieee80211_sta
*sta
),
862 TP_ARGS(local
, sdata
, sta
),
877 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
,
878 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
882 DEFINE_EVENT(sta_event
, drv_sta_statistics
,
883 TP_PROTO(struct ieee80211_local
*local
,
884 struct ieee80211_sub_if_data
*sdata
,
885 struct ieee80211_sta
*sta
),
886 TP_ARGS(local
, sdata
, sta
)
889 DEFINE_EVENT(sta_event
, drv_sta_add
,
890 TP_PROTO(struct ieee80211_local
*local
,
891 struct ieee80211_sub_if_data
*sdata
,
892 struct ieee80211_sta
*sta
),
893 TP_ARGS(local
, sdata
, sta
)
896 DEFINE_EVENT(sta_event
, drv_sta_remove
,
897 TP_PROTO(struct ieee80211_local
*local
,
898 struct ieee80211_sub_if_data
*sdata
,
899 struct ieee80211_sta
*sta
),
900 TP_ARGS(local
, sdata
, sta
)
903 DEFINE_EVENT(sta_event
, drv_sta_pre_rcu_remove
,
904 TP_PROTO(struct ieee80211_local
*local
,
905 struct ieee80211_sub_if_data
*sdata
,
906 struct ieee80211_sta
*sta
),
907 TP_ARGS(local
, sdata
, sta
)
910 DEFINE_EVENT(sta_event
, drv_sync_rx_queues
,
911 TP_PROTO(struct ieee80211_local
*local
,
912 struct ieee80211_sub_if_data
*sdata
,
913 struct ieee80211_sta
*sta
),
914 TP_ARGS(local
, sdata
, sta
)
917 DEFINE_EVENT(sta_event
, drv_sta_rate_tbl_update
,
918 TP_PROTO(struct ieee80211_local
*local
,
919 struct ieee80211_sub_if_data
*sdata
,
920 struct ieee80211_sta
*sta
),
921 TP_ARGS(local
, sdata
, sta
)
924 TRACE_EVENT(drv_conf_tx
,
925 TP_PROTO(struct ieee80211_local
*local
,
926 struct ieee80211_sub_if_data
*sdata
,
927 u16 ac
, const struct ieee80211_tx_queue_params
*params
),
929 TP_ARGS(local
, sdata
, ac
, params
),
946 __entry
->txop
= params
->txop
;
947 __entry
->cw_max
= params
->cw_max
;
948 __entry
->cw_min
= params
->cw_min
;
949 __entry
->aifs
= params
->aifs
;
950 __entry
->uapsd
= params
->uapsd
;
954 LOCAL_PR_FMT VIF_PR_FMT
" AC:%d",
955 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->ac
959 DEFINE_EVENT(local_sdata_evt
, drv_get_tsf
,
960 TP_PROTO(struct ieee80211_local
*local
,
961 struct ieee80211_sub_if_data
*sdata
),
962 TP_ARGS(local
, sdata
)
965 TRACE_EVENT(drv_set_tsf
,
966 TP_PROTO(struct ieee80211_local
*local
,
967 struct ieee80211_sub_if_data
*sdata
,
970 TP_ARGS(local
, sdata
, tsf
),
985 LOCAL_PR_FMT VIF_PR_FMT
" tsf:%llu",
986 LOCAL_PR_ARG
, VIF_PR_ARG
, (unsigned long long)__entry
->tsf
990 TRACE_EVENT(drv_offset_tsf
,
991 TP_PROTO(struct ieee80211_local
*local
,
992 struct ieee80211_sub_if_data
*sdata
,
995 TP_ARGS(local
, sdata
, offset
),
1000 __field(s64
, tsf_offset
)
1006 __entry
->tsf_offset
= offset
;
1010 LOCAL_PR_FMT VIF_PR_FMT
" tsf offset:%lld",
1011 LOCAL_PR_ARG
, VIF_PR_ARG
,
1012 (unsigned long long)__entry
->tsf_offset
1016 DEFINE_EVENT(local_sdata_evt
, drv_reset_tsf
,
1017 TP_PROTO(struct ieee80211_local
*local
,
1018 struct ieee80211_sub_if_data
*sdata
),
1019 TP_ARGS(local
, sdata
)
1022 DEFINE_EVENT(local_only_evt
, drv_tx_last_beacon
,
1023 TP_PROTO(struct ieee80211_local
*local
),
1027 TRACE_EVENT(drv_ampdu_action
,
1028 TP_PROTO(struct ieee80211_local
*local
,
1029 struct ieee80211_sub_if_data
*sdata
,
1030 struct ieee80211_ampdu_params
*params
),
1032 TP_ARGS(local
, sdata
, params
),
1043 AMPDU_ACTION_ASSIGN
;
1047 LOCAL_PR_FMT VIF_PR_FMT AMPDU_ACTION_PR_FMT
,
1048 LOCAL_PR_ARG
, VIF_PR_ARG
, AMPDU_ACTION_PR_ARG
1052 TRACE_EVENT(drv_get_survey
,
1053 TP_PROTO(struct ieee80211_local
*local
, int idx
,
1054 struct survey_info
*survey
),
1056 TP_ARGS(local
, idx
, survey
),
1069 LOCAL_PR_FMT
" idx:%d",
1070 LOCAL_PR_ARG
, __entry
->idx
1074 TRACE_EVENT(drv_flush
,
1075 TP_PROTO(struct ieee80211_local
*local
,
1076 u32 queues
, bool drop
),
1078 TP_ARGS(local
, queues
, drop
),
1083 __field(u32
, queues
)
1088 __entry
->drop
= drop
;
1089 __entry
->queues
= queues
;
1093 LOCAL_PR_FMT
" queues:0x%x drop:%d",
1094 LOCAL_PR_ARG
, __entry
->queues
, __entry
->drop
1098 TRACE_EVENT(drv_channel_switch
,
1099 TP_PROTO(struct ieee80211_local
*local
,
1100 struct ieee80211_sub_if_data
*sdata
,
1101 struct ieee80211_channel_switch
*ch_switch
),
1103 TP_ARGS(local
, sdata
, ch_switch
),
1109 __field(u64
, timestamp
)
1110 __field(u32
, device_timestamp
)
1111 __field(bool, block_tx
)
1118 CHANDEF_ASSIGN(&ch_switch
->chandef
)
1119 __entry
->timestamp
= ch_switch
->timestamp
;
1120 __entry
->device_timestamp
= ch_switch
->device_timestamp
;
1121 __entry
->block_tx
= ch_switch
->block_tx
;
1122 __entry
->count
= ch_switch
->count
;
1126 LOCAL_PR_FMT VIF_PR_FMT
" new " CHANDEF_PR_FMT
" count:%d",
1127 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANDEF_PR_ARG
, __entry
->count
1131 TRACE_EVENT(drv_set_antenna
,
1132 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
1134 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
1138 __field(u32
, tx_ant
)
1139 __field(u32
, rx_ant
)
1145 __entry
->tx_ant
= tx_ant
;
1146 __entry
->rx_ant
= rx_ant
;
1151 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
1152 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
1156 TRACE_EVENT(drv_get_antenna
,
1157 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
1159 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
1163 __field(u32
, tx_ant
)
1164 __field(u32
, rx_ant
)
1170 __entry
->tx_ant
= tx_ant
;
1171 __entry
->rx_ant
= rx_ant
;
1176 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
1177 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
1181 TRACE_EVENT(drv_remain_on_channel
,
1182 TP_PROTO(struct ieee80211_local
*local
,
1183 struct ieee80211_sub_if_data
*sdata
,
1184 struct ieee80211_channel
*chan
,
1185 unsigned int duration
,
1186 enum ieee80211_roc_type type
),
1188 TP_ARGS(local
, sdata
, chan
, duration
, type
),
1193 __field(int, center_freq
)
1194 __field(unsigned int, duration
)
1201 __entry
->center_freq
= chan
->center_freq
;
1202 __entry
->duration
= duration
;
1203 __entry
->type
= type
;
1207 LOCAL_PR_FMT VIF_PR_FMT
" freq:%dMHz duration:%dms type=%d",
1208 LOCAL_PR_ARG
, VIF_PR_ARG
,
1209 __entry
->center_freq
, __entry
->duration
, __entry
->type
1213 DEFINE_EVENT(local_only_evt
, drv_cancel_remain_on_channel
,
1214 TP_PROTO(struct ieee80211_local
*local
),
1218 TRACE_EVENT(drv_set_ringparam
,
1219 TP_PROTO(struct ieee80211_local
*local
, u32 tx
, u32 rx
),
1221 TP_ARGS(local
, tx
, rx
),
1236 LOCAL_PR_FMT
" tx:%d rx %d",
1237 LOCAL_PR_ARG
, __entry
->tx
, __entry
->rx
1241 TRACE_EVENT(drv_get_ringparam
,
1242 TP_PROTO(struct ieee80211_local
*local
, u32
*tx
, u32
*tx_max
,
1243 u32
*rx
, u32
*rx_max
),
1245 TP_ARGS(local
, tx
, tx_max
, rx
, rx_max
),
1250 __field(u32
, tx_max
)
1252 __field(u32
, rx_max
)
1258 __entry
->tx_max
= *tx_max
;
1260 __entry
->rx_max
= *rx_max
;
1264 LOCAL_PR_FMT
" tx:%d tx_max %d rx %d rx_max %d",
1266 __entry
->tx
, __entry
->tx_max
, __entry
->rx
, __entry
->rx_max
1270 DEFINE_EVENT(local_only_evt
, drv_tx_frames_pending
,
1271 TP_PROTO(struct ieee80211_local
*local
),
1275 DEFINE_EVENT(local_only_evt
, drv_offchannel_tx_cancel_wait
,
1276 TP_PROTO(struct ieee80211_local
*local
),
1280 TRACE_EVENT(drv_set_bitrate_mask
,
1281 TP_PROTO(struct ieee80211_local
*local
,
1282 struct ieee80211_sub_if_data
*sdata
,
1283 const struct cfg80211_bitrate_mask
*mask
),
1285 TP_ARGS(local
, sdata
, mask
),
1290 __field(u32
, legacy_2g
)
1291 __field(u32
, legacy_5g
)
1297 __entry
->legacy_2g
= mask
->control
[NL80211_BAND_2GHZ
].legacy
;
1298 __entry
->legacy_5g
= mask
->control
[NL80211_BAND_5GHZ
].legacy
;
1302 LOCAL_PR_FMT VIF_PR_FMT
" 2G Mask:0x%x 5G Mask:0x%x",
1303 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->legacy_2g
, __entry
->legacy_5g
1307 TRACE_EVENT(drv_set_rekey_data
,
1308 TP_PROTO(struct ieee80211_local
*local
,
1309 struct ieee80211_sub_if_data
*sdata
,
1310 struct cfg80211_gtk_rekey_data
*data
),
1312 TP_ARGS(local
, sdata
, data
),
1317 __array(u8
, kek
, NL80211_KEK_LEN
)
1318 __array(u8
, kck
, NL80211_KCK_LEN
)
1319 __array(u8
, replay_ctr
, NL80211_REPLAY_CTR_LEN
)
1325 memcpy(__entry
->kek
, data
->kek
, NL80211_KEK_LEN
);
1326 memcpy(__entry
->kck
, data
->kck
, NL80211_KCK_LEN
);
1327 memcpy(__entry
->replay_ctr
, data
->replay_ctr
,
1328 NL80211_REPLAY_CTR_LEN
);
1331 TP_printk(LOCAL_PR_FMT VIF_PR_FMT
,
1332 LOCAL_PR_ARG
, VIF_PR_ARG
)
1335 TRACE_EVENT(drv_event_callback
,
1336 TP_PROTO(struct ieee80211_local
*local
,
1337 struct ieee80211_sub_if_data
*sdata
,
1338 const struct ieee80211_event
*_event
),
1340 TP_ARGS(local
, sdata
, _event
),
1351 __entry
->type
= _event
->type
;
1355 LOCAL_PR_FMT VIF_PR_FMT
" event:%d",
1356 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->type
1360 DECLARE_EVENT_CLASS(release_evt
,
1361 TP_PROTO(struct ieee80211_local
*local
,
1362 struct ieee80211_sta
*sta
,
1363 u16 tids
, int num_frames
,
1364 enum ieee80211_frame_release_type reason
,
1367 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
),
1373 __field(int, num_frames
)
1374 __field(int, reason
)
1375 __field(bool, more_data
)
1381 __entry
->tids
= tids
;
1382 __entry
->num_frames
= num_frames
;
1383 __entry
->reason
= reason
;
1384 __entry
->more_data
= more_data
;
1388 LOCAL_PR_FMT STA_PR_FMT
1389 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1390 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->tids
, __entry
->num_frames
,
1391 __entry
->reason
, __entry
->more_data
1395 DEFINE_EVENT(release_evt
, drv_release_buffered_frames
,
1396 TP_PROTO(struct ieee80211_local
*local
,
1397 struct ieee80211_sta
*sta
,
1398 u16 tids
, int num_frames
,
1399 enum ieee80211_frame_release_type reason
,
1402 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
)
1405 DEFINE_EVENT(release_evt
, drv_allow_buffered_frames
,
1406 TP_PROTO(struct ieee80211_local
*local
,
1407 struct ieee80211_sta
*sta
,
1408 u16 tids
, int num_frames
,
1409 enum ieee80211_frame_release_type reason
,
1412 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
)
1415 DEFINE_EVENT(local_sdata_evt
, drv_mgd_prepare_tx
,
1416 TP_PROTO(struct ieee80211_local
*local
,
1417 struct ieee80211_sub_if_data
*sdata
),
1419 TP_ARGS(local
, sdata
)
1422 DEFINE_EVENT(local_sdata_evt
, drv_mgd_protect_tdls_discover
,
1423 TP_PROTO(struct ieee80211_local
*local
,
1424 struct ieee80211_sub_if_data
*sdata
),
1426 TP_ARGS(local
, sdata
)
1429 DECLARE_EVENT_CLASS(local_chanctx
,
1430 TP_PROTO(struct ieee80211_local
*local
,
1431 struct ieee80211_chanctx
*ctx
),
1433 TP_ARGS(local
, ctx
),
1446 LOCAL_PR_FMT CHANCTX_PR_FMT
,
1447 LOCAL_PR_ARG
, CHANCTX_PR_ARG
1451 DEFINE_EVENT(local_chanctx
, drv_add_chanctx
,
1452 TP_PROTO(struct ieee80211_local
*local
,
1453 struct ieee80211_chanctx
*ctx
),
1457 DEFINE_EVENT(local_chanctx
, drv_remove_chanctx
,
1458 TP_PROTO(struct ieee80211_local
*local
,
1459 struct ieee80211_chanctx
*ctx
),
1463 TRACE_EVENT(drv_change_chanctx
,
1464 TP_PROTO(struct ieee80211_local
*local
,
1465 struct ieee80211_chanctx
*ctx
,
1468 TP_ARGS(local
, ctx
, changed
),
1473 __field(u32
, changed
)
1479 __entry
->changed
= changed
;
1483 LOCAL_PR_FMT CHANCTX_PR_FMT
" changed:%#x",
1484 LOCAL_PR_ARG
, CHANCTX_PR_ARG
, __entry
->changed
1488 #if !defined(__TRACE_VIF_ENTRY)
1489 #define __TRACE_VIF_ENTRY
1490 struct trace_vif_entry
{
1491 enum nl80211_iftype vif_type
;
1493 char vif_name
[IFNAMSIZ
];
1496 struct trace_chandef_entry
{
1503 struct trace_switch_entry
{
1504 struct trace_vif_entry vif
;
1505 struct trace_chandef_entry old_chandef
;
1506 struct trace_chandef_entry new_chandef
;
1509 #define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
1512 TRACE_EVENT(drv_switch_vif_chanctx
,
1513 TP_PROTO(struct ieee80211_local
*local
,
1514 struct ieee80211_vif_chanctx_switch
*vifs
,
1515 int n_vifs
, enum ieee80211_chanctx_switch_mode mode
),
1516 TP_ARGS(local
, vifs
, n_vifs
, mode
),
1520 __field(int, n_vifs
)
1522 __dynamic_array(u8
, vifs
,
1523 sizeof(struct trace_switch_entry
) * n_vifs
)
1528 __entry
->n_vifs
= n_vifs
;
1529 __entry
->mode
= mode
;
1531 struct trace_switch_entry
*local_vifs
=
1532 __get_dynamic_array(vifs
);
1535 for (i
= 0; i
< n_vifs
; i
++) {
1536 struct ieee80211_sub_if_data
*sdata
;
1538 sdata
= container_of(vifs
[i
].vif
,
1539 struct ieee80211_sub_if_data
,
1542 SWITCH_ENTRY_ASSIGN(vif
.vif_type
, vif
->type
);
1543 SWITCH_ENTRY_ASSIGN(vif
.p2p
, vif
->p2p
);
1544 strncpy(local_vifs
[i
].vif
.vif_name
,
1546 sizeof(local_vifs
[i
].vif
.vif_name
));
1547 SWITCH_ENTRY_ASSIGN(old_chandef
.control_freq
,
1548 old_ctx
->def
.chan
->center_freq
);
1549 SWITCH_ENTRY_ASSIGN(old_chandef
.chan_width
,
1550 old_ctx
->def
.width
);
1551 SWITCH_ENTRY_ASSIGN(old_chandef
.center_freq1
,
1552 old_ctx
->def
.center_freq1
);
1553 SWITCH_ENTRY_ASSIGN(old_chandef
.center_freq2
,
1554 old_ctx
->def
.center_freq2
);
1555 SWITCH_ENTRY_ASSIGN(new_chandef
.control_freq
,
1556 new_ctx
->def
.chan
->center_freq
);
1557 SWITCH_ENTRY_ASSIGN(new_chandef
.chan_width
,
1558 new_ctx
->def
.width
);
1559 SWITCH_ENTRY_ASSIGN(new_chandef
.center_freq1
,
1560 new_ctx
->def
.center_freq1
);
1561 SWITCH_ENTRY_ASSIGN(new_chandef
.center_freq2
,
1562 new_ctx
->def
.center_freq2
);
1568 LOCAL_PR_FMT
" n_vifs:%d mode:%d",
1569 LOCAL_PR_ARG
, __entry
->n_vifs
, __entry
->mode
1573 DECLARE_EVENT_CLASS(local_sdata_chanctx
,
1574 TP_PROTO(struct ieee80211_local
*local
,
1575 struct ieee80211_sub_if_data
*sdata
,
1576 struct ieee80211_chanctx
*ctx
),
1578 TP_ARGS(local
, sdata
, ctx
),
1593 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT
,
1594 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANCTX_PR_ARG
1598 DEFINE_EVENT(local_sdata_chanctx
, drv_assign_vif_chanctx
,
1599 TP_PROTO(struct ieee80211_local
*local
,
1600 struct ieee80211_sub_if_data
*sdata
,
1601 struct ieee80211_chanctx
*ctx
),
1602 TP_ARGS(local
, sdata
, ctx
)
1605 DEFINE_EVENT(local_sdata_chanctx
, drv_unassign_vif_chanctx
,
1606 TP_PROTO(struct ieee80211_local
*local
,
1607 struct ieee80211_sub_if_data
*sdata
,
1608 struct ieee80211_chanctx
*ctx
),
1609 TP_ARGS(local
, sdata
, ctx
)
1612 TRACE_EVENT(drv_start_ap
,
1613 TP_PROTO(struct ieee80211_local
*local
,
1614 struct ieee80211_sub_if_data
*sdata
,
1615 struct ieee80211_bss_conf
*info
),
1617 TP_ARGS(local
, sdata
, info
),
1622 __field(u8
, dtimper
)
1623 __field(u16
, bcnint
)
1624 __dynamic_array(u8
, ssid
, info
->ssid_len
);
1625 __field(bool, hidden_ssid
);
1631 __entry
->dtimper
= info
->dtim_period
;
1632 __entry
->bcnint
= info
->beacon_int
;
1633 memcpy(__get_dynamic_array(ssid
), info
->ssid
, info
->ssid_len
);
1634 __entry
->hidden_ssid
= info
->hidden_ssid
;
1638 LOCAL_PR_FMT VIF_PR_FMT
,
1639 LOCAL_PR_ARG
, VIF_PR_ARG
1643 DEFINE_EVENT(local_sdata_evt
, drv_stop_ap
,
1644 TP_PROTO(struct ieee80211_local
*local
,
1645 struct ieee80211_sub_if_data
*sdata
),
1646 TP_ARGS(local
, sdata
)
1649 TRACE_EVENT(drv_reconfig_complete
,
1650 TP_PROTO(struct ieee80211_local
*local
,
1651 enum ieee80211_reconfig_type reconfig_type
),
1652 TP_ARGS(local
, reconfig_type
),
1656 __field(u8
, reconfig_type
)
1661 __entry
->reconfig_type
= reconfig_type
;
1665 LOCAL_PR_FMT
" reconfig_type:%d",
1666 LOCAL_PR_ARG
, __entry
->reconfig_type
1671 #if IS_ENABLED(CONFIG_IPV6)
1672 DEFINE_EVENT(local_sdata_evt
, drv_ipv6_addr_change
,
1673 TP_PROTO(struct ieee80211_local
*local
,
1674 struct ieee80211_sub_if_data
*sdata
),
1675 TP_ARGS(local
, sdata
)
1679 TRACE_EVENT(drv_join_ibss
,
1680 TP_PROTO(struct ieee80211_local
*local
,
1681 struct ieee80211_sub_if_data
*sdata
,
1682 struct ieee80211_bss_conf
*info
),
1684 TP_ARGS(local
, sdata
, info
),
1689 __field(u8
, dtimper
)
1690 __field(u16
, bcnint
)
1691 __dynamic_array(u8
, ssid
, info
->ssid_len
);
1697 __entry
->dtimper
= info
->dtim_period
;
1698 __entry
->bcnint
= info
->beacon_int
;
1699 memcpy(__get_dynamic_array(ssid
), info
->ssid
, info
->ssid_len
);
1703 LOCAL_PR_FMT VIF_PR_FMT
,
1704 LOCAL_PR_ARG
, VIF_PR_ARG
1708 DEFINE_EVENT(local_sdata_evt
, drv_leave_ibss
,
1709 TP_PROTO(struct ieee80211_local
*local
,
1710 struct ieee80211_sub_if_data
*sdata
),
1711 TP_ARGS(local
, sdata
)
1714 TRACE_EVENT(drv_get_expected_throughput
,
1715 TP_PROTO(struct ieee80211_sta
*sta
),
1728 STA_PR_FMT
, STA_PR_ARG
1732 TRACE_EVENT(drv_start_nan
,
1733 TP_PROTO(struct ieee80211_local
*local
,
1734 struct ieee80211_sub_if_data
*sdata
,
1735 struct cfg80211_nan_conf
*conf
),
1737 TP_ARGS(local
, sdata
, conf
),
1741 __field(u8
, master_pref
)
1748 __entry
->master_pref
= conf
->master_pref
;
1749 __entry
->bands
= conf
->bands
;
1753 LOCAL_PR_FMT VIF_PR_FMT
1754 ", master preference: %u, bands: 0x%0x",
1755 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->master_pref
,
1760 TRACE_EVENT(drv_stop_nan
,
1761 TP_PROTO(struct ieee80211_local
*local
,
1762 struct ieee80211_sub_if_data
*sdata
),
1764 TP_ARGS(local
, sdata
),
1777 LOCAL_PR_FMT VIF_PR_FMT
,
1778 LOCAL_PR_ARG
, VIF_PR_ARG
1782 TRACE_EVENT(drv_nan_change_conf
,
1783 TP_PROTO(struct ieee80211_local
*local
,
1784 struct ieee80211_sub_if_data
*sdata
,
1785 struct cfg80211_nan_conf
*conf
,
1788 TP_ARGS(local
, sdata
, conf
, changes
),
1792 __field(u8
, master_pref
)
1794 __field(u32
, changes
)
1800 __entry
->master_pref
= conf
->master_pref
;
1801 __entry
->bands
= conf
->bands
;
1802 __entry
->changes
= changes
;
1806 LOCAL_PR_FMT VIF_PR_FMT
1807 ", master preference: %u, bands: 0x%0x, changes: 0x%x",
1808 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->master_pref
,
1809 __entry
->bands
, __entry
->changes
1813 TRACE_EVENT(drv_add_nan_func
,
1814 TP_PROTO(struct ieee80211_local
*local
,
1815 struct ieee80211_sub_if_data
*sdata
,
1816 const struct cfg80211_nan_func
*func
),
1818 TP_ARGS(local
, sdata
, func
),
1823 __field(u8
, inst_id
)
1829 __entry
->type
= func
->type
;
1830 __entry
->inst_id
= func
->instance_id
;
1834 LOCAL_PR_FMT VIF_PR_FMT
1835 ", type: %u, inst_id: %u",
1836 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->type
, __entry
->inst_id
1840 TRACE_EVENT(drv_del_nan_func
,
1841 TP_PROTO(struct ieee80211_local
*local
,
1842 struct ieee80211_sub_if_data
*sdata
,
1845 TP_ARGS(local
, sdata
, instance_id
),
1849 __field(u8
, instance_id
)
1855 __entry
->instance_id
= instance_id
;
1859 LOCAL_PR_FMT VIF_PR_FMT
1860 ", instance_id: %u",
1861 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->instance_id
1866 * Tracing for API calls that drivers call.
1869 TRACE_EVENT(api_start_tx_ba_session
,
1870 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
1885 STA_PR_FMT
" tid:%d",
1886 STA_PR_ARG
, __entry
->tid
1890 TRACE_EVENT(api_start_tx_ba_cb
,
1891 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
1893 TP_ARGS(sdata
, ra
, tid
),
1897 __array(u8
, ra
, ETH_ALEN
)
1903 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
1908 VIF_PR_FMT
" ra:%pM tid:%d",
1909 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
1913 TRACE_EVENT(api_stop_tx_ba_session
,
1914 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
1929 STA_PR_FMT
" tid:%d",
1930 STA_PR_ARG
, __entry
->tid
1934 TRACE_EVENT(api_stop_tx_ba_cb
,
1935 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
1937 TP_ARGS(sdata
, ra
, tid
),
1941 __array(u8
, ra
, ETH_ALEN
)
1947 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
1952 VIF_PR_FMT
" ra:%pM tid:%d",
1953 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
1957 DEFINE_EVENT(local_only_evt
, api_restart_hw
,
1958 TP_PROTO(struct ieee80211_local
*local
),
1962 TRACE_EVENT(api_beacon_loss
,
1963 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
1981 TRACE_EVENT(api_connection_loss
,
1982 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
2000 TRACE_EVENT(api_cqm_rssi_notify
,
2001 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
2002 enum nl80211_cqm_rssi_threshold_event rssi_event
,
2005 TP_ARGS(sdata
, rssi_event
, rssi_level
),
2009 __field(u32
, rssi_event
)
2010 __field(s32
, rssi_level
)
2015 __entry
->rssi_event
= rssi_event
;
2016 __entry
->rssi_level
= rssi_level
;
2020 VIF_PR_FMT
" event:%d rssi:%d",
2021 VIF_PR_ARG
, __entry
->rssi_event
, __entry
->rssi_level
2025 DEFINE_EVENT(local_sdata_evt
, api_cqm_beacon_loss_notify
,
2026 TP_PROTO(struct ieee80211_local
*local
,
2027 struct ieee80211_sub_if_data
*sdata
),
2028 TP_ARGS(local
, sdata
)
2031 TRACE_EVENT(api_scan_completed
,
2032 TP_PROTO(struct ieee80211_local
*local
, bool aborted
),
2034 TP_ARGS(local
, aborted
),
2038 __field(bool, aborted
)
2043 __entry
->aborted
= aborted
;
2047 LOCAL_PR_FMT
" aborted:%d",
2048 LOCAL_PR_ARG
, __entry
->aborted
2052 TRACE_EVENT(api_sched_scan_results
,
2053 TP_PROTO(struct ieee80211_local
*local
),
2066 LOCAL_PR_FMT
, LOCAL_PR_ARG
2070 TRACE_EVENT(api_sched_scan_stopped
,
2071 TP_PROTO(struct ieee80211_local
*local
),
2084 LOCAL_PR_FMT
, LOCAL_PR_ARG
2088 TRACE_EVENT(api_sta_block_awake
,
2089 TP_PROTO(struct ieee80211_local
*local
,
2090 struct ieee80211_sta
*sta
, bool block
),
2092 TP_ARGS(local
, sta
, block
),
2097 __field(bool, block
)
2103 __entry
->block
= block
;
2107 LOCAL_PR_FMT STA_PR_FMT
" block:%d",
2108 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->block
2112 TRACE_EVENT(api_chswitch_done
,
2113 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, bool success
),
2115 TP_ARGS(sdata
, success
),
2119 __field(bool, success
)
2124 __entry
->success
= success
;
2128 VIF_PR_FMT
" success=%d",
2129 VIF_PR_ARG
, __entry
->success
2133 DEFINE_EVENT(local_only_evt
, api_ready_on_channel
,
2134 TP_PROTO(struct ieee80211_local
*local
),
2138 DEFINE_EVENT(local_only_evt
, api_remain_on_channel_expired
,
2139 TP_PROTO(struct ieee80211_local
*local
),
2143 TRACE_EVENT(api_gtk_rekey_notify
,
2144 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
2145 const u8
*bssid
, const u8
*replay_ctr
),
2147 TP_ARGS(sdata
, bssid
, replay_ctr
),
2151 __array(u8
, bssid
, ETH_ALEN
)
2152 __array(u8
, replay_ctr
, NL80211_REPLAY_CTR_LEN
)
2157 memcpy(__entry
->bssid
, bssid
, ETH_ALEN
);
2158 memcpy(__entry
->replay_ctr
, replay_ctr
, NL80211_REPLAY_CTR_LEN
);
2161 TP_printk(VIF_PR_FMT
, VIF_PR_ARG
)
2164 TRACE_EVENT(api_enable_rssi_reports
,
2165 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
2166 int rssi_min_thold
, int rssi_max_thold
),
2168 TP_ARGS(sdata
, rssi_min_thold
, rssi_max_thold
),
2172 __field(int, rssi_min_thold
)
2173 __field(int, rssi_max_thold
)
2178 __entry
->rssi_min_thold
= rssi_min_thold
;
2179 __entry
->rssi_max_thold
= rssi_max_thold
;
2183 VIF_PR_FMT
" rssi_min_thold =%d, rssi_max_thold = %d",
2184 VIF_PR_ARG
, __entry
->rssi_min_thold
, __entry
->rssi_max_thold
2188 TRACE_EVENT(api_eosp
,
2189 TP_PROTO(struct ieee80211_local
*local
,
2190 struct ieee80211_sta
*sta
),
2192 TP_ARGS(local
, sta
),
2205 LOCAL_PR_FMT STA_PR_FMT
,
2206 LOCAL_PR_ARG
, STA_PR_ARG
2210 TRACE_EVENT(api_send_eosp_nullfunc
,
2211 TP_PROTO(struct ieee80211_local
*local
,
2212 struct ieee80211_sta
*sta
,
2215 TP_ARGS(local
, sta
, tid
),
2230 LOCAL_PR_FMT STA_PR_FMT
" tid:%d",
2231 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->tid
2235 TRACE_EVENT(api_sta_set_buffered
,
2236 TP_PROTO(struct ieee80211_local
*local
,
2237 struct ieee80211_sta
*sta
,
2238 u8 tid
, bool buffered
),
2240 TP_ARGS(local
, sta
, tid
, buffered
),
2246 __field(bool, buffered
)
2253 __entry
->buffered
= buffered
;
2257 LOCAL_PR_FMT STA_PR_FMT
" tid:%d buffered:%d",
2258 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->tid
, __entry
->buffered
2263 * Tracing for internal functions
2264 * (which may also be called in response to driver calls)
2267 TRACE_EVENT(wake_queue
,
2268 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
2269 enum queue_stop_reason reason
),
2271 TP_ARGS(local
, queue
, reason
),
2276 __field(u32
, reason
)
2281 __entry
->queue
= queue
;
2282 __entry
->reason
= reason
;
2286 LOCAL_PR_FMT
" queue:%d, reason:%d",
2287 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
2291 TRACE_EVENT(stop_queue
,
2292 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
2293 enum queue_stop_reason reason
),
2295 TP_ARGS(local
, queue
, reason
),
2300 __field(u32
, reason
)
2305 __entry
->queue
= queue
;
2306 __entry
->reason
= reason
;
2310 LOCAL_PR_FMT
" queue:%d, reason:%d",
2311 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
2315 TRACE_EVENT(drv_set_default_unicast_key
,
2316 TP_PROTO(struct ieee80211_local
*local
,
2317 struct ieee80211_sub_if_data
*sdata
,
2320 TP_ARGS(local
, sdata
, key_idx
),
2325 __field(int, key_idx
)
2331 __entry
->key_idx
= key_idx
;
2334 TP_printk(LOCAL_PR_FMT VIF_PR_FMT
" key_idx:%d",
2335 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->key_idx
)
2338 TRACE_EVENT(api_radar_detected
,
2339 TP_PROTO(struct ieee80211_local
*local
),
2352 LOCAL_PR_FMT
" radar detected",
2357 TRACE_EVENT(drv_channel_switch_beacon
,
2358 TP_PROTO(struct ieee80211_local
*local
,
2359 struct ieee80211_sub_if_data
*sdata
,
2360 struct cfg80211_chan_def
*chandef
),
2362 TP_ARGS(local
, sdata
, chandef
),
2373 CHANDEF_ASSIGN(chandef
);
2377 LOCAL_PR_FMT VIF_PR_FMT
" channel switch to " CHANDEF_PR_FMT
,
2378 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANDEF_PR_ARG
2382 TRACE_EVENT(drv_pre_channel_switch
,
2383 TP_PROTO(struct ieee80211_local
*local
,
2384 struct ieee80211_sub_if_data
*sdata
,
2385 struct ieee80211_channel_switch
*ch_switch
),
2387 TP_ARGS(local
, sdata
, ch_switch
),
2393 __field(u64
, timestamp
)
2394 __field(u32
, device_timestamp
)
2395 __field(bool, block_tx
)
2402 CHANDEF_ASSIGN(&ch_switch
->chandef
)
2403 __entry
->timestamp
= ch_switch
->timestamp
;
2404 __entry
->device_timestamp
= ch_switch
->device_timestamp
;
2405 __entry
->block_tx
= ch_switch
->block_tx
;
2406 __entry
->count
= ch_switch
->count
;
2410 LOCAL_PR_FMT VIF_PR_FMT
" prepare channel switch to "
2411 CHANDEF_PR_FMT
" count:%d block_tx:%d timestamp:%llu",
2412 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANDEF_PR_ARG
, __entry
->count
,
2413 __entry
->block_tx
, __entry
->timestamp
2417 DEFINE_EVENT(local_sdata_evt
, drv_post_channel_switch
,
2418 TP_PROTO(struct ieee80211_local
*local
,
2419 struct ieee80211_sub_if_data
*sdata
),
2420 TP_ARGS(local
, sdata
)
2423 TRACE_EVENT(drv_get_txpower
,
2424 TP_PROTO(struct ieee80211_local
*local
,
2425 struct ieee80211_sub_if_data
*sdata
,
2428 TP_ARGS(local
, sdata
, dbm
, ret
),
2445 LOCAL_PR_FMT VIF_PR_FMT
" dbm:%d ret:%d",
2446 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->dbm
, __entry
->ret
2450 TRACE_EVENT(drv_tdls_channel_switch
,
2451 TP_PROTO(struct ieee80211_local
*local
,
2452 struct ieee80211_sub_if_data
*sdata
,
2453 struct ieee80211_sta
*sta
, u8 oper_class
,
2454 struct cfg80211_chan_def
*chandef
),
2456 TP_ARGS(local
, sdata
, sta
, oper_class
, chandef
),
2462 __field(u8
, oper_class
)
2470 __entry
->oper_class
= oper_class
;
2471 CHANDEF_ASSIGN(chandef
)
2475 LOCAL_PR_FMT VIF_PR_FMT
" tdls channel switch to"
2476 CHANDEF_PR_FMT
" oper_class:%d " STA_PR_FMT
,
2477 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANDEF_PR_ARG
, __entry
->oper_class
,
2482 TRACE_EVENT(drv_tdls_cancel_channel_switch
,
2483 TP_PROTO(struct ieee80211_local
*local
,
2484 struct ieee80211_sub_if_data
*sdata
,
2485 struct ieee80211_sta
*sta
),
2487 TP_ARGS(local
, sdata
, sta
),
2502 LOCAL_PR_FMT VIF_PR_FMT
2503 " tdls cancel channel switch with " STA_PR_FMT
,
2504 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
2508 TRACE_EVENT(drv_tdls_recv_channel_switch
,
2509 TP_PROTO(struct ieee80211_local
*local
,
2510 struct ieee80211_sub_if_data
*sdata
,
2511 struct ieee80211_tdls_ch_sw_params
*params
),
2513 TP_ARGS(local
, sdata
, params
),
2518 __field(u8
, action_code
)
2521 __field(u32
, status
)
2522 __field(bool, peer_initiator
)
2523 __field(u32
, timestamp
)
2524 __field(u16
, switch_time
)
2525 __field(u16
, switch_timeout
)
2531 STA_NAMED_ASSIGN(params
->sta
);
2532 CHANDEF_ASSIGN(params
->chandef
)
2533 __entry
->peer_initiator
= params
->sta
->tdls_initiator
;
2534 __entry
->action_code
= params
->action_code
;
2535 __entry
->status
= params
->status
;
2536 __entry
->timestamp
= params
->timestamp
;
2537 __entry
->switch_time
= params
->switch_time
;
2538 __entry
->switch_timeout
= params
->switch_timeout
;
2542 LOCAL_PR_FMT VIF_PR_FMT
" received tdls channel switch packet"
2543 " action:%d status:%d time:%d switch time:%d switch"
2544 " timeout:%d initiator: %d chan:" CHANDEF_PR_FMT STA_PR_FMT
,
2545 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->action_code
, __entry
->status
,
2546 __entry
->timestamp
, __entry
->switch_time
,
2547 __entry
->switch_timeout
, __entry
->peer_initiator
,
2548 CHANDEF_PR_ARG
, STA_PR_ARG
2552 TRACE_EVENT(drv_wake_tx_queue
,
2553 TP_PROTO(struct ieee80211_local
*local
,
2554 struct ieee80211_sub_if_data
*sdata
,
2555 struct txq_info
*txq
),
2557 TP_ARGS(local
, sdata
, txq
),
2568 struct ieee80211_sta
*sta
= txq
->txq
.sta
;
2573 __entry
->ac
= txq
->txq
.ac
;
2574 __entry
->tid
= txq
->txq
.tid
;
2578 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" ac:%d tid:%d",
2579 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->ac
, __entry
->tid
2583 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
2585 #undef TRACE_INCLUDE_PATH
2586 #define TRACE_INCLUDE_PATH .
2587 #undef TRACE_INCLUDE_FILE
2588 #define TRACE_INCLUDE_FILE trace
2589 #include <trace/define_trace.h>