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 TRACE_EVENT(drv_prepare_multicast
,
323 TP_PROTO(struct ieee80211_local
*local
, int mc_count
),
325 TP_ARGS(local
, mc_count
),
329 __field(int, mc_count
)
334 __entry
->mc_count
= mc_count
;
338 LOCAL_PR_FMT
" prepare mc (%d)",
339 LOCAL_PR_ARG
, __entry
->mc_count
343 TRACE_EVENT(drv_configure_filter
,
344 TP_PROTO(struct ieee80211_local
*local
,
345 unsigned int changed_flags
,
346 unsigned int *total_flags
,
349 TP_ARGS(local
, changed_flags
, total_flags
, multicast
),
353 __field(unsigned int, changed
)
354 __field(unsigned int, total
)
355 __field(u64
, multicast
)
360 __entry
->changed
= changed_flags
;
361 __entry
->total
= *total_flags
;
362 __entry
->multicast
= multicast
;
366 LOCAL_PR_FMT
" changed:%#x total:%#x",
367 LOCAL_PR_ARG
, __entry
->changed
, __entry
->total
371 TRACE_EVENT(drv_set_tim
,
372 TP_PROTO(struct ieee80211_local
*local
,
373 struct ieee80211_sta
*sta
, bool set
),
375 TP_ARGS(local
, sta
, set
),
390 LOCAL_PR_FMT STA_PR_FMT
" set:%d",
391 LOCAL_PR_ARG
, STA_PR_FMT
, __entry
->set
395 TRACE_EVENT(drv_set_key
,
396 TP_PROTO(struct ieee80211_local
*local
,
397 enum set_key_cmd cmd
, struct ieee80211_sub_if_data
*sdata
,
398 struct ieee80211_sta
*sta
,
399 struct ieee80211_key_conf
*key
),
401 TP_ARGS(local
, cmd
, sdata
, sta
, key
),
408 __field(u8
, hw_key_idx
)
417 __entry
->cipher
= key
->cipher
;
418 __entry
->flags
= key
->flags
;
419 __entry
->keyidx
= key
->keyidx
;
420 __entry
->hw_key_idx
= key
->hw_key_idx
;
424 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
,
425 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
429 TRACE_EVENT(drv_update_tkip_key
,
430 TP_PROTO(struct ieee80211_local
*local
,
431 struct ieee80211_sub_if_data
*sdata
,
432 struct ieee80211_key_conf
*conf
,
433 struct ieee80211_sta
*sta
, u32 iv32
),
435 TP_ARGS(local
, sdata
, conf
, sta
, iv32
),
448 __entry
->iv32
= iv32
;
452 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" iv32:%#x",
453 LOCAL_PR_ARG
,VIF_PR_ARG
,STA_PR_ARG
, __entry
->iv32
457 DEFINE_EVENT(local_sdata_evt
, drv_hw_scan
,
458 TP_PROTO(struct ieee80211_local
*local
,
459 struct ieee80211_sub_if_data
*sdata
),
460 TP_ARGS(local
, sdata
)
463 DEFINE_EVENT(local_sdata_evt
, drv_sched_scan_start
,
464 TP_PROTO(struct ieee80211_local
*local
,
465 struct ieee80211_sub_if_data
*sdata
),
466 TP_ARGS(local
, sdata
)
469 DEFINE_EVENT(local_sdata_evt
, drv_sched_scan_stop
,
470 TP_PROTO(struct ieee80211_local
*local
,
471 struct ieee80211_sub_if_data
*sdata
),
472 TP_ARGS(local
, sdata
)
475 DEFINE_EVENT(local_only_evt
, drv_sw_scan_start
,
476 TP_PROTO(struct ieee80211_local
*local
),
480 DEFINE_EVENT(local_only_evt
, drv_sw_scan_complete
,
481 TP_PROTO(struct ieee80211_local
*local
),
485 TRACE_EVENT(drv_get_stats
,
486 TP_PROTO(struct ieee80211_local
*local
,
487 struct ieee80211_low_level_stats
*stats
,
490 TP_ARGS(local
, stats
, ret
),
495 __field(unsigned int, ackfail
)
496 __field(unsigned int, rtsfail
)
497 __field(unsigned int, fcserr
)
498 __field(unsigned int, rtssucc
)
504 __entry
->ackfail
= stats
->dot11ACKFailureCount
;
505 __entry
->rtsfail
= stats
->dot11RTSFailureCount
;
506 __entry
->fcserr
= stats
->dot11FCSErrorCount
;
507 __entry
->rtssucc
= stats
->dot11RTSSuccessCount
;
511 LOCAL_PR_FMT
" ret:%d",
512 LOCAL_PR_ARG
, __entry
->ret
516 TRACE_EVENT(drv_get_tkip_seq
,
517 TP_PROTO(struct ieee80211_local
*local
,
518 u8 hw_key_idx
, u32
*iv32
, u16
*iv16
),
520 TP_ARGS(local
, hw_key_idx
, iv32
, iv16
),
524 __field(u8
, hw_key_idx
)
531 __entry
->hw_key_idx
= hw_key_idx
;
532 __entry
->iv32
= *iv32
;
533 __entry
->iv16
= *iv16
;
537 LOCAL_PR_FMT
, LOCAL_PR_ARG
541 DEFINE_EVENT(local_u32_evt
, drv_set_frag_threshold
,
542 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
543 TP_ARGS(local
, value
)
546 DEFINE_EVENT(local_u32_evt
, drv_set_rts_threshold
,
547 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
548 TP_ARGS(local
, value
)
551 TRACE_EVENT(drv_set_coverage_class
,
552 TP_PROTO(struct ieee80211_local
*local
, u8 value
),
554 TP_ARGS(local
, value
),
563 __entry
->value
= value
;
567 LOCAL_PR_FMT
" value:%d",
568 LOCAL_PR_ARG
, __entry
->value
572 TRACE_EVENT(drv_sta_notify
,
573 TP_PROTO(struct ieee80211_local
*local
,
574 struct ieee80211_sub_if_data
*sdata
,
575 enum sta_notify_cmd cmd
,
576 struct ieee80211_sta
*sta
),
578 TP_ARGS(local
, sdata
, cmd
, sta
),
595 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" cmd:%d",
596 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->cmd
600 TRACE_EVENT(drv_sta_add
,
601 TP_PROTO(struct ieee80211_local
*local
,
602 struct ieee80211_sub_if_data
*sdata
,
603 struct ieee80211_sta
*sta
),
605 TP_ARGS(local
, sdata
, sta
),
620 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
,
621 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
625 TRACE_EVENT(drv_sta_remove
,
626 TP_PROTO(struct ieee80211_local
*local
,
627 struct ieee80211_sub_if_data
*sdata
,
628 struct ieee80211_sta
*sta
),
630 TP_ARGS(local
, sdata
, sta
),
645 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
,
646 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
650 TRACE_EVENT(drv_conf_tx
,
651 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
652 const struct ieee80211_tx_queue_params
*params
),
654 TP_ARGS(local
, queue
, params
),
667 __entry
->queue
= queue
;
668 __entry
->txop
= params
->txop
;
669 __entry
->cw_max
= params
->cw_max
;
670 __entry
->cw_min
= params
->cw_min
;
671 __entry
->aifs
= params
->aifs
;
675 LOCAL_PR_FMT
" queue:%d",
676 LOCAL_PR_ARG
, __entry
->queue
680 DEFINE_EVENT(local_only_evt
, drv_get_tsf
,
681 TP_PROTO(struct ieee80211_local
*local
),
685 TRACE_EVENT(drv_set_tsf
,
686 TP_PROTO(struct ieee80211_local
*local
, u64 tsf
),
701 LOCAL_PR_FMT
" tsf:%llu",
702 LOCAL_PR_ARG
, (unsigned long long)__entry
->tsf
706 DEFINE_EVENT(local_only_evt
, drv_reset_tsf
,
707 TP_PROTO(struct ieee80211_local
*local
),
711 DEFINE_EVENT(local_only_evt
, drv_tx_last_beacon
,
712 TP_PROTO(struct ieee80211_local
*local
),
716 TRACE_EVENT(drv_ampdu_action
,
717 TP_PROTO(struct ieee80211_local
*local
,
718 struct ieee80211_sub_if_data
*sdata
,
719 enum ieee80211_ampdu_mlme_action action
,
720 struct ieee80211_sta
*sta
, u16 tid
,
721 u16
*ssn
, u8 buf_size
),
723 TP_ARGS(local
, sdata
, action
, sta
, tid
, ssn
, buf_size
),
731 __field(u8
, buf_size
)
739 __entry
->action
= action
;
741 __entry
->ssn
= ssn
? *ssn
: 0;
742 __entry
->buf_size
= buf_size
;
746 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" action:%d tid:%d buf:%d",
747 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->action
,
748 __entry
->tid
, __entry
->buf_size
752 TRACE_EVENT(drv_get_survey
,
753 TP_PROTO(struct ieee80211_local
*local
, int idx
,
754 struct survey_info
*survey
),
756 TP_ARGS(local
, idx
, survey
),
769 LOCAL_PR_FMT
" idx:%d",
770 LOCAL_PR_ARG
, __entry
->idx
774 TRACE_EVENT(drv_flush
,
775 TP_PROTO(struct ieee80211_local
*local
, bool drop
),
777 TP_ARGS(local
, drop
),
786 __entry
->drop
= drop
;
790 LOCAL_PR_FMT
" drop:%d",
791 LOCAL_PR_ARG
, __entry
->drop
795 TRACE_EVENT(drv_channel_switch
,
796 TP_PROTO(struct ieee80211_local
*local
,
797 struct ieee80211_channel_switch
*ch_switch
),
799 TP_ARGS(local
, ch_switch
),
803 __field(u64
, timestamp
)
804 __field(bool, block_tx
)
811 __entry
->timestamp
= ch_switch
->timestamp
;
812 __entry
->block_tx
= ch_switch
->block_tx
;
813 __entry
->freq
= ch_switch
->channel
->center_freq
;
814 __entry
->count
= ch_switch
->count
;
818 LOCAL_PR_FMT
" new freq:%u count:%d",
819 LOCAL_PR_ARG
, __entry
->freq
, __entry
->count
823 TRACE_EVENT(drv_set_antenna
,
824 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
826 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
837 __entry
->tx_ant
= tx_ant
;
838 __entry
->rx_ant
= rx_ant
;
843 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
844 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
848 TRACE_EVENT(drv_get_antenna
,
849 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
851 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
862 __entry
->tx_ant
= tx_ant
;
863 __entry
->rx_ant
= rx_ant
;
868 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
869 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
873 TRACE_EVENT(drv_remain_on_channel
,
874 TP_PROTO(struct ieee80211_local
*local
, struct ieee80211_channel
*chan
,
875 enum nl80211_channel_type chantype
, unsigned int duration
),
877 TP_ARGS(local
, chan
, chantype
, duration
),
881 __field(int, center_freq
)
882 __field(int, channel_type
)
883 __field(unsigned int, duration
)
888 __entry
->center_freq
= chan
->center_freq
;
889 __entry
->channel_type
= chantype
;
890 __entry
->duration
= duration
;
894 LOCAL_PR_FMT
" freq:%dMHz duration:%dms",
895 LOCAL_PR_ARG
, __entry
->center_freq
, __entry
->duration
899 DEFINE_EVENT(local_only_evt
, drv_cancel_remain_on_channel
,
900 TP_PROTO(struct ieee80211_local
*local
),
904 TRACE_EVENT(drv_offchannel_tx
,
905 TP_PROTO(struct ieee80211_local
*local
, struct sk_buff
*skb
,
906 struct ieee80211_channel
*chan
,
907 enum nl80211_channel_type channel_type
,
910 TP_ARGS(local
, skb
, chan
, channel_type
, wait
),
914 __field(int, center_freq
)
915 __field(int, channel_type
)
916 __field(unsigned int, wait
)
921 __entry
->center_freq
= chan
->center_freq
;
922 __entry
->channel_type
= channel_type
;
923 __entry
->wait
= wait
;
927 LOCAL_PR_FMT
" freq:%dMHz, wait:%dms",
928 LOCAL_PR_ARG
, __entry
->center_freq
, __entry
->wait
932 TRACE_EVENT(drv_set_ringparam
,
933 TP_PROTO(struct ieee80211_local
*local
, u32 tx
, u32 rx
),
935 TP_ARGS(local
, tx
, rx
),
950 LOCAL_PR_FMT
" tx:%d rx %d",
951 LOCAL_PR_ARG
, __entry
->tx
, __entry
->rx
955 TRACE_EVENT(drv_get_ringparam
,
956 TP_PROTO(struct ieee80211_local
*local
, u32
*tx
, u32
*tx_max
,
957 u32
*rx
, u32
*rx_max
),
959 TP_ARGS(local
, tx
, tx_max
, rx
, rx_max
),
972 __entry
->tx_max
= *tx_max
;
974 __entry
->rx_max
= *rx_max
;
978 LOCAL_PR_FMT
" tx:%d tx_max %d rx %d rx_max %d",
980 __entry
->tx
, __entry
->tx_max
, __entry
->rx
, __entry
->rx_max
984 DEFINE_EVENT(local_only_evt
, drv_tx_frames_pending
,
985 TP_PROTO(struct ieee80211_local
*local
),
989 DEFINE_EVENT(local_only_evt
, drv_offchannel_tx_cancel_wait
,
990 TP_PROTO(struct ieee80211_local
*local
),
994 TRACE_EVENT(drv_set_bitrate_mask
,
995 TP_PROTO(struct ieee80211_local
*local
,
996 struct ieee80211_sub_if_data
*sdata
,
997 const struct cfg80211_bitrate_mask
*mask
),
999 TP_ARGS(local
, sdata
, mask
),
1004 __field(u32
, legacy_2g
)
1005 __field(u32
, legacy_5g
)
1011 __entry
->legacy_2g
= mask
->control
[IEEE80211_BAND_2GHZ
].legacy
;
1012 __entry
->legacy_5g
= mask
->control
[IEEE80211_BAND_5GHZ
].legacy
;
1016 LOCAL_PR_FMT VIF_PR_FMT
" 2G Mask:0x%x 5G Mask:0x%x",
1017 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->legacy_2g
, __entry
->legacy_5g
1022 * Tracing for API calls that drivers call.
1025 TRACE_EVENT(api_start_tx_ba_session
,
1026 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
1041 STA_PR_FMT
" tid:%d",
1042 STA_PR_ARG
, __entry
->tid
1046 TRACE_EVENT(api_start_tx_ba_cb
,
1047 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
1049 TP_ARGS(sdata
, ra
, tid
),
1053 __array(u8
, ra
, ETH_ALEN
)
1059 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
1064 VIF_PR_FMT
" ra:%pM tid:%d",
1065 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
1069 TRACE_EVENT(api_stop_tx_ba_session
,
1070 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
1085 STA_PR_FMT
" tid:%d",
1086 STA_PR_ARG
, __entry
->tid
1090 TRACE_EVENT(api_stop_tx_ba_cb
,
1091 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
1093 TP_ARGS(sdata
, ra
, tid
),
1097 __array(u8
, ra
, ETH_ALEN
)
1103 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
1108 VIF_PR_FMT
" ra:%pM tid:%d",
1109 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
1113 DEFINE_EVENT(local_only_evt
, api_restart_hw
,
1114 TP_PROTO(struct ieee80211_local
*local
),
1118 TRACE_EVENT(api_beacon_loss
,
1119 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
1137 TRACE_EVENT(api_connection_loss
,
1138 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
1156 TRACE_EVENT(api_cqm_rssi_notify
,
1157 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
1158 enum nl80211_cqm_rssi_threshold_event rssi_event
),
1160 TP_ARGS(sdata
, rssi_event
),
1164 __field(u32
, rssi_event
)
1169 __entry
->rssi_event
= rssi_event
;
1173 VIF_PR_FMT
" event:%d",
1174 VIF_PR_ARG
, __entry
->rssi_event
1178 TRACE_EVENT(api_scan_completed
,
1179 TP_PROTO(struct ieee80211_local
*local
, bool aborted
),
1181 TP_ARGS(local
, aborted
),
1185 __field(bool, aborted
)
1190 __entry
->aborted
= aborted
;
1194 LOCAL_PR_FMT
" aborted:%d",
1195 LOCAL_PR_ARG
, __entry
->aborted
1199 TRACE_EVENT(api_sched_scan_results
,
1200 TP_PROTO(struct ieee80211_local
*local
),
1213 LOCAL_PR_FMT
, LOCAL_PR_ARG
1217 TRACE_EVENT(api_sched_scan_stopped
,
1218 TP_PROTO(struct ieee80211_local
*local
),
1231 LOCAL_PR_FMT
, LOCAL_PR_ARG
1235 TRACE_EVENT(api_sta_block_awake
,
1236 TP_PROTO(struct ieee80211_local
*local
,
1237 struct ieee80211_sta
*sta
, bool block
),
1239 TP_ARGS(local
, sta
, block
),
1244 __field(bool, block
)
1250 __entry
->block
= block
;
1254 LOCAL_PR_FMT STA_PR_FMT
" block:%d",
1255 LOCAL_PR_ARG
, STA_PR_FMT
, __entry
->block
1259 TRACE_EVENT(api_chswitch_done
,
1260 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, bool success
),
1262 TP_ARGS(sdata
, success
),
1266 __field(bool, success
)
1271 __entry
->success
= success
;
1275 VIF_PR_FMT
" success=%d",
1276 VIF_PR_ARG
, __entry
->success
1280 DEFINE_EVENT(local_only_evt
, api_ready_on_channel
,
1281 TP_PROTO(struct ieee80211_local
*local
),
1285 DEFINE_EVENT(local_only_evt
, api_remain_on_channel_expired
,
1286 TP_PROTO(struct ieee80211_local
*local
),
1291 * Tracing for internal functions
1292 * (which may also be called in response to driver calls)
1295 TRACE_EVENT(wake_queue
,
1296 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
1297 enum queue_stop_reason reason
),
1299 TP_ARGS(local
, queue
, reason
),
1304 __field(u32
, reason
)
1309 __entry
->queue
= queue
;
1310 __entry
->reason
= reason
;
1314 LOCAL_PR_FMT
" queue:%d, reason:%d",
1315 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
1319 TRACE_EVENT(stop_queue
,
1320 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
1321 enum queue_stop_reason reason
),
1323 TP_ARGS(local
, queue
, reason
),
1328 __field(u32
, reason
)
1333 __entry
->queue
= queue
;
1334 __entry
->reason
= reason
;
1338 LOCAL_PR_FMT
" queue:%d, reason:%d",
1339 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
1342 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
1344 #undef TRACE_INCLUDE_PATH
1345 #define TRACE_INCLUDE_PATH .
1346 #undef TRACE_INCLUDE_FILE
1347 #define TRACE_INCLUDE_FILE driver-trace
1348 #include <trace/define_trace.h>