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->name)
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->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_u32
,
188 TP_PROTO(struct ieee80211_local
*local
, u32 ret
),
198 TP_printk(LOCAL_PR_FMT
" - %u", LOCAL_PR_ARG
, __entry
->ret
)
201 TRACE_EVENT(drv_return_u64
,
202 TP_PROTO(struct ieee80211_local
*local
, u64 ret
),
212 TP_printk(LOCAL_PR_FMT
" - %llu", LOCAL_PR_ARG
, __entry
->ret
)
215 DEFINE_EVENT(local_only_evt
, drv_start
,
216 TP_PROTO(struct ieee80211_local
*local
),
220 DEFINE_EVENT(local_u32_evt
, drv_get_et_strings
,
221 TP_PROTO(struct ieee80211_local
*local
, u32 sset
),
225 DEFINE_EVENT(local_u32_evt
, drv_get_et_sset_count
,
226 TP_PROTO(struct ieee80211_local
*local
, u32 sset
),
230 DEFINE_EVENT(local_only_evt
, drv_get_et_stats
,
231 TP_PROTO(struct ieee80211_local
*local
),
235 DEFINE_EVENT(local_only_evt
, drv_suspend
,
236 TP_PROTO(struct ieee80211_local
*local
),
240 DEFINE_EVENT(local_only_evt
, drv_resume
,
241 TP_PROTO(struct ieee80211_local
*local
),
245 TRACE_EVENT(drv_set_wakeup
,
246 TP_PROTO(struct ieee80211_local
*local
, bool enabled
),
247 TP_ARGS(local
, enabled
),
250 __field(bool, enabled
)
254 __entry
->enabled
= enabled
;
256 TP_printk(LOCAL_PR_FMT
" enabled:%d", LOCAL_PR_ARG
, __entry
->enabled
)
259 DEFINE_EVENT(local_only_evt
, drv_stop
,
260 TP_PROTO(struct ieee80211_local
*local
),
264 DEFINE_EVENT(local_sdata_addr_evt
, drv_add_interface
,
265 TP_PROTO(struct ieee80211_local
*local
,
266 struct ieee80211_sub_if_data
*sdata
),
267 TP_ARGS(local
, sdata
)
270 TRACE_EVENT(drv_change_interface
,
271 TP_PROTO(struct ieee80211_local
*local
,
272 struct ieee80211_sub_if_data
*sdata
,
273 enum nl80211_iftype type
, bool p2p
),
275 TP_ARGS(local
, sdata
, type
, p2p
),
280 __field(u32
, new_type
)
281 __field(bool, new_p2p
)
287 __entry
->new_type
= type
;
288 __entry
->new_p2p
= p2p
;
292 LOCAL_PR_FMT VIF_PR_FMT
" new type:%d%s",
293 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->new_type
,
294 __entry
->new_p2p
? "/p2p" : ""
298 DEFINE_EVENT(local_sdata_addr_evt
, drv_remove_interface
,
299 TP_PROTO(struct ieee80211_local
*local
,
300 struct ieee80211_sub_if_data
*sdata
),
301 TP_ARGS(local
, sdata
)
304 TRACE_EVENT(drv_config
,
305 TP_PROTO(struct ieee80211_local
*local
,
308 TP_ARGS(local
, changed
),
312 __field(u32
, changed
)
314 __field(int, power_level
)
315 __field(int, dynamic_ps_timeout
)
316 __field(int, max_sleep_period
)
317 __field(u16
, listen_interval
)
318 __field(u8
, long_frame_max_tx_count
)
319 __field(u8
, short_frame_max_tx_count
)
326 __entry
->changed
= changed
;
327 __entry
->flags
= local
->hw
.conf
.flags
;
328 __entry
->power_level
= local
->hw
.conf
.power_level
;
329 __entry
->dynamic_ps_timeout
= local
->hw
.conf
.dynamic_ps_timeout
;
330 __entry
->max_sleep_period
= local
->hw
.conf
.max_sleep_period
;
331 __entry
->listen_interval
= local
->hw
.conf
.listen_interval
;
332 __entry
->long_frame_max_tx_count
=
333 local
->hw
.conf
.long_frame_max_tx_count
;
334 __entry
->short_frame_max_tx_count
=
335 local
->hw
.conf
.short_frame_max_tx_count
;
336 CHANDEF_ASSIGN(&local
->hw
.conf
.chandef
)
337 __entry
->smps
= local
->hw
.conf
.smps_mode
;
341 LOCAL_PR_FMT
" ch:%#x" CHANDEF_PR_FMT
,
342 LOCAL_PR_ARG
, __entry
->changed
, CHANDEF_PR_ARG
346 TRACE_EVENT(drv_bss_info_changed
,
347 TP_PROTO(struct ieee80211_local
*local
,
348 struct ieee80211_sub_if_data
*sdata
,
349 struct ieee80211_bss_conf
*info
,
352 TP_ARGS(local
, sdata
, info
, changed
),
357 __field(u32
, changed
)
359 __field(bool, ibss_joined
)
360 __field(bool, ibss_creator
)
363 __field(bool, shortpre
)
364 __field(bool, shortslot
)
365 __field(bool, enable_beacon
)
368 __field(u16
, assoc_cap
)
369 __field(u64
, sync_tsf
)
370 __field(u32
, sync_device_ts
)
371 __field(u8
, sync_dtim_count
)
372 __field(u32
, basic_rates
)
373 __array(int, mcast_rate
, IEEE80211_NUM_BANDS
)
374 __field(u16
, ht_operation_mode
)
375 __field(s32
, cqm_rssi_thold
);
376 __field(s32
, cqm_rssi_hyst
);
377 __field(u32
, channel_width
);
378 __field(u32
, channel_cfreq1
);
379 __dynamic_array(u32
, arp_addr_list
,
380 info
->arp_addr_cnt
> IEEE80211_BSS_ARP_ADDR_LIST_LEN
?
381 IEEE80211_BSS_ARP_ADDR_LIST_LEN
:
383 __field(int, arp_addr_cnt
);
387 __dynamic_array(u8
, ssid
, info
->ssid_len
);
388 __field(bool, hidden_ssid
);
389 __field(int, txpower
)
390 __field(u8
, p2p_oppps_ctwindow
)
396 __entry
->changed
= changed
;
397 __entry
->aid
= info
->aid
;
398 __entry
->assoc
= info
->assoc
;
399 __entry
->ibss_joined
= info
->ibss_joined
;
400 __entry
->ibss_creator
= info
->ibss_creator
;
401 __entry
->shortpre
= info
->use_short_preamble
;
402 __entry
->cts
= info
->use_cts_prot
;
403 __entry
->shortslot
= info
->use_short_slot
;
404 __entry
->enable_beacon
= info
->enable_beacon
;
405 __entry
->dtimper
= info
->dtim_period
;
406 __entry
->bcnint
= info
->beacon_int
;
407 __entry
->assoc_cap
= info
->assoc_capability
;
408 __entry
->sync_tsf
= info
->sync_tsf
;
409 __entry
->sync_device_ts
= info
->sync_device_ts
;
410 __entry
->sync_dtim_count
= info
->sync_dtim_count
;
411 __entry
->basic_rates
= info
->basic_rates
;
412 memcpy(__entry
->mcast_rate
, info
->mcast_rate
,
413 sizeof(__entry
->mcast_rate
));
414 __entry
->ht_operation_mode
= info
->ht_operation_mode
;
415 __entry
->cqm_rssi_thold
= info
->cqm_rssi_thold
;
416 __entry
->cqm_rssi_hyst
= info
->cqm_rssi_hyst
;
417 __entry
->channel_width
= info
->chandef
.width
;
418 __entry
->channel_cfreq1
= info
->chandef
.center_freq1
;
419 __entry
->arp_addr_cnt
= info
->arp_addr_cnt
;
420 memcpy(__get_dynamic_array(arp_addr_list
), info
->arp_addr_list
,
421 sizeof(u32
) * (info
->arp_addr_cnt
> IEEE80211_BSS_ARP_ADDR_LIST_LEN
?
422 IEEE80211_BSS_ARP_ADDR_LIST_LEN
:
423 info
->arp_addr_cnt
));
424 __entry
->qos
= info
->qos
;
425 __entry
->idle
= info
->idle
;
426 __entry
->ps
= info
->ps
;
427 memcpy(__get_dynamic_array(ssid
), info
->ssid
, info
->ssid_len
);
428 __entry
->hidden_ssid
= info
->hidden_ssid
;
429 __entry
->txpower
= info
->txpower
;
430 __entry
->p2p_oppps_ctwindow
= info
->p2p_noa_attr
.oppps_ctwindow
;
434 LOCAL_PR_FMT VIF_PR_FMT
" changed:%#x",
435 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->changed
439 TRACE_EVENT(drv_prepare_multicast
,
440 TP_PROTO(struct ieee80211_local
*local
, int mc_count
),
442 TP_ARGS(local
, mc_count
),
446 __field(int, mc_count
)
451 __entry
->mc_count
= mc_count
;
455 LOCAL_PR_FMT
" prepare mc (%d)",
456 LOCAL_PR_ARG
, __entry
->mc_count
460 TRACE_EVENT(drv_configure_filter
,
461 TP_PROTO(struct ieee80211_local
*local
,
462 unsigned int changed_flags
,
463 unsigned int *total_flags
,
466 TP_ARGS(local
, changed_flags
, total_flags
, multicast
),
470 __field(unsigned int, changed
)
471 __field(unsigned int, total
)
472 __field(u64
, multicast
)
477 __entry
->changed
= changed_flags
;
478 __entry
->total
= *total_flags
;
479 __entry
->multicast
= multicast
;
483 LOCAL_PR_FMT
" changed:%#x total:%#x",
484 LOCAL_PR_ARG
, __entry
->changed
, __entry
->total
488 TRACE_EVENT(drv_set_tim
,
489 TP_PROTO(struct ieee80211_local
*local
,
490 struct ieee80211_sta
*sta
, bool set
),
492 TP_ARGS(local
, sta
, set
),
507 LOCAL_PR_FMT STA_PR_FMT
" set:%d",
508 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->set
512 TRACE_EVENT(drv_set_key
,
513 TP_PROTO(struct ieee80211_local
*local
,
514 enum set_key_cmd cmd
, struct ieee80211_sub_if_data
*sdata
,
515 struct ieee80211_sta
*sta
,
516 struct ieee80211_key_conf
*key
),
518 TP_ARGS(local
, cmd
, sdata
, sta
, key
),
525 __field(u8
, hw_key_idx
)
534 __entry
->cipher
= key
->cipher
;
535 __entry
->flags
= key
->flags
;
536 __entry
->keyidx
= key
->keyidx
;
537 __entry
->hw_key_idx
= key
->hw_key_idx
;
541 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
,
542 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
546 TRACE_EVENT(drv_update_tkip_key
,
547 TP_PROTO(struct ieee80211_local
*local
,
548 struct ieee80211_sub_if_data
*sdata
,
549 struct ieee80211_key_conf
*conf
,
550 struct ieee80211_sta
*sta
, u32 iv32
),
552 TP_ARGS(local
, sdata
, conf
, sta
, iv32
),
565 __entry
->iv32
= iv32
;
569 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" iv32:%#x",
570 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->iv32
574 DEFINE_EVENT(local_sdata_evt
, drv_hw_scan
,
575 TP_PROTO(struct ieee80211_local
*local
,
576 struct ieee80211_sub_if_data
*sdata
),
577 TP_ARGS(local
, sdata
)
580 DEFINE_EVENT(local_sdata_evt
, drv_cancel_hw_scan
,
581 TP_PROTO(struct ieee80211_local
*local
,
582 struct ieee80211_sub_if_data
*sdata
),
583 TP_ARGS(local
, sdata
)
586 DEFINE_EVENT(local_sdata_evt
, drv_sched_scan_start
,
587 TP_PROTO(struct ieee80211_local
*local
,
588 struct ieee80211_sub_if_data
*sdata
),
589 TP_ARGS(local
, sdata
)
592 DEFINE_EVENT(local_sdata_evt
, drv_sched_scan_stop
,
593 TP_PROTO(struct ieee80211_local
*local
,
594 struct ieee80211_sub_if_data
*sdata
),
595 TP_ARGS(local
, sdata
)
598 DEFINE_EVENT(local_only_evt
, drv_sw_scan_start
,
599 TP_PROTO(struct ieee80211_local
*local
),
603 DEFINE_EVENT(local_only_evt
, drv_sw_scan_complete
,
604 TP_PROTO(struct ieee80211_local
*local
),
608 TRACE_EVENT(drv_get_stats
,
609 TP_PROTO(struct ieee80211_local
*local
,
610 struct ieee80211_low_level_stats
*stats
,
613 TP_ARGS(local
, stats
, ret
),
618 __field(unsigned int, ackfail
)
619 __field(unsigned int, rtsfail
)
620 __field(unsigned int, fcserr
)
621 __field(unsigned int, rtssucc
)
627 __entry
->ackfail
= stats
->dot11ACKFailureCount
;
628 __entry
->rtsfail
= stats
->dot11RTSFailureCount
;
629 __entry
->fcserr
= stats
->dot11FCSErrorCount
;
630 __entry
->rtssucc
= stats
->dot11RTSSuccessCount
;
634 LOCAL_PR_FMT
" ret:%d",
635 LOCAL_PR_ARG
, __entry
->ret
639 TRACE_EVENT(drv_get_tkip_seq
,
640 TP_PROTO(struct ieee80211_local
*local
,
641 u8 hw_key_idx
, u32
*iv32
, u16
*iv16
),
643 TP_ARGS(local
, hw_key_idx
, iv32
, iv16
),
647 __field(u8
, hw_key_idx
)
654 __entry
->hw_key_idx
= hw_key_idx
;
655 __entry
->iv32
= *iv32
;
656 __entry
->iv16
= *iv16
;
660 LOCAL_PR_FMT
, LOCAL_PR_ARG
664 DEFINE_EVENT(local_u32_evt
, drv_set_frag_threshold
,
665 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
666 TP_ARGS(local
, value
)
669 DEFINE_EVENT(local_u32_evt
, drv_set_rts_threshold
,
670 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
671 TP_ARGS(local
, value
)
674 TRACE_EVENT(drv_set_coverage_class
,
675 TP_PROTO(struct ieee80211_local
*local
, s16 value
),
677 TP_ARGS(local
, value
),
686 __entry
->value
= value
;
690 LOCAL_PR_FMT
" value:%d",
691 LOCAL_PR_ARG
, __entry
->value
695 TRACE_EVENT(drv_sta_notify
,
696 TP_PROTO(struct ieee80211_local
*local
,
697 struct ieee80211_sub_if_data
*sdata
,
698 enum sta_notify_cmd cmd
,
699 struct ieee80211_sta
*sta
),
701 TP_ARGS(local
, sdata
, cmd
, sta
),
718 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" cmd:%d",
719 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->cmd
723 TRACE_EVENT(drv_sta_state
,
724 TP_PROTO(struct ieee80211_local
*local
,
725 struct ieee80211_sub_if_data
*sdata
,
726 struct ieee80211_sta
*sta
,
727 enum ieee80211_sta_state old_state
,
728 enum ieee80211_sta_state new_state
),
730 TP_ARGS(local
, sdata
, sta
, old_state
, new_state
),
736 __field(u32
, old_state
)
737 __field(u32
, new_state
)
744 __entry
->old_state
= old_state
;
745 __entry
->new_state
= new_state
;
749 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" state: %d->%d",
750 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
,
751 __entry
->old_state
, __entry
->new_state
755 TRACE_EVENT(drv_sta_rc_update
,
756 TP_PROTO(struct ieee80211_local
*local
,
757 struct ieee80211_sub_if_data
*sdata
,
758 struct ieee80211_sta
*sta
,
761 TP_ARGS(local
, sdata
, sta
, changed
),
767 __field(u32
, changed
)
774 __entry
->changed
= changed
;
778 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" changed: 0x%x",
779 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->changed
783 DECLARE_EVENT_CLASS(sta_event
,
784 TP_PROTO(struct ieee80211_local
*local
,
785 struct ieee80211_sub_if_data
*sdata
,
786 struct ieee80211_sta
*sta
),
788 TP_ARGS(local
, sdata
, sta
),
803 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
,
804 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
808 DEFINE_EVENT(sta_event
, drv_sta_add
,
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 DEFINE_EVENT(sta_event
, drv_sta_remove
,
816 TP_PROTO(struct ieee80211_local
*local
,
817 struct ieee80211_sub_if_data
*sdata
,
818 struct ieee80211_sta
*sta
),
819 TP_ARGS(local
, sdata
, sta
)
822 DEFINE_EVENT(sta_event
, drv_sta_pre_rcu_remove
,
823 TP_PROTO(struct ieee80211_local
*local
,
824 struct ieee80211_sub_if_data
*sdata
,
825 struct ieee80211_sta
*sta
),
826 TP_ARGS(local
, sdata
, sta
)
829 TRACE_EVENT(drv_conf_tx
,
830 TP_PROTO(struct ieee80211_local
*local
,
831 struct ieee80211_sub_if_data
*sdata
,
832 u16 ac
, const struct ieee80211_tx_queue_params
*params
),
834 TP_ARGS(local
, sdata
, ac
, params
),
851 __entry
->txop
= params
->txop
;
852 __entry
->cw_max
= params
->cw_max
;
853 __entry
->cw_min
= params
->cw_min
;
854 __entry
->aifs
= params
->aifs
;
855 __entry
->uapsd
= params
->uapsd
;
859 LOCAL_PR_FMT VIF_PR_FMT
" AC:%d",
860 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->ac
864 DEFINE_EVENT(local_sdata_evt
, drv_get_tsf
,
865 TP_PROTO(struct ieee80211_local
*local
,
866 struct ieee80211_sub_if_data
*sdata
),
867 TP_ARGS(local
, sdata
)
870 TRACE_EVENT(drv_set_tsf
,
871 TP_PROTO(struct ieee80211_local
*local
,
872 struct ieee80211_sub_if_data
*sdata
,
875 TP_ARGS(local
, sdata
, tsf
),
890 LOCAL_PR_FMT VIF_PR_FMT
" tsf:%llu",
891 LOCAL_PR_ARG
, VIF_PR_ARG
, (unsigned long long)__entry
->tsf
895 DEFINE_EVENT(local_sdata_evt
, drv_reset_tsf
,
896 TP_PROTO(struct ieee80211_local
*local
,
897 struct ieee80211_sub_if_data
*sdata
),
898 TP_ARGS(local
, sdata
)
901 DEFINE_EVENT(local_only_evt
, drv_tx_last_beacon
,
902 TP_PROTO(struct ieee80211_local
*local
),
906 TRACE_EVENT(drv_ampdu_action
,
907 TP_PROTO(struct ieee80211_local
*local
,
908 struct ieee80211_sub_if_data
*sdata
,
909 enum ieee80211_ampdu_mlme_action action
,
910 struct ieee80211_sta
*sta
, u16 tid
,
911 u16
*ssn
, u8 buf_size
),
913 TP_ARGS(local
, sdata
, action
, sta
, tid
, ssn
, buf_size
),
921 __field(u8
, buf_size
)
929 __entry
->action
= action
;
931 __entry
->ssn
= ssn
? *ssn
: 0;
932 __entry
->buf_size
= buf_size
;
936 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" action:%d tid:%d buf:%d",
937 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->action
,
938 __entry
->tid
, __entry
->buf_size
942 TRACE_EVENT(drv_get_survey
,
943 TP_PROTO(struct ieee80211_local
*local
, int idx
,
944 struct survey_info
*survey
),
946 TP_ARGS(local
, idx
, survey
),
959 LOCAL_PR_FMT
" idx:%d",
960 LOCAL_PR_ARG
, __entry
->idx
964 TRACE_EVENT(drv_flush
,
965 TP_PROTO(struct ieee80211_local
*local
,
966 u32 queues
, bool drop
),
968 TP_ARGS(local
, queues
, drop
),
978 __entry
->drop
= drop
;
979 __entry
->queues
= queues
;
983 LOCAL_PR_FMT
" queues:0x%x drop:%d",
984 LOCAL_PR_ARG
, __entry
->queues
, __entry
->drop
988 TRACE_EVENT(drv_channel_switch
,
989 TP_PROTO(struct ieee80211_local
*local
,
990 struct ieee80211_channel_switch
*ch_switch
),
992 TP_ARGS(local
, ch_switch
),
997 __field(u64
, timestamp
)
998 __field(bool, block_tx
)
1004 CHANDEF_ASSIGN(&ch_switch
->chandef
)
1005 __entry
->timestamp
= ch_switch
->timestamp
;
1006 __entry
->block_tx
= ch_switch
->block_tx
;
1007 __entry
->count
= ch_switch
->count
;
1011 LOCAL_PR_FMT
" new " CHANDEF_PR_FMT
" count:%d",
1012 LOCAL_PR_ARG
, CHANDEF_PR_ARG
, __entry
->count
1016 TRACE_EVENT(drv_set_antenna
,
1017 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
1019 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
1023 __field(u32
, tx_ant
)
1024 __field(u32
, rx_ant
)
1030 __entry
->tx_ant
= tx_ant
;
1031 __entry
->rx_ant
= rx_ant
;
1036 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
1037 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
1041 TRACE_EVENT(drv_get_antenna
,
1042 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
1044 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
1048 __field(u32
, tx_ant
)
1049 __field(u32
, rx_ant
)
1055 __entry
->tx_ant
= tx_ant
;
1056 __entry
->rx_ant
= rx_ant
;
1061 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
1062 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
1066 TRACE_EVENT(drv_remain_on_channel
,
1067 TP_PROTO(struct ieee80211_local
*local
,
1068 struct ieee80211_sub_if_data
*sdata
,
1069 struct ieee80211_channel
*chan
,
1070 unsigned int duration
,
1071 enum ieee80211_roc_type type
),
1073 TP_ARGS(local
, sdata
, chan
, duration
, type
),
1078 __field(int, center_freq
)
1079 __field(unsigned int, duration
)
1086 __entry
->center_freq
= chan
->center_freq
;
1087 __entry
->duration
= duration
;
1088 __entry
->type
= type
;
1092 LOCAL_PR_FMT VIF_PR_FMT
" freq:%dMHz duration:%dms type=%d",
1093 LOCAL_PR_ARG
, VIF_PR_ARG
,
1094 __entry
->center_freq
, __entry
->duration
, __entry
->type
1098 DEFINE_EVENT(local_only_evt
, drv_cancel_remain_on_channel
,
1099 TP_PROTO(struct ieee80211_local
*local
),
1103 TRACE_EVENT(drv_set_ringparam
,
1104 TP_PROTO(struct ieee80211_local
*local
, u32 tx
, u32 rx
),
1106 TP_ARGS(local
, tx
, rx
),
1121 LOCAL_PR_FMT
" tx:%d rx %d",
1122 LOCAL_PR_ARG
, __entry
->tx
, __entry
->rx
1126 TRACE_EVENT(drv_get_ringparam
,
1127 TP_PROTO(struct ieee80211_local
*local
, u32
*tx
, u32
*tx_max
,
1128 u32
*rx
, u32
*rx_max
),
1130 TP_ARGS(local
, tx
, tx_max
, rx
, rx_max
),
1135 __field(u32
, tx_max
)
1137 __field(u32
, rx_max
)
1143 __entry
->tx_max
= *tx_max
;
1145 __entry
->rx_max
= *rx_max
;
1149 LOCAL_PR_FMT
" tx:%d tx_max %d rx %d rx_max %d",
1151 __entry
->tx
, __entry
->tx_max
, __entry
->rx
, __entry
->rx_max
1155 DEFINE_EVENT(local_only_evt
, drv_tx_frames_pending
,
1156 TP_PROTO(struct ieee80211_local
*local
),
1160 DEFINE_EVENT(local_only_evt
, drv_offchannel_tx_cancel_wait
,
1161 TP_PROTO(struct ieee80211_local
*local
),
1165 TRACE_EVENT(drv_set_bitrate_mask
,
1166 TP_PROTO(struct ieee80211_local
*local
,
1167 struct ieee80211_sub_if_data
*sdata
,
1168 const struct cfg80211_bitrate_mask
*mask
),
1170 TP_ARGS(local
, sdata
, mask
),
1175 __field(u32
, legacy_2g
)
1176 __field(u32
, legacy_5g
)
1182 __entry
->legacy_2g
= mask
->control
[IEEE80211_BAND_2GHZ
].legacy
;
1183 __entry
->legacy_5g
= mask
->control
[IEEE80211_BAND_5GHZ
].legacy
;
1187 LOCAL_PR_FMT VIF_PR_FMT
" 2G Mask:0x%x 5G Mask:0x%x",
1188 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->legacy_2g
, __entry
->legacy_5g
1192 TRACE_EVENT(drv_set_rekey_data
,
1193 TP_PROTO(struct ieee80211_local
*local
,
1194 struct ieee80211_sub_if_data
*sdata
,
1195 struct cfg80211_gtk_rekey_data
*data
),
1197 TP_ARGS(local
, sdata
, data
),
1202 __array(u8
, kek
, NL80211_KEK_LEN
)
1203 __array(u8
, kck
, NL80211_KCK_LEN
)
1204 __array(u8
, replay_ctr
, NL80211_REPLAY_CTR_LEN
)
1210 memcpy(__entry
->kek
, data
->kek
, NL80211_KEK_LEN
);
1211 memcpy(__entry
->kck
, data
->kck
, NL80211_KCK_LEN
);
1212 memcpy(__entry
->replay_ctr
, data
->replay_ctr
,
1213 NL80211_REPLAY_CTR_LEN
);
1216 TP_printk(LOCAL_PR_FMT VIF_PR_FMT
,
1217 LOCAL_PR_ARG
, VIF_PR_ARG
)
1220 TRACE_EVENT(drv_rssi_callback
,
1221 TP_PROTO(struct ieee80211_local
*local
,
1222 struct ieee80211_sub_if_data
*sdata
,
1223 enum ieee80211_rssi_event rssi_event
),
1225 TP_ARGS(local
, sdata
, rssi_event
),
1230 __field(u32
, rssi_event
)
1236 __entry
->rssi_event
= rssi_event
;
1240 LOCAL_PR_FMT VIF_PR_FMT
" rssi_event:%d",
1241 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->rssi_event
1245 DECLARE_EVENT_CLASS(release_evt
,
1246 TP_PROTO(struct ieee80211_local
*local
,
1247 struct ieee80211_sta
*sta
,
1248 u16 tids
, int num_frames
,
1249 enum ieee80211_frame_release_type reason
,
1252 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
),
1258 __field(int, num_frames
)
1259 __field(int, reason
)
1260 __field(bool, more_data
)
1266 __entry
->tids
= tids
;
1267 __entry
->num_frames
= num_frames
;
1268 __entry
->reason
= reason
;
1269 __entry
->more_data
= more_data
;
1273 LOCAL_PR_FMT STA_PR_FMT
1274 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1275 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->tids
, __entry
->num_frames
,
1276 __entry
->reason
, __entry
->more_data
1280 DEFINE_EVENT(release_evt
, drv_release_buffered_frames
,
1281 TP_PROTO(struct ieee80211_local
*local
,
1282 struct ieee80211_sta
*sta
,
1283 u16 tids
, int num_frames
,
1284 enum ieee80211_frame_release_type reason
,
1287 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
)
1290 DEFINE_EVENT(release_evt
, drv_allow_buffered_frames
,
1291 TP_PROTO(struct ieee80211_local
*local
,
1292 struct ieee80211_sta
*sta
,
1293 u16 tids
, int num_frames
,
1294 enum ieee80211_frame_release_type reason
,
1297 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
)
1300 TRACE_EVENT(drv_get_rssi
,
1301 TP_PROTO(struct ieee80211_local
*local
, struct ieee80211_sta
*sta
,
1304 TP_ARGS(local
, sta
, rssi
, ret
),
1316 __entry
->rssi
= rssi
;
1321 LOCAL_PR_FMT STA_PR_FMT
" rssi:%d ret:%d",
1322 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->rssi
, __entry
->ret
1326 DEFINE_EVENT(local_sdata_evt
, drv_mgd_prepare_tx
,
1327 TP_PROTO(struct ieee80211_local
*local
,
1328 struct ieee80211_sub_if_data
*sdata
),
1330 TP_ARGS(local
, sdata
)
1333 DEFINE_EVENT(local_sdata_evt
, drv_mgd_protect_tdls_discover
,
1334 TP_PROTO(struct ieee80211_local
*local
,
1335 struct ieee80211_sub_if_data
*sdata
),
1337 TP_ARGS(local
, sdata
)
1340 DECLARE_EVENT_CLASS(local_chanctx
,
1341 TP_PROTO(struct ieee80211_local
*local
,
1342 struct ieee80211_chanctx
*ctx
),
1344 TP_ARGS(local
, ctx
),
1357 LOCAL_PR_FMT CHANCTX_PR_FMT
,
1358 LOCAL_PR_ARG
, CHANCTX_PR_ARG
1362 DEFINE_EVENT(local_chanctx
, drv_add_chanctx
,
1363 TP_PROTO(struct ieee80211_local
*local
,
1364 struct ieee80211_chanctx
*ctx
),
1368 DEFINE_EVENT(local_chanctx
, drv_remove_chanctx
,
1369 TP_PROTO(struct ieee80211_local
*local
,
1370 struct ieee80211_chanctx
*ctx
),
1374 TRACE_EVENT(drv_change_chanctx
,
1375 TP_PROTO(struct ieee80211_local
*local
,
1376 struct ieee80211_chanctx
*ctx
,
1379 TP_ARGS(local
, ctx
, changed
),
1384 __field(u32
, changed
)
1390 __entry
->changed
= changed
;
1394 LOCAL_PR_FMT CHANCTX_PR_FMT
" changed:%#x",
1395 LOCAL_PR_ARG
, CHANCTX_PR_ARG
, __entry
->changed
1399 #if !defined(__TRACE_VIF_ENTRY)
1400 #define __TRACE_VIF_ENTRY
1401 struct trace_vif_entry
{
1402 enum nl80211_iftype vif_type
;
1404 char vif_name
[IFNAMSIZ
];
1407 struct trace_chandef_entry
{
1414 struct trace_switch_entry
{
1415 struct trace_vif_entry vif
;
1416 struct trace_chandef_entry old_chandef
;
1417 struct trace_chandef_entry new_chandef
;
1420 #define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
1423 TRACE_EVENT(drv_switch_vif_chanctx
,
1424 TP_PROTO(struct ieee80211_local
*local
,
1425 struct ieee80211_vif_chanctx_switch
*vifs
,
1426 int n_vifs
, enum ieee80211_chanctx_switch_mode mode
),
1427 TP_ARGS(local
, vifs
, n_vifs
, mode
),
1431 __field(int, n_vifs
)
1433 __dynamic_array(u8
, vifs
,
1434 sizeof(struct trace_switch_entry
) * n_vifs
)
1439 __entry
->n_vifs
= n_vifs
;
1440 __entry
->mode
= mode
;
1442 struct trace_switch_entry
*local_vifs
=
1443 __get_dynamic_array(vifs
);
1446 for (i
= 0; i
< n_vifs
; i
++) {
1447 struct ieee80211_sub_if_data
*sdata
;
1449 sdata
= container_of(vifs
[i
].vif
,
1450 struct ieee80211_sub_if_data
,
1453 SWITCH_ENTRY_ASSIGN(vif
.vif_type
, vif
->type
);
1454 SWITCH_ENTRY_ASSIGN(vif
.p2p
, vif
->p2p
);
1455 strncpy(local_vifs
[i
].vif
.vif_name
,
1457 sizeof(local_vifs
[i
].vif
.vif_name
));
1458 SWITCH_ENTRY_ASSIGN(old_chandef
.control_freq
,
1459 old_ctx
->def
.chan
->center_freq
);
1460 SWITCH_ENTRY_ASSIGN(old_chandef
.chan_width
,
1461 old_ctx
->def
.width
);
1462 SWITCH_ENTRY_ASSIGN(old_chandef
.center_freq1
,
1463 old_ctx
->def
.center_freq1
);
1464 SWITCH_ENTRY_ASSIGN(old_chandef
.center_freq2
,
1465 old_ctx
->def
.center_freq2
);
1466 SWITCH_ENTRY_ASSIGN(new_chandef
.control_freq
,
1467 new_ctx
->def
.chan
->center_freq
);
1468 SWITCH_ENTRY_ASSIGN(new_chandef
.chan_width
,
1469 new_ctx
->def
.width
);
1470 SWITCH_ENTRY_ASSIGN(new_chandef
.center_freq1
,
1471 new_ctx
->def
.center_freq1
);
1472 SWITCH_ENTRY_ASSIGN(new_chandef
.center_freq2
,
1473 new_ctx
->def
.center_freq2
);
1479 LOCAL_PR_FMT
" n_vifs:%d mode:%d",
1480 LOCAL_PR_ARG
, __entry
->n_vifs
, __entry
->mode
1484 DECLARE_EVENT_CLASS(local_sdata_chanctx
,
1485 TP_PROTO(struct ieee80211_local
*local
,
1486 struct ieee80211_sub_if_data
*sdata
,
1487 struct ieee80211_chanctx
*ctx
),
1489 TP_ARGS(local
, sdata
, ctx
),
1504 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT
,
1505 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANCTX_PR_ARG
1509 DEFINE_EVENT(local_sdata_chanctx
, drv_assign_vif_chanctx
,
1510 TP_PROTO(struct ieee80211_local
*local
,
1511 struct ieee80211_sub_if_data
*sdata
,
1512 struct ieee80211_chanctx
*ctx
),
1513 TP_ARGS(local
, sdata
, ctx
)
1516 DEFINE_EVENT(local_sdata_chanctx
, drv_unassign_vif_chanctx
,
1517 TP_PROTO(struct ieee80211_local
*local
,
1518 struct ieee80211_sub_if_data
*sdata
,
1519 struct ieee80211_chanctx
*ctx
),
1520 TP_ARGS(local
, sdata
, ctx
)
1523 TRACE_EVENT(drv_start_ap
,
1524 TP_PROTO(struct ieee80211_local
*local
,
1525 struct ieee80211_sub_if_data
*sdata
,
1526 struct ieee80211_bss_conf
*info
),
1528 TP_ARGS(local
, sdata
, info
),
1533 __field(u8
, dtimper
)
1534 __field(u16
, bcnint
)
1535 __dynamic_array(u8
, ssid
, info
->ssid_len
);
1536 __field(bool, hidden_ssid
);
1542 __entry
->dtimper
= info
->dtim_period
;
1543 __entry
->bcnint
= info
->beacon_int
;
1544 memcpy(__get_dynamic_array(ssid
), info
->ssid
, info
->ssid_len
);
1545 __entry
->hidden_ssid
= info
->hidden_ssid
;
1549 LOCAL_PR_FMT VIF_PR_FMT
,
1550 LOCAL_PR_ARG
, VIF_PR_ARG
1554 DEFINE_EVENT(local_sdata_evt
, drv_stop_ap
,
1555 TP_PROTO(struct ieee80211_local
*local
,
1556 struct ieee80211_sub_if_data
*sdata
),
1557 TP_ARGS(local
, sdata
)
1560 DEFINE_EVENT(local_only_evt
, drv_restart_complete
,
1561 TP_PROTO(struct ieee80211_local
*local
),
1565 #if IS_ENABLED(CONFIG_IPV6)
1566 DEFINE_EVENT(local_sdata_evt
, drv_ipv6_addr_change
,
1567 TP_PROTO(struct ieee80211_local
*local
,
1568 struct ieee80211_sub_if_data
*sdata
),
1569 TP_ARGS(local
, sdata
)
1573 TRACE_EVENT(drv_join_ibss
,
1574 TP_PROTO(struct ieee80211_local
*local
,
1575 struct ieee80211_sub_if_data
*sdata
,
1576 struct ieee80211_bss_conf
*info
),
1578 TP_ARGS(local
, sdata
, info
),
1583 __field(u8
, dtimper
)
1584 __field(u16
, bcnint
)
1585 __dynamic_array(u8
, ssid
, info
->ssid_len
);
1591 __entry
->dtimper
= info
->dtim_period
;
1592 __entry
->bcnint
= info
->beacon_int
;
1593 memcpy(__get_dynamic_array(ssid
), info
->ssid
, info
->ssid_len
);
1597 LOCAL_PR_FMT VIF_PR_FMT
,
1598 LOCAL_PR_ARG
, VIF_PR_ARG
1602 DEFINE_EVENT(local_sdata_evt
, drv_leave_ibss
,
1603 TP_PROTO(struct ieee80211_local
*local
,
1604 struct ieee80211_sub_if_data
*sdata
),
1605 TP_ARGS(local
, sdata
)
1608 TRACE_EVENT(drv_get_expected_throughput
,
1609 TP_PROTO(struct ieee80211_sta
*sta
),
1622 STA_PR_FMT
, STA_PR_ARG
1627 * Tracing for API calls that drivers call.
1630 TRACE_EVENT(api_start_tx_ba_session
,
1631 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
1646 STA_PR_FMT
" tid:%d",
1647 STA_PR_ARG
, __entry
->tid
1651 TRACE_EVENT(api_start_tx_ba_cb
,
1652 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
1654 TP_ARGS(sdata
, ra
, tid
),
1658 __array(u8
, ra
, ETH_ALEN
)
1664 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
1669 VIF_PR_FMT
" ra:%pM tid:%d",
1670 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
1674 TRACE_EVENT(api_stop_tx_ba_session
,
1675 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
1690 STA_PR_FMT
" tid:%d",
1691 STA_PR_ARG
, __entry
->tid
1695 TRACE_EVENT(api_stop_tx_ba_cb
,
1696 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
1698 TP_ARGS(sdata
, ra
, tid
),
1702 __array(u8
, ra
, ETH_ALEN
)
1708 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
1713 VIF_PR_FMT
" ra:%pM tid:%d",
1714 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
1718 DEFINE_EVENT(local_only_evt
, api_restart_hw
,
1719 TP_PROTO(struct ieee80211_local
*local
),
1723 TRACE_EVENT(api_beacon_loss
,
1724 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
1742 TRACE_EVENT(api_connection_loss
,
1743 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
1761 TRACE_EVENT(api_cqm_rssi_notify
,
1762 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
1763 enum nl80211_cqm_rssi_threshold_event rssi_event
),
1765 TP_ARGS(sdata
, rssi_event
),
1769 __field(u32
, rssi_event
)
1774 __entry
->rssi_event
= rssi_event
;
1778 VIF_PR_FMT
" event:%d",
1779 VIF_PR_ARG
, __entry
->rssi_event
1783 TRACE_EVENT(api_scan_completed
,
1784 TP_PROTO(struct ieee80211_local
*local
, bool aborted
),
1786 TP_ARGS(local
, aborted
),
1790 __field(bool, aborted
)
1795 __entry
->aborted
= aborted
;
1799 LOCAL_PR_FMT
" aborted:%d",
1800 LOCAL_PR_ARG
, __entry
->aborted
1804 TRACE_EVENT(api_sched_scan_results
,
1805 TP_PROTO(struct ieee80211_local
*local
),
1818 LOCAL_PR_FMT
, LOCAL_PR_ARG
1822 TRACE_EVENT(api_sched_scan_stopped
,
1823 TP_PROTO(struct ieee80211_local
*local
),
1836 LOCAL_PR_FMT
, LOCAL_PR_ARG
1840 TRACE_EVENT(api_sta_block_awake
,
1841 TP_PROTO(struct ieee80211_local
*local
,
1842 struct ieee80211_sta
*sta
, bool block
),
1844 TP_ARGS(local
, sta
, block
),
1849 __field(bool, block
)
1855 __entry
->block
= block
;
1859 LOCAL_PR_FMT STA_PR_FMT
" block:%d",
1860 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->block
1864 TRACE_EVENT(api_chswitch_done
,
1865 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, bool success
),
1867 TP_ARGS(sdata
, success
),
1871 __field(bool, success
)
1876 __entry
->success
= success
;
1880 VIF_PR_FMT
" success=%d",
1881 VIF_PR_ARG
, __entry
->success
1885 DEFINE_EVENT(local_only_evt
, api_ready_on_channel
,
1886 TP_PROTO(struct ieee80211_local
*local
),
1890 DEFINE_EVENT(local_only_evt
, api_remain_on_channel_expired
,
1891 TP_PROTO(struct ieee80211_local
*local
),
1895 TRACE_EVENT(api_gtk_rekey_notify
,
1896 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
1897 const u8
*bssid
, const u8
*replay_ctr
),
1899 TP_ARGS(sdata
, bssid
, replay_ctr
),
1903 __array(u8
, bssid
, ETH_ALEN
)
1904 __array(u8
, replay_ctr
, NL80211_REPLAY_CTR_LEN
)
1909 memcpy(__entry
->bssid
, bssid
, ETH_ALEN
);
1910 memcpy(__entry
->replay_ctr
, replay_ctr
, NL80211_REPLAY_CTR_LEN
);
1913 TP_printk(VIF_PR_FMT
, VIF_PR_ARG
)
1916 TRACE_EVENT(api_enable_rssi_reports
,
1917 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
1918 int rssi_min_thold
, int rssi_max_thold
),
1920 TP_ARGS(sdata
, rssi_min_thold
, rssi_max_thold
),
1924 __field(int, rssi_min_thold
)
1925 __field(int, rssi_max_thold
)
1930 __entry
->rssi_min_thold
= rssi_min_thold
;
1931 __entry
->rssi_max_thold
= rssi_max_thold
;
1935 VIF_PR_FMT
" rssi_min_thold =%d, rssi_max_thold = %d",
1936 VIF_PR_ARG
, __entry
->rssi_min_thold
, __entry
->rssi_max_thold
1940 TRACE_EVENT(api_eosp
,
1941 TP_PROTO(struct ieee80211_local
*local
,
1942 struct ieee80211_sta
*sta
),
1944 TP_ARGS(local
, sta
),
1957 LOCAL_PR_FMT STA_PR_FMT
,
1958 LOCAL_PR_ARG
, STA_PR_ARG
1962 TRACE_EVENT(api_sta_set_buffered
,
1963 TP_PROTO(struct ieee80211_local
*local
,
1964 struct ieee80211_sta
*sta
,
1965 u8 tid
, bool buffered
),
1967 TP_ARGS(local
, sta
, tid
, buffered
),
1973 __field(bool, buffered
)
1980 __entry
->buffered
= buffered
;
1984 LOCAL_PR_FMT STA_PR_FMT
" tid:%d buffered:%d",
1985 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->tid
, __entry
->buffered
1990 * Tracing for internal functions
1991 * (which may also be called in response to driver calls)
1994 TRACE_EVENT(wake_queue
,
1995 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
1996 enum queue_stop_reason reason
),
1998 TP_ARGS(local
, queue
, reason
),
2003 __field(u32
, reason
)
2008 __entry
->queue
= queue
;
2009 __entry
->reason
= reason
;
2013 LOCAL_PR_FMT
" queue:%d, reason:%d",
2014 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
2018 TRACE_EVENT(stop_queue
,
2019 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
2020 enum queue_stop_reason reason
),
2022 TP_ARGS(local
, queue
, reason
),
2027 __field(u32
, reason
)
2032 __entry
->queue
= queue
;
2033 __entry
->reason
= reason
;
2037 LOCAL_PR_FMT
" queue:%d, reason:%d",
2038 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
2042 TRACE_EVENT(drv_set_default_unicast_key
,
2043 TP_PROTO(struct ieee80211_local
*local
,
2044 struct ieee80211_sub_if_data
*sdata
,
2047 TP_ARGS(local
, sdata
, key_idx
),
2052 __field(int, key_idx
)
2058 __entry
->key_idx
= key_idx
;
2061 TP_printk(LOCAL_PR_FMT VIF_PR_FMT
" key_idx:%d",
2062 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->key_idx
)
2065 TRACE_EVENT(api_radar_detected
,
2066 TP_PROTO(struct ieee80211_local
*local
),
2079 LOCAL_PR_FMT
" radar detected",
2084 TRACE_EVENT(drv_channel_switch_beacon
,
2085 TP_PROTO(struct ieee80211_local
*local
,
2086 struct ieee80211_sub_if_data
*sdata
,
2087 struct cfg80211_chan_def
*chandef
),
2089 TP_ARGS(local
, sdata
, chandef
),
2100 CHANDEF_ASSIGN(chandef
);
2104 LOCAL_PR_FMT VIF_PR_FMT
" channel switch to " CHANDEF_PR_FMT
,
2105 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANDEF_PR_ARG
2110 #ifdef CONFIG_MAC80211_MESSAGE_TRACING
2112 #define TRACE_SYSTEM mac80211_msg
2114 #define MAX_MSG_LEN 100
2116 DECLARE_EVENT_CLASS(mac80211_msg_event
,
2117 TP_PROTO(struct va_format
*vaf
),
2122 __dynamic_array(char, msg
, MAX_MSG_LEN
)
2126 WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg
),
2127 MAX_MSG_LEN
, vaf
->fmt
,
2128 *vaf
->va
) >= MAX_MSG_LEN
);
2131 TP_printk("%s", __get_str(msg
))
2134 DEFINE_EVENT(mac80211_msg_event
, mac80211_info
,
2135 TP_PROTO(struct va_format
*vaf
),
2138 DEFINE_EVENT(mac80211_msg_event
, mac80211_dbg
,
2139 TP_PROTO(struct va_format
*vaf
),
2142 DEFINE_EVENT(mac80211_msg_event
, mac80211_err
,
2143 TP_PROTO(struct va_format
*vaf
),
2148 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
2150 #undef TRACE_INCLUDE_PATH
2151 #define TRACE_INCLUDE_PATH .
2152 #undef TRACE_INCLUDE_FILE
2153 #define TRACE_INCLUDE_FILE trace
2154 #include <trace/define_trace.h>