1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Portions of this file
4 * Copyright(c) 2016-2017 Intel Deutschland GmbH
5 * Copyright (C) 2018 - 2024 Intel Corporation
8 #if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
9 #define __MAC80211_DRIVER_TRACE
11 #include <linux/tracepoint.h>
12 #include <net/mac80211.h>
13 #include "ieee80211_i.h"
16 #define TRACE_SYSTEM mac80211
19 #define LOCAL_ENTRY __array(char, wiphy_name, 32)
20 #define LOCAL_ASSIGN strscpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME)
21 #define LOCAL_PR_FMT "%s"
22 #define LOCAL_PR_ARG __entry->wiphy_name
24 #define STA_ENTRY __array(char, sta_addr, ETH_ALEN)
25 #define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : \
26 eth_zero_addr(__entry->sta_addr))
27 #define STA_NAMED_ASSIGN(s) memcpy(__entry->sta_addr, (s)->addr, ETH_ALEN)
28 #define STA_PR_FMT " sta:%pM"
29 #define STA_PR_ARG __entry->sta_addr
31 #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
33 __string(vif_name, sdata->name)
34 #define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
35 __entry->p2p = sdata->vif.p2p; \
36 __assign_str(vif_name)
37 #define VIF_PR_FMT " vif:%s(%d%s)"
38 #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
40 #define CHANDEF_ENTRY __field(u32, control_freq) \
41 __field(u32, freq_offset) \
42 __field(u32, chan_width) \
43 __field(u32, center_freq1) \
44 __field(u32, freq1_offset) \
45 __field(u32, center_freq2)
46 #define CHANDEF_ASSIGN(c) \
47 __entry->control_freq = (c) ? ((c)->chan ? (c)->chan->center_freq : 0) : 0; \
48 __entry->freq_offset = (c) ? ((c)->chan ? (c)->chan->freq_offset : 0) : 0; \
49 __entry->chan_width = (c) ? (c)->width : 0; \
50 __entry->center_freq1 = (c) ? (c)->center_freq1 : 0; \
51 __entry->freq1_offset = (c) ? (c)->freq1_offset : 0; \
52 __entry->center_freq2 = (c) ? (c)->center_freq2 : 0;
53 #define CHANDEF_PR_FMT " chandef(%d.%03d MHz,width:%d,center: %d.%03d/%d MHz)"
54 #define CHANDEF_PR_ARG __entry->control_freq, __entry->freq_offset, __entry->chan_width, \
55 __entry->center_freq1, __entry->freq1_offset, __entry->center_freq2
57 #define MIN_CHANDEF_ENTRY \
58 __field(u32, min_control_freq) \
59 __field(u32, min_freq_offset) \
60 __field(u32, min_chan_width) \
61 __field(u32, min_center_freq1) \
62 __field(u32, min_freq1_offset) \
63 __field(u32, min_center_freq2)
65 #define MIN_CHANDEF_ASSIGN(c) \
66 __entry->min_control_freq = (c)->chan ? (c)->chan->center_freq : 0; \
67 __entry->min_freq_offset = (c)->chan ? (c)->chan->freq_offset : 0; \
68 __entry->min_chan_width = (c)->width; \
69 __entry->min_center_freq1 = (c)->center_freq1; \
70 __entry->min_freq1_offset = (c)->freq1_offset; \
71 __entry->min_center_freq2 = (c)->center_freq2;
72 #define MIN_CHANDEF_PR_FMT " mindef(%d.%03d MHz,width:%d,center: %d.%03d/%d MHz)"
73 #define MIN_CHANDEF_PR_ARG __entry->min_control_freq, __entry->min_freq_offset, \
74 __entry->min_chan_width, \
75 __entry->min_center_freq1, __entry->min_freq1_offset, \
76 __entry->min_center_freq2
78 #define AP_CHANDEF_ENTRY \
79 __field(u32, ap_control_freq) \
80 __field(u32, ap_freq_offset) \
81 __field(u32, ap_chan_width) \
82 __field(u32, ap_center_freq1) \
83 __field(u32, ap_freq1_offset) \
84 __field(u32, ap_center_freq2)
86 #define AP_CHANDEF_ASSIGN(c) \
87 __entry->ap_control_freq = (c)->chan ? (c)->chan->center_freq : 0;\
88 __entry->ap_freq_offset = (c)->chan ? (c)->chan->freq_offset : 0;\
89 __entry->ap_chan_width = (c)->chan ? (c)->width : 0; \
90 __entry->ap_center_freq1 = (c)->chan ? (c)->center_freq1 : 0; \
91 __entry->ap_freq1_offset = (c)->chan ? (c)->freq1_offset : 0; \
92 __entry->ap_center_freq2 = (c)->chan ? (c)->center_freq2 : 0;
93 #define AP_CHANDEF_PR_FMT " ap(%d.%03d MHz,width:%d,center: %d.%03d/%d MHz)"
94 #define AP_CHANDEF_PR_ARG __entry->ap_control_freq, __entry->ap_freq_offset, \
95 __entry->ap_chan_width, \
96 __entry->ap_center_freq1, __entry->ap_freq1_offset, \
97 __entry->ap_center_freq2
99 #define CHANCTX_ENTRY CHANDEF_ENTRY \
102 __field(u8, rx_chains_static) \
103 __field(u8, rx_chains_dynamic)
104 #define CHANCTX_ASSIGN CHANDEF_ASSIGN(&ctx->conf.def) \
105 MIN_CHANDEF_ASSIGN(&ctx->conf.min_def) \
106 AP_CHANDEF_ASSIGN(&ctx->conf.ap) \
107 __entry->rx_chains_static = ctx->conf.rx_chains_static; \
108 __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic
109 #define CHANCTX_PR_FMT CHANDEF_PR_FMT MIN_CHANDEF_PR_FMT AP_CHANDEF_PR_FMT " chains:%d/%d"
110 #define CHANCTX_PR_ARG CHANDEF_PR_ARG, MIN_CHANDEF_PR_ARG, AP_CHANDEF_PR_ARG, \
111 __entry->rx_chains_static, __entry->rx_chains_dynamic
113 #define KEY_ENTRY __field(u32, cipher) \
114 __field(u8, hw_key_idx) \
117 #define KEY_ASSIGN(k) __entry->cipher = (k)->cipher; \
118 __entry->flags = (k)->flags; \
119 __entry->keyidx = (k)->keyidx; \
120 __entry->hw_key_idx = (k)->hw_key_idx;
121 #define KEY_PR_FMT " cipher:0x%x, flags=%#x, keyidx=%d, hw_key_idx=%d"
122 #define KEY_PR_ARG __entry->cipher, __entry->flags, __entry->keyidx, __entry->hw_key_idx
124 #define AMPDU_ACTION_ENTRY __field(enum ieee80211_ampdu_mlme_action, \
125 ieee80211_ampdu_mlme_action) \
129 __field(u16, buf_size) \
130 __field(bool, amsdu) \
131 __field(u16, timeout) \
133 #define AMPDU_ACTION_ASSIGN STA_NAMED_ASSIGN(params->sta); \
134 __entry->tid = params->tid; \
135 __entry->ssn = params->ssn; \
136 __entry->buf_size = params->buf_size; \
137 __entry->amsdu = params->amsdu; \
138 __entry->timeout = params->timeout; \
139 __entry->action = params->action;
140 #define AMPDU_ACTION_PR_FMT STA_PR_FMT " tid %d, ssn %d, buf_size %u, amsdu %d, timeout %d action %d"
141 #define AMPDU_ACTION_PR_ARG STA_PR_ARG, __entry->tid, __entry->ssn, \
142 __entry->buf_size, __entry->amsdu, __entry->timeout, \
146 * Tracing for driver callbacks.
149 DECLARE_EVENT_CLASS(local_only_evt
,
150 TP_PROTO(struct ieee80211_local
*local
),
158 TP_printk(LOCAL_PR_FMT
, LOCAL_PR_ARG
)
161 DECLARE_EVENT_CLASS(local_sdata_addr_evt
,
162 TP_PROTO(struct ieee80211_local
*local
,
163 struct ieee80211_sub_if_data
*sdata
),
164 TP_ARGS(local
, sdata
),
169 __array(char, addr
, ETH_ALEN
)
175 memcpy(__entry
->addr
, sdata
->vif
.addr
, ETH_ALEN
);
179 LOCAL_PR_FMT VIF_PR_FMT
" addr:%pM",
180 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->addr
184 DECLARE_EVENT_CLASS(local_u32_evt
,
185 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
186 TP_ARGS(local
, value
),
195 __entry
->value
= value
;
199 LOCAL_PR_FMT
" value:%d",
200 LOCAL_PR_ARG
, __entry
->value
204 DECLARE_EVENT_CLASS(local_sdata_evt
,
205 TP_PROTO(struct ieee80211_local
*local
,
206 struct ieee80211_sub_if_data
*sdata
),
207 TP_ARGS(local
, sdata
),
220 LOCAL_PR_FMT VIF_PR_FMT
,
221 LOCAL_PR_ARG
, VIF_PR_ARG
225 DEFINE_EVENT(local_only_evt
, drv_return_void
,
226 TP_PROTO(struct ieee80211_local
*local
),
230 TRACE_EVENT(drv_return_int
,
231 TP_PROTO(struct ieee80211_local
*local
, int ret
),
241 TP_printk(LOCAL_PR_FMT
" - %d", LOCAL_PR_ARG
, __entry
->ret
)
244 TRACE_EVENT(drv_return_bool
,
245 TP_PROTO(struct ieee80211_local
*local
, bool ret
),
255 TP_printk(LOCAL_PR_FMT
" - %s", LOCAL_PR_ARG
, (__entry
->ret
) ?
259 TRACE_EVENT(drv_return_u32
,
260 TP_PROTO(struct ieee80211_local
*local
, u32 ret
),
270 TP_printk(LOCAL_PR_FMT
" - %u", LOCAL_PR_ARG
, __entry
->ret
)
273 TRACE_EVENT(drv_return_u64
,
274 TP_PROTO(struct ieee80211_local
*local
, u64 ret
),
284 TP_printk(LOCAL_PR_FMT
" - %llu", LOCAL_PR_ARG
, __entry
->ret
)
287 DEFINE_EVENT(local_only_evt
, drv_start
,
288 TP_PROTO(struct ieee80211_local
*local
),
292 DEFINE_EVENT(local_u32_evt
, drv_get_et_strings
,
293 TP_PROTO(struct ieee80211_local
*local
, u32 sset
),
297 DEFINE_EVENT(local_u32_evt
, drv_get_et_sset_count
,
298 TP_PROTO(struct ieee80211_local
*local
, u32 sset
),
302 DEFINE_EVENT(local_only_evt
, drv_get_et_stats
,
303 TP_PROTO(struct ieee80211_local
*local
),
307 DEFINE_EVENT(local_only_evt
, drv_suspend
,
308 TP_PROTO(struct ieee80211_local
*local
),
312 DEFINE_EVENT(local_only_evt
, drv_resume
,
313 TP_PROTO(struct ieee80211_local
*local
),
317 TRACE_EVENT(drv_set_wakeup
,
318 TP_PROTO(struct ieee80211_local
*local
, bool enabled
),
319 TP_ARGS(local
, enabled
),
322 __field(bool, enabled
)
326 __entry
->enabled
= enabled
;
328 TP_printk(LOCAL_PR_FMT
" enabled:%d", LOCAL_PR_ARG
, __entry
->enabled
)
331 TRACE_EVENT(drv_stop
,
332 TP_PROTO(struct ieee80211_local
*local
, bool suspend
),
333 TP_ARGS(local
, suspend
),
336 __field(bool, suspend
)
340 __entry
->suspend
= suspend
;
342 TP_printk(LOCAL_PR_FMT
" suspend:%d", LOCAL_PR_ARG
, __entry
->suspend
)
345 DEFINE_EVENT(local_sdata_addr_evt
, drv_add_interface
,
346 TP_PROTO(struct ieee80211_local
*local
,
347 struct ieee80211_sub_if_data
*sdata
),
348 TP_ARGS(local
, sdata
)
351 TRACE_EVENT(drv_change_interface
,
352 TP_PROTO(struct ieee80211_local
*local
,
353 struct ieee80211_sub_if_data
*sdata
,
354 enum nl80211_iftype type
, bool p2p
),
356 TP_ARGS(local
, sdata
, type
, p2p
),
361 __field(u32
, new_type
)
362 __field(bool, new_p2p
)
368 __entry
->new_type
= type
;
369 __entry
->new_p2p
= p2p
;
373 LOCAL_PR_FMT VIF_PR_FMT
" new type:%d%s",
374 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->new_type
,
375 __entry
->new_p2p
? "/p2p" : ""
379 DEFINE_EVENT(local_sdata_addr_evt
, drv_remove_interface
,
380 TP_PROTO(struct ieee80211_local
*local
,
381 struct ieee80211_sub_if_data
*sdata
),
382 TP_ARGS(local
, sdata
)
385 TRACE_EVENT(drv_config
,
386 TP_PROTO(struct ieee80211_local
*local
,
389 TP_ARGS(local
, changed
),
393 __field(u32
, changed
)
395 __field(int, power_level
)
396 __field(int, dynamic_ps_timeout
)
397 __field(u16
, listen_interval
)
398 __field(u8
, long_frame_max_tx_count
)
399 __field(u8
, short_frame_max_tx_count
)
406 __entry
->changed
= changed
;
407 __entry
->flags
= local
->hw
.conf
.flags
;
408 __entry
->power_level
= local
->hw
.conf
.power_level
;
409 __entry
->dynamic_ps_timeout
= local
->hw
.conf
.dynamic_ps_timeout
;
410 __entry
->listen_interval
= local
->hw
.conf
.listen_interval
;
411 __entry
->long_frame_max_tx_count
=
412 local
->hw
.conf
.long_frame_max_tx_count
;
413 __entry
->short_frame_max_tx_count
=
414 local
->hw
.conf
.short_frame_max_tx_count
;
415 CHANDEF_ASSIGN(&local
->hw
.conf
.chandef
)
416 __entry
->smps
= local
->hw
.conf
.smps_mode
;
420 LOCAL_PR_FMT
" ch:%#x" CHANDEF_PR_FMT
,
421 LOCAL_PR_ARG
, __entry
->changed
, CHANDEF_PR_ARG
425 TRACE_EVENT(drv_vif_cfg_changed
,
426 TP_PROTO(struct ieee80211_local
*local
,
427 struct ieee80211_sub_if_data
*sdata
,
430 TP_ARGS(local
, sdata
, changed
),
435 __field(u64
, changed
)
437 __field(bool, ibss_joined
)
438 __field(bool, ibss_creator
)
440 __dynamic_array(u32
, arp_addr_list
,
441 sdata
->vif
.cfg
.arp_addr_cnt
> IEEE80211_BSS_ARP_ADDR_LIST_LEN
?
442 IEEE80211_BSS_ARP_ADDR_LIST_LEN
:
443 sdata
->vif
.cfg
.arp_addr_cnt
)
444 __field(int, arp_addr_cnt
)
445 __dynamic_array(u8
, ssid
, sdata
->vif
.cfg
.ssid_len
)
454 __entry
->changed
= changed
;
455 __entry
->aid
= sdata
->vif
.cfg
.aid
;
456 __entry
->assoc
= sdata
->vif
.cfg
.assoc
;
457 __entry
->ibss_joined
= sdata
->vif
.cfg
.ibss_joined
;
458 __entry
->ibss_creator
= sdata
->vif
.cfg
.ibss_creator
;
459 __entry
->ps
= sdata
->vif
.cfg
.ps
;
461 __entry
->arp_addr_cnt
= sdata
->vif
.cfg
.arp_addr_cnt
;
462 memcpy(__get_dynamic_array(arp_addr_list
),
463 sdata
->vif
.cfg
.arp_addr_list
,
464 sizeof(u32
) * (sdata
->vif
.cfg
.arp_addr_cnt
> IEEE80211_BSS_ARP_ADDR_LIST_LEN
?
465 IEEE80211_BSS_ARP_ADDR_LIST_LEN
:
466 sdata
->vif
.cfg
.arp_addr_cnt
));
467 memcpy(__get_dynamic_array(ssid
),
469 sdata
->vif
.cfg
.ssid_len
);
470 __entry
->s1g
= sdata
->vif
.cfg
.s1g
;
471 __entry
->idle
= sdata
->vif
.cfg
.idle
;
475 LOCAL_PR_FMT VIF_PR_FMT
" changed:%#llx",
476 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->changed
480 TRACE_EVENT(drv_link_info_changed
,
481 TP_PROTO(struct ieee80211_local
*local
,
482 struct ieee80211_sub_if_data
*sdata
,
483 struct ieee80211_bss_conf
*link_conf
,
486 TP_ARGS(local
, sdata
, link_conf
, changed
),
491 __field(u64
, changed
)
492 __field(int, link_id
)
494 __field(bool, shortpre
)
495 __field(bool, shortslot
)
496 __field(bool, enable_beacon
)
499 __field(u16
, assoc_cap
)
500 __field(u64
, sync_tsf
)
501 __field(u32
, sync_device_ts
)
502 __field(u8
, sync_dtim_count
)
503 __field(u32
, basic_rates
)
504 __array(int, mcast_rate
, NUM_NL80211_BANDS
)
505 __field(u16
, ht_operation_mode
)
506 __field(s32
, cqm_rssi_thold
)
507 __field(s32
, cqm_rssi_hyst
)
508 __field(u32
, channel_width
)
509 __field(u32
, channel_cfreq1
)
510 __field(u32
, channel_cfreq1_offset
)
512 __field(bool, hidden_ssid
)
513 __field(int, txpower
)
514 __field(u8
, p2p_oppps_ctwindow
)
520 __entry
->changed
= changed
;
521 __entry
->link_id
= link_conf
->link_id
;
522 __entry
->shortpre
= link_conf
->use_short_preamble
;
523 __entry
->cts
= link_conf
->use_cts_prot
;
524 __entry
->shortslot
= link_conf
->use_short_slot
;
525 __entry
->enable_beacon
= link_conf
->enable_beacon
;
526 __entry
->dtimper
= link_conf
->dtim_period
;
527 __entry
->bcnint
= link_conf
->beacon_int
;
528 __entry
->assoc_cap
= link_conf
->assoc_capability
;
529 __entry
->sync_tsf
= link_conf
->sync_tsf
;
530 __entry
->sync_device_ts
= link_conf
->sync_device_ts
;
531 __entry
->sync_dtim_count
= link_conf
->sync_dtim_count
;
532 __entry
->basic_rates
= link_conf
->basic_rates
;
533 memcpy(__entry
->mcast_rate
, link_conf
->mcast_rate
,
534 sizeof(__entry
->mcast_rate
));
535 __entry
->ht_operation_mode
= link_conf
->ht_operation_mode
;
536 __entry
->cqm_rssi_thold
= link_conf
->cqm_rssi_thold
;
537 __entry
->cqm_rssi_hyst
= link_conf
->cqm_rssi_hyst
;
538 __entry
->channel_width
= link_conf
->chanreq
.oper
.width
;
539 __entry
->channel_cfreq1
= link_conf
->chanreq
.oper
.center_freq1
;
540 __entry
->channel_cfreq1_offset
= link_conf
->chanreq
.oper
.freq1_offset
;
541 __entry
->qos
= link_conf
->qos
;
542 __entry
->hidden_ssid
= link_conf
->hidden_ssid
;
543 __entry
->txpower
= link_conf
->txpower
;
544 __entry
->p2p_oppps_ctwindow
= link_conf
->p2p_noa_attr
.oppps_ctwindow
;
548 LOCAL_PR_FMT VIF_PR_FMT
" link_id:%d, changed:%#llx",
549 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->link_id
,
554 TRACE_EVENT(drv_prepare_multicast
,
555 TP_PROTO(struct ieee80211_local
*local
, int mc_count
),
557 TP_ARGS(local
, mc_count
),
561 __field(int, mc_count
)
566 __entry
->mc_count
= mc_count
;
570 LOCAL_PR_FMT
" prepare mc (%d)",
571 LOCAL_PR_ARG
, __entry
->mc_count
575 TRACE_EVENT(drv_configure_filter
,
576 TP_PROTO(struct ieee80211_local
*local
,
577 unsigned int changed_flags
,
578 unsigned int *total_flags
,
581 TP_ARGS(local
, changed_flags
, total_flags
, multicast
),
585 __field(unsigned int, changed
)
586 __field(unsigned int, total
)
587 __field(u64
, multicast
)
592 __entry
->changed
= changed_flags
;
593 __entry
->total
= *total_flags
;
594 __entry
->multicast
= multicast
;
598 LOCAL_PR_FMT
" changed:%#x total:%#x",
599 LOCAL_PR_ARG
, __entry
->changed
, __entry
->total
603 TRACE_EVENT(drv_config_iface_filter
,
604 TP_PROTO(struct ieee80211_local
*local
,
605 struct ieee80211_sub_if_data
*sdata
,
606 unsigned int filter_flags
,
607 unsigned int changed_flags
),
609 TP_ARGS(local
, sdata
, filter_flags
, changed_flags
),
614 __field(unsigned int, filter_flags
)
615 __field(unsigned int, changed_flags
)
621 __entry
->filter_flags
= filter_flags
;
622 __entry
->changed_flags
= changed_flags
;
626 LOCAL_PR_FMT VIF_PR_FMT
627 " filter_flags: %#x changed_flags: %#x",
628 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->filter_flags
,
629 __entry
->changed_flags
633 TRACE_EVENT(drv_set_tim
,
634 TP_PROTO(struct ieee80211_local
*local
,
635 struct ieee80211_sta
*sta
, bool set
),
637 TP_ARGS(local
, sta
, set
),
652 LOCAL_PR_FMT STA_PR_FMT
" set:%d",
653 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->set
657 TRACE_EVENT(drv_set_key
,
658 TP_PROTO(struct ieee80211_local
*local
,
659 enum set_key_cmd cmd
, struct ieee80211_sub_if_data
*sdata
,
660 struct ieee80211_sta
*sta
,
661 struct ieee80211_key_conf
*key
),
663 TP_ARGS(local
, cmd
, sdata
, sta
, key
),
682 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" cmd: %d" KEY_PR_FMT
,
683 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->cmd
, KEY_PR_ARG
687 TRACE_EVENT(drv_update_tkip_key
,
688 TP_PROTO(struct ieee80211_local
*local
,
689 struct ieee80211_sub_if_data
*sdata
,
690 struct ieee80211_key_conf
*conf
,
691 struct ieee80211_sta
*sta
, u32 iv32
),
693 TP_ARGS(local
, sdata
, conf
, sta
, iv32
),
706 __entry
->iv32
= iv32
;
710 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" iv32:%#x",
711 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->iv32
715 DEFINE_EVENT(local_sdata_evt
, drv_hw_scan
,
716 TP_PROTO(struct ieee80211_local
*local
,
717 struct ieee80211_sub_if_data
*sdata
),
718 TP_ARGS(local
, sdata
)
721 DEFINE_EVENT(local_sdata_evt
, drv_cancel_hw_scan
,
722 TP_PROTO(struct ieee80211_local
*local
,
723 struct ieee80211_sub_if_data
*sdata
),
724 TP_ARGS(local
, sdata
)
727 DEFINE_EVENT(local_sdata_evt
, drv_sched_scan_start
,
728 TP_PROTO(struct ieee80211_local
*local
,
729 struct ieee80211_sub_if_data
*sdata
),
730 TP_ARGS(local
, sdata
)
733 DEFINE_EVENT(local_sdata_evt
, drv_sched_scan_stop
,
734 TP_PROTO(struct ieee80211_local
*local
,
735 struct ieee80211_sub_if_data
*sdata
),
736 TP_ARGS(local
, sdata
)
739 TRACE_EVENT(drv_sw_scan_start
,
740 TP_PROTO(struct ieee80211_local
*local
,
741 struct ieee80211_sub_if_data
*sdata
,
744 TP_ARGS(local
, sdata
, mac_addr
),
749 __array(char, mac_addr
, ETH_ALEN
)
755 memcpy(__entry
->mac_addr
, mac_addr
, ETH_ALEN
);
758 TP_printk(LOCAL_PR_FMT
", " VIF_PR_FMT
", addr:%pM",
759 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->mac_addr
)
762 DEFINE_EVENT(local_sdata_evt
, drv_sw_scan_complete
,
763 TP_PROTO(struct ieee80211_local
*local
,
764 struct ieee80211_sub_if_data
*sdata
),
765 TP_ARGS(local
, sdata
)
768 TRACE_EVENT(drv_get_stats
,
769 TP_PROTO(struct ieee80211_local
*local
,
770 struct ieee80211_low_level_stats
*stats
,
773 TP_ARGS(local
, stats
, ret
),
778 __field(unsigned int, ackfail
)
779 __field(unsigned int, rtsfail
)
780 __field(unsigned int, fcserr
)
781 __field(unsigned int, rtssucc
)
787 __entry
->ackfail
= stats
->dot11ACKFailureCount
;
788 __entry
->rtsfail
= stats
->dot11RTSFailureCount
;
789 __entry
->fcserr
= stats
->dot11FCSErrorCount
;
790 __entry
->rtssucc
= stats
->dot11RTSSuccessCount
;
794 LOCAL_PR_FMT
" ret:%d",
795 LOCAL_PR_ARG
, __entry
->ret
799 TRACE_EVENT(drv_get_key_seq
,
800 TP_PROTO(struct ieee80211_local
*local
,
801 struct ieee80211_key_conf
*key
),
816 LOCAL_PR_FMT KEY_PR_FMT
,
817 LOCAL_PR_ARG
, KEY_PR_ARG
821 DEFINE_EVENT(local_u32_evt
, drv_set_frag_threshold
,
822 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
823 TP_ARGS(local
, value
)
826 DEFINE_EVENT(local_u32_evt
, drv_set_rts_threshold
,
827 TP_PROTO(struct ieee80211_local
*local
, u32 value
),
828 TP_ARGS(local
, value
)
831 TRACE_EVENT(drv_set_coverage_class
,
832 TP_PROTO(struct ieee80211_local
*local
, s16 value
),
834 TP_ARGS(local
, value
),
843 __entry
->value
= value
;
847 LOCAL_PR_FMT
" value:%d",
848 LOCAL_PR_ARG
, __entry
->value
852 TRACE_EVENT(drv_sta_notify
,
853 TP_PROTO(struct ieee80211_local
*local
,
854 struct ieee80211_sub_if_data
*sdata
,
855 enum sta_notify_cmd cmd
,
856 struct ieee80211_sta
*sta
),
858 TP_ARGS(local
, sdata
, cmd
, sta
),
875 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" cmd:%d",
876 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->cmd
880 TRACE_EVENT(drv_sta_state
,
881 TP_PROTO(struct ieee80211_local
*local
,
882 struct ieee80211_sub_if_data
*sdata
,
883 struct ieee80211_sta
*sta
,
884 enum ieee80211_sta_state old_state
,
885 enum ieee80211_sta_state new_state
),
887 TP_ARGS(local
, sdata
, sta
, old_state
, new_state
),
893 __field(u32
, old_state
)
894 __field(u32
, new_state
)
901 __entry
->old_state
= old_state
;
902 __entry
->new_state
= new_state
;
906 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" state: %d->%d",
907 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
,
908 __entry
->old_state
, __entry
->new_state
912 TRACE_EVENT(drv_sta_set_txpwr
,
913 TP_PROTO(struct ieee80211_local
*local
,
914 struct ieee80211_sub_if_data
*sdata
,
915 struct ieee80211_sta
*sta
),
917 TP_ARGS(local
, sdata
, sta
),
931 __entry
->txpwr
= sta
->deflink
.txpwr
.power
;
932 __entry
->type
= sta
->deflink
.txpwr
.type
;
936 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" txpwr: %d type %d",
937 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
,
938 __entry
->txpwr
, __entry
->type
942 TRACE_EVENT(drv_link_sta_rc_update
,
943 TP_PROTO(struct ieee80211_local
*local
,
944 struct ieee80211_sub_if_data
*sdata
,
945 struct ieee80211_link_sta
*link_sta
,
948 TP_ARGS(local
, sdata
, link_sta
, changed
),
954 __field(u32
, changed
)
955 __field(u32
, link_id
)
961 STA_NAMED_ASSIGN(link_sta
->sta
);
962 __entry
->changed
= changed
;
963 __entry
->link_id
= link_sta
->link_id
;
967 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" (link %d) changed: 0x%x",
968 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->link_id
,
973 DECLARE_EVENT_CLASS(sta_event
,
974 TP_PROTO(struct ieee80211_local
*local
,
975 struct ieee80211_sub_if_data
*sdata
,
976 struct ieee80211_sta
*sta
),
978 TP_ARGS(local
, sdata
, sta
),
993 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
,
994 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
998 DEFINE_EVENT(sta_event
, drv_sta_statistics
,
999 TP_PROTO(struct ieee80211_local
*local
,
1000 struct ieee80211_sub_if_data
*sdata
,
1001 struct ieee80211_sta
*sta
),
1002 TP_ARGS(local
, sdata
, sta
)
1005 DEFINE_EVENT(sta_event
, drv_sta_add
,
1006 TP_PROTO(struct ieee80211_local
*local
,
1007 struct ieee80211_sub_if_data
*sdata
,
1008 struct ieee80211_sta
*sta
),
1009 TP_ARGS(local
, sdata
, sta
)
1012 DEFINE_EVENT(sta_event
, drv_sta_remove
,
1013 TP_PROTO(struct ieee80211_local
*local
,
1014 struct ieee80211_sub_if_data
*sdata
,
1015 struct ieee80211_sta
*sta
),
1016 TP_ARGS(local
, sdata
, sta
)
1019 DEFINE_EVENT(sta_event
, drv_sta_pre_rcu_remove
,
1020 TP_PROTO(struct ieee80211_local
*local
,
1021 struct ieee80211_sub_if_data
*sdata
,
1022 struct ieee80211_sta
*sta
),
1023 TP_ARGS(local
, sdata
, sta
)
1026 DEFINE_EVENT(sta_event
, drv_sync_rx_queues
,
1027 TP_PROTO(struct ieee80211_local
*local
,
1028 struct ieee80211_sub_if_data
*sdata
,
1029 struct ieee80211_sta
*sta
),
1030 TP_ARGS(local
, sdata
, sta
)
1033 DEFINE_EVENT(sta_event
, drv_sta_rate_tbl_update
,
1034 TP_PROTO(struct ieee80211_local
*local
,
1035 struct ieee80211_sub_if_data
*sdata
,
1036 struct ieee80211_sta
*sta
),
1037 TP_ARGS(local
, sdata
, sta
)
1040 TRACE_EVENT(drv_conf_tx
,
1041 TP_PROTO(struct ieee80211_local
*local
,
1042 struct ieee80211_sub_if_data
*sdata
,
1043 unsigned int link_id
,
1044 u16 ac
, const struct ieee80211_tx_queue_params
*params
),
1046 TP_ARGS(local
, sdata
, link_id
, ac
, params
),
1051 __field(unsigned int, link_id
)
1054 __field(u16
, cw_min
)
1055 __field(u16
, cw_max
)
1057 __field(bool, uapsd
)
1063 __entry
->link_id
= link_id
;
1065 __entry
->txop
= params
->txop
;
1066 __entry
->cw_max
= params
->cw_max
;
1067 __entry
->cw_min
= params
->cw_min
;
1068 __entry
->aifs
= params
->aifs
;
1069 __entry
->uapsd
= params
->uapsd
;
1073 LOCAL_PR_FMT VIF_PR_FMT
" link_id: %d, AC:%d",
1074 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->link_id
, __entry
->ac
1078 DEFINE_EVENT(local_sdata_evt
, drv_get_tsf
,
1079 TP_PROTO(struct ieee80211_local
*local
,
1080 struct ieee80211_sub_if_data
*sdata
),
1081 TP_ARGS(local
, sdata
)
1084 TRACE_EVENT(drv_set_tsf
,
1085 TP_PROTO(struct ieee80211_local
*local
,
1086 struct ieee80211_sub_if_data
*sdata
,
1089 TP_ARGS(local
, sdata
, tsf
),
1104 LOCAL_PR_FMT VIF_PR_FMT
" tsf:%llu",
1105 LOCAL_PR_ARG
, VIF_PR_ARG
, (unsigned long long)__entry
->tsf
1109 TRACE_EVENT(drv_offset_tsf
,
1110 TP_PROTO(struct ieee80211_local
*local
,
1111 struct ieee80211_sub_if_data
*sdata
,
1114 TP_ARGS(local
, sdata
, offset
),
1119 __field(s64
, tsf_offset
)
1125 __entry
->tsf_offset
= offset
;
1129 LOCAL_PR_FMT VIF_PR_FMT
" tsf offset:%lld",
1130 LOCAL_PR_ARG
, VIF_PR_ARG
,
1131 (unsigned long long)__entry
->tsf_offset
1135 DEFINE_EVENT(local_sdata_evt
, drv_reset_tsf
,
1136 TP_PROTO(struct ieee80211_local
*local
,
1137 struct ieee80211_sub_if_data
*sdata
),
1138 TP_ARGS(local
, sdata
)
1141 DEFINE_EVENT(local_only_evt
, drv_tx_last_beacon
,
1142 TP_PROTO(struct ieee80211_local
*local
),
1146 TRACE_EVENT(drv_ampdu_action
,
1147 TP_PROTO(struct ieee80211_local
*local
,
1148 struct ieee80211_sub_if_data
*sdata
,
1149 struct ieee80211_ampdu_params
*params
),
1151 TP_ARGS(local
, sdata
, params
),
1162 AMPDU_ACTION_ASSIGN
;
1166 LOCAL_PR_FMT VIF_PR_FMT AMPDU_ACTION_PR_FMT
,
1167 LOCAL_PR_ARG
, VIF_PR_ARG
, AMPDU_ACTION_PR_ARG
1171 TRACE_EVENT(drv_get_survey
,
1172 TP_PROTO(struct ieee80211_local
*local
, int _idx
,
1173 struct survey_info
*survey
),
1175 TP_ARGS(local
, _idx
, survey
),
1184 __entry
->idx
= _idx
;
1188 LOCAL_PR_FMT
" idx:%d",
1189 LOCAL_PR_ARG
, __entry
->idx
1193 TRACE_EVENT(drv_flush
,
1194 TP_PROTO(struct ieee80211_local
*local
,
1195 u32 queues
, bool drop
),
1197 TP_ARGS(local
, queues
, drop
),
1202 __field(u32
, queues
)
1207 __entry
->drop
= drop
;
1208 __entry
->queues
= queues
;
1212 LOCAL_PR_FMT
" queues:0x%x drop:%d",
1213 LOCAL_PR_ARG
, __entry
->queues
, __entry
->drop
1217 DEFINE_EVENT(sta_event
, drv_flush_sta
,
1218 TP_PROTO(struct ieee80211_local
*local
,
1219 struct ieee80211_sub_if_data
*sdata
,
1220 struct ieee80211_sta
*sta
),
1221 TP_ARGS(local
, sdata
, sta
)
1224 DECLARE_EVENT_CLASS(chanswitch_evt
,
1225 TP_PROTO(struct ieee80211_local
*local
,
1226 struct ieee80211_sub_if_data
*sdata
,
1227 struct ieee80211_channel_switch
*ch_switch
),
1229 TP_ARGS(local
, sdata
, ch_switch
),
1235 __field(u64
, timestamp
)
1236 __field(u32
, device_timestamp
)
1237 __field(bool, block_tx
)
1239 __field(u8
, link_id
)
1245 CHANDEF_ASSIGN(&ch_switch
->chandef
)
1246 __entry
->timestamp
= ch_switch
->timestamp
;
1247 __entry
->device_timestamp
= ch_switch
->device_timestamp
;
1248 __entry
->block_tx
= ch_switch
->block_tx
;
1249 __entry
->count
= ch_switch
->count
;
1250 __entry
->link_id
= ch_switch
->link_id
;
1254 LOCAL_PR_FMT VIF_PR_FMT CHANDEF_PR_FMT
" count:%d block_tx:%d timestamp:%llu device_ts:%u link_id:%d",
1255 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANDEF_PR_ARG
, __entry
->count
,
1256 __entry
->block_tx
, __entry
->timestamp
,
1257 __entry
->device_timestamp
, __entry
->link_id
1261 DEFINE_EVENT(chanswitch_evt
, drv_channel_switch
,
1262 TP_PROTO(struct ieee80211_local
*local
,
1263 struct ieee80211_sub_if_data
*sdata
,
1264 struct ieee80211_channel_switch
*ch_switch
),
1265 TP_ARGS(local
, sdata
, ch_switch
)
1268 TRACE_EVENT(drv_set_antenna
,
1269 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
1271 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
1275 __field(u32
, tx_ant
)
1276 __field(u32
, rx_ant
)
1282 __entry
->tx_ant
= tx_ant
;
1283 __entry
->rx_ant
= rx_ant
;
1288 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
1289 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
1293 TRACE_EVENT(drv_get_antenna
,
1294 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
1296 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
1300 __field(u32
, tx_ant
)
1301 __field(u32
, rx_ant
)
1307 __entry
->tx_ant
= tx_ant
;
1308 __entry
->rx_ant
= rx_ant
;
1313 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
1314 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
1318 TRACE_EVENT(drv_remain_on_channel
,
1319 TP_PROTO(struct ieee80211_local
*local
,
1320 struct ieee80211_sub_if_data
*sdata
,
1321 struct ieee80211_channel
*chan
,
1322 unsigned int duration
,
1323 enum ieee80211_roc_type type
),
1325 TP_ARGS(local
, sdata
, chan
, duration
, type
),
1330 __field(int, center_freq
)
1331 __field(int, freq_offset
)
1332 __field(unsigned int, duration
)
1339 __entry
->center_freq
= chan
->center_freq
;
1340 __entry
->freq_offset
= chan
->freq_offset
;
1341 __entry
->duration
= duration
;
1342 __entry
->type
= type
;
1346 LOCAL_PR_FMT VIF_PR_FMT
" freq:%d.%03dMHz duration:%dms type=%d",
1347 LOCAL_PR_ARG
, VIF_PR_ARG
,
1348 __entry
->center_freq
, __entry
->freq_offset
,
1349 __entry
->duration
, __entry
->type
1353 DEFINE_EVENT(local_sdata_evt
, drv_cancel_remain_on_channel
,
1354 TP_PROTO(struct ieee80211_local
*local
,
1355 struct ieee80211_sub_if_data
*sdata
),
1356 TP_ARGS(local
, sdata
)
1359 TRACE_EVENT(drv_set_ringparam
,
1360 TP_PROTO(struct ieee80211_local
*local
, u32 tx
, u32 rx
),
1362 TP_ARGS(local
, tx
, rx
),
1377 LOCAL_PR_FMT
" tx:%d rx %d",
1378 LOCAL_PR_ARG
, __entry
->tx
, __entry
->rx
1382 TRACE_EVENT(drv_get_ringparam
,
1383 TP_PROTO(struct ieee80211_local
*local
, u32
*tx
, u32
*tx_max
,
1384 u32
*rx
, u32
*rx_max
),
1386 TP_ARGS(local
, tx
, tx_max
, rx
, rx_max
),
1391 __field(u32
, tx_max
)
1393 __field(u32
, rx_max
)
1399 __entry
->tx_max
= *tx_max
;
1401 __entry
->rx_max
= *rx_max
;
1405 LOCAL_PR_FMT
" tx:%d tx_max %d rx %d rx_max %d",
1407 __entry
->tx
, __entry
->tx_max
, __entry
->rx
, __entry
->rx_max
1411 DEFINE_EVENT(local_only_evt
, drv_tx_frames_pending
,
1412 TP_PROTO(struct ieee80211_local
*local
),
1416 DEFINE_EVENT(local_only_evt
, drv_offchannel_tx_cancel_wait
,
1417 TP_PROTO(struct ieee80211_local
*local
),
1421 TRACE_EVENT(drv_set_bitrate_mask
,
1422 TP_PROTO(struct ieee80211_local
*local
,
1423 struct ieee80211_sub_if_data
*sdata
,
1424 const struct cfg80211_bitrate_mask
*mask
),
1426 TP_ARGS(local
, sdata
, mask
),
1431 __field(u32
, legacy_2g
)
1432 __field(u32
, legacy_5g
)
1438 __entry
->legacy_2g
= mask
->control
[NL80211_BAND_2GHZ
].legacy
;
1439 __entry
->legacy_5g
= mask
->control
[NL80211_BAND_5GHZ
].legacy
;
1443 LOCAL_PR_FMT VIF_PR_FMT
" 2G Mask:0x%x 5G Mask:0x%x",
1444 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->legacy_2g
, __entry
->legacy_5g
1448 TRACE_EVENT(drv_set_rekey_data
,
1449 TP_PROTO(struct ieee80211_local
*local
,
1450 struct ieee80211_sub_if_data
*sdata
,
1451 struct cfg80211_gtk_rekey_data
*data
),
1453 TP_ARGS(local
, sdata
, data
),
1458 __array(u8
, kek
, NL80211_KEK_LEN
)
1459 __array(u8
, kck
, NL80211_KCK_LEN
)
1460 __array(u8
, replay_ctr
, NL80211_REPLAY_CTR_LEN
)
1466 memcpy(__entry
->kek
, data
->kek
, NL80211_KEK_LEN
);
1467 memcpy(__entry
->kck
, data
->kck
, NL80211_KCK_LEN
);
1468 memcpy(__entry
->replay_ctr
, data
->replay_ctr
,
1469 NL80211_REPLAY_CTR_LEN
);
1472 TP_printk(LOCAL_PR_FMT VIF_PR_FMT
,
1473 LOCAL_PR_ARG
, VIF_PR_ARG
)
1476 TRACE_EVENT(drv_event_callback
,
1477 TP_PROTO(struct ieee80211_local
*local
,
1478 struct ieee80211_sub_if_data
*sdata
,
1479 const struct ieee80211_event
*_event
),
1481 TP_ARGS(local
, sdata
, _event
),
1492 __entry
->type
= _event
->type
;
1496 LOCAL_PR_FMT VIF_PR_FMT
" event:%d",
1497 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->type
1501 DECLARE_EVENT_CLASS(release_evt
,
1502 TP_PROTO(struct ieee80211_local
*local
,
1503 struct ieee80211_sta
*sta
,
1504 u16 tids
, int num_frames
,
1505 enum ieee80211_frame_release_type reason
,
1508 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
),
1514 __field(int, num_frames
)
1515 __field(int, reason
)
1516 __field(bool, more_data
)
1522 __entry
->tids
= tids
;
1523 __entry
->num_frames
= num_frames
;
1524 __entry
->reason
= reason
;
1525 __entry
->more_data
= more_data
;
1529 LOCAL_PR_FMT STA_PR_FMT
1530 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1531 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->tids
, __entry
->num_frames
,
1532 __entry
->reason
, __entry
->more_data
1536 DEFINE_EVENT(release_evt
, drv_release_buffered_frames
,
1537 TP_PROTO(struct ieee80211_local
*local
,
1538 struct ieee80211_sta
*sta
,
1539 u16 tids
, int num_frames
,
1540 enum ieee80211_frame_release_type reason
,
1543 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
)
1546 DEFINE_EVENT(release_evt
, drv_allow_buffered_frames
,
1547 TP_PROTO(struct ieee80211_local
*local
,
1548 struct ieee80211_sta
*sta
,
1549 u16 tids
, int num_frames
,
1550 enum ieee80211_frame_release_type reason
,
1553 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
)
1556 DECLARE_EVENT_CLASS(mgd_prepare_complete_tx_evt
,
1557 TP_PROTO(struct ieee80211_local
*local
,
1558 struct ieee80211_sub_if_data
*sdata
,
1559 u16 duration
, u16 subtype
, bool success
),
1561 TP_ARGS(local
, sdata
, duration
, subtype
, success
),
1566 __field(u32
, duration
)
1567 __field(u16
, subtype
)
1568 __field(u8
, success
)
1574 __entry
->duration
= duration
;
1575 __entry
->subtype
= subtype
;
1576 __entry
->success
= success
;
1580 LOCAL_PR_FMT VIF_PR_FMT
" duration: %u, subtype:0x%x, success:%d",
1581 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->duration
,
1582 __entry
->subtype
, __entry
->success
1586 DEFINE_EVENT(mgd_prepare_complete_tx_evt
, drv_mgd_prepare_tx
,
1587 TP_PROTO(struct ieee80211_local
*local
,
1588 struct ieee80211_sub_if_data
*sdata
,
1589 u16 duration
, u16 subtype
, bool success
),
1591 TP_ARGS(local
, sdata
, duration
, subtype
, success
)
1594 DEFINE_EVENT(mgd_prepare_complete_tx_evt
, drv_mgd_complete_tx
,
1595 TP_PROTO(struct ieee80211_local
*local
,
1596 struct ieee80211_sub_if_data
*sdata
,
1597 u16 duration
, u16 subtype
, bool success
),
1599 TP_ARGS(local
, sdata
, duration
, subtype
, success
)
1602 DEFINE_EVENT(local_sdata_evt
, drv_mgd_protect_tdls_discover
,
1603 TP_PROTO(struct ieee80211_local
*local
,
1604 struct ieee80211_sub_if_data
*sdata
),
1606 TP_ARGS(local
, sdata
)
1609 DECLARE_EVENT_CLASS(local_chanctx
,
1610 TP_PROTO(struct ieee80211_local
*local
,
1611 struct ieee80211_chanctx
*ctx
),
1613 TP_ARGS(local
, ctx
),
1626 LOCAL_PR_FMT CHANCTX_PR_FMT
,
1627 LOCAL_PR_ARG
, CHANCTX_PR_ARG
1631 DEFINE_EVENT(local_chanctx
, drv_add_chanctx
,
1632 TP_PROTO(struct ieee80211_local
*local
,
1633 struct ieee80211_chanctx
*ctx
),
1637 DEFINE_EVENT(local_chanctx
, drv_remove_chanctx
,
1638 TP_PROTO(struct ieee80211_local
*local
,
1639 struct ieee80211_chanctx
*ctx
),
1643 TRACE_EVENT(drv_change_chanctx
,
1644 TP_PROTO(struct ieee80211_local
*local
,
1645 struct ieee80211_chanctx
*ctx
,
1648 TP_ARGS(local
, ctx
, changed
),
1653 __field(u32
, changed
)
1659 __entry
->changed
= changed
;
1663 LOCAL_PR_FMT CHANCTX_PR_FMT
" changed:%#x",
1664 LOCAL_PR_ARG
, CHANCTX_PR_ARG
, __entry
->changed
1668 #if !defined(__TRACE_VIF_ENTRY)
1669 #define __TRACE_VIF_ENTRY
1670 struct trace_vif_entry
{
1671 enum nl80211_iftype vif_type
;
1673 char vif_name
[IFNAMSIZ
];
1676 struct trace_chandef_entry
{
1685 struct trace_switch_entry
{
1686 struct trace_vif_entry vif
;
1687 unsigned int link_id
;
1688 struct trace_chandef_entry old_chandef
;
1689 struct trace_chandef_entry new_chandef
;
1692 #define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
1695 TRACE_EVENT(drv_switch_vif_chanctx
,
1696 TP_PROTO(struct ieee80211_local
*local
,
1697 struct ieee80211_vif_chanctx_switch
*vifs
,
1698 int n_vifs
, enum ieee80211_chanctx_switch_mode mode
),
1699 TP_ARGS(local
, vifs
, n_vifs
, mode
),
1703 __field(int, n_vifs
)
1705 __dynamic_array(u8
, vifs
,
1706 sizeof(struct trace_switch_entry
) * n_vifs
)
1711 __entry
->n_vifs
= n_vifs
;
1712 __entry
->mode
= mode
;
1714 struct trace_switch_entry
*local_vifs
=
1715 __get_dynamic_array(vifs
);
1718 for (i
= 0; i
< n_vifs
; i
++) {
1719 struct ieee80211_sub_if_data
*sdata
;
1721 sdata
= container_of(vifs
[i
].vif
,
1722 struct ieee80211_sub_if_data
,
1725 SWITCH_ENTRY_ASSIGN(vif
.vif_type
, vif
->type
);
1726 SWITCH_ENTRY_ASSIGN(vif
.p2p
, vif
->p2p
);
1727 SWITCH_ENTRY_ASSIGN(link_id
, link_conf
->link_id
);
1728 strncpy(local_vifs
[i
].vif
.vif_name
,
1730 sizeof(local_vifs
[i
].vif
.vif_name
));
1731 SWITCH_ENTRY_ASSIGN(old_chandef
.control_freq
,
1732 old_ctx
->def
.chan
->center_freq
);
1733 SWITCH_ENTRY_ASSIGN(old_chandef
.freq_offset
,
1734 old_ctx
->def
.chan
->freq_offset
);
1735 SWITCH_ENTRY_ASSIGN(old_chandef
.chan_width
,
1736 old_ctx
->def
.width
);
1737 SWITCH_ENTRY_ASSIGN(old_chandef
.center_freq1
,
1738 old_ctx
->def
.center_freq1
);
1739 SWITCH_ENTRY_ASSIGN(old_chandef
.freq1_offset
,
1740 old_ctx
->def
.freq1_offset
);
1741 SWITCH_ENTRY_ASSIGN(old_chandef
.center_freq2
,
1742 old_ctx
->def
.center_freq2
);
1743 SWITCH_ENTRY_ASSIGN(new_chandef
.control_freq
,
1744 new_ctx
->def
.chan
->center_freq
);
1745 SWITCH_ENTRY_ASSIGN(new_chandef
.freq_offset
,
1746 new_ctx
->def
.chan
->freq_offset
);
1747 SWITCH_ENTRY_ASSIGN(new_chandef
.chan_width
,
1748 new_ctx
->def
.width
);
1749 SWITCH_ENTRY_ASSIGN(new_chandef
.center_freq1
,
1750 new_ctx
->def
.center_freq1
);
1751 SWITCH_ENTRY_ASSIGN(new_chandef
.freq1_offset
,
1752 new_ctx
->def
.freq1_offset
);
1753 SWITCH_ENTRY_ASSIGN(new_chandef
.center_freq2
,
1754 new_ctx
->def
.center_freq2
);
1760 LOCAL_PR_FMT
" n_vifs:%d mode:%d",
1761 LOCAL_PR_ARG
, __entry
->n_vifs
, __entry
->mode
1765 DECLARE_EVENT_CLASS(local_sdata_chanctx
,
1766 TP_PROTO(struct ieee80211_local
*local
,
1767 struct ieee80211_sub_if_data
*sdata
,
1768 struct ieee80211_bss_conf
*link_conf
,
1769 struct ieee80211_chanctx
*ctx
),
1771 TP_ARGS(local
, sdata
, link_conf
, ctx
),
1777 __field(unsigned int, link_id
)
1784 __entry
->link_id
= link_conf
->link_id
;
1788 LOCAL_PR_FMT VIF_PR_FMT
" link_id:%d" CHANCTX_PR_FMT
,
1789 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->link_id
, CHANCTX_PR_ARG
1793 DEFINE_EVENT(local_sdata_chanctx
, drv_assign_vif_chanctx
,
1794 TP_PROTO(struct ieee80211_local
*local
,
1795 struct ieee80211_sub_if_data
*sdata
,
1796 struct ieee80211_bss_conf
*link_conf
,
1797 struct ieee80211_chanctx
*ctx
),
1798 TP_ARGS(local
, sdata
, link_conf
, ctx
)
1801 DEFINE_EVENT(local_sdata_chanctx
, drv_unassign_vif_chanctx
,
1802 TP_PROTO(struct ieee80211_local
*local
,
1803 struct ieee80211_sub_if_data
*sdata
,
1804 struct ieee80211_bss_conf
*link_conf
,
1805 struct ieee80211_chanctx
*ctx
),
1806 TP_ARGS(local
, sdata
, link_conf
, ctx
)
1809 TRACE_EVENT(drv_start_ap
,
1810 TP_PROTO(struct ieee80211_local
*local
,
1811 struct ieee80211_sub_if_data
*sdata
,
1812 struct ieee80211_bss_conf
*link_conf
),
1814 TP_ARGS(local
, sdata
, link_conf
),
1819 __field(u32
, link_id
)
1820 __field(u8
, dtimper
)
1821 __field(u16
, bcnint
)
1822 __dynamic_array(u8
, ssid
, sdata
->vif
.cfg
.ssid_len
)
1823 __field(bool, hidden_ssid
)
1829 __entry
->link_id
= link_conf
->link_id
;
1830 __entry
->dtimper
= link_conf
->dtim_period
;
1831 __entry
->bcnint
= link_conf
->beacon_int
;
1832 __entry
->hidden_ssid
= link_conf
->hidden_ssid
;
1833 memcpy(__get_dynamic_array(ssid
),
1834 sdata
->vif
.cfg
.ssid
,
1835 sdata
->vif
.cfg
.ssid_len
);
1839 LOCAL_PR_FMT VIF_PR_FMT
" link id %u",
1840 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->link_id
1844 TRACE_EVENT(drv_stop_ap
,
1845 TP_PROTO(struct ieee80211_local
*local
,
1846 struct ieee80211_sub_if_data
*sdata
,
1847 struct ieee80211_bss_conf
*link_conf
),
1849 TP_ARGS(local
, sdata
, link_conf
),
1854 __field(u32
, link_id
)
1860 __entry
->link_id
= link_conf
->link_id
;
1864 LOCAL_PR_FMT VIF_PR_FMT
" link id %u",
1865 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->link_id
1869 TRACE_EVENT(drv_reconfig_complete
,
1870 TP_PROTO(struct ieee80211_local
*local
,
1871 enum ieee80211_reconfig_type reconfig_type
),
1872 TP_ARGS(local
, reconfig_type
),
1876 __field(u8
, reconfig_type
)
1881 __entry
->reconfig_type
= reconfig_type
;
1885 LOCAL_PR_FMT
" reconfig_type:%d",
1886 LOCAL_PR_ARG
, __entry
->reconfig_type
1891 #if IS_ENABLED(CONFIG_IPV6)
1892 DEFINE_EVENT(local_sdata_evt
, drv_ipv6_addr_change
,
1893 TP_PROTO(struct ieee80211_local
*local
,
1894 struct ieee80211_sub_if_data
*sdata
),
1895 TP_ARGS(local
, sdata
)
1899 TRACE_EVENT(drv_join_ibss
,
1900 TP_PROTO(struct ieee80211_local
*local
,
1901 struct ieee80211_sub_if_data
*sdata
,
1902 struct ieee80211_bss_conf
*info
),
1904 TP_ARGS(local
, sdata
, info
),
1909 __field(u8
, dtimper
)
1910 __field(u16
, bcnint
)
1911 __dynamic_array(u8
, ssid
, sdata
->vif
.cfg
.ssid_len
)
1917 __entry
->dtimper
= info
->dtim_period
;
1918 __entry
->bcnint
= info
->beacon_int
;
1919 memcpy(__get_dynamic_array(ssid
),
1920 sdata
->vif
.cfg
.ssid
,
1921 sdata
->vif
.cfg
.ssid_len
);
1925 LOCAL_PR_FMT VIF_PR_FMT
,
1926 LOCAL_PR_ARG
, VIF_PR_ARG
1930 DEFINE_EVENT(local_sdata_evt
, drv_leave_ibss
,
1931 TP_PROTO(struct ieee80211_local
*local
,
1932 struct ieee80211_sub_if_data
*sdata
),
1933 TP_ARGS(local
, sdata
)
1936 TRACE_EVENT(drv_get_expected_throughput
,
1937 TP_PROTO(struct ieee80211_sta
*sta
),
1950 STA_PR_FMT
, STA_PR_ARG
1954 TRACE_EVENT(drv_start_nan
,
1955 TP_PROTO(struct ieee80211_local
*local
,
1956 struct ieee80211_sub_if_data
*sdata
,
1957 struct cfg80211_nan_conf
*conf
),
1959 TP_ARGS(local
, sdata
, conf
),
1963 __field(u8
, master_pref
)
1970 __entry
->master_pref
= conf
->master_pref
;
1971 __entry
->bands
= conf
->bands
;
1975 LOCAL_PR_FMT VIF_PR_FMT
1976 ", master preference: %u, bands: 0x%0x",
1977 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->master_pref
,
1982 TRACE_EVENT(drv_stop_nan
,
1983 TP_PROTO(struct ieee80211_local
*local
,
1984 struct ieee80211_sub_if_data
*sdata
),
1986 TP_ARGS(local
, sdata
),
1999 LOCAL_PR_FMT VIF_PR_FMT
,
2000 LOCAL_PR_ARG
, VIF_PR_ARG
2004 TRACE_EVENT(drv_nan_change_conf
,
2005 TP_PROTO(struct ieee80211_local
*local
,
2006 struct ieee80211_sub_if_data
*sdata
,
2007 struct cfg80211_nan_conf
*conf
,
2010 TP_ARGS(local
, sdata
, conf
, changes
),
2014 __field(u8
, master_pref
)
2016 __field(u32
, changes
)
2022 __entry
->master_pref
= conf
->master_pref
;
2023 __entry
->bands
= conf
->bands
;
2024 __entry
->changes
= changes
;
2028 LOCAL_PR_FMT VIF_PR_FMT
2029 ", master preference: %u, bands: 0x%0x, changes: 0x%x",
2030 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->master_pref
,
2031 __entry
->bands
, __entry
->changes
2035 TRACE_EVENT(drv_add_nan_func
,
2036 TP_PROTO(struct ieee80211_local
*local
,
2037 struct ieee80211_sub_if_data
*sdata
,
2038 const struct cfg80211_nan_func
*func
),
2040 TP_ARGS(local
, sdata
, func
),
2045 __field(u8
, inst_id
)
2051 __entry
->type
= func
->type
;
2052 __entry
->inst_id
= func
->instance_id
;
2056 LOCAL_PR_FMT VIF_PR_FMT
2057 ", type: %u, inst_id: %u",
2058 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->type
, __entry
->inst_id
2062 TRACE_EVENT(drv_del_nan_func
,
2063 TP_PROTO(struct ieee80211_local
*local
,
2064 struct ieee80211_sub_if_data
*sdata
,
2067 TP_ARGS(local
, sdata
, instance_id
),
2071 __field(u8
, instance_id
)
2077 __entry
->instance_id
= instance_id
;
2081 LOCAL_PR_FMT VIF_PR_FMT
2082 ", instance_id: %u",
2083 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->instance_id
2087 DEFINE_EVENT(local_sdata_evt
, drv_start_pmsr
,
2088 TP_PROTO(struct ieee80211_local
*local
,
2089 struct ieee80211_sub_if_data
*sdata
),
2090 TP_ARGS(local
, sdata
)
2093 DEFINE_EVENT(local_sdata_evt
, drv_abort_pmsr
,
2094 TP_PROTO(struct ieee80211_local
*local
,
2095 struct ieee80211_sub_if_data
*sdata
),
2096 TP_ARGS(local
, sdata
)
2099 TRACE_EVENT(drv_set_default_unicast_key
,
2100 TP_PROTO(struct ieee80211_local
*local
,
2101 struct ieee80211_sub_if_data
*sdata
,
2104 TP_ARGS(local
, sdata
, key_idx
),
2109 __field(int, key_idx
)
2115 __entry
->key_idx
= key_idx
;
2118 TP_printk(LOCAL_PR_FMT VIF_PR_FMT
" key_idx:%d",
2119 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->key_idx
)
2122 TRACE_EVENT(drv_channel_switch_beacon
,
2123 TP_PROTO(struct ieee80211_local
*local
,
2124 struct ieee80211_sub_if_data
*sdata
,
2125 struct cfg80211_chan_def
*chandef
),
2127 TP_ARGS(local
, sdata
, chandef
),
2138 CHANDEF_ASSIGN(chandef
);
2142 LOCAL_PR_FMT VIF_PR_FMT
" channel switch to " CHANDEF_PR_FMT
,
2143 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANDEF_PR_ARG
2147 DEFINE_EVENT(chanswitch_evt
, drv_pre_channel_switch
,
2148 TP_PROTO(struct ieee80211_local
*local
,
2149 struct ieee80211_sub_if_data
*sdata
,
2150 struct ieee80211_channel_switch
*ch_switch
),
2151 TP_ARGS(local
, sdata
, ch_switch
)
2154 DEFINE_EVENT(local_sdata_evt
, drv_post_channel_switch
,
2155 TP_PROTO(struct ieee80211_local
*local
,
2156 struct ieee80211_sub_if_data
*sdata
),
2157 TP_ARGS(local
, sdata
)
2160 DEFINE_EVENT(local_sdata_evt
, drv_abort_channel_switch
,
2161 TP_PROTO(struct ieee80211_local
*local
,
2162 struct ieee80211_sub_if_data
*sdata
),
2163 TP_ARGS(local
, sdata
)
2166 DEFINE_EVENT(chanswitch_evt
, drv_channel_switch_rx_beacon
,
2167 TP_PROTO(struct ieee80211_local
*local
,
2168 struct ieee80211_sub_if_data
*sdata
,
2169 struct ieee80211_channel_switch
*ch_switch
),
2170 TP_ARGS(local
, sdata
, ch_switch
)
2173 TRACE_EVENT(drv_get_txpower
,
2174 TP_PROTO(struct ieee80211_local
*local
,
2175 struct ieee80211_sub_if_data
*sdata
,
2176 unsigned int link_id
, int dbm
, int ret
),
2178 TP_ARGS(local
, sdata
, link_id
, dbm
, ret
),
2183 __field(unsigned int, link_id
)
2191 __entry
->link_id
= link_id
;
2197 LOCAL_PR_FMT VIF_PR_FMT
" link_id:%d dbm:%d ret:%d",
2198 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->link_id
, __entry
->dbm
, __entry
->ret
2202 TRACE_EVENT(drv_tdls_channel_switch
,
2203 TP_PROTO(struct ieee80211_local
*local
,
2204 struct ieee80211_sub_if_data
*sdata
,
2205 struct ieee80211_sta
*sta
, u8 oper_class
,
2206 struct cfg80211_chan_def
*chandef
),
2208 TP_ARGS(local
, sdata
, sta
, oper_class
, chandef
),
2214 __field(u8
, oper_class
)
2222 __entry
->oper_class
= oper_class
;
2223 CHANDEF_ASSIGN(chandef
)
2227 LOCAL_PR_FMT VIF_PR_FMT
" tdls channel switch to"
2228 CHANDEF_PR_FMT
" oper_class:%d " STA_PR_FMT
,
2229 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANDEF_PR_ARG
, __entry
->oper_class
,
2234 TRACE_EVENT(drv_tdls_cancel_channel_switch
,
2235 TP_PROTO(struct ieee80211_local
*local
,
2236 struct ieee80211_sub_if_data
*sdata
,
2237 struct ieee80211_sta
*sta
),
2239 TP_ARGS(local
, sdata
, sta
),
2254 LOCAL_PR_FMT VIF_PR_FMT
2255 " tdls cancel channel switch with " STA_PR_FMT
,
2256 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
2260 TRACE_EVENT(drv_tdls_recv_channel_switch
,
2261 TP_PROTO(struct ieee80211_local
*local
,
2262 struct ieee80211_sub_if_data
*sdata
,
2263 struct ieee80211_tdls_ch_sw_params
*params
),
2265 TP_ARGS(local
, sdata
, params
),
2270 __field(u8
, action_code
)
2273 __field(u32
, status
)
2274 __field(bool, peer_initiator
)
2275 __field(u32
, timestamp
)
2276 __field(u16
, switch_time
)
2277 __field(u16
, switch_timeout
)
2283 STA_NAMED_ASSIGN(params
->sta
);
2284 CHANDEF_ASSIGN(params
->chandef
)
2285 __entry
->peer_initiator
= params
->sta
->tdls_initiator
;
2286 __entry
->action_code
= params
->action_code
;
2287 __entry
->status
= params
->status
;
2288 __entry
->timestamp
= params
->timestamp
;
2289 __entry
->switch_time
= params
->switch_time
;
2290 __entry
->switch_timeout
= params
->switch_timeout
;
2294 LOCAL_PR_FMT VIF_PR_FMT
" received tdls channel switch packet"
2295 " action:%d status:%d time:%d switch time:%d switch"
2296 " timeout:%d initiator: %d chan:" CHANDEF_PR_FMT STA_PR_FMT
,
2297 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->action_code
, __entry
->status
,
2298 __entry
->timestamp
, __entry
->switch_time
,
2299 __entry
->switch_timeout
, __entry
->peer_initiator
,
2300 CHANDEF_PR_ARG
, STA_PR_ARG
2304 TRACE_EVENT(drv_wake_tx_queue
,
2305 TP_PROTO(struct ieee80211_local
*local
,
2306 struct ieee80211_sub_if_data
*sdata
,
2307 struct txq_info
*txq
),
2309 TP_ARGS(local
, sdata
, txq
),
2320 struct ieee80211_sta
*sta
= txq
->txq
.sta
;
2325 __entry
->ac
= txq
->txq
.ac
;
2326 __entry
->tid
= txq
->txq
.tid
;
2330 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" ac:%d tid:%d",
2331 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->ac
, __entry
->tid
2335 TRACE_EVENT(drv_get_ftm_responder_stats
,
2336 TP_PROTO(struct ieee80211_local
*local
,
2337 struct ieee80211_sub_if_data
*sdata
,
2338 struct cfg80211_ftm_responder_stats
*ftm_stats
),
2340 TP_ARGS(local
, sdata
, ftm_stats
),
2353 LOCAL_PR_FMT VIF_PR_FMT
,
2354 LOCAL_PR_ARG
, VIF_PR_ARG
2358 DEFINE_EVENT(local_sdata_addr_evt
, drv_update_vif_offload
,
2359 TP_PROTO(struct ieee80211_local
*local
,
2360 struct ieee80211_sub_if_data
*sdata
),
2361 TP_ARGS(local
, sdata
)
2364 DECLARE_EVENT_CLASS(sta_flag_evt
,
2365 TP_PROTO(struct ieee80211_local
*local
,
2366 struct ieee80211_sub_if_data
*sdata
,
2367 struct ieee80211_sta
*sta
, bool enabled
),
2369 TP_ARGS(local
, sdata
, sta
, enabled
),
2375 __field(bool, enabled
)
2382 __entry
->enabled
= enabled
;
2386 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" enabled:%d",
2387 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->enabled
2391 DEFINE_EVENT(sta_flag_evt
, drv_sta_set_4addr
,
2392 TP_PROTO(struct ieee80211_local
*local
,
2393 struct ieee80211_sub_if_data
*sdata
,
2394 struct ieee80211_sta
*sta
, bool enabled
),
2396 TP_ARGS(local
, sdata
, sta
, enabled
)
2399 DEFINE_EVENT(sta_flag_evt
, drv_sta_set_decap_offload
,
2400 TP_PROTO(struct ieee80211_local
*local
,
2401 struct ieee80211_sub_if_data
*sdata
,
2402 struct ieee80211_sta
*sta
, bool enabled
),
2404 TP_ARGS(local
, sdata
, sta
, enabled
)
2407 TRACE_EVENT(drv_add_twt_setup
,
2408 TP_PROTO(struct ieee80211_local
*local
,
2409 struct ieee80211_sta
*sta
,
2410 struct ieee80211_twt_setup
*twt
,
2411 struct ieee80211_twt_params
*twt_agrt
),
2413 TP_ARGS(local
, sta
, twt
, twt_agrt
),
2418 __field(u8
, dialog_token
)
2419 __field(u8
, control
)
2420 __field(__le16
, req_type
)
2421 __field(__le64
, twt
)
2422 __field(u8
, duration
)
2423 __field(__le16
, mantissa
)
2424 __field(u8
, channel
)
2430 __entry
->dialog_token
= twt
->dialog_token
;
2431 __entry
->control
= twt
->control
;
2432 __entry
->req_type
= twt_agrt
->req_type
;
2433 __entry
->twt
= twt_agrt
->twt
;
2434 __entry
->duration
= twt_agrt
->min_twt_dur
;
2435 __entry
->mantissa
= twt_agrt
->mantissa
;
2436 __entry
->channel
= twt_agrt
->channel
;
2440 LOCAL_PR_FMT STA_PR_FMT
2441 " token:%d control:0x%02x req_type:0x%04x"
2442 " twt:%llu duration:%d mantissa:%d channel:%d",
2443 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->dialog_token
,
2444 __entry
->control
, le16_to_cpu(__entry
->req_type
),
2445 le64_to_cpu(__entry
->twt
), __entry
->duration
,
2446 le16_to_cpu(__entry
->mantissa
), __entry
->channel
2450 TRACE_EVENT(drv_twt_teardown_request
,
2451 TP_PROTO(struct ieee80211_local
*local
,
2452 struct ieee80211_sta
*sta
, u8 flowid
),
2454 TP_ARGS(local
, sta
, flowid
),
2465 __entry
->flowid
= flowid
;
2469 LOCAL_PR_FMT STA_PR_FMT
" flowid:%d",
2470 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->flowid
2474 DEFINE_EVENT(sta_event
, drv_net_fill_forward_path
,
2475 TP_PROTO(struct ieee80211_local
*local
,
2476 struct ieee80211_sub_if_data
*sdata
,
2477 struct ieee80211_sta
*sta
),
2478 TP_ARGS(local
, sdata
, sta
)
2481 TRACE_EVENT(drv_net_setup_tc
,
2482 TP_PROTO(struct ieee80211_local
*local
,
2483 struct ieee80211_sub_if_data
*sdata
,
2486 TP_ARGS(local
, sdata
, type
),
2497 __entry
->type
= type
;
2501 LOCAL_PR_FMT VIF_PR_FMT
" type:%d\n",
2502 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->type
2506 TRACE_EVENT(drv_can_activate_links
,
2507 TP_PROTO(struct ieee80211_local
*local
,
2508 struct ieee80211_sub_if_data
*sdata
,
2511 TP_ARGS(local
, sdata
, active_links
),
2516 __field(u16
, active_links
)
2522 __entry
->active_links
= active_links
;
2526 LOCAL_PR_FMT VIF_PR_FMT
" requested active_links:0x%04x\n",
2527 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->active_links
2531 TRACE_EVENT(drv_change_vif_links
,
2532 TP_PROTO(struct ieee80211_local
*local
,
2533 struct ieee80211_sub_if_data
*sdata
,
2534 u16 old_links
, u16 new_links
),
2536 TP_ARGS(local
, sdata
, old_links
, new_links
),
2541 __field(u16
, old_links
)
2542 __field(u16
, new_links
)
2548 __entry
->old_links
= old_links
;
2549 __entry
->new_links
= new_links
;
2553 LOCAL_PR_FMT VIF_PR_FMT
" old_links:0x%04x, new_links:0x%04x\n",
2554 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->old_links
, __entry
->new_links
2558 TRACE_EVENT(drv_change_sta_links
,
2559 TP_PROTO(struct ieee80211_local
*local
,
2560 struct ieee80211_sub_if_data
*sdata
,
2561 struct ieee80211_sta
*sta
,
2562 u16 old_links
, u16 new_links
),
2564 TP_ARGS(local
, sdata
, sta
, old_links
, new_links
),
2570 __field(u16
, old_links
)
2571 __field(u16
, new_links
)
2578 __entry
->old_links
= old_links
;
2579 __entry
->new_links
= new_links
;
2583 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" old_links:0x%04x, new_links:0x%04x\n",
2584 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
,
2585 __entry
->old_links
, __entry
->new_links
2590 * Tracing for API calls that drivers call.
2593 TRACE_EVENT(api_return_bool
,
2594 TP_PROTO(struct ieee80211_local
*local
, bool result
),
2596 TP_ARGS(local
, result
),
2600 __field(bool, result
)
2605 __entry
->result
= result
;
2609 LOCAL_PR_FMT
" result=%d",
2610 LOCAL_PR_ARG
, __entry
->result
2614 TRACE_EVENT(api_return_void
,
2615 TP_PROTO(struct ieee80211_local
*local
),
2628 LOCAL_PR_FMT
, LOCAL_PR_ARG
2632 TRACE_EVENT(api_start_tx_ba_session
,
2633 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
2648 STA_PR_FMT
" tid:%d",
2649 STA_PR_ARG
, __entry
->tid
2653 TRACE_EVENT(api_start_tx_ba_cb
,
2654 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
2656 TP_ARGS(sdata
, ra
, tid
),
2660 __array(u8
, ra
, ETH_ALEN
)
2666 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
2671 VIF_PR_FMT
" ra:%pM tid:%d",
2672 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
2676 TRACE_EVENT(api_stop_tx_ba_session
,
2677 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
2692 STA_PR_FMT
" tid:%d",
2693 STA_PR_ARG
, __entry
->tid
2697 TRACE_EVENT(api_stop_tx_ba_cb
,
2698 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
2700 TP_ARGS(sdata
, ra
, tid
),
2704 __array(u8
, ra
, ETH_ALEN
)
2710 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
2715 VIF_PR_FMT
" ra:%pM tid:%d",
2716 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
2720 DEFINE_EVENT(local_only_evt
, api_restart_hw
,
2721 TP_PROTO(struct ieee80211_local
*local
),
2725 TRACE_EVENT(api_beacon_loss
,
2726 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
2744 TRACE_EVENT(api_connection_loss
,
2745 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
2763 TRACE_EVENT(api_disconnect
,
2764 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, bool reconnect
),
2766 TP_ARGS(sdata
, reconnect
),
2770 __field(int, reconnect
)
2775 __entry
->reconnect
= reconnect
;
2779 VIF_PR_FMT
" reconnect:%d",
2780 VIF_PR_ARG
, __entry
->reconnect
2784 TRACE_EVENT(api_cqm_rssi_notify
,
2785 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
2786 enum nl80211_cqm_rssi_threshold_event rssi_event
,
2789 TP_ARGS(sdata
, rssi_event
, rssi_level
),
2793 __field(u32
, rssi_event
)
2794 __field(s32
, rssi_level
)
2799 __entry
->rssi_event
= rssi_event
;
2800 __entry
->rssi_level
= rssi_level
;
2804 VIF_PR_FMT
" event:%d rssi:%d",
2805 VIF_PR_ARG
, __entry
->rssi_event
, __entry
->rssi_level
2809 DEFINE_EVENT(local_sdata_evt
, api_cqm_beacon_loss_notify
,
2810 TP_PROTO(struct ieee80211_local
*local
,
2811 struct ieee80211_sub_if_data
*sdata
),
2812 TP_ARGS(local
, sdata
)
2815 TRACE_EVENT(api_scan_completed
,
2816 TP_PROTO(struct ieee80211_local
*local
, bool aborted
),
2818 TP_ARGS(local
, aborted
),
2822 __field(bool, aborted
)
2827 __entry
->aborted
= aborted
;
2831 LOCAL_PR_FMT
" aborted:%d",
2832 LOCAL_PR_ARG
, __entry
->aborted
2836 TRACE_EVENT(api_sched_scan_results
,
2837 TP_PROTO(struct ieee80211_local
*local
),
2850 LOCAL_PR_FMT
, LOCAL_PR_ARG
2854 TRACE_EVENT(api_sched_scan_stopped
,
2855 TP_PROTO(struct ieee80211_local
*local
),
2868 LOCAL_PR_FMT
, LOCAL_PR_ARG
2872 TRACE_EVENT(api_sta_block_awake
,
2873 TP_PROTO(struct ieee80211_local
*local
,
2874 struct ieee80211_sta
*sta
, bool block
),
2876 TP_ARGS(local
, sta
, block
),
2881 __field(bool, block
)
2887 __entry
->block
= block
;
2891 LOCAL_PR_FMT STA_PR_FMT
" block:%d",
2892 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->block
2896 TRACE_EVENT(api_chswitch_done
,
2897 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, bool success
,
2898 unsigned int link_id
),
2900 TP_ARGS(sdata
, success
, link_id
),
2904 __field(bool, success
)
2905 __field(unsigned int, link_id
)
2910 __entry
->success
= success
;
2911 __entry
->link_id
= link_id
;
2915 VIF_PR_FMT
" success=%d link_id=%d",
2916 VIF_PR_ARG
, __entry
->success
, __entry
->link_id
2920 DEFINE_EVENT(local_only_evt
, api_ready_on_channel
,
2921 TP_PROTO(struct ieee80211_local
*local
),
2925 DEFINE_EVENT(local_only_evt
, api_remain_on_channel_expired
,
2926 TP_PROTO(struct ieee80211_local
*local
),
2930 TRACE_EVENT(api_gtk_rekey_notify
,
2931 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
2932 const u8
*bssid
, const u8
*replay_ctr
),
2934 TP_ARGS(sdata
, bssid
, replay_ctr
),
2938 __array(u8
, bssid
, ETH_ALEN
)
2939 __array(u8
, replay_ctr
, NL80211_REPLAY_CTR_LEN
)
2944 memcpy(__entry
->bssid
, bssid
, ETH_ALEN
);
2945 memcpy(__entry
->replay_ctr
, replay_ctr
, NL80211_REPLAY_CTR_LEN
);
2948 TP_printk(VIF_PR_FMT
, VIF_PR_ARG
)
2951 TRACE_EVENT(api_enable_rssi_reports
,
2952 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
2953 int rssi_min_thold
, int rssi_max_thold
),
2955 TP_ARGS(sdata
, rssi_min_thold
, rssi_max_thold
),
2959 __field(int, rssi_min_thold
)
2960 __field(int, rssi_max_thold
)
2965 __entry
->rssi_min_thold
= rssi_min_thold
;
2966 __entry
->rssi_max_thold
= rssi_max_thold
;
2970 VIF_PR_FMT
" rssi_min_thold =%d, rssi_max_thold = %d",
2971 VIF_PR_ARG
, __entry
->rssi_min_thold
, __entry
->rssi_max_thold
2975 TRACE_EVENT(api_eosp
,
2976 TP_PROTO(struct ieee80211_local
*local
,
2977 struct ieee80211_sta
*sta
),
2979 TP_ARGS(local
, sta
),
2992 LOCAL_PR_FMT STA_PR_FMT
,
2993 LOCAL_PR_ARG
, STA_PR_ARG
2997 TRACE_EVENT(api_send_eosp_nullfunc
,
2998 TP_PROTO(struct ieee80211_local
*local
,
2999 struct ieee80211_sta
*sta
,
3002 TP_ARGS(local
, sta
, tid
),
3017 LOCAL_PR_FMT STA_PR_FMT
" tid:%d",
3018 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->tid
3022 TRACE_EVENT(api_sta_set_buffered
,
3023 TP_PROTO(struct ieee80211_local
*local
,
3024 struct ieee80211_sta
*sta
,
3025 u8 tid
, bool buffered
),
3027 TP_ARGS(local
, sta
, tid
, buffered
),
3033 __field(bool, buffered
)
3040 __entry
->buffered
= buffered
;
3044 LOCAL_PR_FMT STA_PR_FMT
" tid:%d buffered:%d",
3045 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->tid
, __entry
->buffered
3049 TRACE_EVENT(api_radar_detected
,
3050 TP_PROTO(struct ieee80211_local
*local
),
3063 LOCAL_PR_FMT
" radar detected",
3068 TRACE_EVENT(api_request_smps
,
3069 TP_PROTO(struct ieee80211_local
*local
,
3070 struct ieee80211_sub_if_data
*sdata
,
3071 struct ieee80211_link_data
*link
,
3072 enum ieee80211_smps_mode smps_mode
),
3074 TP_ARGS(local
, sdata
, link
, smps_mode
),
3079 __field(int, link_id
)
3080 __field(u32
, smps_mode
)
3086 __entry
->link_id
= link
->link_id
,
3087 __entry
->smps_mode
= smps_mode
;
3091 LOCAL_PR_FMT
" " VIF_PR_FMT
" link:%d, smps_mode:%d",
3092 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->link_id
, __entry
->smps_mode
3096 TRACE_EVENT(api_prepare_rx_omi_bw
,
3097 TP_PROTO(struct ieee80211_local
*local
,
3098 struct ieee80211_sub_if_data
*sdata
,
3099 struct link_sta_info
*link_sta
,
3100 enum ieee80211_sta_rx_bandwidth bw
),
3102 TP_ARGS(local
, sdata
, link_sta
, bw
),
3108 __field(int, link_id
)
3110 __field(bool, result
)
3116 STA_NAMED_ASSIGN(link_sta
->sta
);
3117 __entry
->link_id
= link_sta
->link_id
;
3122 LOCAL_PR_FMT
" " VIF_PR_FMT
" " STA_PR_FMT
" link:%d, bw:%d",
3123 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
,
3124 __entry
->link_id
, __entry
->bw
3128 TRACE_EVENT(api_finalize_rx_omi_bw
,
3129 TP_PROTO(struct ieee80211_local
*local
,
3130 struct ieee80211_sub_if_data
*sdata
,
3131 struct link_sta_info
*link_sta
),
3133 TP_ARGS(local
, sdata
, link_sta
),
3139 __field(int, link_id
)
3145 STA_NAMED_ASSIGN(link_sta
->sta
);
3146 __entry
->link_id
= link_sta
->link_id
;
3150 LOCAL_PR_FMT
" " VIF_PR_FMT
" " STA_PR_FMT
" link:%d",
3151 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->link_id
3156 * Tracing for internal functions
3157 * (which may also be called in response to driver calls)
3160 TRACE_EVENT(wake_queue
,
3161 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
3162 enum queue_stop_reason reason
, int refcount
),
3164 TP_ARGS(local
, queue
, reason
, refcount
),
3169 __field(u32
, reason
)
3170 __field(int, refcount
)
3175 __entry
->queue
= queue
;
3176 __entry
->reason
= reason
;
3177 __entry
->refcount
= refcount
;
3181 LOCAL_PR_FMT
" queue:%d, reason:%d, refcount: %d",
3182 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
,
3187 TRACE_EVENT(stop_queue
,
3188 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
3189 enum queue_stop_reason reason
, int refcount
),
3191 TP_ARGS(local
, queue
, reason
, refcount
),
3196 __field(u32
, reason
)
3197 __field(int, refcount
)
3202 __entry
->queue
= queue
;
3203 __entry
->reason
= reason
;
3204 __entry
->refcount
= refcount
;
3208 LOCAL_PR_FMT
" queue:%d, reason:%d, refcount: %d",
3209 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
,
3214 TRACE_EVENT(drv_can_neg_ttlm
,
3215 TP_PROTO(struct ieee80211_local
*local
,
3216 struct ieee80211_sub_if_data
*sdata
,
3217 struct ieee80211_neg_ttlm
*neg_ttlm
),
3219 TP_ARGS(local
, sdata
, neg_ttlm
),
3221 TP_STRUCT__entry(LOCAL_ENTRY
3223 __array(u16
, downlink
, sizeof(u16
) * 8)
3224 __array(u16
, uplink
, sizeof(u16
) * 8)
3227 TP_fast_assign(LOCAL_ASSIGN
;
3229 memcpy(__entry
->downlink
, neg_ttlm
->downlink
,
3230 sizeof(neg_ttlm
->downlink
));
3231 memcpy(__entry
->uplink
, neg_ttlm
->uplink
,
3232 sizeof(neg_ttlm
->uplink
));
3235 TP_printk(LOCAL_PR_FMT
", " VIF_PR_FMT
, LOCAL_PR_ARG
, VIF_PR_ARG
)
3238 TRACE_EVENT(drv_neg_ttlm_res
,
3239 TP_PROTO(struct ieee80211_local
*local
,
3240 struct ieee80211_sub_if_data
*sdata
,
3241 enum ieee80211_neg_ttlm_res res
,
3242 struct ieee80211_neg_ttlm
*neg_ttlm
),
3244 TP_ARGS(local
, sdata
, res
, neg_ttlm
),
3246 TP_STRUCT__entry(LOCAL_ENTRY
3249 __array(u16
, downlink
, sizeof(u16
) * 8)
3250 __array(u16
, uplink
, sizeof(u16
) * 8)
3253 TP_fast_assign(LOCAL_ASSIGN
;
3256 memcpy(__entry
->downlink
, neg_ttlm
->downlink
,
3257 sizeof(neg_ttlm
->downlink
));
3258 memcpy(__entry
->uplink
, neg_ttlm
->uplink
,
3259 sizeof(neg_ttlm
->uplink
));
3262 TP_printk(LOCAL_PR_FMT VIF_PR_FMT
" response: %d\n ",
3263 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->res
3267 TRACE_EVENT(drv_prep_add_interface
,
3268 TP_PROTO(struct ieee80211_local
*local
,
3269 enum nl80211_iftype type
),
3271 TP_ARGS(local
, type
),
3272 TP_STRUCT__entry(LOCAL_ENTRY
3276 TP_fast_assign(LOCAL_ASSIGN
;
3277 __entry
->type
= type
;
3280 TP_printk(LOCAL_PR_FMT
" type: %u\n ",
3281 LOCAL_PR_ARG
, __entry
->type
3285 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
3287 #undef TRACE_INCLUDE_PATH
3288 #define TRACE_INCLUDE_PATH .
3289 #undef TRACE_INCLUDE_FILE
3290 #define TRACE_INCLUDE_FILE trace
3291 #include <trace/define_trace.h>