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_sta_rc_update
,
943 TP_PROTO(struct ieee80211_local
*local
,
944 struct ieee80211_sub_if_data
*sdata
,
945 struct ieee80211_sta
*sta
,
948 TP_ARGS(local
, sdata
, sta
, changed
),
954 __field(u32
, changed
)
961 __entry
->changed
= changed
;
965 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" changed: 0x%x",
966 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->changed
970 DECLARE_EVENT_CLASS(sta_event
,
971 TP_PROTO(struct ieee80211_local
*local
,
972 struct ieee80211_sub_if_data
*sdata
,
973 struct ieee80211_sta
*sta
),
975 TP_ARGS(local
, sdata
, sta
),
990 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
,
991 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
995 DEFINE_EVENT(sta_event
, drv_sta_statistics
,
996 TP_PROTO(struct ieee80211_local
*local
,
997 struct ieee80211_sub_if_data
*sdata
,
998 struct ieee80211_sta
*sta
),
999 TP_ARGS(local
, sdata
, sta
)
1002 DEFINE_EVENT(sta_event
, drv_sta_add
,
1003 TP_PROTO(struct ieee80211_local
*local
,
1004 struct ieee80211_sub_if_data
*sdata
,
1005 struct ieee80211_sta
*sta
),
1006 TP_ARGS(local
, sdata
, sta
)
1009 DEFINE_EVENT(sta_event
, drv_sta_remove
,
1010 TP_PROTO(struct ieee80211_local
*local
,
1011 struct ieee80211_sub_if_data
*sdata
,
1012 struct ieee80211_sta
*sta
),
1013 TP_ARGS(local
, sdata
, sta
)
1016 DEFINE_EVENT(sta_event
, drv_sta_pre_rcu_remove
,
1017 TP_PROTO(struct ieee80211_local
*local
,
1018 struct ieee80211_sub_if_data
*sdata
,
1019 struct ieee80211_sta
*sta
),
1020 TP_ARGS(local
, sdata
, sta
)
1023 DEFINE_EVENT(sta_event
, drv_sync_rx_queues
,
1024 TP_PROTO(struct ieee80211_local
*local
,
1025 struct ieee80211_sub_if_data
*sdata
,
1026 struct ieee80211_sta
*sta
),
1027 TP_ARGS(local
, sdata
, sta
)
1030 DEFINE_EVENT(sta_event
, drv_sta_rate_tbl_update
,
1031 TP_PROTO(struct ieee80211_local
*local
,
1032 struct ieee80211_sub_if_data
*sdata
,
1033 struct ieee80211_sta
*sta
),
1034 TP_ARGS(local
, sdata
, sta
)
1037 TRACE_EVENT(drv_conf_tx
,
1038 TP_PROTO(struct ieee80211_local
*local
,
1039 struct ieee80211_sub_if_data
*sdata
,
1040 unsigned int link_id
,
1041 u16 ac
, const struct ieee80211_tx_queue_params
*params
),
1043 TP_ARGS(local
, sdata
, link_id
, ac
, params
),
1048 __field(unsigned int, link_id
)
1051 __field(u16
, cw_min
)
1052 __field(u16
, cw_max
)
1054 __field(bool, uapsd
)
1060 __entry
->link_id
= link_id
;
1062 __entry
->txop
= params
->txop
;
1063 __entry
->cw_max
= params
->cw_max
;
1064 __entry
->cw_min
= params
->cw_min
;
1065 __entry
->aifs
= params
->aifs
;
1066 __entry
->uapsd
= params
->uapsd
;
1070 LOCAL_PR_FMT VIF_PR_FMT
" link_id: %d, AC:%d",
1071 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->link_id
, __entry
->ac
1075 DEFINE_EVENT(local_sdata_evt
, drv_get_tsf
,
1076 TP_PROTO(struct ieee80211_local
*local
,
1077 struct ieee80211_sub_if_data
*sdata
),
1078 TP_ARGS(local
, sdata
)
1081 TRACE_EVENT(drv_set_tsf
,
1082 TP_PROTO(struct ieee80211_local
*local
,
1083 struct ieee80211_sub_if_data
*sdata
,
1086 TP_ARGS(local
, sdata
, tsf
),
1101 LOCAL_PR_FMT VIF_PR_FMT
" tsf:%llu",
1102 LOCAL_PR_ARG
, VIF_PR_ARG
, (unsigned long long)__entry
->tsf
1106 TRACE_EVENT(drv_offset_tsf
,
1107 TP_PROTO(struct ieee80211_local
*local
,
1108 struct ieee80211_sub_if_data
*sdata
,
1111 TP_ARGS(local
, sdata
, offset
),
1116 __field(s64
, tsf_offset
)
1122 __entry
->tsf_offset
= offset
;
1126 LOCAL_PR_FMT VIF_PR_FMT
" tsf offset:%lld",
1127 LOCAL_PR_ARG
, VIF_PR_ARG
,
1128 (unsigned long long)__entry
->tsf_offset
1132 DEFINE_EVENT(local_sdata_evt
, drv_reset_tsf
,
1133 TP_PROTO(struct ieee80211_local
*local
,
1134 struct ieee80211_sub_if_data
*sdata
),
1135 TP_ARGS(local
, sdata
)
1138 DEFINE_EVENT(local_only_evt
, drv_tx_last_beacon
,
1139 TP_PROTO(struct ieee80211_local
*local
),
1143 TRACE_EVENT(drv_ampdu_action
,
1144 TP_PROTO(struct ieee80211_local
*local
,
1145 struct ieee80211_sub_if_data
*sdata
,
1146 struct ieee80211_ampdu_params
*params
),
1148 TP_ARGS(local
, sdata
, params
),
1159 AMPDU_ACTION_ASSIGN
;
1163 LOCAL_PR_FMT VIF_PR_FMT AMPDU_ACTION_PR_FMT
,
1164 LOCAL_PR_ARG
, VIF_PR_ARG
, AMPDU_ACTION_PR_ARG
1168 TRACE_EVENT(drv_get_survey
,
1169 TP_PROTO(struct ieee80211_local
*local
, int _idx
,
1170 struct survey_info
*survey
),
1172 TP_ARGS(local
, _idx
, survey
),
1181 __entry
->idx
= _idx
;
1185 LOCAL_PR_FMT
" idx:%d",
1186 LOCAL_PR_ARG
, __entry
->idx
1190 TRACE_EVENT(drv_flush
,
1191 TP_PROTO(struct ieee80211_local
*local
,
1192 u32 queues
, bool drop
),
1194 TP_ARGS(local
, queues
, drop
),
1199 __field(u32
, queues
)
1204 __entry
->drop
= drop
;
1205 __entry
->queues
= queues
;
1209 LOCAL_PR_FMT
" queues:0x%x drop:%d",
1210 LOCAL_PR_ARG
, __entry
->queues
, __entry
->drop
1214 DEFINE_EVENT(sta_event
, drv_flush_sta
,
1215 TP_PROTO(struct ieee80211_local
*local
,
1216 struct ieee80211_sub_if_data
*sdata
,
1217 struct ieee80211_sta
*sta
),
1218 TP_ARGS(local
, sdata
, sta
)
1221 DECLARE_EVENT_CLASS(chanswitch_evt
,
1222 TP_PROTO(struct ieee80211_local
*local
,
1223 struct ieee80211_sub_if_data
*sdata
,
1224 struct ieee80211_channel_switch
*ch_switch
),
1226 TP_ARGS(local
, sdata
, ch_switch
),
1232 __field(u64
, timestamp
)
1233 __field(u32
, device_timestamp
)
1234 __field(bool, block_tx
)
1236 __field(u8
, link_id
)
1242 CHANDEF_ASSIGN(&ch_switch
->chandef
)
1243 __entry
->timestamp
= ch_switch
->timestamp
;
1244 __entry
->device_timestamp
= ch_switch
->device_timestamp
;
1245 __entry
->block_tx
= ch_switch
->block_tx
;
1246 __entry
->count
= ch_switch
->count
;
1247 __entry
->link_id
= ch_switch
->link_id
;
1251 LOCAL_PR_FMT VIF_PR_FMT CHANDEF_PR_FMT
" count:%d block_tx:%d timestamp:%llu device_ts:%u link_id:%d",
1252 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANDEF_PR_ARG
, __entry
->count
,
1253 __entry
->block_tx
, __entry
->timestamp
,
1254 __entry
->device_timestamp
, __entry
->link_id
1258 DEFINE_EVENT(chanswitch_evt
, drv_channel_switch
,
1259 TP_PROTO(struct ieee80211_local
*local
,
1260 struct ieee80211_sub_if_data
*sdata
,
1261 struct ieee80211_channel_switch
*ch_switch
),
1262 TP_ARGS(local
, sdata
, ch_switch
)
1265 TRACE_EVENT(drv_set_antenna
,
1266 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
1268 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
1272 __field(u32
, tx_ant
)
1273 __field(u32
, rx_ant
)
1279 __entry
->tx_ant
= tx_ant
;
1280 __entry
->rx_ant
= rx_ant
;
1285 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
1286 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
1290 TRACE_EVENT(drv_get_antenna
,
1291 TP_PROTO(struct ieee80211_local
*local
, u32 tx_ant
, u32 rx_ant
, int ret
),
1293 TP_ARGS(local
, tx_ant
, rx_ant
, ret
),
1297 __field(u32
, tx_ant
)
1298 __field(u32
, rx_ant
)
1304 __entry
->tx_ant
= tx_ant
;
1305 __entry
->rx_ant
= rx_ant
;
1310 LOCAL_PR_FMT
" tx_ant:%d rx_ant:%d ret:%d",
1311 LOCAL_PR_ARG
, __entry
->tx_ant
, __entry
->rx_ant
, __entry
->ret
1315 TRACE_EVENT(drv_remain_on_channel
,
1316 TP_PROTO(struct ieee80211_local
*local
,
1317 struct ieee80211_sub_if_data
*sdata
,
1318 struct ieee80211_channel
*chan
,
1319 unsigned int duration
,
1320 enum ieee80211_roc_type type
),
1322 TP_ARGS(local
, sdata
, chan
, duration
, type
),
1327 __field(int, center_freq
)
1328 __field(int, freq_offset
)
1329 __field(unsigned int, duration
)
1336 __entry
->center_freq
= chan
->center_freq
;
1337 __entry
->freq_offset
= chan
->freq_offset
;
1338 __entry
->duration
= duration
;
1339 __entry
->type
= type
;
1343 LOCAL_PR_FMT VIF_PR_FMT
" freq:%d.%03dMHz duration:%dms type=%d",
1344 LOCAL_PR_ARG
, VIF_PR_ARG
,
1345 __entry
->center_freq
, __entry
->freq_offset
,
1346 __entry
->duration
, __entry
->type
1350 DEFINE_EVENT(local_sdata_evt
, drv_cancel_remain_on_channel
,
1351 TP_PROTO(struct ieee80211_local
*local
,
1352 struct ieee80211_sub_if_data
*sdata
),
1353 TP_ARGS(local
, sdata
)
1356 TRACE_EVENT(drv_set_ringparam
,
1357 TP_PROTO(struct ieee80211_local
*local
, u32 tx
, u32 rx
),
1359 TP_ARGS(local
, tx
, rx
),
1374 LOCAL_PR_FMT
" tx:%d rx %d",
1375 LOCAL_PR_ARG
, __entry
->tx
, __entry
->rx
1379 TRACE_EVENT(drv_get_ringparam
,
1380 TP_PROTO(struct ieee80211_local
*local
, u32
*tx
, u32
*tx_max
,
1381 u32
*rx
, u32
*rx_max
),
1383 TP_ARGS(local
, tx
, tx_max
, rx
, rx_max
),
1388 __field(u32
, tx_max
)
1390 __field(u32
, rx_max
)
1396 __entry
->tx_max
= *tx_max
;
1398 __entry
->rx_max
= *rx_max
;
1402 LOCAL_PR_FMT
" tx:%d tx_max %d rx %d rx_max %d",
1404 __entry
->tx
, __entry
->tx_max
, __entry
->rx
, __entry
->rx_max
1408 DEFINE_EVENT(local_only_evt
, drv_tx_frames_pending
,
1409 TP_PROTO(struct ieee80211_local
*local
),
1413 DEFINE_EVENT(local_only_evt
, drv_offchannel_tx_cancel_wait
,
1414 TP_PROTO(struct ieee80211_local
*local
),
1418 TRACE_EVENT(drv_set_bitrate_mask
,
1419 TP_PROTO(struct ieee80211_local
*local
,
1420 struct ieee80211_sub_if_data
*sdata
,
1421 const struct cfg80211_bitrate_mask
*mask
),
1423 TP_ARGS(local
, sdata
, mask
),
1428 __field(u32
, legacy_2g
)
1429 __field(u32
, legacy_5g
)
1435 __entry
->legacy_2g
= mask
->control
[NL80211_BAND_2GHZ
].legacy
;
1436 __entry
->legacy_5g
= mask
->control
[NL80211_BAND_5GHZ
].legacy
;
1440 LOCAL_PR_FMT VIF_PR_FMT
" 2G Mask:0x%x 5G Mask:0x%x",
1441 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->legacy_2g
, __entry
->legacy_5g
1445 TRACE_EVENT(drv_set_rekey_data
,
1446 TP_PROTO(struct ieee80211_local
*local
,
1447 struct ieee80211_sub_if_data
*sdata
,
1448 struct cfg80211_gtk_rekey_data
*data
),
1450 TP_ARGS(local
, sdata
, data
),
1455 __array(u8
, kek
, NL80211_KEK_LEN
)
1456 __array(u8
, kck
, NL80211_KCK_LEN
)
1457 __array(u8
, replay_ctr
, NL80211_REPLAY_CTR_LEN
)
1463 memcpy(__entry
->kek
, data
->kek
, NL80211_KEK_LEN
);
1464 memcpy(__entry
->kck
, data
->kck
, NL80211_KCK_LEN
);
1465 memcpy(__entry
->replay_ctr
, data
->replay_ctr
,
1466 NL80211_REPLAY_CTR_LEN
);
1469 TP_printk(LOCAL_PR_FMT VIF_PR_FMT
,
1470 LOCAL_PR_ARG
, VIF_PR_ARG
)
1473 TRACE_EVENT(drv_event_callback
,
1474 TP_PROTO(struct ieee80211_local
*local
,
1475 struct ieee80211_sub_if_data
*sdata
,
1476 const struct ieee80211_event
*_event
),
1478 TP_ARGS(local
, sdata
, _event
),
1489 __entry
->type
= _event
->type
;
1493 LOCAL_PR_FMT VIF_PR_FMT
" event:%d",
1494 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->type
1498 DECLARE_EVENT_CLASS(release_evt
,
1499 TP_PROTO(struct ieee80211_local
*local
,
1500 struct ieee80211_sta
*sta
,
1501 u16 tids
, int num_frames
,
1502 enum ieee80211_frame_release_type reason
,
1505 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
),
1511 __field(int, num_frames
)
1512 __field(int, reason
)
1513 __field(bool, more_data
)
1519 __entry
->tids
= tids
;
1520 __entry
->num_frames
= num_frames
;
1521 __entry
->reason
= reason
;
1522 __entry
->more_data
= more_data
;
1526 LOCAL_PR_FMT STA_PR_FMT
1527 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1528 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->tids
, __entry
->num_frames
,
1529 __entry
->reason
, __entry
->more_data
1533 DEFINE_EVENT(release_evt
, drv_release_buffered_frames
,
1534 TP_PROTO(struct ieee80211_local
*local
,
1535 struct ieee80211_sta
*sta
,
1536 u16 tids
, int num_frames
,
1537 enum ieee80211_frame_release_type reason
,
1540 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
)
1543 DEFINE_EVENT(release_evt
, drv_allow_buffered_frames
,
1544 TP_PROTO(struct ieee80211_local
*local
,
1545 struct ieee80211_sta
*sta
,
1546 u16 tids
, int num_frames
,
1547 enum ieee80211_frame_release_type reason
,
1550 TP_ARGS(local
, sta
, tids
, num_frames
, reason
, more_data
)
1553 DECLARE_EVENT_CLASS(mgd_prepare_complete_tx_evt
,
1554 TP_PROTO(struct ieee80211_local
*local
,
1555 struct ieee80211_sub_if_data
*sdata
,
1556 u16 duration
, u16 subtype
, bool success
),
1558 TP_ARGS(local
, sdata
, duration
, subtype
, success
),
1563 __field(u32
, duration
)
1564 __field(u16
, subtype
)
1565 __field(u8
, success
)
1571 __entry
->duration
= duration
;
1572 __entry
->subtype
= subtype
;
1573 __entry
->success
= success
;
1577 LOCAL_PR_FMT VIF_PR_FMT
" duration: %u, subtype:0x%x, success:%d",
1578 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->duration
,
1579 __entry
->subtype
, __entry
->success
1583 DEFINE_EVENT(mgd_prepare_complete_tx_evt
, drv_mgd_prepare_tx
,
1584 TP_PROTO(struct ieee80211_local
*local
,
1585 struct ieee80211_sub_if_data
*sdata
,
1586 u16 duration
, u16 subtype
, bool success
),
1588 TP_ARGS(local
, sdata
, duration
, subtype
, success
)
1591 DEFINE_EVENT(mgd_prepare_complete_tx_evt
, drv_mgd_complete_tx
,
1592 TP_PROTO(struct ieee80211_local
*local
,
1593 struct ieee80211_sub_if_data
*sdata
,
1594 u16 duration
, u16 subtype
, bool success
),
1596 TP_ARGS(local
, sdata
, duration
, subtype
, success
)
1599 DEFINE_EVENT(local_sdata_evt
, drv_mgd_protect_tdls_discover
,
1600 TP_PROTO(struct ieee80211_local
*local
,
1601 struct ieee80211_sub_if_data
*sdata
),
1603 TP_ARGS(local
, sdata
)
1606 DECLARE_EVENT_CLASS(local_chanctx
,
1607 TP_PROTO(struct ieee80211_local
*local
,
1608 struct ieee80211_chanctx
*ctx
),
1610 TP_ARGS(local
, ctx
),
1623 LOCAL_PR_FMT CHANCTX_PR_FMT
,
1624 LOCAL_PR_ARG
, CHANCTX_PR_ARG
1628 DEFINE_EVENT(local_chanctx
, drv_add_chanctx
,
1629 TP_PROTO(struct ieee80211_local
*local
,
1630 struct ieee80211_chanctx
*ctx
),
1634 DEFINE_EVENT(local_chanctx
, drv_remove_chanctx
,
1635 TP_PROTO(struct ieee80211_local
*local
,
1636 struct ieee80211_chanctx
*ctx
),
1640 TRACE_EVENT(drv_change_chanctx
,
1641 TP_PROTO(struct ieee80211_local
*local
,
1642 struct ieee80211_chanctx
*ctx
,
1645 TP_ARGS(local
, ctx
, changed
),
1650 __field(u32
, changed
)
1656 __entry
->changed
= changed
;
1660 LOCAL_PR_FMT CHANCTX_PR_FMT
" changed:%#x",
1661 LOCAL_PR_ARG
, CHANCTX_PR_ARG
, __entry
->changed
1665 #if !defined(__TRACE_VIF_ENTRY)
1666 #define __TRACE_VIF_ENTRY
1667 struct trace_vif_entry
{
1668 enum nl80211_iftype vif_type
;
1670 char vif_name
[IFNAMSIZ
];
1673 struct trace_chandef_entry
{
1682 struct trace_switch_entry
{
1683 struct trace_vif_entry vif
;
1684 unsigned int link_id
;
1685 struct trace_chandef_entry old_chandef
;
1686 struct trace_chandef_entry new_chandef
;
1689 #define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
1692 TRACE_EVENT(drv_switch_vif_chanctx
,
1693 TP_PROTO(struct ieee80211_local
*local
,
1694 struct ieee80211_vif_chanctx_switch
*vifs
,
1695 int n_vifs
, enum ieee80211_chanctx_switch_mode mode
),
1696 TP_ARGS(local
, vifs
, n_vifs
, mode
),
1700 __field(int, n_vifs
)
1702 __dynamic_array(u8
, vifs
,
1703 sizeof(struct trace_switch_entry
) * n_vifs
)
1708 __entry
->n_vifs
= n_vifs
;
1709 __entry
->mode
= mode
;
1711 struct trace_switch_entry
*local_vifs
=
1712 __get_dynamic_array(vifs
);
1715 for (i
= 0; i
< n_vifs
; i
++) {
1716 struct ieee80211_sub_if_data
*sdata
;
1718 sdata
= container_of(vifs
[i
].vif
,
1719 struct ieee80211_sub_if_data
,
1722 SWITCH_ENTRY_ASSIGN(vif
.vif_type
, vif
->type
);
1723 SWITCH_ENTRY_ASSIGN(vif
.p2p
, vif
->p2p
);
1724 SWITCH_ENTRY_ASSIGN(link_id
, link_conf
->link_id
);
1725 strncpy(local_vifs
[i
].vif
.vif_name
,
1727 sizeof(local_vifs
[i
].vif
.vif_name
));
1728 SWITCH_ENTRY_ASSIGN(old_chandef
.control_freq
,
1729 old_ctx
->def
.chan
->center_freq
);
1730 SWITCH_ENTRY_ASSIGN(old_chandef
.freq_offset
,
1731 old_ctx
->def
.chan
->freq_offset
);
1732 SWITCH_ENTRY_ASSIGN(old_chandef
.chan_width
,
1733 old_ctx
->def
.width
);
1734 SWITCH_ENTRY_ASSIGN(old_chandef
.center_freq1
,
1735 old_ctx
->def
.center_freq1
);
1736 SWITCH_ENTRY_ASSIGN(old_chandef
.freq1_offset
,
1737 old_ctx
->def
.freq1_offset
);
1738 SWITCH_ENTRY_ASSIGN(old_chandef
.center_freq2
,
1739 old_ctx
->def
.center_freq2
);
1740 SWITCH_ENTRY_ASSIGN(new_chandef
.control_freq
,
1741 new_ctx
->def
.chan
->center_freq
);
1742 SWITCH_ENTRY_ASSIGN(new_chandef
.freq_offset
,
1743 new_ctx
->def
.chan
->freq_offset
);
1744 SWITCH_ENTRY_ASSIGN(new_chandef
.chan_width
,
1745 new_ctx
->def
.width
);
1746 SWITCH_ENTRY_ASSIGN(new_chandef
.center_freq1
,
1747 new_ctx
->def
.center_freq1
);
1748 SWITCH_ENTRY_ASSIGN(new_chandef
.freq1_offset
,
1749 new_ctx
->def
.freq1_offset
);
1750 SWITCH_ENTRY_ASSIGN(new_chandef
.center_freq2
,
1751 new_ctx
->def
.center_freq2
);
1757 LOCAL_PR_FMT
" n_vifs:%d mode:%d",
1758 LOCAL_PR_ARG
, __entry
->n_vifs
, __entry
->mode
1762 DECLARE_EVENT_CLASS(local_sdata_chanctx
,
1763 TP_PROTO(struct ieee80211_local
*local
,
1764 struct ieee80211_sub_if_data
*sdata
,
1765 struct ieee80211_bss_conf
*link_conf
,
1766 struct ieee80211_chanctx
*ctx
),
1768 TP_ARGS(local
, sdata
, link_conf
, ctx
),
1774 __field(unsigned int, link_id
)
1781 __entry
->link_id
= link_conf
->link_id
;
1785 LOCAL_PR_FMT VIF_PR_FMT
" link_id:%d" CHANCTX_PR_FMT
,
1786 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->link_id
, CHANCTX_PR_ARG
1790 DEFINE_EVENT(local_sdata_chanctx
, drv_assign_vif_chanctx
,
1791 TP_PROTO(struct ieee80211_local
*local
,
1792 struct ieee80211_sub_if_data
*sdata
,
1793 struct ieee80211_bss_conf
*link_conf
,
1794 struct ieee80211_chanctx
*ctx
),
1795 TP_ARGS(local
, sdata
, link_conf
, ctx
)
1798 DEFINE_EVENT(local_sdata_chanctx
, drv_unassign_vif_chanctx
,
1799 TP_PROTO(struct ieee80211_local
*local
,
1800 struct ieee80211_sub_if_data
*sdata
,
1801 struct ieee80211_bss_conf
*link_conf
,
1802 struct ieee80211_chanctx
*ctx
),
1803 TP_ARGS(local
, sdata
, link_conf
, ctx
)
1806 TRACE_EVENT(drv_start_ap
,
1807 TP_PROTO(struct ieee80211_local
*local
,
1808 struct ieee80211_sub_if_data
*sdata
,
1809 struct ieee80211_bss_conf
*link_conf
),
1811 TP_ARGS(local
, sdata
, link_conf
),
1816 __field(u32
, link_id
)
1817 __field(u8
, dtimper
)
1818 __field(u16
, bcnint
)
1819 __dynamic_array(u8
, ssid
, sdata
->vif
.cfg
.ssid_len
)
1820 __field(bool, hidden_ssid
)
1826 __entry
->link_id
= link_conf
->link_id
;
1827 __entry
->dtimper
= link_conf
->dtim_period
;
1828 __entry
->bcnint
= link_conf
->beacon_int
;
1829 __entry
->hidden_ssid
= link_conf
->hidden_ssid
;
1830 memcpy(__get_dynamic_array(ssid
),
1831 sdata
->vif
.cfg
.ssid
,
1832 sdata
->vif
.cfg
.ssid_len
);
1836 LOCAL_PR_FMT VIF_PR_FMT
" link id %u",
1837 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->link_id
1841 TRACE_EVENT(drv_stop_ap
,
1842 TP_PROTO(struct ieee80211_local
*local
,
1843 struct ieee80211_sub_if_data
*sdata
,
1844 struct ieee80211_bss_conf
*link_conf
),
1846 TP_ARGS(local
, sdata
, link_conf
),
1851 __field(u32
, link_id
)
1857 __entry
->link_id
= link_conf
->link_id
;
1861 LOCAL_PR_FMT VIF_PR_FMT
" link id %u",
1862 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->link_id
1866 TRACE_EVENT(drv_reconfig_complete
,
1867 TP_PROTO(struct ieee80211_local
*local
,
1868 enum ieee80211_reconfig_type reconfig_type
),
1869 TP_ARGS(local
, reconfig_type
),
1873 __field(u8
, reconfig_type
)
1878 __entry
->reconfig_type
= reconfig_type
;
1882 LOCAL_PR_FMT
" reconfig_type:%d",
1883 LOCAL_PR_ARG
, __entry
->reconfig_type
1888 #if IS_ENABLED(CONFIG_IPV6)
1889 DEFINE_EVENT(local_sdata_evt
, drv_ipv6_addr_change
,
1890 TP_PROTO(struct ieee80211_local
*local
,
1891 struct ieee80211_sub_if_data
*sdata
),
1892 TP_ARGS(local
, sdata
)
1896 TRACE_EVENT(drv_join_ibss
,
1897 TP_PROTO(struct ieee80211_local
*local
,
1898 struct ieee80211_sub_if_data
*sdata
,
1899 struct ieee80211_bss_conf
*info
),
1901 TP_ARGS(local
, sdata
, info
),
1906 __field(u8
, dtimper
)
1907 __field(u16
, bcnint
)
1908 __dynamic_array(u8
, ssid
, sdata
->vif
.cfg
.ssid_len
)
1914 __entry
->dtimper
= info
->dtim_period
;
1915 __entry
->bcnint
= info
->beacon_int
;
1916 memcpy(__get_dynamic_array(ssid
),
1917 sdata
->vif
.cfg
.ssid
,
1918 sdata
->vif
.cfg
.ssid_len
);
1922 LOCAL_PR_FMT VIF_PR_FMT
,
1923 LOCAL_PR_ARG
, VIF_PR_ARG
1927 DEFINE_EVENT(local_sdata_evt
, drv_leave_ibss
,
1928 TP_PROTO(struct ieee80211_local
*local
,
1929 struct ieee80211_sub_if_data
*sdata
),
1930 TP_ARGS(local
, sdata
)
1933 TRACE_EVENT(drv_get_expected_throughput
,
1934 TP_PROTO(struct ieee80211_sta
*sta
),
1947 STA_PR_FMT
, STA_PR_ARG
1951 TRACE_EVENT(drv_start_nan
,
1952 TP_PROTO(struct ieee80211_local
*local
,
1953 struct ieee80211_sub_if_data
*sdata
,
1954 struct cfg80211_nan_conf
*conf
),
1956 TP_ARGS(local
, sdata
, conf
),
1960 __field(u8
, master_pref
)
1967 __entry
->master_pref
= conf
->master_pref
;
1968 __entry
->bands
= conf
->bands
;
1972 LOCAL_PR_FMT VIF_PR_FMT
1973 ", master preference: %u, bands: 0x%0x",
1974 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->master_pref
,
1979 TRACE_EVENT(drv_stop_nan
,
1980 TP_PROTO(struct ieee80211_local
*local
,
1981 struct ieee80211_sub_if_data
*sdata
),
1983 TP_ARGS(local
, sdata
),
1996 LOCAL_PR_FMT VIF_PR_FMT
,
1997 LOCAL_PR_ARG
, VIF_PR_ARG
2001 TRACE_EVENT(drv_nan_change_conf
,
2002 TP_PROTO(struct ieee80211_local
*local
,
2003 struct ieee80211_sub_if_data
*sdata
,
2004 struct cfg80211_nan_conf
*conf
,
2007 TP_ARGS(local
, sdata
, conf
, changes
),
2011 __field(u8
, master_pref
)
2013 __field(u32
, changes
)
2019 __entry
->master_pref
= conf
->master_pref
;
2020 __entry
->bands
= conf
->bands
;
2021 __entry
->changes
= changes
;
2025 LOCAL_PR_FMT VIF_PR_FMT
2026 ", master preference: %u, bands: 0x%0x, changes: 0x%x",
2027 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->master_pref
,
2028 __entry
->bands
, __entry
->changes
2032 TRACE_EVENT(drv_add_nan_func
,
2033 TP_PROTO(struct ieee80211_local
*local
,
2034 struct ieee80211_sub_if_data
*sdata
,
2035 const struct cfg80211_nan_func
*func
),
2037 TP_ARGS(local
, sdata
, func
),
2042 __field(u8
, inst_id
)
2048 __entry
->type
= func
->type
;
2049 __entry
->inst_id
= func
->instance_id
;
2053 LOCAL_PR_FMT VIF_PR_FMT
2054 ", type: %u, inst_id: %u",
2055 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->type
, __entry
->inst_id
2059 TRACE_EVENT(drv_del_nan_func
,
2060 TP_PROTO(struct ieee80211_local
*local
,
2061 struct ieee80211_sub_if_data
*sdata
,
2064 TP_ARGS(local
, sdata
, instance_id
),
2068 __field(u8
, instance_id
)
2074 __entry
->instance_id
= instance_id
;
2078 LOCAL_PR_FMT VIF_PR_FMT
2079 ", instance_id: %u",
2080 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->instance_id
2084 DEFINE_EVENT(local_sdata_evt
, drv_start_pmsr
,
2085 TP_PROTO(struct ieee80211_local
*local
,
2086 struct ieee80211_sub_if_data
*sdata
),
2087 TP_ARGS(local
, sdata
)
2090 DEFINE_EVENT(local_sdata_evt
, drv_abort_pmsr
,
2091 TP_PROTO(struct ieee80211_local
*local
,
2092 struct ieee80211_sub_if_data
*sdata
),
2093 TP_ARGS(local
, sdata
)
2096 TRACE_EVENT(drv_set_default_unicast_key
,
2097 TP_PROTO(struct ieee80211_local
*local
,
2098 struct ieee80211_sub_if_data
*sdata
,
2101 TP_ARGS(local
, sdata
, key_idx
),
2106 __field(int, key_idx
)
2112 __entry
->key_idx
= key_idx
;
2115 TP_printk(LOCAL_PR_FMT VIF_PR_FMT
" key_idx:%d",
2116 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->key_idx
)
2119 TRACE_EVENT(drv_channel_switch_beacon
,
2120 TP_PROTO(struct ieee80211_local
*local
,
2121 struct ieee80211_sub_if_data
*sdata
,
2122 struct cfg80211_chan_def
*chandef
),
2124 TP_ARGS(local
, sdata
, chandef
),
2135 CHANDEF_ASSIGN(chandef
);
2139 LOCAL_PR_FMT VIF_PR_FMT
" channel switch to " CHANDEF_PR_FMT
,
2140 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANDEF_PR_ARG
2144 DEFINE_EVENT(chanswitch_evt
, drv_pre_channel_switch
,
2145 TP_PROTO(struct ieee80211_local
*local
,
2146 struct ieee80211_sub_if_data
*sdata
,
2147 struct ieee80211_channel_switch
*ch_switch
),
2148 TP_ARGS(local
, sdata
, ch_switch
)
2151 DEFINE_EVENT(local_sdata_evt
, drv_post_channel_switch
,
2152 TP_PROTO(struct ieee80211_local
*local
,
2153 struct ieee80211_sub_if_data
*sdata
),
2154 TP_ARGS(local
, sdata
)
2157 DEFINE_EVENT(local_sdata_evt
, drv_abort_channel_switch
,
2158 TP_PROTO(struct ieee80211_local
*local
,
2159 struct ieee80211_sub_if_data
*sdata
),
2160 TP_ARGS(local
, sdata
)
2163 DEFINE_EVENT(chanswitch_evt
, drv_channel_switch_rx_beacon
,
2164 TP_PROTO(struct ieee80211_local
*local
,
2165 struct ieee80211_sub_if_data
*sdata
,
2166 struct ieee80211_channel_switch
*ch_switch
),
2167 TP_ARGS(local
, sdata
, ch_switch
)
2170 TRACE_EVENT(drv_get_txpower
,
2171 TP_PROTO(struct ieee80211_local
*local
,
2172 struct ieee80211_sub_if_data
*sdata
,
2175 TP_ARGS(local
, sdata
, dbm
, ret
),
2192 LOCAL_PR_FMT VIF_PR_FMT
" dbm:%d ret:%d",
2193 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->dbm
, __entry
->ret
2197 TRACE_EVENT(drv_tdls_channel_switch
,
2198 TP_PROTO(struct ieee80211_local
*local
,
2199 struct ieee80211_sub_if_data
*sdata
,
2200 struct ieee80211_sta
*sta
, u8 oper_class
,
2201 struct cfg80211_chan_def
*chandef
),
2203 TP_ARGS(local
, sdata
, sta
, oper_class
, chandef
),
2209 __field(u8
, oper_class
)
2217 __entry
->oper_class
= oper_class
;
2218 CHANDEF_ASSIGN(chandef
)
2222 LOCAL_PR_FMT VIF_PR_FMT
" tdls channel switch to"
2223 CHANDEF_PR_FMT
" oper_class:%d " STA_PR_FMT
,
2224 LOCAL_PR_ARG
, VIF_PR_ARG
, CHANDEF_PR_ARG
, __entry
->oper_class
,
2229 TRACE_EVENT(drv_tdls_cancel_channel_switch
,
2230 TP_PROTO(struct ieee80211_local
*local
,
2231 struct ieee80211_sub_if_data
*sdata
,
2232 struct ieee80211_sta
*sta
),
2234 TP_ARGS(local
, sdata
, sta
),
2249 LOCAL_PR_FMT VIF_PR_FMT
2250 " tdls cancel channel switch with " STA_PR_FMT
,
2251 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
2255 TRACE_EVENT(drv_tdls_recv_channel_switch
,
2256 TP_PROTO(struct ieee80211_local
*local
,
2257 struct ieee80211_sub_if_data
*sdata
,
2258 struct ieee80211_tdls_ch_sw_params
*params
),
2260 TP_ARGS(local
, sdata
, params
),
2265 __field(u8
, action_code
)
2268 __field(u32
, status
)
2269 __field(bool, peer_initiator
)
2270 __field(u32
, timestamp
)
2271 __field(u16
, switch_time
)
2272 __field(u16
, switch_timeout
)
2278 STA_NAMED_ASSIGN(params
->sta
);
2279 CHANDEF_ASSIGN(params
->chandef
)
2280 __entry
->peer_initiator
= params
->sta
->tdls_initiator
;
2281 __entry
->action_code
= params
->action_code
;
2282 __entry
->status
= params
->status
;
2283 __entry
->timestamp
= params
->timestamp
;
2284 __entry
->switch_time
= params
->switch_time
;
2285 __entry
->switch_timeout
= params
->switch_timeout
;
2289 LOCAL_PR_FMT VIF_PR_FMT
" received tdls channel switch packet"
2290 " action:%d status:%d time:%d switch time:%d switch"
2291 " timeout:%d initiator: %d chan:" CHANDEF_PR_FMT STA_PR_FMT
,
2292 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->action_code
, __entry
->status
,
2293 __entry
->timestamp
, __entry
->switch_time
,
2294 __entry
->switch_timeout
, __entry
->peer_initiator
,
2295 CHANDEF_PR_ARG
, STA_PR_ARG
2299 TRACE_EVENT(drv_wake_tx_queue
,
2300 TP_PROTO(struct ieee80211_local
*local
,
2301 struct ieee80211_sub_if_data
*sdata
,
2302 struct txq_info
*txq
),
2304 TP_ARGS(local
, sdata
, txq
),
2315 struct ieee80211_sta
*sta
= txq
->txq
.sta
;
2320 __entry
->ac
= txq
->txq
.ac
;
2321 __entry
->tid
= txq
->txq
.tid
;
2325 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" ac:%d tid:%d",
2326 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->ac
, __entry
->tid
2330 TRACE_EVENT(drv_get_ftm_responder_stats
,
2331 TP_PROTO(struct ieee80211_local
*local
,
2332 struct ieee80211_sub_if_data
*sdata
,
2333 struct cfg80211_ftm_responder_stats
*ftm_stats
),
2335 TP_ARGS(local
, sdata
, ftm_stats
),
2348 LOCAL_PR_FMT VIF_PR_FMT
,
2349 LOCAL_PR_ARG
, VIF_PR_ARG
2353 DEFINE_EVENT(local_sdata_addr_evt
, drv_update_vif_offload
,
2354 TP_PROTO(struct ieee80211_local
*local
,
2355 struct ieee80211_sub_if_data
*sdata
),
2356 TP_ARGS(local
, sdata
)
2359 DECLARE_EVENT_CLASS(sta_flag_evt
,
2360 TP_PROTO(struct ieee80211_local
*local
,
2361 struct ieee80211_sub_if_data
*sdata
,
2362 struct ieee80211_sta
*sta
, bool enabled
),
2364 TP_ARGS(local
, sdata
, sta
, enabled
),
2370 __field(bool, enabled
)
2377 __entry
->enabled
= enabled
;
2381 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" enabled:%d",
2382 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
, __entry
->enabled
2386 DEFINE_EVENT(sta_flag_evt
, drv_sta_set_4addr
,
2387 TP_PROTO(struct ieee80211_local
*local
,
2388 struct ieee80211_sub_if_data
*sdata
,
2389 struct ieee80211_sta
*sta
, bool enabled
),
2391 TP_ARGS(local
, sdata
, sta
, enabled
)
2394 DEFINE_EVENT(sta_flag_evt
, drv_sta_set_decap_offload
,
2395 TP_PROTO(struct ieee80211_local
*local
,
2396 struct ieee80211_sub_if_data
*sdata
,
2397 struct ieee80211_sta
*sta
, bool enabled
),
2399 TP_ARGS(local
, sdata
, sta
, enabled
)
2402 TRACE_EVENT(drv_add_twt_setup
,
2403 TP_PROTO(struct ieee80211_local
*local
,
2404 struct ieee80211_sta
*sta
,
2405 struct ieee80211_twt_setup
*twt
,
2406 struct ieee80211_twt_params
*twt_agrt
),
2408 TP_ARGS(local
, sta
, twt
, twt_agrt
),
2413 __field(u8
, dialog_token
)
2414 __field(u8
, control
)
2415 __field(__le16
, req_type
)
2416 __field(__le64
, twt
)
2417 __field(u8
, duration
)
2418 __field(__le16
, mantissa
)
2419 __field(u8
, channel
)
2425 __entry
->dialog_token
= twt
->dialog_token
;
2426 __entry
->control
= twt
->control
;
2427 __entry
->req_type
= twt_agrt
->req_type
;
2428 __entry
->twt
= twt_agrt
->twt
;
2429 __entry
->duration
= twt_agrt
->min_twt_dur
;
2430 __entry
->mantissa
= twt_agrt
->mantissa
;
2431 __entry
->channel
= twt_agrt
->channel
;
2435 LOCAL_PR_FMT STA_PR_FMT
2436 " token:%d control:0x%02x req_type:0x%04x"
2437 " twt:%llu duration:%d mantissa:%d channel:%d",
2438 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->dialog_token
,
2439 __entry
->control
, le16_to_cpu(__entry
->req_type
),
2440 le64_to_cpu(__entry
->twt
), __entry
->duration
,
2441 le16_to_cpu(__entry
->mantissa
), __entry
->channel
2445 TRACE_EVENT(drv_twt_teardown_request
,
2446 TP_PROTO(struct ieee80211_local
*local
,
2447 struct ieee80211_sta
*sta
, u8 flowid
),
2449 TP_ARGS(local
, sta
, flowid
),
2460 __entry
->flowid
= flowid
;
2464 LOCAL_PR_FMT STA_PR_FMT
" flowid:%d",
2465 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->flowid
2469 DEFINE_EVENT(sta_event
, drv_net_fill_forward_path
,
2470 TP_PROTO(struct ieee80211_local
*local
,
2471 struct ieee80211_sub_if_data
*sdata
,
2472 struct ieee80211_sta
*sta
),
2473 TP_ARGS(local
, sdata
, sta
)
2476 TRACE_EVENT(drv_net_setup_tc
,
2477 TP_PROTO(struct ieee80211_local
*local
,
2478 struct ieee80211_sub_if_data
*sdata
,
2481 TP_ARGS(local
, sdata
, type
),
2492 __entry
->type
= type
;
2496 LOCAL_PR_FMT VIF_PR_FMT
" type:%d\n",
2497 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->type
2501 TRACE_EVENT(drv_can_activate_links
,
2502 TP_PROTO(struct ieee80211_local
*local
,
2503 struct ieee80211_sub_if_data
*sdata
,
2506 TP_ARGS(local
, sdata
, active_links
),
2511 __field(u16
, active_links
)
2517 __entry
->active_links
= active_links
;
2521 LOCAL_PR_FMT VIF_PR_FMT
" requested active_links:0x%04x\n",
2522 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->active_links
2526 TRACE_EVENT(drv_change_vif_links
,
2527 TP_PROTO(struct ieee80211_local
*local
,
2528 struct ieee80211_sub_if_data
*sdata
,
2529 u16 old_links
, u16 new_links
),
2531 TP_ARGS(local
, sdata
, old_links
, new_links
),
2536 __field(u16
, old_links
)
2537 __field(u16
, new_links
)
2543 __entry
->old_links
= old_links
;
2544 __entry
->new_links
= new_links
;
2548 LOCAL_PR_FMT VIF_PR_FMT
" old_links:0x%04x, new_links:0x%04x\n",
2549 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->old_links
, __entry
->new_links
2553 TRACE_EVENT(drv_change_sta_links
,
2554 TP_PROTO(struct ieee80211_local
*local
,
2555 struct ieee80211_sub_if_data
*sdata
,
2556 struct ieee80211_sta
*sta
,
2557 u16 old_links
, u16 new_links
),
2559 TP_ARGS(local
, sdata
, sta
, old_links
, new_links
),
2565 __field(u16
, old_links
)
2566 __field(u16
, new_links
)
2573 __entry
->old_links
= old_links
;
2574 __entry
->new_links
= new_links
;
2578 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT
" old_links:0x%04x, new_links:0x%04x\n",
2579 LOCAL_PR_ARG
, VIF_PR_ARG
, STA_PR_ARG
,
2580 __entry
->old_links
, __entry
->new_links
2585 * Tracing for API calls that drivers call.
2588 TRACE_EVENT(api_start_tx_ba_session
,
2589 TP_PROTO(struct ieee80211_sta
*sta
, u16 tid
),
2604 STA_PR_FMT
" tid:%d",
2605 STA_PR_ARG
, __entry
->tid
2609 TRACE_EVENT(api_start_tx_ba_cb
,
2610 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, const u8
*ra
, u16 tid
),
2612 TP_ARGS(sdata
, ra
, tid
),
2616 __array(u8
, ra
, ETH_ALEN
)
2622 memcpy(__entry
->ra
, ra
, ETH_ALEN
);
2627 VIF_PR_FMT
" ra:%pM tid:%d",
2628 VIF_PR_ARG
, __entry
->ra
, __entry
->tid
2632 TRACE_EVENT(api_stop_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_stop_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 DEFINE_EVENT(local_only_evt
, api_restart_hw
,
2677 TP_PROTO(struct ieee80211_local
*local
),
2681 TRACE_EVENT(api_beacon_loss
,
2682 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
2700 TRACE_EVENT(api_connection_loss
,
2701 TP_PROTO(struct ieee80211_sub_if_data
*sdata
),
2719 TRACE_EVENT(api_disconnect
,
2720 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, bool reconnect
),
2722 TP_ARGS(sdata
, reconnect
),
2726 __field(int, reconnect
)
2731 __entry
->reconnect
= reconnect
;
2735 VIF_PR_FMT
" reconnect:%d",
2736 VIF_PR_ARG
, __entry
->reconnect
2740 TRACE_EVENT(api_cqm_rssi_notify
,
2741 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
2742 enum nl80211_cqm_rssi_threshold_event rssi_event
,
2745 TP_ARGS(sdata
, rssi_event
, rssi_level
),
2749 __field(u32
, rssi_event
)
2750 __field(s32
, rssi_level
)
2755 __entry
->rssi_event
= rssi_event
;
2756 __entry
->rssi_level
= rssi_level
;
2760 VIF_PR_FMT
" event:%d rssi:%d",
2761 VIF_PR_ARG
, __entry
->rssi_event
, __entry
->rssi_level
2765 DEFINE_EVENT(local_sdata_evt
, api_cqm_beacon_loss_notify
,
2766 TP_PROTO(struct ieee80211_local
*local
,
2767 struct ieee80211_sub_if_data
*sdata
),
2768 TP_ARGS(local
, sdata
)
2771 TRACE_EVENT(api_scan_completed
,
2772 TP_PROTO(struct ieee80211_local
*local
, bool aborted
),
2774 TP_ARGS(local
, aborted
),
2778 __field(bool, aborted
)
2783 __entry
->aborted
= aborted
;
2787 LOCAL_PR_FMT
" aborted:%d",
2788 LOCAL_PR_ARG
, __entry
->aborted
2792 TRACE_EVENT(api_sched_scan_results
,
2793 TP_PROTO(struct ieee80211_local
*local
),
2806 LOCAL_PR_FMT
, LOCAL_PR_ARG
2810 TRACE_EVENT(api_sched_scan_stopped
,
2811 TP_PROTO(struct ieee80211_local
*local
),
2824 LOCAL_PR_FMT
, LOCAL_PR_ARG
2828 TRACE_EVENT(api_sta_block_awake
,
2829 TP_PROTO(struct ieee80211_local
*local
,
2830 struct ieee80211_sta
*sta
, bool block
),
2832 TP_ARGS(local
, sta
, block
),
2837 __field(bool, block
)
2843 __entry
->block
= block
;
2847 LOCAL_PR_FMT STA_PR_FMT
" block:%d",
2848 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->block
2852 TRACE_EVENT(api_chswitch_done
,
2853 TP_PROTO(struct ieee80211_sub_if_data
*sdata
, bool success
,
2854 unsigned int link_id
),
2856 TP_ARGS(sdata
, success
, link_id
),
2860 __field(bool, success
)
2861 __field(unsigned int, link_id
)
2866 __entry
->success
= success
;
2867 __entry
->link_id
= link_id
;
2871 VIF_PR_FMT
" success=%d link_id=%d",
2872 VIF_PR_ARG
, __entry
->success
, __entry
->link_id
2876 DEFINE_EVENT(local_only_evt
, api_ready_on_channel
,
2877 TP_PROTO(struct ieee80211_local
*local
),
2881 DEFINE_EVENT(local_only_evt
, api_remain_on_channel_expired
,
2882 TP_PROTO(struct ieee80211_local
*local
),
2886 TRACE_EVENT(api_gtk_rekey_notify
,
2887 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
2888 const u8
*bssid
, const u8
*replay_ctr
),
2890 TP_ARGS(sdata
, bssid
, replay_ctr
),
2894 __array(u8
, bssid
, ETH_ALEN
)
2895 __array(u8
, replay_ctr
, NL80211_REPLAY_CTR_LEN
)
2900 memcpy(__entry
->bssid
, bssid
, ETH_ALEN
);
2901 memcpy(__entry
->replay_ctr
, replay_ctr
, NL80211_REPLAY_CTR_LEN
);
2904 TP_printk(VIF_PR_FMT
, VIF_PR_ARG
)
2907 TRACE_EVENT(api_enable_rssi_reports
,
2908 TP_PROTO(struct ieee80211_sub_if_data
*sdata
,
2909 int rssi_min_thold
, int rssi_max_thold
),
2911 TP_ARGS(sdata
, rssi_min_thold
, rssi_max_thold
),
2915 __field(int, rssi_min_thold
)
2916 __field(int, rssi_max_thold
)
2921 __entry
->rssi_min_thold
= rssi_min_thold
;
2922 __entry
->rssi_max_thold
= rssi_max_thold
;
2926 VIF_PR_FMT
" rssi_min_thold =%d, rssi_max_thold = %d",
2927 VIF_PR_ARG
, __entry
->rssi_min_thold
, __entry
->rssi_max_thold
2931 TRACE_EVENT(api_eosp
,
2932 TP_PROTO(struct ieee80211_local
*local
,
2933 struct ieee80211_sta
*sta
),
2935 TP_ARGS(local
, sta
),
2948 LOCAL_PR_FMT STA_PR_FMT
,
2949 LOCAL_PR_ARG
, STA_PR_ARG
2953 TRACE_EVENT(api_send_eosp_nullfunc
,
2954 TP_PROTO(struct ieee80211_local
*local
,
2955 struct ieee80211_sta
*sta
,
2958 TP_ARGS(local
, sta
, tid
),
2973 LOCAL_PR_FMT STA_PR_FMT
" tid:%d",
2974 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->tid
2978 TRACE_EVENT(api_sta_set_buffered
,
2979 TP_PROTO(struct ieee80211_local
*local
,
2980 struct ieee80211_sta
*sta
,
2981 u8 tid
, bool buffered
),
2983 TP_ARGS(local
, sta
, tid
, buffered
),
2989 __field(bool, buffered
)
2996 __entry
->buffered
= buffered
;
3000 LOCAL_PR_FMT STA_PR_FMT
" tid:%d buffered:%d",
3001 LOCAL_PR_ARG
, STA_PR_ARG
, __entry
->tid
, __entry
->buffered
3005 TRACE_EVENT(api_radar_detected
,
3006 TP_PROTO(struct ieee80211_local
*local
),
3019 LOCAL_PR_FMT
" radar detected",
3024 TRACE_EVENT(api_request_smps
,
3025 TP_PROTO(struct ieee80211_local
*local
,
3026 struct ieee80211_sub_if_data
*sdata
,
3027 struct ieee80211_link_data
*link
,
3028 enum ieee80211_smps_mode smps_mode
),
3030 TP_ARGS(local
, sdata
, link
, smps_mode
),
3035 __field(int, link_id
)
3036 __field(u32
, smps_mode
)
3042 __entry
->link_id
= link
->link_id
,
3043 __entry
->smps_mode
= smps_mode
;
3047 LOCAL_PR_FMT
" " VIF_PR_FMT
" link:%d, smps_mode:%d",
3048 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->link_id
, __entry
->smps_mode
3053 * Tracing for internal functions
3054 * (which may also be called in response to driver calls)
3057 TRACE_EVENT(wake_queue
,
3058 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
3059 enum queue_stop_reason reason
),
3061 TP_ARGS(local
, queue
, reason
),
3066 __field(u32
, reason
)
3071 __entry
->queue
= queue
;
3072 __entry
->reason
= reason
;
3076 LOCAL_PR_FMT
" queue:%d, reason:%d",
3077 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
3081 TRACE_EVENT(stop_queue
,
3082 TP_PROTO(struct ieee80211_local
*local
, u16 queue
,
3083 enum queue_stop_reason reason
),
3085 TP_ARGS(local
, queue
, reason
),
3090 __field(u32
, reason
)
3095 __entry
->queue
= queue
;
3096 __entry
->reason
= reason
;
3100 LOCAL_PR_FMT
" queue:%d, reason:%d",
3101 LOCAL_PR_ARG
, __entry
->queue
, __entry
->reason
3105 TRACE_EVENT(drv_can_neg_ttlm
,
3106 TP_PROTO(struct ieee80211_local
*local
,
3107 struct ieee80211_sub_if_data
*sdata
,
3108 struct ieee80211_neg_ttlm
*neg_ttlm
),
3110 TP_ARGS(local
, sdata
, neg_ttlm
),
3112 TP_STRUCT__entry(LOCAL_ENTRY
3114 __array(u16
, downlink
, sizeof(u16
) * 8)
3115 __array(u16
, uplink
, sizeof(u16
) * 8)
3118 TP_fast_assign(LOCAL_ASSIGN
;
3120 memcpy(__entry
->downlink
, neg_ttlm
->downlink
,
3121 sizeof(neg_ttlm
->downlink
));
3122 memcpy(__entry
->uplink
, neg_ttlm
->uplink
,
3123 sizeof(neg_ttlm
->uplink
));
3126 TP_printk(LOCAL_PR_FMT
", " VIF_PR_FMT
, LOCAL_PR_ARG
, VIF_PR_ARG
)
3129 TRACE_EVENT(drv_neg_ttlm_res
,
3130 TP_PROTO(struct ieee80211_local
*local
,
3131 struct ieee80211_sub_if_data
*sdata
,
3132 enum ieee80211_neg_ttlm_res res
,
3133 struct ieee80211_neg_ttlm
*neg_ttlm
),
3135 TP_ARGS(local
, sdata
, res
, neg_ttlm
),
3137 TP_STRUCT__entry(LOCAL_ENTRY
3140 __array(u16
, downlink
, sizeof(u16
) * 8)
3141 __array(u16
, uplink
, sizeof(u16
) * 8)
3144 TP_fast_assign(LOCAL_ASSIGN
;
3147 memcpy(__entry
->downlink
, neg_ttlm
->downlink
,
3148 sizeof(neg_ttlm
->downlink
));
3149 memcpy(__entry
->uplink
, neg_ttlm
->uplink
,
3150 sizeof(neg_ttlm
->uplink
));
3153 TP_printk(LOCAL_PR_FMT VIF_PR_FMT
" response: %d\n ",
3154 LOCAL_PR_ARG
, VIF_PR_ARG
, __entry
->res
3157 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
3159 #undef TRACE_INCLUDE_PATH
3160 #define TRACE_INCLUDE_PATH .
3161 #undef TRACE_INCLUDE_FILE
3162 #define TRACE_INCLUDE_FILE trace
3163 #include <trace/define_trace.h>