1 #if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
2 #define __MAC80211_DRIVER_TRACE
4 #include <linux/tracepoint.h>
5 #include <net/mac80211.h>
6 #include "ieee80211_i.h"
9 #define TRACE_SYSTEM mac80211
12 #define LOCAL_ENTRY __array(char, wiphy_name, 32)
13 #define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME)
14 #define LOCAL_PR_FMT "%s"
15 #define LOCAL_PR_ARG __entry->wiphy_name
17 #define STA_ENTRY __array(char, sta_addr, ETH_ALEN)
18 #define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN))
19 #define STA_NAMED_ASSIGN(s) memcpy(__entry->sta_addr, (s)->addr, ETH_ALEN)
20 #define STA_PR_FMT " sta:%pM"
21 #define STA_PR_ARG __entry->sta_addr
23 #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
25 __string(vif_name, sdata->name)
26 #define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
27 __entry->p2p = sdata->vif.p2p; \
28 __assign_str(vif_name, sdata->name)
29 #define VIF_PR_FMT " vif:%s(%d%s)"
30 #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
32 #define CHANDEF_ENTRY __field(u32, control_freq) \
33 __field(u32, chan_width) \
34 __field(u32, center_freq1) \
35 __field(u32, center_freq2)
36 #define CHANDEF_ASSIGN(c) \
37 __entry->control_freq = (c) ? ((c)->chan ? (c)->chan->center_freq : 0) : 0; \
38 __entry->chan_width = (c) ? (c)->width : 0; \
39 __entry->center_freq1 = (c) ? (c)->center_freq1 : 0; \
40 __entry->center_freq2 = (c) ? (c)->center_freq2 : 0;
41 #define CHANDEF_PR_FMT " control:%d MHz width:%d center: %d/%d MHz"
42 #define CHANDEF_PR_ARG __entry->control_freq, __entry->chan_width, \
43 __entry->center_freq1, __entry->center_freq2
45 #define MIN_CHANDEF_ENTRY \
46 __field(u32, min_control_freq) \
47 __field(u32, min_chan_width) \
48 __field(u32, min_center_freq1) \
49 __field(u32, min_center_freq2)
51 #define MIN_CHANDEF_ASSIGN(c) \
52 __entry->min_control_freq = (c)->chan ? (c)->chan->center_freq : 0; \
53 __entry->min_chan_width = (c)->width; \
54 __entry->min_center_freq1 = (c)->center_freq1; \
55 __entry->min_center_freq2 = (c)->center_freq2;
56 #define MIN_CHANDEF_PR_FMT " min_control:%d MHz min_width:%d min_center: %d/%d MHz"
57 #define MIN_CHANDEF_PR_ARG __entry->min_control_freq, __entry->min_chan_width, \
58 __entry->min_center_freq1, __entry->min_center_freq2
60 #define CHANCTX_ENTRY CHANDEF_ENTRY \
62 __field(u8, rx_chains_static) \
63 __field(u8, rx_chains_dynamic)
64 #define CHANCTX_ASSIGN CHANDEF_ASSIGN(&ctx->conf.def) \
65 MIN_CHANDEF_ASSIGN(&ctx->conf.min_def) \
66 __entry->rx_chains_static = ctx->conf.rx_chains_static; \
67 __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic
68 #define CHANCTX_PR_FMT CHANDEF_PR_FMT MIN_CHANDEF_PR_FMT " chains:%d/%d"
69 #define CHANCTX_PR_ARG CHANDEF_PR_ARG, MIN_CHANDEF_PR_ARG, \
70 __entry->rx_chains_static, __entry->rx_chains_dynamic
72 #define KEY_ENTRY __field(u32, cipher) \
73 __field(u8, hw_key_idx) \
76 #define KEY_ASSIGN(k) __entry->cipher = (k)->cipher; \
77 __entry->flags = (k)->flags; \
78 __entry->keyidx = (k)->keyidx; \
79 __entry->hw_key_idx = (k)->hw_key_idx;
80 #define KEY_PR_FMT " cipher:0x%x, flags=%#x, keyidx=%d, hw_key_idx=%d"
81 #define KEY_PR_ARG __entry->cipher, __entry->flags, __entry->keyidx, __entry->hw_key_idx
86 * Tracing for driver callbacks.
89 DECLARE_EVENT_CLASS(local_only_evt
,
90 TP_PROTO(struct ieee80211_local
*local
),
98 TP_printk(LOCAL_PR_FMT
, LOCAL_PR_ARG
)
101 DECLARE_EVENT_CLASS(local_sdata_addr_evt
,
102 TP_PROTO(struct ieee80211_local
*local
,
103 struct ieee80211_sub_if_data
*sdata
),
104 TP_ARGS(local
, sdata
),
109 __array(char, addr
, ETH_ALEN
)
115 memcpy(__entry
->addr
, sdata
->vif
.addr
, ETH_ALEN
);
119 LOCAL_PR_FMT VIF_PR_FMT
" addr:%pM",
120 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->addr
124 DECLARE_EVENT_CLASS(local_u32_evt
,
125 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
126 TP_ARGS(local
, value
),
135 __entry
->value
= value
;
139 LOCAL_PR_FMT
" value:%d",
140 LOCAL_PR_ARG
, __entry
->value
144 DECLARE_EVENT_CLASS(local_sdata_evt
,
145 TP_PROTO(struct ieee80211_local
*local
,
146 struct ieee80211_sub_if_data
*sdata
),
147 TP_ARGS(local
, sdata
),
160 LOCAL_PR_FMT VIF_PR_FMT
,
161 LOCAL_PR_ARG
, VIF_PR_ARG
165 DEFINE_EVENT(local_only_evt
, drv_return_void
,
166 TP_PROTO(struct ieee80211_local
*local
),
170 TRACE_EVENT(drv_return_int
,
171 TP_PROTO(struct ieee80211_local
*local
, int ret
),
181 TP_printk(LOCAL_PR_FMT
" - %d", LOCAL_PR_ARG
, __entry
->ret
)
184 TRACE_EVENT(drv_return_bool
,
185 TP_PROTO(struct ieee80211_local
*local
, bool ret
),
195 TP_printk(LOCAL_PR_FMT
" - %s", LOCAL_PR_ARG
, (__entry
->ret
) ?
199 TRACE_EVENT(drv_return_u32
,
200 TP_PROTO(struct ieee80211_local
*local
, u32 ret
),
210 TP_printk(LOCAL_PR_FMT
" - %u", LOCAL_PR_ARG
, __entry
->ret
)
213 TRACE_EVENT(drv_return_u64
,
214 TP_PROTO(struct ieee80211_local
*local
, u64 ret
),
224 TP_printk(LOCAL_PR_FMT
" - %llu", LOCAL_PR_ARG
, __entry
->ret
)
227 DEFINE_EVENT(local_only_evt
, drv_start
,
228 TP_PROTO(struct ieee80211_local
*local
),
232 DEFINE_EVENT(local_u32_evt
, drv_get_et_strings
,
233 TP_PROTO(struct ieee80211_local
*local
, u32 sset
),
237 DEFINE_EVENT(local_u32_evt
, drv_get_et_sset_count
,
238 TP_PROTO(struct ieee80211_local
*local
, u32 sset
),
242 DEFINE_EVENT(local_only_evt
, drv_get_et_stats
,
243 TP_PROTO(struct ieee80211_local
*local
),
247 DEFINE_EVENT(local_only_evt
, drv_suspend
,
248 TP_PROTO(struct ieee80211_local
*local
),
252 DEFINE_EVENT(local_only_evt
, drv_resume
,
253 TP_PROTO(struct ieee80211_local
*local
),
257 TRACE_EVENT(drv_set_wakeup
,
258 TP_PROTO(struct ieee80211_local
*local
, bool enabled
),
259 TP_ARGS(local
, enabled
),
262 __field(bool, enabled
)
266 __entry
->enabled
= enabled
;
268 TP_printk(LOCAL_PR_FMT
" enabled:%d", LOCAL_PR_ARG
, __entry
->enabled
)
271 DEFINE_EVENT(local_only_evt
, drv_stop
,
272 TP_PROTO(struct ieee80211_local
*local
),
276 DEFINE_EVENT(local_sdata_addr_evt
, drv_add_interface
,
277 TP_PROTO(struct ieee80211_local
*local
,
278 struct ieee80211_sub_if_data
*sdata
),
279 TP_ARGS(local
, sdata
)
282 TRACE_EVENT(drv_change_interface
,
283 TP_PROTO(struct ieee80211_local
*local
,
284 struct ieee80211_sub_if_data
*sdata
,
285 enum nl80211_iftype type
, bool p2p
),
287 TP_ARGS(local
, sdata
, type
, p2p
),
292 __field(u32
, new_type
)
293 __field(bool, new_p2p
)
299 __entry
->new_type
= type
;
300 __entry
->new_p2p
= p2p
;
304 LOCAL_PR_FMT VIF_PR_FMT
" new type:%d%s",
305 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->new_type
,
306 __entry
->new_p2p
? "/p2p" : ""
310 DEFINE_EVENT(local_sdata_addr_evt
, drv_remove_interface
,
311 TP_PROTO(struct ieee80211_local
*local
,
312 struct ieee80211_sub_if_data
*sdata
),
313 TP_ARGS(local
, sdata
)
316 TRACE_EVENT(drv_config
,
317 TP_PROTO(struct ieee80211_local
*local
,
320 TP_ARGS(local
, changed
),
324 __field(u32
, changed
)
326 __field(int, power_level
)
327 __field(int, dynamic_ps_timeout
)
328 __field(u16
, listen_interval
)
329 __field(u8
, long_frame_max_tx_count
)
330 __field(u8
, short_frame_max_tx_count
)
337 __entry
->changed
= changed
;
338 __entry
->flags
= local
->hw
.conf
.flags
;
339 __entry
->power_level
= local
->hw
.conf
.power_level
;
340 __entry
->dynamic_ps_timeout
= local
->hw
.conf
.dynamic_ps_timeout
;
341 __entry
->listen_interval
= local
->hw
.conf
.listen_interval
;
342 __entry
->long_frame_max_tx_count
=
343 local
->hw
.conf
.long_frame_max_tx_count
;
344 __entry
->short_frame_max_tx_count
=
345 local
->hw
.conf
.short_frame_max_tx_count
;
346 CHANDEF_ASSIGN(&local
->hw
.conf
.chandef
)
347 __entry
->smps
= local
->hw
.conf
.smps_mode
;
351 LOCAL_PR_FMT
" ch:%#x" CHANDEF_PR_FMT
,
352 LOCAL_PR_ARG
, __entry
->changed
, CHANDEF_PR_ARG
356 TRACE_EVENT(drv_bss_info_changed
,
357 TP_PROTO(struct ieee80211_local
*local
,
358 struct ieee80211_sub_if_data
*sdata
,
359 struct ieee80211_bss_conf
*info
,
362 TP_ARGS(local
, sdata
, info
, changed
),
367 __field(u32
, changed
)
369 __field(bool, ibss_joined
)
370 __field(bool, ibss_creator
)
373 __field(bool, shortpre
)
374 __field(bool, shortslot
)
375 __field(bool, enable_beacon
)
378 __field(u16
, assoc_cap
)
379 __field(u64
, sync_tsf
)
380 __field(u32
, sync_device_ts
)
381 __field(u8
, sync_dtim_count
)
382 __field(u32
, basic_rates
)
383 __array(int, mcast_rate
, IEEE80211_NUM_BANDS
)
384 __field(u16
, ht_operation_mode
)
385 __field(s32
, cqm_rssi_thold
);
386 __field(s32
, cqm_rssi_hyst
);
387 __field(u32
, channel_width
);
388 __field(u32
, channel_cfreq1
);
389 __dynamic_array(u32
, arp_addr_list
,
390 info
->arp_addr_cnt
> IEEE80211_BSS_ARP_ADDR_LIST_LEN
?
391 IEEE80211_BSS_ARP_ADDR_LIST_LEN
:
393 __field(int, arp_addr_cnt
);
397 __dynamic_array(u8
, ssid
, info
->ssid_len
);
398 __field(bool, hidden_ssid
);
399 __field(int, txpower
)
400 __field(u8
, p2p_oppps_ctwindow
)
406 __entry
->changed
= changed
;
407 __entry
->aid
= info
->aid
;
408 __entry
->assoc
= info
->assoc
;
409 __entry
->ibss_joined
= info
->ibss_joined
;
410 __entry
->ibss_creator
= info
->ibss_creator
;
411 __entry
->shortpre
= info
->use_short_preamble
;
412 __entry
->cts
= info
->use_cts_prot
;
413 __entry
->shortslot
= info
->use_short_slot
;
414 __entry
->enable_beacon
= info
->enable_beacon
;
415 __entry
->dtimper
= info
->dtim_period
;
416 __entry
->bcnint
= info
->beacon_int
;
417 __entry
->assoc_cap
= info
->assoc_capability
;
418 __entry
->sync_tsf
= info
->sync_tsf
;
419 __entry
->sync_device_ts
= info
->sync_device_ts
;
420 __entry
->sync_dtim_count
= info
->sync_dtim_count
;
421 __entry
->basic_rates
= info
->basic_rates
;
422 memcpy(__entry
->mcast_rate
, info
->mcast_rate
,
423 sizeof(__entry
->mcast_rate
));
424 __entry
->ht_operation_mode
= info
->ht_operation_mode
;
425 __entry
->cqm_rssi_thold
= info
->cqm_rssi_thold
;
426 __entry
->cqm_rssi_hyst
= info
->cqm_rssi_hyst
;
427 __entry
->channel_width
= info
->chandef
.width
;
428 __entry
->channel_cfreq1
= info
->chandef
.center_freq1
;
429 __entry
->arp_addr_cnt
= info
->arp_addr_cnt
;
430 memcpy(__get_dynamic_array(arp_addr_list
), info
->arp_addr_list
,
431 sizeof(u32
) * (info
->arp_addr_cnt
> IEEE80211_BSS_ARP_ADDR_LIST_LEN
?
432 IEEE80211_BSS_ARP_ADDR_LIST_LEN
:
433 info
->arp_addr_cnt
));
434 __entry
->qos
= info
->qos
;
435 __entry
->idle
= info
->idle
;
436 __entry
->ps
= info
->ps
;
437 memcpy(__get_dynamic_array(ssid
), info
->ssid
, info
->ssid_len
);
438 __entry
->hidden_ssid
= info
->hidden_ssid
;
439 __entry
->txpower
= info
->txpower
;
440 __entry
->p2p_oppps_ctwindow
= info
->p2p_noa_attr
.oppps_ctwindow
;
444 LOCAL_PR_FMT VIF_PR_FMT
" changed:%#x",
445 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->changed
449 TRACE_EVENT(drv_prepare_multicast
,
450 TP_PROTO(struct ieee80211_local
*local
, int mc_count
),
452 TP_ARGS(local
, mc_count
),
456 __field(int, mc_count
)
461 __entry
->mc_count
= mc_count
;
465 LOCAL_PR_FMT
" prepare mc (%d)",
466 LOCAL_PR_ARG
, __entry
->mc_count
470 TRACE_EVENT(drv_configure_filter
,
471 TP_PROTO(struct ieee80211_local
*local
,
472 unsigned int changed_flags
,
473 unsigned int *total_flags
,
476 TP_ARGS(local
, changed_flags
, total_flags
, multicast
),
480 __field(unsigned int, changed
)
481 __field(unsigned int, total
)
482 __field(u64
, multicast
)
487 __entry
->changed
= changed_flags
;
488 __entry
->total
= *total_flags
;
489 __entry
->multicast
= multicast
;
493 LOCAL_PR_FMT
" changed:%#x total:%#x",
494 LOCAL_PR_ARG
, __entry
->changed
, __entry
->total
498 TRACE_EVENT(drv_config_iface_filter
,
499 TP_PROTO(struct ieee80211_local
*local
,
500 struct ieee80211_sub_if_data
*sdata
,
501 unsigned int filter_flags
,
502 unsigned int changed_flags
),
504 TP_ARGS(local
, sdata
, filter_flags
, changed_flags
),
509 __field(unsigned int, filter_flags
)
510 __field(unsigned int, changed_flags
)
516 __entry
->filter_flags
= filter_flags
;
517 __entry
->changed_flags
= changed_flags
;
521 LOCAL_PR_FMT VIF_PR_FMT
522 " filter_flags: %#x changed_flags: %#x",
523 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->filter_flags
,
524 __entry
->changed_flags
528 TRACE_EVENT(drv_set_tim
,
529 TP_PROTO(struct ieee80211_local
*local
,
530 struct ieee80211_sta
*sta
, bool set
),
532 TP_ARGS(local
, sta
, set
),
547 LOCAL_PR_FMT STA_PR_FMT
" set:%d",
548 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->set
552 TRACE_EVENT(drv_set_key
,
553 TP_PROTO(struct ieee80211_local
*local
,
554 enum set_key_cmd cmd
, struct ieee80211_sub_if_data
*sdata
,
555 struct ieee80211_sta
*sta
,
556 struct ieee80211_key_conf
*key
),
558 TP_ARGS(local
, cmd
, sdata
, sta
, key
),
575 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT KEY_PR_FMT
,
576 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, KEY_PR_ARG
580 TRACE_EVENT(drv_update_tkip_key
,
581 TP_PROTO(struct ieee80211_local
*local
,
582 struct ieee80211_sub_if_data
*sdata
,
583 struct ieee80211_key_conf
*conf
,
584 struct ieee80211_sta
*sta
, u32 iv32
),
586 TP_ARGS(local
, sdata
, conf
, sta
, iv32
),
599 __entry
->iv32
= iv32
;
603 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" iv32:%#x",
604 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->iv32
608 DEFINE_EVENT(local_sdata_evt
, drv_hw_scan
,
609 TP_PROTO(struct ieee80211_local
*local
,
610 struct ieee80211_sub_if_data
*sdata
),
611 TP_ARGS(local
, sdata
)
614 DEFINE_EVENT(local_sdata_evt
, drv_cancel_hw_scan
,
615 TP_PROTO(struct ieee80211_local
*local
,
616 struct ieee80211_sub_if_data
*sdata
),
617 TP_ARGS(local
, sdata
)
620 DEFINE_EVENT(local_sdata_evt
, drv_sched_scan_start
,
621 TP_PROTO(struct ieee80211_local
*local
,
622 struct ieee80211_sub_if_data
*sdata
),
623 TP_ARGS(local
, sdata
)
626 DEFINE_EVENT(local_sdata_evt
, drv_sched_scan_stop
,
627 TP_PROTO(struct ieee80211_local
*local
,
628 struct ieee80211_sub_if_data
*sdata
),
629 TP_ARGS(local
, sdata
)
632 TRACE_EVENT(drv_sw_scan_start
,
633 TP_PROTO(struct ieee80211_local
*local
,
634 struct ieee80211_sub_if_data
*sdata
,
637 TP_ARGS(local
, sdata
, mac_addr
),
642 __array(char, mac_addr
, ETH_ALEN
)
648 memcpy(__entry
->mac_addr
, mac_addr
, ETH_ALEN
);
651 TP_printk(LOCAL_PR_FMT
", " VIF_PR_FMT
", addr:%pM",
652 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->mac_addr
)
655 DEFINE_EVENT(local_sdata_evt
, drv_sw_scan_complete
,
656 TP_PROTO(struct ieee80211_local
*local
,
657 struct ieee80211_sub_if_data
*sdata
),
658 TP_ARGS(local
, sdata
)
661 TRACE_EVENT(drv_get_stats
,
662 TP_PROTO(struct ieee80211_local
*local
,
663 struct ieee80211_low_level_stats
*stats
,
666 TP_ARGS(local
, stats
, ret
),
671 __field(unsigned int, ackfail
)
672 __field(unsigned int, rtsfail
)
673 __field(unsigned int, fcserr
)
674 __field(unsigned int, rtssucc
)
680 __entry
->ackfail
= stats
->dot11ACKFailureCount
;
681 __entry
->rtsfail
= stats
->dot11RTSFailureCount
;
682 __entry
->fcserr
= stats
->dot11FCSErrorCount
;
683 __entry
->rtssucc
= stats
->dot11RTSSuccessCount
;
687 LOCAL_PR_FMT
" ret:%d",
688 LOCAL_PR_ARG
, __entry
->ret
692 TRACE_EVENT(drv_get_key_seq
,
693 TP_PROTO(struct ieee80211_local
*local
,
694 struct ieee80211_key_conf
*key
),
709 LOCAL_PR_FMT KEY_PR_FMT
,
710 LOCAL_PR_ARG
, KEY_PR_ARG
714 DEFINE_EVENT(local_u32_evt
, drv_set_frag_threshold
,
715 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
716 TP_ARGS(local
, value
)
719 DEFINE_EVENT(local_u32_evt
, drv_set_rts_threshold
,
720 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
721 TP_ARGS(local
, value
)
724 TRACE_EVENT(drv_set_coverage_class
,
725 TP_PROTO(struct ieee80211_local
*local
, s16 value
),
727 TP_ARGS(local
, value
),
736 __entry
->value
= value
;
740 LOCAL_PR_FMT
" value:%d",
741 LOCAL_PR_ARG
, __entry
->value
745 TRACE_EVENT(drv_sta_notify
,
746 TP_PROTO(struct ieee80211_local
*local
,
747 struct ieee80211_sub_if_data
*sdata
,
748 enum sta_notify_cmd cmd
,
749 struct ieee80211_sta
*sta
),
751 TP_ARGS(local
, sdata
, cmd
, sta
),
768 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" cmd:%d",
769 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->cmd
773 TRACE_EVENT(drv_sta_state
,
774 TP_PROTO(struct ieee80211_local
*local
,
775 struct ieee80211_sub_if_data
*sdata
,
776 struct ieee80211_sta
*sta
,
777 enum ieee80211_sta_state old_state
,
778 enum ieee80211_sta_state new_state
),
780 TP_ARGS(local
, sdata
, sta
, old_state
, new_state
),
786 __field(u32
, old_state
)
787 __field(u32
, new_state
)
794 __entry
->old_state
= old_state
;
795 __entry
->new_state
= new_state
;
799 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" state: %d->%d",
800 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
,
801 __entry
->old_state
, __entry
->new_state
805 TRACE_EVENT(drv_sta_rc_update
,
806 TP_PROTO(struct ieee80211_local
*local
,
807 struct ieee80211_sub_if_data
*sdata
,
808 struct ieee80211_sta
*sta
,
811 TP_ARGS(local
, sdata
, sta
, changed
),
817 __field(u32
, changed
)
824 __entry
->changed
= changed
;
828 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" changed: 0x%x",
829 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->changed
833 DECLARE_EVENT_CLASS(sta_event
,
834 TP_PROTO(struct ieee80211_local
*local
,
835 struct ieee80211_sub_if_data
*sdata
,
836 struct ieee80211_sta
*sta
),
838 TP_ARGS(local
, sdata
, sta
),
853 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
,
854 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
858 DEFINE_EVENT(sta_event
, drv_sta_statistics
,
859 TP_PROTO(struct ieee80211_local
*local
,
860 struct ieee80211_sub_if_data
*sdata
,
861 struct ieee80211_sta
*sta
),
862 TP_ARGS(local
, sdata
, sta
)
865 DEFINE_EVENT(sta_event
, drv_sta_add
,
866 TP_PROTO(struct ieee80211_local
*local
,
867 struct ieee80211_sub_if_data
*sdata
,
868 struct ieee80211_sta
*sta
),
869 TP_ARGS(local
, sdata
, sta
)
872 DEFINE_EVENT(sta_event
, drv_sta_remove
,
873 TP_PROTO(struct ieee80211_local
*local
,
874 struct ieee80211_sub_if_data
*sdata
,
875 struct ieee80211_sta
*sta
),
876 TP_ARGS(local
, sdata
, sta
)
879 DEFINE_EVENT(sta_event
, drv_sta_pre_rcu_remove
,
880 TP_PROTO(struct ieee80211_local
*local
,
881 struct ieee80211_sub_if_data
*sdata
,
882 struct ieee80211_sta
*sta
),
883 TP_ARGS(local
, sdata
, sta
)
886 DEFINE_EVENT(sta_event
, drv_sta_rate_tbl_update
,
887 TP_PROTO(struct ieee80211_local
*local
,
888 struct ieee80211_sub_if_data
*sdata
,
889 struct ieee80211_sta
*sta
),
890 TP_ARGS(local
, sdata
, sta
)
893 TRACE_EVENT(drv_conf_tx
,
894 TP_PROTO(struct ieee80211_local
*local
,
895 struct ieee80211_sub_if_data
*sdata
,
896 u16 ac
, const struct ieee80211_tx_queue_params
*params
),
898 TP_ARGS(local
, sdata
, ac
, params
),
915 __entry
->txop
= params
->txop
;
916 __entry
->cw_max
= params
->cw_max
;
917 __entry
->cw_min
= params
->cw_min
;
918 __entry
->aifs
= params
->aifs
;
919 __entry
->uapsd
= params
->uapsd
;
923 LOCAL_PR_FMT VIF_PR_FMT
" AC:%d",
924 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->ac
928 DEFINE_EVENT(local_sdata_evt
, drv_get_tsf
,
929 TP_PROTO(struct ieee80211_local
*local
,
930 struct ieee80211_sub_if_data
*sdata
),
931 TP_ARGS(local
, sdata
)
934 TRACE_EVENT(drv_set_tsf
,
935 TP_PROTO(struct ieee80211_local
*local
,
936 struct ieee80211_sub_if_data
*sdata
,
939 TP_ARGS(local
, sdata
, tsf
),
954 LOCAL_PR_FMT VIF_PR_FMT
" tsf:%llu",
955 LOCAL_PR_ARG
, VIF_PR_ARG
, (unsigned long long)__entry
->tsf
959 DEFINE_EVENT(local_sdata_evt
, drv_reset_tsf
,
960 TP_PROTO(struct ieee80211_local
*local
,
961 struct ieee80211_sub_if_data
*sdata
),
962 TP_ARGS(local
, sdata
)
965 DEFINE_EVENT(local_only_evt
, drv_tx_last_beacon
,
966 TP_PROTO(struct ieee80211_local
*local
),
970 TRACE_EVENT(drv_ampdu_action
,
971 TP_PROTO(struct ieee80211_local
*local
,
972 struct ieee80211_sub_if_data
*sdata
,
973 enum ieee80211_ampdu_mlme_action action
,
974 struct ieee80211_sta
*sta
, u16 tid
,
975 u16
*ssn
, u8 buf_size
, bool amsdu
),
977 TP_ARGS(local
, sdata
, action
, sta
, tid
, ssn
, buf_size
, amsdu
),
985 __field(u8
, buf_size
)
994 __entry
->action
= action
;
996 __entry
->ssn
= ssn
? *ssn
: 0;
997 __entry
->buf_size
= buf_size
;
998 __entry
->amsdu
= amsdu
;
1002 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" action:%d tid:%d buf:%d amsdu:%d",
1003 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->action
,
1004 __entry
->tid
, __entry
->buf_size
, __entry
->amsdu
1008 TRACE_EVENT(drv_get_survey
,
1009 TP_PROTO(struct ieee80211_local
*local
, int idx
,
1010 struct survey_info
*survey
),
1012 TP_ARGS(local
, idx
, survey
),
1025 LOCAL_PR_FMT
" idx:%d",
1026 LOCAL_PR_ARG
, __entry
->idx
1030 TRACE_EVENT(drv_flush
,
1031 TP_PROTO(struct ieee80211_local
*local
,
1032 u32 queues
, bool drop
),
1034 TP_ARGS(local
, queues
, drop
),
1039 __field(u32
, queues
)
1044 __entry
->drop
= drop
;
1045 __entry
->queues
= queues
;
1049 LOCAL_PR_FMT
" queues:0x%x drop:%d",
1050 LOCAL_PR_ARG
, __entry
->queues
, __entry
->drop
1054 TRACE_EVENT(drv_channel_switch
,
1055 TP_PROTO(struct ieee80211_local
*local
,
1056 struct ieee80211_sub_if_data
*sdata
,
1057 struct ieee80211_channel_switch
*ch_switch
),
1059 TP_ARGS(local
, sdata
, ch_switch
),
1065 __field(u64
, timestamp
)
1066 __field(u32
, device_timestamp
)
1067 __field(bool, block_tx
)
1074 CHANDEF_ASSIGN(&ch_switch
->chandef
)
1075 __entry
->timestamp
= ch_switch
->timestamp
;
1076 __entry
->device_timestamp
= ch_switch
->device_timestamp
;
1077 __entry
->block_tx
= ch_switch
->block_tx
;
1078 __entry
->count
= ch_switch
->count
;
1082 LOCAL_PR_FMT VIF_PR_FMT
" new " CHANDEF_PR_FMT
" count:%d",
1083 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANDEF_PR_ARG
, __entry
->count
1087 TRACE_EVENT(drv_set_antenna
,
1088 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
1090 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
1094 __field(u32
, tx_ant
)
1095 __field(u32
, rx_ant
)
1101 __entry
->tx_ant
= tx_ant
;
1102 __entry
->rx_ant
= rx_ant
;
1107 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
1108 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
1112 TRACE_EVENT(drv_get_antenna
,
1113 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
1115 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
1119 __field(u32
, tx_ant
)
1120 __field(u32
, rx_ant
)
1126 __entry
->tx_ant
= tx_ant
;
1127 __entry
->rx_ant
= rx_ant
;
1132 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
1133 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
1137 TRACE_EVENT(drv_remain_on_channel
,
1138 TP_PROTO(struct ieee80211_local
*local
,
1139 struct ieee80211_sub_if_data
*sdata
,
1140 struct ieee80211_channel
*chan
,
1141 unsigned int duration
,
1142 enum ieee80211_roc_type type
),
1144 TP_ARGS(local
, sdata
, chan
, duration
, type
),
1149 __field(int, center_freq
)
1150 __field(unsigned int, duration
)
1157 __entry
->center_freq
= chan
->center_freq
;
1158 __entry
->duration
= duration
;
1159 __entry
->type
= type
;
1163 LOCAL_PR_FMT VIF_PR_FMT
" freq:%dMHz duration:%dms type=%d",
1164 LOCAL_PR_ARG
, VIF_PR_ARG
,
1165 __entry
->center_freq
, __entry
->duration
, __entry
->type
1169 DEFINE_EVENT(local_only_evt
, drv_cancel_remain_on_channel
,
1170 TP_PROTO(struct ieee80211_local
*local
),
1174 TRACE_EVENT(drv_set_ringparam
,
1175 TP_PROTO(struct ieee80211_local
*local
, u32 tx
, u32 rx
),
1177 TP_ARGS(local
, tx
, rx
),
1192 LOCAL_PR_FMT
" tx:%d rx %d",
1193 LOCAL_PR_ARG
, __entry
->tx
, __entry
->rx
1197 TRACE_EVENT(drv_get_ringparam
,
1198 TP_PROTO(struct ieee80211_local
*local
, u32
*tx
, u32
*tx_max
,
1199 u32
*rx
, u32
*rx_max
),
1201 TP_ARGS(local
, tx
, tx_max
, rx
, rx_max
),
1206 __field(u32
, tx_max
)
1208 __field(u32
, rx_max
)
1214 __entry
->tx_max
= *tx_max
;
1216 __entry
->rx_max
= *rx_max
;
1220 LOCAL_PR_FMT
" tx:%d tx_max %d rx %d rx_max %d",
1222 __entry
->tx
, __entry
->tx_max
, __entry
->rx
, __entry
->rx_max
1226 DEFINE_EVENT(local_only_evt
, drv_tx_frames_pending
,
1227 TP_PROTO(struct ieee80211_local
*local
),
1231 DEFINE_EVENT(local_only_evt
, drv_offchannel_tx_cancel_wait
,
1232 TP_PROTO(struct ieee80211_local
*local
),
1236 TRACE_EVENT(drv_set_bitrate_mask
,
1237 TP_PROTO(struct ieee80211_local
*local
,
1238 struct ieee80211_sub_if_data
*sdata
,
1239 const struct cfg80211_bitrate_mask
*mask
),
1241 TP_ARGS(local
, sdata
, mask
),
1246 __field(u32
, legacy_2g
)
1247 __field(u32
, legacy_5g
)
1253 __entry
->legacy_2g
= mask
->control
[IEEE80211_BAND_2GHZ
].legacy
;
1254 __entry
->legacy_5g
= mask
->control
[IEEE80211_BAND_5GHZ
].legacy
;
1258 LOCAL_PR_FMT VIF_PR_FMT
" 2G Mask:0x%x 5G Mask:0x%x",
1259 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->legacy_2g
, __entry
->legacy_5g
1263 TRACE_EVENT(drv_set_rekey_data
,
1264 TP_PROTO(struct ieee80211_local
*local
,
1265 struct ieee80211_sub_if_data
*sdata
,
1266 struct cfg80211_gtk_rekey_data
*data
),
1268 TP_ARGS(local
, sdata
, data
),
1273 __array(u8
, kek
, NL80211_KEK_LEN
)
1274 __array(u8
, kck
, NL80211_KCK_LEN
)
1275 __array(u8
, replay_ctr
, NL80211_REPLAY_CTR_LEN
)
1281 memcpy(__entry
->kek
, data
->kek
, NL80211_KEK_LEN
);
1282 memcpy(__entry
->kck
, data
->kck
, NL80211_KCK_LEN
);
1283 memcpy(__entry
->replay_ctr
, data
->replay_ctr
,
1284 NL80211_REPLAY_CTR_LEN
);
1287 TP_printk(LOCAL_PR_FMT VIF_PR_FMT
,
1288 LOCAL_PR_ARG
, VIF_PR_ARG
)
1291 TRACE_EVENT(drv_event_callback
,
1292 TP_PROTO(struct ieee80211_local
*local
,
1293 struct ieee80211_sub_if_data
*sdata
,
1294 const struct ieee80211_event
*_event
),
1296 TP_ARGS(local
, sdata
, _event
),
1307 __entry
->type
= _event
->type
;
1311 LOCAL_PR_FMT VIF_PR_FMT
" event:%d",
1312 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->type
1316 DECLARE_EVENT_CLASS(release_evt
,
1317 TP_PROTO(struct ieee80211_local
*local
,
1318 struct ieee80211_sta
*sta
,
1319 u16 tids
, int num_frames
,
1320 enum ieee80211_frame_release_type reason
,
1323 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
),
1329 __field(int, num_frames
)
1330 __field(int, reason
)
1331 __field(bool, more_data
)
1337 __entry
->tids
= tids
;
1338 __entry
->num_frames
= num_frames
;
1339 __entry
->reason
= reason
;
1340 __entry
->more_data
= more_data
;
1344 LOCAL_PR_FMT STA_PR_FMT
1345 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1346 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->tids
, __entry
->num_frames
,
1347 __entry
->reason
, __entry
->more_data
1351 DEFINE_EVENT(release_evt
, drv_release_buffered_frames
,
1352 TP_PROTO(struct ieee80211_local
*local
,
1353 struct ieee80211_sta
*sta
,
1354 u16 tids
, int num_frames
,
1355 enum ieee80211_frame_release_type reason
,
1358 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
)
1361 DEFINE_EVENT(release_evt
, drv_allow_buffered_frames
,
1362 TP_PROTO(struct ieee80211_local
*local
,
1363 struct ieee80211_sta
*sta
,
1364 u16 tids
, int num_frames
,
1365 enum ieee80211_frame_release_type reason
,
1368 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
)
1371 DEFINE_EVENT(local_sdata_evt
, drv_mgd_prepare_tx
,
1372 TP_PROTO(struct ieee80211_local
*local
,
1373 struct ieee80211_sub_if_data
*sdata
),
1375 TP_ARGS(local
, sdata
)
1378 DEFINE_EVENT(local_sdata_evt
, drv_mgd_protect_tdls_discover
,
1379 TP_PROTO(struct ieee80211_local
*local
,
1380 struct ieee80211_sub_if_data
*sdata
),
1382 TP_ARGS(local
, sdata
)
1385 DECLARE_EVENT_CLASS(local_chanctx
,
1386 TP_PROTO(struct ieee80211_local
*local
,
1387 struct ieee80211_chanctx
*ctx
),
1389 TP_ARGS(local
, ctx
),
1402 LOCAL_PR_FMT CHANCTX_PR_FMT
,
1403 LOCAL_PR_ARG
, CHANCTX_PR_ARG
1407 DEFINE_EVENT(local_chanctx
, drv_add_chanctx
,
1408 TP_PROTO(struct ieee80211_local
*local
,
1409 struct ieee80211_chanctx
*ctx
),
1413 DEFINE_EVENT(local_chanctx
, drv_remove_chanctx
,
1414 TP_PROTO(struct ieee80211_local
*local
,
1415 struct ieee80211_chanctx
*ctx
),
1419 TRACE_EVENT(drv_change_chanctx
,
1420 TP_PROTO(struct ieee80211_local
*local
,
1421 struct ieee80211_chanctx
*ctx
,
1424 TP_ARGS(local
, ctx
, changed
),
1429 __field(u32
, changed
)
1435 __entry
->changed
= changed
;
1439 LOCAL_PR_FMT CHANCTX_PR_FMT
" changed:%#x",
1440 LOCAL_PR_ARG
, CHANCTX_PR_ARG
, __entry
->changed
1444 #if !defined(__TRACE_VIF_ENTRY)
1445 #define __TRACE_VIF_ENTRY
1446 struct trace_vif_entry
{
1447 enum nl80211_iftype vif_type
;
1449 char vif_name
[IFNAMSIZ
];
1452 struct trace_chandef_entry
{
1459 struct trace_switch_entry
{
1460 struct trace_vif_entry vif
;
1461 struct trace_chandef_entry old_chandef
;
1462 struct trace_chandef_entry new_chandef
;
1465 #define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
1468 TRACE_EVENT(drv_switch_vif_chanctx
,
1469 TP_PROTO(struct ieee80211_local
*local
,
1470 struct ieee80211_vif_chanctx_switch
*vifs
,
1471 int n_vifs
, enum ieee80211_chanctx_switch_mode mode
),
1472 TP_ARGS(local
, vifs
, n_vifs
, mode
),
1476 __field(int, n_vifs
)
1478 __dynamic_array(u8
, vifs
,
1479 sizeof(struct trace_switch_entry
) * n_vifs
)
1484 __entry
->n_vifs
= n_vifs
;
1485 __entry
->mode
= mode
;
1487 struct trace_switch_entry
*local_vifs
=
1488 __get_dynamic_array(vifs
);
1491 for (i
= 0; i
< n_vifs
; i
++) {
1492 struct ieee80211_sub_if_data
*sdata
;
1494 sdata
= container_of(vifs
[i
].vif
,
1495 struct ieee80211_sub_if_data
,
1498 SWITCH_ENTRY_ASSIGN(vif
.vif_type
, vif
->type
);
1499 SWITCH_ENTRY_ASSIGN(vif
.p2p
, vif
->p2p
);
1500 strncpy(local_vifs
[i
].vif
.vif_name
,
1502 sizeof(local_vifs
[i
].vif
.vif_name
));
1503 SWITCH_ENTRY_ASSIGN(old_chandef
.control_freq
,
1504 old_ctx
->def
.chan
->center_freq
);
1505 SWITCH_ENTRY_ASSIGN(old_chandef
.chan_width
,
1506 old_ctx
->def
.width
);
1507 SWITCH_ENTRY_ASSIGN(old_chandef
.center_freq1
,
1508 old_ctx
->def
.center_freq1
);
1509 SWITCH_ENTRY_ASSIGN(old_chandef
.center_freq2
,
1510 old_ctx
->def
.center_freq2
);
1511 SWITCH_ENTRY_ASSIGN(new_chandef
.control_freq
,
1512 new_ctx
->def
.chan
->center_freq
);
1513 SWITCH_ENTRY_ASSIGN(new_chandef
.chan_width
,
1514 new_ctx
->def
.width
);
1515 SWITCH_ENTRY_ASSIGN(new_chandef
.center_freq1
,
1516 new_ctx
->def
.center_freq1
);
1517 SWITCH_ENTRY_ASSIGN(new_chandef
.center_freq2
,
1518 new_ctx
->def
.center_freq2
);
1524 LOCAL_PR_FMT
" n_vifs:%d mode:%d",
1525 LOCAL_PR_ARG
, __entry
->n_vifs
, __entry
->mode
1529 DECLARE_EVENT_CLASS(local_sdata_chanctx
,
1530 TP_PROTO(struct ieee80211_local
*local
,
1531 struct ieee80211_sub_if_data
*sdata
,
1532 struct ieee80211_chanctx
*ctx
),
1534 TP_ARGS(local
, sdata
, ctx
),
1549 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT
,
1550 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANCTX_PR_ARG
1554 DEFINE_EVENT(local_sdata_chanctx
, drv_assign_vif_chanctx
,
1555 TP_PROTO(struct ieee80211_local
*local
,
1556 struct ieee80211_sub_if_data
*sdata
,
1557 struct ieee80211_chanctx
*ctx
),
1558 TP_ARGS(local
, sdata
, ctx
)
1561 DEFINE_EVENT(local_sdata_chanctx
, drv_unassign_vif_chanctx
,
1562 TP_PROTO(struct ieee80211_local
*local
,
1563 struct ieee80211_sub_if_data
*sdata
,
1564 struct ieee80211_chanctx
*ctx
),
1565 TP_ARGS(local
, sdata
, ctx
)
1568 TRACE_EVENT(drv_start_ap
,
1569 TP_PROTO(struct ieee80211_local
*local
,
1570 struct ieee80211_sub_if_data
*sdata
,
1571 struct ieee80211_bss_conf
*info
),
1573 TP_ARGS(local
, sdata
, info
),
1578 __field(u8
, dtimper
)
1579 __field(u16
, bcnint
)
1580 __dynamic_array(u8
, ssid
, info
->ssid_len
);
1581 __field(bool, hidden_ssid
);
1587 __entry
->dtimper
= info
->dtim_period
;
1588 __entry
->bcnint
= info
->beacon_int
;
1589 memcpy(__get_dynamic_array(ssid
), info
->ssid
, info
->ssid_len
);
1590 __entry
->hidden_ssid
= info
->hidden_ssid
;
1594 LOCAL_PR_FMT VIF_PR_FMT
,
1595 LOCAL_PR_ARG
, VIF_PR_ARG
1599 DEFINE_EVENT(local_sdata_evt
, drv_stop_ap
,
1600 TP_PROTO(struct ieee80211_local
*local
,
1601 struct ieee80211_sub_if_data
*sdata
),
1602 TP_ARGS(local
, sdata
)
1605 TRACE_EVENT(drv_reconfig_complete
,
1606 TP_PROTO(struct ieee80211_local
*local
,
1607 enum ieee80211_reconfig_type reconfig_type
),
1608 TP_ARGS(local
, reconfig_type
),
1612 __field(u8
, reconfig_type
)
1617 __entry
->reconfig_type
= reconfig_type
;
1621 LOCAL_PR_FMT
" reconfig_type:%d",
1622 LOCAL_PR_ARG
, __entry
->reconfig_type
1627 #if IS_ENABLED(CONFIG_IPV6)
1628 DEFINE_EVENT(local_sdata_evt
, drv_ipv6_addr_change
,
1629 TP_PROTO(struct ieee80211_local
*local
,
1630 struct ieee80211_sub_if_data
*sdata
),
1631 TP_ARGS(local
, sdata
)
1635 TRACE_EVENT(drv_join_ibss
,
1636 TP_PROTO(struct ieee80211_local
*local
,
1637 struct ieee80211_sub_if_data
*sdata
,
1638 struct ieee80211_bss_conf
*info
),
1640 TP_ARGS(local
, sdata
, info
),
1645 __field(u8
, dtimper
)
1646 __field(u16
, bcnint
)
1647 __dynamic_array(u8
, ssid
, info
->ssid_len
);
1653 __entry
->dtimper
= info
->dtim_period
;
1654 __entry
->bcnint
= info
->beacon_int
;
1655 memcpy(__get_dynamic_array(ssid
), info
->ssid
, info
->ssid_len
);
1659 LOCAL_PR_FMT VIF_PR_FMT
,
1660 LOCAL_PR_ARG
, VIF_PR_ARG
1664 DEFINE_EVENT(local_sdata_evt
, drv_leave_ibss
,
1665 TP_PROTO(struct ieee80211_local
*local
,
1666 struct ieee80211_sub_if_data
*sdata
),
1667 TP_ARGS(local
, sdata
)
1670 TRACE_EVENT(drv_get_expected_throughput
,
1671 TP_PROTO(struct ieee80211_sta
*sta
),
1684 STA_PR_FMT
, STA_PR_ARG
1689 * Tracing for API calls that drivers call.
1692 TRACE_EVENT(api_start_tx_ba_session
,
1693 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
1708 STA_PR_FMT
" tid:%d",
1709 STA_PR_ARG
, __entry
->tid
1713 TRACE_EVENT(api_start_tx_ba_cb
,
1714 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
1716 TP_ARGS(sdata
, ra
, tid
),
1720 __array(u8
, ra
, ETH_ALEN
)
1726 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
1731 VIF_PR_FMT
" ra:%pM tid:%d",
1732 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
1736 TRACE_EVENT(api_stop_tx_ba_session
,
1737 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
1752 STA_PR_FMT
" tid:%d",
1753 STA_PR_ARG
, __entry
->tid
1757 TRACE_EVENT(api_stop_tx_ba_cb
,
1758 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
1760 TP_ARGS(sdata
, ra
, tid
),
1764 __array(u8
, ra
, ETH_ALEN
)
1770 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
1775 VIF_PR_FMT
" ra:%pM tid:%d",
1776 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
1780 DEFINE_EVENT(local_only_evt
, api_restart_hw
,
1781 TP_PROTO(struct ieee80211_local
*local
),
1785 TRACE_EVENT(api_beacon_loss
,
1786 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
1804 TRACE_EVENT(api_connection_loss
,
1805 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
1823 TRACE_EVENT(api_cqm_rssi_notify
,
1824 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
1825 enum nl80211_cqm_rssi_threshold_event rssi_event
),
1827 TP_ARGS(sdata
, rssi_event
),
1831 __field(u32
, rssi_event
)
1836 __entry
->rssi_event
= rssi_event
;
1840 VIF_PR_FMT
" event:%d",
1841 VIF_PR_ARG
, __entry
->rssi_event
1845 DEFINE_EVENT(local_sdata_evt
, api_cqm_beacon_loss_notify
,
1846 TP_PROTO(struct ieee80211_local
*local
,
1847 struct ieee80211_sub_if_data
*sdata
),
1848 TP_ARGS(local
, sdata
)
1851 TRACE_EVENT(api_scan_completed
,
1852 TP_PROTO(struct ieee80211_local
*local
, bool aborted
),
1854 TP_ARGS(local
, aborted
),
1858 __field(bool, aborted
)
1863 __entry
->aborted
= aborted
;
1867 LOCAL_PR_FMT
" aborted:%d",
1868 LOCAL_PR_ARG
, __entry
->aborted
1872 TRACE_EVENT(api_sched_scan_results
,
1873 TP_PROTO(struct ieee80211_local
*local
),
1886 LOCAL_PR_FMT
, LOCAL_PR_ARG
1890 TRACE_EVENT(api_sched_scan_stopped
,
1891 TP_PROTO(struct ieee80211_local
*local
),
1904 LOCAL_PR_FMT
, LOCAL_PR_ARG
1908 TRACE_EVENT(api_sta_block_awake
,
1909 TP_PROTO(struct ieee80211_local
*local
,
1910 struct ieee80211_sta
*sta
, bool block
),
1912 TP_ARGS(local
, sta
, block
),
1917 __field(bool, block
)
1923 __entry
->block
= block
;
1927 LOCAL_PR_FMT STA_PR_FMT
" block:%d",
1928 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->block
1932 TRACE_EVENT(api_chswitch_done
,
1933 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, bool success
),
1935 TP_ARGS(sdata
, success
),
1939 __field(bool, success
)
1944 __entry
->success
= success
;
1948 VIF_PR_FMT
" success=%d",
1949 VIF_PR_ARG
, __entry
->success
1953 DEFINE_EVENT(local_only_evt
, api_ready_on_channel
,
1954 TP_PROTO(struct ieee80211_local
*local
),
1958 DEFINE_EVENT(local_only_evt
, api_remain_on_channel_expired
,
1959 TP_PROTO(struct ieee80211_local
*local
),
1963 TRACE_EVENT(api_gtk_rekey_notify
,
1964 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
1965 const u8
*bssid
, const u8
*replay_ctr
),
1967 TP_ARGS(sdata
, bssid
, replay_ctr
),
1971 __array(u8
, bssid
, ETH_ALEN
)
1972 __array(u8
, replay_ctr
, NL80211_REPLAY_CTR_LEN
)
1977 memcpy(__entry
->bssid
, bssid
, ETH_ALEN
);
1978 memcpy(__entry
->replay_ctr
, replay_ctr
, NL80211_REPLAY_CTR_LEN
);
1981 TP_printk(VIF_PR_FMT
, VIF_PR_ARG
)
1984 TRACE_EVENT(api_enable_rssi_reports
,
1985 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
1986 int rssi_min_thold
, int rssi_max_thold
),
1988 TP_ARGS(sdata
, rssi_min_thold
, rssi_max_thold
),
1992 __field(int, rssi_min_thold
)
1993 __field(int, rssi_max_thold
)
1998 __entry
->rssi_min_thold
= rssi_min_thold
;
1999 __entry
->rssi_max_thold
= rssi_max_thold
;
2003 VIF_PR_FMT
" rssi_min_thold =%d, rssi_max_thold = %d",
2004 VIF_PR_ARG
, __entry
->rssi_min_thold
, __entry
->rssi_max_thold
2008 TRACE_EVENT(api_eosp
,
2009 TP_PROTO(struct ieee80211_local
*local
,
2010 struct ieee80211_sta
*sta
),
2012 TP_ARGS(local
, sta
),
2025 LOCAL_PR_FMT STA_PR_FMT
,
2026 LOCAL_PR_ARG
, STA_PR_ARG
2030 TRACE_EVENT(api_sta_set_buffered
,
2031 TP_PROTO(struct ieee80211_local
*local
,
2032 struct ieee80211_sta
*sta
,
2033 u8 tid
, bool buffered
),
2035 TP_ARGS(local
, sta
, tid
, buffered
),
2041 __field(bool, buffered
)
2048 __entry
->buffered
= buffered
;
2052 LOCAL_PR_FMT STA_PR_FMT
" tid:%d buffered:%d",
2053 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->tid
, __entry
->buffered
2058 * Tracing for internal functions
2059 * (which may also be called in response to driver calls)
2062 TRACE_EVENT(wake_queue
,
2063 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
2064 enum queue_stop_reason reason
),
2066 TP_ARGS(local
, queue
, reason
),
2071 __field(u32
, reason
)
2076 __entry
->queue
= queue
;
2077 __entry
->reason
= reason
;
2081 LOCAL_PR_FMT
" queue:%d, reason:%d",
2082 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
2086 TRACE_EVENT(stop_queue
,
2087 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
2088 enum queue_stop_reason reason
),
2090 TP_ARGS(local
, queue
, reason
),
2095 __field(u32
, reason
)
2100 __entry
->queue
= queue
;
2101 __entry
->reason
= reason
;
2105 LOCAL_PR_FMT
" queue:%d, reason:%d",
2106 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
2110 TRACE_EVENT(drv_set_default_unicast_key
,
2111 TP_PROTO(struct ieee80211_local
*local
,
2112 struct ieee80211_sub_if_data
*sdata
,
2115 TP_ARGS(local
, sdata
, key_idx
),
2120 __field(int, key_idx
)
2126 __entry
->key_idx
= key_idx
;
2129 TP_printk(LOCAL_PR_FMT VIF_PR_FMT
" key_idx:%d",
2130 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->key_idx
)
2133 TRACE_EVENT(api_radar_detected
,
2134 TP_PROTO(struct ieee80211_local
*local
),
2147 LOCAL_PR_FMT
" radar detected",
2152 TRACE_EVENT(drv_channel_switch_beacon
,
2153 TP_PROTO(struct ieee80211_local
*local
,
2154 struct ieee80211_sub_if_data
*sdata
,
2155 struct cfg80211_chan_def
*chandef
),
2157 TP_ARGS(local
, sdata
, chandef
),
2168 CHANDEF_ASSIGN(chandef
);
2172 LOCAL_PR_FMT VIF_PR_FMT
" channel switch to " CHANDEF_PR_FMT
,
2173 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANDEF_PR_ARG
2177 TRACE_EVENT(drv_pre_channel_switch
,
2178 TP_PROTO(struct ieee80211_local
*local
,
2179 struct ieee80211_sub_if_data
*sdata
,
2180 struct ieee80211_channel_switch
*ch_switch
),
2182 TP_ARGS(local
, sdata
, ch_switch
),
2188 __field(u64
, timestamp
)
2189 __field(u32
, device_timestamp
)
2190 __field(bool, block_tx
)
2197 CHANDEF_ASSIGN(&ch_switch
->chandef
)
2198 __entry
->timestamp
= ch_switch
->timestamp
;
2199 __entry
->device_timestamp
= ch_switch
->device_timestamp
;
2200 __entry
->block_tx
= ch_switch
->block_tx
;
2201 __entry
->count
= ch_switch
->count
;
2205 LOCAL_PR_FMT VIF_PR_FMT
" prepare channel switch to "
2206 CHANDEF_PR_FMT
" count:%d block_tx:%d timestamp:%llu",
2207 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANDEF_PR_ARG
, __entry
->count
,
2208 __entry
->block_tx
, __entry
->timestamp
2212 DEFINE_EVENT(local_sdata_evt
, drv_post_channel_switch
,
2213 TP_PROTO(struct ieee80211_local
*local
,
2214 struct ieee80211_sub_if_data
*sdata
),
2215 TP_ARGS(local
, sdata
)
2218 TRACE_EVENT(drv_get_txpower
,
2219 TP_PROTO(struct ieee80211_local
*local
,
2220 struct ieee80211_sub_if_data
*sdata
,
2223 TP_ARGS(local
, sdata
, dbm
, ret
),
2240 LOCAL_PR_FMT VIF_PR_FMT
" dbm:%d ret:%d",
2241 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->dbm
, __entry
->ret
2245 TRACE_EVENT(drv_tdls_channel_switch
,
2246 TP_PROTO(struct ieee80211_local
*local
,
2247 struct ieee80211_sub_if_data
*sdata
,
2248 struct ieee80211_sta
*sta
, u8 oper_class
,
2249 struct cfg80211_chan_def
*chandef
),
2251 TP_ARGS(local
, sdata
, sta
, oper_class
, chandef
),
2257 __field(u8
, oper_class
)
2265 __entry
->oper_class
= oper_class
;
2266 CHANDEF_ASSIGN(chandef
)
2270 LOCAL_PR_FMT VIF_PR_FMT
" tdls channel switch to"
2271 CHANDEF_PR_FMT
" oper_class:%d " STA_PR_FMT
,
2272 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANDEF_PR_ARG
, __entry
->oper_class
,
2277 TRACE_EVENT(drv_tdls_cancel_channel_switch
,
2278 TP_PROTO(struct ieee80211_local
*local
,
2279 struct ieee80211_sub_if_data
*sdata
,
2280 struct ieee80211_sta
*sta
),
2282 TP_ARGS(local
, sdata
, sta
),
2297 LOCAL_PR_FMT VIF_PR_FMT
2298 " tdls cancel channel switch with " STA_PR_FMT
,
2299 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
2303 TRACE_EVENT(drv_tdls_recv_channel_switch
,
2304 TP_PROTO(struct ieee80211_local
*local
,
2305 struct ieee80211_sub_if_data
*sdata
,
2306 struct ieee80211_tdls_ch_sw_params
*params
),
2308 TP_ARGS(local
, sdata
, params
),
2313 __field(u8
, action_code
)
2316 __field(u32
, status
)
2317 __field(bool, peer_initiator
)
2318 __field(u32
, timestamp
)
2319 __field(u16
, switch_time
)
2320 __field(u16
, switch_timeout
)
2326 STA_NAMED_ASSIGN(params
->sta
);
2327 CHANDEF_ASSIGN(params
->chandef
)
2328 __entry
->peer_initiator
= params
->sta
->tdls_initiator
;
2329 __entry
->action_code
= params
->action_code
;
2330 __entry
->status
= params
->status
;
2331 __entry
->timestamp
= params
->timestamp
;
2332 __entry
->switch_time
= params
->switch_time
;
2333 __entry
->switch_timeout
= params
->switch_timeout
;
2337 LOCAL_PR_FMT VIF_PR_FMT
" received tdls channel switch packet"
2338 " action:%d status:%d time:%d switch time:%d switch"
2339 " timeout:%d initiator: %d chan:" CHANDEF_PR_FMT STA_PR_FMT
,
2340 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->action_code
, __entry
->status
,
2341 __entry
->timestamp
, __entry
->switch_time
,
2342 __entry
->switch_timeout
, __entry
->peer_initiator
,
2343 CHANDEF_PR_ARG
, STA_PR_ARG
2347 TRACE_EVENT(drv_wake_tx_queue
,
2348 TP_PROTO(struct ieee80211_local
*local
,
2349 struct ieee80211_sub_if_data
*sdata
,
2350 struct txq_info
*txq
),
2352 TP_ARGS(local
, sdata
, txq
),
2363 struct ieee80211_sta
*sta
= txq
->txq
.sta
;
2368 __entry
->ac
= txq
->txq
.ac
;
2369 __entry
->tid
= txq
->txq
.tid
;
2373 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" ac:%d tid:%d",
2374 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->ac
, __entry
->tid
2378 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
2380 #undef TRACE_INCLUDE_PATH
2381 #define TRACE_INCLUDE_PATH .
2382 #undef TRACE_INCLUDE_FILE
2383 #define TRACE_INCLUDE_FILE trace
2384 #include <trace/define_trace.h>