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 : "<nodev>")
28 #define VIF_PR_FMT " vif:%s(%d%s)"
29 #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
32 * Tracing for driver callbacks.
35 DECLARE_EVENT_CLASS(local_only_evt
,
36 TP_PROTO(struct ieee80211_local
*local
),
44 TP_printk(LOCAL_PR_FMT
, LOCAL_PR_ARG
)
47 DECLARE_EVENT_CLASS(local_sdata_addr_evt
,
48 TP_PROTO(struct ieee80211_local
*local
,
49 struct ieee80211_sub_if_data
*sdata
),
50 TP_ARGS(local
, sdata
),
55 __array(char, addr
, 6)
61 memcpy(__entry
->addr
, sdata
->vif
.addr
, 6);
65 LOCAL_PR_FMT VIF_PR_FMT
" addr:%pM",
66 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->addr
70 DECLARE_EVENT_CLASS(local_u32_evt
,
71 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
72 TP_ARGS(local
, value
),
81 __entry
->value
= value
;
85 LOCAL_PR_FMT
" value:%d",
86 LOCAL_PR_ARG
, __entry
->value
90 DECLARE_EVENT_CLASS(local_sdata_evt
,
91 TP_PROTO(struct ieee80211_local
*local
,
92 struct ieee80211_sub_if_data
*sdata
),
93 TP_ARGS(local
, sdata
),
106 LOCAL_PR_FMT VIF_PR_FMT
,
107 LOCAL_PR_ARG
, VIF_PR_ARG
111 DEFINE_EVENT(local_only_evt
, drv_return_void
,
112 TP_PROTO(struct ieee80211_local
*local
),
116 TRACE_EVENT(drv_return_int
,
117 TP_PROTO(struct ieee80211_local
*local
, int ret
),
127 TP_printk(LOCAL_PR_FMT
" - %d", LOCAL_PR_ARG
, __entry
->ret
)
130 TRACE_EVENT(drv_return_bool
,
131 TP_PROTO(struct ieee80211_local
*local
, bool ret
),
141 TP_printk(LOCAL_PR_FMT
" - %s", LOCAL_PR_ARG
, (__entry
->ret
) ?
145 TRACE_EVENT(drv_return_u64
,
146 TP_PROTO(struct ieee80211_local
*local
, u64 ret
),
156 TP_printk(LOCAL_PR_FMT
" - %llu", LOCAL_PR_ARG
, __entry
->ret
)
159 DEFINE_EVENT(local_only_evt
, drv_start
,
160 TP_PROTO(struct ieee80211_local
*local
),
164 DEFINE_EVENT(local_only_evt
, drv_suspend
,
165 TP_PROTO(struct ieee80211_local
*local
),
169 DEFINE_EVENT(local_only_evt
, drv_resume
,
170 TP_PROTO(struct ieee80211_local
*local
),
174 DEFINE_EVENT(local_only_evt
, drv_stop
,
175 TP_PROTO(struct ieee80211_local
*local
),
179 DEFINE_EVENT(local_sdata_addr_evt
, drv_add_interface
,
180 TP_PROTO(struct ieee80211_local
*local
,
181 struct ieee80211_sub_if_data
*sdata
),
182 TP_ARGS(local
, sdata
)
185 TRACE_EVENT(drv_change_interface
,
186 TP_PROTO(struct ieee80211_local
*local
,
187 struct ieee80211_sub_if_data
*sdata
,
188 enum nl80211_iftype type
, bool p2p
),
190 TP_ARGS(local
, sdata
, type
, p2p
),
195 __field(u32
, new_type
)
196 __field(bool, new_p2p
)
202 __entry
->new_type
= type
;
203 __entry
->new_p2p
= p2p
;
207 LOCAL_PR_FMT VIF_PR_FMT
" new type:%d%s",
208 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->new_type
,
209 __entry
->new_p2p
? "/p2p" : ""
213 DEFINE_EVENT(local_sdata_addr_evt
, drv_remove_interface
,
214 TP_PROTO(struct ieee80211_local
*local
,
215 struct ieee80211_sub_if_data
*sdata
),
216 TP_ARGS(local
, sdata
)
219 TRACE_EVENT(drv_config
,
220 TP_PROTO(struct ieee80211_local
*local
,
223 TP_ARGS(local
, changed
),
227 __field(u32
, changed
)
229 __field(int, power_level
)
230 __field(int, dynamic_ps_timeout
)
231 __field(int, max_sleep_period
)
232 __field(u16
, listen_interval
)
233 __field(u8
, long_frame_max_tx_count
)
234 __field(u8
, short_frame_max_tx_count
)
235 __field(int, center_freq
)
236 __field(int, channel_type
)
242 __entry
->changed
= changed
;
243 __entry
->flags
= local
->hw
.conf
.flags
;
244 __entry
->power_level
= local
->hw
.conf
.power_level
;
245 __entry
->dynamic_ps_timeout
= local
->hw
.conf
.dynamic_ps_timeout
;
246 __entry
->max_sleep_period
= local
->hw
.conf
.max_sleep_period
;
247 __entry
->listen_interval
= local
->hw
.conf
.listen_interval
;
248 __entry
->long_frame_max_tx_count
= local
->hw
.conf
.long_frame_max_tx_count
;
249 __entry
->short_frame_max_tx_count
= local
->hw
.conf
.short_frame_max_tx_count
;
250 __entry
->center_freq
= local
->hw
.conf
.channel
->center_freq
;
251 __entry
->channel_type
= local
->hw
.conf
.channel_type
;
252 __entry
->smps
= local
->hw
.conf
.smps_mode
;
256 LOCAL_PR_FMT
" ch:%#x freq:%d",
257 LOCAL_PR_ARG
, __entry
->changed
, __entry
->center_freq
261 TRACE_EVENT(drv_bss_info_changed
,
262 TP_PROTO(struct ieee80211_local
*local
,
263 struct ieee80211_sub_if_data
*sdata
,
264 struct ieee80211_bss_conf
*info
,
267 TP_ARGS(local
, sdata
, info
, changed
),
275 __field(bool, shortpre
)
276 __field(bool, shortslot
)
279 __field(u16
, assoc_cap
)
280 __field(u64
, timestamp
)
281 __field(u32
, basic_rates
)
282 __field(u32
, changed
)
283 __field(bool, enable_beacon
)
284 __field(u16
, ht_operation_mode
)
290 __entry
->changed
= changed
;
291 __entry
->aid
= info
->aid
;
292 __entry
->assoc
= info
->assoc
;
293 __entry
->shortpre
= info
->use_short_preamble
;
294 __entry
->cts
= info
->use_cts_prot
;
295 __entry
->shortslot
= info
->use_short_slot
;
296 __entry
->dtimper
= info
->dtim_period
;
297 __entry
->bcnint
= info
->beacon_int
;
298 __entry
->assoc_cap
= info
->assoc_capability
;
299 __entry
->timestamp
= info
->timestamp
;
300 __entry
->basic_rates
= info
->basic_rates
;
301 __entry
->enable_beacon
= info
->enable_beacon
;
302 __entry
->ht_operation_mode
= info
->ht_operation_mode
;
306 LOCAL_PR_FMT VIF_PR_FMT
" changed:%#x",
307 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->changed
311 DECLARE_EVENT_CLASS(tx_sync_evt
,
312 TP_PROTO(struct ieee80211_local
*local
,
313 struct ieee80211_sub_if_data
*sdata
,
315 enum ieee80211_tx_sync_type type
),
316 TP_ARGS(local
, sdata
, bssid
, type
),
321 __array(char, bssid
, ETH_ALEN
)
322 __field(u32
, sync_type
)
328 memcpy(__entry
->bssid
, bssid
, ETH_ALEN
);
329 __entry
->sync_type
= type
;
333 LOCAL_PR_FMT VIF_PR_FMT
" bssid:%pM type:%d",
334 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->bssid
, __entry
->sync_type
338 DEFINE_EVENT(tx_sync_evt
, drv_tx_sync
,
339 TP_PROTO(struct ieee80211_local
*local
,
340 struct ieee80211_sub_if_data
*sdata
,
342 enum ieee80211_tx_sync_type type
),
343 TP_ARGS(local
, sdata
, bssid
, type
)
346 DEFINE_EVENT(tx_sync_evt
, drv_finish_tx_sync
,
347 TP_PROTO(struct ieee80211_local
*local
,
348 struct ieee80211_sub_if_data
*sdata
,
350 enum ieee80211_tx_sync_type type
),
351 TP_ARGS(local
, sdata
, bssid
, type
)
354 TRACE_EVENT(drv_prepare_multicast
,
355 TP_PROTO(struct ieee80211_local
*local
, int mc_count
),
357 TP_ARGS(local
, mc_count
),
361 __field(int, mc_count
)
366 __entry
->mc_count
= mc_count
;
370 LOCAL_PR_FMT
" prepare mc (%d)",
371 LOCAL_PR_ARG
, __entry
->mc_count
375 TRACE_EVENT(drv_configure_filter
,
376 TP_PROTO(struct ieee80211_local
*local
,
377 unsigned int changed_flags
,
378 unsigned int *total_flags
,
381 TP_ARGS(local
, changed_flags
, total_flags
, multicast
),
385 __field(unsigned int, changed
)
386 __field(unsigned int, total
)
387 __field(u64
, multicast
)
392 __entry
->changed
= changed_flags
;
393 __entry
->total
= *total_flags
;
394 __entry
->multicast
= multicast
;
398 LOCAL_PR_FMT
" changed:%#x total:%#x",
399 LOCAL_PR_ARG
, __entry
->changed
, __entry
->total
403 TRACE_EVENT(drv_set_tim
,
404 TP_PROTO(struct ieee80211_local
*local
,
405 struct ieee80211_sta
*sta
, bool set
),
407 TP_ARGS(local
, sta
, set
),
422 LOCAL_PR_FMT STA_PR_FMT
" set:%d",
423 LOCAL_PR_ARG
, STA_PR_FMT
, __entry
->set
427 TRACE_EVENT(drv_set_key
,
428 TP_PROTO(struct ieee80211_local
*local
,
429 enum set_key_cmd cmd
, struct ieee80211_sub_if_data
*sdata
,
430 struct ieee80211_sta
*sta
,
431 struct ieee80211_key_conf
*key
),
433 TP_ARGS(local
, cmd
, sdata
, sta
, key
),
440 __field(u8
, hw_key_idx
)
449 __entry
->cipher
= key
->cipher
;
450 __entry
->flags
= key
->flags
;
451 __entry
->keyidx
= key
->keyidx
;
452 __entry
->hw_key_idx
= key
->hw_key_idx
;
456 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
,
457 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
461 TRACE_EVENT(drv_update_tkip_key
,
462 TP_PROTO(struct ieee80211_local
*local
,
463 struct ieee80211_sub_if_data
*sdata
,
464 struct ieee80211_key_conf
*conf
,
465 struct ieee80211_sta
*sta
, u32 iv32
),
467 TP_ARGS(local
, sdata
, conf
, sta
, iv32
),
480 __entry
->iv32
= iv32
;
484 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" iv32:%#x",
485 LOCAL_PR_ARG
,VIF_PR_ARG
,STA_PR_ARG
, __entry
->iv32
489 DEFINE_EVENT(local_sdata_evt
, drv_hw_scan
,
490 TP_PROTO(struct ieee80211_local
*local
,
491 struct ieee80211_sub_if_data
*sdata
),
492 TP_ARGS(local
, sdata
)
495 DEFINE_EVENT(local_sdata_evt
, drv_cancel_hw_scan
,
496 TP_PROTO(struct ieee80211_local
*local
,
497 struct ieee80211_sub_if_data
*sdata
),
498 TP_ARGS(local
, sdata
)
501 DEFINE_EVENT(local_sdata_evt
, drv_sched_scan_start
,
502 TP_PROTO(struct ieee80211_local
*local
,
503 struct ieee80211_sub_if_data
*sdata
),
504 TP_ARGS(local
, sdata
)
507 DEFINE_EVENT(local_sdata_evt
, drv_sched_scan_stop
,
508 TP_PROTO(struct ieee80211_local
*local
,
509 struct ieee80211_sub_if_data
*sdata
),
510 TP_ARGS(local
, sdata
)
513 DEFINE_EVENT(local_only_evt
, drv_sw_scan_start
,
514 TP_PROTO(struct ieee80211_local
*local
),
518 DEFINE_EVENT(local_only_evt
, drv_sw_scan_complete
,
519 TP_PROTO(struct ieee80211_local
*local
),
523 TRACE_EVENT(drv_get_stats
,
524 TP_PROTO(struct ieee80211_local
*local
,
525 struct ieee80211_low_level_stats
*stats
,
528 TP_ARGS(local
, stats
, ret
),
533 __field(unsigned int, ackfail
)
534 __field(unsigned int, rtsfail
)
535 __field(unsigned int, fcserr
)
536 __field(unsigned int, rtssucc
)
542 __entry
->ackfail
= stats
->dot11ACKFailureCount
;
543 __entry
->rtsfail
= stats
->dot11RTSFailureCount
;
544 __entry
->fcserr
= stats
->dot11FCSErrorCount
;
545 __entry
->rtssucc
= stats
->dot11RTSSuccessCount
;
549 LOCAL_PR_FMT
" ret:%d",
550 LOCAL_PR_ARG
, __entry
->ret
554 TRACE_EVENT(drv_get_tkip_seq
,
555 TP_PROTO(struct ieee80211_local
*local
,
556 u8 hw_key_idx
, u32
*iv32
, u16
*iv16
),
558 TP_ARGS(local
, hw_key_idx
, iv32
, iv16
),
562 __field(u8
, hw_key_idx
)
569 __entry
->hw_key_idx
= hw_key_idx
;
570 __entry
->iv32
= *iv32
;
571 __entry
->iv16
= *iv16
;
575 LOCAL_PR_FMT
, LOCAL_PR_ARG
579 DEFINE_EVENT(local_u32_evt
, drv_set_frag_threshold
,
580 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
581 TP_ARGS(local
, value
)
584 DEFINE_EVENT(local_u32_evt
, drv_set_rts_threshold
,
585 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
586 TP_ARGS(local
, value
)
589 TRACE_EVENT(drv_set_coverage_class
,
590 TP_PROTO(struct ieee80211_local
*local
, u8 value
),
592 TP_ARGS(local
, value
),
601 __entry
->value
= value
;
605 LOCAL_PR_FMT
" value:%d",
606 LOCAL_PR_ARG
, __entry
->value
610 TRACE_EVENT(drv_sta_notify
,
611 TP_PROTO(struct ieee80211_local
*local
,
612 struct ieee80211_sub_if_data
*sdata
,
613 enum sta_notify_cmd cmd
,
614 struct ieee80211_sta
*sta
),
616 TP_ARGS(local
, sdata
, cmd
, sta
),
633 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" cmd:%d",
634 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->cmd
638 TRACE_EVENT(drv_sta_add
,
639 TP_PROTO(struct ieee80211_local
*local
,
640 struct ieee80211_sub_if_data
*sdata
,
641 struct ieee80211_sta
*sta
),
643 TP_ARGS(local
, sdata
, sta
),
658 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
,
659 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
663 TRACE_EVENT(drv_sta_remove
,
664 TP_PROTO(struct ieee80211_local
*local
,
665 struct ieee80211_sub_if_data
*sdata
,
666 struct ieee80211_sta
*sta
),
668 TP_ARGS(local
, sdata
, sta
),
683 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
,
684 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
688 TRACE_EVENT(drv_conf_tx
,
689 TP_PROTO(struct ieee80211_local
*local
,
690 struct ieee80211_sub_if_data
*sdata
,
692 const struct ieee80211_tx_queue_params
*params
),
694 TP_ARGS(local
, sdata
, queue
, params
),
710 __entry
->queue
= queue
;
711 __entry
->txop
= params
->txop
;
712 __entry
->cw_max
= params
->cw_max
;
713 __entry
->cw_min
= params
->cw_min
;
714 __entry
->aifs
= params
->aifs
;
715 __entry
->uapsd
= params
->uapsd
;
719 LOCAL_PR_FMT VIF_PR_FMT
" queue:%d",
720 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->queue
724 DEFINE_EVENT(local_sdata_evt
, drv_get_tsf
,
725 TP_PROTO(struct ieee80211_local
*local
,
726 struct ieee80211_sub_if_data
*sdata
),
727 TP_ARGS(local
, sdata
)
730 TRACE_EVENT(drv_set_tsf
,
731 TP_PROTO(struct ieee80211_local
*local
,
732 struct ieee80211_sub_if_data
*sdata
,
735 TP_ARGS(local
, sdata
, tsf
),
750 LOCAL_PR_FMT VIF_PR_FMT
" tsf:%llu",
751 LOCAL_PR_ARG
, VIF_PR_ARG
, (unsigned long long)__entry
->tsf
755 DEFINE_EVENT(local_sdata_evt
, drv_reset_tsf
,
756 TP_PROTO(struct ieee80211_local
*local
,
757 struct ieee80211_sub_if_data
*sdata
),
758 TP_ARGS(local
, sdata
)
761 DEFINE_EVENT(local_only_evt
, drv_tx_last_beacon
,
762 TP_PROTO(struct ieee80211_local
*local
),
766 TRACE_EVENT(drv_ampdu_action
,
767 TP_PROTO(struct ieee80211_local
*local
,
768 struct ieee80211_sub_if_data
*sdata
,
769 enum ieee80211_ampdu_mlme_action action
,
770 struct ieee80211_sta
*sta
, u16 tid
,
771 u16
*ssn
, u8 buf_size
),
773 TP_ARGS(local
, sdata
, action
, sta
, tid
, ssn
, buf_size
),
781 __field(u8
, buf_size
)
789 __entry
->action
= action
;
791 __entry
->ssn
= ssn
? *ssn
: 0;
792 __entry
->buf_size
= buf_size
;
796 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" action:%d tid:%d buf:%d",
797 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->action
,
798 __entry
->tid
, __entry
->buf_size
802 TRACE_EVENT(drv_get_survey
,
803 TP_PROTO(struct ieee80211_local
*local
, int idx
,
804 struct survey_info
*survey
),
806 TP_ARGS(local
, idx
, survey
),
819 LOCAL_PR_FMT
" idx:%d",
820 LOCAL_PR_ARG
, __entry
->idx
824 TRACE_EVENT(drv_flush
,
825 TP_PROTO(struct ieee80211_local
*local
, bool drop
),
827 TP_ARGS(local
, drop
),
836 __entry
->drop
= drop
;
840 LOCAL_PR_FMT
" drop:%d",
841 LOCAL_PR_ARG
, __entry
->drop
845 TRACE_EVENT(drv_channel_switch
,
846 TP_PROTO(struct ieee80211_local
*local
,
847 struct ieee80211_channel_switch
*ch_switch
),
849 TP_ARGS(local
, ch_switch
),
853 __field(u64
, timestamp
)
854 __field(bool, block_tx
)
861 __entry
->timestamp
= ch_switch
->timestamp
;
862 __entry
->block_tx
= ch_switch
->block_tx
;
863 __entry
->freq
= ch_switch
->channel
->center_freq
;
864 __entry
->count
= ch_switch
->count
;
868 LOCAL_PR_FMT
" new freq:%u count:%d",
869 LOCAL_PR_ARG
, __entry
->freq
, __entry
->count
873 TRACE_EVENT(drv_set_antenna
,
874 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
876 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
887 __entry
->tx_ant
= tx_ant
;
888 __entry
->rx_ant
= rx_ant
;
893 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
894 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
898 TRACE_EVENT(drv_get_antenna
,
899 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
901 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
912 __entry
->tx_ant
= tx_ant
;
913 __entry
->rx_ant
= rx_ant
;
918 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
919 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
923 TRACE_EVENT(drv_remain_on_channel
,
924 TP_PROTO(struct ieee80211_local
*local
, struct ieee80211_channel
*chan
,
925 enum nl80211_channel_type chantype
, unsigned int duration
),
927 TP_ARGS(local
, chan
, chantype
, duration
),
931 __field(int, center_freq
)
932 __field(int, channel_type
)
933 __field(unsigned int, duration
)
938 __entry
->center_freq
= chan
->center_freq
;
939 __entry
->channel_type
= chantype
;
940 __entry
->duration
= duration
;
944 LOCAL_PR_FMT
" freq:%dMHz duration:%dms",
945 LOCAL_PR_ARG
, __entry
->center_freq
, __entry
->duration
949 DEFINE_EVENT(local_only_evt
, drv_cancel_remain_on_channel
,
950 TP_PROTO(struct ieee80211_local
*local
),
954 TRACE_EVENT(drv_offchannel_tx
,
955 TP_PROTO(struct ieee80211_local
*local
, struct sk_buff
*skb
,
956 struct ieee80211_channel
*chan
,
957 enum nl80211_channel_type channel_type
,
960 TP_ARGS(local
, skb
, chan
, channel_type
, wait
),
964 __field(int, center_freq
)
965 __field(int, channel_type
)
966 __field(unsigned int, wait
)
971 __entry
->center_freq
= chan
->center_freq
;
972 __entry
->channel_type
= channel_type
;
973 __entry
->wait
= wait
;
977 LOCAL_PR_FMT
" freq:%dMHz, wait:%dms",
978 LOCAL_PR_ARG
, __entry
->center_freq
, __entry
->wait
982 TRACE_EVENT(drv_set_ringparam
,
983 TP_PROTO(struct ieee80211_local
*local
, u32 tx
, u32 rx
),
985 TP_ARGS(local
, tx
, rx
),
1000 LOCAL_PR_FMT
" tx:%d rx %d",
1001 LOCAL_PR_ARG
, __entry
->tx
, __entry
->rx
1005 TRACE_EVENT(drv_get_ringparam
,
1006 TP_PROTO(struct ieee80211_local
*local
, u32
*tx
, u32
*tx_max
,
1007 u32
*rx
, u32
*rx_max
),
1009 TP_ARGS(local
, tx
, tx_max
, rx
, rx_max
),
1014 __field(u32
, tx_max
)
1016 __field(u32
, rx_max
)
1022 __entry
->tx_max
= *tx_max
;
1024 __entry
->rx_max
= *rx_max
;
1028 LOCAL_PR_FMT
" tx:%d tx_max %d rx %d rx_max %d",
1030 __entry
->tx
, __entry
->tx_max
, __entry
->rx
, __entry
->rx_max
1034 DEFINE_EVENT(local_only_evt
, drv_tx_frames_pending
,
1035 TP_PROTO(struct ieee80211_local
*local
),
1039 DEFINE_EVENT(local_only_evt
, drv_offchannel_tx_cancel_wait
,
1040 TP_PROTO(struct ieee80211_local
*local
),
1044 TRACE_EVENT(drv_set_bitrate_mask
,
1045 TP_PROTO(struct ieee80211_local
*local
,
1046 struct ieee80211_sub_if_data
*sdata
,
1047 const struct cfg80211_bitrate_mask
*mask
),
1049 TP_ARGS(local
, sdata
, mask
),
1054 __field(u32
, legacy_2g
)
1055 __field(u32
, legacy_5g
)
1061 __entry
->legacy_2g
= mask
->control
[IEEE80211_BAND_2GHZ
].legacy
;
1062 __entry
->legacy_5g
= mask
->control
[IEEE80211_BAND_5GHZ
].legacy
;
1066 LOCAL_PR_FMT VIF_PR_FMT
" 2G Mask:0x%x 5G Mask:0x%x",
1067 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->legacy_2g
, __entry
->legacy_5g
1071 TRACE_EVENT(drv_set_rekey_data
,
1072 TP_PROTO(struct ieee80211_local
*local
,
1073 struct ieee80211_sub_if_data
*sdata
,
1074 struct cfg80211_gtk_rekey_data
*data
),
1076 TP_ARGS(local
, sdata
, data
),
1081 __array(u8
, kek
, NL80211_KEK_LEN
)
1082 __array(u8
, kck
, NL80211_KCK_LEN
)
1083 __array(u8
, replay_ctr
, NL80211_REPLAY_CTR_LEN
)
1089 memcpy(__entry
->kek
, data
->kek
, NL80211_KEK_LEN
);
1090 memcpy(__entry
->kck
, data
->kck
, NL80211_KCK_LEN
);
1091 memcpy(__entry
->replay_ctr
, data
->replay_ctr
,
1092 NL80211_REPLAY_CTR_LEN
);
1095 TP_printk(LOCAL_PR_FMT VIF_PR_FMT
,
1096 LOCAL_PR_ARG
, VIF_PR_ARG
)
1099 TRACE_EVENT(drv_rssi_callback
,
1100 TP_PROTO(struct ieee80211_local
*local
,
1101 enum ieee80211_rssi_event rssi_event
),
1103 TP_ARGS(local
, rssi_event
),
1107 __field(u32
, rssi_event
)
1112 __entry
->rssi_event
= rssi_event
;
1116 LOCAL_PR_FMT
" rssi_event:%d",
1117 LOCAL_PR_ARG
, __entry
->rssi_event
1121 DECLARE_EVENT_CLASS(release_evt
,
1122 TP_PROTO(struct ieee80211_local
*local
,
1123 struct ieee80211_sta
*sta
,
1124 u16 tids
, int num_frames
,
1125 enum ieee80211_frame_release_type reason
,
1128 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
),
1134 __field(int, num_frames
)
1135 __field(int, reason
)
1136 __field(bool, more_data
)
1142 __entry
->tids
= tids
;
1143 __entry
->num_frames
= num_frames
;
1144 __entry
->reason
= reason
;
1145 __entry
->more_data
= more_data
;
1149 LOCAL_PR_FMT STA_PR_FMT
1150 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1151 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->tids
, __entry
->num_frames
,
1152 __entry
->reason
, __entry
->more_data
1156 DEFINE_EVENT(release_evt
, drv_release_buffered_frames
,
1157 TP_PROTO(struct ieee80211_local
*local
,
1158 struct ieee80211_sta
*sta
,
1159 u16 tids
, int num_frames
,
1160 enum ieee80211_frame_release_type reason
,
1163 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
)
1166 DEFINE_EVENT(release_evt
, drv_allow_buffered_frames
,
1167 TP_PROTO(struct ieee80211_local
*local
,
1168 struct ieee80211_sta
*sta
,
1169 u16 tids
, int num_frames
,
1170 enum ieee80211_frame_release_type reason
,
1173 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
)
1177 * Tracing for API calls that drivers call.
1180 TRACE_EVENT(api_start_tx_ba_session
,
1181 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
1196 STA_PR_FMT
" tid:%d",
1197 STA_PR_ARG
, __entry
->tid
1201 TRACE_EVENT(api_start_tx_ba_cb
,
1202 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
1204 TP_ARGS(sdata
, ra
, tid
),
1208 __array(u8
, ra
, ETH_ALEN
)
1214 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
1219 VIF_PR_FMT
" ra:%pM tid:%d",
1220 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
1224 TRACE_EVENT(api_stop_tx_ba_session
,
1225 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
1240 STA_PR_FMT
" tid:%d",
1241 STA_PR_ARG
, __entry
->tid
1245 TRACE_EVENT(api_stop_tx_ba_cb
,
1246 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
1248 TP_ARGS(sdata
, ra
, tid
),
1252 __array(u8
, ra
, ETH_ALEN
)
1258 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
1263 VIF_PR_FMT
" ra:%pM tid:%d",
1264 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
1268 DEFINE_EVENT(local_only_evt
, api_restart_hw
,
1269 TP_PROTO(struct ieee80211_local
*local
),
1273 TRACE_EVENT(api_beacon_loss
,
1274 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
1292 TRACE_EVENT(api_connection_loss
,
1293 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
1311 TRACE_EVENT(api_cqm_rssi_notify
,
1312 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
1313 enum nl80211_cqm_rssi_threshold_event rssi_event
),
1315 TP_ARGS(sdata
, rssi_event
),
1319 __field(u32
, rssi_event
)
1324 __entry
->rssi_event
= rssi_event
;
1328 VIF_PR_FMT
" event:%d",
1329 VIF_PR_ARG
, __entry
->rssi_event
1333 TRACE_EVENT(api_scan_completed
,
1334 TP_PROTO(struct ieee80211_local
*local
, bool aborted
),
1336 TP_ARGS(local
, aborted
),
1340 __field(bool, aborted
)
1345 __entry
->aborted
= aborted
;
1349 LOCAL_PR_FMT
" aborted:%d",
1350 LOCAL_PR_ARG
, __entry
->aborted
1354 TRACE_EVENT(api_sched_scan_results
,
1355 TP_PROTO(struct ieee80211_local
*local
),
1368 LOCAL_PR_FMT
, LOCAL_PR_ARG
1372 TRACE_EVENT(api_sched_scan_stopped
,
1373 TP_PROTO(struct ieee80211_local
*local
),
1386 LOCAL_PR_FMT
, LOCAL_PR_ARG
1390 TRACE_EVENT(api_sta_block_awake
,
1391 TP_PROTO(struct ieee80211_local
*local
,
1392 struct ieee80211_sta
*sta
, bool block
),
1394 TP_ARGS(local
, sta
, block
),
1399 __field(bool, block
)
1405 __entry
->block
= block
;
1409 LOCAL_PR_FMT STA_PR_FMT
" block:%d",
1410 LOCAL_PR_ARG
, STA_PR_FMT
, __entry
->block
1414 TRACE_EVENT(api_chswitch_done
,
1415 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, bool success
),
1417 TP_ARGS(sdata
, success
),
1421 __field(bool, success
)
1426 __entry
->success
= success
;
1430 VIF_PR_FMT
" success=%d",
1431 VIF_PR_ARG
, __entry
->success
1435 DEFINE_EVENT(local_only_evt
, api_ready_on_channel
,
1436 TP_PROTO(struct ieee80211_local
*local
),
1440 DEFINE_EVENT(local_only_evt
, api_remain_on_channel_expired
,
1441 TP_PROTO(struct ieee80211_local
*local
),
1445 TRACE_EVENT(api_gtk_rekey_notify
,
1446 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
1447 const u8
*bssid
, const u8
*replay_ctr
),
1449 TP_ARGS(sdata
, bssid
, replay_ctr
),
1453 __array(u8
, bssid
, ETH_ALEN
)
1454 __array(u8
, replay_ctr
, NL80211_REPLAY_CTR_LEN
)
1459 memcpy(__entry
->bssid
, bssid
, ETH_ALEN
);
1460 memcpy(__entry
->replay_ctr
, replay_ctr
, NL80211_REPLAY_CTR_LEN
);
1463 TP_printk(VIF_PR_FMT
, VIF_PR_ARG
)
1466 TRACE_EVENT(api_enable_rssi_reports
,
1467 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
1468 int rssi_min_thold
, int rssi_max_thold
),
1470 TP_ARGS(sdata
, rssi_min_thold
, rssi_max_thold
),
1474 __field(int, rssi_min_thold
)
1475 __field(int, rssi_max_thold
)
1480 __entry
->rssi_min_thold
= rssi_min_thold
;
1481 __entry
->rssi_max_thold
= rssi_max_thold
;
1485 VIF_PR_FMT
" rssi_min_thold =%d, rssi_max_thold = %d",
1486 VIF_PR_ARG
, __entry
->rssi_min_thold
, __entry
->rssi_max_thold
1490 TRACE_EVENT(api_eosp
,
1491 TP_PROTO(struct ieee80211_local
*local
,
1492 struct ieee80211_sta
*sta
),
1494 TP_ARGS(local
, sta
),
1507 LOCAL_PR_FMT STA_PR_FMT
,
1508 LOCAL_PR_ARG
, STA_PR_FMT
1513 * Tracing for internal functions
1514 * (which may also be called in response to driver calls)
1517 TRACE_EVENT(wake_queue
,
1518 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
1519 enum queue_stop_reason reason
),
1521 TP_ARGS(local
, queue
, reason
),
1526 __field(u32
, reason
)
1531 __entry
->queue
= queue
;
1532 __entry
->reason
= reason
;
1536 LOCAL_PR_FMT
" queue:%d, reason:%d",
1537 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
1541 TRACE_EVENT(stop_queue
,
1542 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
1543 enum queue_stop_reason reason
),
1545 TP_ARGS(local
, queue
, reason
),
1550 __field(u32
, reason
)
1555 __entry
->queue
= queue
;
1556 __entry
->reason
= reason
;
1560 LOCAL_PR_FMT
" queue:%d, reason:%d",
1561 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
1564 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
1566 #undef TRACE_INCLUDE_PATH
1567 #define TRACE_INCLUDE_PATH .
1568 #undef TRACE_INCLUDE_FILE
1569 #define TRACE_INCLUDE_FILE driver-trace
1570 #include <trace/define_trace.h>