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_PR_FMT " sta:%pM"
20 #define STA_PR_ARG __entry->sta_addr
22 #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
24 __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
25 #define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
26 __entry->p2p = sdata->vif.p2p; \
27 __assign_str(vif_name, sdata->dev ? sdata->dev->name : sdata->name)
28 #define VIF_PR_FMT " vif:%s(%d%s)"
29 #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
31 #define CHANDEF_ENTRY __field(u32, control_freq) \
32 __field(u32, chan_width) \
33 __field(u32, center_freq1) \
34 __field(u32, center_freq2)
35 #define CHANDEF_ASSIGN(c) \
36 __entry->control_freq = (c)->chan ? (c)->chan->center_freq : 0; \
37 __entry->chan_width = (c)->width; \
38 __entry->center_freq1 = (c)->center_freq1; \
39 __entry->center_freq2 = (c)->center_freq2;
40 #define CHANDEF_PR_FMT " control:%d MHz width:%d center: %d/%d MHz"
41 #define CHANDEF_PR_ARG __entry->control_freq, __entry->chan_width, \
42 __entry->center_freq1, __entry->center_freq2
44 #define MIN_CHANDEF_ENTRY \
45 __field(u32, min_control_freq) \
46 __field(u32, min_chan_width) \
47 __field(u32, min_center_freq1) \
48 __field(u32, min_center_freq2)
50 #define MIN_CHANDEF_ASSIGN(c) \
51 __entry->min_control_freq = (c)->chan ? (c)->chan->center_freq : 0; \
52 __entry->min_chan_width = (c)->width; \
53 __entry->min_center_freq1 = (c)->center_freq1; \
54 __entry->min_center_freq2 = (c)->center_freq2;
55 #define MIN_CHANDEF_PR_FMT " min_control:%d MHz min_width:%d min_center: %d/%d MHz"
56 #define MIN_CHANDEF_PR_ARG __entry->min_control_freq, __entry->min_chan_width, \
57 __entry->min_center_freq1, __entry->min_center_freq2
59 #define CHANCTX_ENTRY CHANDEF_ENTRY \
61 __field(u8, rx_chains_static) \
62 __field(u8, rx_chains_dynamic)
63 #define CHANCTX_ASSIGN CHANDEF_ASSIGN(&ctx->conf.def) \
64 MIN_CHANDEF_ASSIGN(&ctx->conf.min_def) \
65 __entry->rx_chains_static = ctx->conf.rx_chains_static; \
66 __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic
67 #define CHANCTX_PR_FMT CHANDEF_PR_FMT MIN_CHANDEF_PR_FMT " chains:%d/%d"
68 #define CHANCTX_PR_ARG CHANDEF_PR_ARG, MIN_CHANDEF_PR_ARG, \
69 __entry->rx_chains_static, __entry->rx_chains_dynamic
74 * Tracing for driver callbacks.
77 DECLARE_EVENT_CLASS(local_only_evt
,
78 TP_PROTO(struct ieee80211_local
*local
),
86 TP_printk(LOCAL_PR_FMT
, LOCAL_PR_ARG
)
89 DECLARE_EVENT_CLASS(local_sdata_addr_evt
,
90 TP_PROTO(struct ieee80211_local
*local
,
91 struct ieee80211_sub_if_data
*sdata
),
92 TP_ARGS(local
, sdata
),
97 __array(char, addr
, ETH_ALEN
)
103 memcpy(__entry
->addr
, sdata
->vif
.addr
, ETH_ALEN
);
107 LOCAL_PR_FMT VIF_PR_FMT
" addr:%pM",
108 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->addr
112 DECLARE_EVENT_CLASS(local_u32_evt
,
113 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
114 TP_ARGS(local
, value
),
123 __entry
->value
= value
;
127 LOCAL_PR_FMT
" value:%d",
128 LOCAL_PR_ARG
, __entry
->value
132 DECLARE_EVENT_CLASS(local_sdata_evt
,
133 TP_PROTO(struct ieee80211_local
*local
,
134 struct ieee80211_sub_if_data
*sdata
),
135 TP_ARGS(local
, sdata
),
148 LOCAL_PR_FMT VIF_PR_FMT
,
149 LOCAL_PR_ARG
, VIF_PR_ARG
153 DEFINE_EVENT(local_only_evt
, drv_return_void
,
154 TP_PROTO(struct ieee80211_local
*local
),
158 TRACE_EVENT(drv_return_int
,
159 TP_PROTO(struct ieee80211_local
*local
, int ret
),
169 TP_printk(LOCAL_PR_FMT
" - %d", LOCAL_PR_ARG
, __entry
->ret
)
172 TRACE_EVENT(drv_return_bool
,
173 TP_PROTO(struct ieee80211_local
*local
, bool ret
),
183 TP_printk(LOCAL_PR_FMT
" - %s", LOCAL_PR_ARG
, (__entry
->ret
) ?
187 TRACE_EVENT(drv_return_u64
,
188 TP_PROTO(struct ieee80211_local
*local
, u64 ret
),
198 TP_printk(LOCAL_PR_FMT
" - %llu", LOCAL_PR_ARG
, __entry
->ret
)
201 DEFINE_EVENT(local_only_evt
, drv_start
,
202 TP_PROTO(struct ieee80211_local
*local
),
206 DEFINE_EVENT(local_u32_evt
, drv_get_et_strings
,
207 TP_PROTO(struct ieee80211_local
*local
, u32 sset
),
211 DEFINE_EVENT(local_u32_evt
, drv_get_et_sset_count
,
212 TP_PROTO(struct ieee80211_local
*local
, u32 sset
),
216 DEFINE_EVENT(local_only_evt
, drv_get_et_stats
,
217 TP_PROTO(struct ieee80211_local
*local
),
221 DEFINE_EVENT(local_only_evt
, drv_suspend
,
222 TP_PROTO(struct ieee80211_local
*local
),
226 DEFINE_EVENT(local_only_evt
, drv_resume
,
227 TP_PROTO(struct ieee80211_local
*local
),
231 TRACE_EVENT(drv_set_wakeup
,
232 TP_PROTO(struct ieee80211_local
*local
, bool enabled
),
233 TP_ARGS(local
, enabled
),
236 __field(bool, enabled
)
240 __entry
->enabled
= enabled
;
242 TP_printk(LOCAL_PR_FMT
" enabled:%d", LOCAL_PR_ARG
, __entry
->enabled
)
245 DEFINE_EVENT(local_only_evt
, drv_stop
,
246 TP_PROTO(struct ieee80211_local
*local
),
250 DEFINE_EVENT(local_sdata_addr_evt
, drv_add_interface
,
251 TP_PROTO(struct ieee80211_local
*local
,
252 struct ieee80211_sub_if_data
*sdata
),
253 TP_ARGS(local
, sdata
)
256 TRACE_EVENT(drv_change_interface
,
257 TP_PROTO(struct ieee80211_local
*local
,
258 struct ieee80211_sub_if_data
*sdata
,
259 enum nl80211_iftype type
, bool p2p
),
261 TP_ARGS(local
, sdata
, type
, p2p
),
266 __field(u32
, new_type
)
267 __field(bool, new_p2p
)
273 __entry
->new_type
= type
;
274 __entry
->new_p2p
= p2p
;
278 LOCAL_PR_FMT VIF_PR_FMT
" new type:%d%s",
279 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->new_type
,
280 __entry
->new_p2p
? "/p2p" : ""
284 DEFINE_EVENT(local_sdata_addr_evt
, drv_remove_interface
,
285 TP_PROTO(struct ieee80211_local
*local
,
286 struct ieee80211_sub_if_data
*sdata
),
287 TP_ARGS(local
, sdata
)
290 TRACE_EVENT(drv_config
,
291 TP_PROTO(struct ieee80211_local
*local
,
294 TP_ARGS(local
, changed
),
298 __field(u32
, changed
)
300 __field(int, power_level
)
301 __field(int, dynamic_ps_timeout
)
302 __field(int, max_sleep_period
)
303 __field(u16
, listen_interval
)
304 __field(u8
, long_frame_max_tx_count
)
305 __field(u8
, short_frame_max_tx_count
)
312 __entry
->changed
= changed
;
313 __entry
->flags
= local
->hw
.conf
.flags
;
314 __entry
->power_level
= local
->hw
.conf
.power_level
;
315 __entry
->dynamic_ps_timeout
= local
->hw
.conf
.dynamic_ps_timeout
;
316 __entry
->max_sleep_period
= local
->hw
.conf
.max_sleep_period
;
317 __entry
->listen_interval
= local
->hw
.conf
.listen_interval
;
318 __entry
->long_frame_max_tx_count
=
319 local
->hw
.conf
.long_frame_max_tx_count
;
320 __entry
->short_frame_max_tx_count
=
321 local
->hw
.conf
.short_frame_max_tx_count
;
322 CHANDEF_ASSIGN(&local
->hw
.conf
.chandef
)
323 __entry
->smps
= local
->hw
.conf
.smps_mode
;
327 LOCAL_PR_FMT
" ch:%#x" CHANDEF_PR_FMT
,
328 LOCAL_PR_ARG
, __entry
->changed
, CHANDEF_PR_ARG
332 TRACE_EVENT(drv_bss_info_changed
,
333 TP_PROTO(struct ieee80211_local
*local
,
334 struct ieee80211_sub_if_data
*sdata
,
335 struct ieee80211_bss_conf
*info
,
338 TP_ARGS(local
, sdata
, info
, changed
),
343 __field(u32
, changed
)
345 __field(bool, ibss_joined
)
346 __field(bool, ibss_creator
)
349 __field(bool, shortpre
)
350 __field(bool, shortslot
)
351 __field(bool, enable_beacon
)
354 __field(u16
, assoc_cap
)
355 __field(u64
, sync_tsf
)
356 __field(u32
, sync_device_ts
)
357 __field(u8
, sync_dtim_count
)
358 __field(u32
, basic_rates
)
359 __array(int, mcast_rate
, IEEE80211_NUM_BANDS
)
360 __field(u16
, ht_operation_mode
)
361 __field(s32
, cqm_rssi_thold
);
362 __field(s32
, cqm_rssi_hyst
);
363 __field(u32
, channel_width
);
364 __field(u32
, channel_cfreq1
);
365 __dynamic_array(u32
, arp_addr_list
,
366 info
->arp_addr_cnt
> IEEE80211_BSS_ARP_ADDR_LIST_LEN
?
367 IEEE80211_BSS_ARP_ADDR_LIST_LEN
:
369 __field(int, arp_addr_cnt
);
373 __dynamic_array(u8
, ssid
, info
->ssid_len
);
374 __field(bool, hidden_ssid
);
375 __field(int, txpower
)
376 __field(u8
, p2p_oppps_ctwindow
)
382 __entry
->changed
= changed
;
383 __entry
->aid
= info
->aid
;
384 __entry
->assoc
= info
->assoc
;
385 __entry
->ibss_joined
= info
->ibss_joined
;
386 __entry
->ibss_creator
= info
->ibss_creator
;
387 __entry
->shortpre
= info
->use_short_preamble
;
388 __entry
->cts
= info
->use_cts_prot
;
389 __entry
->shortslot
= info
->use_short_slot
;
390 __entry
->enable_beacon
= info
->enable_beacon
;
391 __entry
->dtimper
= info
->dtim_period
;
392 __entry
->bcnint
= info
->beacon_int
;
393 __entry
->assoc_cap
= info
->assoc_capability
;
394 __entry
->sync_tsf
= info
->sync_tsf
;
395 __entry
->sync_device_ts
= info
->sync_device_ts
;
396 __entry
->sync_dtim_count
= info
->sync_dtim_count
;
397 __entry
->basic_rates
= info
->basic_rates
;
398 memcpy(__entry
->mcast_rate
, info
->mcast_rate
,
399 sizeof(__entry
->mcast_rate
));
400 __entry
->ht_operation_mode
= info
->ht_operation_mode
;
401 __entry
->cqm_rssi_thold
= info
->cqm_rssi_thold
;
402 __entry
->cqm_rssi_hyst
= info
->cqm_rssi_hyst
;
403 __entry
->channel_width
= info
->chandef
.width
;
404 __entry
->channel_cfreq1
= info
->chandef
.center_freq1
;
405 __entry
->arp_addr_cnt
= info
->arp_addr_cnt
;
406 memcpy(__get_dynamic_array(arp_addr_list
), info
->arp_addr_list
,
407 sizeof(u32
) * (info
->arp_addr_cnt
> IEEE80211_BSS_ARP_ADDR_LIST_LEN
?
408 IEEE80211_BSS_ARP_ADDR_LIST_LEN
:
409 info
->arp_addr_cnt
));
410 __entry
->qos
= info
->qos
;
411 __entry
->idle
= info
->idle
;
412 __entry
->ps
= info
->ps
;
413 memcpy(__get_dynamic_array(ssid
), info
->ssid
, info
->ssid_len
);
414 __entry
->hidden_ssid
= info
->hidden_ssid
;
415 __entry
->txpower
= info
->txpower
;
416 __entry
->p2p_oppps_ctwindow
= info
->p2p_noa_attr
.oppps_ctwindow
;
420 LOCAL_PR_FMT VIF_PR_FMT
" changed:%#x",
421 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->changed
425 TRACE_EVENT(drv_prepare_multicast
,
426 TP_PROTO(struct ieee80211_local
*local
, int mc_count
),
428 TP_ARGS(local
, mc_count
),
432 __field(int, mc_count
)
437 __entry
->mc_count
= mc_count
;
441 LOCAL_PR_FMT
" prepare mc (%d)",
442 LOCAL_PR_ARG
, __entry
->mc_count
446 TRACE_EVENT(drv_configure_filter
,
447 TP_PROTO(struct ieee80211_local
*local
,
448 unsigned int changed_flags
,
449 unsigned int *total_flags
,
452 TP_ARGS(local
, changed_flags
, total_flags
, multicast
),
456 __field(unsigned int, changed
)
457 __field(unsigned int, total
)
458 __field(u64
, multicast
)
463 __entry
->changed
= changed_flags
;
464 __entry
->total
= *total_flags
;
465 __entry
->multicast
= multicast
;
469 LOCAL_PR_FMT
" changed:%#x total:%#x",
470 LOCAL_PR_ARG
, __entry
->changed
, __entry
->total
474 TRACE_EVENT(drv_set_tim
,
475 TP_PROTO(struct ieee80211_local
*local
,
476 struct ieee80211_sta
*sta
, bool set
),
478 TP_ARGS(local
, sta
, set
),
493 LOCAL_PR_FMT STA_PR_FMT
" set:%d",
494 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->set
498 TRACE_EVENT(drv_set_key
,
499 TP_PROTO(struct ieee80211_local
*local
,
500 enum set_key_cmd cmd
, struct ieee80211_sub_if_data
*sdata
,
501 struct ieee80211_sta
*sta
,
502 struct ieee80211_key_conf
*key
),
504 TP_ARGS(local
, cmd
, sdata
, sta
, key
),
511 __field(u8
, hw_key_idx
)
520 __entry
->cipher
= key
->cipher
;
521 __entry
->flags
= key
->flags
;
522 __entry
->keyidx
= key
->keyidx
;
523 __entry
->hw_key_idx
= key
->hw_key_idx
;
527 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
,
528 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
532 TRACE_EVENT(drv_update_tkip_key
,
533 TP_PROTO(struct ieee80211_local
*local
,
534 struct ieee80211_sub_if_data
*sdata
,
535 struct ieee80211_key_conf
*conf
,
536 struct ieee80211_sta
*sta
, u32 iv32
),
538 TP_ARGS(local
, sdata
, conf
, sta
, iv32
),
551 __entry
->iv32
= iv32
;
555 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" iv32:%#x",
556 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->iv32
560 DEFINE_EVENT(local_sdata_evt
, drv_hw_scan
,
561 TP_PROTO(struct ieee80211_local
*local
,
562 struct ieee80211_sub_if_data
*sdata
),
563 TP_ARGS(local
, sdata
)
566 DEFINE_EVENT(local_sdata_evt
, drv_cancel_hw_scan
,
567 TP_PROTO(struct ieee80211_local
*local
,
568 struct ieee80211_sub_if_data
*sdata
),
569 TP_ARGS(local
, sdata
)
572 DEFINE_EVENT(local_sdata_evt
, drv_sched_scan_start
,
573 TP_PROTO(struct ieee80211_local
*local
,
574 struct ieee80211_sub_if_data
*sdata
),
575 TP_ARGS(local
, sdata
)
578 DEFINE_EVENT(local_sdata_evt
, drv_sched_scan_stop
,
579 TP_PROTO(struct ieee80211_local
*local
,
580 struct ieee80211_sub_if_data
*sdata
),
581 TP_ARGS(local
, sdata
)
584 DEFINE_EVENT(local_only_evt
, drv_sw_scan_start
,
585 TP_PROTO(struct ieee80211_local
*local
),
589 DEFINE_EVENT(local_only_evt
, drv_sw_scan_complete
,
590 TP_PROTO(struct ieee80211_local
*local
),
594 TRACE_EVENT(drv_get_stats
,
595 TP_PROTO(struct ieee80211_local
*local
,
596 struct ieee80211_low_level_stats
*stats
,
599 TP_ARGS(local
, stats
, ret
),
604 __field(unsigned int, ackfail
)
605 __field(unsigned int, rtsfail
)
606 __field(unsigned int, fcserr
)
607 __field(unsigned int, rtssucc
)
613 __entry
->ackfail
= stats
->dot11ACKFailureCount
;
614 __entry
->rtsfail
= stats
->dot11RTSFailureCount
;
615 __entry
->fcserr
= stats
->dot11FCSErrorCount
;
616 __entry
->rtssucc
= stats
->dot11RTSSuccessCount
;
620 LOCAL_PR_FMT
" ret:%d",
621 LOCAL_PR_ARG
, __entry
->ret
625 TRACE_EVENT(drv_get_tkip_seq
,
626 TP_PROTO(struct ieee80211_local
*local
,
627 u8 hw_key_idx
, u32
*iv32
, u16
*iv16
),
629 TP_ARGS(local
, hw_key_idx
, iv32
, iv16
),
633 __field(u8
, hw_key_idx
)
640 __entry
->hw_key_idx
= hw_key_idx
;
641 __entry
->iv32
= *iv32
;
642 __entry
->iv16
= *iv16
;
646 LOCAL_PR_FMT
, LOCAL_PR_ARG
650 DEFINE_EVENT(local_u32_evt
, drv_set_frag_threshold
,
651 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
652 TP_ARGS(local
, value
)
655 DEFINE_EVENT(local_u32_evt
, drv_set_rts_threshold
,
656 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
657 TP_ARGS(local
, value
)
660 TRACE_EVENT(drv_set_coverage_class
,
661 TP_PROTO(struct ieee80211_local
*local
, u8 value
),
663 TP_ARGS(local
, value
),
672 __entry
->value
= value
;
676 LOCAL_PR_FMT
" value:%d",
677 LOCAL_PR_ARG
, __entry
->value
681 TRACE_EVENT(drv_sta_notify
,
682 TP_PROTO(struct ieee80211_local
*local
,
683 struct ieee80211_sub_if_data
*sdata
,
684 enum sta_notify_cmd cmd
,
685 struct ieee80211_sta
*sta
),
687 TP_ARGS(local
, sdata
, cmd
, sta
),
704 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" cmd:%d",
705 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->cmd
709 TRACE_EVENT(drv_sta_state
,
710 TP_PROTO(struct ieee80211_local
*local
,
711 struct ieee80211_sub_if_data
*sdata
,
712 struct ieee80211_sta
*sta
,
713 enum ieee80211_sta_state old_state
,
714 enum ieee80211_sta_state new_state
),
716 TP_ARGS(local
, sdata
, sta
, old_state
, new_state
),
722 __field(u32
, old_state
)
723 __field(u32
, new_state
)
730 __entry
->old_state
= old_state
;
731 __entry
->new_state
= new_state
;
735 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" state: %d->%d",
736 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
,
737 __entry
->old_state
, __entry
->new_state
741 TRACE_EVENT(drv_sta_rc_update
,
742 TP_PROTO(struct ieee80211_local
*local
,
743 struct ieee80211_sub_if_data
*sdata
,
744 struct ieee80211_sta
*sta
,
747 TP_ARGS(local
, sdata
, sta
, changed
),
753 __field(u32
, changed
)
760 __entry
->changed
= changed
;
764 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" changed: 0x%x",
765 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->changed
769 DECLARE_EVENT_CLASS(sta_event
,
770 TP_PROTO(struct ieee80211_local
*local
,
771 struct ieee80211_sub_if_data
*sdata
,
772 struct ieee80211_sta
*sta
),
774 TP_ARGS(local
, sdata
, sta
),
789 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
,
790 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
794 DEFINE_EVENT(sta_event
, drv_sta_add
,
795 TP_PROTO(struct ieee80211_local
*local
,
796 struct ieee80211_sub_if_data
*sdata
,
797 struct ieee80211_sta
*sta
),
798 TP_ARGS(local
, sdata
, sta
)
801 DEFINE_EVENT(sta_event
, drv_sta_remove
,
802 TP_PROTO(struct ieee80211_local
*local
,
803 struct ieee80211_sub_if_data
*sdata
,
804 struct ieee80211_sta
*sta
),
805 TP_ARGS(local
, sdata
, sta
)
808 DEFINE_EVENT(sta_event
, drv_sta_pre_rcu_remove
,
809 TP_PROTO(struct ieee80211_local
*local
,
810 struct ieee80211_sub_if_data
*sdata
,
811 struct ieee80211_sta
*sta
),
812 TP_ARGS(local
, sdata
, sta
)
815 TRACE_EVENT(drv_conf_tx
,
816 TP_PROTO(struct ieee80211_local
*local
,
817 struct ieee80211_sub_if_data
*sdata
,
818 u16 ac
, const struct ieee80211_tx_queue_params
*params
),
820 TP_ARGS(local
, sdata
, ac
, params
),
837 __entry
->txop
= params
->txop
;
838 __entry
->cw_max
= params
->cw_max
;
839 __entry
->cw_min
= params
->cw_min
;
840 __entry
->aifs
= params
->aifs
;
841 __entry
->uapsd
= params
->uapsd
;
845 LOCAL_PR_FMT VIF_PR_FMT
" AC:%d",
846 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->ac
850 DEFINE_EVENT(local_sdata_evt
, drv_get_tsf
,
851 TP_PROTO(struct ieee80211_local
*local
,
852 struct ieee80211_sub_if_data
*sdata
),
853 TP_ARGS(local
, sdata
)
856 TRACE_EVENT(drv_set_tsf
,
857 TP_PROTO(struct ieee80211_local
*local
,
858 struct ieee80211_sub_if_data
*sdata
,
861 TP_ARGS(local
, sdata
, tsf
),
876 LOCAL_PR_FMT VIF_PR_FMT
" tsf:%llu",
877 LOCAL_PR_ARG
, VIF_PR_ARG
, (unsigned long long)__entry
->tsf
881 DEFINE_EVENT(local_sdata_evt
, drv_reset_tsf
,
882 TP_PROTO(struct ieee80211_local
*local
,
883 struct ieee80211_sub_if_data
*sdata
),
884 TP_ARGS(local
, sdata
)
887 DEFINE_EVENT(local_only_evt
, drv_tx_last_beacon
,
888 TP_PROTO(struct ieee80211_local
*local
),
892 TRACE_EVENT(drv_ampdu_action
,
893 TP_PROTO(struct ieee80211_local
*local
,
894 struct ieee80211_sub_if_data
*sdata
,
895 enum ieee80211_ampdu_mlme_action action
,
896 struct ieee80211_sta
*sta
, u16 tid
,
897 u16
*ssn
, u8 buf_size
),
899 TP_ARGS(local
, sdata
, action
, sta
, tid
, ssn
, buf_size
),
907 __field(u8
, buf_size
)
915 __entry
->action
= action
;
917 __entry
->ssn
= ssn
? *ssn
: 0;
918 __entry
->buf_size
= buf_size
;
922 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" action:%d tid:%d buf:%d",
923 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->action
,
924 __entry
->tid
, __entry
->buf_size
928 TRACE_EVENT(drv_get_survey
,
929 TP_PROTO(struct ieee80211_local
*local
, int idx
,
930 struct survey_info
*survey
),
932 TP_ARGS(local
, idx
, survey
),
945 LOCAL_PR_FMT
" idx:%d",
946 LOCAL_PR_ARG
, __entry
->idx
950 TRACE_EVENT(drv_flush
,
951 TP_PROTO(struct ieee80211_local
*local
,
952 u32 queues
, bool drop
),
954 TP_ARGS(local
, queues
, drop
),
964 __entry
->drop
= drop
;
965 __entry
->queues
= queues
;
969 LOCAL_PR_FMT
" queues:0x%x drop:%d",
970 LOCAL_PR_ARG
, __entry
->queues
, __entry
->drop
974 TRACE_EVENT(drv_channel_switch
,
975 TP_PROTO(struct ieee80211_local
*local
,
976 struct ieee80211_channel_switch
*ch_switch
),
978 TP_ARGS(local
, ch_switch
),
983 __field(u64
, timestamp
)
984 __field(bool, block_tx
)
990 CHANDEF_ASSIGN(&ch_switch
->chandef
)
991 __entry
->timestamp
= ch_switch
->timestamp
;
992 __entry
->block_tx
= ch_switch
->block_tx
;
993 __entry
->count
= ch_switch
->count
;
997 LOCAL_PR_FMT
" new " CHANDEF_PR_FMT
" count:%d",
998 LOCAL_PR_ARG
, CHANDEF_PR_ARG
, __entry
->count
1002 TRACE_EVENT(drv_set_antenna
,
1003 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
1005 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
1009 __field(u32
, tx_ant
)
1010 __field(u32
, rx_ant
)
1016 __entry
->tx_ant
= tx_ant
;
1017 __entry
->rx_ant
= rx_ant
;
1022 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
1023 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
1027 TRACE_EVENT(drv_get_antenna
,
1028 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
1030 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
1034 __field(u32
, tx_ant
)
1035 __field(u32
, rx_ant
)
1041 __entry
->tx_ant
= tx_ant
;
1042 __entry
->rx_ant
= rx_ant
;
1047 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
1048 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
1052 TRACE_EVENT(drv_remain_on_channel
,
1053 TP_PROTO(struct ieee80211_local
*local
,
1054 struct ieee80211_sub_if_data
*sdata
,
1055 struct ieee80211_channel
*chan
,
1056 unsigned int duration
,
1057 enum ieee80211_roc_type type
),
1059 TP_ARGS(local
, sdata
, chan
, duration
, type
),
1064 __field(int, center_freq
)
1065 __field(unsigned int, duration
)
1072 __entry
->center_freq
= chan
->center_freq
;
1073 __entry
->duration
= duration
;
1074 __entry
->type
= type
;
1078 LOCAL_PR_FMT VIF_PR_FMT
" freq:%dMHz duration:%dms type=%d",
1079 LOCAL_PR_ARG
, VIF_PR_ARG
,
1080 __entry
->center_freq
, __entry
->duration
, __entry
->type
1084 DEFINE_EVENT(local_only_evt
, drv_cancel_remain_on_channel
,
1085 TP_PROTO(struct ieee80211_local
*local
),
1089 TRACE_EVENT(drv_set_ringparam
,
1090 TP_PROTO(struct ieee80211_local
*local
, u32 tx
, u32 rx
),
1092 TP_ARGS(local
, tx
, rx
),
1107 LOCAL_PR_FMT
" tx:%d rx %d",
1108 LOCAL_PR_ARG
, __entry
->tx
, __entry
->rx
1112 TRACE_EVENT(drv_get_ringparam
,
1113 TP_PROTO(struct ieee80211_local
*local
, u32
*tx
, u32
*tx_max
,
1114 u32
*rx
, u32
*rx_max
),
1116 TP_ARGS(local
, tx
, tx_max
, rx
, rx_max
),
1121 __field(u32
, tx_max
)
1123 __field(u32
, rx_max
)
1129 __entry
->tx_max
= *tx_max
;
1131 __entry
->rx_max
= *rx_max
;
1135 LOCAL_PR_FMT
" tx:%d tx_max %d rx %d rx_max %d",
1137 __entry
->tx
, __entry
->tx_max
, __entry
->rx
, __entry
->rx_max
1141 DEFINE_EVENT(local_only_evt
, drv_tx_frames_pending
,
1142 TP_PROTO(struct ieee80211_local
*local
),
1146 DEFINE_EVENT(local_only_evt
, drv_offchannel_tx_cancel_wait
,
1147 TP_PROTO(struct ieee80211_local
*local
),
1151 TRACE_EVENT(drv_set_bitrate_mask
,
1152 TP_PROTO(struct ieee80211_local
*local
,
1153 struct ieee80211_sub_if_data
*sdata
,
1154 const struct cfg80211_bitrate_mask
*mask
),
1156 TP_ARGS(local
, sdata
, mask
),
1161 __field(u32
, legacy_2g
)
1162 __field(u32
, legacy_5g
)
1168 __entry
->legacy_2g
= mask
->control
[IEEE80211_BAND_2GHZ
].legacy
;
1169 __entry
->legacy_5g
= mask
->control
[IEEE80211_BAND_5GHZ
].legacy
;
1173 LOCAL_PR_FMT VIF_PR_FMT
" 2G Mask:0x%x 5G Mask:0x%x",
1174 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->legacy_2g
, __entry
->legacy_5g
1178 TRACE_EVENT(drv_set_rekey_data
,
1179 TP_PROTO(struct ieee80211_local
*local
,
1180 struct ieee80211_sub_if_data
*sdata
,
1181 struct cfg80211_gtk_rekey_data
*data
),
1183 TP_ARGS(local
, sdata
, data
),
1188 __array(u8
, kek
, NL80211_KEK_LEN
)
1189 __array(u8
, kck
, NL80211_KCK_LEN
)
1190 __array(u8
, replay_ctr
, NL80211_REPLAY_CTR_LEN
)
1196 memcpy(__entry
->kek
, data
->kek
, NL80211_KEK_LEN
);
1197 memcpy(__entry
->kck
, data
->kck
, NL80211_KCK_LEN
);
1198 memcpy(__entry
->replay_ctr
, data
->replay_ctr
,
1199 NL80211_REPLAY_CTR_LEN
);
1202 TP_printk(LOCAL_PR_FMT VIF_PR_FMT
,
1203 LOCAL_PR_ARG
, VIF_PR_ARG
)
1206 TRACE_EVENT(drv_rssi_callback
,
1207 TP_PROTO(struct ieee80211_local
*local
,
1208 struct ieee80211_sub_if_data
*sdata
,
1209 enum ieee80211_rssi_event rssi_event
),
1211 TP_ARGS(local
, sdata
, rssi_event
),
1216 __field(u32
, rssi_event
)
1222 __entry
->rssi_event
= rssi_event
;
1226 LOCAL_PR_FMT VIF_PR_FMT
" rssi_event:%d",
1227 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->rssi_event
1231 DECLARE_EVENT_CLASS(release_evt
,
1232 TP_PROTO(struct ieee80211_local
*local
,
1233 struct ieee80211_sta
*sta
,
1234 u16 tids
, int num_frames
,
1235 enum ieee80211_frame_release_type reason
,
1238 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
),
1244 __field(int, num_frames
)
1245 __field(int, reason
)
1246 __field(bool, more_data
)
1252 __entry
->tids
= tids
;
1253 __entry
->num_frames
= num_frames
;
1254 __entry
->reason
= reason
;
1255 __entry
->more_data
= more_data
;
1259 LOCAL_PR_FMT STA_PR_FMT
1260 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1261 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->tids
, __entry
->num_frames
,
1262 __entry
->reason
, __entry
->more_data
1266 DEFINE_EVENT(release_evt
, drv_release_buffered_frames
,
1267 TP_PROTO(struct ieee80211_local
*local
,
1268 struct ieee80211_sta
*sta
,
1269 u16 tids
, int num_frames
,
1270 enum ieee80211_frame_release_type reason
,
1273 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
)
1276 DEFINE_EVENT(release_evt
, drv_allow_buffered_frames
,
1277 TP_PROTO(struct ieee80211_local
*local
,
1278 struct ieee80211_sta
*sta
,
1279 u16 tids
, int num_frames
,
1280 enum ieee80211_frame_release_type reason
,
1283 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
)
1286 TRACE_EVENT(drv_get_rssi
,
1287 TP_PROTO(struct ieee80211_local
*local
, struct ieee80211_sta
*sta
,
1290 TP_ARGS(local
, sta
, rssi
, ret
),
1302 __entry
->rssi
= rssi
;
1307 LOCAL_PR_FMT STA_PR_FMT
" rssi:%d ret:%d",
1308 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->rssi
, __entry
->ret
1312 DEFINE_EVENT(local_sdata_evt
, drv_mgd_prepare_tx
,
1313 TP_PROTO(struct ieee80211_local
*local
,
1314 struct ieee80211_sub_if_data
*sdata
),
1316 TP_ARGS(local
, sdata
)
1319 DECLARE_EVENT_CLASS(local_chanctx
,
1320 TP_PROTO(struct ieee80211_local
*local
,
1321 struct ieee80211_chanctx
*ctx
),
1323 TP_ARGS(local
, ctx
),
1336 LOCAL_PR_FMT CHANCTX_PR_FMT
,
1337 LOCAL_PR_ARG
, CHANCTX_PR_ARG
1341 DEFINE_EVENT(local_chanctx
, drv_add_chanctx
,
1342 TP_PROTO(struct ieee80211_local
*local
,
1343 struct ieee80211_chanctx
*ctx
),
1347 DEFINE_EVENT(local_chanctx
, drv_remove_chanctx
,
1348 TP_PROTO(struct ieee80211_local
*local
,
1349 struct ieee80211_chanctx
*ctx
),
1353 TRACE_EVENT(drv_change_chanctx
,
1354 TP_PROTO(struct ieee80211_local
*local
,
1355 struct ieee80211_chanctx
*ctx
,
1358 TP_ARGS(local
, ctx
, changed
),
1363 __field(u32
, changed
)
1369 __entry
->changed
= changed
;
1373 LOCAL_PR_FMT CHANCTX_PR_FMT
" changed:%#x",
1374 LOCAL_PR_ARG
, CHANCTX_PR_ARG
, __entry
->changed
1378 DECLARE_EVENT_CLASS(local_sdata_chanctx
,
1379 TP_PROTO(struct ieee80211_local
*local
,
1380 struct ieee80211_sub_if_data
*sdata
,
1381 struct ieee80211_chanctx
*ctx
),
1383 TP_ARGS(local
, sdata
, ctx
),
1398 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT
,
1399 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANCTX_PR_ARG
1403 DEFINE_EVENT(local_sdata_chanctx
, drv_assign_vif_chanctx
,
1404 TP_PROTO(struct ieee80211_local
*local
,
1405 struct ieee80211_sub_if_data
*sdata
,
1406 struct ieee80211_chanctx
*ctx
),
1407 TP_ARGS(local
, sdata
, ctx
)
1410 DEFINE_EVENT(local_sdata_chanctx
, drv_unassign_vif_chanctx
,
1411 TP_PROTO(struct ieee80211_local
*local
,
1412 struct ieee80211_sub_if_data
*sdata
,
1413 struct ieee80211_chanctx
*ctx
),
1414 TP_ARGS(local
, sdata
, ctx
)
1417 TRACE_EVENT(drv_start_ap
,
1418 TP_PROTO(struct ieee80211_local
*local
,
1419 struct ieee80211_sub_if_data
*sdata
,
1420 struct ieee80211_bss_conf
*info
),
1422 TP_ARGS(local
, sdata
, info
),
1427 __field(u8
, dtimper
)
1428 __field(u16
, bcnint
)
1429 __dynamic_array(u8
, ssid
, info
->ssid_len
);
1430 __field(bool, hidden_ssid
);
1436 __entry
->dtimper
= info
->dtim_period
;
1437 __entry
->bcnint
= info
->beacon_int
;
1438 memcpy(__get_dynamic_array(ssid
), info
->ssid
, info
->ssid_len
);
1439 __entry
->hidden_ssid
= info
->hidden_ssid
;
1443 LOCAL_PR_FMT VIF_PR_FMT
,
1444 LOCAL_PR_ARG
, VIF_PR_ARG
1448 DEFINE_EVENT(local_sdata_evt
, drv_stop_ap
,
1449 TP_PROTO(struct ieee80211_local
*local
,
1450 struct ieee80211_sub_if_data
*sdata
),
1451 TP_ARGS(local
, sdata
)
1454 DEFINE_EVENT(local_only_evt
, drv_restart_complete
,
1455 TP_PROTO(struct ieee80211_local
*local
),
1459 #if IS_ENABLED(CONFIG_IPV6)
1460 DEFINE_EVENT(local_sdata_evt
, drv_ipv6_addr_change
,
1461 TP_PROTO(struct ieee80211_local
*local
,
1462 struct ieee80211_sub_if_data
*sdata
),
1463 TP_ARGS(local
, sdata
)
1467 TRACE_EVENT(drv_join_ibss
,
1468 TP_PROTO(struct ieee80211_local
*local
,
1469 struct ieee80211_sub_if_data
*sdata
,
1470 struct ieee80211_bss_conf
*info
),
1472 TP_ARGS(local
, sdata
, info
),
1477 __field(u8
, dtimper
)
1478 __field(u16
, bcnint
)
1479 __dynamic_array(u8
, ssid
, info
->ssid_len
);
1485 __entry
->dtimper
= info
->dtim_period
;
1486 __entry
->bcnint
= info
->beacon_int
;
1487 memcpy(__get_dynamic_array(ssid
), info
->ssid
, info
->ssid_len
);
1491 LOCAL_PR_FMT VIF_PR_FMT
,
1492 LOCAL_PR_ARG
, VIF_PR_ARG
1496 DEFINE_EVENT(local_sdata_evt
, drv_leave_ibss
,
1497 TP_PROTO(struct ieee80211_local
*local
,
1498 struct ieee80211_sub_if_data
*sdata
),
1499 TP_ARGS(local
, sdata
)
1503 * Tracing for API calls that drivers call.
1506 TRACE_EVENT(api_start_tx_ba_session
,
1507 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
1522 STA_PR_FMT
" tid:%d",
1523 STA_PR_ARG
, __entry
->tid
1527 TRACE_EVENT(api_start_tx_ba_cb
,
1528 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
1530 TP_ARGS(sdata
, ra
, tid
),
1534 __array(u8
, ra
, ETH_ALEN
)
1540 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
1545 VIF_PR_FMT
" ra:%pM tid:%d",
1546 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
1550 TRACE_EVENT(api_stop_tx_ba_session
,
1551 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
1566 STA_PR_FMT
" tid:%d",
1567 STA_PR_ARG
, __entry
->tid
1571 TRACE_EVENT(api_stop_tx_ba_cb
,
1572 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
1574 TP_ARGS(sdata
, ra
, tid
),
1578 __array(u8
, ra
, ETH_ALEN
)
1584 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
1589 VIF_PR_FMT
" ra:%pM tid:%d",
1590 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
1594 DEFINE_EVENT(local_only_evt
, api_restart_hw
,
1595 TP_PROTO(struct ieee80211_local
*local
),
1599 TRACE_EVENT(api_beacon_loss
,
1600 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
1618 TRACE_EVENT(api_connection_loss
,
1619 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
1637 TRACE_EVENT(api_cqm_rssi_notify
,
1638 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
1639 enum nl80211_cqm_rssi_threshold_event rssi_event
),
1641 TP_ARGS(sdata
, rssi_event
),
1645 __field(u32
, rssi_event
)
1650 __entry
->rssi_event
= rssi_event
;
1654 VIF_PR_FMT
" event:%d",
1655 VIF_PR_ARG
, __entry
->rssi_event
1659 TRACE_EVENT(api_scan_completed
,
1660 TP_PROTO(struct ieee80211_local
*local
, bool aborted
),
1662 TP_ARGS(local
, aborted
),
1666 __field(bool, aborted
)
1671 __entry
->aborted
= aborted
;
1675 LOCAL_PR_FMT
" aborted:%d",
1676 LOCAL_PR_ARG
, __entry
->aborted
1680 TRACE_EVENT(api_sched_scan_results
,
1681 TP_PROTO(struct ieee80211_local
*local
),
1694 LOCAL_PR_FMT
, LOCAL_PR_ARG
1698 TRACE_EVENT(api_sched_scan_stopped
,
1699 TP_PROTO(struct ieee80211_local
*local
),
1712 LOCAL_PR_FMT
, LOCAL_PR_ARG
1716 TRACE_EVENT(api_sta_block_awake
,
1717 TP_PROTO(struct ieee80211_local
*local
,
1718 struct ieee80211_sta
*sta
, bool block
),
1720 TP_ARGS(local
, sta
, block
),
1725 __field(bool, block
)
1731 __entry
->block
= block
;
1735 LOCAL_PR_FMT STA_PR_FMT
" block:%d",
1736 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->block
1740 TRACE_EVENT(api_chswitch_done
,
1741 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, bool success
),
1743 TP_ARGS(sdata
, success
),
1747 __field(bool, success
)
1752 __entry
->success
= success
;
1756 VIF_PR_FMT
" success=%d",
1757 VIF_PR_ARG
, __entry
->success
1761 DEFINE_EVENT(local_only_evt
, api_ready_on_channel
,
1762 TP_PROTO(struct ieee80211_local
*local
),
1766 DEFINE_EVENT(local_only_evt
, api_remain_on_channel_expired
,
1767 TP_PROTO(struct ieee80211_local
*local
),
1771 TRACE_EVENT(api_gtk_rekey_notify
,
1772 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
1773 const u8
*bssid
, const u8
*replay_ctr
),
1775 TP_ARGS(sdata
, bssid
, replay_ctr
),
1779 __array(u8
, bssid
, ETH_ALEN
)
1780 __array(u8
, replay_ctr
, NL80211_REPLAY_CTR_LEN
)
1785 memcpy(__entry
->bssid
, bssid
, ETH_ALEN
);
1786 memcpy(__entry
->replay_ctr
, replay_ctr
, NL80211_REPLAY_CTR_LEN
);
1789 TP_printk(VIF_PR_FMT
, VIF_PR_ARG
)
1792 TRACE_EVENT(api_enable_rssi_reports
,
1793 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
1794 int rssi_min_thold
, int rssi_max_thold
),
1796 TP_ARGS(sdata
, rssi_min_thold
, rssi_max_thold
),
1800 __field(int, rssi_min_thold
)
1801 __field(int, rssi_max_thold
)
1806 __entry
->rssi_min_thold
= rssi_min_thold
;
1807 __entry
->rssi_max_thold
= rssi_max_thold
;
1811 VIF_PR_FMT
" rssi_min_thold =%d, rssi_max_thold = %d",
1812 VIF_PR_ARG
, __entry
->rssi_min_thold
, __entry
->rssi_max_thold
1816 TRACE_EVENT(api_eosp
,
1817 TP_PROTO(struct ieee80211_local
*local
,
1818 struct ieee80211_sta
*sta
),
1820 TP_ARGS(local
, sta
),
1833 LOCAL_PR_FMT STA_PR_FMT
,
1834 LOCAL_PR_ARG
, STA_PR_ARG
1838 TRACE_EVENT(api_sta_set_buffered
,
1839 TP_PROTO(struct ieee80211_local
*local
,
1840 struct ieee80211_sta
*sta
,
1841 u8 tid
, bool buffered
),
1843 TP_ARGS(local
, sta
, tid
, buffered
),
1849 __field(bool, buffered
)
1856 __entry
->buffered
= buffered
;
1860 LOCAL_PR_FMT STA_PR_FMT
" tid:%d buffered:%d",
1861 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->tid
, __entry
->buffered
1866 * Tracing for internal functions
1867 * (which may also be called in response to driver calls)
1870 TRACE_EVENT(wake_queue
,
1871 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
1872 enum queue_stop_reason reason
),
1874 TP_ARGS(local
, queue
, reason
),
1879 __field(u32
, reason
)
1884 __entry
->queue
= queue
;
1885 __entry
->reason
= reason
;
1889 LOCAL_PR_FMT
" queue:%d, reason:%d",
1890 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
1894 TRACE_EVENT(stop_queue
,
1895 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
1896 enum queue_stop_reason reason
),
1898 TP_ARGS(local
, queue
, reason
),
1903 __field(u32
, reason
)
1908 __entry
->queue
= queue
;
1909 __entry
->reason
= reason
;
1913 LOCAL_PR_FMT
" queue:%d, reason:%d",
1914 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
1918 TRACE_EVENT(drv_set_default_unicast_key
,
1919 TP_PROTO(struct ieee80211_local
*local
,
1920 struct ieee80211_sub_if_data
*sdata
,
1923 TP_ARGS(local
, sdata
, key_idx
),
1928 __field(int, key_idx
)
1934 __entry
->key_idx
= key_idx
;
1937 TP_printk(LOCAL_PR_FMT VIF_PR_FMT
" key_idx:%d",
1938 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->key_idx
)
1941 TRACE_EVENT(api_radar_detected
,
1942 TP_PROTO(struct ieee80211_local
*local
),
1955 LOCAL_PR_FMT
" radar detected",
1960 TRACE_EVENT(drv_channel_switch_beacon
,
1961 TP_PROTO(struct ieee80211_local
*local
,
1962 struct ieee80211_sub_if_data
*sdata
,
1963 struct cfg80211_chan_def
*chandef
),
1965 TP_ARGS(local
, sdata
, chandef
),
1976 CHANDEF_ASSIGN(chandef
);
1980 LOCAL_PR_FMT VIF_PR_FMT
" channel switch to " CHANDEF_PR_FMT
,
1981 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANDEF_PR_ARG
1986 #ifdef CONFIG_MAC80211_MESSAGE_TRACING
1988 #define TRACE_SYSTEM mac80211_msg
1990 #define MAX_MSG_LEN 100
1992 DECLARE_EVENT_CLASS(mac80211_msg_event
,
1993 TP_PROTO(struct va_format
*vaf
),
1998 __dynamic_array(char, msg
, MAX_MSG_LEN
)
2002 WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg
),
2003 MAX_MSG_LEN
, vaf
->fmt
,
2004 *vaf
->va
) >= MAX_MSG_LEN
);
2007 TP_printk("%s", __get_str(msg
))
2010 DEFINE_EVENT(mac80211_msg_event
, mac80211_info
,
2011 TP_PROTO(struct va_format
*vaf
),
2014 DEFINE_EVENT(mac80211_msg_event
, mac80211_dbg
,
2015 TP_PROTO(struct va_format
*vaf
),
2018 DEFINE_EVENT(mac80211_msg_event
, mac80211_err
,
2019 TP_PROTO(struct va_format
*vaf
),
2024 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
2026 #undef TRACE_INCLUDE_PATH
2027 #define TRACE_INCLUDE_PATH .
2028 #undef TRACE_INCLUDE_FILE
2029 #define TRACE_INCLUDE_FILE trace
2030 #include <trace/define_trace.h>