Merge tag 'uml-for-linus-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux.git] / net / mac80211 / trace.h
blob72fad8ea8bb9aee2c44802f5918f853e745326f9
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_link_sta_rc_update,
943 TP_PROTO(struct ieee80211_local *local,
944 struct ieee80211_sub_if_data *sdata,
945 struct ieee80211_link_sta *link_sta,
946 u32 changed),
948 TP_ARGS(local, sdata, link_sta, changed),
950 TP_STRUCT__entry(
951 LOCAL_ENTRY
952 VIF_ENTRY
953 STA_ENTRY
954 __field(u32, changed)
955 __field(u32, link_id)
958 TP_fast_assign(
959 LOCAL_ASSIGN;
960 VIF_ASSIGN;
961 STA_NAMED_ASSIGN(link_sta->sta);
962 __entry->changed = changed;
963 __entry->link_id = link_sta->link_id;
966 TP_printk(
967 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " (link %d) changed: 0x%x",
968 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->link_id,
969 __entry->changed
973 DECLARE_EVENT_CLASS(sta_event,
974 TP_PROTO(struct ieee80211_local *local,
975 struct ieee80211_sub_if_data *sdata,
976 struct ieee80211_sta *sta),
978 TP_ARGS(local, sdata, sta),
980 TP_STRUCT__entry(
981 LOCAL_ENTRY
982 VIF_ENTRY
983 STA_ENTRY
986 TP_fast_assign(
987 LOCAL_ASSIGN;
988 VIF_ASSIGN;
989 STA_ASSIGN;
992 TP_printk(
993 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
994 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
998 DEFINE_EVENT(sta_event, drv_sta_statistics,
999 TP_PROTO(struct ieee80211_local *local,
1000 struct ieee80211_sub_if_data *sdata,
1001 struct ieee80211_sta *sta),
1002 TP_ARGS(local, sdata, sta)
1005 DEFINE_EVENT(sta_event, drv_sta_add,
1006 TP_PROTO(struct ieee80211_local *local,
1007 struct ieee80211_sub_if_data *sdata,
1008 struct ieee80211_sta *sta),
1009 TP_ARGS(local, sdata, sta)
1012 DEFINE_EVENT(sta_event, drv_sta_remove,
1013 TP_PROTO(struct ieee80211_local *local,
1014 struct ieee80211_sub_if_data *sdata,
1015 struct ieee80211_sta *sta),
1016 TP_ARGS(local, sdata, sta)
1019 DEFINE_EVENT(sta_event, drv_sta_pre_rcu_remove,
1020 TP_PROTO(struct ieee80211_local *local,
1021 struct ieee80211_sub_if_data *sdata,
1022 struct ieee80211_sta *sta),
1023 TP_ARGS(local, sdata, sta)
1026 DEFINE_EVENT(sta_event, drv_sync_rx_queues,
1027 TP_PROTO(struct ieee80211_local *local,
1028 struct ieee80211_sub_if_data *sdata,
1029 struct ieee80211_sta *sta),
1030 TP_ARGS(local, sdata, sta)
1033 DEFINE_EVENT(sta_event, drv_sta_rate_tbl_update,
1034 TP_PROTO(struct ieee80211_local *local,
1035 struct ieee80211_sub_if_data *sdata,
1036 struct ieee80211_sta *sta),
1037 TP_ARGS(local, sdata, sta)
1040 TRACE_EVENT(drv_conf_tx,
1041 TP_PROTO(struct ieee80211_local *local,
1042 struct ieee80211_sub_if_data *sdata,
1043 unsigned int link_id,
1044 u16 ac, const struct ieee80211_tx_queue_params *params),
1046 TP_ARGS(local, sdata, link_id, ac, params),
1048 TP_STRUCT__entry(
1049 LOCAL_ENTRY
1050 VIF_ENTRY
1051 __field(unsigned int, link_id)
1052 __field(u16, ac)
1053 __field(u16, txop)
1054 __field(u16, cw_min)
1055 __field(u16, cw_max)
1056 __field(u8, aifs)
1057 __field(bool, uapsd)
1060 TP_fast_assign(
1061 LOCAL_ASSIGN;
1062 VIF_ASSIGN;
1063 __entry->link_id = link_id;
1064 __entry->ac = ac;
1065 __entry->txop = params->txop;
1066 __entry->cw_max = params->cw_max;
1067 __entry->cw_min = params->cw_min;
1068 __entry->aifs = params->aifs;
1069 __entry->uapsd = params->uapsd;
1072 TP_printk(
1073 LOCAL_PR_FMT VIF_PR_FMT " link_id: %d, AC:%d",
1074 LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id, __entry->ac
1078 DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
1079 TP_PROTO(struct ieee80211_local *local,
1080 struct ieee80211_sub_if_data *sdata),
1081 TP_ARGS(local, sdata)
1084 TRACE_EVENT(drv_set_tsf,
1085 TP_PROTO(struct ieee80211_local *local,
1086 struct ieee80211_sub_if_data *sdata,
1087 u64 tsf),
1089 TP_ARGS(local, sdata, tsf),
1091 TP_STRUCT__entry(
1092 LOCAL_ENTRY
1093 VIF_ENTRY
1094 __field(u64, tsf)
1097 TP_fast_assign(
1098 LOCAL_ASSIGN;
1099 VIF_ASSIGN;
1100 __entry->tsf = tsf;
1103 TP_printk(
1104 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
1105 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
1109 TRACE_EVENT(drv_offset_tsf,
1110 TP_PROTO(struct ieee80211_local *local,
1111 struct ieee80211_sub_if_data *sdata,
1112 s64 offset),
1114 TP_ARGS(local, sdata, offset),
1116 TP_STRUCT__entry(
1117 LOCAL_ENTRY
1118 VIF_ENTRY
1119 __field(s64, tsf_offset)
1122 TP_fast_assign(
1123 LOCAL_ASSIGN;
1124 VIF_ASSIGN;
1125 __entry->tsf_offset = offset;
1128 TP_printk(
1129 LOCAL_PR_FMT VIF_PR_FMT " tsf offset:%lld",
1130 LOCAL_PR_ARG, VIF_PR_ARG,
1131 (unsigned long long)__entry->tsf_offset
1135 DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
1136 TP_PROTO(struct ieee80211_local *local,
1137 struct ieee80211_sub_if_data *sdata),
1138 TP_ARGS(local, sdata)
1141 DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
1142 TP_PROTO(struct ieee80211_local *local),
1143 TP_ARGS(local)
1146 TRACE_EVENT(drv_ampdu_action,
1147 TP_PROTO(struct ieee80211_local *local,
1148 struct ieee80211_sub_if_data *sdata,
1149 struct ieee80211_ampdu_params *params),
1151 TP_ARGS(local, sdata, params),
1153 TP_STRUCT__entry(
1154 LOCAL_ENTRY
1155 VIF_ENTRY
1156 AMPDU_ACTION_ENTRY
1159 TP_fast_assign(
1160 LOCAL_ASSIGN;
1161 VIF_ASSIGN;
1162 AMPDU_ACTION_ASSIGN;
1165 TP_printk(
1166 LOCAL_PR_FMT VIF_PR_FMT AMPDU_ACTION_PR_FMT,
1167 LOCAL_PR_ARG, VIF_PR_ARG, AMPDU_ACTION_PR_ARG
1171 TRACE_EVENT(drv_get_survey,
1172 TP_PROTO(struct ieee80211_local *local, int _idx,
1173 struct survey_info *survey),
1175 TP_ARGS(local, _idx, survey),
1177 TP_STRUCT__entry(
1178 LOCAL_ENTRY
1179 __field(int, idx)
1182 TP_fast_assign(
1183 LOCAL_ASSIGN;
1184 __entry->idx = _idx;
1187 TP_printk(
1188 LOCAL_PR_FMT " idx:%d",
1189 LOCAL_PR_ARG, __entry->idx
1193 TRACE_EVENT(drv_flush,
1194 TP_PROTO(struct ieee80211_local *local,
1195 u32 queues, bool drop),
1197 TP_ARGS(local, queues, drop),
1199 TP_STRUCT__entry(
1200 LOCAL_ENTRY
1201 __field(bool, drop)
1202 __field(u32, queues)
1205 TP_fast_assign(
1206 LOCAL_ASSIGN;
1207 __entry->drop = drop;
1208 __entry->queues = queues;
1211 TP_printk(
1212 LOCAL_PR_FMT " queues:0x%x drop:%d",
1213 LOCAL_PR_ARG, __entry->queues, __entry->drop
1217 DEFINE_EVENT(sta_event, drv_flush_sta,
1218 TP_PROTO(struct ieee80211_local *local,
1219 struct ieee80211_sub_if_data *sdata,
1220 struct ieee80211_sta *sta),
1221 TP_ARGS(local, sdata, sta)
1224 DECLARE_EVENT_CLASS(chanswitch_evt,
1225 TP_PROTO(struct ieee80211_local *local,
1226 struct ieee80211_sub_if_data *sdata,
1227 struct ieee80211_channel_switch *ch_switch),
1229 TP_ARGS(local, sdata, ch_switch),
1231 TP_STRUCT__entry(
1232 LOCAL_ENTRY
1233 VIF_ENTRY
1234 CHANDEF_ENTRY
1235 __field(u64, timestamp)
1236 __field(u32, device_timestamp)
1237 __field(bool, block_tx)
1238 __field(u8, count)
1239 __field(u8, link_id)
1242 TP_fast_assign(
1243 LOCAL_ASSIGN;
1244 VIF_ASSIGN;
1245 CHANDEF_ASSIGN(&ch_switch->chandef)
1246 __entry->timestamp = ch_switch->timestamp;
1247 __entry->device_timestamp = ch_switch->device_timestamp;
1248 __entry->block_tx = ch_switch->block_tx;
1249 __entry->count = ch_switch->count;
1250 __entry->link_id = ch_switch->link_id;
1253 TP_printk(
1254 LOCAL_PR_FMT VIF_PR_FMT CHANDEF_PR_FMT " count:%d block_tx:%d timestamp:%llu device_ts:%u link_id:%d",
1255 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count,
1256 __entry->block_tx, __entry->timestamp,
1257 __entry->device_timestamp, __entry->link_id
1261 DEFINE_EVENT(chanswitch_evt, drv_channel_switch,
1262 TP_PROTO(struct ieee80211_local *local,
1263 struct ieee80211_sub_if_data *sdata,
1264 struct ieee80211_channel_switch *ch_switch),
1265 TP_ARGS(local, sdata, ch_switch)
1268 TRACE_EVENT(drv_set_antenna,
1269 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1271 TP_ARGS(local, tx_ant, rx_ant, ret),
1273 TP_STRUCT__entry(
1274 LOCAL_ENTRY
1275 __field(u32, tx_ant)
1276 __field(u32, rx_ant)
1277 __field(int, ret)
1280 TP_fast_assign(
1281 LOCAL_ASSIGN;
1282 __entry->tx_ant = tx_ant;
1283 __entry->rx_ant = rx_ant;
1284 __entry->ret = ret;
1287 TP_printk(
1288 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1289 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1293 TRACE_EVENT(drv_get_antenna,
1294 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1296 TP_ARGS(local, tx_ant, rx_ant, ret),
1298 TP_STRUCT__entry(
1299 LOCAL_ENTRY
1300 __field(u32, tx_ant)
1301 __field(u32, rx_ant)
1302 __field(int, ret)
1305 TP_fast_assign(
1306 LOCAL_ASSIGN;
1307 __entry->tx_ant = tx_ant;
1308 __entry->rx_ant = rx_ant;
1309 __entry->ret = ret;
1312 TP_printk(
1313 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1314 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1318 TRACE_EVENT(drv_remain_on_channel,
1319 TP_PROTO(struct ieee80211_local *local,
1320 struct ieee80211_sub_if_data *sdata,
1321 struct ieee80211_channel *chan,
1322 unsigned int duration,
1323 enum ieee80211_roc_type type),
1325 TP_ARGS(local, sdata, chan, duration, type),
1327 TP_STRUCT__entry(
1328 LOCAL_ENTRY
1329 VIF_ENTRY
1330 __field(int, center_freq)
1331 __field(int, freq_offset)
1332 __field(unsigned int, duration)
1333 __field(u32, type)
1336 TP_fast_assign(
1337 LOCAL_ASSIGN;
1338 VIF_ASSIGN;
1339 __entry->center_freq = chan->center_freq;
1340 __entry->freq_offset = chan->freq_offset;
1341 __entry->duration = duration;
1342 __entry->type = type;
1345 TP_printk(
1346 LOCAL_PR_FMT VIF_PR_FMT " freq:%d.%03dMHz duration:%dms type=%d",
1347 LOCAL_PR_ARG, VIF_PR_ARG,
1348 __entry->center_freq, __entry->freq_offset,
1349 __entry->duration, __entry->type
1353 DEFINE_EVENT(local_sdata_evt, drv_cancel_remain_on_channel,
1354 TP_PROTO(struct ieee80211_local *local,
1355 struct ieee80211_sub_if_data *sdata),
1356 TP_ARGS(local, sdata)
1359 TRACE_EVENT(drv_set_ringparam,
1360 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1362 TP_ARGS(local, tx, rx),
1364 TP_STRUCT__entry(
1365 LOCAL_ENTRY
1366 __field(u32, tx)
1367 __field(u32, rx)
1370 TP_fast_assign(
1371 LOCAL_ASSIGN;
1372 __entry->tx = tx;
1373 __entry->rx = rx;
1376 TP_printk(
1377 LOCAL_PR_FMT " tx:%d rx %d",
1378 LOCAL_PR_ARG, __entry->tx, __entry->rx
1382 TRACE_EVENT(drv_get_ringparam,
1383 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1384 u32 *rx, u32 *rx_max),
1386 TP_ARGS(local, tx, tx_max, rx, rx_max),
1388 TP_STRUCT__entry(
1389 LOCAL_ENTRY
1390 __field(u32, tx)
1391 __field(u32, tx_max)
1392 __field(u32, rx)
1393 __field(u32, rx_max)
1396 TP_fast_assign(
1397 LOCAL_ASSIGN;
1398 __entry->tx = *tx;
1399 __entry->tx_max = *tx_max;
1400 __entry->rx = *rx;
1401 __entry->rx_max = *rx_max;
1404 TP_printk(
1405 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1406 LOCAL_PR_ARG,
1407 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1411 DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1412 TP_PROTO(struct ieee80211_local *local),
1413 TP_ARGS(local)
1416 DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1417 TP_PROTO(struct ieee80211_local *local),
1418 TP_ARGS(local)
1421 TRACE_EVENT(drv_set_bitrate_mask,
1422 TP_PROTO(struct ieee80211_local *local,
1423 struct ieee80211_sub_if_data *sdata,
1424 const struct cfg80211_bitrate_mask *mask),
1426 TP_ARGS(local, sdata, mask),
1428 TP_STRUCT__entry(
1429 LOCAL_ENTRY
1430 VIF_ENTRY
1431 __field(u32, legacy_2g)
1432 __field(u32, legacy_5g)
1435 TP_fast_assign(
1436 LOCAL_ASSIGN;
1437 VIF_ASSIGN;
1438 __entry->legacy_2g = mask->control[NL80211_BAND_2GHZ].legacy;
1439 __entry->legacy_5g = mask->control[NL80211_BAND_5GHZ].legacy;
1442 TP_printk(
1443 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1444 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1448 TRACE_EVENT(drv_set_rekey_data,
1449 TP_PROTO(struct ieee80211_local *local,
1450 struct ieee80211_sub_if_data *sdata,
1451 struct cfg80211_gtk_rekey_data *data),
1453 TP_ARGS(local, sdata, data),
1455 TP_STRUCT__entry(
1456 LOCAL_ENTRY
1457 VIF_ENTRY
1458 __array(u8, kek, NL80211_KEK_LEN)
1459 __array(u8, kck, NL80211_KCK_LEN)
1460 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1463 TP_fast_assign(
1464 LOCAL_ASSIGN;
1465 VIF_ASSIGN;
1466 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1467 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1468 memcpy(__entry->replay_ctr, data->replay_ctr,
1469 NL80211_REPLAY_CTR_LEN);
1472 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1473 LOCAL_PR_ARG, VIF_PR_ARG)
1476 TRACE_EVENT(drv_event_callback,
1477 TP_PROTO(struct ieee80211_local *local,
1478 struct ieee80211_sub_if_data *sdata,
1479 const struct ieee80211_event *_event),
1481 TP_ARGS(local, sdata, _event),
1483 TP_STRUCT__entry(
1484 LOCAL_ENTRY
1485 VIF_ENTRY
1486 __field(u32, type)
1489 TP_fast_assign(
1490 LOCAL_ASSIGN;
1491 VIF_ASSIGN;
1492 __entry->type = _event->type;
1495 TP_printk(
1496 LOCAL_PR_FMT VIF_PR_FMT " event:%d",
1497 LOCAL_PR_ARG, VIF_PR_ARG, __entry->type
1501 DECLARE_EVENT_CLASS(release_evt,
1502 TP_PROTO(struct ieee80211_local *local,
1503 struct ieee80211_sta *sta,
1504 u16 tids, int num_frames,
1505 enum ieee80211_frame_release_type reason,
1506 bool more_data),
1508 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1510 TP_STRUCT__entry(
1511 LOCAL_ENTRY
1512 STA_ENTRY
1513 __field(u16, tids)
1514 __field(int, num_frames)
1515 __field(int, reason)
1516 __field(bool, more_data)
1519 TP_fast_assign(
1520 LOCAL_ASSIGN;
1521 STA_ASSIGN;
1522 __entry->tids = tids;
1523 __entry->num_frames = num_frames;
1524 __entry->reason = reason;
1525 __entry->more_data = more_data;
1528 TP_printk(
1529 LOCAL_PR_FMT STA_PR_FMT
1530 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1531 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1532 __entry->reason, __entry->more_data
1536 DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1537 TP_PROTO(struct ieee80211_local *local,
1538 struct ieee80211_sta *sta,
1539 u16 tids, int num_frames,
1540 enum ieee80211_frame_release_type reason,
1541 bool more_data),
1543 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1546 DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1547 TP_PROTO(struct ieee80211_local *local,
1548 struct ieee80211_sta *sta,
1549 u16 tids, int num_frames,
1550 enum ieee80211_frame_release_type reason,
1551 bool more_data),
1553 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1556 DECLARE_EVENT_CLASS(mgd_prepare_complete_tx_evt,
1557 TP_PROTO(struct ieee80211_local *local,
1558 struct ieee80211_sub_if_data *sdata,
1559 u16 duration, u16 subtype, bool success),
1561 TP_ARGS(local, sdata, duration, subtype, success),
1563 TP_STRUCT__entry(
1564 LOCAL_ENTRY
1565 VIF_ENTRY
1566 __field(u32, duration)
1567 __field(u16, subtype)
1568 __field(u8, success)
1571 TP_fast_assign(
1572 LOCAL_ASSIGN;
1573 VIF_ASSIGN;
1574 __entry->duration = duration;
1575 __entry->subtype = subtype;
1576 __entry->success = success;
1579 TP_printk(
1580 LOCAL_PR_FMT VIF_PR_FMT " duration: %u, subtype:0x%x, success:%d",
1581 LOCAL_PR_ARG, VIF_PR_ARG, __entry->duration,
1582 __entry->subtype, __entry->success
1586 DEFINE_EVENT(mgd_prepare_complete_tx_evt, drv_mgd_prepare_tx,
1587 TP_PROTO(struct ieee80211_local *local,
1588 struct ieee80211_sub_if_data *sdata,
1589 u16 duration, u16 subtype, bool success),
1591 TP_ARGS(local, sdata, duration, subtype, success)
1594 DEFINE_EVENT(mgd_prepare_complete_tx_evt, drv_mgd_complete_tx,
1595 TP_PROTO(struct ieee80211_local *local,
1596 struct ieee80211_sub_if_data *sdata,
1597 u16 duration, u16 subtype, bool success),
1599 TP_ARGS(local, sdata, duration, subtype, success)
1602 DEFINE_EVENT(local_sdata_evt, drv_mgd_protect_tdls_discover,
1603 TP_PROTO(struct ieee80211_local *local,
1604 struct ieee80211_sub_if_data *sdata),
1606 TP_ARGS(local, sdata)
1609 DECLARE_EVENT_CLASS(local_chanctx,
1610 TP_PROTO(struct ieee80211_local *local,
1611 struct ieee80211_chanctx *ctx),
1613 TP_ARGS(local, ctx),
1615 TP_STRUCT__entry(
1616 LOCAL_ENTRY
1617 CHANCTX_ENTRY
1620 TP_fast_assign(
1621 LOCAL_ASSIGN;
1622 CHANCTX_ASSIGN;
1625 TP_printk(
1626 LOCAL_PR_FMT CHANCTX_PR_FMT,
1627 LOCAL_PR_ARG, CHANCTX_PR_ARG
1631 DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1632 TP_PROTO(struct ieee80211_local *local,
1633 struct ieee80211_chanctx *ctx),
1634 TP_ARGS(local, ctx)
1637 DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1638 TP_PROTO(struct ieee80211_local *local,
1639 struct ieee80211_chanctx *ctx),
1640 TP_ARGS(local, ctx)
1643 TRACE_EVENT(drv_change_chanctx,
1644 TP_PROTO(struct ieee80211_local *local,
1645 struct ieee80211_chanctx *ctx,
1646 u32 changed),
1648 TP_ARGS(local, ctx, changed),
1650 TP_STRUCT__entry(
1651 LOCAL_ENTRY
1652 CHANCTX_ENTRY
1653 __field(u32, changed)
1656 TP_fast_assign(
1657 LOCAL_ASSIGN;
1658 CHANCTX_ASSIGN;
1659 __entry->changed = changed;
1662 TP_printk(
1663 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1664 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1668 #if !defined(__TRACE_VIF_ENTRY)
1669 #define __TRACE_VIF_ENTRY
1670 struct trace_vif_entry {
1671 enum nl80211_iftype vif_type;
1672 bool p2p;
1673 char vif_name[IFNAMSIZ];
1674 } __packed;
1676 struct trace_chandef_entry {
1677 u32 control_freq;
1678 u32 freq_offset;
1679 u32 chan_width;
1680 u32 center_freq1;
1681 u32 freq1_offset;
1682 u32 center_freq2;
1683 } __packed;
1685 struct trace_switch_entry {
1686 struct trace_vif_entry vif;
1687 unsigned int link_id;
1688 struct trace_chandef_entry old_chandef;
1689 struct trace_chandef_entry new_chandef;
1690 } __packed;
1692 #define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
1693 #endif
1695 TRACE_EVENT(drv_switch_vif_chanctx,
1696 TP_PROTO(struct ieee80211_local *local,
1697 struct ieee80211_vif_chanctx_switch *vifs,
1698 int n_vifs, enum ieee80211_chanctx_switch_mode mode),
1699 TP_ARGS(local, vifs, n_vifs, mode),
1701 TP_STRUCT__entry(
1702 LOCAL_ENTRY
1703 __field(int, n_vifs)
1704 __field(u32, mode)
1705 __dynamic_array(u8, vifs,
1706 sizeof(struct trace_switch_entry) * n_vifs)
1709 TP_fast_assign(
1710 LOCAL_ASSIGN;
1711 __entry->n_vifs = n_vifs;
1712 __entry->mode = mode;
1714 struct trace_switch_entry *local_vifs =
1715 __get_dynamic_array(vifs);
1716 int i;
1718 for (i = 0; i < n_vifs; i++) {
1719 struct ieee80211_sub_if_data *sdata;
1721 sdata = container_of(vifs[i].vif,
1722 struct ieee80211_sub_if_data,
1723 vif);
1725 SWITCH_ENTRY_ASSIGN(vif.vif_type, vif->type);
1726 SWITCH_ENTRY_ASSIGN(vif.p2p, vif->p2p);
1727 SWITCH_ENTRY_ASSIGN(link_id, link_conf->link_id);
1728 strncpy(local_vifs[i].vif.vif_name,
1729 sdata->name,
1730 sizeof(local_vifs[i].vif.vif_name));
1731 SWITCH_ENTRY_ASSIGN(old_chandef.control_freq,
1732 old_ctx->def.chan->center_freq);
1733 SWITCH_ENTRY_ASSIGN(old_chandef.freq_offset,
1734 old_ctx->def.chan->freq_offset);
1735 SWITCH_ENTRY_ASSIGN(old_chandef.chan_width,
1736 old_ctx->def.width);
1737 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq1,
1738 old_ctx->def.center_freq1);
1739 SWITCH_ENTRY_ASSIGN(old_chandef.freq1_offset,
1740 old_ctx->def.freq1_offset);
1741 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq2,
1742 old_ctx->def.center_freq2);
1743 SWITCH_ENTRY_ASSIGN(new_chandef.control_freq,
1744 new_ctx->def.chan->center_freq);
1745 SWITCH_ENTRY_ASSIGN(new_chandef.freq_offset,
1746 new_ctx->def.chan->freq_offset);
1747 SWITCH_ENTRY_ASSIGN(new_chandef.chan_width,
1748 new_ctx->def.width);
1749 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq1,
1750 new_ctx->def.center_freq1);
1751 SWITCH_ENTRY_ASSIGN(new_chandef.freq1_offset,
1752 new_ctx->def.freq1_offset);
1753 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq2,
1754 new_ctx->def.center_freq2);
1759 TP_printk(
1760 LOCAL_PR_FMT " n_vifs:%d mode:%d",
1761 LOCAL_PR_ARG, __entry->n_vifs, __entry->mode
1765 DECLARE_EVENT_CLASS(local_sdata_chanctx,
1766 TP_PROTO(struct ieee80211_local *local,
1767 struct ieee80211_sub_if_data *sdata,
1768 struct ieee80211_bss_conf *link_conf,
1769 struct ieee80211_chanctx *ctx),
1771 TP_ARGS(local, sdata, link_conf, ctx),
1773 TP_STRUCT__entry(
1774 LOCAL_ENTRY
1775 VIF_ENTRY
1776 CHANCTX_ENTRY
1777 __field(unsigned int, link_id)
1780 TP_fast_assign(
1781 LOCAL_ASSIGN;
1782 VIF_ASSIGN;
1783 CHANCTX_ASSIGN;
1784 __entry->link_id = link_conf->link_id;
1787 TP_printk(
1788 LOCAL_PR_FMT VIF_PR_FMT " link_id:%d" CHANCTX_PR_FMT,
1789 LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id, CHANCTX_PR_ARG
1793 DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1794 TP_PROTO(struct ieee80211_local *local,
1795 struct ieee80211_sub_if_data *sdata,
1796 struct ieee80211_bss_conf *link_conf,
1797 struct ieee80211_chanctx *ctx),
1798 TP_ARGS(local, sdata, link_conf, ctx)
1801 DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1802 TP_PROTO(struct ieee80211_local *local,
1803 struct ieee80211_sub_if_data *sdata,
1804 struct ieee80211_bss_conf *link_conf,
1805 struct ieee80211_chanctx *ctx),
1806 TP_ARGS(local, sdata, link_conf, ctx)
1809 TRACE_EVENT(drv_start_ap,
1810 TP_PROTO(struct ieee80211_local *local,
1811 struct ieee80211_sub_if_data *sdata,
1812 struct ieee80211_bss_conf *link_conf),
1814 TP_ARGS(local, sdata, link_conf),
1816 TP_STRUCT__entry(
1817 LOCAL_ENTRY
1818 VIF_ENTRY
1819 __field(u32, link_id)
1820 __field(u8, dtimper)
1821 __field(u16, bcnint)
1822 __dynamic_array(u8, ssid, sdata->vif.cfg.ssid_len)
1823 __field(bool, hidden_ssid)
1826 TP_fast_assign(
1827 LOCAL_ASSIGN;
1828 VIF_ASSIGN;
1829 __entry->link_id = link_conf->link_id;
1830 __entry->dtimper = link_conf->dtim_period;
1831 __entry->bcnint = link_conf->beacon_int;
1832 __entry->hidden_ssid = link_conf->hidden_ssid;
1833 memcpy(__get_dynamic_array(ssid),
1834 sdata->vif.cfg.ssid,
1835 sdata->vif.cfg.ssid_len);
1838 TP_printk(
1839 LOCAL_PR_FMT VIF_PR_FMT " link id %u",
1840 LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id
1844 TRACE_EVENT(drv_stop_ap,
1845 TP_PROTO(struct ieee80211_local *local,
1846 struct ieee80211_sub_if_data *sdata,
1847 struct ieee80211_bss_conf *link_conf),
1849 TP_ARGS(local, sdata, link_conf),
1851 TP_STRUCT__entry(
1852 LOCAL_ENTRY
1853 VIF_ENTRY
1854 __field(u32, link_id)
1857 TP_fast_assign(
1858 LOCAL_ASSIGN;
1859 VIF_ASSIGN;
1860 __entry->link_id = link_conf->link_id;
1863 TP_printk(
1864 LOCAL_PR_FMT VIF_PR_FMT " link id %u",
1865 LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id
1869 TRACE_EVENT(drv_reconfig_complete,
1870 TP_PROTO(struct ieee80211_local *local,
1871 enum ieee80211_reconfig_type reconfig_type),
1872 TP_ARGS(local, reconfig_type),
1874 TP_STRUCT__entry(
1875 LOCAL_ENTRY
1876 __field(u8, reconfig_type)
1879 TP_fast_assign(
1880 LOCAL_ASSIGN;
1881 __entry->reconfig_type = reconfig_type;
1884 TP_printk(
1885 LOCAL_PR_FMT " reconfig_type:%d",
1886 LOCAL_PR_ARG, __entry->reconfig_type
1891 #if IS_ENABLED(CONFIG_IPV6)
1892 DEFINE_EVENT(local_sdata_evt, drv_ipv6_addr_change,
1893 TP_PROTO(struct ieee80211_local *local,
1894 struct ieee80211_sub_if_data *sdata),
1895 TP_ARGS(local, sdata)
1897 #endif
1899 TRACE_EVENT(drv_join_ibss,
1900 TP_PROTO(struct ieee80211_local *local,
1901 struct ieee80211_sub_if_data *sdata,
1902 struct ieee80211_bss_conf *info),
1904 TP_ARGS(local, sdata, info),
1906 TP_STRUCT__entry(
1907 LOCAL_ENTRY
1908 VIF_ENTRY
1909 __field(u8, dtimper)
1910 __field(u16, bcnint)
1911 __dynamic_array(u8, ssid, sdata->vif.cfg.ssid_len)
1914 TP_fast_assign(
1915 LOCAL_ASSIGN;
1916 VIF_ASSIGN;
1917 __entry->dtimper = info->dtim_period;
1918 __entry->bcnint = info->beacon_int;
1919 memcpy(__get_dynamic_array(ssid),
1920 sdata->vif.cfg.ssid,
1921 sdata->vif.cfg.ssid_len);
1924 TP_printk(
1925 LOCAL_PR_FMT VIF_PR_FMT,
1926 LOCAL_PR_ARG, VIF_PR_ARG
1930 DEFINE_EVENT(local_sdata_evt, drv_leave_ibss,
1931 TP_PROTO(struct ieee80211_local *local,
1932 struct ieee80211_sub_if_data *sdata),
1933 TP_ARGS(local, sdata)
1936 TRACE_EVENT(drv_get_expected_throughput,
1937 TP_PROTO(struct ieee80211_sta *sta),
1939 TP_ARGS(sta),
1941 TP_STRUCT__entry(
1942 STA_ENTRY
1945 TP_fast_assign(
1946 STA_ASSIGN;
1949 TP_printk(
1950 STA_PR_FMT, STA_PR_ARG
1954 TRACE_EVENT(drv_start_nan,
1955 TP_PROTO(struct ieee80211_local *local,
1956 struct ieee80211_sub_if_data *sdata,
1957 struct cfg80211_nan_conf *conf),
1959 TP_ARGS(local, sdata, conf),
1960 TP_STRUCT__entry(
1961 LOCAL_ENTRY
1962 VIF_ENTRY
1963 __field(u8, master_pref)
1964 __field(u8, bands)
1967 TP_fast_assign(
1968 LOCAL_ASSIGN;
1969 VIF_ASSIGN;
1970 __entry->master_pref = conf->master_pref;
1971 __entry->bands = conf->bands;
1974 TP_printk(
1975 LOCAL_PR_FMT VIF_PR_FMT
1976 ", master preference: %u, bands: 0x%0x",
1977 LOCAL_PR_ARG, VIF_PR_ARG, __entry->master_pref,
1978 __entry->bands
1982 TRACE_EVENT(drv_stop_nan,
1983 TP_PROTO(struct ieee80211_local *local,
1984 struct ieee80211_sub_if_data *sdata),
1986 TP_ARGS(local, sdata),
1988 TP_STRUCT__entry(
1989 LOCAL_ENTRY
1990 VIF_ENTRY
1993 TP_fast_assign(
1994 LOCAL_ASSIGN;
1995 VIF_ASSIGN;
1998 TP_printk(
1999 LOCAL_PR_FMT VIF_PR_FMT,
2000 LOCAL_PR_ARG, VIF_PR_ARG
2004 TRACE_EVENT(drv_nan_change_conf,
2005 TP_PROTO(struct ieee80211_local *local,
2006 struct ieee80211_sub_if_data *sdata,
2007 struct cfg80211_nan_conf *conf,
2008 u32 changes),
2010 TP_ARGS(local, sdata, conf, changes),
2011 TP_STRUCT__entry(
2012 LOCAL_ENTRY
2013 VIF_ENTRY
2014 __field(u8, master_pref)
2015 __field(u8, bands)
2016 __field(u32, changes)
2019 TP_fast_assign(
2020 LOCAL_ASSIGN;
2021 VIF_ASSIGN;
2022 __entry->master_pref = conf->master_pref;
2023 __entry->bands = conf->bands;
2024 __entry->changes = changes;
2027 TP_printk(
2028 LOCAL_PR_FMT VIF_PR_FMT
2029 ", master preference: %u, bands: 0x%0x, changes: 0x%x",
2030 LOCAL_PR_ARG, VIF_PR_ARG, __entry->master_pref,
2031 __entry->bands, __entry->changes
2035 TRACE_EVENT(drv_add_nan_func,
2036 TP_PROTO(struct ieee80211_local *local,
2037 struct ieee80211_sub_if_data *sdata,
2038 const struct cfg80211_nan_func *func),
2040 TP_ARGS(local, sdata, func),
2041 TP_STRUCT__entry(
2042 LOCAL_ENTRY
2043 VIF_ENTRY
2044 __field(u8, type)
2045 __field(u8, inst_id)
2048 TP_fast_assign(
2049 LOCAL_ASSIGN;
2050 VIF_ASSIGN;
2051 __entry->type = func->type;
2052 __entry->inst_id = func->instance_id;
2055 TP_printk(
2056 LOCAL_PR_FMT VIF_PR_FMT
2057 ", type: %u, inst_id: %u",
2058 LOCAL_PR_ARG, VIF_PR_ARG, __entry->type, __entry->inst_id
2062 TRACE_EVENT(drv_del_nan_func,
2063 TP_PROTO(struct ieee80211_local *local,
2064 struct ieee80211_sub_if_data *sdata,
2065 u8 instance_id),
2067 TP_ARGS(local, sdata, instance_id),
2068 TP_STRUCT__entry(
2069 LOCAL_ENTRY
2070 VIF_ENTRY
2071 __field(u8, instance_id)
2074 TP_fast_assign(
2075 LOCAL_ASSIGN;
2076 VIF_ASSIGN;
2077 __entry->instance_id = instance_id;
2080 TP_printk(
2081 LOCAL_PR_FMT VIF_PR_FMT
2082 ", instance_id: %u",
2083 LOCAL_PR_ARG, VIF_PR_ARG, __entry->instance_id
2087 DEFINE_EVENT(local_sdata_evt, drv_start_pmsr,
2088 TP_PROTO(struct ieee80211_local *local,
2089 struct ieee80211_sub_if_data *sdata),
2090 TP_ARGS(local, sdata)
2093 DEFINE_EVENT(local_sdata_evt, drv_abort_pmsr,
2094 TP_PROTO(struct ieee80211_local *local,
2095 struct ieee80211_sub_if_data *sdata),
2096 TP_ARGS(local, sdata)
2099 TRACE_EVENT(drv_set_default_unicast_key,
2100 TP_PROTO(struct ieee80211_local *local,
2101 struct ieee80211_sub_if_data *sdata,
2102 int key_idx),
2104 TP_ARGS(local, sdata, key_idx),
2106 TP_STRUCT__entry(
2107 LOCAL_ENTRY
2108 VIF_ENTRY
2109 __field(int, key_idx)
2112 TP_fast_assign(
2113 LOCAL_ASSIGN;
2114 VIF_ASSIGN;
2115 __entry->key_idx = key_idx;
2118 TP_printk(LOCAL_PR_FMT VIF_PR_FMT " key_idx:%d",
2119 LOCAL_PR_ARG, VIF_PR_ARG, __entry->key_idx)
2122 TRACE_EVENT(drv_channel_switch_beacon,
2123 TP_PROTO(struct ieee80211_local *local,
2124 struct ieee80211_sub_if_data *sdata,
2125 struct cfg80211_chan_def *chandef),
2127 TP_ARGS(local, sdata, chandef),
2129 TP_STRUCT__entry(
2130 LOCAL_ENTRY
2131 VIF_ENTRY
2132 CHANDEF_ENTRY
2135 TP_fast_assign(
2136 LOCAL_ASSIGN;
2137 VIF_ASSIGN;
2138 CHANDEF_ASSIGN(chandef);
2141 TP_printk(
2142 LOCAL_PR_FMT VIF_PR_FMT " channel switch to " CHANDEF_PR_FMT,
2143 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG
2147 DEFINE_EVENT(chanswitch_evt, drv_pre_channel_switch,
2148 TP_PROTO(struct ieee80211_local *local,
2149 struct ieee80211_sub_if_data *sdata,
2150 struct ieee80211_channel_switch *ch_switch),
2151 TP_ARGS(local, sdata, ch_switch)
2154 DEFINE_EVENT(local_sdata_evt, drv_post_channel_switch,
2155 TP_PROTO(struct ieee80211_local *local,
2156 struct ieee80211_sub_if_data *sdata),
2157 TP_ARGS(local, sdata)
2160 DEFINE_EVENT(local_sdata_evt, drv_abort_channel_switch,
2161 TP_PROTO(struct ieee80211_local *local,
2162 struct ieee80211_sub_if_data *sdata),
2163 TP_ARGS(local, sdata)
2166 DEFINE_EVENT(chanswitch_evt, drv_channel_switch_rx_beacon,
2167 TP_PROTO(struct ieee80211_local *local,
2168 struct ieee80211_sub_if_data *sdata,
2169 struct ieee80211_channel_switch *ch_switch),
2170 TP_ARGS(local, sdata, ch_switch)
2173 TRACE_EVENT(drv_get_txpower,
2174 TP_PROTO(struct ieee80211_local *local,
2175 struct ieee80211_sub_if_data *sdata,
2176 unsigned int link_id, int dbm, int ret),
2178 TP_ARGS(local, sdata, link_id, dbm, ret),
2180 TP_STRUCT__entry(
2181 LOCAL_ENTRY
2182 VIF_ENTRY
2183 __field(unsigned int, link_id)
2184 __field(int, dbm)
2185 __field(int, ret)
2188 TP_fast_assign(
2189 LOCAL_ASSIGN;
2190 VIF_ASSIGN;
2191 __entry->link_id = link_id;
2192 __entry->dbm = dbm;
2193 __entry->ret = ret;
2196 TP_printk(
2197 LOCAL_PR_FMT VIF_PR_FMT " link_id:%d dbm:%d ret:%d",
2198 LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id, __entry->dbm, __entry->ret
2202 TRACE_EVENT(drv_tdls_channel_switch,
2203 TP_PROTO(struct ieee80211_local *local,
2204 struct ieee80211_sub_if_data *sdata,
2205 struct ieee80211_sta *sta, u8 oper_class,
2206 struct cfg80211_chan_def *chandef),
2208 TP_ARGS(local, sdata, sta, oper_class, chandef),
2210 TP_STRUCT__entry(
2211 LOCAL_ENTRY
2212 VIF_ENTRY
2213 STA_ENTRY
2214 __field(u8, oper_class)
2215 CHANDEF_ENTRY
2218 TP_fast_assign(
2219 LOCAL_ASSIGN;
2220 VIF_ASSIGN;
2221 STA_ASSIGN;
2222 __entry->oper_class = oper_class;
2223 CHANDEF_ASSIGN(chandef)
2226 TP_printk(
2227 LOCAL_PR_FMT VIF_PR_FMT " tdls channel switch to"
2228 CHANDEF_PR_FMT " oper_class:%d " STA_PR_FMT,
2229 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->oper_class,
2230 STA_PR_ARG
2234 TRACE_EVENT(drv_tdls_cancel_channel_switch,
2235 TP_PROTO(struct ieee80211_local *local,
2236 struct ieee80211_sub_if_data *sdata,
2237 struct ieee80211_sta *sta),
2239 TP_ARGS(local, sdata, sta),
2241 TP_STRUCT__entry(
2242 LOCAL_ENTRY
2243 VIF_ENTRY
2244 STA_ENTRY
2247 TP_fast_assign(
2248 LOCAL_ASSIGN;
2249 VIF_ASSIGN;
2250 STA_ASSIGN;
2253 TP_printk(
2254 LOCAL_PR_FMT VIF_PR_FMT
2255 " tdls cancel channel switch with " STA_PR_FMT,
2256 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
2260 TRACE_EVENT(drv_tdls_recv_channel_switch,
2261 TP_PROTO(struct ieee80211_local *local,
2262 struct ieee80211_sub_if_data *sdata,
2263 struct ieee80211_tdls_ch_sw_params *params),
2265 TP_ARGS(local, sdata, params),
2267 TP_STRUCT__entry(
2268 LOCAL_ENTRY
2269 VIF_ENTRY
2270 __field(u8, action_code)
2271 STA_ENTRY
2272 CHANDEF_ENTRY
2273 __field(u32, status)
2274 __field(bool, peer_initiator)
2275 __field(u32, timestamp)
2276 __field(u16, switch_time)
2277 __field(u16, switch_timeout)
2280 TP_fast_assign(
2281 LOCAL_ASSIGN;
2282 VIF_ASSIGN;
2283 STA_NAMED_ASSIGN(params->sta);
2284 CHANDEF_ASSIGN(params->chandef)
2285 __entry->peer_initiator = params->sta->tdls_initiator;
2286 __entry->action_code = params->action_code;
2287 __entry->status = params->status;
2288 __entry->timestamp = params->timestamp;
2289 __entry->switch_time = params->switch_time;
2290 __entry->switch_timeout = params->switch_timeout;
2293 TP_printk(
2294 LOCAL_PR_FMT VIF_PR_FMT " received tdls channel switch packet"
2295 " action:%d status:%d time:%d switch time:%d switch"
2296 " timeout:%d initiator: %d chan:" CHANDEF_PR_FMT STA_PR_FMT,
2297 LOCAL_PR_ARG, VIF_PR_ARG, __entry->action_code, __entry->status,
2298 __entry->timestamp, __entry->switch_time,
2299 __entry->switch_timeout, __entry->peer_initiator,
2300 CHANDEF_PR_ARG, STA_PR_ARG
2304 TRACE_EVENT(drv_wake_tx_queue,
2305 TP_PROTO(struct ieee80211_local *local,
2306 struct ieee80211_sub_if_data *sdata,
2307 struct txq_info *txq),
2309 TP_ARGS(local, sdata, txq),
2311 TP_STRUCT__entry(
2312 LOCAL_ENTRY
2313 VIF_ENTRY
2314 STA_ENTRY
2315 __field(u8, ac)
2316 __field(u8, tid)
2319 TP_fast_assign(
2320 struct ieee80211_sta *sta = txq->txq.sta;
2322 LOCAL_ASSIGN;
2323 VIF_ASSIGN;
2324 STA_ASSIGN;
2325 __entry->ac = txq->txq.ac;
2326 __entry->tid = txq->txq.tid;
2329 TP_printk(
2330 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ac:%d tid:%d",
2331 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ac, __entry->tid
2335 TRACE_EVENT(drv_get_ftm_responder_stats,
2336 TP_PROTO(struct ieee80211_local *local,
2337 struct ieee80211_sub_if_data *sdata,
2338 struct cfg80211_ftm_responder_stats *ftm_stats),
2340 TP_ARGS(local, sdata, ftm_stats),
2342 TP_STRUCT__entry(
2343 LOCAL_ENTRY
2344 VIF_ENTRY
2347 TP_fast_assign(
2348 LOCAL_ASSIGN;
2349 VIF_ASSIGN;
2352 TP_printk(
2353 LOCAL_PR_FMT VIF_PR_FMT,
2354 LOCAL_PR_ARG, VIF_PR_ARG
2358 DEFINE_EVENT(local_sdata_addr_evt, drv_update_vif_offload,
2359 TP_PROTO(struct ieee80211_local *local,
2360 struct ieee80211_sub_if_data *sdata),
2361 TP_ARGS(local, sdata)
2364 DECLARE_EVENT_CLASS(sta_flag_evt,
2365 TP_PROTO(struct ieee80211_local *local,
2366 struct ieee80211_sub_if_data *sdata,
2367 struct ieee80211_sta *sta, bool enabled),
2369 TP_ARGS(local, sdata, sta, enabled),
2371 TP_STRUCT__entry(
2372 LOCAL_ENTRY
2373 VIF_ENTRY
2374 STA_ENTRY
2375 __field(bool, enabled)
2378 TP_fast_assign(
2379 LOCAL_ASSIGN;
2380 VIF_ASSIGN;
2381 STA_ASSIGN;
2382 __entry->enabled = enabled;
2385 TP_printk(
2386 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " enabled:%d",
2387 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->enabled
2391 DEFINE_EVENT(sta_flag_evt, drv_sta_set_4addr,
2392 TP_PROTO(struct ieee80211_local *local,
2393 struct ieee80211_sub_if_data *sdata,
2394 struct ieee80211_sta *sta, bool enabled),
2396 TP_ARGS(local, sdata, sta, enabled)
2399 DEFINE_EVENT(sta_flag_evt, drv_sta_set_decap_offload,
2400 TP_PROTO(struct ieee80211_local *local,
2401 struct ieee80211_sub_if_data *sdata,
2402 struct ieee80211_sta *sta, bool enabled),
2404 TP_ARGS(local, sdata, sta, enabled)
2407 TRACE_EVENT(drv_add_twt_setup,
2408 TP_PROTO(struct ieee80211_local *local,
2409 struct ieee80211_sta *sta,
2410 struct ieee80211_twt_setup *twt,
2411 struct ieee80211_twt_params *twt_agrt),
2413 TP_ARGS(local, sta, twt, twt_agrt),
2415 TP_STRUCT__entry(
2416 LOCAL_ENTRY
2417 STA_ENTRY
2418 __field(u8, dialog_token)
2419 __field(u8, control)
2420 __field(__le16, req_type)
2421 __field(__le64, twt)
2422 __field(u8, duration)
2423 __field(__le16, mantissa)
2424 __field(u8, channel)
2427 TP_fast_assign(
2428 LOCAL_ASSIGN;
2429 STA_ASSIGN;
2430 __entry->dialog_token = twt->dialog_token;
2431 __entry->control = twt->control;
2432 __entry->req_type = twt_agrt->req_type;
2433 __entry->twt = twt_agrt->twt;
2434 __entry->duration = twt_agrt->min_twt_dur;
2435 __entry->mantissa = twt_agrt->mantissa;
2436 __entry->channel = twt_agrt->channel;
2439 TP_printk(
2440 LOCAL_PR_FMT STA_PR_FMT
2441 " token:%d control:0x%02x req_type:0x%04x"
2442 " twt:%llu duration:%d mantissa:%d channel:%d",
2443 LOCAL_PR_ARG, STA_PR_ARG, __entry->dialog_token,
2444 __entry->control, le16_to_cpu(__entry->req_type),
2445 le64_to_cpu(__entry->twt), __entry->duration,
2446 le16_to_cpu(__entry->mantissa), __entry->channel
2450 TRACE_EVENT(drv_twt_teardown_request,
2451 TP_PROTO(struct ieee80211_local *local,
2452 struct ieee80211_sta *sta, u8 flowid),
2454 TP_ARGS(local, sta, flowid),
2456 TP_STRUCT__entry(
2457 LOCAL_ENTRY
2458 STA_ENTRY
2459 __field(u8, flowid)
2462 TP_fast_assign(
2463 LOCAL_ASSIGN;
2464 STA_ASSIGN;
2465 __entry->flowid = flowid;
2468 TP_printk(
2469 LOCAL_PR_FMT STA_PR_FMT " flowid:%d",
2470 LOCAL_PR_ARG, STA_PR_ARG, __entry->flowid
2474 DEFINE_EVENT(sta_event, drv_net_fill_forward_path,
2475 TP_PROTO(struct ieee80211_local *local,
2476 struct ieee80211_sub_if_data *sdata,
2477 struct ieee80211_sta *sta),
2478 TP_ARGS(local, sdata, sta)
2481 TRACE_EVENT(drv_net_setup_tc,
2482 TP_PROTO(struct ieee80211_local *local,
2483 struct ieee80211_sub_if_data *sdata,
2484 u8 type),
2486 TP_ARGS(local, sdata, type),
2488 TP_STRUCT__entry(
2489 LOCAL_ENTRY
2490 VIF_ENTRY
2491 __field(u8, type)
2494 TP_fast_assign(
2495 LOCAL_ASSIGN;
2496 VIF_ASSIGN;
2497 __entry->type = type;
2500 TP_printk(
2501 LOCAL_PR_FMT VIF_PR_FMT " type:%d\n",
2502 LOCAL_PR_ARG, VIF_PR_ARG, __entry->type
2506 TRACE_EVENT(drv_can_activate_links,
2507 TP_PROTO(struct ieee80211_local *local,
2508 struct ieee80211_sub_if_data *sdata,
2509 u16 active_links),
2511 TP_ARGS(local, sdata, active_links),
2513 TP_STRUCT__entry(
2514 LOCAL_ENTRY
2515 VIF_ENTRY
2516 __field(u16, active_links)
2519 TP_fast_assign(
2520 LOCAL_ASSIGN;
2521 VIF_ASSIGN;
2522 __entry->active_links = active_links;
2525 TP_printk(
2526 LOCAL_PR_FMT VIF_PR_FMT " requested active_links:0x%04x\n",
2527 LOCAL_PR_ARG, VIF_PR_ARG, __entry->active_links
2531 TRACE_EVENT(drv_change_vif_links,
2532 TP_PROTO(struct ieee80211_local *local,
2533 struct ieee80211_sub_if_data *sdata,
2534 u16 old_links, u16 new_links),
2536 TP_ARGS(local, sdata, old_links, new_links),
2538 TP_STRUCT__entry(
2539 LOCAL_ENTRY
2540 VIF_ENTRY
2541 __field(u16, old_links)
2542 __field(u16, new_links)
2545 TP_fast_assign(
2546 LOCAL_ASSIGN;
2547 VIF_ASSIGN;
2548 __entry->old_links = old_links;
2549 __entry->new_links = new_links;
2552 TP_printk(
2553 LOCAL_PR_FMT VIF_PR_FMT " old_links:0x%04x, new_links:0x%04x\n",
2554 LOCAL_PR_ARG, VIF_PR_ARG, __entry->old_links, __entry->new_links
2558 TRACE_EVENT(drv_change_sta_links,
2559 TP_PROTO(struct ieee80211_local *local,
2560 struct ieee80211_sub_if_data *sdata,
2561 struct ieee80211_sta *sta,
2562 u16 old_links, u16 new_links),
2564 TP_ARGS(local, sdata, sta, old_links, new_links),
2566 TP_STRUCT__entry(
2567 LOCAL_ENTRY
2568 VIF_ENTRY
2569 STA_ENTRY
2570 __field(u16, old_links)
2571 __field(u16, new_links)
2574 TP_fast_assign(
2575 LOCAL_ASSIGN;
2576 VIF_ASSIGN;
2577 STA_ASSIGN;
2578 __entry->old_links = old_links;
2579 __entry->new_links = new_links;
2582 TP_printk(
2583 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " old_links:0x%04x, new_links:0x%04x\n",
2584 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
2585 __entry->old_links, __entry->new_links
2590 * Tracing for API calls that drivers call.
2593 TRACE_EVENT(api_return_bool,
2594 TP_PROTO(struct ieee80211_local *local, bool result),
2596 TP_ARGS(local, result),
2598 TP_STRUCT__entry(
2599 LOCAL_ENTRY
2600 __field(bool, result)
2603 TP_fast_assign(
2604 LOCAL_ASSIGN;
2605 __entry->result = result;
2608 TP_printk(
2609 LOCAL_PR_FMT " result=%d",
2610 LOCAL_PR_ARG, __entry->result
2614 TRACE_EVENT(api_return_void,
2615 TP_PROTO(struct ieee80211_local *local),
2617 TP_ARGS(local),
2619 TP_STRUCT__entry(
2620 LOCAL_ENTRY
2623 TP_fast_assign(
2624 LOCAL_ASSIGN;
2627 TP_printk(
2628 LOCAL_PR_FMT, LOCAL_PR_ARG
2632 TRACE_EVENT(api_start_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_start_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 TRACE_EVENT(api_stop_tx_ba_session,
2677 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
2679 TP_ARGS(sta, tid),
2681 TP_STRUCT__entry(
2682 STA_ENTRY
2683 __field(u16, tid)
2686 TP_fast_assign(
2687 STA_ASSIGN;
2688 __entry->tid = tid;
2691 TP_printk(
2692 STA_PR_FMT " tid:%d",
2693 STA_PR_ARG, __entry->tid
2697 TRACE_EVENT(api_stop_tx_ba_cb,
2698 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
2700 TP_ARGS(sdata, ra, tid),
2702 TP_STRUCT__entry(
2703 VIF_ENTRY
2704 __array(u8, ra, ETH_ALEN)
2705 __field(u16, tid)
2708 TP_fast_assign(
2709 VIF_ASSIGN;
2710 memcpy(__entry->ra, ra, ETH_ALEN);
2711 __entry->tid = tid;
2714 TP_printk(
2715 VIF_PR_FMT " ra:%pM tid:%d",
2716 VIF_PR_ARG, __entry->ra, __entry->tid
2720 DEFINE_EVENT(local_only_evt, api_restart_hw,
2721 TP_PROTO(struct ieee80211_local *local),
2722 TP_ARGS(local)
2725 TRACE_EVENT(api_beacon_loss,
2726 TP_PROTO(struct ieee80211_sub_if_data *sdata),
2728 TP_ARGS(sdata),
2730 TP_STRUCT__entry(
2731 VIF_ENTRY
2734 TP_fast_assign(
2735 VIF_ASSIGN;
2738 TP_printk(
2739 VIF_PR_FMT,
2740 VIF_PR_ARG
2744 TRACE_EVENT(api_connection_loss,
2745 TP_PROTO(struct ieee80211_sub_if_data *sdata),
2747 TP_ARGS(sdata),
2749 TP_STRUCT__entry(
2750 VIF_ENTRY
2753 TP_fast_assign(
2754 VIF_ASSIGN;
2757 TP_printk(
2758 VIF_PR_FMT,
2759 VIF_PR_ARG
2763 TRACE_EVENT(api_disconnect,
2764 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool reconnect),
2766 TP_ARGS(sdata, reconnect),
2768 TP_STRUCT__entry(
2769 VIF_ENTRY
2770 __field(int, reconnect)
2773 TP_fast_assign(
2774 VIF_ASSIGN;
2775 __entry->reconnect = reconnect;
2778 TP_printk(
2779 VIF_PR_FMT " reconnect:%d",
2780 VIF_PR_ARG, __entry->reconnect
2784 TRACE_EVENT(api_cqm_rssi_notify,
2785 TP_PROTO(struct ieee80211_sub_if_data *sdata,
2786 enum nl80211_cqm_rssi_threshold_event rssi_event,
2787 s32 rssi_level),
2789 TP_ARGS(sdata, rssi_event, rssi_level),
2791 TP_STRUCT__entry(
2792 VIF_ENTRY
2793 __field(u32, rssi_event)
2794 __field(s32, rssi_level)
2797 TP_fast_assign(
2798 VIF_ASSIGN;
2799 __entry->rssi_event = rssi_event;
2800 __entry->rssi_level = rssi_level;
2803 TP_printk(
2804 VIF_PR_FMT " event:%d rssi:%d",
2805 VIF_PR_ARG, __entry->rssi_event, __entry->rssi_level
2809 DEFINE_EVENT(local_sdata_evt, api_cqm_beacon_loss_notify,
2810 TP_PROTO(struct ieee80211_local *local,
2811 struct ieee80211_sub_if_data *sdata),
2812 TP_ARGS(local, sdata)
2815 TRACE_EVENT(api_scan_completed,
2816 TP_PROTO(struct ieee80211_local *local, bool aborted),
2818 TP_ARGS(local, aborted),
2820 TP_STRUCT__entry(
2821 LOCAL_ENTRY
2822 __field(bool, aborted)
2825 TP_fast_assign(
2826 LOCAL_ASSIGN;
2827 __entry->aborted = aborted;
2830 TP_printk(
2831 LOCAL_PR_FMT " aborted:%d",
2832 LOCAL_PR_ARG, __entry->aborted
2836 TRACE_EVENT(api_sched_scan_results,
2837 TP_PROTO(struct ieee80211_local *local),
2839 TP_ARGS(local),
2841 TP_STRUCT__entry(
2842 LOCAL_ENTRY
2845 TP_fast_assign(
2846 LOCAL_ASSIGN;
2849 TP_printk(
2850 LOCAL_PR_FMT, LOCAL_PR_ARG
2854 TRACE_EVENT(api_sched_scan_stopped,
2855 TP_PROTO(struct ieee80211_local *local),
2857 TP_ARGS(local),
2859 TP_STRUCT__entry(
2860 LOCAL_ENTRY
2863 TP_fast_assign(
2864 LOCAL_ASSIGN;
2867 TP_printk(
2868 LOCAL_PR_FMT, LOCAL_PR_ARG
2872 TRACE_EVENT(api_sta_block_awake,
2873 TP_PROTO(struct ieee80211_local *local,
2874 struct ieee80211_sta *sta, bool block),
2876 TP_ARGS(local, sta, block),
2878 TP_STRUCT__entry(
2879 LOCAL_ENTRY
2880 STA_ENTRY
2881 __field(bool, block)
2884 TP_fast_assign(
2885 LOCAL_ASSIGN;
2886 STA_ASSIGN;
2887 __entry->block = block;
2890 TP_printk(
2891 LOCAL_PR_FMT STA_PR_FMT " block:%d",
2892 LOCAL_PR_ARG, STA_PR_ARG, __entry->block
2896 TRACE_EVENT(api_chswitch_done,
2897 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success,
2898 unsigned int link_id),
2900 TP_ARGS(sdata, success, link_id),
2902 TP_STRUCT__entry(
2903 VIF_ENTRY
2904 __field(bool, success)
2905 __field(unsigned int, link_id)
2908 TP_fast_assign(
2909 VIF_ASSIGN;
2910 __entry->success = success;
2911 __entry->link_id = link_id;
2914 TP_printk(
2915 VIF_PR_FMT " success=%d link_id=%d",
2916 VIF_PR_ARG, __entry->success, __entry->link_id
2920 DEFINE_EVENT(local_only_evt, api_ready_on_channel,
2921 TP_PROTO(struct ieee80211_local *local),
2922 TP_ARGS(local)
2925 DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
2926 TP_PROTO(struct ieee80211_local *local),
2927 TP_ARGS(local)
2930 TRACE_EVENT(api_gtk_rekey_notify,
2931 TP_PROTO(struct ieee80211_sub_if_data *sdata,
2932 const u8 *bssid, const u8 *replay_ctr),
2934 TP_ARGS(sdata, bssid, replay_ctr),
2936 TP_STRUCT__entry(
2937 VIF_ENTRY
2938 __array(u8, bssid, ETH_ALEN)
2939 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
2942 TP_fast_assign(
2943 VIF_ASSIGN;
2944 memcpy(__entry->bssid, bssid, ETH_ALEN);
2945 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
2948 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
2951 TRACE_EVENT(api_enable_rssi_reports,
2952 TP_PROTO(struct ieee80211_sub_if_data *sdata,
2953 int rssi_min_thold, int rssi_max_thold),
2955 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
2957 TP_STRUCT__entry(
2958 VIF_ENTRY
2959 __field(int, rssi_min_thold)
2960 __field(int, rssi_max_thold)
2963 TP_fast_assign(
2964 VIF_ASSIGN;
2965 __entry->rssi_min_thold = rssi_min_thold;
2966 __entry->rssi_max_thold = rssi_max_thold;
2969 TP_printk(
2970 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
2971 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
2975 TRACE_EVENT(api_eosp,
2976 TP_PROTO(struct ieee80211_local *local,
2977 struct ieee80211_sta *sta),
2979 TP_ARGS(local, sta),
2981 TP_STRUCT__entry(
2982 LOCAL_ENTRY
2983 STA_ENTRY
2986 TP_fast_assign(
2987 LOCAL_ASSIGN;
2988 STA_ASSIGN;
2991 TP_printk(
2992 LOCAL_PR_FMT STA_PR_FMT,
2993 LOCAL_PR_ARG, STA_PR_ARG
2997 TRACE_EVENT(api_send_eosp_nullfunc,
2998 TP_PROTO(struct ieee80211_local *local,
2999 struct ieee80211_sta *sta,
3000 u8 tid),
3002 TP_ARGS(local, sta, tid),
3004 TP_STRUCT__entry(
3005 LOCAL_ENTRY
3006 STA_ENTRY
3007 __field(u8, tid)
3010 TP_fast_assign(
3011 LOCAL_ASSIGN;
3012 STA_ASSIGN;
3013 __entry->tid = tid;
3016 TP_printk(
3017 LOCAL_PR_FMT STA_PR_FMT " tid:%d",
3018 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid
3022 TRACE_EVENT(api_sta_set_buffered,
3023 TP_PROTO(struct ieee80211_local *local,
3024 struct ieee80211_sta *sta,
3025 u8 tid, bool buffered),
3027 TP_ARGS(local, sta, tid, buffered),
3029 TP_STRUCT__entry(
3030 LOCAL_ENTRY
3031 STA_ENTRY
3032 __field(u8, tid)
3033 __field(bool, buffered)
3036 TP_fast_assign(
3037 LOCAL_ASSIGN;
3038 STA_ASSIGN;
3039 __entry->tid = tid;
3040 __entry->buffered = buffered;
3043 TP_printk(
3044 LOCAL_PR_FMT STA_PR_FMT " tid:%d buffered:%d",
3045 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid, __entry->buffered
3049 TRACE_EVENT(api_radar_detected,
3050 TP_PROTO(struct ieee80211_local *local),
3052 TP_ARGS(local),
3054 TP_STRUCT__entry(
3055 LOCAL_ENTRY
3058 TP_fast_assign(
3059 LOCAL_ASSIGN;
3062 TP_printk(
3063 LOCAL_PR_FMT " radar detected",
3064 LOCAL_PR_ARG
3068 TRACE_EVENT(api_request_smps,
3069 TP_PROTO(struct ieee80211_local *local,
3070 struct ieee80211_sub_if_data *sdata,
3071 struct ieee80211_link_data *link,
3072 enum ieee80211_smps_mode smps_mode),
3074 TP_ARGS(local, sdata, link, smps_mode),
3076 TP_STRUCT__entry(
3077 LOCAL_ENTRY
3078 VIF_ENTRY
3079 __field(int, link_id)
3080 __field(u32, smps_mode)
3083 TP_fast_assign(
3084 LOCAL_ASSIGN;
3085 VIF_ASSIGN;
3086 __entry->link_id = link->link_id,
3087 __entry->smps_mode = smps_mode;
3090 TP_printk(
3091 LOCAL_PR_FMT " " VIF_PR_FMT " link:%d, smps_mode:%d",
3092 LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id, __entry->smps_mode
3096 TRACE_EVENT(api_prepare_rx_omi_bw,
3097 TP_PROTO(struct ieee80211_local *local,
3098 struct ieee80211_sub_if_data *sdata,
3099 struct link_sta_info *link_sta,
3100 enum ieee80211_sta_rx_bandwidth bw),
3102 TP_ARGS(local, sdata, link_sta, bw),
3104 TP_STRUCT__entry(
3105 LOCAL_ENTRY
3106 VIF_ENTRY
3107 STA_ENTRY
3108 __field(int, link_id)
3109 __field(u32, bw)
3110 __field(bool, result)
3113 TP_fast_assign(
3114 LOCAL_ASSIGN;
3115 VIF_ASSIGN;
3116 STA_NAMED_ASSIGN(link_sta->sta);
3117 __entry->link_id = link_sta->link_id;
3118 __entry->bw = bw;
3121 TP_printk(
3122 LOCAL_PR_FMT " " VIF_PR_FMT " " STA_PR_FMT " link:%d, bw:%d",
3123 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
3124 __entry->link_id, __entry->bw
3128 TRACE_EVENT(api_finalize_rx_omi_bw,
3129 TP_PROTO(struct ieee80211_local *local,
3130 struct ieee80211_sub_if_data *sdata,
3131 struct link_sta_info *link_sta),
3133 TP_ARGS(local, sdata, link_sta),
3135 TP_STRUCT__entry(
3136 LOCAL_ENTRY
3137 VIF_ENTRY
3138 STA_ENTRY
3139 __field(int, link_id)
3142 TP_fast_assign(
3143 LOCAL_ASSIGN;
3144 VIF_ASSIGN;
3145 STA_NAMED_ASSIGN(link_sta->sta);
3146 __entry->link_id = link_sta->link_id;
3149 TP_printk(
3150 LOCAL_PR_FMT " " VIF_PR_FMT " " STA_PR_FMT " link:%d",
3151 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->link_id
3156 * Tracing for internal functions
3157 * (which may also be called in response to driver calls)
3160 TRACE_EVENT(wake_queue,
3161 TP_PROTO(struct ieee80211_local *local, u16 queue,
3162 enum queue_stop_reason reason, int refcount),
3164 TP_ARGS(local, queue, reason, refcount),
3166 TP_STRUCT__entry(
3167 LOCAL_ENTRY
3168 __field(u16, queue)
3169 __field(u32, reason)
3170 __field(int, refcount)
3173 TP_fast_assign(
3174 LOCAL_ASSIGN;
3175 __entry->queue = queue;
3176 __entry->reason = reason;
3177 __entry->refcount = refcount;
3180 TP_printk(
3181 LOCAL_PR_FMT " queue:%d, reason:%d, refcount: %d",
3182 LOCAL_PR_ARG, __entry->queue, __entry->reason,
3183 __entry->refcount
3187 TRACE_EVENT(stop_queue,
3188 TP_PROTO(struct ieee80211_local *local, u16 queue,
3189 enum queue_stop_reason reason, int refcount),
3191 TP_ARGS(local, queue, reason, refcount),
3193 TP_STRUCT__entry(
3194 LOCAL_ENTRY
3195 __field(u16, queue)
3196 __field(u32, reason)
3197 __field(int, refcount)
3200 TP_fast_assign(
3201 LOCAL_ASSIGN;
3202 __entry->queue = queue;
3203 __entry->reason = reason;
3204 __entry->refcount = refcount;
3207 TP_printk(
3208 LOCAL_PR_FMT " queue:%d, reason:%d, refcount: %d",
3209 LOCAL_PR_ARG, __entry->queue, __entry->reason,
3210 __entry->refcount
3214 TRACE_EVENT(drv_can_neg_ttlm,
3215 TP_PROTO(struct ieee80211_local *local,
3216 struct ieee80211_sub_if_data *sdata,
3217 struct ieee80211_neg_ttlm *neg_ttlm),
3219 TP_ARGS(local, sdata, neg_ttlm),
3221 TP_STRUCT__entry(LOCAL_ENTRY
3222 VIF_ENTRY
3223 __array(u16, downlink, sizeof(u16) * 8)
3224 __array(u16, uplink, sizeof(u16) * 8)
3227 TP_fast_assign(LOCAL_ASSIGN;
3228 VIF_ASSIGN;
3229 memcpy(__entry->downlink, neg_ttlm->downlink,
3230 sizeof(neg_ttlm->downlink));
3231 memcpy(__entry->uplink, neg_ttlm->uplink,
3232 sizeof(neg_ttlm->uplink));
3235 TP_printk(LOCAL_PR_FMT ", " VIF_PR_FMT, LOCAL_PR_ARG, VIF_PR_ARG)
3238 TRACE_EVENT(drv_neg_ttlm_res,
3239 TP_PROTO(struct ieee80211_local *local,
3240 struct ieee80211_sub_if_data *sdata,
3241 enum ieee80211_neg_ttlm_res res,
3242 struct ieee80211_neg_ttlm *neg_ttlm),
3244 TP_ARGS(local, sdata, res, neg_ttlm),
3246 TP_STRUCT__entry(LOCAL_ENTRY
3247 VIF_ENTRY
3248 __field(u32, res)
3249 __array(u16, downlink, sizeof(u16) * 8)
3250 __array(u16, uplink, sizeof(u16) * 8)
3253 TP_fast_assign(LOCAL_ASSIGN;
3254 VIF_ASSIGN;
3255 __entry->res = res;
3256 memcpy(__entry->downlink, neg_ttlm->downlink,
3257 sizeof(neg_ttlm->downlink));
3258 memcpy(__entry->uplink, neg_ttlm->uplink,
3259 sizeof(neg_ttlm->uplink));
3262 TP_printk(LOCAL_PR_FMT VIF_PR_FMT " response: %d\n ",
3263 LOCAL_PR_ARG, VIF_PR_ARG, __entry->res
3267 TRACE_EVENT(drv_prep_add_interface,
3268 TP_PROTO(struct ieee80211_local *local,
3269 enum nl80211_iftype type),
3271 TP_ARGS(local, type),
3272 TP_STRUCT__entry(LOCAL_ENTRY
3273 __field(u32, type)
3276 TP_fast_assign(LOCAL_ASSIGN;
3277 __entry->type = type;
3280 TP_printk(LOCAL_PR_FMT " type: %u\n ",
3281 LOCAL_PR_ARG, __entry->type
3285 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
3287 #undef TRACE_INCLUDE_PATH
3288 #define TRACE_INCLUDE_PATH .
3289 #undef TRACE_INCLUDE_FILE
3290 #define TRACE_INCLUDE_FILE trace
3291 #include <trace/define_trace.h>