1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Portions of this file
4 * Copyright(c) 2016-2017 Intel Deutschland GmbH
5 * Copyright (C) 2018 - 2023 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, sdata->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 " control:%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 " min_control:%d.%03d MHz min_width:%d min_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 CHANCTX_ENTRY CHANDEF_ENTRY \
80 __field(u8, rx_chains_static) \
81 __field(u8, rx_chains_dynamic)
82 #define CHANCTX_ASSIGN CHANDEF_ASSIGN(&ctx->conf.def) \
83 MIN_CHANDEF_ASSIGN(&ctx->conf.min_def) \
84 __entry->rx_chains_static = ctx->conf.rx_chains_static; \
85 __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic
86 #define CHANCTX_PR_FMT CHANDEF_PR_FMT MIN_CHANDEF_PR_FMT " chains:%d/%d"
87 #define CHANCTX_PR_ARG CHANDEF_PR_ARG, MIN_CHANDEF_PR_ARG, \
88 __entry->rx_chains_static, __entry->rx_chains_dynamic
90 #define KEY_ENTRY __field(u32, cipher) \
91 __field(u8, hw_key_idx) \
94 #define KEY_ASSIGN(k) __entry->cipher = (k)->cipher; \
95 __entry->flags = (k)->flags; \
96 __entry->keyidx = (k)->keyidx; \
97 __entry->hw_key_idx = (k)->hw_key_idx;
98 #define KEY_PR_FMT " cipher:0x%x, flags=%#x, keyidx=%d, hw_key_idx=%d"
99 #define KEY_PR_ARG __entry->cipher, __entry->flags, __entry->keyidx, __entry->hw_key_idx
101 #define AMPDU_ACTION_ENTRY __field(enum ieee80211_ampdu_mlme_action, \
102 ieee80211_ampdu_mlme_action) \
106 __field(u16, buf_size) \
107 __field(bool, amsdu) \
108 __field(u16, timeout) \
110 #define AMPDU_ACTION_ASSIGN STA_NAMED_ASSIGN(params->sta); \
111 __entry->tid = params->tid; \
112 __entry->ssn = params->ssn; \
113 __entry->buf_size = params->buf_size; \
114 __entry->amsdu = params->amsdu; \
115 __entry->timeout = params->timeout; \
116 __entry->action = params->action;
117 #define AMPDU_ACTION_PR_FMT STA_PR_FMT " tid %d, ssn %d, buf_size %u, amsdu %d, timeout %d action %d"
118 #define AMPDU_ACTION_PR_ARG STA_PR_ARG, __entry->tid, __entry->ssn, \
119 __entry->buf_size, __entry->amsdu, __entry->timeout, \
123 * Tracing for driver callbacks.
126 DECLARE_EVENT_CLASS(local_only_evt,
127 TP_PROTO(struct ieee80211_local *local),
135 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
138 DECLARE_EVENT_CLASS(local_sdata_addr_evt,
139 TP_PROTO(struct ieee80211_local *local,
140 struct ieee80211_sub_if_data *sdata),
141 TP_ARGS(local, sdata),
146 __array(char, addr, ETH_ALEN)
152 memcpy(__entry->addr, sdata->vif.addr, ETH_ALEN);
156 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
157 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
161 DECLARE_EVENT_CLASS(local_u32_evt,
162 TP_PROTO(struct ieee80211_local *local, u32 value),
163 TP_ARGS(local, value),
172 __entry->value = value;
176 LOCAL_PR_FMT " value:%d",
177 LOCAL_PR_ARG, __entry->value
181 DECLARE_EVENT_CLASS(local_sdata_evt,
182 TP_PROTO(struct ieee80211_local *local,
183 struct ieee80211_sub_if_data *sdata),
184 TP_ARGS(local, sdata),
197 LOCAL_PR_FMT VIF_PR_FMT,
198 LOCAL_PR_ARG, VIF_PR_ARG
202 DEFINE_EVENT(local_only_evt, drv_return_void,
203 TP_PROTO(struct ieee80211_local *local),
207 TRACE_EVENT(drv_return_int,
208 TP_PROTO(struct ieee80211_local *local, int ret),
218 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
221 TRACE_EVENT(drv_return_bool,
222 TP_PROTO(struct ieee80211_local *local, bool ret),
232 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
236 TRACE_EVENT(drv_return_u32,
237 TP_PROTO(struct ieee80211_local *local, u32 ret),
247 TP_printk(LOCAL_PR_FMT " - %u", LOCAL_PR_ARG, __entry->ret)
250 TRACE_EVENT(drv_return_u64,
251 TP_PROTO(struct ieee80211_local *local, u64 ret),
261 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
264 DEFINE_EVENT(local_only_evt, drv_start,
265 TP_PROTO(struct ieee80211_local *local),
269 DEFINE_EVENT(local_u32_evt, drv_get_et_strings,
270 TP_PROTO(struct ieee80211_local *local, u32 sset),
274 DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count,
275 TP_PROTO(struct ieee80211_local *local, u32 sset),
279 DEFINE_EVENT(local_only_evt, drv_get_et_stats,
280 TP_PROTO(struct ieee80211_local *local),
284 DEFINE_EVENT(local_only_evt, drv_suspend,
285 TP_PROTO(struct ieee80211_local *local),
289 DEFINE_EVENT(local_only_evt, drv_resume,
290 TP_PROTO(struct ieee80211_local *local),
294 TRACE_EVENT(drv_set_wakeup,
295 TP_PROTO(struct ieee80211_local *local, bool enabled),
296 TP_ARGS(local, enabled),
299 __field(bool, enabled)
303 __entry->enabled = enabled;
305 TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
308 DEFINE_EVENT(local_only_evt, drv_stop,
309 TP_PROTO(struct ieee80211_local *local),
313 DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
314 TP_PROTO(struct ieee80211_local *local,
315 struct ieee80211_sub_if_data *sdata),
316 TP_ARGS(local, sdata)
319 TRACE_EVENT(drv_change_interface,
320 TP_PROTO(struct ieee80211_local *local,
321 struct ieee80211_sub_if_data *sdata,
322 enum nl80211_iftype type, bool p2p),
324 TP_ARGS(local, sdata, type, p2p),
329 __field(u32, new_type)
330 __field(bool, new_p2p)
336 __entry->new_type = type;
337 __entry->new_p2p = p2p;
341 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
342 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
343 __entry->new_p2p ? "/p2p" : ""
347 DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
348 TP_PROTO(struct ieee80211_local *local,
349 struct ieee80211_sub_if_data *sdata),
350 TP_ARGS(local, sdata)
353 TRACE_EVENT(drv_config,
354 TP_PROTO(struct ieee80211_local *local,
357 TP_ARGS(local, changed),
361 __field(u32, changed)
363 __field(int, power_level)
364 __field(int, dynamic_ps_timeout)
365 __field(u16, listen_interval)
366 __field(u8, long_frame_max_tx_count)
367 __field(u8, short_frame_max_tx_count)
374 __entry->changed = changed;
375 __entry->flags = local->hw.conf.flags;
376 __entry->power_level = local->hw.conf.power_level;
377 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
378 __entry->listen_interval = local->hw.conf.listen_interval;
379 __entry->long_frame_max_tx_count =
380 local->hw.conf.long_frame_max_tx_count;
381 __entry->short_frame_max_tx_count =
382 local->hw.conf.short_frame_max_tx_count;
383 CHANDEF_ASSIGN(&local->hw.conf.chandef)
384 __entry->smps = local->hw.conf.smps_mode;
388 LOCAL_PR_FMT " ch:%#x" CHANDEF_PR_FMT,
389 LOCAL_PR_ARG, __entry->changed, CHANDEF_PR_ARG
393 TRACE_EVENT(drv_vif_cfg_changed,
394 TP_PROTO(struct ieee80211_local *local,
395 struct ieee80211_sub_if_data *sdata,
398 TP_ARGS(local, sdata, changed),
403 __field(u64, changed)
405 __field(bool, ibss_joined)
406 __field(bool, ibss_creator)
408 __dynamic_array(u32, arp_addr_list,
409 sdata->vif.cfg.arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
410 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
411 sdata->vif.cfg.arp_addr_cnt)
412 __field(int, arp_addr_cnt)
413 __dynamic_array(u8, ssid, sdata->vif.cfg.ssid_len)
422 __entry->changed = changed;
423 __entry->aid = sdata->vif.cfg.aid;
424 __entry->assoc = sdata->vif.cfg.assoc;
425 __entry->ibss_joined = sdata->vif.cfg.ibss_joined;
426 __entry->ibss_creator = sdata->vif.cfg.ibss_creator;
427 __entry->ps = sdata->vif.cfg.ps;
429 __entry->arp_addr_cnt = sdata->vif.cfg.arp_addr_cnt;
430 memcpy(__get_dynamic_array(arp_addr_list),
431 sdata->vif.cfg.arp_addr_list,
432 sizeof(u32) * (sdata->vif.cfg.arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
433 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
434 sdata->vif.cfg.arp_addr_cnt));
435 memcpy(__get_dynamic_array(ssid),
437 sdata->vif.cfg.ssid_len);
438 __entry->s1g = sdata->vif.cfg.s1g;
439 __entry->idle = sdata->vif.cfg.idle;
443 LOCAL_PR_FMT VIF_PR_FMT " changed:%#llx",
444 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
448 TRACE_EVENT(drv_link_info_changed,
449 TP_PROTO(struct ieee80211_local *local,
450 struct ieee80211_sub_if_data *sdata,
451 struct ieee80211_bss_conf *link_conf,
454 TP_ARGS(local, sdata, link_conf, changed),
459 __field(u64, changed)
460 __field(int, link_id)
462 __field(bool, shortpre)
463 __field(bool, shortslot)
464 __field(bool, enable_beacon)
467 __field(u16, assoc_cap)
468 __field(u64, sync_tsf)
469 __field(u32, sync_device_ts)
470 __field(u8, sync_dtim_count)
471 __field(u32, basic_rates)
472 __array(int, mcast_rate, NUM_NL80211_BANDS)
473 __field(u16, ht_operation_mode)
474 __field(s32, cqm_rssi_thold)
475 __field(s32, cqm_rssi_hyst)
476 __field(u32, channel_width)
477 __field(u32, channel_cfreq1)
478 __field(u32, channel_cfreq1_offset)
480 __field(bool, hidden_ssid)
481 __field(int, txpower)
482 __field(u8, p2p_oppps_ctwindow)
488 __entry->changed = changed;
489 __entry->link_id = link_conf->link_id;
490 __entry->shortpre = link_conf->use_short_preamble;
491 __entry->cts = link_conf->use_cts_prot;
492 __entry->shortslot = link_conf->use_short_slot;
493 __entry->enable_beacon = link_conf->enable_beacon;
494 __entry->dtimper = link_conf->dtim_period;
495 __entry->bcnint = link_conf->beacon_int;
496 __entry->assoc_cap = link_conf->assoc_capability;
497 __entry->sync_tsf = link_conf->sync_tsf;
498 __entry->sync_device_ts = link_conf->sync_device_ts;
499 __entry->sync_dtim_count = link_conf->sync_dtim_count;
500 __entry->basic_rates = link_conf->basic_rates;
501 memcpy(__entry->mcast_rate, link_conf->mcast_rate,
502 sizeof(__entry->mcast_rate));
503 __entry->ht_operation_mode = link_conf->ht_operation_mode;
504 __entry->cqm_rssi_thold = link_conf->cqm_rssi_thold;
505 __entry->cqm_rssi_hyst = link_conf->cqm_rssi_hyst;
506 __entry->channel_width = link_conf->chandef.width;
507 __entry->channel_cfreq1 = link_conf->chandef.center_freq1;
508 __entry->channel_cfreq1_offset = link_conf->chandef.freq1_offset;
509 __entry->qos = link_conf->qos;
510 __entry->hidden_ssid = link_conf->hidden_ssid;
511 __entry->txpower = link_conf->txpower;
512 __entry->p2p_oppps_ctwindow = link_conf->p2p_noa_attr.oppps_ctwindow;
516 LOCAL_PR_FMT VIF_PR_FMT " link_id:%d, changed:%#llx",
517 LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id,
522 TRACE_EVENT(drv_prepare_multicast,
523 TP_PROTO(struct ieee80211_local *local, int mc_count),
525 TP_ARGS(local, mc_count),
529 __field(int, mc_count)
534 __entry->mc_count = mc_count;
538 LOCAL_PR_FMT " prepare mc (%d)",
539 LOCAL_PR_ARG, __entry->mc_count
543 TRACE_EVENT(drv_configure_filter,
544 TP_PROTO(struct ieee80211_local *local,
545 unsigned int changed_flags,
546 unsigned int *total_flags,
549 TP_ARGS(local, changed_flags, total_flags, multicast),
553 __field(unsigned int, changed)
554 __field(unsigned int, total)
555 __field(u64, multicast)
560 __entry->changed = changed_flags;
561 __entry->total = *total_flags;
562 __entry->multicast = multicast;
566 LOCAL_PR_FMT " changed:%#x total:%#x",
567 LOCAL_PR_ARG, __entry->changed, __entry->total
571 TRACE_EVENT(drv_config_iface_filter,
572 TP_PROTO(struct ieee80211_local *local,
573 struct ieee80211_sub_if_data *sdata,
574 unsigned int filter_flags,
575 unsigned int changed_flags),
577 TP_ARGS(local, sdata, filter_flags, changed_flags),
582 __field(unsigned int, filter_flags)
583 __field(unsigned int, changed_flags)
589 __entry->filter_flags = filter_flags;
590 __entry->changed_flags = changed_flags;
594 LOCAL_PR_FMT VIF_PR_FMT
595 " filter_flags: %#x changed_flags: %#x",
596 LOCAL_PR_ARG, VIF_PR_ARG, __entry->filter_flags,
597 __entry->changed_flags
601 TRACE_EVENT(drv_set_tim,
602 TP_PROTO(struct ieee80211_local *local,
603 struct ieee80211_sta *sta, bool set),
605 TP_ARGS(local, sta, set),
620 LOCAL_PR_FMT STA_PR_FMT " set:%d",
621 LOCAL_PR_ARG, STA_PR_ARG, __entry->set
625 TRACE_EVENT(drv_set_key,
626 TP_PROTO(struct ieee80211_local *local,
627 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
628 struct ieee80211_sta *sta,
629 struct ieee80211_key_conf *key),
631 TP_ARGS(local, cmd, sdata, sta, key),
650 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd: %d" KEY_PR_FMT,
651 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd, KEY_PR_ARG
655 TRACE_EVENT(drv_update_tkip_key,
656 TP_PROTO(struct ieee80211_local *local,
657 struct ieee80211_sub_if_data *sdata,
658 struct ieee80211_key_conf *conf,
659 struct ieee80211_sta *sta, u32 iv32),
661 TP_ARGS(local, sdata, conf, sta, iv32),
674 __entry->iv32 = iv32;
678 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
679 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->iv32
683 DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
684 TP_PROTO(struct ieee80211_local *local,
685 struct ieee80211_sub_if_data *sdata),
686 TP_ARGS(local, sdata)
689 DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
690 TP_PROTO(struct ieee80211_local *local,
691 struct ieee80211_sub_if_data *sdata),
692 TP_ARGS(local, sdata)
695 DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
696 TP_PROTO(struct ieee80211_local *local,
697 struct ieee80211_sub_if_data *sdata),
698 TP_ARGS(local, sdata)
701 DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
702 TP_PROTO(struct ieee80211_local *local,
703 struct ieee80211_sub_if_data *sdata),
704 TP_ARGS(local, sdata)
707 TRACE_EVENT(drv_sw_scan_start,
708 TP_PROTO(struct ieee80211_local *local,
709 struct ieee80211_sub_if_data *sdata,
712 TP_ARGS(local, sdata, mac_addr),
717 __array(char, mac_addr, ETH_ALEN)
723 memcpy(__entry->mac_addr, mac_addr, ETH_ALEN);
726 TP_printk(LOCAL_PR_FMT ", " VIF_PR_FMT ", addr:%pM",
727 LOCAL_PR_ARG, VIF_PR_ARG, __entry->mac_addr)
730 DEFINE_EVENT(local_sdata_evt, drv_sw_scan_complete,
731 TP_PROTO(struct ieee80211_local *local,
732 struct ieee80211_sub_if_data *sdata),
733 TP_ARGS(local, sdata)
736 TRACE_EVENT(drv_get_stats,
737 TP_PROTO(struct ieee80211_local *local,
738 struct ieee80211_low_level_stats *stats,
741 TP_ARGS(local, stats, ret),
746 __field(unsigned int, ackfail)
747 __field(unsigned int, rtsfail)
748 __field(unsigned int, fcserr)
749 __field(unsigned int, rtssucc)
755 __entry->ackfail = stats->dot11ACKFailureCount;
756 __entry->rtsfail = stats->dot11RTSFailureCount;
757 __entry->fcserr = stats->dot11FCSErrorCount;
758 __entry->rtssucc = stats->dot11RTSSuccessCount;
762 LOCAL_PR_FMT " ret:%d",
763 LOCAL_PR_ARG, __entry->ret
767 TRACE_EVENT(drv_get_key_seq,
768 TP_PROTO(struct ieee80211_local *local,
769 struct ieee80211_key_conf *key),
784 LOCAL_PR_FMT KEY_PR_FMT,
785 LOCAL_PR_ARG, KEY_PR_ARG
789 DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
790 TP_PROTO(struct ieee80211_local *local, u32 value),
791 TP_ARGS(local, value)
794 DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
795 TP_PROTO(struct ieee80211_local *local, u32 value),
796 TP_ARGS(local, value)
799 TRACE_EVENT(drv_set_coverage_class,
800 TP_PROTO(struct ieee80211_local *local, s16 value),
802 TP_ARGS(local, value),
811 __entry->value = value;
815 LOCAL_PR_FMT " value:%d",
816 LOCAL_PR_ARG, __entry->value
820 TRACE_EVENT(drv_sta_notify,
821 TP_PROTO(struct ieee80211_local *local,
822 struct ieee80211_sub_if_data *sdata,
823 enum sta_notify_cmd cmd,
824 struct ieee80211_sta *sta),
826 TP_ARGS(local, sdata, cmd, sta),
843 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
844 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
848 TRACE_EVENT(drv_sta_state,
849 TP_PROTO(struct ieee80211_local *local,
850 struct ieee80211_sub_if_data *sdata,
851 struct ieee80211_sta *sta,
852 enum ieee80211_sta_state old_state,
853 enum ieee80211_sta_state new_state),
855 TP_ARGS(local, sdata, sta, old_state, new_state),
861 __field(u32, old_state)
862 __field(u32, new_state)
869 __entry->old_state = old_state;
870 __entry->new_state = new_state;
874 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
875 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
876 __entry->old_state, __entry->new_state
880 TRACE_EVENT(drv_sta_set_txpwr,
881 TP_PROTO(struct ieee80211_local *local,
882 struct ieee80211_sub_if_data *sdata,
883 struct ieee80211_sta *sta),
885 TP_ARGS(local, sdata, sta),
899 __entry->txpwr = sta->deflink.txpwr.power;
900 __entry->type = sta->deflink.txpwr.type;
904 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " txpwr: %d type %d",
905 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
906 __entry->txpwr, __entry->type
910 TRACE_EVENT(drv_sta_rc_update,
911 TP_PROTO(struct ieee80211_local *local,
912 struct ieee80211_sub_if_data *sdata,
913 struct ieee80211_sta *sta,
916 TP_ARGS(local, sdata, sta, changed),
922 __field(u32, changed)
929 __entry->changed = changed;
933 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
934 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
938 DECLARE_EVENT_CLASS(sta_event,
939 TP_PROTO(struct ieee80211_local *local,
940 struct ieee80211_sub_if_data *sdata,
941 struct ieee80211_sta *sta),
943 TP_ARGS(local, sdata, sta),
958 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
959 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
963 DEFINE_EVENT(sta_event, drv_sta_statistics,
964 TP_PROTO(struct ieee80211_local *local,
965 struct ieee80211_sub_if_data *sdata,
966 struct ieee80211_sta *sta),
967 TP_ARGS(local, sdata, sta)
970 DEFINE_EVENT(sta_event, drv_sta_add,
971 TP_PROTO(struct ieee80211_local *local,
972 struct ieee80211_sub_if_data *sdata,
973 struct ieee80211_sta *sta),
974 TP_ARGS(local, sdata, sta)
977 DEFINE_EVENT(sta_event, drv_sta_remove,
978 TP_PROTO(struct ieee80211_local *local,
979 struct ieee80211_sub_if_data *sdata,
980 struct ieee80211_sta *sta),
981 TP_ARGS(local, sdata, sta)
984 DEFINE_EVENT(sta_event, drv_sta_pre_rcu_remove,
985 TP_PROTO(struct ieee80211_local *local,
986 struct ieee80211_sub_if_data *sdata,
987 struct ieee80211_sta *sta),
988 TP_ARGS(local, sdata, sta)
991 DEFINE_EVENT(sta_event, drv_sync_rx_queues,
992 TP_PROTO(struct ieee80211_local *local,
993 struct ieee80211_sub_if_data *sdata,
994 struct ieee80211_sta *sta),
995 TP_ARGS(local, sdata, sta)
998 DEFINE_EVENT(sta_event, drv_sta_rate_tbl_update,
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 TRACE_EVENT(drv_conf_tx,
1006 TP_PROTO(struct ieee80211_local *local,
1007 struct ieee80211_sub_if_data *sdata,
1008 unsigned int link_id,
1009 u16 ac, const struct ieee80211_tx_queue_params *params),
1011 TP_ARGS(local, sdata, link_id, ac, params),
1016 __field(unsigned int, link_id)
1019 __field(u16, cw_min)
1020 __field(u16, cw_max)
1022 __field(bool, uapsd)
1028 __entry->link_id = link_id;
1030 __entry->txop = params->txop;
1031 __entry->cw_max = params->cw_max;
1032 __entry->cw_min = params->cw_min;
1033 __entry->aifs = params->aifs;
1034 __entry->uapsd = params->uapsd;
1038 LOCAL_PR_FMT VIF_PR_FMT " link_id: %d, AC:%d",
1039 LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id, __entry->ac
1043 DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
1044 TP_PROTO(struct ieee80211_local *local,
1045 struct ieee80211_sub_if_data *sdata),
1046 TP_ARGS(local, sdata)
1049 TRACE_EVENT(drv_set_tsf,
1050 TP_PROTO(struct ieee80211_local *local,
1051 struct ieee80211_sub_if_data *sdata,
1054 TP_ARGS(local, sdata, tsf),
1069 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
1070 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
1074 TRACE_EVENT(drv_offset_tsf,
1075 TP_PROTO(struct ieee80211_local *local,
1076 struct ieee80211_sub_if_data *sdata,
1079 TP_ARGS(local, sdata, offset),
1084 __field(s64, tsf_offset)
1090 __entry->tsf_offset = offset;
1094 LOCAL_PR_FMT VIF_PR_FMT " tsf offset:%lld",
1095 LOCAL_PR_ARG, VIF_PR_ARG,
1096 (unsigned long long)__entry->tsf_offset
1100 DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
1101 TP_PROTO(struct ieee80211_local *local,
1102 struct ieee80211_sub_if_data *sdata),
1103 TP_ARGS(local, sdata)
1106 DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
1107 TP_PROTO(struct ieee80211_local *local),
1111 TRACE_EVENT(drv_ampdu_action,
1112 TP_PROTO(struct ieee80211_local *local,
1113 struct ieee80211_sub_if_data *sdata,
1114 struct ieee80211_ampdu_params *params),
1116 TP_ARGS(local, sdata, params),
1127 AMPDU_ACTION_ASSIGN;
1131 LOCAL_PR_FMT VIF_PR_FMT AMPDU_ACTION_PR_FMT,
1132 LOCAL_PR_ARG, VIF_PR_ARG, AMPDU_ACTION_PR_ARG
1136 TRACE_EVENT(drv_get_survey,
1137 TP_PROTO(struct ieee80211_local *local, int _idx,
1138 struct survey_info *survey),
1140 TP_ARGS(local, _idx, survey),
1149 __entry->idx = _idx;
1153 LOCAL_PR_FMT " idx:%d",
1154 LOCAL_PR_ARG, __entry->idx
1158 TRACE_EVENT(drv_flush,
1159 TP_PROTO(struct ieee80211_local *local,
1160 u32 queues, bool drop),
1162 TP_ARGS(local, queues, drop),
1167 __field(u32, queues)
1172 __entry->drop = drop;
1173 __entry->queues = queues;
1177 LOCAL_PR_FMT " queues:0x%x drop:%d",
1178 LOCAL_PR_ARG, __entry->queues, __entry->drop
1182 DEFINE_EVENT(sta_event, drv_flush_sta,
1183 TP_PROTO(struct ieee80211_local *local,
1184 struct ieee80211_sub_if_data *sdata,
1185 struct ieee80211_sta *sta),
1186 TP_ARGS(local, sdata, sta)
1189 TRACE_EVENT(drv_channel_switch,
1190 TP_PROTO(struct ieee80211_local *local,
1191 struct ieee80211_sub_if_data *sdata,
1192 struct ieee80211_channel_switch *ch_switch),
1194 TP_ARGS(local, sdata, ch_switch),
1200 __field(u64, timestamp)
1201 __field(u32, device_timestamp)
1202 __field(bool, block_tx)
1209 CHANDEF_ASSIGN(&ch_switch->chandef)
1210 __entry->timestamp = ch_switch->timestamp;
1211 __entry->device_timestamp = ch_switch->device_timestamp;
1212 __entry->block_tx = ch_switch->block_tx;
1213 __entry->count = ch_switch->count;
1217 LOCAL_PR_FMT VIF_PR_FMT " new " CHANDEF_PR_FMT " count:%d",
1218 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count
1222 TRACE_EVENT(drv_set_antenna,
1223 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1225 TP_ARGS(local, tx_ant, rx_ant, ret),
1229 __field(u32, tx_ant)
1230 __field(u32, rx_ant)
1236 __entry->tx_ant = tx_ant;
1237 __entry->rx_ant = rx_ant;
1242 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1243 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1247 TRACE_EVENT(drv_get_antenna,
1248 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1250 TP_ARGS(local, tx_ant, rx_ant, ret),
1254 __field(u32, tx_ant)
1255 __field(u32, rx_ant)
1261 __entry->tx_ant = tx_ant;
1262 __entry->rx_ant = rx_ant;
1267 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1268 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1272 TRACE_EVENT(drv_remain_on_channel,
1273 TP_PROTO(struct ieee80211_local *local,
1274 struct ieee80211_sub_if_data *sdata,
1275 struct ieee80211_channel *chan,
1276 unsigned int duration,
1277 enum ieee80211_roc_type type),
1279 TP_ARGS(local, sdata, chan, duration, type),
1284 __field(int, center_freq)
1285 __field(int, freq_offset)
1286 __field(unsigned int, duration)
1293 __entry->center_freq = chan->center_freq;
1294 __entry->freq_offset = chan->freq_offset;
1295 __entry->duration = duration;
1296 __entry->type = type;
1300 LOCAL_PR_FMT VIF_PR_FMT " freq:%d.%03dMHz duration:%dms type=%d",
1301 LOCAL_PR_ARG, VIF_PR_ARG,
1302 __entry->center_freq, __entry->freq_offset,
1303 __entry->duration, __entry->type
1307 DEFINE_EVENT(local_sdata_evt, drv_cancel_remain_on_channel,
1308 TP_PROTO(struct ieee80211_local *local,
1309 struct ieee80211_sub_if_data *sdata),
1310 TP_ARGS(local, sdata)
1313 TRACE_EVENT(drv_set_ringparam,
1314 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1316 TP_ARGS(local, tx, rx),
1331 LOCAL_PR_FMT " tx:%d rx %d",
1332 LOCAL_PR_ARG, __entry->tx, __entry->rx
1336 TRACE_EVENT(drv_get_ringparam,
1337 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1338 u32 *rx, u32 *rx_max),
1340 TP_ARGS(local, tx, tx_max, rx, rx_max),
1345 __field(u32, tx_max)
1347 __field(u32, rx_max)
1353 __entry->tx_max = *tx_max;
1355 __entry->rx_max = *rx_max;
1359 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1361 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1365 DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1366 TP_PROTO(struct ieee80211_local *local),
1370 DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1371 TP_PROTO(struct ieee80211_local *local),
1375 TRACE_EVENT(drv_set_bitrate_mask,
1376 TP_PROTO(struct ieee80211_local *local,
1377 struct ieee80211_sub_if_data *sdata,
1378 const struct cfg80211_bitrate_mask *mask),
1380 TP_ARGS(local, sdata, mask),
1385 __field(u32, legacy_2g)
1386 __field(u32, legacy_5g)
1392 __entry->legacy_2g = mask->control[NL80211_BAND_2GHZ].legacy;
1393 __entry->legacy_5g = mask->control[NL80211_BAND_5GHZ].legacy;
1397 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1398 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1402 TRACE_EVENT(drv_set_rekey_data,
1403 TP_PROTO(struct ieee80211_local *local,
1404 struct ieee80211_sub_if_data *sdata,
1405 struct cfg80211_gtk_rekey_data *data),
1407 TP_ARGS(local, sdata, data),
1412 __array(u8, kek, NL80211_KEK_LEN)
1413 __array(u8, kck, NL80211_KCK_LEN)
1414 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1420 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1421 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1422 memcpy(__entry->replay_ctr, data->replay_ctr,
1423 NL80211_REPLAY_CTR_LEN);
1426 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1427 LOCAL_PR_ARG, VIF_PR_ARG)
1430 TRACE_EVENT(drv_event_callback,
1431 TP_PROTO(struct ieee80211_local *local,
1432 struct ieee80211_sub_if_data *sdata,
1433 const struct ieee80211_event *_event),
1435 TP_ARGS(local, sdata, _event),
1446 __entry->type = _event->type;
1450 LOCAL_PR_FMT VIF_PR_FMT " event:%d",
1451 LOCAL_PR_ARG, VIF_PR_ARG, __entry->type
1455 DECLARE_EVENT_CLASS(release_evt,
1456 TP_PROTO(struct ieee80211_local *local,
1457 struct ieee80211_sta *sta,
1458 u16 tids, int num_frames,
1459 enum ieee80211_frame_release_type reason,
1462 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1468 __field(int, num_frames)
1469 __field(int, reason)
1470 __field(bool, more_data)
1476 __entry->tids = tids;
1477 __entry->num_frames = num_frames;
1478 __entry->reason = reason;
1479 __entry->more_data = more_data;
1483 LOCAL_PR_FMT STA_PR_FMT
1484 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1485 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1486 __entry->reason, __entry->more_data
1490 DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1491 TP_PROTO(struct ieee80211_local *local,
1492 struct ieee80211_sta *sta,
1493 u16 tids, int num_frames,
1494 enum ieee80211_frame_release_type reason,
1497 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1500 DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1501 TP_PROTO(struct ieee80211_local *local,
1502 struct ieee80211_sta *sta,
1503 u16 tids, int num_frames,
1504 enum ieee80211_frame_release_type reason,
1507 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1510 DECLARE_EVENT_CLASS(mgd_prepare_complete_tx_evt,
1511 TP_PROTO(struct ieee80211_local *local,
1512 struct ieee80211_sub_if_data *sdata,
1513 u16 duration, u16 subtype, bool success),
1515 TP_ARGS(local, sdata, duration, subtype, success),
1520 __field(u32, duration)
1521 __field(u16, subtype)
1522 __field(u8, success)
1528 __entry->duration = duration;
1529 __entry->subtype = subtype;
1530 __entry->success = success;
1534 LOCAL_PR_FMT VIF_PR_FMT " duration: %u, subtype:0x%x, success:%d",
1535 LOCAL_PR_ARG, VIF_PR_ARG, __entry->duration,
1536 __entry->subtype, __entry->success
1540 DEFINE_EVENT(mgd_prepare_complete_tx_evt, drv_mgd_prepare_tx,
1541 TP_PROTO(struct ieee80211_local *local,
1542 struct ieee80211_sub_if_data *sdata,
1543 u16 duration, u16 subtype, bool success),
1545 TP_ARGS(local, sdata, duration, subtype, success)
1548 DEFINE_EVENT(mgd_prepare_complete_tx_evt, drv_mgd_complete_tx,
1549 TP_PROTO(struct ieee80211_local *local,
1550 struct ieee80211_sub_if_data *sdata,
1551 u16 duration, u16 subtype, bool success),
1553 TP_ARGS(local, sdata, duration, subtype, success)
1556 DEFINE_EVENT(local_sdata_evt, drv_mgd_protect_tdls_discover,
1557 TP_PROTO(struct ieee80211_local *local,
1558 struct ieee80211_sub_if_data *sdata),
1560 TP_ARGS(local, sdata)
1563 DECLARE_EVENT_CLASS(local_chanctx,
1564 TP_PROTO(struct ieee80211_local *local,
1565 struct ieee80211_chanctx *ctx),
1567 TP_ARGS(local, ctx),
1580 LOCAL_PR_FMT CHANCTX_PR_FMT,
1581 LOCAL_PR_ARG, CHANCTX_PR_ARG
1585 DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1586 TP_PROTO(struct ieee80211_local *local,
1587 struct ieee80211_chanctx *ctx),
1591 DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1592 TP_PROTO(struct ieee80211_local *local,
1593 struct ieee80211_chanctx *ctx),
1597 TRACE_EVENT(drv_change_chanctx,
1598 TP_PROTO(struct ieee80211_local *local,
1599 struct ieee80211_chanctx *ctx,
1602 TP_ARGS(local, ctx, changed),
1607 __field(u32, changed)
1613 __entry->changed = changed;
1617 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1618 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1622 #if !defined(__TRACE_VIF_ENTRY)
1623 #define __TRACE_VIF_ENTRY
1624 struct trace_vif_entry {
1625 enum nl80211_iftype vif_type;
1627 char vif_name[IFNAMSIZ];
1630 struct trace_chandef_entry {
1639 struct trace_switch_entry {
1640 struct trace_vif_entry vif;
1641 unsigned int link_id;
1642 struct trace_chandef_entry old_chandef;
1643 struct trace_chandef_entry new_chandef;
1646 #define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
1649 TRACE_EVENT(drv_switch_vif_chanctx,
1650 TP_PROTO(struct ieee80211_local *local,
1651 struct ieee80211_vif_chanctx_switch *vifs,
1652 int n_vifs, enum ieee80211_chanctx_switch_mode mode),
1653 TP_ARGS(local, vifs, n_vifs, mode),
1657 __field(int, n_vifs)
1659 __dynamic_array(u8, vifs,
1660 sizeof(struct trace_switch_entry) * n_vifs)
1665 __entry->n_vifs = n_vifs;
1666 __entry->mode = mode;
1668 struct trace_switch_entry *local_vifs =
1669 __get_dynamic_array(vifs);
1672 for (i = 0; i < n_vifs; i++) {
1673 struct ieee80211_sub_if_data *sdata;
1675 sdata = container_of(vifs[i].vif,
1676 struct ieee80211_sub_if_data,
1679 SWITCH_ENTRY_ASSIGN(vif.vif_type, vif->type);
1680 SWITCH_ENTRY_ASSIGN(vif.p2p, vif->p2p);
1681 SWITCH_ENTRY_ASSIGN(link_id, link_conf->link_id);
1682 strncpy(local_vifs[i].vif.vif_name,
1684 sizeof(local_vifs[i].vif.vif_name));
1685 SWITCH_ENTRY_ASSIGN(old_chandef.control_freq,
1686 old_ctx->def.chan->center_freq);
1687 SWITCH_ENTRY_ASSIGN(old_chandef.freq_offset,
1688 old_ctx->def.chan->freq_offset);
1689 SWITCH_ENTRY_ASSIGN(old_chandef.chan_width,
1690 old_ctx->def.width);
1691 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq1,
1692 old_ctx->def.center_freq1);
1693 SWITCH_ENTRY_ASSIGN(old_chandef.freq1_offset,
1694 old_ctx->def.freq1_offset);
1695 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq2,
1696 old_ctx->def.center_freq2);
1697 SWITCH_ENTRY_ASSIGN(new_chandef.control_freq,
1698 new_ctx->def.chan->center_freq);
1699 SWITCH_ENTRY_ASSIGN(new_chandef.freq_offset,
1700 new_ctx->def.chan->freq_offset);
1701 SWITCH_ENTRY_ASSIGN(new_chandef.chan_width,
1702 new_ctx->def.width);
1703 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq1,
1704 new_ctx->def.center_freq1);
1705 SWITCH_ENTRY_ASSIGN(new_chandef.freq1_offset,
1706 new_ctx->def.freq1_offset);
1707 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq2,
1708 new_ctx->def.center_freq2);
1714 LOCAL_PR_FMT " n_vifs:%d mode:%d",
1715 LOCAL_PR_ARG, __entry->n_vifs, __entry->mode
1719 DECLARE_EVENT_CLASS(local_sdata_chanctx,
1720 TP_PROTO(struct ieee80211_local *local,
1721 struct ieee80211_sub_if_data *sdata,
1722 struct ieee80211_bss_conf *link_conf,
1723 struct ieee80211_chanctx *ctx),
1725 TP_ARGS(local, sdata, link_conf, ctx),
1731 __field(unsigned int, link_id)
1738 __entry->link_id = link_conf->link_id;
1742 LOCAL_PR_FMT VIF_PR_FMT " link_id:%d" CHANCTX_PR_FMT,
1743 LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id, CHANCTX_PR_ARG
1747 DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1748 TP_PROTO(struct ieee80211_local *local,
1749 struct ieee80211_sub_if_data *sdata,
1750 struct ieee80211_bss_conf *link_conf,
1751 struct ieee80211_chanctx *ctx),
1752 TP_ARGS(local, sdata, link_conf, ctx)
1755 DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1756 TP_PROTO(struct ieee80211_local *local,
1757 struct ieee80211_sub_if_data *sdata,
1758 struct ieee80211_bss_conf *link_conf,
1759 struct ieee80211_chanctx *ctx),
1760 TP_ARGS(local, sdata, link_conf, ctx)
1763 TRACE_EVENT(drv_start_ap,
1764 TP_PROTO(struct ieee80211_local *local,
1765 struct ieee80211_sub_if_data *sdata,
1766 struct ieee80211_bss_conf *link_conf),
1768 TP_ARGS(local, sdata, link_conf),
1773 __field(u32, link_id)
1774 __field(u8, dtimper)
1775 __field(u16, bcnint)
1776 __dynamic_array(u8, ssid, sdata->vif.cfg.ssid_len)
1777 __field(bool, hidden_ssid)
1783 __entry->link_id = link_conf->link_id;
1784 __entry->dtimper = link_conf->dtim_period;
1785 __entry->bcnint = link_conf->beacon_int;
1786 __entry->hidden_ssid = link_conf->hidden_ssid;
1787 memcpy(__get_dynamic_array(ssid),
1788 sdata->vif.cfg.ssid,
1789 sdata->vif.cfg.ssid_len);
1793 LOCAL_PR_FMT VIF_PR_FMT " link id %u",
1794 LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id
1798 TRACE_EVENT(drv_stop_ap,
1799 TP_PROTO(struct ieee80211_local *local,
1800 struct ieee80211_sub_if_data *sdata,
1801 struct ieee80211_bss_conf *link_conf),
1803 TP_ARGS(local, sdata, link_conf),
1808 __field(u32, link_id)
1814 __entry->link_id = link_conf->link_id;
1818 LOCAL_PR_FMT VIF_PR_FMT " link id %u",
1819 LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id
1823 TRACE_EVENT(drv_reconfig_complete,
1824 TP_PROTO(struct ieee80211_local *local,
1825 enum ieee80211_reconfig_type reconfig_type),
1826 TP_ARGS(local, reconfig_type),
1830 __field(u8, reconfig_type)
1835 __entry->reconfig_type = reconfig_type;
1839 LOCAL_PR_FMT " reconfig_type:%d",
1840 LOCAL_PR_ARG, __entry->reconfig_type
1845 #if IS_ENABLED(CONFIG_IPV6)
1846 DEFINE_EVENT(local_sdata_evt, drv_ipv6_addr_change,
1847 TP_PROTO(struct ieee80211_local *local,
1848 struct ieee80211_sub_if_data *sdata),
1849 TP_ARGS(local, sdata)
1853 TRACE_EVENT(drv_join_ibss,
1854 TP_PROTO(struct ieee80211_local *local,
1855 struct ieee80211_sub_if_data *sdata,
1856 struct ieee80211_bss_conf *info),
1858 TP_ARGS(local, sdata, info),
1863 __field(u8, dtimper)
1864 __field(u16, bcnint)
1865 __dynamic_array(u8, ssid, sdata->vif.cfg.ssid_len)
1871 __entry->dtimper = info->dtim_period;
1872 __entry->bcnint = info->beacon_int;
1873 memcpy(__get_dynamic_array(ssid),
1874 sdata->vif.cfg.ssid,
1875 sdata->vif.cfg.ssid_len);
1879 LOCAL_PR_FMT VIF_PR_FMT,
1880 LOCAL_PR_ARG, VIF_PR_ARG
1884 DEFINE_EVENT(local_sdata_evt, drv_leave_ibss,
1885 TP_PROTO(struct ieee80211_local *local,
1886 struct ieee80211_sub_if_data *sdata),
1887 TP_ARGS(local, sdata)
1890 TRACE_EVENT(drv_get_expected_throughput,
1891 TP_PROTO(struct ieee80211_sta *sta),
1904 STA_PR_FMT, STA_PR_ARG
1908 TRACE_EVENT(drv_start_nan,
1909 TP_PROTO(struct ieee80211_local *local,
1910 struct ieee80211_sub_if_data *sdata,
1911 struct cfg80211_nan_conf *conf),
1913 TP_ARGS(local, sdata, conf),
1917 __field(u8, master_pref)
1924 __entry->master_pref = conf->master_pref;
1925 __entry->bands = conf->bands;
1929 LOCAL_PR_FMT VIF_PR_FMT
1930 ", master preference: %u, bands: 0x%0x",
1931 LOCAL_PR_ARG, VIF_PR_ARG, __entry->master_pref,
1936 TRACE_EVENT(drv_stop_nan,
1937 TP_PROTO(struct ieee80211_local *local,
1938 struct ieee80211_sub_if_data *sdata),
1940 TP_ARGS(local, sdata),
1953 LOCAL_PR_FMT VIF_PR_FMT,
1954 LOCAL_PR_ARG, VIF_PR_ARG
1958 TRACE_EVENT(drv_nan_change_conf,
1959 TP_PROTO(struct ieee80211_local *local,
1960 struct ieee80211_sub_if_data *sdata,
1961 struct cfg80211_nan_conf *conf,
1964 TP_ARGS(local, sdata, conf, changes),
1968 __field(u8, master_pref)
1970 __field(u32, changes)
1976 __entry->master_pref = conf->master_pref;
1977 __entry->bands = conf->bands;
1978 __entry->changes = changes;
1982 LOCAL_PR_FMT VIF_PR_FMT
1983 ", master preference: %u, bands: 0x%0x, changes: 0x%x",
1984 LOCAL_PR_ARG, VIF_PR_ARG, __entry->master_pref,
1985 __entry->bands, __entry->changes
1989 TRACE_EVENT(drv_add_nan_func,
1990 TP_PROTO(struct ieee80211_local *local,
1991 struct ieee80211_sub_if_data *sdata,
1992 const struct cfg80211_nan_func *func),
1994 TP_ARGS(local, sdata, func),
1999 __field(u8, inst_id)
2005 __entry->type = func->type;
2006 __entry->inst_id = func->instance_id;
2010 LOCAL_PR_FMT VIF_PR_FMT
2011 ", type: %u, inst_id: %u",
2012 LOCAL_PR_ARG, VIF_PR_ARG, __entry->type, __entry->inst_id
2016 TRACE_EVENT(drv_del_nan_func,
2017 TP_PROTO(struct ieee80211_local *local,
2018 struct ieee80211_sub_if_data *sdata,
2021 TP_ARGS(local, sdata, instance_id),
2025 __field(u8, instance_id)
2031 __entry->instance_id = instance_id;
2035 LOCAL_PR_FMT VIF_PR_FMT
2036 ", instance_id: %u",
2037 LOCAL_PR_ARG, VIF_PR_ARG, __entry->instance_id
2041 DEFINE_EVENT(local_sdata_evt, drv_start_pmsr,
2042 TP_PROTO(struct ieee80211_local *local,
2043 struct ieee80211_sub_if_data *sdata),
2044 TP_ARGS(local, sdata)
2047 DEFINE_EVENT(local_sdata_evt, drv_abort_pmsr,
2048 TP_PROTO(struct ieee80211_local *local,
2049 struct ieee80211_sub_if_data *sdata),
2050 TP_ARGS(local, sdata)
2053 TRACE_EVENT(drv_set_default_unicast_key,
2054 TP_PROTO(struct ieee80211_local *local,
2055 struct ieee80211_sub_if_data *sdata,
2058 TP_ARGS(local, sdata, key_idx),
2063 __field(int, key_idx)
2069 __entry->key_idx = key_idx;
2072 TP_printk(LOCAL_PR_FMT VIF_PR_FMT " key_idx:%d",
2073 LOCAL_PR_ARG, VIF_PR_ARG, __entry->key_idx)
2076 TRACE_EVENT(drv_channel_switch_beacon,
2077 TP_PROTO(struct ieee80211_local *local,
2078 struct ieee80211_sub_if_data *sdata,
2079 struct cfg80211_chan_def *chandef),
2081 TP_ARGS(local, sdata, chandef),
2092 CHANDEF_ASSIGN(chandef);
2096 LOCAL_PR_FMT VIF_PR_FMT " channel switch to " CHANDEF_PR_FMT,
2097 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG
2101 TRACE_EVENT(drv_pre_channel_switch,
2102 TP_PROTO(struct ieee80211_local *local,
2103 struct ieee80211_sub_if_data *sdata,
2104 struct ieee80211_channel_switch *ch_switch),
2106 TP_ARGS(local, sdata, ch_switch),
2112 __field(u64, timestamp)
2113 __field(u32, device_timestamp)
2114 __field(bool, block_tx)
2121 CHANDEF_ASSIGN(&ch_switch->chandef)
2122 __entry->timestamp = ch_switch->timestamp;
2123 __entry->device_timestamp = ch_switch->device_timestamp;
2124 __entry->block_tx = ch_switch->block_tx;
2125 __entry->count = ch_switch->count;
2129 LOCAL_PR_FMT VIF_PR_FMT " prepare channel switch to "
2130 CHANDEF_PR_FMT " count:%d block_tx:%d timestamp:%llu",
2131 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count,
2132 __entry->block_tx, __entry->timestamp
2136 DEFINE_EVENT(local_sdata_evt, drv_post_channel_switch,
2137 TP_PROTO(struct ieee80211_local *local,
2138 struct ieee80211_sub_if_data *sdata),
2139 TP_ARGS(local, sdata)
2142 DEFINE_EVENT(local_sdata_evt, drv_abort_channel_switch,
2143 TP_PROTO(struct ieee80211_local *local,
2144 struct ieee80211_sub_if_data *sdata),
2145 TP_ARGS(local, sdata)
2148 TRACE_EVENT(drv_channel_switch_rx_beacon,
2149 TP_PROTO(struct ieee80211_local *local,
2150 struct ieee80211_sub_if_data *sdata,
2151 struct ieee80211_channel_switch *ch_switch),
2153 TP_ARGS(local, sdata, ch_switch),
2159 __field(u64, timestamp)
2160 __field(u32, device_timestamp)
2161 __field(bool, block_tx)
2168 CHANDEF_ASSIGN(&ch_switch->chandef)
2169 __entry->timestamp = ch_switch->timestamp;
2170 __entry->device_timestamp = ch_switch->device_timestamp;
2171 __entry->block_tx = ch_switch->block_tx;
2172 __entry->count = ch_switch->count;
2176 LOCAL_PR_FMT VIF_PR_FMT
2177 " received a channel switch beacon to "
2178 CHANDEF_PR_FMT " count:%d block_tx:%d timestamp:%llu",
2179 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count,
2180 __entry->block_tx, __entry->timestamp
2184 TRACE_EVENT(drv_get_txpower,
2185 TP_PROTO(struct ieee80211_local *local,
2186 struct ieee80211_sub_if_data *sdata,
2189 TP_ARGS(local, sdata, dbm, ret),
2206 LOCAL_PR_FMT VIF_PR_FMT " dbm:%d ret:%d",
2207 LOCAL_PR_ARG, VIF_PR_ARG, __entry->dbm, __entry->ret
2211 TRACE_EVENT(drv_tdls_channel_switch,
2212 TP_PROTO(struct ieee80211_local *local,
2213 struct ieee80211_sub_if_data *sdata,
2214 struct ieee80211_sta *sta, u8 oper_class,
2215 struct cfg80211_chan_def *chandef),
2217 TP_ARGS(local, sdata, sta, oper_class, chandef),
2223 __field(u8, oper_class)
2231 __entry->oper_class = oper_class;
2232 CHANDEF_ASSIGN(chandef)
2236 LOCAL_PR_FMT VIF_PR_FMT " tdls channel switch to"
2237 CHANDEF_PR_FMT " oper_class:%d " STA_PR_FMT,
2238 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->oper_class,
2243 TRACE_EVENT(drv_tdls_cancel_channel_switch,
2244 TP_PROTO(struct ieee80211_local *local,
2245 struct ieee80211_sub_if_data *sdata,
2246 struct ieee80211_sta *sta),
2248 TP_ARGS(local, sdata, sta),
2263 LOCAL_PR_FMT VIF_PR_FMT
2264 " tdls cancel channel switch with " STA_PR_FMT,
2265 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
2269 TRACE_EVENT(drv_tdls_recv_channel_switch,
2270 TP_PROTO(struct ieee80211_local *local,
2271 struct ieee80211_sub_if_data *sdata,
2272 struct ieee80211_tdls_ch_sw_params *params),
2274 TP_ARGS(local, sdata, params),
2279 __field(u8, action_code)
2282 __field(u32, status)
2283 __field(bool, peer_initiator)
2284 __field(u32, timestamp)
2285 __field(u16, switch_time)
2286 __field(u16, switch_timeout)
2292 STA_NAMED_ASSIGN(params->sta);
2293 CHANDEF_ASSIGN(params->chandef)
2294 __entry->peer_initiator = params->sta->tdls_initiator;
2295 __entry->action_code = params->action_code;
2296 __entry->status = params->status;
2297 __entry->timestamp = params->timestamp;
2298 __entry->switch_time = params->switch_time;
2299 __entry->switch_timeout = params->switch_timeout;
2303 LOCAL_PR_FMT VIF_PR_FMT " received tdls channel switch packet"
2304 " action:%d status:%d time:%d switch time:%d switch"
2305 " timeout:%d initiator: %d chan:" CHANDEF_PR_FMT STA_PR_FMT,
2306 LOCAL_PR_ARG, VIF_PR_ARG, __entry->action_code, __entry->status,
2307 __entry->timestamp, __entry->switch_time,
2308 __entry->switch_timeout, __entry->peer_initiator,
2309 CHANDEF_PR_ARG, STA_PR_ARG
2313 TRACE_EVENT(drv_wake_tx_queue,
2314 TP_PROTO(struct ieee80211_local *local,
2315 struct ieee80211_sub_if_data *sdata,
2316 struct txq_info *txq),
2318 TP_ARGS(local, sdata, txq),
2329 struct ieee80211_sta *sta = txq->txq.sta;
2334 __entry->ac = txq->txq.ac;
2335 __entry->tid = txq->txq.tid;
2339 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ac:%d tid:%d",
2340 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ac, __entry->tid
2344 TRACE_EVENT(drv_get_ftm_responder_stats,
2345 TP_PROTO(struct ieee80211_local *local,
2346 struct ieee80211_sub_if_data *sdata,
2347 struct cfg80211_ftm_responder_stats *ftm_stats),
2349 TP_ARGS(local, sdata, ftm_stats),
2362 LOCAL_PR_FMT VIF_PR_FMT,
2363 LOCAL_PR_ARG, VIF_PR_ARG
2367 DEFINE_EVENT(local_sdata_addr_evt, drv_update_vif_offload,
2368 TP_PROTO(struct ieee80211_local *local,
2369 struct ieee80211_sub_if_data *sdata),
2370 TP_ARGS(local, sdata)
2373 DECLARE_EVENT_CLASS(sta_flag_evt,
2374 TP_PROTO(struct ieee80211_local *local,
2375 struct ieee80211_sub_if_data *sdata,
2376 struct ieee80211_sta *sta, bool enabled),
2378 TP_ARGS(local, sdata, sta, enabled),
2384 __field(bool, enabled)
2391 __entry->enabled = enabled;
2395 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " enabled:%d",
2396 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->enabled
2400 DEFINE_EVENT(sta_flag_evt, drv_sta_set_4addr,
2401 TP_PROTO(struct ieee80211_local *local,
2402 struct ieee80211_sub_if_data *sdata,
2403 struct ieee80211_sta *sta, bool enabled),
2405 TP_ARGS(local, sdata, sta, enabled)
2408 DEFINE_EVENT(sta_flag_evt, drv_sta_set_decap_offload,
2409 TP_PROTO(struct ieee80211_local *local,
2410 struct ieee80211_sub_if_data *sdata,
2411 struct ieee80211_sta *sta, bool enabled),
2413 TP_ARGS(local, sdata, sta, enabled)
2416 TRACE_EVENT(drv_add_twt_setup,
2417 TP_PROTO(struct ieee80211_local *local,
2418 struct ieee80211_sta *sta,
2419 struct ieee80211_twt_setup *twt,
2420 struct ieee80211_twt_params *twt_agrt),
2422 TP_ARGS(local, sta, twt, twt_agrt),
2427 __field(u8, dialog_token)
2428 __field(u8, control)
2429 __field(__le16, req_type)
2430 __field(__le64, twt)
2431 __field(u8, duration)
2432 __field(__le16, mantissa)
2433 __field(u8, channel)
2439 __entry->dialog_token = twt->dialog_token;
2440 __entry->control = twt->control;
2441 __entry->req_type = twt_agrt->req_type;
2442 __entry->twt = twt_agrt->twt;
2443 __entry->duration = twt_agrt->min_twt_dur;
2444 __entry->mantissa = twt_agrt->mantissa;
2445 __entry->channel = twt_agrt->channel;
2449 LOCAL_PR_FMT STA_PR_FMT
2450 " token:%d control:0x%02x req_type:0x%04x"
2451 " twt:%llu duration:%d mantissa:%d channel:%d",
2452 LOCAL_PR_ARG, STA_PR_ARG, __entry->dialog_token,
2453 __entry->control, le16_to_cpu(__entry->req_type),
2454 le64_to_cpu(__entry->twt), __entry->duration,
2455 le16_to_cpu(__entry->mantissa), __entry->channel
2459 TRACE_EVENT(drv_twt_teardown_request,
2460 TP_PROTO(struct ieee80211_local *local,
2461 struct ieee80211_sta *sta, u8 flowid),
2463 TP_ARGS(local, sta, flowid),
2474 __entry->flowid = flowid;
2478 LOCAL_PR_FMT STA_PR_FMT " flowid:%d",
2479 LOCAL_PR_ARG, STA_PR_ARG, __entry->flowid
2483 DEFINE_EVENT(sta_event, drv_net_fill_forward_path,
2484 TP_PROTO(struct ieee80211_local *local,
2485 struct ieee80211_sub_if_data *sdata,
2486 struct ieee80211_sta *sta),
2487 TP_ARGS(local, sdata, sta)
2490 TRACE_EVENT(drv_net_setup_tc,
2491 TP_PROTO(struct ieee80211_local *local,
2492 struct ieee80211_sub_if_data *sdata,
2495 TP_ARGS(local, sdata, type),
2506 __entry->type = type;
2510 LOCAL_PR_FMT VIF_PR_FMT " type:%d\n",
2511 LOCAL_PR_ARG, VIF_PR_ARG, __entry->type
2515 TRACE_EVENT(drv_change_vif_links,
2516 TP_PROTO(struct ieee80211_local *local,
2517 struct ieee80211_sub_if_data *sdata,
2518 u16 old_links, u16 new_links),
2520 TP_ARGS(local, sdata, old_links, new_links),
2525 __field(u16, old_links)
2526 __field(u16, new_links)
2532 __entry->old_links = old_links;
2533 __entry->new_links = new_links;
2537 LOCAL_PR_FMT VIF_PR_FMT " old_links:0x%04x, new_links:0x%04x\n",
2538 LOCAL_PR_ARG, VIF_PR_ARG, __entry->old_links, __entry->new_links
2542 TRACE_EVENT(drv_change_sta_links,
2543 TP_PROTO(struct ieee80211_local *local,
2544 struct ieee80211_sub_if_data *sdata,
2545 struct ieee80211_sta *sta,
2546 u16 old_links, u16 new_links),
2548 TP_ARGS(local, sdata, sta, old_links, new_links),
2554 __field(u16, old_links)
2555 __field(u16, new_links)
2562 __entry->old_links = old_links;
2563 __entry->new_links = new_links;
2567 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " old_links:0x%04x, new_links:0x%04x\n",
2568 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
2569 __entry->old_links, __entry->new_links
2574 * Tracing for API calls that drivers call.
2577 TRACE_EVENT(api_start_tx_ba_session,
2578 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
2593 STA_PR_FMT " tid:%d",
2594 STA_PR_ARG, __entry->tid
2598 TRACE_EVENT(api_start_tx_ba_cb,
2599 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
2601 TP_ARGS(sdata, ra, tid),
2605 __array(u8, ra, ETH_ALEN)
2611 memcpy(__entry->ra, ra, ETH_ALEN);
2616 VIF_PR_FMT " ra:%pM tid:%d",
2617 VIF_PR_ARG, __entry->ra, __entry->tid
2621 TRACE_EVENT(api_stop_tx_ba_session,
2622 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
2637 STA_PR_FMT " tid:%d",
2638 STA_PR_ARG, __entry->tid
2642 TRACE_EVENT(api_stop_tx_ba_cb,
2643 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
2645 TP_ARGS(sdata, ra, tid),
2649 __array(u8, ra, ETH_ALEN)
2655 memcpy(__entry->ra, ra, ETH_ALEN);
2660 VIF_PR_FMT " ra:%pM tid:%d",
2661 VIF_PR_ARG, __entry->ra, __entry->tid
2665 DEFINE_EVENT(local_only_evt, api_restart_hw,
2666 TP_PROTO(struct ieee80211_local *local),
2670 TRACE_EVENT(api_beacon_loss,
2671 TP_PROTO(struct ieee80211_sub_if_data *sdata),
2689 TRACE_EVENT(api_connection_loss,
2690 TP_PROTO(struct ieee80211_sub_if_data *sdata),
2708 TRACE_EVENT(api_disconnect,
2709 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool reconnect),
2711 TP_ARGS(sdata, reconnect),
2715 __field(int, reconnect)
2720 __entry->reconnect = reconnect;
2724 VIF_PR_FMT " reconnect:%d",
2725 VIF_PR_ARG, __entry->reconnect
2729 TRACE_EVENT(api_cqm_rssi_notify,
2730 TP_PROTO(struct ieee80211_sub_if_data *sdata,
2731 enum nl80211_cqm_rssi_threshold_event rssi_event,
2734 TP_ARGS(sdata, rssi_event, rssi_level),
2738 __field(u32, rssi_event)
2739 __field(s32, rssi_level)
2744 __entry->rssi_event = rssi_event;
2745 __entry->rssi_level = rssi_level;
2749 VIF_PR_FMT " event:%d rssi:%d",
2750 VIF_PR_ARG, __entry->rssi_event, __entry->rssi_level
2754 DEFINE_EVENT(local_sdata_evt, api_cqm_beacon_loss_notify,
2755 TP_PROTO(struct ieee80211_local *local,
2756 struct ieee80211_sub_if_data *sdata),
2757 TP_ARGS(local, sdata)
2760 TRACE_EVENT(api_scan_completed,
2761 TP_PROTO(struct ieee80211_local *local, bool aborted),
2763 TP_ARGS(local, aborted),
2767 __field(bool, aborted)
2772 __entry->aborted = aborted;
2776 LOCAL_PR_FMT " aborted:%d",
2777 LOCAL_PR_ARG, __entry->aborted
2781 TRACE_EVENT(api_sched_scan_results,
2782 TP_PROTO(struct ieee80211_local *local),
2795 LOCAL_PR_FMT, LOCAL_PR_ARG
2799 TRACE_EVENT(api_sched_scan_stopped,
2800 TP_PROTO(struct ieee80211_local *local),
2813 LOCAL_PR_FMT, LOCAL_PR_ARG
2817 TRACE_EVENT(api_sta_block_awake,
2818 TP_PROTO(struct ieee80211_local *local,
2819 struct ieee80211_sta *sta, bool block),
2821 TP_ARGS(local, sta, block),
2826 __field(bool, block)
2832 __entry->block = block;
2836 LOCAL_PR_FMT STA_PR_FMT " block:%d",
2837 LOCAL_PR_ARG, STA_PR_ARG, __entry->block
2841 TRACE_EVENT(api_chswitch_done,
2842 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
2844 TP_ARGS(sdata, success),
2848 __field(bool, success)
2853 __entry->success = success;
2857 VIF_PR_FMT " success=%d",
2858 VIF_PR_ARG, __entry->success
2862 DEFINE_EVENT(local_only_evt, api_ready_on_channel,
2863 TP_PROTO(struct ieee80211_local *local),
2867 DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
2868 TP_PROTO(struct ieee80211_local *local),
2872 TRACE_EVENT(api_gtk_rekey_notify,
2873 TP_PROTO(struct ieee80211_sub_if_data *sdata,
2874 const u8 *bssid, const u8 *replay_ctr),
2876 TP_ARGS(sdata, bssid, replay_ctr),
2880 __array(u8, bssid, ETH_ALEN)
2881 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
2886 memcpy(__entry->bssid, bssid, ETH_ALEN);
2887 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
2890 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
2893 TRACE_EVENT(api_enable_rssi_reports,
2894 TP_PROTO(struct ieee80211_sub_if_data *sdata,
2895 int rssi_min_thold, int rssi_max_thold),
2897 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
2901 __field(int, rssi_min_thold)
2902 __field(int, rssi_max_thold)
2907 __entry->rssi_min_thold = rssi_min_thold;
2908 __entry->rssi_max_thold = rssi_max_thold;
2912 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
2913 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
2917 TRACE_EVENT(api_eosp,
2918 TP_PROTO(struct ieee80211_local *local,
2919 struct ieee80211_sta *sta),
2921 TP_ARGS(local, sta),
2934 LOCAL_PR_FMT STA_PR_FMT,
2935 LOCAL_PR_ARG, STA_PR_ARG
2939 TRACE_EVENT(api_send_eosp_nullfunc,
2940 TP_PROTO(struct ieee80211_local *local,
2941 struct ieee80211_sta *sta,
2944 TP_ARGS(local, sta, tid),
2959 LOCAL_PR_FMT STA_PR_FMT " tid:%d",
2960 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid
2964 TRACE_EVENT(api_sta_set_buffered,
2965 TP_PROTO(struct ieee80211_local *local,
2966 struct ieee80211_sta *sta,
2967 u8 tid, bool buffered),
2969 TP_ARGS(local, sta, tid, buffered),
2975 __field(bool, buffered)
2982 __entry->buffered = buffered;
2986 LOCAL_PR_FMT STA_PR_FMT " tid:%d buffered:%d",
2987 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid, __entry->buffered
2991 TRACE_EVENT(api_radar_detected,
2992 TP_PROTO(struct ieee80211_local *local),
3005 LOCAL_PR_FMT " radar detected",
3011 * Tracing for internal functions
3012 * (which may also be called in response to driver calls)
3015 TRACE_EVENT(wake_queue,
3016 TP_PROTO(struct ieee80211_local *local, u16 queue,
3017 enum queue_stop_reason reason),
3019 TP_ARGS(local, queue, reason),
3024 __field(u32, reason)
3029 __entry->queue = queue;
3030 __entry->reason = reason;
3034 LOCAL_PR_FMT " queue:%d, reason:%d",
3035 LOCAL_PR_ARG, __entry->queue, __entry->reason
3039 TRACE_EVENT(stop_queue,
3040 TP_PROTO(struct ieee80211_local *local, u16 queue,
3041 enum queue_stop_reason reason),
3043 TP_ARGS(local, queue, reason),
3048 __field(u32, reason)
3053 __entry->queue = queue;
3054 __entry->reason = reason;
3058 LOCAL_PR_FMT " queue:%d, reason:%d",
3059 LOCAL_PR_ARG, __entry->queue, __entry->reason
3063 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
3065 #undef TRACE_INCLUDE_PATH
3066 #define TRACE_INCLUDE_PATH .
3067 #undef TRACE_INCLUDE_FILE
3068 #define TRACE_INCLUDE_FILE trace
3069 #include <trace/define_trace.h>