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"
8 #if !defined(CONFIG_MAC80211_DRIVER_API_TRACER) || defined(__CHECKER__)
10 #define TRACE_EVENT(name, proto, ...) \
11 static inline void trace_ ## name(proto) {}
12 #undef DECLARE_EVENT_CLASS
13 #define DECLARE_EVENT_CLASS(...)
15 #define DEFINE_EVENT(evt_class, name, proto, ...) \
16 static inline void trace_ ## name(proto) {}
20 #define TRACE_SYSTEM mac80211
23 #define LOCAL_ENTRY __array(char, wiphy_name, 32)
24 #define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME)
25 #define LOCAL_PR_FMT "%s"
26 #define LOCAL_PR_ARG __entry->wiphy_name
28 #define STA_ENTRY __array(char, sta_addr, ETH_ALEN)
29 #define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN))
30 #define STA_PR_FMT " sta:%pM"
31 #define STA_PR_ARG __entry->sta_addr
33 #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
35 __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
36 #define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
37 __entry->p2p = sdata->vif.p2p; \
38 __assign_str(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
39 #define VIF_PR_FMT " vif:%s(%d%s)"
40 #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
43 * Tracing for driver callbacks.
46 DECLARE_EVENT_CLASS(local_only_evt
,
47 TP_PROTO(struct ieee80211_local
*local
),
55 TP_printk(LOCAL_PR_FMT
, LOCAL_PR_ARG
)
58 DECLARE_EVENT_CLASS(local_sdata_addr_evt
,
59 TP_PROTO(struct ieee80211_local
*local
,
60 struct ieee80211_sub_if_data
*sdata
),
61 TP_ARGS(local
, sdata
),
66 __array(char, addr
, 6)
72 memcpy(__entry
->addr
, sdata
->vif
.addr
, 6);
76 LOCAL_PR_FMT VIF_PR_FMT
" addr:%pM",
77 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->addr
81 DECLARE_EVENT_CLASS(local_u32_evt
,
82 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
83 TP_ARGS(local
, value
),
92 __entry
->value
= value
;
96 LOCAL_PR_FMT
" value:%d",
97 LOCAL_PR_ARG
, __entry
->value
101 DECLARE_EVENT_CLASS(local_sdata_evt
,
102 TP_PROTO(struct ieee80211_local
*local
,
103 struct ieee80211_sub_if_data
*sdata
),
104 TP_ARGS(local
, sdata
),
117 LOCAL_PR_FMT VIF_PR_FMT
,
118 LOCAL_PR_ARG
, VIF_PR_ARG
122 DEFINE_EVENT(local_only_evt
, drv_return_void
,
123 TP_PROTO(struct ieee80211_local
*local
),
127 TRACE_EVENT(drv_return_int
,
128 TP_PROTO(struct ieee80211_local
*local
, int ret
),
138 TP_printk(LOCAL_PR_FMT
" - %d", LOCAL_PR_ARG
, __entry
->ret
)
141 TRACE_EVENT(drv_return_bool
,
142 TP_PROTO(struct ieee80211_local
*local
, bool ret
),
152 TP_printk(LOCAL_PR_FMT
" - %s", LOCAL_PR_ARG
, (__entry
->ret
) ?
156 TRACE_EVENT(drv_return_u64
,
157 TP_PROTO(struct ieee80211_local
*local
, u64 ret
),
167 TP_printk(LOCAL_PR_FMT
" - %llu", LOCAL_PR_ARG
, __entry
->ret
)
170 DEFINE_EVENT(local_only_evt
, drv_start
,
171 TP_PROTO(struct ieee80211_local
*local
),
175 DEFINE_EVENT(local_only_evt
, drv_suspend
,
176 TP_PROTO(struct ieee80211_local
*local
),
180 DEFINE_EVENT(local_only_evt
, drv_resume
,
181 TP_PROTO(struct ieee80211_local
*local
),
185 DEFINE_EVENT(local_only_evt
, drv_stop
,
186 TP_PROTO(struct ieee80211_local
*local
),
190 DEFINE_EVENT(local_sdata_addr_evt
, drv_add_interface
,
191 TP_PROTO(struct ieee80211_local
*local
,
192 struct ieee80211_sub_if_data
*sdata
),
193 TP_ARGS(local
, sdata
)
196 TRACE_EVENT(drv_change_interface
,
197 TP_PROTO(struct ieee80211_local
*local
,
198 struct ieee80211_sub_if_data
*sdata
,
199 enum nl80211_iftype type
, bool p2p
),
201 TP_ARGS(local
, sdata
, type
, p2p
),
206 __field(u32
, new_type
)
207 __field(bool, new_p2p
)
213 __entry
->new_type
= type
;
214 __entry
->new_p2p
= p2p
;
218 LOCAL_PR_FMT VIF_PR_FMT
" new type:%d%s",
219 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->new_type
,
220 __entry
->new_p2p
? "/p2p" : ""
224 DEFINE_EVENT(local_sdata_addr_evt
, drv_remove_interface
,
225 TP_PROTO(struct ieee80211_local
*local
,
226 struct ieee80211_sub_if_data
*sdata
),
227 TP_ARGS(local
, sdata
)
230 TRACE_EVENT(drv_config
,
231 TP_PROTO(struct ieee80211_local
*local
,
234 TP_ARGS(local
, changed
),
238 __field(u32
, changed
)
240 __field(int, power_level
)
241 __field(int, dynamic_ps_timeout
)
242 __field(int, max_sleep_period
)
243 __field(u16
, listen_interval
)
244 __field(u8
, long_frame_max_tx_count
)
245 __field(u8
, short_frame_max_tx_count
)
246 __field(int, center_freq
)
247 __field(int, channel_type
)
253 __entry
->changed
= changed
;
254 __entry
->flags
= local
->hw
.conf
.flags
;
255 __entry
->power_level
= local
->hw
.conf
.power_level
;
256 __entry
->dynamic_ps_timeout
= local
->hw
.conf
.dynamic_ps_timeout
;
257 __entry
->max_sleep_period
= local
->hw
.conf
.max_sleep_period
;
258 __entry
->listen_interval
= local
->hw
.conf
.listen_interval
;
259 __entry
->long_frame_max_tx_count
= local
->hw
.conf
.long_frame_max_tx_count
;
260 __entry
->short_frame_max_tx_count
= local
->hw
.conf
.short_frame_max_tx_count
;
261 __entry
->center_freq
= local
->hw
.conf
.channel
->center_freq
;
262 __entry
->channel_type
= local
->hw
.conf
.channel_type
;
263 __entry
->smps
= local
->hw
.conf
.smps_mode
;
267 LOCAL_PR_FMT
" ch:%#x freq:%d",
268 LOCAL_PR_ARG
, __entry
->changed
, __entry
->center_freq
272 TRACE_EVENT(drv_bss_info_changed
,
273 TP_PROTO(struct ieee80211_local
*local
,
274 struct ieee80211_sub_if_data
*sdata
,
275 struct ieee80211_bss_conf
*info
,
278 TP_ARGS(local
, sdata
, info
, changed
),
286 __field(bool, shortpre
)
287 __field(bool, shortslot
)
290 __field(u16
, assoc_cap
)
291 __field(u64
, timestamp
)
292 __field(u32
, basic_rates
)
293 __field(u32
, changed
)
294 __field(bool, enable_beacon
)
295 __field(u16
, ht_operation_mode
)
301 __entry
->changed
= changed
;
302 __entry
->aid
= info
->aid
;
303 __entry
->assoc
= info
->assoc
;
304 __entry
->shortpre
= info
->use_short_preamble
;
305 __entry
->cts
= info
->use_cts_prot
;
306 __entry
->shortslot
= info
->use_short_slot
;
307 __entry
->dtimper
= info
->dtim_period
;
308 __entry
->bcnint
= info
->beacon_int
;
309 __entry
->assoc_cap
= info
->assoc_capability
;
310 __entry
->timestamp
= info
->timestamp
;
311 __entry
->basic_rates
= info
->basic_rates
;
312 __entry
->enable_beacon
= info
->enable_beacon
;
313 __entry
->ht_operation_mode
= info
->ht_operation_mode
;
317 LOCAL_PR_FMT VIF_PR_FMT
" changed:%#x",
318 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->changed
322 DECLARE_EVENT_CLASS(tx_sync_evt
,
323 TP_PROTO(struct ieee80211_local
*local
,
324 struct ieee80211_sub_if_data
*sdata
,
326 enum ieee80211_tx_sync_type type
),
327 TP_ARGS(local
, sdata
, bssid
, type
),
332 __array(char, bssid
, ETH_ALEN
)
333 __field(u32
, sync_type
)
339 memcpy(__entry
->bssid
, bssid
, ETH_ALEN
);
340 __entry
->sync_type
= type
;
344 LOCAL_PR_FMT VIF_PR_FMT
" bssid:%pM type:%d",
345 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->bssid
, __entry
->sync_type
349 DEFINE_EVENT(tx_sync_evt
, drv_tx_sync
,
350 TP_PROTO(struct ieee80211_local
*local
,
351 struct ieee80211_sub_if_data
*sdata
,
353 enum ieee80211_tx_sync_type type
),
354 TP_ARGS(local
, sdata
, bssid
, type
)
357 DEFINE_EVENT(tx_sync_evt
, drv_finish_tx_sync
,
358 TP_PROTO(struct ieee80211_local
*local
,
359 struct ieee80211_sub_if_data
*sdata
,
361 enum ieee80211_tx_sync_type type
),
362 TP_ARGS(local
, sdata
, bssid
, type
)
365 TRACE_EVENT(drv_prepare_multicast
,
366 TP_PROTO(struct ieee80211_local
*local
, int mc_count
),
368 TP_ARGS(local
, mc_count
),
372 __field(int, mc_count
)
377 __entry
->mc_count
= mc_count
;
381 LOCAL_PR_FMT
" prepare mc (%d)",
382 LOCAL_PR_ARG
, __entry
->mc_count
386 TRACE_EVENT(drv_configure_filter
,
387 TP_PROTO(struct ieee80211_local
*local
,
388 unsigned int changed_flags
,
389 unsigned int *total_flags
,
392 TP_ARGS(local
, changed_flags
, total_flags
, multicast
),
396 __field(unsigned int, changed
)
397 __field(unsigned int, total
)
398 __field(u64
, multicast
)
403 __entry
->changed
= changed_flags
;
404 __entry
->total
= *total_flags
;
405 __entry
->multicast
= multicast
;
409 LOCAL_PR_FMT
" changed:%#x total:%#x",
410 LOCAL_PR_ARG
, __entry
->changed
, __entry
->total
414 TRACE_EVENT(drv_set_tim
,
415 TP_PROTO(struct ieee80211_local
*local
,
416 struct ieee80211_sta
*sta
, bool set
),
418 TP_ARGS(local
, sta
, set
),
433 LOCAL_PR_FMT STA_PR_FMT
" set:%d",
434 LOCAL_PR_ARG
, STA_PR_FMT
, __entry
->set
438 TRACE_EVENT(drv_set_key
,
439 TP_PROTO(struct ieee80211_local
*local
,
440 enum set_key_cmd cmd
, struct ieee80211_sub_if_data
*sdata
,
441 struct ieee80211_sta
*sta
,
442 struct ieee80211_key_conf
*key
),
444 TP_ARGS(local
, cmd
, sdata
, sta
, key
),
451 __field(u8
, hw_key_idx
)
460 __entry
->cipher
= key
->cipher
;
461 __entry
->flags
= key
->flags
;
462 __entry
->keyidx
= key
->keyidx
;
463 __entry
->hw_key_idx
= key
->hw_key_idx
;
467 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
,
468 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
472 TRACE_EVENT(drv_update_tkip_key
,
473 TP_PROTO(struct ieee80211_local
*local
,
474 struct ieee80211_sub_if_data
*sdata
,
475 struct ieee80211_key_conf
*conf
,
476 struct ieee80211_sta
*sta
, u32 iv32
),
478 TP_ARGS(local
, sdata
, conf
, sta
, iv32
),
491 __entry
->iv32
= iv32
;
495 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" iv32:%#x",
496 LOCAL_PR_ARG
,VIF_PR_ARG
,STA_PR_ARG
, __entry
->iv32
500 DEFINE_EVENT(local_sdata_evt
, drv_hw_scan
,
501 TP_PROTO(struct ieee80211_local
*local
,
502 struct ieee80211_sub_if_data
*sdata
),
503 TP_ARGS(local
, sdata
)
506 DEFINE_EVENT(local_sdata_evt
, drv_cancel_hw_scan
,
507 TP_PROTO(struct ieee80211_local
*local
,
508 struct ieee80211_sub_if_data
*sdata
),
509 TP_ARGS(local
, sdata
)
512 DEFINE_EVENT(local_sdata_evt
, drv_sched_scan_start
,
513 TP_PROTO(struct ieee80211_local
*local
,
514 struct ieee80211_sub_if_data
*sdata
),
515 TP_ARGS(local
, sdata
)
518 DEFINE_EVENT(local_sdata_evt
, drv_sched_scan_stop
,
519 TP_PROTO(struct ieee80211_local
*local
,
520 struct ieee80211_sub_if_data
*sdata
),
521 TP_ARGS(local
, sdata
)
524 DEFINE_EVENT(local_only_evt
, drv_sw_scan_start
,
525 TP_PROTO(struct ieee80211_local
*local
),
529 DEFINE_EVENT(local_only_evt
, drv_sw_scan_complete
,
530 TP_PROTO(struct ieee80211_local
*local
),
534 TRACE_EVENT(drv_get_stats
,
535 TP_PROTO(struct ieee80211_local
*local
,
536 struct ieee80211_low_level_stats
*stats
,
539 TP_ARGS(local
, stats
, ret
),
544 __field(unsigned int, ackfail
)
545 __field(unsigned int, rtsfail
)
546 __field(unsigned int, fcserr
)
547 __field(unsigned int, rtssucc
)
553 __entry
->ackfail
= stats
->dot11ACKFailureCount
;
554 __entry
->rtsfail
= stats
->dot11RTSFailureCount
;
555 __entry
->fcserr
= stats
->dot11FCSErrorCount
;
556 __entry
->rtssucc
= stats
->dot11RTSSuccessCount
;
560 LOCAL_PR_FMT
" ret:%d",
561 LOCAL_PR_ARG
, __entry
->ret
565 TRACE_EVENT(drv_get_tkip_seq
,
566 TP_PROTO(struct ieee80211_local
*local
,
567 u8 hw_key_idx
, u32
*iv32
, u16
*iv16
),
569 TP_ARGS(local
, hw_key_idx
, iv32
, iv16
),
573 __field(u8
, hw_key_idx
)
580 __entry
->hw_key_idx
= hw_key_idx
;
581 __entry
->iv32
= *iv32
;
582 __entry
->iv16
= *iv16
;
586 LOCAL_PR_FMT
, LOCAL_PR_ARG
590 DEFINE_EVENT(local_u32_evt
, drv_set_frag_threshold
,
591 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
592 TP_ARGS(local
, value
)
595 DEFINE_EVENT(local_u32_evt
, drv_set_rts_threshold
,
596 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
597 TP_ARGS(local
, value
)
600 TRACE_EVENT(drv_set_coverage_class
,
601 TP_PROTO(struct ieee80211_local
*local
, u8 value
),
603 TP_ARGS(local
, value
),
612 __entry
->value
= value
;
616 LOCAL_PR_FMT
" value:%d",
617 LOCAL_PR_ARG
, __entry
->value
621 TRACE_EVENT(drv_sta_notify
,
622 TP_PROTO(struct ieee80211_local
*local
,
623 struct ieee80211_sub_if_data
*sdata
,
624 enum sta_notify_cmd cmd
,
625 struct ieee80211_sta
*sta
),
627 TP_ARGS(local
, sdata
, cmd
, sta
),
644 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" cmd:%d",
645 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->cmd
649 TRACE_EVENT(drv_sta_add
,
650 TP_PROTO(struct ieee80211_local
*local
,
651 struct ieee80211_sub_if_data
*sdata
,
652 struct ieee80211_sta
*sta
),
654 TP_ARGS(local
, sdata
, sta
),
669 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
,
670 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
674 TRACE_EVENT(drv_sta_remove
,
675 TP_PROTO(struct ieee80211_local
*local
,
676 struct ieee80211_sub_if_data
*sdata
,
677 struct ieee80211_sta
*sta
),
679 TP_ARGS(local
, sdata
, sta
),
694 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
,
695 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
699 TRACE_EVENT(drv_conf_tx
,
700 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
701 const struct ieee80211_tx_queue_params
*params
),
703 TP_ARGS(local
, queue
, params
),
716 __entry
->queue
= queue
;
717 __entry
->txop
= params
->txop
;
718 __entry
->cw_max
= params
->cw_max
;
719 __entry
->cw_min
= params
->cw_min
;
720 __entry
->aifs
= params
->aifs
;
724 LOCAL_PR_FMT
" queue:%d",
725 LOCAL_PR_ARG
, __entry
->queue
729 DEFINE_EVENT(local_only_evt
, drv_get_tsf
,
730 TP_PROTO(struct ieee80211_local
*local
),
734 TRACE_EVENT(drv_set_tsf
,
735 TP_PROTO(struct ieee80211_local
*local
, u64 tsf
),
750 LOCAL_PR_FMT
" tsf:%llu",
751 LOCAL_PR_ARG
, (unsigned long long)__entry
->tsf
755 DEFINE_EVENT(local_only_evt
, drv_reset_tsf
,
756 TP_PROTO(struct ieee80211_local
*local
),
760 DEFINE_EVENT(local_only_evt
, drv_tx_last_beacon
,
761 TP_PROTO(struct ieee80211_local
*local
),
765 TRACE_EVENT(drv_ampdu_action
,
766 TP_PROTO(struct ieee80211_local
*local
,
767 struct ieee80211_sub_if_data
*sdata
,
768 enum ieee80211_ampdu_mlme_action action
,
769 struct ieee80211_sta
*sta
, u16 tid
,
770 u16
*ssn
, u8 buf_size
),
772 TP_ARGS(local
, sdata
, action
, sta
, tid
, ssn
, buf_size
),
780 __field(u8
, buf_size
)
788 __entry
->action
= action
;
790 __entry
->ssn
= ssn
? *ssn
: 0;
791 __entry
->buf_size
= buf_size
;
795 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" action:%d tid:%d buf:%d",
796 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->action
,
797 __entry
->tid
, __entry
->buf_size
801 TRACE_EVENT(drv_get_survey
,
802 TP_PROTO(struct ieee80211_local
*local
, int idx
,
803 struct survey_info
*survey
),
805 TP_ARGS(local
, idx
, survey
),
818 LOCAL_PR_FMT
" idx:%d",
819 LOCAL_PR_ARG
, __entry
->idx
823 TRACE_EVENT(drv_flush
,
824 TP_PROTO(struct ieee80211_local
*local
, bool drop
),
826 TP_ARGS(local
, drop
),
835 __entry
->drop
= drop
;
839 LOCAL_PR_FMT
" drop:%d",
840 LOCAL_PR_ARG
, __entry
->drop
844 TRACE_EVENT(drv_channel_switch
,
845 TP_PROTO(struct ieee80211_local
*local
,
846 struct ieee80211_channel_switch
*ch_switch
),
848 TP_ARGS(local
, ch_switch
),
852 __field(u64
, timestamp
)
853 __field(bool, block_tx
)
860 __entry
->timestamp
= ch_switch
->timestamp
;
861 __entry
->block_tx
= ch_switch
->block_tx
;
862 __entry
->freq
= ch_switch
->channel
->center_freq
;
863 __entry
->count
= ch_switch
->count
;
867 LOCAL_PR_FMT
" new freq:%u count:%d",
868 LOCAL_PR_ARG
, __entry
->freq
, __entry
->count
872 TRACE_EVENT(drv_set_antenna
,
873 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
875 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
886 __entry
->tx_ant
= tx_ant
;
887 __entry
->rx_ant
= rx_ant
;
892 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
893 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
897 TRACE_EVENT(drv_get_antenna
,
898 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
900 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
911 __entry
->tx_ant
= tx_ant
;
912 __entry
->rx_ant
= rx_ant
;
917 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
918 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
922 TRACE_EVENT(drv_remain_on_channel
,
923 TP_PROTO(struct ieee80211_local
*local
, struct ieee80211_channel
*chan
,
924 enum nl80211_channel_type chantype
, unsigned int duration
),
926 TP_ARGS(local
, chan
, chantype
, duration
),
930 __field(int, center_freq
)
931 __field(int, channel_type
)
932 __field(unsigned int, duration
)
937 __entry
->center_freq
= chan
->center_freq
;
938 __entry
->channel_type
= chantype
;
939 __entry
->duration
= duration
;
943 LOCAL_PR_FMT
" freq:%dMHz duration:%dms",
944 LOCAL_PR_ARG
, __entry
->center_freq
, __entry
->duration
948 DEFINE_EVENT(local_only_evt
, drv_cancel_remain_on_channel
,
949 TP_PROTO(struct ieee80211_local
*local
),
953 TRACE_EVENT(drv_offchannel_tx
,
954 TP_PROTO(struct ieee80211_local
*local
, struct sk_buff
*skb
,
955 struct ieee80211_channel
*chan
,
956 enum nl80211_channel_type channel_type
,
959 TP_ARGS(local
, skb
, chan
, channel_type
, wait
),
963 __field(int, center_freq
)
964 __field(int, channel_type
)
965 __field(unsigned int, wait
)
970 __entry
->center_freq
= chan
->center_freq
;
971 __entry
->channel_type
= channel_type
;
972 __entry
->wait
= wait
;
976 LOCAL_PR_FMT
" freq:%dMHz, wait:%dms",
977 LOCAL_PR_ARG
, __entry
->center_freq
, __entry
->wait
981 TRACE_EVENT(drv_set_ringparam
,
982 TP_PROTO(struct ieee80211_local
*local
, u32 tx
, u32 rx
),
984 TP_ARGS(local
, tx
, rx
),
999 LOCAL_PR_FMT
" tx:%d rx %d",
1000 LOCAL_PR_ARG
, __entry
->tx
, __entry
->rx
1004 TRACE_EVENT(drv_get_ringparam
,
1005 TP_PROTO(struct ieee80211_local
*local
, u32
*tx
, u32
*tx_max
,
1006 u32
*rx
, u32
*rx_max
),
1008 TP_ARGS(local
, tx
, tx_max
, rx
, rx_max
),
1013 __field(u32
, tx_max
)
1015 __field(u32
, rx_max
)
1021 __entry
->tx_max
= *tx_max
;
1023 __entry
->rx_max
= *rx_max
;
1027 LOCAL_PR_FMT
" tx:%d tx_max %d rx %d rx_max %d",
1029 __entry
->tx
, __entry
->tx_max
, __entry
->rx
, __entry
->rx_max
1033 DEFINE_EVENT(local_only_evt
, drv_tx_frames_pending
,
1034 TP_PROTO(struct ieee80211_local
*local
),
1038 DEFINE_EVENT(local_only_evt
, drv_offchannel_tx_cancel_wait
,
1039 TP_PROTO(struct ieee80211_local
*local
),
1043 TRACE_EVENT(drv_set_bitrate_mask
,
1044 TP_PROTO(struct ieee80211_local
*local
,
1045 struct ieee80211_sub_if_data
*sdata
,
1046 const struct cfg80211_bitrate_mask
*mask
),
1048 TP_ARGS(local
, sdata
, mask
),
1053 __field(u32
, legacy_2g
)
1054 __field(u32
, legacy_5g
)
1060 __entry
->legacy_2g
= mask
->control
[IEEE80211_BAND_2GHZ
].legacy
;
1061 __entry
->legacy_5g
= mask
->control
[IEEE80211_BAND_5GHZ
].legacy
;
1065 LOCAL_PR_FMT VIF_PR_FMT
" 2G Mask:0x%x 5G Mask:0x%x",
1066 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->legacy_2g
, __entry
->legacy_5g
1070 TRACE_EVENT(drv_set_rekey_data
,
1071 TP_PROTO(struct ieee80211_local
*local
,
1072 struct ieee80211_sub_if_data
*sdata
,
1073 struct cfg80211_gtk_rekey_data
*data
),
1075 TP_ARGS(local
, sdata
, data
),
1080 __array(u8
, kek
, NL80211_KEK_LEN
)
1081 __array(u8
, kck
, NL80211_KCK_LEN
)
1082 __array(u8
, replay_ctr
, NL80211_REPLAY_CTR_LEN
)
1088 memcpy(__entry
->kek
, data
->kek
, NL80211_KEK_LEN
);
1089 memcpy(__entry
->kck
, data
->kck
, NL80211_KCK_LEN
);
1090 memcpy(__entry
->replay_ctr
, data
->replay_ctr
,
1091 NL80211_REPLAY_CTR_LEN
);
1094 TP_printk(LOCAL_PR_FMT VIF_PR_FMT
,
1095 LOCAL_PR_ARG
, VIF_PR_ARG
)
1098 TRACE_EVENT(drv_rssi_callback
,
1099 TP_PROTO(struct ieee80211_local
*local
,
1100 enum ieee80211_rssi_event rssi_event
),
1102 TP_ARGS(local
, rssi_event
),
1106 __field(u32
, rssi_event
)
1111 __entry
->rssi_event
= rssi_event
;
1115 LOCAL_PR_FMT
" rssi_event:%d",
1116 LOCAL_PR_ARG
, __entry
->rssi_event
1121 * Tracing for API calls that drivers call.
1124 TRACE_EVENT(api_start_tx_ba_session
,
1125 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
1140 STA_PR_FMT
" tid:%d",
1141 STA_PR_ARG
, __entry
->tid
1145 TRACE_EVENT(api_start_tx_ba_cb
,
1146 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
1148 TP_ARGS(sdata
, ra
, tid
),
1152 __array(u8
, ra
, ETH_ALEN
)
1158 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
1163 VIF_PR_FMT
" ra:%pM tid:%d",
1164 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
1168 TRACE_EVENT(api_stop_tx_ba_session
,
1169 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
1184 STA_PR_FMT
" tid:%d",
1185 STA_PR_ARG
, __entry
->tid
1189 TRACE_EVENT(api_stop_tx_ba_cb
,
1190 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
1192 TP_ARGS(sdata
, ra
, tid
),
1196 __array(u8
, ra
, ETH_ALEN
)
1202 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
1207 VIF_PR_FMT
" ra:%pM tid:%d",
1208 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
1212 DEFINE_EVENT(local_only_evt
, api_restart_hw
,
1213 TP_PROTO(struct ieee80211_local
*local
),
1217 TRACE_EVENT(api_beacon_loss
,
1218 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
1236 TRACE_EVENT(api_connection_loss
,
1237 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
1255 TRACE_EVENT(api_cqm_rssi_notify
,
1256 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
1257 enum nl80211_cqm_rssi_threshold_event rssi_event
),
1259 TP_ARGS(sdata
, rssi_event
),
1263 __field(u32
, rssi_event
)
1268 __entry
->rssi_event
= rssi_event
;
1272 VIF_PR_FMT
" event:%d",
1273 VIF_PR_ARG
, __entry
->rssi_event
1277 TRACE_EVENT(api_scan_completed
,
1278 TP_PROTO(struct ieee80211_local
*local
, bool aborted
),
1280 TP_ARGS(local
, aborted
),
1284 __field(bool, aborted
)
1289 __entry
->aborted
= aborted
;
1293 LOCAL_PR_FMT
" aborted:%d",
1294 LOCAL_PR_ARG
, __entry
->aborted
1298 TRACE_EVENT(api_sched_scan_results
,
1299 TP_PROTO(struct ieee80211_local
*local
),
1312 LOCAL_PR_FMT
, LOCAL_PR_ARG
1316 TRACE_EVENT(api_sched_scan_stopped
,
1317 TP_PROTO(struct ieee80211_local
*local
),
1330 LOCAL_PR_FMT
, LOCAL_PR_ARG
1334 TRACE_EVENT(api_sta_block_awake
,
1335 TP_PROTO(struct ieee80211_local
*local
,
1336 struct ieee80211_sta
*sta
, bool block
),
1338 TP_ARGS(local
, sta
, block
),
1343 __field(bool, block
)
1349 __entry
->block
= block
;
1353 LOCAL_PR_FMT STA_PR_FMT
" block:%d",
1354 LOCAL_PR_ARG
, STA_PR_FMT
, __entry
->block
1358 TRACE_EVENT(api_chswitch_done
,
1359 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, bool success
),
1361 TP_ARGS(sdata
, success
),
1365 __field(bool, success
)
1370 __entry
->success
= success
;
1374 VIF_PR_FMT
" success=%d",
1375 VIF_PR_ARG
, __entry
->success
1379 DEFINE_EVENT(local_only_evt
, api_ready_on_channel
,
1380 TP_PROTO(struct ieee80211_local
*local
),
1384 DEFINE_EVENT(local_only_evt
, api_remain_on_channel_expired
,
1385 TP_PROTO(struct ieee80211_local
*local
),
1389 TRACE_EVENT(api_gtk_rekey_notify
,
1390 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
1391 const u8
*bssid
, const u8
*replay_ctr
),
1393 TP_ARGS(sdata
, bssid
, replay_ctr
),
1397 __array(u8
, bssid
, ETH_ALEN
)
1398 __array(u8
, replay_ctr
, NL80211_REPLAY_CTR_LEN
)
1403 memcpy(__entry
->bssid
, bssid
, ETH_ALEN
);
1404 memcpy(__entry
->replay_ctr
, replay_ctr
, NL80211_REPLAY_CTR_LEN
);
1407 TP_printk(VIF_PR_FMT
, VIF_PR_ARG
)
1410 TRACE_EVENT(api_enable_rssi_reports
,
1411 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
1412 int rssi_min_thold
, int rssi_max_thold
),
1414 TP_ARGS(sdata
, rssi_min_thold
, rssi_max_thold
),
1418 __field(int, rssi_min_thold
)
1419 __field(int, rssi_max_thold
)
1424 __entry
->rssi_min_thold
= rssi_min_thold
;
1425 __entry
->rssi_max_thold
= rssi_max_thold
;
1429 VIF_PR_FMT
" rssi_min_thold =%d, rssi_max_thold = %d",
1430 VIF_PR_ARG
, __entry
->rssi_min_thold
, __entry
->rssi_max_thold
1435 * Tracing for internal functions
1436 * (which may also be called in response to driver calls)
1439 TRACE_EVENT(wake_queue
,
1440 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
1441 enum queue_stop_reason reason
),
1443 TP_ARGS(local
, queue
, reason
),
1448 __field(u32
, reason
)
1453 __entry
->queue
= queue
;
1454 __entry
->reason
= reason
;
1458 LOCAL_PR_FMT
" queue:%d, reason:%d",
1459 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
1463 TRACE_EVENT(stop_queue
,
1464 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
1465 enum queue_stop_reason reason
),
1467 TP_ARGS(local
, queue
, reason
),
1472 __field(u32
, reason
)
1477 __entry
->queue
= queue
;
1478 __entry
->reason
= reason
;
1482 LOCAL_PR_FMT
" queue:%d, reason:%d",
1483 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
1486 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
1488 #undef TRACE_INCLUDE_PATH
1489 #define TRACE_INCLUDE_PATH .
1490 #undef TRACE_INCLUDE_FILE
1491 #define TRACE_INCLUDE_FILE driver-trace
1492 #include <trace/define_trace.h>