drm/tests: hdmi: Fix memory leaks in drm_display_mode_from_cea_vic()
[drm/drm-misc.git] / net / mac80211 / trace.h
blobdc498cd8cd91916932f0719da9f302c6b6942dde
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Portions of this file
4 * Copyright(c) 2016-2017 Intel Deutschland GmbH
5 * Copyright (C) 2018 - 2024 Intel Corporation
6 */
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"
15 #undef TRACE_SYSTEM
16 #define TRACE_SYSTEM mac80211
18 #define MAXNAME 32
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) \
32 __field(bool, p2p) \
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 \
100 MIN_CHANDEF_ENTRY \
101 AP_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) \
115 __field(u8, flags) \
116 __field(s8, keyidx)
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) \
126 STA_ENTRY \
127 __field(u16, tid) \
128 __field(u16, ssn) \
129 __field(u16, buf_size) \
130 __field(bool, amsdu) \
131 __field(u16, timeout) \
132 __field(u16, action)
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, \
143 __entry->action
146 * Tracing for driver callbacks.
149 DECLARE_EVENT_CLASS(local_only_evt,
150 TP_PROTO(struct ieee80211_local *local),
151 TP_ARGS(local),
152 TP_STRUCT__entry(
153 LOCAL_ENTRY
155 TP_fast_assign(
156 LOCAL_ASSIGN;
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),
166 TP_STRUCT__entry(
167 LOCAL_ENTRY
168 VIF_ENTRY
169 __array(char, addr, ETH_ALEN)
172 TP_fast_assign(
173 LOCAL_ASSIGN;
174 VIF_ASSIGN;
175 memcpy(__entry->addr, sdata->vif.addr, ETH_ALEN);
178 TP_printk(
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),
188 TP_STRUCT__entry(
189 LOCAL_ENTRY
190 __field(u32, value)
193 TP_fast_assign(
194 LOCAL_ASSIGN;
195 __entry->value = value;
198 TP_printk(
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),
209 TP_STRUCT__entry(
210 LOCAL_ENTRY
211 VIF_ENTRY
214 TP_fast_assign(
215 LOCAL_ASSIGN;
216 VIF_ASSIGN;
219 TP_printk(
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),
227 TP_ARGS(local)
230 TRACE_EVENT(drv_return_int,
231 TP_PROTO(struct ieee80211_local *local, int ret),
232 TP_ARGS(local, ret),
233 TP_STRUCT__entry(
234 LOCAL_ENTRY
235 __field(int, ret)
237 TP_fast_assign(
238 LOCAL_ASSIGN;
239 __entry->ret = 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),
246 TP_ARGS(local, ret),
247 TP_STRUCT__entry(
248 LOCAL_ENTRY
249 __field(bool, ret)
251 TP_fast_assign(
252 LOCAL_ASSIGN;
253 __entry->ret = ret;
255 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
256 "true" : "false")
259 TRACE_EVENT(drv_return_u32,
260 TP_PROTO(struct ieee80211_local *local, u32 ret),
261 TP_ARGS(local, ret),
262 TP_STRUCT__entry(
263 LOCAL_ENTRY
264 __field(u32, ret)
266 TP_fast_assign(
267 LOCAL_ASSIGN;
268 __entry->ret = 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),
275 TP_ARGS(local, ret),
276 TP_STRUCT__entry(
277 LOCAL_ENTRY
278 __field(u64, ret)
280 TP_fast_assign(
281 LOCAL_ASSIGN;
282 __entry->ret = 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),
289 TP_ARGS(local)
292 DEFINE_EVENT(local_u32_evt, drv_get_et_strings,
293 TP_PROTO(struct ieee80211_local *local, u32 sset),
294 TP_ARGS(local, sset)
297 DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count,
298 TP_PROTO(struct ieee80211_local *local, u32 sset),
299 TP_ARGS(local, sset)
302 DEFINE_EVENT(local_only_evt, drv_get_et_stats,
303 TP_PROTO(struct ieee80211_local *local),
304 TP_ARGS(local)
307 DEFINE_EVENT(local_only_evt, drv_suspend,
308 TP_PROTO(struct ieee80211_local *local),
309 TP_ARGS(local)
312 DEFINE_EVENT(local_only_evt, drv_resume,
313 TP_PROTO(struct ieee80211_local *local),
314 TP_ARGS(local)
317 TRACE_EVENT(drv_set_wakeup,
318 TP_PROTO(struct ieee80211_local *local, bool enabled),
319 TP_ARGS(local, enabled),
320 TP_STRUCT__entry(
321 LOCAL_ENTRY
322 __field(bool, enabled)
324 TP_fast_assign(
325 LOCAL_ASSIGN;
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),
334 TP_STRUCT__entry(
335 LOCAL_ENTRY
336 __field(bool, suspend)
338 TP_fast_assign(
339 LOCAL_ASSIGN;
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),
358 TP_STRUCT__entry(
359 LOCAL_ENTRY
360 VIF_ENTRY
361 __field(u32, new_type)
362 __field(bool, new_p2p)
365 TP_fast_assign(
366 LOCAL_ASSIGN;
367 VIF_ASSIGN;
368 __entry->new_type = type;
369 __entry->new_p2p = p2p;
372 TP_printk(
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,
387 u32 changed),
389 TP_ARGS(local, changed),
391 TP_STRUCT__entry(
392 LOCAL_ENTRY
393 __field(u32, changed)
394 __field(u32, flags)
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)
400 CHANDEF_ENTRY
401 __field(int, smps)
404 TP_fast_assign(
405 LOCAL_ASSIGN;
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;
419 TP_printk(
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,
428 u64 changed),
430 TP_ARGS(local, sdata, changed),
432 TP_STRUCT__entry(
433 LOCAL_ENTRY
434 VIF_ENTRY
435 __field(u64, changed)
436 __field(bool, assoc)
437 __field(bool, ibss_joined)
438 __field(bool, ibss_creator)
439 __field(u16, aid)
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)
446 __field(int, s1g)
447 __field(bool, idle)
448 __field(bool, ps)
451 TP_fast_assign(
452 LOCAL_ASSIGN;
453 VIF_ASSIGN;
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),
468 sdata->vif.cfg.ssid,
469 sdata->vif.cfg.ssid_len);
470 __entry->s1g = sdata->vif.cfg.s1g;
471 __entry->idle = sdata->vif.cfg.idle;
474 TP_printk(
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,
484 u64 changed),
486 TP_ARGS(local, sdata, link_conf, changed),
488 TP_STRUCT__entry(
489 LOCAL_ENTRY
490 VIF_ENTRY
491 __field(u64, changed)
492 __field(int, link_id)
493 __field(bool, cts)
494 __field(bool, shortpre)
495 __field(bool, shortslot)
496 __field(bool, enable_beacon)
497 __field(u8, dtimper)
498 __field(u16, bcnint)
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)
511 __field(bool, qos)
512 __field(bool, hidden_ssid)
513 __field(int, txpower)
514 __field(u8, p2p_oppps_ctwindow)
517 TP_fast_assign(
518 LOCAL_ASSIGN;
519 VIF_ASSIGN;
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;
547 TP_printk(
548 LOCAL_PR_FMT VIF_PR_FMT " link_id:%d, changed:%#llx",
549 LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id,
550 __entry->changed
554 TRACE_EVENT(drv_prepare_multicast,
555 TP_PROTO(struct ieee80211_local *local, int mc_count),
557 TP_ARGS(local, mc_count),
559 TP_STRUCT__entry(
560 LOCAL_ENTRY
561 __field(int, mc_count)
564 TP_fast_assign(
565 LOCAL_ASSIGN;
566 __entry->mc_count = mc_count;
569 TP_printk(
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,
579 u64 multicast),
581 TP_ARGS(local, changed_flags, total_flags, multicast),
583 TP_STRUCT__entry(
584 LOCAL_ENTRY
585 __field(unsigned int, changed)
586 __field(unsigned int, total)
587 __field(u64, multicast)
590 TP_fast_assign(
591 LOCAL_ASSIGN;
592 __entry->changed = changed_flags;
593 __entry->total = *total_flags;
594 __entry->multicast = multicast;
597 TP_printk(
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),
611 TP_STRUCT__entry(
612 LOCAL_ENTRY
613 VIF_ENTRY
614 __field(unsigned int, filter_flags)
615 __field(unsigned int, changed_flags)
618 TP_fast_assign(
619 LOCAL_ASSIGN;
620 VIF_ASSIGN;
621 __entry->filter_flags = filter_flags;
622 __entry->changed_flags = changed_flags;
625 TP_printk(
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),
639 TP_STRUCT__entry(
640 LOCAL_ENTRY
641 STA_ENTRY
642 __field(bool, set)
645 TP_fast_assign(
646 LOCAL_ASSIGN;
647 STA_ASSIGN;
648 __entry->set = set;
651 TP_printk(
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),
665 TP_STRUCT__entry(
666 LOCAL_ENTRY
667 VIF_ENTRY
668 STA_ENTRY
669 __field(u32, cmd)
670 KEY_ENTRY
673 TP_fast_assign(
674 LOCAL_ASSIGN;
675 VIF_ASSIGN;
676 STA_ASSIGN;
677 __entry->cmd = cmd;
678 KEY_ASSIGN(key);
681 TP_printk(
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),
695 TP_STRUCT__entry(
696 LOCAL_ENTRY
697 VIF_ENTRY
698 STA_ENTRY
699 __field(u32, iv32)
702 TP_fast_assign(
703 LOCAL_ASSIGN;
704 VIF_ASSIGN;
705 STA_ASSIGN;
706 __entry->iv32 = iv32;
709 TP_printk(
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,
742 const u8 *mac_addr),
744 TP_ARGS(local, sdata, mac_addr),
746 TP_STRUCT__entry(
747 LOCAL_ENTRY
748 VIF_ENTRY
749 __array(char, mac_addr, ETH_ALEN)
752 TP_fast_assign(
753 LOCAL_ASSIGN;
754 VIF_ASSIGN;
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,
771 int ret),
773 TP_ARGS(local, stats, ret),
775 TP_STRUCT__entry(
776 LOCAL_ENTRY
777 __field(int, ret)
778 __field(unsigned int, ackfail)
779 __field(unsigned int, rtsfail)
780 __field(unsigned int, fcserr)
781 __field(unsigned int, rtssucc)
784 TP_fast_assign(
785 LOCAL_ASSIGN;
786 __entry->ret = ret;
787 __entry->ackfail = stats->dot11ACKFailureCount;
788 __entry->rtsfail = stats->dot11RTSFailureCount;
789 __entry->fcserr = stats->dot11FCSErrorCount;
790 __entry->rtssucc = stats->dot11RTSSuccessCount;
793 TP_printk(
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),
803 TP_ARGS(local, key),
805 TP_STRUCT__entry(
806 LOCAL_ENTRY
807 KEY_ENTRY
810 TP_fast_assign(
811 LOCAL_ASSIGN;
812 KEY_ASSIGN(key);
815 TP_printk(
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),
836 TP_STRUCT__entry(
837 LOCAL_ENTRY
838 __field(s16, value)
841 TP_fast_assign(
842 LOCAL_ASSIGN;
843 __entry->value = value;
846 TP_printk(
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),
860 TP_STRUCT__entry(
861 LOCAL_ENTRY
862 VIF_ENTRY
863 STA_ENTRY
864 __field(u32, cmd)
867 TP_fast_assign(
868 LOCAL_ASSIGN;
869 VIF_ASSIGN;
870 STA_ASSIGN;
871 __entry->cmd = cmd;
874 TP_printk(
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),
889 TP_STRUCT__entry(
890 LOCAL_ENTRY
891 VIF_ENTRY
892 STA_ENTRY
893 __field(u32, old_state)
894 __field(u32, new_state)
897 TP_fast_assign(
898 LOCAL_ASSIGN;
899 VIF_ASSIGN;
900 STA_ASSIGN;
901 __entry->old_state = old_state;
902 __entry->new_state = new_state;
905 TP_printk(
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),
919 TP_STRUCT__entry(
920 LOCAL_ENTRY
921 VIF_ENTRY
922 STA_ENTRY
923 __field(s16, txpwr)
924 __field(u8, type)
927 TP_fast_assign(
928 LOCAL_ASSIGN;
929 VIF_ASSIGN;
930 STA_ASSIGN;
931 __entry->txpwr = sta->deflink.txpwr.power;
932 __entry->type = sta->deflink.txpwr.type;
935 TP_printk(
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,
946 u32 changed),
948 TP_ARGS(local, sdata, sta, changed),
950 TP_STRUCT__entry(
951 LOCAL_ENTRY
952 VIF_ENTRY
953 STA_ENTRY
954 __field(u32, changed)
957 TP_fast_assign(
958 LOCAL_ASSIGN;
959 VIF_ASSIGN;
960 STA_ASSIGN;
961 __entry->changed = changed;
964 TP_printk(
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),
977 TP_STRUCT__entry(
978 LOCAL_ENTRY
979 VIF_ENTRY
980 STA_ENTRY
983 TP_fast_assign(
984 LOCAL_ASSIGN;
985 VIF_ASSIGN;
986 STA_ASSIGN;
989 TP_printk(
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),
1045 TP_STRUCT__entry(
1046 LOCAL_ENTRY
1047 VIF_ENTRY
1048 __field(unsigned int, link_id)
1049 __field(u16, ac)
1050 __field(u16, txop)
1051 __field(u16, cw_min)
1052 __field(u16, cw_max)
1053 __field(u8, aifs)
1054 __field(bool, uapsd)
1057 TP_fast_assign(
1058 LOCAL_ASSIGN;
1059 VIF_ASSIGN;
1060 __entry->link_id = link_id;
1061 __entry->ac = ac;
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;
1069 TP_printk(
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,
1084 u64 tsf),
1086 TP_ARGS(local, sdata, tsf),
1088 TP_STRUCT__entry(
1089 LOCAL_ENTRY
1090 VIF_ENTRY
1091 __field(u64, tsf)
1094 TP_fast_assign(
1095 LOCAL_ASSIGN;
1096 VIF_ASSIGN;
1097 __entry->tsf = tsf;
1100 TP_printk(
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,
1109 s64 offset),
1111 TP_ARGS(local, sdata, offset),
1113 TP_STRUCT__entry(
1114 LOCAL_ENTRY
1115 VIF_ENTRY
1116 __field(s64, tsf_offset)
1119 TP_fast_assign(
1120 LOCAL_ASSIGN;
1121 VIF_ASSIGN;
1122 __entry->tsf_offset = offset;
1125 TP_printk(
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),
1140 TP_ARGS(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),
1150 TP_STRUCT__entry(
1151 LOCAL_ENTRY
1152 VIF_ENTRY
1153 AMPDU_ACTION_ENTRY
1156 TP_fast_assign(
1157 LOCAL_ASSIGN;
1158 VIF_ASSIGN;
1159 AMPDU_ACTION_ASSIGN;
1162 TP_printk(
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),
1174 TP_STRUCT__entry(
1175 LOCAL_ENTRY
1176 __field(int, idx)
1179 TP_fast_assign(
1180 LOCAL_ASSIGN;
1181 __entry->idx = _idx;
1184 TP_printk(
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),
1196 TP_STRUCT__entry(
1197 LOCAL_ENTRY
1198 __field(bool, drop)
1199 __field(u32, queues)
1202 TP_fast_assign(
1203 LOCAL_ASSIGN;
1204 __entry->drop = drop;
1205 __entry->queues = queues;
1208 TP_printk(
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),
1228 TP_STRUCT__entry(
1229 LOCAL_ENTRY
1230 VIF_ENTRY
1231 CHANDEF_ENTRY
1232 __field(u64, timestamp)
1233 __field(u32, device_timestamp)
1234 __field(bool, block_tx)
1235 __field(u8, count)
1236 __field(u8, link_id)
1239 TP_fast_assign(
1240 LOCAL_ASSIGN;
1241 VIF_ASSIGN;
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;
1250 TP_printk(
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),
1270 TP_STRUCT__entry(
1271 LOCAL_ENTRY
1272 __field(u32, tx_ant)
1273 __field(u32, rx_ant)
1274 __field(int, ret)
1277 TP_fast_assign(
1278 LOCAL_ASSIGN;
1279 __entry->tx_ant = tx_ant;
1280 __entry->rx_ant = rx_ant;
1281 __entry->ret = ret;
1284 TP_printk(
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),
1295 TP_STRUCT__entry(
1296 LOCAL_ENTRY
1297 __field(u32, tx_ant)
1298 __field(u32, rx_ant)
1299 __field(int, ret)
1302 TP_fast_assign(
1303 LOCAL_ASSIGN;
1304 __entry->tx_ant = tx_ant;
1305 __entry->rx_ant = rx_ant;
1306 __entry->ret = ret;
1309 TP_printk(
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),
1324 TP_STRUCT__entry(
1325 LOCAL_ENTRY
1326 VIF_ENTRY
1327 __field(int, center_freq)
1328 __field(int, freq_offset)
1329 __field(unsigned int, duration)
1330 __field(u32, type)
1333 TP_fast_assign(
1334 LOCAL_ASSIGN;
1335 VIF_ASSIGN;
1336 __entry->center_freq = chan->center_freq;
1337 __entry->freq_offset = chan->freq_offset;
1338 __entry->duration = duration;
1339 __entry->type = type;
1342 TP_printk(
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),
1361 TP_STRUCT__entry(
1362 LOCAL_ENTRY
1363 __field(u32, tx)
1364 __field(u32, rx)
1367 TP_fast_assign(
1368 LOCAL_ASSIGN;
1369 __entry->tx = tx;
1370 __entry->rx = rx;
1373 TP_printk(
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),
1385 TP_STRUCT__entry(
1386 LOCAL_ENTRY
1387 __field(u32, tx)
1388 __field(u32, tx_max)
1389 __field(u32, rx)
1390 __field(u32, rx_max)
1393 TP_fast_assign(
1394 LOCAL_ASSIGN;
1395 __entry->tx = *tx;
1396 __entry->tx_max = *tx_max;
1397 __entry->rx = *rx;
1398 __entry->rx_max = *rx_max;
1401 TP_printk(
1402 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1403 LOCAL_PR_ARG,
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),
1410 TP_ARGS(local)
1413 DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1414 TP_PROTO(struct ieee80211_local *local),
1415 TP_ARGS(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),
1425 TP_STRUCT__entry(
1426 LOCAL_ENTRY
1427 VIF_ENTRY
1428 __field(u32, legacy_2g)
1429 __field(u32, legacy_5g)
1432 TP_fast_assign(
1433 LOCAL_ASSIGN;
1434 VIF_ASSIGN;
1435 __entry->legacy_2g = mask->control[NL80211_BAND_2GHZ].legacy;
1436 __entry->legacy_5g = mask->control[NL80211_BAND_5GHZ].legacy;
1439 TP_printk(
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),
1452 TP_STRUCT__entry(
1453 LOCAL_ENTRY
1454 VIF_ENTRY
1455 __array(u8, kek, NL80211_KEK_LEN)
1456 __array(u8, kck, NL80211_KCK_LEN)
1457 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1460 TP_fast_assign(
1461 LOCAL_ASSIGN;
1462 VIF_ASSIGN;
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),
1480 TP_STRUCT__entry(
1481 LOCAL_ENTRY
1482 VIF_ENTRY
1483 __field(u32, type)
1486 TP_fast_assign(
1487 LOCAL_ASSIGN;
1488 VIF_ASSIGN;
1489 __entry->type = _event->type;
1492 TP_printk(
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,
1503 bool more_data),
1505 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1507 TP_STRUCT__entry(
1508 LOCAL_ENTRY
1509 STA_ENTRY
1510 __field(u16, tids)
1511 __field(int, num_frames)
1512 __field(int, reason)
1513 __field(bool, more_data)
1516 TP_fast_assign(
1517 LOCAL_ASSIGN;
1518 STA_ASSIGN;
1519 __entry->tids = tids;
1520 __entry->num_frames = num_frames;
1521 __entry->reason = reason;
1522 __entry->more_data = more_data;
1525 TP_printk(
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,
1538 bool more_data),
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,
1548 bool more_data),
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),
1560 TP_STRUCT__entry(
1561 LOCAL_ENTRY
1562 VIF_ENTRY
1563 __field(u32, duration)
1564 __field(u16, subtype)
1565 __field(u8, success)
1568 TP_fast_assign(
1569 LOCAL_ASSIGN;
1570 VIF_ASSIGN;
1571 __entry->duration = duration;
1572 __entry->subtype = subtype;
1573 __entry->success = success;
1576 TP_printk(
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),
1612 TP_STRUCT__entry(
1613 LOCAL_ENTRY
1614 CHANCTX_ENTRY
1617 TP_fast_assign(
1618 LOCAL_ASSIGN;
1619 CHANCTX_ASSIGN;
1622 TP_printk(
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),
1631 TP_ARGS(local, ctx)
1634 DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1635 TP_PROTO(struct ieee80211_local *local,
1636 struct ieee80211_chanctx *ctx),
1637 TP_ARGS(local, ctx)
1640 TRACE_EVENT(drv_change_chanctx,
1641 TP_PROTO(struct ieee80211_local *local,
1642 struct ieee80211_chanctx *ctx,
1643 u32 changed),
1645 TP_ARGS(local, ctx, changed),
1647 TP_STRUCT__entry(
1648 LOCAL_ENTRY
1649 CHANCTX_ENTRY
1650 __field(u32, changed)
1653 TP_fast_assign(
1654 LOCAL_ASSIGN;
1655 CHANCTX_ASSIGN;
1656 __entry->changed = changed;
1659 TP_printk(
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;
1669 bool p2p;
1670 char vif_name[IFNAMSIZ];
1671 } __packed;
1673 struct trace_chandef_entry {
1674 u32 control_freq;
1675 u32 freq_offset;
1676 u32 chan_width;
1677 u32 center_freq1;
1678 u32 freq1_offset;
1679 u32 center_freq2;
1680 } __packed;
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;
1687 } __packed;
1689 #define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
1690 #endif
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),
1698 TP_STRUCT__entry(
1699 LOCAL_ENTRY
1700 __field(int, n_vifs)
1701 __field(u32, mode)
1702 __dynamic_array(u8, vifs,
1703 sizeof(struct trace_switch_entry) * n_vifs)
1706 TP_fast_assign(
1707 LOCAL_ASSIGN;
1708 __entry->n_vifs = n_vifs;
1709 __entry->mode = mode;
1711 struct trace_switch_entry *local_vifs =
1712 __get_dynamic_array(vifs);
1713 int i;
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,
1720 vif);
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,
1726 sdata->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);
1756 TP_printk(
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),
1770 TP_STRUCT__entry(
1771 LOCAL_ENTRY
1772 VIF_ENTRY
1773 CHANCTX_ENTRY
1774 __field(unsigned int, link_id)
1777 TP_fast_assign(
1778 LOCAL_ASSIGN;
1779 VIF_ASSIGN;
1780 CHANCTX_ASSIGN;
1781 __entry->link_id = link_conf->link_id;
1784 TP_printk(
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),
1813 TP_STRUCT__entry(
1814 LOCAL_ENTRY
1815 VIF_ENTRY
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)
1823 TP_fast_assign(
1824 LOCAL_ASSIGN;
1825 VIF_ASSIGN;
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);
1835 TP_printk(
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),
1848 TP_STRUCT__entry(
1849 LOCAL_ENTRY
1850 VIF_ENTRY
1851 __field(u32, link_id)
1854 TP_fast_assign(
1855 LOCAL_ASSIGN;
1856 VIF_ASSIGN;
1857 __entry->link_id = link_conf->link_id;
1860 TP_printk(
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),
1871 TP_STRUCT__entry(
1872 LOCAL_ENTRY
1873 __field(u8, reconfig_type)
1876 TP_fast_assign(
1877 LOCAL_ASSIGN;
1878 __entry->reconfig_type = reconfig_type;
1881 TP_printk(
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)
1894 #endif
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),
1903 TP_STRUCT__entry(
1904 LOCAL_ENTRY
1905 VIF_ENTRY
1906 __field(u8, dtimper)
1907 __field(u16, bcnint)
1908 __dynamic_array(u8, ssid, sdata->vif.cfg.ssid_len)
1911 TP_fast_assign(
1912 LOCAL_ASSIGN;
1913 VIF_ASSIGN;
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);
1921 TP_printk(
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),
1936 TP_ARGS(sta),
1938 TP_STRUCT__entry(
1939 STA_ENTRY
1942 TP_fast_assign(
1943 STA_ASSIGN;
1946 TP_printk(
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),
1957 TP_STRUCT__entry(
1958 LOCAL_ENTRY
1959 VIF_ENTRY
1960 __field(u8, master_pref)
1961 __field(u8, bands)
1964 TP_fast_assign(
1965 LOCAL_ASSIGN;
1966 VIF_ASSIGN;
1967 __entry->master_pref = conf->master_pref;
1968 __entry->bands = conf->bands;
1971 TP_printk(
1972 LOCAL_PR_FMT VIF_PR_FMT
1973 ", master preference: %u, bands: 0x%0x",
1974 LOCAL_PR_ARG, VIF_PR_ARG, __entry->master_pref,
1975 __entry->bands
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),
1985 TP_STRUCT__entry(
1986 LOCAL_ENTRY
1987 VIF_ENTRY
1990 TP_fast_assign(
1991 LOCAL_ASSIGN;
1992 VIF_ASSIGN;
1995 TP_printk(
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,
2005 u32 changes),
2007 TP_ARGS(local, sdata, conf, changes),
2008 TP_STRUCT__entry(
2009 LOCAL_ENTRY
2010 VIF_ENTRY
2011 __field(u8, master_pref)
2012 __field(u8, bands)
2013 __field(u32, changes)
2016 TP_fast_assign(
2017 LOCAL_ASSIGN;
2018 VIF_ASSIGN;
2019 __entry->master_pref = conf->master_pref;
2020 __entry->bands = conf->bands;
2021 __entry->changes = changes;
2024 TP_printk(
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),
2038 TP_STRUCT__entry(
2039 LOCAL_ENTRY
2040 VIF_ENTRY
2041 __field(u8, type)
2042 __field(u8, inst_id)
2045 TP_fast_assign(
2046 LOCAL_ASSIGN;
2047 VIF_ASSIGN;
2048 __entry->type = func->type;
2049 __entry->inst_id = func->instance_id;
2052 TP_printk(
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,
2062 u8 instance_id),
2064 TP_ARGS(local, sdata, instance_id),
2065 TP_STRUCT__entry(
2066 LOCAL_ENTRY
2067 VIF_ENTRY
2068 __field(u8, instance_id)
2071 TP_fast_assign(
2072 LOCAL_ASSIGN;
2073 VIF_ASSIGN;
2074 __entry->instance_id = instance_id;
2077 TP_printk(
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,
2099 int key_idx),
2101 TP_ARGS(local, sdata, key_idx),
2103 TP_STRUCT__entry(
2104 LOCAL_ENTRY
2105 VIF_ENTRY
2106 __field(int, key_idx)
2109 TP_fast_assign(
2110 LOCAL_ASSIGN;
2111 VIF_ASSIGN;
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),
2126 TP_STRUCT__entry(
2127 LOCAL_ENTRY
2128 VIF_ENTRY
2129 CHANDEF_ENTRY
2132 TP_fast_assign(
2133 LOCAL_ASSIGN;
2134 VIF_ASSIGN;
2135 CHANDEF_ASSIGN(chandef);
2138 TP_printk(
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,
2173 int dbm, int ret),
2175 TP_ARGS(local, sdata, dbm, ret),
2177 TP_STRUCT__entry(
2178 LOCAL_ENTRY
2179 VIF_ENTRY
2180 __field(int, dbm)
2181 __field(int, ret)
2184 TP_fast_assign(
2185 LOCAL_ASSIGN;
2186 VIF_ASSIGN;
2187 __entry->dbm = dbm;
2188 __entry->ret = ret;
2191 TP_printk(
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),
2205 TP_STRUCT__entry(
2206 LOCAL_ENTRY
2207 VIF_ENTRY
2208 STA_ENTRY
2209 __field(u8, oper_class)
2210 CHANDEF_ENTRY
2213 TP_fast_assign(
2214 LOCAL_ASSIGN;
2215 VIF_ASSIGN;
2216 STA_ASSIGN;
2217 __entry->oper_class = oper_class;
2218 CHANDEF_ASSIGN(chandef)
2221 TP_printk(
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,
2225 STA_PR_ARG
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),
2236 TP_STRUCT__entry(
2237 LOCAL_ENTRY
2238 VIF_ENTRY
2239 STA_ENTRY
2242 TP_fast_assign(
2243 LOCAL_ASSIGN;
2244 VIF_ASSIGN;
2245 STA_ASSIGN;
2248 TP_printk(
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),
2262 TP_STRUCT__entry(
2263 LOCAL_ENTRY
2264 VIF_ENTRY
2265 __field(u8, action_code)
2266 STA_ENTRY
2267 CHANDEF_ENTRY
2268 __field(u32, status)
2269 __field(bool, peer_initiator)
2270 __field(u32, timestamp)
2271 __field(u16, switch_time)
2272 __field(u16, switch_timeout)
2275 TP_fast_assign(
2276 LOCAL_ASSIGN;
2277 VIF_ASSIGN;
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;
2288 TP_printk(
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),
2306 TP_STRUCT__entry(
2307 LOCAL_ENTRY
2308 VIF_ENTRY
2309 STA_ENTRY
2310 __field(u8, ac)
2311 __field(u8, tid)
2314 TP_fast_assign(
2315 struct ieee80211_sta *sta = txq->txq.sta;
2317 LOCAL_ASSIGN;
2318 VIF_ASSIGN;
2319 STA_ASSIGN;
2320 __entry->ac = txq->txq.ac;
2321 __entry->tid = txq->txq.tid;
2324 TP_printk(
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),
2337 TP_STRUCT__entry(
2338 LOCAL_ENTRY
2339 VIF_ENTRY
2342 TP_fast_assign(
2343 LOCAL_ASSIGN;
2344 VIF_ASSIGN;
2347 TP_printk(
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),
2366 TP_STRUCT__entry(
2367 LOCAL_ENTRY
2368 VIF_ENTRY
2369 STA_ENTRY
2370 __field(bool, enabled)
2373 TP_fast_assign(
2374 LOCAL_ASSIGN;
2375 VIF_ASSIGN;
2376 STA_ASSIGN;
2377 __entry->enabled = enabled;
2380 TP_printk(
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),
2410 TP_STRUCT__entry(
2411 LOCAL_ENTRY
2412 STA_ENTRY
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)
2422 TP_fast_assign(
2423 LOCAL_ASSIGN;
2424 STA_ASSIGN;
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;
2434 TP_printk(
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),
2451 TP_STRUCT__entry(
2452 LOCAL_ENTRY
2453 STA_ENTRY
2454 __field(u8, flowid)
2457 TP_fast_assign(
2458 LOCAL_ASSIGN;
2459 STA_ASSIGN;
2460 __entry->flowid = flowid;
2463 TP_printk(
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,
2479 u8 type),
2481 TP_ARGS(local, sdata, type),
2483 TP_STRUCT__entry(
2484 LOCAL_ENTRY
2485 VIF_ENTRY
2486 __field(u8, type)
2489 TP_fast_assign(
2490 LOCAL_ASSIGN;
2491 VIF_ASSIGN;
2492 __entry->type = type;
2495 TP_printk(
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,
2504 u16 active_links),
2506 TP_ARGS(local, sdata, active_links),
2508 TP_STRUCT__entry(
2509 LOCAL_ENTRY
2510 VIF_ENTRY
2511 __field(u16, active_links)
2514 TP_fast_assign(
2515 LOCAL_ASSIGN;
2516 VIF_ASSIGN;
2517 __entry->active_links = active_links;
2520 TP_printk(
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),
2533 TP_STRUCT__entry(
2534 LOCAL_ENTRY
2535 VIF_ENTRY
2536 __field(u16, old_links)
2537 __field(u16, new_links)
2540 TP_fast_assign(
2541 LOCAL_ASSIGN;
2542 VIF_ASSIGN;
2543 __entry->old_links = old_links;
2544 __entry->new_links = new_links;
2547 TP_printk(
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),
2561 TP_STRUCT__entry(
2562 LOCAL_ENTRY
2563 VIF_ENTRY
2564 STA_ENTRY
2565 __field(u16, old_links)
2566 __field(u16, new_links)
2569 TP_fast_assign(
2570 LOCAL_ASSIGN;
2571 VIF_ASSIGN;
2572 STA_ASSIGN;
2573 __entry->old_links = old_links;
2574 __entry->new_links = new_links;
2577 TP_printk(
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),
2591 TP_ARGS(sta, tid),
2593 TP_STRUCT__entry(
2594 STA_ENTRY
2595 __field(u16, tid)
2598 TP_fast_assign(
2599 STA_ASSIGN;
2600 __entry->tid = tid;
2603 TP_printk(
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),
2614 TP_STRUCT__entry(
2615 VIF_ENTRY
2616 __array(u8, ra, ETH_ALEN)
2617 __field(u16, tid)
2620 TP_fast_assign(
2621 VIF_ASSIGN;
2622 memcpy(__entry->ra, ra, ETH_ALEN);
2623 __entry->tid = tid;
2626 TP_printk(
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),
2635 TP_ARGS(sta, tid),
2637 TP_STRUCT__entry(
2638 STA_ENTRY
2639 __field(u16, tid)
2642 TP_fast_assign(
2643 STA_ASSIGN;
2644 __entry->tid = tid;
2647 TP_printk(
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),
2658 TP_STRUCT__entry(
2659 VIF_ENTRY
2660 __array(u8, ra, ETH_ALEN)
2661 __field(u16, tid)
2664 TP_fast_assign(
2665 VIF_ASSIGN;
2666 memcpy(__entry->ra, ra, ETH_ALEN);
2667 __entry->tid = tid;
2670 TP_printk(
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),
2678 TP_ARGS(local)
2681 TRACE_EVENT(api_beacon_loss,
2682 TP_PROTO(struct ieee80211_sub_if_data *sdata),
2684 TP_ARGS(sdata),
2686 TP_STRUCT__entry(
2687 VIF_ENTRY
2690 TP_fast_assign(
2691 VIF_ASSIGN;
2694 TP_printk(
2695 VIF_PR_FMT,
2696 VIF_PR_ARG
2700 TRACE_EVENT(api_connection_loss,
2701 TP_PROTO(struct ieee80211_sub_if_data *sdata),
2703 TP_ARGS(sdata),
2705 TP_STRUCT__entry(
2706 VIF_ENTRY
2709 TP_fast_assign(
2710 VIF_ASSIGN;
2713 TP_printk(
2714 VIF_PR_FMT,
2715 VIF_PR_ARG
2719 TRACE_EVENT(api_disconnect,
2720 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool reconnect),
2722 TP_ARGS(sdata, reconnect),
2724 TP_STRUCT__entry(
2725 VIF_ENTRY
2726 __field(int, reconnect)
2729 TP_fast_assign(
2730 VIF_ASSIGN;
2731 __entry->reconnect = reconnect;
2734 TP_printk(
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,
2743 s32 rssi_level),
2745 TP_ARGS(sdata, rssi_event, rssi_level),
2747 TP_STRUCT__entry(
2748 VIF_ENTRY
2749 __field(u32, rssi_event)
2750 __field(s32, rssi_level)
2753 TP_fast_assign(
2754 VIF_ASSIGN;
2755 __entry->rssi_event = rssi_event;
2756 __entry->rssi_level = rssi_level;
2759 TP_printk(
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),
2776 TP_STRUCT__entry(
2777 LOCAL_ENTRY
2778 __field(bool, aborted)
2781 TP_fast_assign(
2782 LOCAL_ASSIGN;
2783 __entry->aborted = aborted;
2786 TP_printk(
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),
2795 TP_ARGS(local),
2797 TP_STRUCT__entry(
2798 LOCAL_ENTRY
2801 TP_fast_assign(
2802 LOCAL_ASSIGN;
2805 TP_printk(
2806 LOCAL_PR_FMT, LOCAL_PR_ARG
2810 TRACE_EVENT(api_sched_scan_stopped,
2811 TP_PROTO(struct ieee80211_local *local),
2813 TP_ARGS(local),
2815 TP_STRUCT__entry(
2816 LOCAL_ENTRY
2819 TP_fast_assign(
2820 LOCAL_ASSIGN;
2823 TP_printk(
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),
2834 TP_STRUCT__entry(
2835 LOCAL_ENTRY
2836 STA_ENTRY
2837 __field(bool, block)
2840 TP_fast_assign(
2841 LOCAL_ASSIGN;
2842 STA_ASSIGN;
2843 __entry->block = block;
2846 TP_printk(
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),
2858 TP_STRUCT__entry(
2859 VIF_ENTRY
2860 __field(bool, success)
2861 __field(unsigned int, link_id)
2864 TP_fast_assign(
2865 VIF_ASSIGN;
2866 __entry->success = success;
2867 __entry->link_id = link_id;
2870 TP_printk(
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),
2878 TP_ARGS(local)
2881 DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
2882 TP_PROTO(struct ieee80211_local *local),
2883 TP_ARGS(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),
2892 TP_STRUCT__entry(
2893 VIF_ENTRY
2894 __array(u8, bssid, ETH_ALEN)
2895 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
2898 TP_fast_assign(
2899 VIF_ASSIGN;
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),
2913 TP_STRUCT__entry(
2914 VIF_ENTRY
2915 __field(int, rssi_min_thold)
2916 __field(int, rssi_max_thold)
2919 TP_fast_assign(
2920 VIF_ASSIGN;
2921 __entry->rssi_min_thold = rssi_min_thold;
2922 __entry->rssi_max_thold = rssi_max_thold;
2925 TP_printk(
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),
2937 TP_STRUCT__entry(
2938 LOCAL_ENTRY
2939 STA_ENTRY
2942 TP_fast_assign(
2943 LOCAL_ASSIGN;
2944 STA_ASSIGN;
2947 TP_printk(
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,
2956 u8 tid),
2958 TP_ARGS(local, sta, tid),
2960 TP_STRUCT__entry(
2961 LOCAL_ENTRY
2962 STA_ENTRY
2963 __field(u8, tid)
2966 TP_fast_assign(
2967 LOCAL_ASSIGN;
2968 STA_ASSIGN;
2969 __entry->tid = tid;
2972 TP_printk(
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),
2985 TP_STRUCT__entry(
2986 LOCAL_ENTRY
2987 STA_ENTRY
2988 __field(u8, tid)
2989 __field(bool, buffered)
2992 TP_fast_assign(
2993 LOCAL_ASSIGN;
2994 STA_ASSIGN;
2995 __entry->tid = tid;
2996 __entry->buffered = buffered;
2999 TP_printk(
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),
3008 TP_ARGS(local),
3010 TP_STRUCT__entry(
3011 LOCAL_ENTRY
3014 TP_fast_assign(
3015 LOCAL_ASSIGN;
3018 TP_printk(
3019 LOCAL_PR_FMT " radar detected",
3020 LOCAL_PR_ARG
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),
3032 TP_STRUCT__entry(
3033 LOCAL_ENTRY
3034 VIF_ENTRY
3035 __field(int, link_id)
3036 __field(u32, smps_mode)
3039 TP_fast_assign(
3040 LOCAL_ASSIGN;
3041 VIF_ASSIGN;
3042 __entry->link_id = link->link_id,
3043 __entry->smps_mode = smps_mode;
3046 TP_printk(
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),
3063 TP_STRUCT__entry(
3064 LOCAL_ENTRY
3065 __field(u16, queue)
3066 __field(u32, reason)
3069 TP_fast_assign(
3070 LOCAL_ASSIGN;
3071 __entry->queue = queue;
3072 __entry->reason = reason;
3075 TP_printk(
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),
3087 TP_STRUCT__entry(
3088 LOCAL_ENTRY
3089 __field(u16, queue)
3090 __field(u32, reason)
3093 TP_fast_assign(
3094 LOCAL_ASSIGN;
3095 __entry->queue = queue;
3096 __entry->reason = reason;
3099 TP_printk(
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
3113 VIF_ENTRY
3114 __array(u16, downlink, sizeof(u16) * 8)
3115 __array(u16, uplink, sizeof(u16) * 8)
3118 TP_fast_assign(LOCAL_ASSIGN;
3119 VIF_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
3138 VIF_ENTRY
3139 __field(u32, res)
3140 __array(u16, downlink, sizeof(u16) * 8)
3141 __array(u16, uplink, sizeof(u16) * 8)
3144 TP_fast_assign(LOCAL_ASSIGN;
3145 VIF_ASSIGN;
3146 __entry->res = res;
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>