Merge tag 'probes-fixes-v6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-block.git] / net / wireless / trace.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
b82730bf
JB
2/*
3 * Portions of this file
4 * Copyright(c) 2016-2017 Intel Deutschland GmbH
a096a860 5 * Copyright (C) 2018, 2020-2025 Intel Corporation
b82730bf 6 */
14e8a3c4
BL
7#undef TRACE_SYSTEM
8#define TRACE_SYSTEM cfg80211
9
10#if !defined(__RDEV_OPS_TRACE) || defined(TRACE_HEADER_MULTI_READ)
11#define __RDEV_OPS_TRACE
12
13#include <linux/tracepoint.h>
14
15#include <linux/rtnetlink.h>
d2beae10 16#include <linux/etherdevice.h>
14e8a3c4
BL
17#include <net/cfg80211.h>
18#include "core.h"
19
20#define MAC_ENTRY(entry_mac) __array(u8, entry_mac, ETH_ALEN)
21#define MAC_ASSIGN(entry_mac, given_mac) do { \
22 if (given_mac) \
23 memcpy(__entry->entry_mac, given_mac, ETH_ALEN); \
24 else \
d2beae10 25 eth_zero_addr(__entry->entry_mac); \
14e8a3c4 26 } while (0)
14e8a3c4 27
ec816087
JB
28#define MAXNAME 32
29#define WIPHY_ENTRY __array(char, wiphy_name, 32)
0ffe8588 30#define WIPHY_ASSIGN strscpy(__entry->wiphy_name, wiphy_name(wiphy), MAXNAME)
ec816087
JB
31#define WIPHY_PR_FMT "%s"
32#define WIPHY_PR_ARG __entry->wiphy_name
33
34#define WDEV_ENTRY __field(u32, id)
ce1eadda
JB
35#define WDEV_ASSIGN (__entry->id) = (!IS_ERR_OR_NULL(wdev) \
36 ? wdev->identifier : 0)
ec816087
JB
37#define WDEV_PR_FMT "wdev(%u)"
38#define WDEV_PR_ARG (__entry->id)
39
40#define NETDEV_ENTRY __array(char, name, IFNAMSIZ) \
41 __field(int, ifindex)
14e8a3c4
BL
42#define NETDEV_ASSIGN \
43 do { \
44 memcpy(__entry->name, netdev->name, IFNAMSIZ); \
14e8a3c4
BL
45 (__entry->ifindex) = (netdev->ifindex); \
46 } while (0)
ec816087
JB
47#define NETDEV_PR_FMT "netdev:%s(%d)"
48#define NETDEV_PR_ARG __entry->name, __entry->ifindex
14e8a3c4
BL
49
50#define MESH_CFG_ENTRY __field(u16, dot11MeshRetryTimeout) \
51 __field(u16, dot11MeshConfirmTimeout) \
52 __field(u16, dot11MeshHoldingTimeout) \
53 __field(u16, dot11MeshMaxPeerLinks) \
54 __field(u8, dot11MeshMaxRetries) \
55 __field(u8, dot11MeshTTL) \
56 __field(u8, element_ttl) \
57 __field(bool, auto_open_plinks) \
58 __field(u32, dot11MeshNbrOffsetMaxNeighbor) \
59 __field(u8, dot11MeshHWMPmaxPREQretries) \
60 __field(u32, path_refresh_time) \
61 __field(u32, dot11MeshHWMPactivePathTimeout) \
62 __field(u16, min_discovery_timeout) \
63 __field(u16, dot11MeshHWMPpreqMinInterval) \
64 __field(u16, dot11MeshHWMPperrMinInterval) \
65 __field(u16, dot11MeshHWMPnetDiameterTraversalTime) \
66 __field(u8, dot11MeshHWMPRootMode) \
67 __field(u16, dot11MeshHWMPRannInterval) \
68 __field(bool, dot11MeshGateAnnouncementProtocol) \
69 __field(bool, dot11MeshForwarding) \
70 __field(s32, rssi_threshold) \
71 __field(u16, ht_opmode) \
72 __field(u32, dot11MeshHWMPactivePathToRootTimeout) \
73 __field(u16, dot11MeshHWMProotInterval) \
e3718a61
LL
74 __field(u16, dot11MeshHWMPconfirmationInterval) \
75 __field(bool, dot11MeshNolearn)
14e8a3c4
BL
76#define MESH_CFG_ASSIGN \
77 do { \
78 __entry->dot11MeshRetryTimeout = conf->dot11MeshRetryTimeout; \
79 __entry->dot11MeshConfirmTimeout = \
80 conf->dot11MeshConfirmTimeout; \
81 __entry->dot11MeshHoldingTimeout = \
82 conf->dot11MeshHoldingTimeout; \
83 __entry->dot11MeshMaxPeerLinks = conf->dot11MeshMaxPeerLinks; \
84 __entry->dot11MeshMaxRetries = conf->dot11MeshMaxRetries; \
85 __entry->dot11MeshTTL = conf->dot11MeshTTL; \
86 __entry->element_ttl = conf->element_ttl; \
87 __entry->auto_open_plinks = conf->auto_open_plinks; \
88 __entry->dot11MeshNbrOffsetMaxNeighbor = \
89 conf->dot11MeshNbrOffsetMaxNeighbor; \
90 __entry->dot11MeshHWMPmaxPREQretries = \
91 conf->dot11MeshHWMPmaxPREQretries; \
92 __entry->path_refresh_time = conf->path_refresh_time; \
93 __entry->dot11MeshHWMPactivePathTimeout = \
94 conf->dot11MeshHWMPactivePathTimeout; \
95 __entry->min_discovery_timeout = conf->min_discovery_timeout; \
96 __entry->dot11MeshHWMPpreqMinInterval = \
97 conf->dot11MeshHWMPpreqMinInterval; \
98 __entry->dot11MeshHWMPperrMinInterval = \
99 conf->dot11MeshHWMPperrMinInterval; \
100 __entry->dot11MeshHWMPnetDiameterTraversalTime = \
101 conf->dot11MeshHWMPnetDiameterTraversalTime; \
102 __entry->dot11MeshHWMPRootMode = conf->dot11MeshHWMPRootMode; \
103 __entry->dot11MeshHWMPRannInterval = \
104 conf->dot11MeshHWMPRannInterval; \
105 __entry->dot11MeshGateAnnouncementProtocol = \
106 conf->dot11MeshGateAnnouncementProtocol; \
107 __entry->dot11MeshForwarding = conf->dot11MeshForwarding; \
108 __entry->rssi_threshold = conf->rssi_threshold; \
109 __entry->ht_opmode = conf->ht_opmode; \
110 __entry->dot11MeshHWMPactivePathToRootTimeout = \
111 conf->dot11MeshHWMPactivePathToRootTimeout; \
112 __entry->dot11MeshHWMProotInterval = \
113 conf->dot11MeshHWMProotInterval; \
114 __entry->dot11MeshHWMPconfirmationInterval = \
115 conf->dot11MeshHWMPconfirmationInterval; \
e3718a61 116 __entry->dot11MeshNolearn = conf->dot11MeshNolearn; \
14e8a3c4
BL
117 } while (0)
118
57fbcce3 119#define CHAN_ENTRY __field(enum nl80211_band, band) \
934f4c7d
TP
120 __field(u32, center_freq) \
121 __field(u16, freq_offset)
14e8a3c4
BL
122#define CHAN_ASSIGN(chan) \
123 do { \
124 if (chan) { \
125 __entry->band = chan->band; \
126 __entry->center_freq = chan->center_freq; \
934f4c7d 127 __entry->freq_offset = chan->freq_offset; \
14e8a3c4
BL
128 } else { \
129 __entry->band = 0; \
130 __entry->center_freq = 0; \
934f4c7d 131 __entry->freq_offset = 0; \
14e8a3c4
BL
132 } \
133 } while (0)
934f4c7d
TP
134#define CHAN_PR_FMT "band: %d, freq: %u.%03u"
135#define CHAN_PR_ARG __entry->band, __entry->center_freq, __entry->freq_offset
14e8a3c4 136
57fbcce3 137#define CHAN_DEF_ENTRY __field(enum nl80211_band, band) \
3d9d1d66 138 __field(u32, control_freq) \
934f4c7d 139 __field(u32, freq_offset) \
3d9d1d66
JB
140 __field(u32, width) \
141 __field(u32, center_freq1) \
934f4c7d 142 __field(u32, freq1_offset) \
b82730bf
JB
143 __field(u32, center_freq2) \
144 __field(u16, punctured)
683b6d3b
JB
145#define CHAN_DEF_ASSIGN(chandef) \
146 do { \
147 if ((chandef) && (chandef)->chan) { \
148 __entry->band = (chandef)->chan->band; \
3d9d1d66 149 __entry->control_freq = \
683b6d3b 150 (chandef)->chan->center_freq; \
934f4c7d
TP
151 __entry->freq_offset = \
152 (chandef)->chan->freq_offset; \
3d9d1d66
JB
153 __entry->width = (chandef)->width; \
154 __entry->center_freq1 = (chandef)->center_freq1;\
934f4c7d 155 __entry->freq1_offset = (chandef)->freq1_offset;\
3d9d1d66 156 __entry->center_freq2 = (chandef)->center_freq2;\
b82730bf 157 __entry->punctured = (chandef)->punctured; \
683b6d3b
JB
158 } else { \
159 __entry->band = 0; \
3d9d1d66 160 __entry->control_freq = 0; \
934f4c7d 161 __entry->freq_offset = 0; \
3d9d1d66
JB
162 __entry->width = 0; \
163 __entry->center_freq1 = 0; \
934f4c7d 164 __entry->freq1_offset = 0; \
3d9d1d66 165 __entry->center_freq2 = 0; \
b82730bf 166 __entry->punctured = 0; \
683b6d3b
JB
167 } \
168 } while (0)
3d9d1d66 169#define CHAN_DEF_PR_FMT \
b82730bf 170 "band: %d, control freq: %u.%03u, width: %d, cf1: %u.%03u, cf2: %u, punct: 0x%x"
3d9d1d66 171#define CHAN_DEF_PR_ARG __entry->band, __entry->control_freq, \
934f4c7d
TP
172 __entry->freq_offset, __entry->width, \
173 __entry->center_freq1, __entry->freq1_offset, \
b82730bf 174 __entry->center_freq2, __entry->punctured
683b6d3b 175
e306784a
SM
176#define FILS_AAD_ASSIGN(fa) \
177 do { \
178 if (fa) { \
179 ether_addr_copy(__entry->macaddr, fa->macaddr); \
180 __entry->kek_len = fa->kek_len; \
181 } else { \
182 eth_zero_addr(__entry->macaddr); \
183 __entry->kek_len = 0; \
184 } \
185 } while (0)
186#define FILS_AAD_PR_FMT \
187 "macaddr: %pM, kek_len: %d"
188
14e8a3c4
BL
189#define SINFO_ENTRY __field(int, generation) \
190 __field(u32, connected_time) \
191 __field(u32, inactive_time) \
192 __field(u32, rx_bytes) \
193 __field(u32, tx_bytes) \
194 __field(u32, rx_packets) \
195 __field(u32, tx_packets) \
196 __field(u32, tx_retries) \
197 __field(u32, tx_failed) \
198 __field(u32, rx_dropped_misc) \
199 __field(u32, beacon_loss_count) \
200 __field(u16, llid) \
201 __field(u16, plid) \
202 __field(u8, plink_state)
203#define SINFO_ASSIGN \
204 do { \
205 __entry->generation = sinfo->generation; \
206 __entry->connected_time = sinfo->connected_time; \
207 __entry->inactive_time = sinfo->inactive_time; \
208 __entry->rx_bytes = sinfo->rx_bytes; \
209 __entry->tx_bytes = sinfo->tx_bytes; \
210 __entry->rx_packets = sinfo->rx_packets; \
211 __entry->tx_packets = sinfo->tx_packets; \
212 __entry->tx_retries = sinfo->tx_retries; \
213 __entry->tx_failed = sinfo->tx_failed; \
214 __entry->rx_dropped_misc = sinfo->rx_dropped_misc; \
215 __entry->beacon_loss_count = sinfo->beacon_loss_count; \
216 __entry->llid = sinfo->llid; \
217 __entry->plid = sinfo->plid; \
218 __entry->plink_state = sinfo->plink_state; \
219 } while (0)
220
221#define BOOL_TO_STR(bo) (bo) ? "true" : "false"
222
fa9ffc74
KP
223#define QOS_MAP_ENTRY __field(u8, num_des) \
224 __array(u8, dscp_exception, \
225 2 * IEEE80211_QOS_MAP_MAX_EX) \
226 __array(u8, up, IEEE80211_QOS_MAP_LEN_MIN)
227#define QOS_MAP_ASSIGN(qos_map) \
228 do { \
229 if ((qos_map)) { \
230 __entry->num_des = (qos_map)->num_des; \
231 memcpy(__entry->dscp_exception, \
232 &(qos_map)->dscp_exception, \
233 2 * IEEE80211_QOS_MAP_MAX_EX); \
234 memcpy(__entry->up, &(qos_map)->up, \
235 IEEE80211_QOS_MAP_LEN_MIN); \
236 } else { \
237 __entry->num_des = 0; \
238 memset(__entry->dscp_exception, 0, \
239 2 * IEEE80211_QOS_MAP_MAX_EX); \
240 memset(__entry->up, 0, \
241 IEEE80211_QOS_MAP_LEN_MIN); \
242 } \
243 } while (0)
244
eb745c7c
JB
245/*************************************************************
246 * wiphy work traces *
247 *************************************************************/
248
249DECLARE_EVENT_CLASS(wiphy_work_event,
250 TP_PROTO(struct wiphy *wiphy, struct wiphy_work *work),
251 TP_ARGS(wiphy, work),
252 TP_STRUCT__entry(
253 WIPHY_ENTRY
254 __field(void *, instance)
255 __field(void *, func)
256 ),
257 TP_fast_assign(
258 WIPHY_ASSIGN;
259 __entry->instance = work;
260 __entry->func = work ? work->func : NULL;
261 ),
262 TP_printk(WIPHY_PR_FMT " instance=%p func=%pS",
263 WIPHY_PR_ARG, __entry->instance, __entry->func)
264);
265
266DEFINE_EVENT(wiphy_work_event, wiphy_work_queue,
267 TP_PROTO(struct wiphy *wiphy, struct wiphy_work *work),
268 TP_ARGS(wiphy, work)
269);
270
271DEFINE_EVENT(wiphy_work_event, wiphy_work_run,
272 TP_PROTO(struct wiphy *wiphy, struct wiphy_work *work),
273 TP_ARGS(wiphy, work)
274);
275
276DEFINE_EVENT(wiphy_work_event, wiphy_work_cancel,
277 TP_PROTO(struct wiphy *wiphy, struct wiphy_work *work),
278 TP_ARGS(wiphy, work)
279);
280
281DEFINE_EVENT(wiphy_work_event, wiphy_work_flush,
282 TP_PROTO(struct wiphy *wiphy, struct wiphy_work *work),
283 TP_ARGS(wiphy, work)
284);
285
286TRACE_EVENT(wiphy_delayed_work_queue,
287 TP_PROTO(struct wiphy *wiphy, struct wiphy_work *work,
288 unsigned long delay),
289 TP_ARGS(wiphy, work, delay),
290 TP_STRUCT__entry(
291 WIPHY_ENTRY
292 __field(void *, instance)
293 __field(void *, func)
294 __field(unsigned long, delay)
295 ),
296 TP_fast_assign(
297 WIPHY_ASSIGN;
298 __entry->instance = work;
299 __entry->func = work->func;
300 __entry->delay = delay;
301 ),
302 TP_printk(WIPHY_PR_FMT " instance=%p func=%pS delay=%ld",
303 WIPHY_PR_ARG, __entry->instance, __entry->func,
304 __entry->delay)
305);
306
307TRACE_EVENT(wiphy_work_worker_start,
308 TP_PROTO(struct wiphy *wiphy),
309 TP_ARGS(wiphy),
310 TP_STRUCT__entry(
311 WIPHY_ENTRY
312 ),
313 TP_fast_assign(
314 WIPHY_ASSIGN;
315 ),
316 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
317);
318
14e8a3c4
BL
319/*************************************************************
320 * rdev->ops traces *
321 *************************************************************/
322
323TRACE_EVENT(rdev_suspend,
324 TP_PROTO(struct wiphy *wiphy, struct cfg80211_wowlan *wow),
325 TP_ARGS(wiphy, wow),
326 TP_STRUCT__entry(
327 WIPHY_ENTRY
328 __field(bool, any)
329 __field(bool, disconnect)
330 __field(bool, magic_pkt)
331 __field(bool, gtk_rekey_failure)
332 __field(bool, eap_identity_req)
333 __field(bool, four_way_handshake)
334 __field(bool, rfkill_release)
335 __field(bool, valid_wow)
336 ),
337 TP_fast_assign(
338 WIPHY_ASSIGN;
339 if (wow) {
340 __entry->any = wow->any;
341 __entry->disconnect = wow->disconnect;
342 __entry->magic_pkt = wow->magic_pkt;
343 __entry->gtk_rekey_failure = wow->gtk_rekey_failure;
344 __entry->eap_identity_req = wow->eap_identity_req;
345 __entry->four_way_handshake = wow->four_way_handshake;
346 __entry->rfkill_release = wow->rfkill_release;
347 __entry->valid_wow = true;
348 } else {
349 __entry->valid_wow = false;
350 }
351 ),
352 TP_printk(WIPHY_PR_FMT ", wow%s - any: %d, disconnect: %d, "
353 "magic pkt: %d, gtk rekey failure: %d, eap identify req: %d, "
354 "four way handshake: %d, rfkill release: %d.",
355 WIPHY_PR_ARG, __entry->valid_wow ? "" : "(Not configured!)",
356 __entry->any, __entry->disconnect, __entry->magic_pkt,
357 __entry->gtk_rekey_failure, __entry->eap_identity_req,
358 __entry->four_way_handshake, __entry->rfkill_release)
359);
360
361TRACE_EVENT(rdev_return_int,
362 TP_PROTO(struct wiphy *wiphy, int ret),
363 TP_ARGS(wiphy, ret),
364 TP_STRUCT__entry(
365 WIPHY_ENTRY
366 __field(int, ret)
367 ),
368 TP_fast_assign(
369 WIPHY_ASSIGN;
370 __entry->ret = ret;
371 ),
372 TP_printk(WIPHY_PR_FMT ", returned: %d", WIPHY_PR_ARG, __entry->ret)
373);
374
375TRACE_EVENT(rdev_scan,
376 TP_PROTO(struct wiphy *wiphy, struct cfg80211_scan_request *request),
377 TP_ARGS(wiphy, request),
378 TP_STRUCT__entry(
379 WIPHY_ENTRY
380 ),
381 TP_fast_assign(
382 WIPHY_ASSIGN;
383 ),
384 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
385);
386
387DECLARE_EVENT_CLASS(wiphy_only_evt,
388 TP_PROTO(struct wiphy *wiphy),
389 TP_ARGS(wiphy),
390 TP_STRUCT__entry(
391 WIPHY_ENTRY
392 ),
393 TP_fast_assign(
394 WIPHY_ASSIGN;
395 ),
396 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
397);
398
399DEFINE_EVENT(wiphy_only_evt, rdev_resume,
400 TP_PROTO(struct wiphy *wiphy),
401 TP_ARGS(wiphy)
402);
403
404DEFINE_EVENT(wiphy_only_evt, rdev_return_void,
405 TP_PROTO(struct wiphy *wiphy),
406 TP_ARGS(wiphy)
407);
408
14e8a3c4
BL
409DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna,
410 TP_PROTO(struct wiphy *wiphy),
411 TP_ARGS(wiphy)
412);
413
14e8a3c4
BL
414DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll,
415 TP_PROTO(struct wiphy *wiphy),
416 TP_ARGS(wiphy)
417);
418
419DECLARE_EVENT_CLASS(wiphy_enabled_evt,
420 TP_PROTO(struct wiphy *wiphy, bool enabled),
421 TP_ARGS(wiphy, enabled),
422 TP_STRUCT__entry(
423 WIPHY_ENTRY
424 __field(bool, enabled)
425 ),
426 TP_fast_assign(
427 WIPHY_ASSIGN;
428 __entry->enabled = enabled;
429 ),
430 TP_printk(WIPHY_PR_FMT ", %senabled ",
431 WIPHY_PR_ARG, __entry->enabled ? "" : "not ")
432);
433
434DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup,
435 TP_PROTO(struct wiphy *wiphy, bool enabled),
436 TP_ARGS(wiphy, enabled)
437);
438
439TRACE_EVENT(rdev_add_virtual_intf,
440 TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type),
441 TP_ARGS(wiphy, name, type),
442 TP_STRUCT__entry(
443 WIPHY_ENTRY
444 __string(vir_intf_name, name ? name : "<noname>")
445 __field(enum nl80211_iftype, type)
446 ),
447 TP_fast_assign(
448 WIPHY_ASSIGN;
2c92ca84 449 __assign_str(vir_intf_name);
14e8a3c4
BL
450 __entry->type = type;
451 ),
452 TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d",
453 WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type)
454);
455
456DECLARE_EVENT_CLASS(wiphy_wdev_evt,
457 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
458 TP_ARGS(wiphy, wdev),
459 TP_STRUCT__entry(
460 WIPHY_ENTRY
461 WDEV_ENTRY
462 ),
463 TP_fast_assign(
464 WIPHY_ASSIGN;
465 WDEV_ASSIGN;
466 ),
ec816087 467 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
14e8a3c4
BL
468);
469
9bb7e0f2
JB
470DECLARE_EVENT_CLASS(wiphy_wdev_cookie_evt,
471 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
472 TP_ARGS(wiphy, wdev, cookie),
473 TP_STRUCT__entry(
474 WIPHY_ENTRY
475 WDEV_ENTRY
476 __field(u64, cookie)
477 ),
478 TP_fast_assign(
479 WIPHY_ASSIGN;
480 WDEV_ASSIGN;
481 __entry->cookie = cookie;
482 ),
483 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %lld",
484 WIPHY_PR_ARG, WDEV_PR_ARG,
485 (unsigned long long)__entry->cookie)
486);
487
14e8a3c4
BL
488DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev,
489 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
490 TP_ARGS(wiphy, wdev)
491);
492
493DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf,
494 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
495 TP_ARGS(wiphy, wdev)
496);
497
498TRACE_EVENT(rdev_change_virtual_intf,
499 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
500 enum nl80211_iftype type),
501 TP_ARGS(wiphy, netdev, type),
502 TP_STRUCT__entry(
503 WIPHY_ENTRY
504 NETDEV_ENTRY
505 __field(enum nl80211_iftype, type)
506 ),
507 TP_fast_assign(
508 WIPHY_ASSIGN;
509 NETDEV_ASSIGN;
510 __entry->type = type;
511 ),
ec816087 512 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", type: %d",
14e8a3c4
BL
513 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type)
514);
515
516DECLARE_EVENT_CLASS(key_handle,
e7a7b84e
VJ
517 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int link_id,
518 u8 key_index, bool pairwise, const u8 *mac_addr),
519 TP_ARGS(wiphy, netdev, link_id, key_index, pairwise, mac_addr),
14e8a3c4
BL
520 TP_STRUCT__entry(
521 WIPHY_ENTRY
522 NETDEV_ENTRY
523 MAC_ENTRY(mac_addr)
e7a7b84e 524 __field(int, link_id)
14e8a3c4
BL
525 __field(u8, key_index)
526 __field(bool, pairwise)
527 ),
528 TP_fast_assign(
529 WIPHY_ASSIGN;
530 NETDEV_ASSIGN;
531 MAC_ASSIGN(mac_addr, mac_addr);
e7a7b84e 532 __entry->link_id = link_id;
14e8a3c4
BL
533 __entry->key_index = key_index;
534 __entry->pairwise = pairwise;
535 ),
e7a7b84e 536 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", link_id: %d, "
3d9c3617 537 "key_index: %u, pairwise: %s, mac addr: %pM",
e7a7b84e
VJ
538 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->link_id,
539 __entry->key_index, BOOL_TO_STR(__entry->pairwise),
3d9c3617 540 __entry->mac_addr)
14e8a3c4
BL
541);
542
6cdd3979 543DEFINE_EVENT(key_handle, rdev_get_key,
e7a7b84e
VJ
544 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int link_id,
545 u8 key_index, bool pairwise, const u8 *mac_addr),
546 TP_ARGS(wiphy, netdev, link_id, key_index, pairwise, mac_addr)
14e8a3c4
BL
547);
548
6cdd3979 549DEFINE_EVENT(key_handle, rdev_del_key,
e7a7b84e
VJ
550 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int link_id,
551 u8 key_index, bool pairwise, const u8 *mac_addr),
552 TP_ARGS(wiphy, netdev, link_id, key_index, pairwise, mac_addr)
14e8a3c4
BL
553);
554
6cdd3979 555TRACE_EVENT(rdev_add_key,
e7a7b84e
VJ
556 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int link_id,
557 u8 key_index, bool pairwise, const u8 *mac_addr, u8 mode),
558 TP_ARGS(wiphy, netdev, link_id, key_index, pairwise, mac_addr, mode),
6cdd3979
AW
559 TP_STRUCT__entry(
560 WIPHY_ENTRY
561 NETDEV_ENTRY
562 MAC_ENTRY(mac_addr)
e7a7b84e 563 __field(int, link_id)
6cdd3979
AW
564 __field(u8, key_index)
565 __field(bool, pairwise)
566 __field(u8, mode)
567 ),
568 TP_fast_assign(
569 WIPHY_ASSIGN;
570 NETDEV_ASSIGN;
571 MAC_ASSIGN(mac_addr, mac_addr);
e7a7b84e 572 __entry->link_id = link_id;
6cdd3979
AW
573 __entry->key_index = key_index;
574 __entry->pairwise = pairwise;
575 __entry->mode = mode;
576 ),
e7a7b84e
VJ
577 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", link_id: %d, "
578 "key_index: %u, mode: %u, pairwise: %s, "
3d9c3617 579 "mac addr: %pM",
e7a7b84e
VJ
580 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->link_id,
581 __entry->key_index, __entry->mode,
3d9c3617 582 BOOL_TO_STR(__entry->pairwise), __entry->mac_addr)
14e8a3c4
BL
583);
584
585TRACE_EVENT(rdev_set_default_key,
e7a7b84e
VJ
586 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int link_id,
587 u8 key_index, bool unicast, bool multicast),
588 TP_ARGS(wiphy, netdev, link_id, key_index, unicast, multicast),
14e8a3c4
BL
589 TP_STRUCT__entry(
590 WIPHY_ENTRY
591 NETDEV_ENTRY
e7a7b84e 592 __field(int, link_id)
14e8a3c4
BL
593 __field(u8, key_index)
594 __field(bool, unicast)
595 __field(bool, multicast)
596 ),
597 TP_fast_assign(
598 WIPHY_ASSIGN;
599 NETDEV_ASSIGN;
e7a7b84e 600 __entry->link_id = link_id;
14e8a3c4
BL
601 __entry->key_index = key_index;
602 __entry->unicast = unicast;
603 __entry->multicast = multicast;
604 ),
e7a7b84e
VJ
605 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", link_id: %d, "
606 "key index: %u, unicast: %s, multicast: %s",
607 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->link_id,
608 __entry->key_index, BOOL_TO_STR(__entry->unicast),
14e8a3c4
BL
609 BOOL_TO_STR(__entry->multicast))
610);
611
612TRACE_EVENT(rdev_set_default_mgmt_key,
e7a7b84e
VJ
613 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int link_id,
614 u8 key_index),
615 TP_ARGS(wiphy, netdev, link_id, key_index),
56be393f
JM
616 TP_STRUCT__entry(
617 WIPHY_ENTRY
618 NETDEV_ENTRY
e7a7b84e 619 __field(int, link_id)
56be393f
JM
620 __field(u8, key_index)
621 ),
622 TP_fast_assign(
623 WIPHY_ASSIGN;
624 NETDEV_ASSIGN;
e7a7b84e 625 __entry->link_id = link_id;
56be393f
JM
626 __entry->key_index = key_index;
627 ),
e7a7b84e
VJ
628 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", link_id: %d, "
629 "key index: %u", WIPHY_PR_ARG, NETDEV_PR_ARG,
630 __entry->link_id, __entry->key_index)
56be393f
JM
631);
632
633TRACE_EVENT(rdev_set_default_beacon_key,
e7a7b84e
VJ
634 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int link_id,
635 u8 key_index),
636 TP_ARGS(wiphy, netdev, link_id, key_index),
14e8a3c4
BL
637 TP_STRUCT__entry(
638 WIPHY_ENTRY
639 NETDEV_ENTRY
e7a7b84e 640 __field(int, link_id)
14e8a3c4
BL
641 __field(u8, key_index)
642 ),
643 TP_fast_assign(
644 WIPHY_ASSIGN;
645 NETDEV_ASSIGN;
e7a7b84e 646 __entry->link_id = link_id;
14e8a3c4
BL
647 __entry->key_index = key_index;
648 ),
e7a7b84e
VJ
649 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", link_id: %d, "
650 "key index: %u", WIPHY_PR_ARG, NETDEV_PR_ARG,
651 __entry->link_id, __entry->key_index)
14e8a3c4
BL
652);
653
654TRACE_EVENT(rdev_start_ap,
655 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
656 struct cfg80211_ap_settings *settings),
657 TP_ARGS(wiphy, netdev, settings),
658 TP_STRUCT__entry(
659 WIPHY_ENTRY
660 NETDEV_ENTRY
683b6d3b 661 CHAN_DEF_ENTRY
14e8a3c4
BL
662 __field(int, beacon_interval)
663 __field(int, dtim_period)
664 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
665 __field(enum nl80211_hidden_ssid, hidden_ssid)
666 __field(u32, wpa_ver)
667 __field(bool, privacy)
668 __field(enum nl80211_auth_type, auth_type)
669 __field(int, inactivity_timeout)
7b0a0e3c 670 __field(unsigned int, link_id)
14e8a3c4
BL
671 ),
672 TP_fast_assign(
673 WIPHY_ASSIGN;
674 NETDEV_ASSIGN;
683b6d3b 675 CHAN_DEF_ASSIGN(&settings->chandef);
14e8a3c4
BL
676 __entry->beacon_interval = settings->beacon_interval;
677 __entry->dtim_period = settings->dtim_period;
678 __entry->hidden_ssid = settings->hidden_ssid;
679 __entry->wpa_ver = settings->crypto.wpa_versions;
680 __entry->privacy = settings->privacy;
681 __entry->auth_type = settings->auth_type;
682 __entry->inactivity_timeout = settings->inactivity_timeout;
683 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
684 memcpy(__entry->ssid, settings->ssid, settings->ssid_len);
7b0a0e3c 685 __entry->link_id = settings->beacon.link_id;
14e8a3c4 686 ),
ec816087 687 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", AP settings - ssid: %s, "
683b6d3b 688 CHAN_DEF_PR_FMT ", beacon interval: %d, dtim period: %d, "
14e8a3c4 689 "hidden ssid: %d, wpa versions: %u, privacy: %s, "
7b0a0e3c 690 "auth type: %d, inactivity timeout: %d, link_id: %d",
683b6d3b 691 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_DEF_PR_ARG,
14e8a3c4
BL
692 __entry->beacon_interval, __entry->dtim_period,
693 __entry->hidden_ssid, __entry->wpa_ver,
694 BOOL_TO_STR(__entry->privacy), __entry->auth_type,
7b0a0e3c 695 __entry->inactivity_timeout, __entry->link_id)
14e8a3c4
BL
696);
697
698TRACE_EVENT(rdev_change_beacon,
699 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
bb55441c 700 struct cfg80211_ap_update *info),
14e8a3c4
BL
701 TP_ARGS(wiphy, netdev, info),
702 TP_STRUCT__entry(
703 WIPHY_ENTRY
704 NETDEV_ENTRY
7b0a0e3c 705 __field(int, link_id)
66f85d57
AD
706 __dynamic_array(u8, head, info->beacon.head_len)
707 __dynamic_array(u8, tail, info->beacon.tail_len)
708 __dynamic_array(u8, beacon_ies, info->beacon.beacon_ies_len)
709 __dynamic_array(u8, proberesp_ies, info->beacon.proberesp_ies_len)
710 __dynamic_array(u8, assocresp_ies, info->beacon.assocresp_ies_len)
711 __dynamic_array(u8, probe_resp, info->beacon.probe_resp_len)
14e8a3c4
BL
712 ),
713 TP_fast_assign(
714 WIPHY_ASSIGN;
715 NETDEV_ASSIGN;
66f85d57
AD
716 __entry->link_id = info->beacon.link_id;
717 if (info->beacon.head)
718 memcpy(__get_dynamic_array(head),
719 info->beacon.head,
720 info->beacon.head_len);
721 if (info->beacon.tail)
722 memcpy(__get_dynamic_array(tail),
723 info->beacon.tail,
724 info->beacon.tail_len);
725 if (info->beacon.beacon_ies)
726 memcpy(__get_dynamic_array(beacon_ies),
727 info->beacon.beacon_ies,
728 info->beacon.beacon_ies_len);
729 if (info->beacon.proberesp_ies)
730 memcpy(__get_dynamic_array(proberesp_ies),
731 info->beacon.proberesp_ies,
732 info->beacon.proberesp_ies_len);
733 if (info->beacon.assocresp_ies)
734 memcpy(__get_dynamic_array(assocresp_ies),
735 info->beacon.assocresp_ies,
736 info->beacon.assocresp_ies_len);
737 if (info->beacon.probe_resp)
738 memcpy(__get_dynamic_array(probe_resp),
739 info->beacon.probe_resp,
740 info->beacon.probe_resp_len);
14e8a3c4 741 ),
7b0a0e3c
JB
742 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", link_id:%d",
743 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->link_id)
744);
745
746TRACE_EVENT(rdev_stop_ap,
747 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
748 unsigned int link_id),
749 TP_ARGS(wiphy, netdev, link_id),
750 TP_STRUCT__entry(
751 WIPHY_ENTRY
752 NETDEV_ENTRY
753 __field(unsigned int, link_id)
754 ),
755 TP_fast_assign(
756 WIPHY_ASSIGN;
757 NETDEV_ASSIGN;
758 __entry->link_id = link_id;
759 ),
760 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", link_id: %d",
761 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->link_id)
14e8a3c4
BL
762);
763
764DECLARE_EVENT_CLASS(wiphy_netdev_evt,
765 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
766 TP_ARGS(wiphy, netdev),
767 TP_STRUCT__entry(
768 WIPHY_ENTRY
769 NETDEV_ENTRY
770 ),
771 TP_fast_assign(
772 WIPHY_ASSIGN;
773 NETDEV_ASSIGN;
774 ),
ec816087 775 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
14e8a3c4
BL
776);
777
14e8a3c4
BL
778DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data,
779 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
780 TP_ARGS(wiphy, netdev)
781);
782
783DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config,
784 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
785 TP_ARGS(wiphy, netdev)
786);
787
788DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh,
789 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
790 TP_ARGS(wiphy, netdev)
791);
792
793DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ibss,
794 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
795 TP_ARGS(wiphy, netdev)
796);
797
6e0bd6c3
RL
798DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ocb,
799 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
800 TP_ARGS(wiphy, netdev)
801);
802
14e8a3c4
BL
803DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa,
804 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
805 TP_ARGS(wiphy, netdev)
806);
807
f4bb650c 808TRACE_EVENT(rdev_end_cac,
81f67d60
AKS
809 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
810 unsigned int link_id),
811 TP_ARGS(wiphy, netdev, link_id),
f4bb650c
AKS
812 TP_STRUCT__entry(
813 WIPHY_ENTRY
814 NETDEV_ENTRY
81f67d60 815 __field(unsigned int, link_id)
f4bb650c
AKS
816 ),
817 TP_fast_assign(
818 WIPHY_ASSIGN;
819 NETDEV_ASSIGN;
81f67d60 820 __entry->link_id = link_id;
f4bb650c 821 ),
81f67d60
AKS
822 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", link_id: %d",
823 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->link_id)
26ec17a1
OM
824);
825
14e8a3c4
BL
826DECLARE_EVENT_CLASS(station_add_change,
827 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
828 struct station_parameters *params),
829 TP_ARGS(wiphy, netdev, mac, params),
830 TP_STRUCT__entry(
831 WIPHY_ENTRY
832 NETDEV_ENTRY
833 MAC_ENTRY(sta_mac)
834 __field(u32, sta_flags_mask)
835 __field(u32, sta_flags_set)
836 __field(u32, sta_modify_mask)
837 __field(int, listen_interval)
6e045905 838 __field(u16, capability)
14e8a3c4
BL
839 __field(u16, aid)
840 __field(u8, plink_action)
841 __field(u8, plink_state)
842 __field(u8, uapsd_queues)
6e045905
JB
843 __field(u8, max_sp)
844 __field(u8, opmode_notif)
845 __field(bool, opmode_notif_used)
14e8a3c4 846 __array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap))
6e045905 847 __array(u8, vht_capa, (int)sizeof(struct ieee80211_vht_cap))
5d8325ec 848 __array(char, vlan, IFNAMSIZ)
6e045905 849 __dynamic_array(u8, supported_rates,
b95eb7f0 850 params->link_sta_params.supported_rates_len)
6e045905
JB
851 __dynamic_array(u8, ext_capab, params->ext_capab_len)
852 __dynamic_array(u8, supported_channels,
853 params->supported_channels_len)
854 __dynamic_array(u8, supported_oper_classes,
855 params->supported_oper_classes_len)
14e8a3c4
BL
856 ),
857 TP_fast_assign(
858 WIPHY_ASSIGN;
859 NETDEV_ASSIGN;
860 MAC_ASSIGN(sta_mac, mac);
861 __entry->sta_flags_mask = params->sta_flags_mask;
862 __entry->sta_flags_set = params->sta_flags_set;
863 __entry->sta_modify_mask = params->sta_modify_mask;
864 __entry->listen_interval = params->listen_interval;
865 __entry->aid = params->aid;
866 __entry->plink_action = params->plink_action;
867 __entry->plink_state = params->plink_state;
868 __entry->uapsd_queues = params->uapsd_queues;
869 memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap));
b95eb7f0
ST
870 if (params->link_sta_params.ht_capa)
871 memcpy(__entry->ht_capa,
872 params->link_sta_params.ht_capa,
14e8a3c4 873 sizeof(struct ieee80211_ht_cap));
6e045905 874 memset(__entry->vht_capa, 0, sizeof(struct ieee80211_vht_cap));
b95eb7f0
ST
875 if (params->link_sta_params.vht_capa)
876 memcpy(__entry->vht_capa,
877 params->link_sta_params.vht_capa,
6e045905 878 sizeof(struct ieee80211_vht_cap));
5d8325ec
JB
879 memset(__entry->vlan, 0, sizeof(__entry->vlan));
880 if (params->vlan)
881 memcpy(__entry->vlan, params->vlan->name, IFNAMSIZ);
b95eb7f0
ST
882 if (params->link_sta_params.supported_rates &&
883 params->link_sta_params.supported_rates_len)
6e045905 884 memcpy(__get_dynamic_array(supported_rates),
b95eb7f0
ST
885 params->link_sta_params.supported_rates,
886 params->link_sta_params.supported_rates_len);
6e045905
JB
887 if (params->ext_capab && params->ext_capab_len)
888 memcpy(__get_dynamic_array(ext_capab),
889 params->ext_capab,
890 params->ext_capab_len);
891 if (params->supported_channels &&
892 params->supported_channels_len)
893 memcpy(__get_dynamic_array(supported_channels),
894 params->supported_channels,
895 params->supported_channels_len);
896 if (params->supported_oper_classes &&
897 params->supported_oper_classes_len)
898 memcpy(__get_dynamic_array(supported_oper_classes),
899 params->supported_oper_classes,
900 params->supported_oper_classes_len);
901 __entry->max_sp = params->max_sp;
902 __entry->capability = params->capability;
b95eb7f0
ST
903 __entry->opmode_notif = params->link_sta_params.opmode_notif;
904 __entry->opmode_notif_used =
905 params->link_sta_params.opmode_notif_used;
14e8a3c4 906 ),
3d9c3617 907 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: %pM"
b2edc721
JB
908 ", station flags mask: 0x%x, station flags set: 0x%x, "
909 "station modify mask: 0x%x, listen interval: %d, aid: %u, "
5d8325ec 910 "plink action: %u, plink state: %u, uapsd queues: %u, vlan:%s",
3d9c3617 911 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sta_mac,
14e8a3c4
BL
912 __entry->sta_flags_mask, __entry->sta_flags_set,
913 __entry->sta_modify_mask, __entry->listen_interval,
914 __entry->aid, __entry->plink_action, __entry->plink_state,
5d8325ec 915 __entry->uapsd_queues, __entry->vlan)
14e8a3c4
BL
916);
917
918DEFINE_EVENT(station_add_change, rdev_add_station,
919 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
920 struct station_parameters *params),
921 TP_ARGS(wiphy, netdev, mac, params)
922);
923
924DEFINE_EVENT(station_add_change, rdev_change_station,
925 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
926 struct station_parameters *params),
927 TP_ARGS(wiphy, netdev, mac, params)
928);
929
930DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
931 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
932 TP_ARGS(wiphy, netdev, mac),
933 TP_STRUCT__entry(
934 WIPHY_ENTRY
935 NETDEV_ENTRY
936 MAC_ENTRY(sta_mac)
937 ),
938 TP_fast_assign(
939 WIPHY_ASSIGN;
940 NETDEV_ASSIGN;
941 MAC_ASSIGN(sta_mac, mac);
942 ),
3d9c3617
JB
943 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: %pM",
944 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sta_mac)
14e8a3c4
BL
945);
946
89c771e5
JM
947DECLARE_EVENT_CLASS(station_del,
948 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
949 struct station_del_parameters *params),
950 TP_ARGS(wiphy, netdev, params),
951 TP_STRUCT__entry(
952 WIPHY_ENTRY
953 NETDEV_ENTRY
954 MAC_ENTRY(sta_mac)
98856866
JM
955 __field(u8, subtype)
956 __field(u16, reason_code)
f6ca96aa 957 __field(int, link_id)
89c771e5
JM
958 ),
959 TP_fast_assign(
960 WIPHY_ASSIGN;
961 NETDEV_ASSIGN;
962 MAC_ASSIGN(sta_mac, params->mac);
98856866
JM
963 __entry->subtype = params->subtype;
964 __entry->reason_code = params->reason_code;
f6ca96aa 965 __entry->link_id = params->link_id;
89c771e5 966 ),
3d9c3617 967 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: %pM"
f6ca96aa 968 ", subtype: %u, reason_code: %u, link_id: %d",
3d9c3617 969 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sta_mac,
f6ca96aa
AKS
970 __entry->subtype, __entry->reason_code,
971 __entry->link_id)
89c771e5
JM
972);
973
974DEFINE_EVENT(station_del, rdev_del_station,
975 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
976 struct station_del_parameters *params),
977 TP_ARGS(wiphy, netdev, params)
14e8a3c4
BL
978);
979
980DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station,
981 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
982 TP_ARGS(wiphy, netdev, mac)
983);
984
985DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
986 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
987 TP_ARGS(wiphy, netdev, mac)
988);
989
14e8a3c4 990TRACE_EVENT(rdev_dump_station,
aaaa10e0 991 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
14e8a3c4 992 u8 *mac),
aaaa10e0 993 TP_ARGS(wiphy, netdev, _idx, mac),
14e8a3c4
BL
994 TP_STRUCT__entry(
995 WIPHY_ENTRY
996 NETDEV_ENTRY
997 MAC_ENTRY(sta_mac)
998 __field(int, idx)
999 ),
1000 TP_fast_assign(
1001 WIPHY_ASSIGN;
1002 NETDEV_ASSIGN;
1003 MAC_ASSIGN(sta_mac, mac);
aaaa10e0 1004 __entry->idx = _idx;
14e8a3c4 1005 ),
3d9c3617
JB
1006 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: %pM, idx: %d",
1007 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sta_mac,
14e8a3c4
BL
1008 __entry->idx)
1009);
1010
1011TRACE_EVENT(rdev_return_int_station_info,
1012 TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo),
1013 TP_ARGS(wiphy, ret, sinfo),
1014 TP_STRUCT__entry(
1015 WIPHY_ENTRY
1016 __field(int, ret)
1017 SINFO_ENTRY
1018 ),
1019 TP_fast_assign(
1020 WIPHY_ASSIGN;
1021 __entry->ret = ret;
1022 SINFO_ASSIGN;
1023 ),
1024 TP_printk(WIPHY_PR_FMT ", returned %d" ,
1025 WIPHY_PR_ARG, __entry->ret)
1026);
1027
1028DECLARE_EVENT_CLASS(mpath_evt,
1029 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
1030 u8 *next_hop),
1031 TP_ARGS(wiphy, netdev, dst, next_hop),
1032 TP_STRUCT__entry(
1033 WIPHY_ENTRY
1034 NETDEV_ENTRY
1035 MAC_ENTRY(dst)
1036 MAC_ENTRY(next_hop)
1037 ),
1038 TP_fast_assign(
1039 WIPHY_ASSIGN;
1040 NETDEV_ASSIGN;
1041 MAC_ASSIGN(dst, dst);
1042 MAC_ASSIGN(next_hop, next_hop);
1043 ),
3d9c3617
JB
1044 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: %pM, next hop: %pM",
1045 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->dst,
1046 __entry->next_hop)
14e8a3c4
BL
1047);
1048
1049DEFINE_EVENT(mpath_evt, rdev_add_mpath,
1050 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
1051 u8 *next_hop),
1052 TP_ARGS(wiphy, netdev, dst, next_hop)
1053);
1054
1055DEFINE_EVENT(mpath_evt, rdev_change_mpath,
1056 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
1057 u8 *next_hop),
1058 TP_ARGS(wiphy, netdev, dst, next_hop)
1059);
1060
1061DEFINE_EVENT(mpath_evt, rdev_get_mpath,
1062 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
1063 u8 *next_hop),
1064 TP_ARGS(wiphy, netdev, dst, next_hop)
1065);
1066
1067TRACE_EVENT(rdev_dump_mpath,
aaaa10e0 1068 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
14e8a3c4 1069 u8 *dst, u8 *next_hop),
aaaa10e0 1070 TP_ARGS(wiphy, netdev, _idx, dst, next_hop),
14e8a3c4
BL
1071 TP_STRUCT__entry(
1072 WIPHY_ENTRY
1073 NETDEV_ENTRY
1074 MAC_ENTRY(dst)
1075 MAC_ENTRY(next_hop)
1076 __field(int, idx)
1077 ),
1078 TP_fast_assign(
1079 WIPHY_ASSIGN;
1080 NETDEV_ASSIGN;
1081 MAC_ASSIGN(dst, dst);
1082 MAC_ASSIGN(next_hop, next_hop);
aaaa10e0 1083 __entry->idx = _idx;
14e8a3c4 1084 ),
3d9c3617
JB
1085 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: %pM, next hop: %pM",
1086 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, __entry->dst,
1087 __entry->next_hop)
14e8a3c4
BL
1088);
1089
66be7d2b
HR
1090TRACE_EVENT(rdev_get_mpp,
1091 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1092 u8 *dst, u8 *mpp),
1093 TP_ARGS(wiphy, netdev, dst, mpp),
1094 TP_STRUCT__entry(
1095 WIPHY_ENTRY
1096 NETDEV_ENTRY
1097 MAC_ENTRY(dst)
1098 MAC_ENTRY(mpp)
1099 ),
1100 TP_fast_assign(
1101 WIPHY_ASSIGN;
1102 NETDEV_ASSIGN;
1103 MAC_ASSIGN(dst, dst);
1104 MAC_ASSIGN(mpp, mpp);
1105 ),
3d9c3617
JB
1106 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: %pM"
1107 ", mpp: %pM", WIPHY_PR_ARG, NETDEV_PR_ARG,
1108 __entry->dst, __entry->mpp)
66be7d2b
HR
1109);
1110
1111TRACE_EVENT(rdev_dump_mpp,
aaaa10e0 1112 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
66be7d2b 1113 u8 *dst, u8 *mpp),
ec50f311 1114 TP_ARGS(wiphy, netdev, _idx, dst, mpp),
66be7d2b
HR
1115 TP_STRUCT__entry(
1116 WIPHY_ENTRY
1117 NETDEV_ENTRY
1118 MAC_ENTRY(dst)
1119 MAC_ENTRY(mpp)
1120 __field(int, idx)
1121 ),
1122 TP_fast_assign(
1123 WIPHY_ASSIGN;
1124 NETDEV_ASSIGN;
1125 MAC_ASSIGN(dst, dst);
1126 MAC_ASSIGN(mpp, mpp);
aaaa10e0 1127 __entry->idx = _idx;
66be7d2b 1128 ),
3d9c3617
JB
1129 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: %pM, mpp: %pM",
1130 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, __entry->dst,
1131 __entry->mpp)
66be7d2b
HR
1132);
1133
14e8a3c4
BL
1134TRACE_EVENT(rdev_return_int_mpath_info,
1135 TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo),
1136 TP_ARGS(wiphy, ret, pinfo),
1137 TP_STRUCT__entry(
1138 WIPHY_ENTRY
1139 __field(int, ret)
1140 __field(int, generation)
1141 __field(u32, filled)
1142 __field(u32, frame_qlen)
1143 __field(u32, sn)
1144 __field(u32, metric)
1145 __field(u32, exptime)
1146 __field(u32, discovery_timeout)
1147 __field(u8, discovery_retries)
1148 __field(u8, flags)
1149 ),
1150 TP_fast_assign(
1151 WIPHY_ASSIGN;
1152 __entry->ret = ret;
1153 __entry->generation = pinfo->generation;
1154 __entry->filled = pinfo->filled;
1155 __entry->frame_qlen = pinfo->frame_qlen;
1156 __entry->sn = pinfo->sn;
1157 __entry->metric = pinfo->metric;
1158 __entry->exptime = pinfo->exptime;
1159 __entry->discovery_timeout = pinfo->discovery_timeout;
1160 __entry->discovery_retries = pinfo->discovery_retries;
1161 __entry->flags = pinfo->flags;
1162 ),
1163 TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, "
1164 "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
b2edc721 1165 " discovery timeout: %u, discovery retries: %u, flags: 0x%x",
14e8a3c4
BL
1166 WIPHY_PR_ARG, __entry->ret, __entry->generation,
1167 __entry->filled, __entry->frame_qlen, __entry->sn,
1168 __entry->metric, __entry->exptime, __entry->discovery_timeout,
1169 __entry->discovery_retries, __entry->flags)
1170);
1171
1172TRACE_EVENT(rdev_return_int_mesh_config,
1173 TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf),
1174 TP_ARGS(wiphy, ret, conf),
1175 TP_STRUCT__entry(
1176 WIPHY_ENTRY
1177 MESH_CFG_ENTRY
1178 __field(int, ret)
1179 ),
1180 TP_fast_assign(
1181 WIPHY_ASSIGN;
1182 MESH_CFG_ASSIGN;
1183 __entry->ret = ret;
1184 ),
1185 TP_printk(WIPHY_PR_FMT ", returned: %d",
1186 WIPHY_PR_ARG, __entry->ret)
1187);
1188
1189TRACE_EVENT(rdev_update_mesh_config,
1190 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
1191 const struct mesh_config *conf),
1192 TP_ARGS(wiphy, netdev, mask, conf),
1193 TP_STRUCT__entry(
1194 WIPHY_ENTRY
1195 NETDEV_ENTRY
1196 MESH_CFG_ENTRY
1197 __field(u32, mask)
1198 ),
1199 TP_fast_assign(
1200 WIPHY_ASSIGN;
1201 NETDEV_ASSIGN;
1202 MESH_CFG_ASSIGN;
1203 __entry->mask = mask;
1204 ),
ec816087 1205 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u",
14e8a3c4
BL
1206 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
1207);
1208
1209TRACE_EVENT(rdev_join_mesh,
1210 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1211 const struct mesh_config *conf,
1212 const struct mesh_setup *setup),
1213 TP_ARGS(wiphy, netdev, conf, setup),
1214 TP_STRUCT__entry(
1215 WIPHY_ENTRY
1216 NETDEV_ENTRY
1217 MESH_CFG_ENTRY
1218 ),
1219 TP_fast_assign(
1220 WIPHY_ASSIGN;
1221 NETDEV_ASSIGN;
1222 MESH_CFG_ASSIGN;
1223 ),
ec816087 1224 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
14e8a3c4
BL
1225 WIPHY_PR_ARG, NETDEV_PR_ARG)
1226);
1227
1228TRACE_EVENT(rdev_change_bss,
1229 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1230 struct bss_parameters *params),
1231 TP_ARGS(wiphy, netdev, params),
1232 TP_STRUCT__entry(
1233 WIPHY_ENTRY
1234 NETDEV_ENTRY
1235 __field(int, use_cts_prot)
1236 __field(int, use_short_preamble)
1237 __field(int, use_short_slot_time)
1238 __field(int, ap_isolate)
1239 __field(int, ht_opmode)
1240 ),
1241 TP_fast_assign(
1242 WIPHY_ASSIGN;
1243 NETDEV_ASSIGN;
1244 __entry->use_cts_prot = params->use_cts_prot;
1245 __entry->use_short_preamble = params->use_short_preamble;
1246 __entry->use_short_slot_time = params->use_short_slot_time;
1247 __entry->ap_isolate = params->ap_isolate;
1248 __entry->ht_opmode = params->ht_opmode;
1249 ),
ec816087 1250 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, "
14e8a3c4
BL
1251 "use short preamble: %d, use short slot time: %d, "
1252 "ap isolate: %d, ht opmode: %d",
1253 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot,
1254 __entry->use_short_preamble, __entry->use_short_slot_time,
1255 __entry->ap_isolate, __entry->ht_opmode)
1256);
1257
5db25290
BB
1258TRACE_EVENT(rdev_inform_bss,
1259 TP_PROTO(struct wiphy *wiphy, struct cfg80211_bss *bss),
1260 TP_ARGS(wiphy, bss),
1261 TP_STRUCT__entry(
1262 WIPHY_ENTRY
1263 MAC_ENTRY(bssid)
1264 CHAN_ENTRY
1265 ),
1266 TP_fast_assign(
1267 WIPHY_ASSIGN;
1268 MAC_ASSIGN(bssid, bss->bssid);
1269 CHAN_ASSIGN(bss->channel);
1270 ),
1271 TP_printk(WIPHY_PR_FMT ", %pM, " CHAN_PR_FMT,
1272 WIPHY_PR_ARG, __entry->bssid, CHAN_PR_ARG)
1273);
1274
14e8a3c4
BL
1275TRACE_EVENT(rdev_set_txq_params,
1276 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1277 struct ieee80211_txq_params *params),
1278 TP_ARGS(wiphy, netdev, params),
1279 TP_STRUCT__entry(
1280 WIPHY_ENTRY
1281 NETDEV_ENTRY
1282 __field(enum nl80211_ac, ac)
1283 __field(u16, txop)
1284 __field(u16, cwmin)
1285 __field(u16, cwmax)
1286 __field(u8, aifs)
1287 ),
1288 TP_fast_assign(
1289 WIPHY_ASSIGN;
1290 NETDEV_ASSIGN;
1291 __entry->ac = params->ac;
1292 __entry->txop = params->txop;
1293 __entry->cwmin = params->cwmin;
1294 __entry->cwmax = params->cwmax;
1295 __entry->aifs = params->aifs;
1296 ),
ec816087 1297 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u",
14e8a3c4
BL
1298 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop,
1299 __entry->cwmin, __entry->cwmax, __entry->aifs)
1300);
1301
1302TRACE_EVENT(rdev_libertas_set_mesh_channel,
1303 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1304 struct ieee80211_channel *chan),
1305 TP_ARGS(wiphy, netdev, chan),
1306 TP_STRUCT__entry(
1307 WIPHY_ENTRY
1308 NETDEV_ENTRY
1309 CHAN_ENTRY
1310 ),
1311 TP_fast_assign(
1312 WIPHY_ASSIGN;
1313 NETDEV_ASSIGN;
1314 CHAN_ASSIGN(chan);
1315 ),
ec816087 1316 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG,
14e8a3c4
BL
1317 NETDEV_PR_ARG, CHAN_PR_ARG)
1318);
1319
1320TRACE_EVENT(rdev_set_monitor_channel,
9c4f8309 1321 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
683b6d3b 1322 struct cfg80211_chan_def *chandef),
9c4f8309 1323 TP_ARGS(wiphy, netdev, chandef),
14e8a3c4
BL
1324 TP_STRUCT__entry(
1325 WIPHY_ENTRY
9c4f8309 1326 NETDEV_ENTRY
683b6d3b 1327 CHAN_DEF_ENTRY
14e8a3c4
BL
1328 ),
1329 TP_fast_assign(
1330 WIPHY_ASSIGN;
9c4f8309 1331 NETDEV_ASSIGN;
683b6d3b 1332 CHAN_DEF_ASSIGN(chandef);
14e8a3c4 1333 ),
9c4f8309
FF
1334 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
1335 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
14e8a3c4
BL
1336);
1337
1338TRACE_EVENT(rdev_auth,
1339 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1340 struct cfg80211_auth_request *req),
1341 TP_ARGS(wiphy, netdev, req),
1342 TP_STRUCT__entry(
1343 WIPHY_ENTRY
1344 NETDEV_ENTRY
1345 MAC_ENTRY(bssid)
1346 __field(enum nl80211_auth_type, auth_type)
1347 ),
1348 TP_fast_assign(
1349 WIPHY_ASSIGN;
1350 NETDEV_ASSIGN;
1351 if (req->bss)
1352 MAC_ASSIGN(bssid, req->bss->bssid);
1353 else
d2beae10 1354 eth_zero_addr(__entry->bssid);
14e8a3c4
BL
1355 __entry->auth_type = req->auth_type;
1356 ),
3d9c3617 1357 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: %pM",
14e8a3c4 1358 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type,
3d9c3617 1359 __entry->bssid)
14e8a3c4
BL
1360);
1361
1362TRACE_EVENT(rdev_assoc,
1363 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1d4c0f04
JB
1364 struct cfg80211_assoc_request *req),
1365 TP_ARGS(wiphy, netdev, req),
14e8a3c4
BL
1366 TP_STRUCT__entry(
1367 WIPHY_ENTRY
1368 NETDEV_ENTRY
1369 MAC_ENTRY(bssid)
1370 MAC_ENTRY(prev_bssid)
1371 __field(bool, use_mfp)
1372 __field(u32, flags)
64a87472
JB
1373 __dynamic_array(u8, elements, req->ie_len)
1374 __array(u8, ht_capa, sizeof(struct ieee80211_ht_cap))
1375 __array(u8, ht_capa_mask, sizeof(struct ieee80211_ht_cap))
1376 __array(u8, vht_capa, sizeof(struct ieee80211_vht_cap))
1377 __array(u8, vht_capa_mask, sizeof(struct ieee80211_vht_cap))
1378 __dynamic_array(u8, fils_kek, req->fils_kek_len)
1379 __dynamic_array(u8, fils_nonces,
1380 req->fils_nonces ? 2 * FILS_NONCE_LEN : 0)
96924137 1381 __field(u16, ext_mld_capa_ops)
14e8a3c4
BL
1382 ),
1383 TP_fast_assign(
1384 WIPHY_ASSIGN;
1385 NETDEV_ASSIGN;
1386 if (req->bss)
1387 MAC_ASSIGN(bssid, req->bss->bssid);
1388 else
d2beae10 1389 eth_zero_addr(__entry->bssid);
14e8a3c4
BL
1390 MAC_ASSIGN(prev_bssid, req->prev_bssid);
1391 __entry->use_mfp = req->use_mfp;
1392 __entry->flags = req->flags;
64a87472
JB
1393 if (req->ie)
1394 memcpy(__get_dynamic_array(elements),
1395 req->ie, req->ie_len);
1396 memcpy(__entry->ht_capa, &req->ht_capa, sizeof(req->ht_capa));
1397 memcpy(__entry->ht_capa_mask, &req->ht_capa_mask,
1398 sizeof(req->ht_capa_mask));
1399 memcpy(__entry->vht_capa, &req->vht_capa, sizeof(req->vht_capa));
1400 memcpy(__entry->vht_capa_mask, &req->vht_capa_mask,
1401 sizeof(req->vht_capa_mask));
1402 if (req->fils_kek)
1403 memcpy(__get_dynamic_array(fils_kek),
1404 req->fils_kek, req->fils_kek_len);
1405 if (req->fils_nonces)
1406 memcpy(__get_dynamic_array(fils_nonces),
1407 req->fils_nonces, 2 * FILS_NONCE_LEN);
96924137 1408 __entry->ext_mld_capa_ops = req->ext_mld_capa_ops;
14e8a3c4 1409 ),
3d9c3617 1410 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: %pM"
b2edc721 1411 ", previous bssid: %pM, use mfp: %s, flags: 0x%x",
3d9c3617
JB
1412 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->bssid,
1413 __entry->prev_bssid, BOOL_TO_STR(__entry->use_mfp),
14e8a3c4
BL
1414 __entry->flags)
1415);
1416
1417TRACE_EVENT(rdev_deauth,
1418 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1419 struct cfg80211_deauth_request *req),
1420 TP_ARGS(wiphy, netdev, req),
1421 TP_STRUCT__entry(
1422 WIPHY_ENTRY
1423 NETDEV_ENTRY
1424 MAC_ENTRY(bssid)
1425 __field(u16, reason_code)
e406f291 1426 __field(bool, local_state_change)
14e8a3c4
BL
1427 ),
1428 TP_fast_assign(
1429 WIPHY_ASSIGN;
1430 NETDEV_ASSIGN;
1431 MAC_ASSIGN(bssid, req->bssid);
1432 __entry->reason_code = req->reason_code;
e406f291 1433 __entry->local_state_change = req->local_state_change;
14e8a3c4 1434 ),
e406f291 1435 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: %pM, reason: %u, local_state_change:%d",
3d9c3617 1436 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->bssid,
e406f291 1437 __entry->reason_code, __entry->local_state_change)
14e8a3c4
BL
1438);
1439
1440TRACE_EVENT(rdev_disassoc,
1441 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1442 struct cfg80211_disassoc_request *req),
1443 TP_ARGS(wiphy, netdev, req),
1444 TP_STRUCT__entry(
1445 WIPHY_ENTRY
1446 NETDEV_ENTRY
1447 MAC_ENTRY(bssid)
1448 __field(u16, reason_code)
1449 __field(bool, local_state_change)
1450 ),
1451 TP_fast_assign(
1452 WIPHY_ASSIGN;
1453 NETDEV_ASSIGN;
8f6e0dfc 1454 MAC_ASSIGN(bssid, req->ap_addr);
14e8a3c4
BL
1455 __entry->reason_code = req->reason_code;
1456 __entry->local_state_change = req->local_state_change;
1457 ),
3d9c3617 1458 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: %pM"
14e8a3c4 1459 ", reason: %u, local state change: %s",
3d9c3617 1460 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->bssid,
14e8a3c4
BL
1461 __entry->reason_code,
1462 BOOL_TO_STR(__entry->local_state_change))
1463);
1464
1465TRACE_EVENT(rdev_mgmt_tx_cancel_wait,
1466 TP_PROTO(struct wiphy *wiphy,
1467 struct wireless_dev *wdev, u64 cookie),
1468 TP_ARGS(wiphy, wdev, cookie),
1469 TP_STRUCT__entry(
1470 WIPHY_ENTRY
1471 WDEV_ENTRY
1472 __field(u64, cookie)
1473 ),
1474 TP_fast_assign(
1475 WIPHY_ASSIGN;
1476 WDEV_ASSIGN;
1477 __entry->cookie = cookie;
1478 ),
ec816087 1479 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ",
14e8a3c4
BL
1480 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1481);
1482
1483TRACE_EVENT(rdev_set_power_mgmt,
1484 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1485 bool enabled, int timeout),
1486 TP_ARGS(wiphy, netdev, enabled, timeout),
1487 TP_STRUCT__entry(
1488 WIPHY_ENTRY
1489 NETDEV_ENTRY
1490 __field(bool, enabled)
1491 __field(int, timeout)
1492 ),
1493 TP_fast_assign(
1494 WIPHY_ASSIGN;
1495 NETDEV_ASSIGN;
1496 __entry->enabled = enabled;
1497 __entry->timeout = timeout;
1498 ),
ec816087 1499 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ",
14e8a3c4
BL
1500 WIPHY_PR_ARG, NETDEV_PR_ARG,
1501 __entry->enabled ? "" : "not ", __entry->timeout)
1502);
1503
1504TRACE_EVENT(rdev_connect,
1505 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1506 struct cfg80211_connect_params *sme),
1507 TP_ARGS(wiphy, netdev, sme),
1508 TP_STRUCT__entry(
1509 WIPHY_ENTRY
1510 NETDEV_ENTRY
1511 MAC_ENTRY(bssid)
1512 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1513 __field(enum nl80211_auth_type, auth_type)
1514 __field(bool, privacy)
1515 __field(u32, wpa_versions)
1516 __field(u32, flags)
ba6fbacf 1517 MAC_ENTRY(prev_bssid)
14e8a3c4
BL
1518 ),
1519 TP_fast_assign(
1520 WIPHY_ASSIGN;
1521 NETDEV_ASSIGN;
1522 MAC_ASSIGN(bssid, sme->bssid);
1523 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1524 memcpy(__entry->ssid, sme->ssid, sme->ssid_len);
1525 __entry->auth_type = sme->auth_type;
1526 __entry->privacy = sme->privacy;
1527 __entry->wpa_versions = sme->crypto.wpa_versions;
1528 __entry->flags = sme->flags;
ba6fbacf 1529 MAC_ASSIGN(prev_bssid, sme->prev_bssid);
14e8a3c4 1530 ),
3d9c3617 1531 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: %pM"
14e8a3c4 1532 ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
b2edc721 1533 "flags: 0x%x, previous bssid: %pM",
3d9c3617 1534 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->bssid, __entry->ssid,
14e8a3c4 1535 __entry->auth_type, BOOL_TO_STR(__entry->privacy),
3d9c3617 1536 __entry->wpa_versions, __entry->flags, __entry->prev_bssid)
14e8a3c4
BL
1537);
1538
088e8df8 1539TRACE_EVENT(rdev_update_connect_params,
1540 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1541 struct cfg80211_connect_params *sme, u32 changed),
1542 TP_ARGS(wiphy, netdev, sme, changed),
1543 TP_STRUCT__entry(
1544 WIPHY_ENTRY
1545 NETDEV_ENTRY
1546 __field(u32, changed)
1547 ),
1548 TP_fast_assign(
1549 WIPHY_ASSIGN;
1550 NETDEV_ASSIGN;
1551 __entry->changed = changed;
1552 ),
1553 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", parameters changed: %u",
1554 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->changed)
1555);
1556
14e8a3c4
BL
1557TRACE_EVENT(rdev_set_cqm_rssi_config,
1558 TP_PROTO(struct wiphy *wiphy,
1559 struct net_device *netdev, s32 rssi_thold,
1560 u32 rssi_hyst),
1561 TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
1562 TP_STRUCT__entry(
1563 WIPHY_ENTRY
1564 NETDEV_ENTRY
1565 __field(s32, rssi_thold)
1566 __field(u32, rssi_hyst)
1567 ),
1568 TP_fast_assign(
1569 WIPHY_ASSIGN;
1570 NETDEV_ASSIGN;
1571 __entry->rssi_thold = rssi_thold;
1572 __entry->rssi_hyst = rssi_hyst;
1573 ),
ec816087 1574 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
14e8a3c4
BL
1575 ", rssi_thold: %d, rssi_hyst: %u ",
1576 WIPHY_PR_ARG, NETDEV_PR_ARG,
1577 __entry->rssi_thold, __entry->rssi_hyst)
1578);
1579
4a4b8169
AZ
1580TRACE_EVENT(rdev_set_cqm_rssi_range_config,
1581 TP_PROTO(struct wiphy *wiphy,
1582 struct net_device *netdev, s32 low, s32 high),
1583 TP_ARGS(wiphy, netdev, low, high),
1584 TP_STRUCT__entry(
1585 WIPHY_ENTRY
1586 NETDEV_ENTRY
1587 __field(s32, rssi_low)
1588 __field(s32, rssi_high)
1589 ),
1590 TP_fast_assign(
1591 WIPHY_ASSIGN;
1592 NETDEV_ASSIGN;
1593 __entry->rssi_low = low;
1594 __entry->rssi_high = high;
1595 ),
1596 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
1597 ", range: %d - %d ",
1598 WIPHY_PR_ARG, NETDEV_PR_ARG,
1599 __entry->rssi_low, __entry->rssi_high)
1600);
1601
14e8a3c4
BL
1602TRACE_EVENT(rdev_set_cqm_txe_config,
1603 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
1604 u32 pkts, u32 intvl),
1605 TP_ARGS(wiphy, netdev, rate, pkts, intvl),
1606 TP_STRUCT__entry(
1607 WIPHY_ENTRY
1608 NETDEV_ENTRY
1609 __field(u32, rate)
1610 __field(u32, pkts)
1611 __field(u32, intvl)
1612 ),
1613 TP_fast_assign(
1614 WIPHY_ASSIGN;
1615 NETDEV_ASSIGN;
1616 __entry->rate = rate;
1617 __entry->pkts = pkts;
1618 __entry->intvl = intvl;
1619 ),
ec816087 1620 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
14e8a3c4
BL
1621 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
1622 __entry->intvl)
1623);
1624
1625TRACE_EVENT(rdev_disconnect,
1626 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1627 u16 reason_code),
1628 TP_ARGS(wiphy, netdev, reason_code),
1629 TP_STRUCT__entry(
1630 WIPHY_ENTRY
1631 NETDEV_ENTRY
1632 __field(u16, reason_code)
1633 ),
1634 TP_fast_assign(
1635 WIPHY_ASSIGN;
1636 NETDEV_ASSIGN;
1637 __entry->reason_code = reason_code;
1638 ),
ec816087 1639 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
14e8a3c4
BL
1640 NETDEV_PR_ARG, __entry->reason_code)
1641);
1642
1643TRACE_EVENT(rdev_join_ibss,
1644 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1645 struct cfg80211_ibss_params *params),
1646 TP_ARGS(wiphy, netdev, params),
1647 TP_STRUCT__entry(
1648 WIPHY_ENTRY
1649 NETDEV_ENTRY
1650 MAC_ENTRY(bssid)
1651 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1652 ),
1653 TP_fast_assign(
1654 WIPHY_ASSIGN;
1655 NETDEV_ASSIGN;
1656 MAC_ASSIGN(bssid, params->bssid);
1657 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1658 memcpy(__entry->ssid, params->ssid, params->ssid_len);
1659 ),
3d9c3617
JB
1660 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: %pM, ssid: %s",
1661 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->bssid, __entry->ssid)
14e8a3c4
BL
1662);
1663
6e0bd6c3
RL
1664TRACE_EVENT(rdev_join_ocb,
1665 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1666 const struct ocb_setup *setup),
1667 TP_ARGS(wiphy, netdev, setup),
1668 TP_STRUCT__entry(
1669 WIPHY_ENTRY
1670 NETDEV_ENTRY
1671 ),
1672 TP_fast_assign(
1673 WIPHY_ASSIGN;
1674 NETDEV_ASSIGN;
1675 ),
1676 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
1677 WIPHY_PR_ARG, NETDEV_PR_ARG)
1678);
1679
14e8a3c4
BL
1680TRACE_EVENT(rdev_set_wiphy_params,
1681 TP_PROTO(struct wiphy *wiphy, u32 changed),
1682 TP_ARGS(wiphy, changed),
1683 TP_STRUCT__entry(
1684 WIPHY_ENTRY
1685 __field(u32, changed)
1686 ),
1687 TP_fast_assign(
1688 WIPHY_ASSIGN;
1689 __entry->changed = changed;
1690 ),
1691 TP_printk(WIPHY_PR_FMT ", changed: %u",
1692 WIPHY_PR_ARG, __entry->changed)
1693);
1694
7a53af85
RS
1695DECLARE_EVENT_CLASS(wiphy_wdev_link_evt,
1696 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1697 unsigned int link_id),
1698 TP_ARGS(wiphy, wdev, link_id),
1699 TP_STRUCT__entry(
1700 WIPHY_ENTRY
1701 WDEV_ENTRY
1702 __field(unsigned int, link_id)
1703 ),
1704 TP_fast_assign(
1705 WIPHY_ASSIGN;
1706 WDEV_ASSIGN;
1707 __entry->link_id = link_id;
1708 ),
1709 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", link_id: %u",
1710 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->link_id)
1711);
1712
1713DEFINE_EVENT(wiphy_wdev_link_evt, rdev_get_tx_power,
1714 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1715 unsigned int link_id),
1716 TP_ARGS(wiphy, wdev, link_id)
c8442118
JB
1717);
1718
14e8a3c4 1719TRACE_EVENT(rdev_set_tx_power,
c8442118
JB
1720 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1721 enum nl80211_tx_power_setting type, int mbm),
1722 TP_ARGS(wiphy, wdev, type, mbm),
14e8a3c4
BL
1723 TP_STRUCT__entry(
1724 WIPHY_ENTRY
c8442118 1725 WDEV_ENTRY
14e8a3c4
BL
1726 __field(enum nl80211_tx_power_setting, type)
1727 __field(int, mbm)
1728 ),
1729 TP_fast_assign(
1730 WIPHY_ASSIGN;
c8442118 1731 WDEV_ASSIGN;
14e8a3c4
BL
1732 __entry->type = type;
1733 __entry->mbm = mbm;
1734 ),
ec816087 1735 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
c8442118 1736 WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
14e8a3c4
BL
1737);
1738
1739TRACE_EVENT(rdev_return_int_int,
1740 TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
1741 TP_ARGS(wiphy, func_ret, func_fill),
1742 TP_STRUCT__entry(
1743 WIPHY_ENTRY
1744 __field(int, func_ret)
1745 __field(int, func_fill)
1746 ),
1747 TP_fast_assign(
1748 WIPHY_ASSIGN;
1749 __entry->func_ret = func_ret;
1750 __entry->func_fill = func_fill;
1751 ),
1752 TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
1753 WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
1754);
1755
1756#ifdef CONFIG_NL80211_TESTMODE
1757TRACE_EVENT(rdev_testmode_cmd,
fc73f11f
DS
1758 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1759 TP_ARGS(wiphy, wdev),
14e8a3c4
BL
1760 TP_STRUCT__entry(
1761 WIPHY_ENTRY
fc73f11f 1762 WDEV_ENTRY
14e8a3c4
BL
1763 ),
1764 TP_fast_assign(
1765 WIPHY_ASSIGN;
fc73f11f 1766 WDEV_ASSIGN;
14e8a3c4 1767 ),
fc73f11f 1768 TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
14e8a3c4
BL
1769);
1770
1771TRACE_EVENT(rdev_testmode_dump,
1772 TP_PROTO(struct wiphy *wiphy),
1773 TP_ARGS(wiphy),
1774 TP_STRUCT__entry(
1775 WIPHY_ENTRY
1776 ),
1777 TP_fast_assign(
1778 WIPHY_ASSIGN;
1779 ),
1780 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
1781);
1782#endif /* CONFIG_NL80211_TESTMODE */
1783
1784TRACE_EVENT(rdev_set_bitrate_mask,
1785 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
7b0a0e3c 1786 unsigned int link_id,
14e8a3c4 1787 const u8 *peer, const struct cfg80211_bitrate_mask *mask),
7b0a0e3c 1788 TP_ARGS(wiphy, netdev, link_id, peer, mask),
14e8a3c4
BL
1789 TP_STRUCT__entry(
1790 WIPHY_ENTRY
1791 NETDEV_ENTRY
7b0a0e3c 1792 __field(unsigned int, link_id)
14e8a3c4
BL
1793 MAC_ENTRY(peer)
1794 ),
1795 TP_fast_assign(
1796 WIPHY_ASSIGN;
1797 NETDEV_ASSIGN;
7b0a0e3c 1798 __entry->link_id = link_id;
14e8a3c4
BL
1799 MAC_ASSIGN(peer, peer);
1800 ),
3d9c3617 1801 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", link_id: %d, peer: %pM",
7b0a0e3c 1802 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->link_id,
3d9c3617 1803 __entry->peer)
14e8a3c4
BL
1804);
1805
6cd536fe 1806TRACE_EVENT(rdev_update_mgmt_frame_registrations,
14e8a3c4 1807 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
6cd536fe
JB
1808 struct mgmt_frame_regs *upd),
1809 TP_ARGS(wiphy, wdev, upd),
14e8a3c4
BL
1810 TP_STRUCT__entry(
1811 WIPHY_ENTRY
1812 WDEV_ENTRY
6cd536fe
JB
1813 __field(u16, global_stypes)
1814 __field(u16, interface_stypes)
14e8a3c4
BL
1815 ),
1816 TP_fast_assign(
1817 WIPHY_ASSIGN;
1818 WDEV_ASSIGN;
6cd536fe
JB
1819 __entry->global_stypes = upd->global_stypes;
1820 __entry->interface_stypes = upd->interface_stypes;
14e8a3c4 1821 ),
6cd536fe
JB
1822 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", global: 0x%.2x, intf: 0x%.2x",
1823 WIPHY_PR_ARG, WDEV_PR_ARG,
1824 __entry->global_stypes, __entry->interface_stypes)
14e8a3c4
BL
1825);
1826
1827TRACE_EVENT(rdev_return_int_tx_rx,
1828 TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
1829 TP_ARGS(wiphy, ret, tx, rx),
1830 TP_STRUCT__entry(
1831 WIPHY_ENTRY
1832 __field(int, ret)
1833 __field(u32, tx)
1834 __field(u32, rx)
1835 ),
1836 TP_fast_assign(
1837 WIPHY_ASSIGN;
1838 __entry->ret = ret;
1839 __entry->tx = tx;
1840 __entry->rx = rx;
1841 ),
1842 TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
1843 WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
1844);
1845
1846TRACE_EVENT(rdev_return_void_tx_rx,
1847 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
1848 u32 rx, u32 rx_max),
1849 TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
1850 TP_STRUCT__entry(
1851 WIPHY_ENTRY
1852 __field(u32, tx)
1853 __field(u32, tx_max)
1854 __field(u32, rx)
1855 __field(u32, rx_max)
1856 ),
1857 TP_fast_assign(
1858 WIPHY_ASSIGN;
1859 __entry->tx = tx;
1860 __entry->tx_max = tx_max;
1861 __entry->rx = rx;
1862 __entry->rx_max = rx_max;
1863 ),
1864 TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
1865 WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
1866 __entry->rx_max)
1867);
1868
1869DECLARE_EVENT_CLASS(tx_rx_evt,
1870 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
9ef36997 1871 TP_ARGS(wiphy, tx, rx),
14e8a3c4
BL
1872 TP_STRUCT__entry(
1873 WIPHY_ENTRY
1874 __field(u32, tx)
1875 __field(u32, rx)
1876 ),
1877 TP_fast_assign(
1878 WIPHY_ASSIGN;
1879 __entry->tx = tx;
1880 __entry->rx = rx;
1881 ),
1882 TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
1883 WIPHY_PR_ARG, __entry->tx, __entry->rx)
1884);
1885
14e8a3c4
BL
1886DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
1887 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
9ef36997 1888 TP_ARGS(wiphy, tx, rx)
14e8a3c4
BL
1889);
1890
ca986ad9
AVS
1891DECLARE_EVENT_CLASS(wiphy_netdev_id_evt,
1892 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1893 TP_ARGS(wiphy, netdev, id),
14e8a3c4
BL
1894 TP_STRUCT__entry(
1895 WIPHY_ENTRY
1896 NETDEV_ENTRY
ca986ad9 1897 __field(u64, id)
14e8a3c4
BL
1898 ),
1899 TP_fast_assign(
1900 WIPHY_ASSIGN;
1901 NETDEV_ASSIGN;
ca986ad9 1902 __entry->id = id;
14e8a3c4 1903 ),
ca986ad9
AVS
1904 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", id: %llu",
1905 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->id)
1906);
1907
1908DEFINE_EVENT(wiphy_netdev_id_evt, rdev_sched_scan_start,
1909 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1910 TP_ARGS(wiphy, netdev, id)
14e8a3c4
BL
1911);
1912
3a3ecf1d
AVS
1913DEFINE_EVENT(wiphy_netdev_id_evt, rdev_sched_scan_stop,
1914 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1915 TP_ARGS(wiphy, netdev, id)
1916);
1917
14e8a3c4
BL
1918TRACE_EVENT(rdev_tdls_mgmt,
1919 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
c6112046 1920 u8 *peer, int link_id, u8 action_code, u8 dialog_token,
df942e7b 1921 u16 status_code, u32 peer_capability,
31fa97c5 1922 bool initiator, const u8 *buf, size_t len),
c6112046
MS
1923 TP_ARGS(wiphy, netdev, peer, link_id, action_code, dialog_token,
1924 status_code, peer_capability, initiator, buf, len),
14e8a3c4
BL
1925 TP_STRUCT__entry(
1926 WIPHY_ENTRY
1927 NETDEV_ENTRY
1928 MAC_ENTRY(peer)
c6112046 1929 __field(int, link_id)
14e8a3c4
BL
1930 __field(u8, action_code)
1931 __field(u8, dialog_token)
1932 __field(u16, status_code)
df942e7b 1933 __field(u32, peer_capability)
31fa97c5 1934 __field(bool, initiator)
14e8a3c4
BL
1935 __dynamic_array(u8, buf, len)
1936 ),
1937 TP_fast_assign(
1938 WIPHY_ASSIGN;
1939 NETDEV_ASSIGN;
1940 MAC_ASSIGN(peer, peer);
c6112046 1941 __entry->link_id = link_id;
14e8a3c4
BL
1942 __entry->action_code = action_code;
1943 __entry->dialog_token = dialog_token;
1944 __entry->status_code = status_code;
df942e7b 1945 __entry->peer_capability = peer_capability;
31fa97c5 1946 __entry->initiator = initiator;
14e8a3c4
BL
1947 memcpy(__get_dynamic_array(buf), buf, len);
1948 ),
c6112046
MS
1949 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %pM"
1950 ", link_id: %d, action_code: %u "
31fa97c5
AN
1951 "dialog_token: %u, status_code: %u, peer_capability: %u "
1952 "initiator: %s buf: %#.2x ",
3d9c3617 1953 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->peer,
c6112046 1954 __entry->link_id, __entry->action_code, __entry->dialog_token,
df942e7b 1955 __entry->status_code, __entry->peer_capability,
31fa97c5 1956 BOOL_TO_STR(__entry->initiator),
df942e7b 1957 ((u8 *)__get_dynamic_array(buf))[0])
14e8a3c4
BL
1958);
1959
1960TRACE_EVENT(rdev_dump_survey,
aaaa10e0
JB
1961 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx),
1962 TP_ARGS(wiphy, netdev, _idx),
14e8a3c4
BL
1963 TP_STRUCT__entry(
1964 WIPHY_ENTRY
1965 NETDEV_ENTRY
1966 __field(int, idx)
1967 ),
1968 TP_fast_assign(
1969 WIPHY_ASSIGN;
1970 NETDEV_ASSIGN;
aaaa10e0 1971 __entry->idx = _idx;
14e8a3c4 1972 ),
ec816087 1973 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
14e8a3c4
BL
1974 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
1975);
1976
1977TRACE_EVENT(rdev_return_int_survey_info,
1978 TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
1979 TP_ARGS(wiphy, ret, info),
1980 TP_STRUCT__entry(
1981 WIPHY_ENTRY
1982 CHAN_ENTRY
1983 __field(int, ret)
4ed20beb
JB
1984 __field(u64, time)
1985 __field(u64, time_busy)
1986 __field(u64, time_ext_busy)
1987 __field(u64, time_rx)
1988 __field(u64, time_tx)
052536ab 1989 __field(u64, time_scan)
14e8a3c4
BL
1990 __field(u32, filled)
1991 __field(s8, noise)
1992 ),
1993 TP_fast_assign(
1994 WIPHY_ASSIGN;
1995 CHAN_ASSIGN(info->channel);
1996 __entry->ret = ret;
4ed20beb
JB
1997 __entry->time = info->time;
1998 __entry->time_busy = info->time_busy;
1999 __entry->time_ext_busy = info->time_ext_busy;
2000 __entry->time_rx = info->time_rx;
2001 __entry->time_tx = info->time_tx;
052536ab 2002 __entry->time_scan = info->time_scan;
14e8a3c4
BL
2003 __entry->filled = info->filled;
2004 __entry->noise = info->noise;
2005 ),
2006 TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
2007 ", channel time: %llu, channel time busy: %llu, "
2008 "channel time extension busy: %llu, channel time rx: %llu, "
052536ab 2009 "channel time tx: %llu, scan time: %llu, filled: %u, noise: %d",
14e8a3c4 2010 WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
4ed20beb
JB
2011 __entry->time, __entry->time_busy,
2012 __entry->time_ext_busy, __entry->time_rx,
052536ab
JB
2013 __entry->time_tx, __entry->time_scan,
2014 __entry->filled, __entry->noise)
14e8a3c4
BL
2015);
2016
2017TRACE_EVENT(rdev_tdls_oper,
2018 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2019 u8 *peer, enum nl80211_tdls_operation oper),
2020 TP_ARGS(wiphy, netdev, peer, oper),
2021 TP_STRUCT__entry(
2022 WIPHY_ENTRY
2023 NETDEV_ENTRY
2024 MAC_ENTRY(peer)
2025 __field(enum nl80211_tdls_operation, oper)
2026 ),
2027 TP_fast_assign(
2028 WIPHY_ASSIGN;
2029 NETDEV_ASSIGN;
2030 MAC_ASSIGN(peer, peer);
2031 __entry->oper = oper;
2032 ),
3d9c3617
JB
2033 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %pM, oper: %d",
2034 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->peer, __entry->oper)
14e8a3c4
BL
2035);
2036
2037DECLARE_EVENT_CLASS(rdev_pmksa,
2038 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2039 struct cfg80211_pmksa *pmksa),
2040 TP_ARGS(wiphy, netdev, pmksa),
2041 TP_STRUCT__entry(
2042 WIPHY_ENTRY
2043 NETDEV_ENTRY
2044 MAC_ENTRY(bssid)
2045 ),
2046 TP_fast_assign(
2047 WIPHY_ASSIGN;
2048 NETDEV_ASSIGN;
2049 MAC_ASSIGN(bssid, pmksa->bssid);
2050 ),
3d9c3617
JB
2051 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: %pM",
2052 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->bssid)
14e8a3c4
BL
2053);
2054
2055TRACE_EVENT(rdev_probe_client,
2056 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2057 const u8 *peer),
2058 TP_ARGS(wiphy, netdev, peer),
2059 TP_STRUCT__entry(
2060 WIPHY_ENTRY
2061 NETDEV_ENTRY
2062 MAC_ENTRY(peer)
2063 ),
2064 TP_fast_assign(
2065 WIPHY_ASSIGN;
2066 NETDEV_ASSIGN;
2067 MAC_ASSIGN(peer, peer);
2068 ),
3d9c3617
JB
2069 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %pM",
2070 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->peer)
14e8a3c4
BL
2071);
2072
2073DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
2074 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2075 struct cfg80211_pmksa *pmksa),
2076 TP_ARGS(wiphy, netdev, pmksa)
2077);
2078
2079DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
2080 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2081 struct cfg80211_pmksa *pmksa),
2082 TP_ARGS(wiphy, netdev, pmksa)
2083);
2084
2085TRACE_EVENT(rdev_remain_on_channel,
2086 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2087 struct ieee80211_channel *chan,
42d97a59
JB
2088 unsigned int duration),
2089 TP_ARGS(wiphy, wdev, chan, duration),
14e8a3c4
BL
2090 TP_STRUCT__entry(
2091 WIPHY_ENTRY
2092 WDEV_ENTRY
2093 CHAN_ENTRY
14e8a3c4
BL
2094 __field(unsigned int, duration)
2095 ),
2096 TP_fast_assign(
2097 WIPHY_ASSIGN;
2098 WDEV_ASSIGN;
2099 CHAN_ASSIGN(chan);
14e8a3c4
BL
2100 __entry->duration = duration;
2101 ),
ec816087 2102 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
42d97a59 2103 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
14e8a3c4
BL
2104);
2105
2106TRACE_EVENT(rdev_return_int_cookie,
2107 TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
2108 TP_ARGS(wiphy, ret, cookie),
2109 TP_STRUCT__entry(
2110 WIPHY_ENTRY
2111 __field(int, ret)
2112 __field(u64, cookie)
2113 ),
2114 TP_fast_assign(
2115 WIPHY_ASSIGN;
2116 __entry->ret = ret;
2117 __entry->cookie = cookie;
2118 ),
2119 TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
2120 WIPHY_PR_ARG, __entry->ret, __entry->cookie)
2121);
2122
2123TRACE_EVENT(rdev_cancel_remain_on_channel,
2124 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
2125 TP_ARGS(wiphy, wdev, cookie),
2126 TP_STRUCT__entry(
2127 WIPHY_ENTRY
2128 WDEV_ENTRY
2129 __field(u64, cookie)
2130 ),
2131 TP_fast_assign(
2132 WIPHY_ASSIGN;
2133 WDEV_ASSIGN;
2134 __entry->cookie = cookie;
2135 ),
ec816087 2136 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
14e8a3c4
BL
2137 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
2138);
2139
2140TRACE_EVENT(rdev_mgmt_tx,
2141 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
b176e629
AO
2142 struct cfg80211_mgmt_tx_params *params),
2143 TP_ARGS(wiphy, wdev, params),
14e8a3c4
BL
2144 TP_STRUCT__entry(
2145 WIPHY_ENTRY
2146 WDEV_ENTRY
2147 CHAN_ENTRY
2148 __field(bool, offchan)
14e8a3c4
BL
2149 __field(unsigned int, wait)
2150 __field(bool, no_cck)
2151 __field(bool, dont_wait_for_ack)
2152 ),
2153 TP_fast_assign(
2154 WIPHY_ASSIGN;
2155 WDEV_ASSIGN;
b176e629
AO
2156 CHAN_ASSIGN(params->chan);
2157 __entry->offchan = params->offchan;
2158 __entry->wait = params->wait;
2159 __entry->no_cck = params->no_cck;
2160 __entry->dont_wait_for_ack = params->dont_wait_for_ack;
14e8a3c4 2161 ),
ec816087 2162 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
42d97a59 2163 " wait: %u, no cck: %s, dont wait for ack: %s",
14e8a3c4 2164 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
42d97a59 2165 BOOL_TO_STR(__entry->offchan), __entry->wait,
14e8a3c4
BL
2166 BOOL_TO_STR(__entry->no_cck),
2167 BOOL_TO_STR(__entry->dont_wait_for_ack))
2168);
2169
2576a9ac
DK
2170TRACE_EVENT(rdev_tx_control_port,
2171 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
8d74a623 2172 const u8 *buf, size_t len, const u8 *dest, __be16 proto,
67207bab
AO
2173 bool unencrypted, int link_id),
2174 TP_ARGS(wiphy, netdev, buf, len, dest, proto, unencrypted, link_id),
2576a9ac
DK
2175 TP_STRUCT__entry(
2176 WIPHY_ENTRY
2177 NETDEV_ENTRY
2178 MAC_ENTRY(dest)
8d74a623 2179 __field(__be16, proto)
2576a9ac 2180 __field(bool, unencrypted)
67207bab 2181 __field(int, link_id)
2576a9ac
DK
2182 ),
2183 TP_fast_assign(
2184 WIPHY_ASSIGN;
2185 NETDEV_ASSIGN;
2186 MAC_ASSIGN(dest, dest);
8d74a623 2187 __entry->proto = proto;
2576a9ac 2188 __entry->unencrypted = unencrypted;
67207bab 2189 __entry->link_id = link_id;
2576a9ac 2190 ),
3d9c3617 2191 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %pM,"
67207bab 2192 " proto: 0x%x, unencrypted: %s, link: %d",
3d9c3617 2193 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->dest,
8d74a623 2194 be16_to_cpu(__entry->proto),
67207bab
AO
2195 BOOL_TO_STR(__entry->unencrypted),
2196 __entry->link_id)
2576a9ac
DK
2197);
2198
14e8a3c4
BL
2199TRACE_EVENT(rdev_set_noack_map,
2200 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2201 u16 noack_map),
2202 TP_ARGS(wiphy, netdev, noack_map),
2203 TP_STRUCT__entry(
2204 WIPHY_ENTRY
2205 NETDEV_ENTRY
2206 __field(u16, noack_map)
2207 ),
2208 TP_fast_assign(
2209 WIPHY_ASSIGN;
2210 NETDEV_ASSIGN;
2211 __entry->noack_map = noack_map;
2212 ),
ec816087 2213 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
14e8a3c4
BL
2214 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
2215);
f2a0290b
JB
2216DEFINE_EVENT(wiphy_wdev_link_evt, rdev_get_channel,
2217 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2218 unsigned int link_id),
2219 TP_ARGS(wiphy, wdev, link_id)
2220);
2221
683b6d3b
JB
2222TRACE_EVENT(rdev_return_chandef,
2223 TP_PROTO(struct wiphy *wiphy, int ret,
2224 struct cfg80211_chan_def *chandef),
2225 TP_ARGS(wiphy, ret, chandef),
14e8a3c4
BL
2226 TP_STRUCT__entry(
2227 WIPHY_ENTRY
683b6d3b
JB
2228 __field(int, ret)
2229 CHAN_DEF_ENTRY
14e8a3c4
BL
2230 ),
2231 TP_fast_assign(
2232 WIPHY_ASSIGN;
683b6d3b
JB
2233 if (ret == 0)
2234 CHAN_DEF_ASSIGN(chandef);
2235 else
2236 CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
2237 __entry->ret = ret;
14e8a3c4 2238 ),
ec816087 2239 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
683b6d3b 2240 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
14e8a3c4
BL
2241);
2242
eeb126e9
JB
2243DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
2244 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2245 TP_ARGS(wiphy, wdev)
2246);
2247
2248DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
2249 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2250 TP_ARGS(wiphy, wdev)
2251);
2252
cb3b7d87
AB
2253TRACE_EVENT(rdev_start_nan,
2254 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2255 struct cfg80211_nan_conf *conf),
2256 TP_ARGS(wiphy, wdev, conf),
2257 TP_STRUCT__entry(
2258 WIPHY_ENTRY
2259 WDEV_ENTRY
2260 __field(u8, master_pref)
04ae87a5 2261 __field(u8, bands)
cb3b7d87
AB
2262 ),
2263 TP_fast_assign(
2264 WIPHY_ASSIGN;
2265 WDEV_ASSIGN;
2266 __entry->master_pref = conf->master_pref;
8585989d 2267 __entry->bands = conf->bands;
cb3b7d87
AB
2268 ),
2269 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
8585989d 2270 ", master preference: %u, bands: 0x%0x",
cb3b7d87 2271 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
8585989d 2272 __entry->bands)
cb3b7d87
AB
2273);
2274
a5a9dcf2
AB
2275TRACE_EVENT(rdev_nan_change_conf,
2276 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2277 struct cfg80211_nan_conf *conf, u32 changes),
2278 TP_ARGS(wiphy, wdev, conf, changes),
2279 TP_STRUCT__entry(
2280 WIPHY_ENTRY
2281 WDEV_ENTRY
2282 __field(u8, master_pref)
04ae87a5
PZ
2283 __field(u8, bands)
2284 __field(u32, changes)
a5a9dcf2
AB
2285 ),
2286 TP_fast_assign(
2287 WIPHY_ASSIGN;
2288 WDEV_ASSIGN;
2289 __entry->master_pref = conf->master_pref;
8585989d 2290 __entry->bands = conf->bands;
a5a9dcf2
AB
2291 __entry->changes = changes;
2292 ),
2293 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
8585989d 2294 ", master preference: %u, bands: 0x%0x, changes: %x",
a5a9dcf2 2295 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
8585989d 2296 __entry->bands, __entry->changes)
a5a9dcf2
AB
2297);
2298
cb3b7d87
AB
2299DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_nan,
2300 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2301 TP_ARGS(wiphy, wdev)
2302);
2303
a442b761
AB
2304TRACE_EVENT(rdev_add_nan_func,
2305 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2306 const struct cfg80211_nan_func *func),
2307 TP_ARGS(wiphy, wdev, func),
2308 TP_STRUCT__entry(
2309 WIPHY_ENTRY
2310 WDEV_ENTRY
2311 __field(u8, func_type)
2312 __field(u64, cookie)
2313 ),
2314 TP_fast_assign(
2315 WIPHY_ASSIGN;
2316 WDEV_ASSIGN;
2317 __entry->func_type = func->type;
2318 __entry->cookie = func->cookie
2319 ),
2320 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type=%u, cookie=%llu",
2321 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->func_type,
2322 __entry->cookie)
2323);
2324
2325TRACE_EVENT(rdev_del_nan_func,
2326 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2327 u64 cookie),
2328 TP_ARGS(wiphy, wdev, cookie),
2329 TP_STRUCT__entry(
2330 WIPHY_ENTRY
2331 WDEV_ENTRY
2332 __field(u64, cookie)
2333 ),
2334 TP_fast_assign(
2335 WIPHY_ASSIGN;
2336 WDEV_ASSIGN;
2337 __entry->cookie = cookie;
2338 ),
2339 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie=%llu",
2340 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
2341);
2342
77765eaf
VT
2343TRACE_EVENT(rdev_set_mac_acl,
2344 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2345 struct cfg80211_acl_data *params),
2346 TP_ARGS(wiphy, netdev, params),
2347 TP_STRUCT__entry(
2348 WIPHY_ENTRY
2349 NETDEV_ENTRY
2350 __field(u32, acl_policy)
2351 ),
2352 TP_fast_assign(
2353 WIPHY_ASSIGN;
021fcdc1 2354 NETDEV_ASSIGN;
77765eaf
VT
2355 __entry->acl_policy = params->acl_policy;
2356 ),
2357 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
2358 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
2359);
2360
355199e0
JM
2361TRACE_EVENT(rdev_update_ft_ies,
2362 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2363 struct cfg80211_update_ft_ies_params *ftie),
2364 TP_ARGS(wiphy, netdev, ftie),
2365 TP_STRUCT__entry(
2366 WIPHY_ENTRY
2367 NETDEV_ENTRY
2368 __field(u16, md)
2369 __dynamic_array(u8, ie, ftie->ie_len)
2370 ),
2371 TP_fast_assign(
2372 WIPHY_ASSIGN;
2373 NETDEV_ASSIGN;
2374 __entry->md = ftie->md;
2375 memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
2376 ),
2377 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
2378 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
2379);
2380
5de17984
AS
2381TRACE_EVENT(rdev_crit_proto_start,
2382 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2383 enum nl80211_crit_proto_id protocol, u16 duration),
2384 TP_ARGS(wiphy, wdev, protocol, duration),
2385 TP_STRUCT__entry(
2386 WIPHY_ENTRY
2387 WDEV_ENTRY
2388 __field(u16, proto)
2389 __field(u16, duration)
2390 ),
2391 TP_fast_assign(
2392 WIPHY_ASSIGN;
2393 WDEV_ASSIGN;
2394 __entry->proto = protocol;
2395 __entry->duration = duration;
2396 ),
2397 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
2398 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
2399);
2400
2401TRACE_EVENT(rdev_crit_proto_stop,
2402 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2403 TP_ARGS(wiphy, wdev),
2404 TP_STRUCT__entry(
2405 WIPHY_ENTRY
2406 WDEV_ENTRY
2407 ),
2408 TP_fast_assign(
2409 WIPHY_ASSIGN;
2410 WDEV_ASSIGN;
2411 ),
2412 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
2413 WIPHY_PR_ARG, WDEV_PR_ARG)
2414);
2415
16ef1fe2
SW
2416TRACE_EVENT(rdev_channel_switch,
2417 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2418 struct cfg80211_csa_settings *params),
2419 TP_ARGS(wiphy, netdev, params),
2420 TP_STRUCT__entry(
2421 WIPHY_ENTRY
2422 NETDEV_ENTRY
2423 CHAN_DEF_ENTRY
16ef1fe2
SW
2424 __field(bool, radar_required)
2425 __field(bool, block_tx)
2426 __field(u8, count)
9a774c78
AO
2427 __dynamic_array(u16, bcn_ofs, params->n_counter_offsets_beacon)
2428 __dynamic_array(u16, pres_ofs, params->n_counter_offsets_presp)
4ace04c0 2429 __field(u8, link_id)
16ef1fe2
SW
2430 ),
2431 TP_fast_assign(
2432 WIPHY_ASSIGN;
2433 NETDEV_ASSIGN;
2434 CHAN_DEF_ASSIGN(&params->chandef);
16ef1fe2
SW
2435 __entry->radar_required = params->radar_required;
2436 __entry->block_tx = params->block_tx;
2437 __entry->count = params->count;
9a774c78
AO
2438 memcpy(__get_dynamic_array(bcn_ofs),
2439 params->counter_offsets_beacon,
2440 params->n_counter_offsets_beacon * sizeof(u16));
2441
2442 /* probe response offsets are optional */
2443 if (params->n_counter_offsets_presp)
2444 memcpy(__get_dynamic_array(pres_ofs),
2445 params->counter_offsets_presp,
2446 params->n_counter_offsets_presp * sizeof(u16));
4ace04c0 2447 __entry->link_id = params->link_id;
16ef1fe2
SW
2448 ),
2449 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
4ace04c0 2450 ", block_tx: %d, count: %u, radar_required: %d, link_id: %d",
16ef1fe2 2451 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
4ace04c0
AKS
2452 __entry->block_tx, __entry->count, __entry->radar_required,
2453 __entry->link_id)
16ef1fe2
SW
2454);
2455
fa9ffc74
KP
2456TRACE_EVENT(rdev_set_qos_map,
2457 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2458 struct cfg80211_qos_map *qos_map),
2459 TP_ARGS(wiphy, netdev, qos_map),
2460 TP_STRUCT__entry(
2461 WIPHY_ENTRY
2462 NETDEV_ENTRY
2463 QOS_MAP_ENTRY
2464 ),
2465 TP_fast_assign(
2466 WIPHY_ASSIGN;
2467 NETDEV_ASSIGN;
2468 QOS_MAP_ASSIGN(qos_map);
2469 ),
2470 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u",
2471 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des)
2472);
2473
e16821bc
JM
2474TRACE_EVENT(rdev_set_ap_chanwidth,
2475 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
7b0a0e3c 2476 unsigned int link_id,
e16821bc 2477 struct cfg80211_chan_def *chandef),
7b0a0e3c 2478 TP_ARGS(wiphy, netdev, link_id, chandef),
e16821bc
JM
2479 TP_STRUCT__entry(
2480 WIPHY_ENTRY
2481 NETDEV_ENTRY
2482 CHAN_DEF_ENTRY
7b0a0e3c 2483 __field(unsigned int, link_id)
e16821bc
JM
2484 ),
2485 TP_fast_assign(
2486 WIPHY_ASSIGN;
2487 NETDEV_ASSIGN;
2488 CHAN_DEF_ASSIGN(chandef);
7b0a0e3c 2489 __entry->link_id = link_id;
e16821bc 2490 ),
7b0a0e3c
JB
2491 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT ", link:%d",
2492 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
2493 __entry->link_id)
e16821bc
JM
2494);
2495
960d01ac
JB
2496TRACE_EVENT(rdev_add_tx_ts,
2497 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2498 u8 tsid, const u8 *peer, u8 user_prio, u16 admitted_time),
2499 TP_ARGS(wiphy, netdev, tsid, peer, user_prio, admitted_time),
2500 TP_STRUCT__entry(
2501 WIPHY_ENTRY
2502 NETDEV_ENTRY
2503 MAC_ENTRY(peer)
2504 __field(u8, tsid)
2505 __field(u8, user_prio)
2506 __field(u16, admitted_time)
2507 ),
2508 TP_fast_assign(
2509 WIPHY_ASSIGN;
2510 NETDEV_ASSIGN;
2511 MAC_ASSIGN(peer, peer);
2512 __entry->tsid = tsid;
2513 __entry->user_prio = user_prio;
2514 __entry->admitted_time = admitted_time;
2515 ),
3d9c3617
JB
2516 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %pM, TSID %d, UP %d, time %d",
2517 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->peer,
960d01ac
JB
2518 __entry->tsid, __entry->user_prio, __entry->admitted_time)
2519);
2520
2521TRACE_EVENT(rdev_del_tx_ts,
2522 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2523 u8 tsid, const u8 *peer),
2524 TP_ARGS(wiphy, netdev, tsid, peer),
2525 TP_STRUCT__entry(
2526 WIPHY_ENTRY
2527 NETDEV_ENTRY
2528 MAC_ENTRY(peer)
2529 __field(u8, tsid)
2530 ),
2531 TP_fast_assign(
2532 WIPHY_ASSIGN;
2533 NETDEV_ASSIGN;
2534 MAC_ASSIGN(peer, peer);
2535 __entry->tsid = tsid;
2536 ),
3d9c3617
JB
2537 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %pM, TSID %d",
2538 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->peer, __entry->tsid)
960d01ac
JB
2539);
2540
1057d35e
AN
2541TRACE_EVENT(rdev_tdls_channel_switch,
2542 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2543 const u8 *addr, u8 oper_class,
2544 struct cfg80211_chan_def *chandef),
2545 TP_ARGS(wiphy, netdev, addr, oper_class, chandef),
2546 TP_STRUCT__entry(
2547 WIPHY_ENTRY
2548 NETDEV_ENTRY
2549 MAC_ENTRY(addr)
2550 __field(u8, oper_class)
2551 CHAN_DEF_ENTRY
2552 ),
2553 TP_fast_assign(
2554 WIPHY_ASSIGN;
2555 NETDEV_ASSIGN;
2556 MAC_ASSIGN(addr, addr);
2557 CHAN_DEF_ASSIGN(chandef);
2558 ),
3d9c3617 2559 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %pM"
1057d35e 2560 " oper class %d, " CHAN_DEF_PR_FMT,
3d9c3617 2561 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->addr,
1057d35e
AN
2562 __entry->oper_class, CHAN_DEF_PR_ARG)
2563);
2564
2565TRACE_EVENT(rdev_tdls_cancel_channel_switch,
2566 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2567 const u8 *addr),
2568 TP_ARGS(wiphy, netdev, addr),
2569 TP_STRUCT__entry(
2570 WIPHY_ENTRY
2571 NETDEV_ENTRY
2572 MAC_ENTRY(addr)
2573 ),
2574 TP_fast_assign(
2575 WIPHY_ASSIGN;
2576 NETDEV_ASSIGN;
2577 MAC_ASSIGN(addr, addr);
2578 ),
3d9c3617
JB
2579 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %pM",
2580 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->addr)
1057d35e
AN
2581);
2582
3a00df57
AS
2583TRACE_EVENT(rdev_set_pmk,
2584 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2585 struct cfg80211_pmk_conf *pmk_conf),
2586
2587 TP_ARGS(wiphy, netdev, pmk_conf),
2588
2589 TP_STRUCT__entry(
2590 WIPHY_ENTRY
2591 NETDEV_ENTRY
2592 MAC_ENTRY(aa)
2593 __field(u8, pmk_len)
2594 __field(u8, pmk_r0_name_len)
2595 __dynamic_array(u8, pmk, pmk_conf->pmk_len)
2596 __dynamic_array(u8, pmk_r0_name, WLAN_PMK_NAME_LEN)
2597 ),
2598
2599 TP_fast_assign(
2600 WIPHY_ASSIGN;
2601 NETDEV_ASSIGN;
2602 MAC_ASSIGN(aa, pmk_conf->aa);
2603 __entry->pmk_len = pmk_conf->pmk_len;
2604 __entry->pmk_r0_name_len =
2605 pmk_conf->pmk_r0_name ? WLAN_PMK_NAME_LEN : 0;
2606 memcpy(__get_dynamic_array(pmk), pmk_conf->pmk,
2607 pmk_conf->pmk_len);
2608 memcpy(__get_dynamic_array(pmk_r0_name), pmk_conf->pmk_r0_name,
2609 pmk_conf->pmk_r0_name ? WLAN_PMK_NAME_LEN : 0);
2610 ),
2611
3d9c3617 2612 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %pM"
3a00df57 2613 "pmk_len=%u, pmk: %s pmk_r0_name: %s", WIPHY_PR_ARG,
3d9c3617 2614 NETDEV_PR_ARG, __entry->aa, __entry->pmk_len,
3a00df57
AS
2615 __print_array(__get_dynamic_array(pmk),
2616 __get_dynamic_array_len(pmk), 1),
2617 __entry->pmk_r0_name_len ?
2618 __print_array(__get_dynamic_array(pmk_r0_name),
2619 __get_dynamic_array_len(pmk_r0_name), 1) : "")
2620);
2621
2622TRACE_EVENT(rdev_del_pmk,
2623 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *aa),
2624
2625 TP_ARGS(wiphy, netdev, aa),
2626
2627 TP_STRUCT__entry(
2628 WIPHY_ENTRY
2629 NETDEV_ENTRY
2630 MAC_ENTRY(aa)
2631 ),
2632
2633 TP_fast_assign(
2634 WIPHY_ASSIGN;
2635 NETDEV_ASSIGN;
2636 MAC_ASSIGN(aa, aa);
2637 ),
2638
3d9c3617
JB
2639 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %pM",
2640 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->aa)
3a00df57
AS
2641);
2642
40cbfa90
SD
2643TRACE_EVENT(rdev_external_auth,
2644 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2645 struct cfg80211_external_auth_params *params),
2646 TP_ARGS(wiphy, netdev, params),
2647 TP_STRUCT__entry(WIPHY_ENTRY
2648 NETDEV_ENTRY
2649 MAC_ENTRY(bssid)
2650 __array(u8, ssid, IEEE80211_MAX_SSID_LEN + 1)
2651 __field(u16, status)
9a47c1ef 2652 MAC_ENTRY(mld_addr)
40cbfa90
SD
2653 ),
2654 TP_fast_assign(WIPHY_ASSIGN;
2655 NETDEV_ASSIGN;
2656 MAC_ASSIGN(bssid, params->bssid);
2657 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
2658 memcpy(__entry->ssid, params->ssid.ssid,
2659 params->ssid.ssid_len);
2660 __entry->status = params->status;
9a47c1ef 2661 MAC_ASSIGN(mld_addr, params->mld_addr);
40cbfa90 2662 ),
3d9c3617 2663 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: %pM"
9a47c1ef
VJ
2664 ", ssid: %s, status: %u, mld_addr: %pM",
2665 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->bssid,
2666 __entry->ssid, __entry->status, __entry->mld_addr)
40cbfa90
SD
2667);
2668
5207ca55
JB
2669TRACE_EVENT(rdev_start_radar_detection,
2670 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2671 struct cfg80211_chan_def *chandef,
81f67d60
AKS
2672 u32 cac_time_ms, int link_id),
2673 TP_ARGS(wiphy, netdev, chandef, cac_time_ms, link_id),
5207ca55
JB
2674 TP_STRUCT__entry(
2675 WIPHY_ENTRY
2676 NETDEV_ENTRY
2677 CHAN_DEF_ENTRY
2678 __field(u32, cac_time_ms)
81f67d60 2679 __field(int, link_id)
5207ca55
JB
2680 ),
2681 TP_fast_assign(
2682 WIPHY_ASSIGN;
2683 NETDEV_ASSIGN;
2684 CHAN_DEF_ASSIGN(chandef);
2685 __entry->cac_time_ms = cac_time_ms;
81f67d60 2686 __entry->link_id = link_id;
5207ca55
JB
2687 ),
2688 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
81f67d60 2689 ", cac_time_ms=%u, link_id=%d",
5207ca55 2690 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
81f67d60 2691 __entry->cac_time_ms, __entry->link_id)
5207ca55
JB
2692);
2693
2694TRACE_EVENT(rdev_set_mcast_rate,
2695 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2696 int *mcast_rate),
2697 TP_ARGS(wiphy, netdev, mcast_rate),
2698 TP_STRUCT__entry(
2699 WIPHY_ENTRY
2700 NETDEV_ENTRY
2701 __array(int, mcast_rate, NUM_NL80211_BANDS)
2702 ),
2703 TP_fast_assign(
2704 WIPHY_ASSIGN;
2705 NETDEV_ASSIGN;
2706 memcpy(__entry->mcast_rate, mcast_rate,
2707 sizeof(int) * NUM_NL80211_BANDS);
2708 ),
2709 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", "
e548a1c3 2710 "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 6GHz=0x%x, 60GHz=0x%x]",
5207ca55
JB
2711 WIPHY_PR_ARG, NETDEV_PR_ARG,
2712 __entry->mcast_rate[NL80211_BAND_2GHZ],
2713 __entry->mcast_rate[NL80211_BAND_5GHZ],
e548a1c3 2714 __entry->mcast_rate[NL80211_BAND_6GHZ],
5207ca55
JB
2715 __entry->mcast_rate[NL80211_BAND_60GHZ])
2716);
2717
2718TRACE_EVENT(rdev_set_coalesce,
2719 TP_PROTO(struct wiphy *wiphy, struct cfg80211_coalesce *coalesce),
2720 TP_ARGS(wiphy, coalesce),
2721 TP_STRUCT__entry(
2722 WIPHY_ENTRY
2723 __field(int, n_rules)
2724 ),
2725 TP_fast_assign(
2726 WIPHY_ASSIGN;
2727 __entry->n_rules = coalesce ? coalesce->n_rules : 0;
2728 ),
2729 TP_printk(WIPHY_PR_FMT ", n_rules=%d",
2730 WIPHY_PR_ARG, __entry->n_rules)
2731);
2732
2733DEFINE_EVENT(wiphy_wdev_evt, rdev_abort_scan,
2734 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2735 TP_ARGS(wiphy, wdev)
2736);
2737
2738TRACE_EVENT(rdev_set_multicast_to_unicast,
2739 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2740 const bool enabled),
2741 TP_ARGS(wiphy, netdev, enabled),
2742 TP_STRUCT__entry(
2743 WIPHY_ENTRY
2744 NETDEV_ENTRY
2745 __field(bool, enabled)
2746 ),
2747 TP_fast_assign(
2748 WIPHY_ASSIGN;
2749 NETDEV_ASSIGN;
2750 __entry->enabled = enabled;
2751 ),
2752 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", unicast: %s",
2753 WIPHY_PR_ARG, NETDEV_PR_ARG,
2754 BOOL_TO_STR(__entry->enabled))
2755);
2756
2757DEFINE_EVENT(wiphy_wdev_evt, rdev_get_txq_stats,
2758 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2759 TP_ARGS(wiphy, wdev)
2760);
2761
2762TRACE_EVENT(rdev_get_ftm_responder_stats,
2763 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2764 struct cfg80211_ftm_responder_stats *ftm_stats),
2765
2766 TP_ARGS(wiphy, netdev, ftm_stats),
2767
2768 TP_STRUCT__entry(
2769 WIPHY_ENTRY
2770 NETDEV_ENTRY
2771 __field(u64, timestamp)
2772 __field(u32, success_num)
2773 __field(u32, partial_num)
2774 __field(u32, failed_num)
2775 __field(u32, asap_num)
2776 __field(u32, non_asap_num)
2777 __field(u64, duration)
2778 __field(u32, unknown_triggers)
2779 __field(u32, reschedule)
2780 __field(u32, out_of_window)
2781 ),
2782
2783 TP_fast_assign(
2784 WIPHY_ASSIGN;
2785 NETDEV_ASSIGN;
2786 __entry->success_num = ftm_stats->success_num;
2787 __entry->partial_num = ftm_stats->partial_num;
2788 __entry->failed_num = ftm_stats->failed_num;
2789 __entry->asap_num = ftm_stats->asap_num;
2790 __entry->non_asap_num = ftm_stats->non_asap_num;
2791 __entry->duration = ftm_stats->total_duration_ms;
2792 __entry->unknown_triggers = ftm_stats->unknown_triggers_num;
2793 __entry->reschedule = ftm_stats->reschedule_requests_num;
2794 __entry->out_of_window = ftm_stats->out_of_window_triggers_num;
2795 ),
2796
2797 TP_printk(WIPHY_PR_FMT "Ftm responder stats: success %u, partial %u, "
2798 "failed %u, asap %u, non asap %u, total duration %llu, unknown "
2799 "triggers %u, rescheduled %u, out of window %u", WIPHY_PR_ARG,
2800 __entry->success_num, __entry->partial_num, __entry->failed_num,
2801 __entry->asap_num, __entry->non_asap_num, __entry->duration,
2802 __entry->unknown_triggers, __entry->reschedule,
2803 __entry->out_of_window)
2804);
2805
9bb7e0f2
JB
2806DEFINE_EVENT(wiphy_wdev_cookie_evt, rdev_start_pmsr,
2807 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
2808 TP_ARGS(wiphy, wdev, cookie)
2809);
2810
2811DEFINE_EVENT(wiphy_wdev_cookie_evt, rdev_abort_pmsr,
2812 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
2813 TP_ARGS(wiphy, wdev, cookie)
2814);
2815
e306784a
SM
2816TRACE_EVENT(rdev_set_fils_aad,
2817 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2818 struct cfg80211_fils_aad *fils_aad),
2819 TP_ARGS(wiphy, netdev, fils_aad),
2820 TP_STRUCT__entry(WIPHY_ENTRY
2821 NETDEV_ENTRY
2822 __array(u8, macaddr, ETH_ALEN)
2823 __field(u8, kek_len)
2824 ),
2825 TP_fast_assign(WIPHY_ASSIGN;
2826 NETDEV_ASSIGN;
2827 FILS_AAD_ASSIGN(fils_aad);
2828 ),
2829 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " FILS_AAD_PR_FMT,
2830 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->macaddr,
2831 __entry->kek_len)
2832);
2833
c8a11ed5
JB
2834TRACE_EVENT(rdev_update_owe_info,
2835 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2836 struct cfg80211_update_owe_info *owe_info),
2837 TP_ARGS(wiphy, netdev, owe_info),
2838 TP_STRUCT__entry(WIPHY_ENTRY
2839 NETDEV_ENTRY
2840 MAC_ENTRY(peer)
2841 __field(u16, status)
2842 __dynamic_array(u8, ie, owe_info->ie_len)),
2843 TP_fast_assign(WIPHY_ASSIGN;
2844 NETDEV_ASSIGN;
2845 MAC_ASSIGN(peer, owe_info->peer);
2846 __entry->status = owe_info->status;
2847 memcpy(__get_dynamic_array(ie),
2848 owe_info->ie, owe_info->ie_len);),
3d9c3617
JB
2849 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: %pM"
2850 " status %d", WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->peer,
c8a11ed5
JB
2851 __entry->status)
2852);
2853
2854TRACE_EVENT(rdev_probe_mesh_link,
2855 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2856 const u8 *dest, const u8 *buf, size_t len),
2857 TP_ARGS(wiphy, netdev, dest, buf, len),
2858 TP_STRUCT__entry(
2859 WIPHY_ENTRY
2860 NETDEV_ENTRY
2861 MAC_ENTRY(dest)
2862 ),
2863 TP_fast_assign(
2864 WIPHY_ASSIGN;
2865 NETDEV_ASSIGN;
2866 MAC_ASSIGN(dest, dest);
2867 ),
3d9c3617
JB
2868 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %pM",
2869 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->dest)
c8a11ed5
JB
2870);
2871
2872TRACE_EVENT(rdev_set_tid_config,
2873 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2874 struct cfg80211_tid_config *tid_conf),
2875 TP_ARGS(wiphy, netdev, tid_conf),
2876 TP_STRUCT__entry(
2877 WIPHY_ENTRY
2878 NETDEV_ENTRY
2879 MAC_ENTRY(peer)
2880 ),
2881 TP_fast_assign(
2882 WIPHY_ASSIGN;
2883 NETDEV_ASSIGN;
2884 MAC_ASSIGN(peer, tid_conf->peer);
2885 ),
3d9c3617
JB
2886 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: %pM",
2887 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->peer)
c8a11ed5
JB
2888);
2889
2890TRACE_EVENT(rdev_reset_tid_config,
2891 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2892 const u8 *peer, u8 tids),
2893 TP_ARGS(wiphy, netdev, peer, tids),
2894 TP_STRUCT__entry(
2895 WIPHY_ENTRY
2896 NETDEV_ENTRY
2897 MAC_ENTRY(peer)
2898 __field(u8, tids)
2899 ),
2900 TP_fast_assign(
2901 WIPHY_ASSIGN;
2902 NETDEV_ASSIGN;
2903 MAC_ASSIGN(peer, peer);
2904 __entry->tids = tids;
2905 ),
3d9c3617
JB
2906 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: %pM, tids: 0x%x",
2907 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->peer, __entry->tids)
c8a11ed5
JB
2908);
2909
2910TRACE_EVENT(rdev_set_sar_specs,
2911 TP_PROTO(struct wiphy *wiphy, struct cfg80211_sar_specs *sar),
2912 TP_ARGS(wiphy, sar),
2913 TP_STRUCT__entry(
2914 WIPHY_ENTRY
2915 __field(u16, type)
2916 __field(u16, num)
2917 ),
2918 TP_fast_assign(
2919 WIPHY_ASSIGN;
2920 __entry->type = sar->type;
2921 __entry->num = sar->num_sub_specs;
2922
2923 ),
2924 TP_printk(WIPHY_PR_FMT ", Set type:%d, num_specs:%d",
2925 WIPHY_PR_ARG, __entry->type, __entry->num)
2926);
2927
2928TRACE_EVENT(rdev_color_change,
2929 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2930 struct cfg80211_color_change_settings *params),
2931 TP_ARGS(wiphy, netdev, params),
2932 TP_STRUCT__entry(
2933 WIPHY_ENTRY
2934 NETDEV_ENTRY
2935 __field(u8, count)
2936 __field(u16, bcn_ofs)
2937 __field(u16, pres_ofs)
91d2b6ee 2938 __field(u8, link_id)
c8a11ed5
JB
2939 ),
2940 TP_fast_assign(
2941 WIPHY_ASSIGN;
2942 NETDEV_ASSIGN;
2943 __entry->count = params->count;
2944 __entry->bcn_ofs = params->counter_offset_beacon;
2945 __entry->pres_ofs = params->counter_offset_presp;
91d2b6ee 2946 __entry->link_id = params->link_id;
c8a11ed5
JB
2947 ),
2948 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
91d2b6ee 2949 ", count: %u, link_id: %d",
c8a11ed5 2950 WIPHY_PR_ARG, NETDEV_PR_ARG,
91d2b6ee 2951 __entry->count, __entry->link_id)
c8a11ed5
JB
2952);
2953
2954TRACE_EVENT(rdev_set_radar_background,
2955 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2956
2957 TP_ARGS(wiphy, chandef),
2958
2959 TP_STRUCT__entry(
2960 WIPHY_ENTRY
2961 CHAN_DEF_ENTRY
2962 ),
2963
2964 TP_fast_assign(
2965 WIPHY_ASSIGN;
2966 CHAN_DEF_ASSIGN(chandef)
2967 ),
2968
2969 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2970 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2971);
2972
f2a0290b
JB
2973DEFINE_EVENT(wiphy_wdev_link_evt, rdev_add_intf_link,
2974 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2975 unsigned int link_id),
2976 TP_ARGS(wiphy, wdev, link_id)
2977);
2978
2979DEFINE_EVENT(wiphy_wdev_link_evt, rdev_del_intf_link,
2980 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2981 unsigned int link_id),
2982 TP_ARGS(wiphy, wdev, link_id)
2983);
2984
2449db1f
JB
2985TRACE_EVENT(rdev_del_link_station,
2986 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2987 struct link_station_del_parameters *params),
2988 TP_ARGS(wiphy, netdev, params),
2989 TP_STRUCT__entry(
2990 WIPHY_ENTRY
2991 NETDEV_ENTRY
2992 __array(u8, mld_mac, 6)
2993 __field(u32, link_id)
2994 ),
2995 TP_fast_assign(
2996 WIPHY_ASSIGN;
2997 NETDEV_ASSIGN;
2998 memset(__entry->mld_mac, 0, 6);
2999 if (params->mld_mac)
3000 memcpy(__entry->mld_mac, params->mld_mac, 6);
3001 __entry->link_id = params->link_id;
3002 ),
3003 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: %pM"
3004 ", link id: %u",
3005 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mld_mac,
3006 __entry->link_id)
3007);
3008
3009TRACE_EVENT(rdev_set_hw_timestamp,
3010 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3011 struct cfg80211_set_hw_timestamp *hwts),
3012
3013 TP_ARGS(wiphy, netdev, hwts),
3014
3015 TP_STRUCT__entry(
3016 WIPHY_ENTRY
3017 NETDEV_ENTRY
3018 MAC_ENTRY(macaddr)
3019 __field(bool, enable)
3020 ),
3021
3022 TP_fast_assign(
3023 WIPHY_ASSIGN;
3024 NETDEV_ASSIGN;
3025 MAC_ASSIGN(macaddr, hwts->macaddr);
3026 __entry->enable = hwts->enable;
3027 ),
3028
3029 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac %pM, enable: %u",
3030 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->macaddr,
3031 __entry->enable)
3032);
3033
3034TRACE_EVENT(rdev_set_ttlm,
3035 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3036 struct cfg80211_ttlm_params *params),
3037 TP_ARGS(wiphy, netdev, params),
3038 TP_STRUCT__entry(
3039 WIPHY_ENTRY
3040 NETDEV_ENTRY
3041 __array(u8, dlink, sizeof(u16) * 8)
3042 __array(u8, ulink, sizeof(u16) * 8)
3043 ),
3044 TP_fast_assign(
3045 WIPHY_ASSIGN;
3046 NETDEV_ASSIGN;
3047 memcpy(__entry->dlink, params->dlink, sizeof(params->dlink));
3048 memcpy(__entry->ulink, params->ulink, sizeof(params->ulink));
3049 ),
3050 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
3051 WIPHY_PR_ARG, NETDEV_PR_ARG)
3052);
3053
904c2773
IP
3054TRACE_EVENT(rdev_set_epcs,
3055 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3056 bool val),
3057 TP_ARGS(wiphy, netdev, val),
3058 TP_STRUCT__entry(
3059 WIPHY_ENTRY
3060 NETDEV_ENTRY
3061 __field(bool, val)
3062 ),
3063 TP_fast_assign(
3064 WIPHY_ASSIGN;
3065 NETDEV_ASSIGN;
3066 __entry->val = val;
3067 ),
3068 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", config=%u",
3069 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->val)
3070);
3071
4ee3e063
BL
3072/*************************************************************
3073 * cfg80211 exported functions traces *
3074 *************************************************************/
3075
3076TRACE_EVENT(cfg80211_return_bool,
3077 TP_PROTO(bool ret),
3078 TP_ARGS(ret),
3079 TP_STRUCT__entry(
3080 __field(bool, ret)
3081 ),
3082 TP_fast_assign(
3083 __entry->ret = ret;
3084 ),
3085 TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
3086);
3087
3088DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
3089 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
3090 TP_ARGS(netdev, macaddr),
3091 TP_STRUCT__entry(
3092 NETDEV_ENTRY
3093 MAC_ENTRY(macaddr)
3094 ),
3095 TP_fast_assign(
3096 NETDEV_ASSIGN;
3097 MAC_ASSIGN(macaddr, macaddr);
3098 ),
3d9c3617
JB
3099 TP_printk(NETDEV_PR_FMT ", mac: %pM",
3100 NETDEV_PR_ARG, __entry->macaddr)
4ee3e063
BL
3101);
3102
3103DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
3104 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
3105 TP_ARGS(netdev, macaddr)
3106);
3107
3108DECLARE_EVENT_CLASS(netdev_evt_only,
3109 TP_PROTO(struct net_device *netdev),
3110 TP_ARGS(netdev),
3111 TP_STRUCT__entry(
3112 NETDEV_ENTRY
3113 ),
3114 TP_fast_assign(
3115 NETDEV_ASSIGN;
3116 ),
3117 TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
3118);
3119
3120DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
3121 TP_PROTO(struct net_device *netdev),
3122 TP_ARGS(netdev)
3123);
3124
3125TRACE_EVENT(cfg80211_send_rx_assoc,
5cd212cb 3126 TP_PROTO(struct net_device *netdev,
88f29324 3127 const struct cfg80211_rx_assoc_resp_data *data),
5cd212cb 3128 TP_ARGS(netdev, data),
4ee3e063
BL
3129 TP_STRUCT__entry(
3130 NETDEV_ENTRY
5cd212cb 3131 MAC_ENTRY(ap_addr)
4ee3e063
BL
3132 ),
3133 TP_fast_assign(
3134 NETDEV_ASSIGN;
5cd212cb
JB
3135 MAC_ASSIGN(ap_addr,
3136 data->ap_mld_addr ?: data->links[0].bss->bssid);
4ee3e063 3137 ),
3d9c3617
JB
3138 TP_printk(NETDEV_PR_FMT ", %pM",
3139 NETDEV_PR_ARG, __entry->ap_addr)
4ee3e063
BL
3140);
3141
6ff57cf8
JB
3142DECLARE_EVENT_CLASS(netdev_frame_event,
3143 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
3144 TP_ARGS(netdev, buf, len),
3145 TP_STRUCT__entry(
3146 NETDEV_ENTRY
3147 __dynamic_array(u8, frame, len)
3148 ),
3149 TP_fast_assign(
3150 NETDEV_ASSIGN;
3151 memcpy(__get_dynamic_array(frame), buf, len);
3152 ),
3153 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
3154 NETDEV_PR_ARG,
3155 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
4ee3e063
BL
3156);
3157
6ff57cf8
JB
3158DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
3159 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
3160 TP_ARGS(netdev, buf, len)
4ee3e063
BL
3161);
3162
6ff57cf8
JB
3163DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
3164 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
3165 TP_ARGS(netdev, buf, len)
4ee3e063
BL
3166);
3167
6ff57cf8 3168TRACE_EVENT(cfg80211_tx_mlme_mgmt,
3bb02143
JB
3169 TP_PROTO(struct net_device *netdev, const u8 *buf, int len,
3170 bool reconnect),
3171 TP_ARGS(netdev, buf, len, reconnect),
6ff57cf8
JB
3172 TP_STRUCT__entry(
3173 NETDEV_ENTRY
3174 __dynamic_array(u8, frame, len)
3bb02143 3175 __field(int, reconnect)
6ff57cf8
JB
3176 ),
3177 TP_fast_assign(
3178 NETDEV_ASSIGN;
3179 memcpy(__get_dynamic_array(frame), buf, len);
3bb02143 3180 __entry->reconnect = reconnect;
6ff57cf8 3181 ),
3bb02143 3182 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x reconnect:%d",
6ff57cf8 3183 NETDEV_PR_ARG,
3bb02143
JB
3184 le16_to_cpup((__le16 *)__get_dynamic_array(frame)),
3185 __entry->reconnect)
4ee3e063
BL
3186);
3187
3188DECLARE_EVENT_CLASS(netdev_mac_evt,
3189 TP_PROTO(struct net_device *netdev, const u8 *mac),
3190 TP_ARGS(netdev, mac),
3191 TP_STRUCT__entry(
3192 NETDEV_ENTRY
3193 MAC_ENTRY(mac)
3194 ),
3195 TP_fast_assign(
3196 NETDEV_ASSIGN;
3197 MAC_ASSIGN(mac, mac)
3198 ),
3d9c3617
JB
3199 TP_printk(NETDEV_PR_FMT ", mac: %pM",
3200 NETDEV_PR_ARG, __entry->mac)
4ee3e063
BL
3201);
3202
3203DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
3204 TP_PROTO(struct net_device *netdev, const u8 *mac),
3205 TP_ARGS(netdev, mac)
3206);
3207
f662d2f4
JB
3208TRACE_EVENT(cfg80211_send_assoc_failure,
3209 TP_PROTO(struct net_device *netdev,
3210 struct cfg80211_assoc_failure *data),
3211 TP_ARGS(netdev, data),
3212 TP_STRUCT__entry(
3213 NETDEV_ENTRY
3214 MAC_ENTRY(ap_addr)
3215 __field(bool, timeout)
3216 ),
3217 TP_fast_assign(
3218 NETDEV_ASSIGN;
3219 MAC_ASSIGN(ap_addr, data->ap_mld_addr ?: data->bss[0]->bssid);
3220 __entry->timeout = data->timeout;
3221 ),
3d9c3617
JB
3222 TP_printk(NETDEV_PR_FMT ", mac: %pM, timeout: %d",
3223 NETDEV_PR_ARG, __entry->ap_addr, __entry->timeout)
4ee3e063
BL
3224);
3225
3226TRACE_EVENT(cfg80211_michael_mic_failure,
3227 TP_PROTO(struct net_device *netdev, const u8 *addr,
3228 enum nl80211_key_type key_type, int key_id, const u8 *tsc),
3229 TP_ARGS(netdev, addr, key_type, key_id, tsc),
3230 TP_STRUCT__entry(
3231 NETDEV_ENTRY
3232 MAC_ENTRY(addr)
3233 __field(enum nl80211_key_type, key_type)
3234 __field(int, key_id)
3235 __array(u8, tsc, 6)
3236 ),
3237 TP_fast_assign(
3238 NETDEV_ASSIGN;
3239 MAC_ASSIGN(addr, addr);
3240 __entry->key_type = key_type;
3241 __entry->key_id = key_id;
8c26d458
EP
3242 if (tsc)
3243 memcpy(__entry->tsc, tsc, 6);
4ee3e063 3244 ),
3d9c3617
JB
3245 TP_printk(NETDEV_PR_FMT ", %pM, key type: %d, key id: %d, tsc: %pm",
3246 NETDEV_PR_ARG, __entry->addr, __entry->key_type,
4ee3e063
BL
3247 __entry->key_id, __entry->tsc)
3248);
3249
3250TRACE_EVENT(cfg80211_ready_on_channel,
3251 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
3252 struct ieee80211_channel *chan,
42d97a59
JB
3253 unsigned int duration),
3254 TP_ARGS(wdev, cookie, chan, duration),
4ee3e063
BL
3255 TP_STRUCT__entry(
3256 WDEV_ENTRY
3257 __field(u64, cookie)
3258 CHAN_ENTRY
4ee3e063
BL
3259 __field(unsigned int, duration)
3260 ),
3261 TP_fast_assign(
3262 WDEV_ASSIGN;
3263 __entry->cookie = cookie;
3264 CHAN_ASSIGN(chan);
4ee3e063
BL
3265 __entry->duration = duration;
3266 ),
42d97a59 3267 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
4ee3e063 3268 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
42d97a59 3269 __entry->duration)
4ee3e063
BL
3270);
3271
3272TRACE_EVENT(cfg80211_ready_on_channel_expired,
3273 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
42d97a59
JB
3274 struct ieee80211_channel *chan),
3275 TP_ARGS(wdev, cookie, chan),
4ee3e063
BL
3276 TP_STRUCT__entry(
3277 WDEV_ENTRY
3278 __field(u64, cookie)
3279 CHAN_ENTRY
4ee3e063
BL
3280 ),
3281 TP_fast_assign(
3282 WDEV_ASSIGN;
3283 __entry->cookie = cookie;
3284 CHAN_ASSIGN(chan);
4ee3e063 3285 ),
42d97a59
JB
3286 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
3287 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
4ee3e063
BL
3288);
3289
1c38c7f2
JP
3290TRACE_EVENT(cfg80211_tx_mgmt_expired,
3291 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
3292 struct ieee80211_channel *chan),
3293 TP_ARGS(wdev, cookie, chan),
3294 TP_STRUCT__entry(
3295 WDEV_ENTRY
3296 __field(u64, cookie)
3297 CHAN_ENTRY
3298 ),
3299 TP_fast_assign(
3300 WDEV_ASSIGN;
3301 __entry->cookie = cookie;
3302 CHAN_ASSIGN(chan);
3303 ),
3304 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
3305 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
3306);
3307
4ee3e063
BL
3308TRACE_EVENT(cfg80211_new_sta,
3309 TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
3310 struct station_info *sinfo),
3311 TP_ARGS(netdev, mac_addr, sinfo),
3312 TP_STRUCT__entry(
3313 NETDEV_ENTRY
3314 MAC_ENTRY(mac_addr)
3315 SINFO_ENTRY
3316 ),
3317 TP_fast_assign(
3318 NETDEV_ASSIGN;
3319 MAC_ASSIGN(mac_addr, mac_addr);
3320 SINFO_ASSIGN;
3321 ),
3d9c3617
JB
3322 TP_printk(NETDEV_PR_FMT ", %pM",
3323 NETDEV_PR_ARG, __entry->mac_addr)
4ee3e063
BL
3324);
3325
3326DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
3327 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
3328 TP_ARGS(netdev, macaddr)
3329);
3330
3331TRACE_EVENT(cfg80211_rx_mgmt,
00b3d840
AS
3332 TP_PROTO(struct wireless_dev *wdev, struct cfg80211_rx_info *info),
3333 TP_ARGS(wdev, info),
4ee3e063
BL
3334 TP_STRUCT__entry(
3335 WDEV_ENTRY
3336 __field(int, freq)
6c2fb1e6 3337 __field(int, sig_dbm)
4ee3e063
BL
3338 ),
3339 TP_fast_assign(
3340 WDEV_ASSIGN;
00b3d840
AS
3341 __entry->freq = info->freq;
3342 __entry->sig_dbm = info->sig_dbm;
4ee3e063 3343 ),
e76fede8
TP
3344 TP_printk(WDEV_PR_FMT ", freq: "KHZ_F", sig dbm: %d",
3345 WDEV_PR_ARG, PR_KHZ(__entry->freq), __entry->sig_dbm)
4ee3e063
BL
3346);
3347
3348TRACE_EVENT(cfg80211_mgmt_tx_status,
3349 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
3350 TP_ARGS(wdev, cookie, ack),
3351 TP_STRUCT__entry(
3352 WDEV_ENTRY
3353 __field(u64, cookie)
3354 __field(bool, ack)
3355 ),
3356 TP_fast_assign(
3357 WDEV_ASSIGN;
3358 __entry->cookie = cookie;
3359 __entry->ack = ack;
3360 ),
3361 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
3362 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
dca9ca2d
MT
3363);
3364
3365TRACE_EVENT(cfg80211_control_port_tx_status,
3366 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
3367 TP_ARGS(wdev, cookie, ack),
3368 TP_STRUCT__entry(
3369 WDEV_ENTRY
3370 __field(u64, cookie)
3371 __field(bool, ack)
3372 ),
3373 TP_fast_assign(
3374 WDEV_ASSIGN;
3375 __entry->cookie = cookie;
3376 __entry->ack = ack;
3377 ),
3378 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
3379 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
4ee3e063
BL
3380);
3381
6a671a50 3382TRACE_EVENT(cfg80211_rx_control_port,
a948f713 3383 TP_PROTO(struct net_device *netdev, struct sk_buff *skb,
4c532321
JB
3384 bool unencrypted, int link_id),
3385 TP_ARGS(netdev, skb, unencrypted, link_id),
6a671a50
DK
3386 TP_STRUCT__entry(
3387 NETDEV_ENTRY
a948f713
DK
3388 __field(int, len)
3389 MAC_ENTRY(from)
6a671a50
DK
3390 __field(u16, proto)
3391 __field(bool, unencrypted)
4c532321 3392 __field(int, link_id)
6a671a50
DK
3393 ),
3394 TP_fast_assign(
3395 NETDEV_ASSIGN;
a948f713
DK
3396 __entry->len = skb->len;
3397 MAC_ASSIGN(from, eth_hdr(skb)->h_source);
3398 __entry->proto = be16_to_cpu(skb->protocol);
6a671a50 3399 __entry->unencrypted = unencrypted;
4c532321 3400 __entry->link_id = link_id;
6a671a50 3401 ),
4c532321 3402 TP_printk(NETDEV_PR_FMT ", len=%d, %pM, proto: 0x%x, unencrypted: %s, link: %d",
3d9c3617 3403 NETDEV_PR_ARG, __entry->len, __entry->from,
4c532321
JB
3404 __entry->proto, BOOL_TO_STR(__entry->unencrypted),
3405 __entry->link_id)
6a671a50
DK
3406);
3407
4ee3e063
BL
3408TRACE_EVENT(cfg80211_cqm_rssi_notify,
3409 TP_PROTO(struct net_device *netdev,
bee427b8
AZ
3410 enum nl80211_cqm_rssi_threshold_event rssi_event,
3411 s32 rssi_level),
3412 TP_ARGS(netdev, rssi_event, rssi_level),
4ee3e063
BL
3413 TP_STRUCT__entry(
3414 NETDEV_ENTRY
3415 __field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
bee427b8 3416 __field(s32, rssi_level)
4ee3e063
BL
3417 ),
3418 TP_fast_assign(
3419 NETDEV_ASSIGN;
3420 __entry->rssi_event = rssi_event;
bee427b8 3421 __entry->rssi_level = rssi_level;
4ee3e063 3422 ),
bee427b8
AZ
3423 TP_printk(NETDEV_PR_FMT ", rssi event: %d, level: %d",
3424 NETDEV_PR_ARG, __entry->rssi_event, __entry->rssi_level)
4ee3e063
BL
3425);
3426
683b6d3b 3427TRACE_EVENT(cfg80211_reg_can_beacon,
174e0cd2 3428 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
c1d8bd8d
JB
3429 enum nl80211_iftype iftype, u32 prohibited_flags,
3430 u32 permitting_flags),
3431 TP_ARGS(wiphy, chandef, iftype, prohibited_flags, permitting_flags),
4ee3e063
BL
3432 TP_STRUCT__entry(
3433 WIPHY_ENTRY
683b6d3b 3434 CHAN_DEF_ENTRY
174e0cd2 3435 __field(enum nl80211_iftype, iftype)
c1d8bd8d
JB
3436 __field(u32, prohibited_flags)
3437 __field(u32, permitting_flags)
4ee3e063
BL
3438 ),
3439 TP_fast_assign(
3440 WIPHY_ASSIGN;
683b6d3b 3441 CHAN_DEF_ASSIGN(chandef);
174e0cd2 3442 __entry->iftype = iftype;
c1d8bd8d
JB
3443 __entry->prohibited_flags = prohibited_flags;
3444 __entry->permitting_flags = permitting_flags;
4ee3e063 3445 ),
c1d8bd8d 3446 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d prohibited_flags=0x%x permitting_flags=0x%x",
923b352f 3447 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype,
c1d8bd8d 3448 __entry->prohibited_flags, __entry->permitting_flags)
4ee3e063
BL
3449);
3450
04f39047
SW
3451TRACE_EVENT(cfg80211_chandef_dfs_required,
3452 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
3453 TP_ARGS(wiphy, chandef),
3454 TP_STRUCT__entry(
3455 WIPHY_ENTRY
3456 CHAN_DEF_ENTRY
3457 ),
3458 TP_fast_assign(
3459 WIPHY_ASSIGN;
3460 CHAN_DEF_ASSIGN(chandef);
3461 ),
3462 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
3463 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
3464);
3465
4ee3e063 3466TRACE_EVENT(cfg80211_ch_switch_notify,
683b6d3b 3467 TP_PROTO(struct net_device *netdev,
7b0a0e3c 3468 struct cfg80211_chan_def *chandef,
b82730bf
JB
3469 unsigned int link_id),
3470 TP_ARGS(netdev, chandef, link_id),
4ee3e063
BL
3471 TP_STRUCT__entry(
3472 NETDEV_ENTRY
683b6d3b 3473 CHAN_DEF_ENTRY
7b0a0e3c 3474 __field(unsigned int, link_id)
4ee3e063
BL
3475 ),
3476 TP_fast_assign(
3477 NETDEV_ASSIGN;
683b6d3b 3478 CHAN_DEF_ASSIGN(chandef);
7b0a0e3c 3479 __entry->link_id = link_id;
4ee3e063 3480 ),
b82730bf
JB
3481 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT ", link:%d",
3482 NETDEV_PR_ARG, CHAN_DEF_PR_ARG, __entry->link_id)
4ee3e063
BL
3483);
3484
f8d7552e
LC
3485TRACE_EVENT(cfg80211_ch_switch_started_notify,
3486 TP_PROTO(struct net_device *netdev,
b8c9024e 3487 struct cfg80211_chan_def *chandef,
b82730bf
JB
3488 unsigned int link_id),
3489 TP_ARGS(netdev, chandef, link_id),
f8d7552e
LC
3490 TP_STRUCT__entry(
3491 NETDEV_ENTRY
3492 CHAN_DEF_ENTRY
b8c9024e 3493 __field(unsigned int, link_id)
f8d7552e
LC
3494 ),
3495 TP_fast_assign(
3496 NETDEV_ASSIGN;
3497 CHAN_DEF_ASSIGN(chandef);
b8c9024e 3498 __entry->link_id = link_id;
f8d7552e 3499 ),
b82730bf
JB
3500 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT ", link:%d",
3501 NETDEV_PR_ARG, CHAN_DEF_PR_ARG, __entry->link_id)
f8d7552e
LC
3502);
3503
04f39047 3504TRACE_EVENT(cfg80211_radar_event,
c47240cb
LB
3505 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
3506 bool offchan),
3507 TP_ARGS(wiphy, chandef, offchan),
04f39047
SW
3508 TP_STRUCT__entry(
3509 WIPHY_ENTRY
3510 CHAN_DEF_ENTRY
c47240cb 3511 __field(bool, offchan)
04f39047
SW
3512 ),
3513 TP_fast_assign(
3514 WIPHY_ASSIGN;
3515 CHAN_DEF_ASSIGN(chandef);
c47240cb 3516 __entry->offchan = offchan;
04f39047 3517 ),
c47240cb
LB
3518 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", offchan %d",
3519 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->offchan)
04f39047
SW
3520);
3521
3522TRACE_EVENT(cfg80211_cac_event,
81f67d60
AKS
3523 TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt,
3524 unsigned int link_id),
3525 TP_ARGS(netdev, evt, link_id),
04f39047
SW
3526 TP_STRUCT__entry(
3527 NETDEV_ENTRY
3528 __field(enum nl80211_radar_event, evt)
81f67d60 3529 __field(unsigned int, link_id)
04f39047
SW
3530 ),
3531 TP_fast_assign(
3532 NETDEV_ASSIGN;
3533 __entry->evt = evt;
81f67d60 3534 __entry->link_id = link_id;
04f39047 3535 ),
81f67d60
AKS
3536 TP_printk(NETDEV_PR_FMT ", event: %d, link_id=%u",
3537 NETDEV_PR_ARG, __entry->evt, __entry->link_id)
04f39047
SW
3538);
3539
4ee3e063
BL
3540DECLARE_EVENT_CLASS(cfg80211_rx_evt,
3541 TP_PROTO(struct net_device *netdev, const u8 *addr),
3542 TP_ARGS(netdev, addr),
3543 TP_STRUCT__entry(
3544 NETDEV_ENTRY
3545 MAC_ENTRY(addr)
3546 ),
3547 TP_fast_assign(
3548 NETDEV_ASSIGN;
3549 MAC_ASSIGN(addr, addr);
3550 ),
3d9c3617 3551 TP_printk(NETDEV_PR_FMT ", %pM", NETDEV_PR_ARG, __entry->addr)
4ee3e063
BL
3552);
3553
4ee3e063
BL
3554DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
3555 TP_PROTO(struct net_device *netdev, const u8 *addr),
3556 TP_ARGS(netdev, addr)
3557);
3558
3559DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
3560 TP_PROTO(struct net_device *netdev, const u8 *addr),
3561 TP_ARGS(netdev, addr)
3562);
3563
fe94f3a4
AQ
3564TRACE_EVENT(cfg80211_ibss_joined,
3565 TP_PROTO(struct net_device *netdev, const u8 *bssid,
3566 struct ieee80211_channel *channel),
3567 TP_ARGS(netdev, bssid, channel),
3568 TP_STRUCT__entry(
3569 NETDEV_ENTRY
3570 MAC_ENTRY(bssid)
3571 CHAN_ENTRY
3572 ),
3573 TP_fast_assign(
3574 NETDEV_ASSIGN;
3575 MAC_ASSIGN(bssid, bssid);
3576 CHAN_ASSIGN(channel);
3577 ),
3d9c3617
JB
3578 TP_printk(NETDEV_PR_FMT ", bssid: %pM, " CHAN_PR_FMT,
3579 NETDEV_PR_ARG, __entry->bssid, CHAN_PR_ARG)
fe94f3a4
AQ
3580);
3581
4ee3e063
BL
3582TRACE_EVENT(cfg80211_probe_status,
3583 TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
3584 bool acked),
3585 TP_ARGS(netdev, addr, cookie, acked),
3586 TP_STRUCT__entry(
3587 NETDEV_ENTRY
3588 MAC_ENTRY(addr)
3589 __field(u64, cookie)
3590 __field(bool, acked)
3591 ),
3592 TP_fast_assign(
3593 NETDEV_ASSIGN;
3594 MAC_ASSIGN(addr, addr);
3595 __entry->cookie = cookie;
3596 __entry->acked = acked;
3597 ),
3d9c3617
JB
3598 TP_printk(NETDEV_PR_FMT " addr:%pM, cookie: %llu, acked: %s",
3599 NETDEV_PR_ARG, __entry->addr, __entry->cookie,
4ee3e063
BL
3600 BOOL_TO_STR(__entry->acked))
3601);
3602
3603TRACE_EVENT(cfg80211_cqm_pktloss_notify,
3604 TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
3605 TP_ARGS(netdev, peer, num_packets),
3606 TP_STRUCT__entry(
3607 NETDEV_ENTRY
3608 MAC_ENTRY(peer)
3609 __field(u32, num_packets)
3610 ),
3611 TP_fast_assign(
3612 NETDEV_ASSIGN;
3613 MAC_ASSIGN(peer, peer);
3614 __entry->num_packets = num_packets;
3615 ),
3d9c3617
JB
3616 TP_printk(NETDEV_PR_FMT ", peer: %pM, num of lost packets: %u",
3617 NETDEV_PR_ARG, __entry->peer, __entry->num_packets)
4ee3e063
BL
3618);
3619
3620DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
3621 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
3622 TP_ARGS(netdev, macaddr)
3623);
3624
3625TRACE_EVENT(cfg80211_pmksa_candidate_notify,
3626 TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
3627 bool preauth),
3628 TP_ARGS(netdev, index, bssid, preauth),
3629 TP_STRUCT__entry(
3630 NETDEV_ENTRY
3631 __field(int, index)
3632 MAC_ENTRY(bssid)
3633 __field(bool, preauth)
3634 ),
3635 TP_fast_assign(
3636 NETDEV_ASSIGN;
3637 __entry->index = index;
3638 MAC_ASSIGN(bssid, bssid);
3639 __entry->preauth = preauth;
3640 ),
3d9c3617
JB
3641 TP_printk(NETDEV_PR_FMT ", index:%d, bssid: %pM, pre auth: %s",
3642 NETDEV_PR_ARG, __entry->index, __entry->bssid,
4ee3e063
BL
3643 BOOL_TO_STR(__entry->preauth))
3644);
3645
3646TRACE_EVENT(cfg80211_report_obss_beacon,
3647 TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
3648 int freq, int sig_dbm),
3649 TP_ARGS(wiphy, frame, len, freq, sig_dbm),
3650 TP_STRUCT__entry(
3651 WIPHY_ENTRY
3652 __field(int, freq)
3653 __field(int, sig_dbm)
3654 ),
3655 TP_fast_assign(
3656 WIPHY_ASSIGN;
3657 __entry->freq = freq;
3658 __entry->sig_dbm = sig_dbm;
3659 ),
e76fede8
TP
3660 TP_printk(WIPHY_PR_FMT ", freq: "KHZ_F", sig_dbm: %d",
3661 WIPHY_PR_ARG, PR_KHZ(__entry->freq), __entry->sig_dbm)
4ee3e063
BL
3662);
3663
3475b094
JM
3664TRACE_EVENT(cfg80211_tdls_oper_request,
3665 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
3666 enum nl80211_tdls_operation oper, u16 reason_code),
3667 TP_ARGS(wiphy, netdev, peer, oper, reason_code),
3668 TP_STRUCT__entry(
3669 WIPHY_ENTRY
3670 NETDEV_ENTRY
3671 MAC_ENTRY(peer)
3672 __field(enum nl80211_tdls_operation, oper)
3673 __field(u16, reason_code)
3674 ),
3675 TP_fast_assign(
3676 WIPHY_ASSIGN;
3677 NETDEV_ASSIGN;
3678 MAC_ASSIGN(peer, peer);
3679 __entry->oper = oper;
3680 __entry->reason_code = reason_code;
3681 ),
3d9c3617
JB
3682 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: %pM, oper: %d, reason_code %u",
3683 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->peer, __entry->oper,
3475b094
JM
3684 __entry->reason_code)
3685 );
3686
4ee3e063 3687TRACE_EVENT(cfg80211_scan_done,
1d76250b
AS
3688 TP_PROTO(struct cfg80211_scan_request *request,
3689 struct cfg80211_scan_info *info),
3690 TP_ARGS(request, info),
4ee3e063
BL
3691 TP_STRUCT__entry(
3692 __field(u32, n_channels)
3693 __dynamic_array(u8, ie, request ? request->ie_len : 0)
57fbcce3 3694 __array(u32, rates, NUM_NL80211_BANDS)
4ee3e063
BL
3695 __field(u32, wdev_id)
3696 MAC_ENTRY(wiphy_mac)
3697 __field(bool, no_cck)
3698 __field(bool, aborted)
1d76250b
AS
3699 __field(u64, scan_start_tsf)
3700 MAC_ENTRY(tsf_bssid)
4ee3e063
BL
3701 ),
3702 TP_fast_assign(
3703 if (request) {
3704 memcpy(__get_dynamic_array(ie), request->ie,
3705 request->ie_len);
3706 memcpy(__entry->rates, request->rates,
57fbcce3 3707 NUM_NL80211_BANDS);
4ee3e063
BL
3708 __entry->wdev_id = request->wdev ?
3709 request->wdev->identifier : 0;
3710 if (request->wiphy)
3711 MAC_ASSIGN(wiphy_mac,
3712 request->wiphy->perm_addr);
3713 __entry->no_cck = request->no_cck;
3714 }
1d76250b
AS
3715 if (info) {
3716 __entry->aborted = info->aborted;
3717 __entry->scan_start_tsf = info->scan_start_tsf;
3718 MAC_ASSIGN(tsf_bssid, info->tsf_bssid);
3719 }
4ee3e063 3720 ),
3d9c3617 3721 TP_printk("aborted: %s, scan start (TSF): %llu, tsf_bssid: %pM",
1d76250b
AS
3722 BOOL_TO_STR(__entry->aborted),
3723 (unsigned long long)__entry->scan_start_tsf,
3d9c3617 3724 __entry->tsf_bssid)
4ee3e063
BL
3725);
3726
b34939b9
AVS
3727DECLARE_EVENT_CLASS(wiphy_id_evt,
3728 TP_PROTO(struct wiphy *wiphy, u64 id),
3729 TP_ARGS(wiphy, id),
3730 TP_STRUCT__entry(
3731 WIPHY_ENTRY
3732 __field(u64, id)
3733 ),
3734 TP_fast_assign(
3735 WIPHY_ASSIGN;
3736 __entry->id = id;
3737 ),
3738 TP_printk(WIPHY_PR_FMT ", id: %llu", WIPHY_PR_ARG, __entry->id)
4ee3e063
BL
3739);
3740
b34939b9
AVS
3741DEFINE_EVENT(wiphy_id_evt, cfg80211_sched_scan_stopped,
3742 TP_PROTO(struct wiphy *wiphy, u64 id),
3743 TP_ARGS(wiphy, id)
3744);
3745
3746DEFINE_EVENT(wiphy_id_evt, cfg80211_sched_scan_results,
3747 TP_PROTO(struct wiphy *wiphy, u64 id),
3748 TP_ARGS(wiphy, id)
4ee3e063
BL
3749);
3750
3751TRACE_EVENT(cfg80211_get_bss,
3752 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
3753 const u8 *bssid, const u8 *ssid, size_t ssid_len,
6eb18137
DL
3754 enum ieee80211_bss_type bss_type,
3755 enum ieee80211_privacy privacy),
3756 TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, bss_type, privacy),
4ee3e063
BL
3757 TP_STRUCT__entry(
3758 WIPHY_ENTRY
3759 CHAN_ENTRY
3760 MAC_ENTRY(bssid)
3761 __dynamic_array(u8, ssid, ssid_len)
6eb18137
DL
3762 __field(enum ieee80211_bss_type, bss_type)
3763 __field(enum ieee80211_privacy, privacy)
4ee3e063
BL
3764 ),
3765 TP_fast_assign(
3766 WIPHY_ASSIGN;
3767 CHAN_ASSIGN(channel);
3768 MAC_ASSIGN(bssid, bssid);
3769 memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
6eb18137
DL
3770 __entry->bss_type = bss_type;
3771 __entry->privacy = privacy;
3772 ),
3d9c3617 3773 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", %pM"
6eb18137 3774 ", buf: %#.2x, bss_type: %d, privacy: %d",
3d9c3617 3775 WIPHY_PR_ARG, CHAN_PR_ARG, __entry->bssid,
6eb18137
DL
3776 ((u8 *)__get_dynamic_array(ssid))[0], __entry->bss_type,
3777 __entry->privacy)
4ee3e063
BL
3778);
3779
6e19bc4b
DS
3780TRACE_EVENT(cfg80211_inform_bss_frame,
3781 TP_PROTO(struct wiphy *wiphy, struct cfg80211_inform_bss *data,
3782 struct ieee80211_mgmt *mgmt, size_t len),
3783 TP_ARGS(wiphy, data, mgmt, len),
4ee3e063
BL
3784 TP_STRUCT__entry(
3785 WIPHY_ENTRY
3786 CHAN_ENTRY
3787 __dynamic_array(u8, mgmt, len)
3788 __field(s32, signal)
6e19bc4b 3789 __field(u64, ts_boottime)
1d76250b
AS
3790 __field(u64, parent_tsf)
3791 MAC_ENTRY(parent_bssid)
4ee3e063
BL
3792 ),
3793 TP_fast_assign(
3794 WIPHY_ASSIGN;
6e19bc4b 3795 CHAN_ASSIGN(data->chan);
4ee3e063
BL
3796 if (mgmt)
3797 memcpy(__get_dynamic_array(mgmt), mgmt, len);
6e19bc4b
DS
3798 __entry->signal = data->signal;
3799 __entry->ts_boottime = data->boottime_ns;
1d76250b
AS
3800 __entry->parent_tsf = data->parent_tsf;
3801 MAC_ASSIGN(parent_bssid, data->parent_bssid);
3802 ),
3803 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT
5add321c
JB
3804 "signal: %d, tsb:%llu, detect_tsf:%llu, tsf_bssid: %pM",
3805 WIPHY_PR_ARG, CHAN_PR_ARG,
1d76250b
AS
3806 __entry->signal, (unsigned long long)__entry->ts_boottime,
3807 (unsigned long long)__entry->parent_tsf,
3d9c3617 3808 __entry->parent_bssid)
4ee3e063
BL
3809);
3810
3811DECLARE_EVENT_CLASS(cfg80211_bss_evt,
3812 TP_PROTO(struct cfg80211_bss *pub),
3813 TP_ARGS(pub),
3814 TP_STRUCT__entry(
3815 MAC_ENTRY(bssid)
3816 CHAN_ENTRY
3817 ),
3818 TP_fast_assign(
3819 MAC_ASSIGN(bssid, pub->bssid);
3820 CHAN_ASSIGN(pub->channel);
3821 ),
3d9c3617 3822 TP_printk("%pM, " CHAN_PR_FMT, __entry->bssid, CHAN_PR_ARG)
4ee3e063
BL
3823);
3824
3825DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
3826 TP_PROTO(struct cfg80211_bss *pub),
3827 TP_ARGS(pub)
3828);
3829
3830TRACE_EVENT(cfg80211_return_uint,
3831 TP_PROTO(unsigned int ret),
3832 TP_ARGS(ret),
3833 TP_STRUCT__entry(
3834 __field(unsigned int, ret)
3835 ),
3836 TP_fast_assign(
3837 __entry->ret = ret;
3838 ),
3839 TP_printk("ret: %d", __entry->ret)
3840);
3841
3842TRACE_EVENT(cfg80211_return_u32,
3843 TP_PROTO(u32 ret),
3844 TP_ARGS(ret),
3845 TP_STRUCT__entry(
3846 __field(u32, ret)
3847 ),
3848 TP_fast_assign(
3849 __entry->ret = ret;
3850 ),
3851 TP_printk("ret: %u", __entry->ret)
3852);
3853
cd8f7cb4
JB
3854TRACE_EVENT(cfg80211_report_wowlan_wakeup,
3855 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
3856 struct cfg80211_wowlan_wakeup *wakeup),
3857 TP_ARGS(wiphy, wdev, wakeup),
3858 TP_STRUCT__entry(
3859 WIPHY_ENTRY
3860 WDEV_ENTRY
a92eecbb 3861 __field(bool, non_wireless)
cd8f7cb4
JB
3862 __field(bool, disconnect)
3863 __field(bool, magic_pkt)
3864 __field(bool, gtk_rekey_failure)
3865 __field(bool, eap_identity_req)
3866 __field(bool, four_way_handshake)
3867 __field(bool, rfkill_release)
3868 __field(s32, pattern_idx)
3869 __field(u32, packet_len)
a92eecbb
JB
3870 __dynamic_array(u8, packet,
3871 wakeup ? wakeup->packet_present_len : 0)
cd8f7cb4
JB
3872 ),
3873 TP_fast_assign(
3874 WIPHY_ASSIGN;
3875 WDEV_ASSIGN;
a92eecbb
JB
3876 __entry->non_wireless = !wakeup;
3877 __entry->disconnect = wakeup ? wakeup->disconnect : false;
3878 __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
3879 __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
3880 __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
3881 __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
3882 __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
3883 __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
3884 __entry->packet_len = wakeup ? wakeup->packet_len : false;
3885 if (wakeup && wakeup->packet && wakeup->packet_present_len)
cd8f7cb4
JB
3886 memcpy(__get_dynamic_array(packet), wakeup->packet,
3887 wakeup->packet_present_len);
3888 ),
3889 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
3890);
3891
355199e0
JM
3892TRACE_EVENT(cfg80211_ft_event,
3893 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3894 struct cfg80211_ft_event_params *ft_event),
3895 TP_ARGS(wiphy, netdev, ft_event),
3896 TP_STRUCT__entry(
3897 WIPHY_ENTRY
3898 NETDEV_ENTRY
3899 __dynamic_array(u8, ies, ft_event->ies_len)
3900 MAC_ENTRY(target_ap)
3901 __dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
3902 ),
3903 TP_fast_assign(
3904 WIPHY_ASSIGN;
3905 NETDEV_ASSIGN;
3906 if (ft_event->ies)
3907 memcpy(__get_dynamic_array(ies), ft_event->ies,
3908 ft_event->ies_len);
3909 MAC_ASSIGN(target_ap, ft_event->target_ap);
3910 if (ft_event->ric_ies)
3911 memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
3912 ft_event->ric_ies_len);
3913 ),
3d9c3617
JB
3914 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: %pM",
3915 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->target_ap)
355199e0
JM
3916);
3917
f04c2203
MK
3918TRACE_EVENT(cfg80211_stop_iface,
3919 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
3920 TP_ARGS(wiphy, wdev),
3921 TP_STRUCT__entry(
3922 WIPHY_ENTRY
3923 WDEV_ENTRY
3924 ),
3925 TP_fast_assign(
3926 WIPHY_ASSIGN;
3927 WDEV_ASSIGN;
3928 ),
3929 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
3930 WIPHY_PR_ARG, WDEV_PR_ARG)
3931);
9bb7e0f2
JB
3932
3933TRACE_EVENT(cfg80211_pmsr_report,
3934 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
3935 u64 cookie, const u8 *addr),
3936 TP_ARGS(wiphy, wdev, cookie, addr),
3937 TP_STRUCT__entry(
3938 WIPHY_ENTRY
3939 WDEV_ENTRY
3940 __field(u64, cookie)
3941 MAC_ENTRY(addr)
3942 ),
3943 TP_fast_assign(
3944 WIPHY_ASSIGN;
3945 WDEV_ASSIGN;
3946 __entry->cookie = cookie;
3947 MAC_ASSIGN(addr, addr);
3948 ),
3d9c3617 3949 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie:%lld, %pM",
9bb7e0f2
JB
3950 WIPHY_PR_ARG, WDEV_PR_ARG,
3951 (unsigned long long)__entry->cookie,
3d9c3617 3952 __entry->addr)
9bb7e0f2
JB
3953);
3954
3955TRACE_EVENT(cfg80211_pmsr_complete,
3956 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
3957 TP_ARGS(wiphy, wdev, cookie),
3958 TP_STRUCT__entry(
3959 WIPHY_ENTRY
3960 WDEV_ENTRY
3961 __field(u64, cookie)
3962 ),
3963 TP_fast_assign(
3964 WIPHY_ASSIGN;
3965 WDEV_ASSIGN;
3966 __entry->cookie = cookie;
3967 ),
3968 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie:%lld",
3969 WIPHY_PR_ARG, WDEV_PR_ARG,
3970 (unsigned long long)__entry->cookie)
3971);
cb74e977 3972
cb74e977 3973TRACE_EVENT(cfg80211_update_owe_info_event,
8bb588d9
VJ
3974 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3975 struct cfg80211_update_owe_info *owe_info),
3976 TP_ARGS(wiphy, netdev, owe_info),
3977 TP_STRUCT__entry(
3978 WIPHY_ENTRY
3979 NETDEV_ENTRY
3980 MAC_ENTRY(peer)
3981 __dynamic_array(u8, ie, owe_info->ie_len)
3982 __field(int, assoc_link_id)
3983 MAC_ENTRY(peer_mld_addr)
3984 ),
3985 TP_fast_assign(
3986 WIPHY_ASSIGN;
3987 NETDEV_ASSIGN;
3988 MAC_ASSIGN(peer, owe_info->peer);
3989 memcpy(__get_dynamic_array(ie), owe_info->ie,
3990 owe_info->ie_len);
3991 __entry->assoc_link_id = owe_info->assoc_link_id;
3992 MAC_ASSIGN(peer_mld_addr, owe_info->peer_mld_addr);
3993 ),
3994 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: %pM,"
3995 " assoc_link_id: %d, peer_mld_addr: %pM",
3996 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->peer,
3997 __entry->assoc_link_id, __entry->peer_mld_addr)
cb74e977
SD
3998);
3999
0d2ab3ae
JC
4000TRACE_EVENT(cfg80211_bss_color_notify,
4001 TP_PROTO(struct net_device *netdev,
4002 enum nl80211_commands cmd,
4003 u8 count, u64 color_bitmap),
4004 TP_ARGS(netdev, cmd, count, color_bitmap),
4005 TP_STRUCT__entry(
4006 NETDEV_ENTRY
c448f0fd 4007 __field(u32, cmd)
0d2ab3ae
JC
4008 __field(u8, count)
4009 __field(u64, color_bitmap)
4010 ),
4011 TP_fast_assign(
4012 NETDEV_ASSIGN;
4013 __entry->cmd = cmd;
4014 __entry->count = count;
4015 __entry->color_bitmap = color_bitmap;
4016 ),
4017 TP_printk(NETDEV_PR_FMT ", cmd: %x, count: %u, bitmap: %llx",
4018 NETDEV_PR_ARG, __entry->cmd, __entry->count,
4019 __entry->color_bitmap)
4020);
4021
a083ee8a 4022TRACE_EVENT(cfg80211_assoc_comeback,
e69dac88
JB
4023 TP_PROTO(struct wireless_dev *wdev, const u8 *ap_addr, u32 timeout),
4024 TP_ARGS(wdev, ap_addr, timeout),
a083ee8a
IP
4025 TP_STRUCT__entry(
4026 WDEV_ENTRY
e69dac88 4027 MAC_ENTRY(ap_addr)
a083ee8a
IP
4028 __field(u32, timeout)
4029 ),
4030 TP_fast_assign(
4031 WDEV_ASSIGN;
e69dac88 4032 MAC_ASSIGN(ap_addr, ap_addr);
a083ee8a
IP
4033 __entry->timeout = timeout;
4034 ),
3d9c3617
JB
4035 TP_printk(WDEV_PR_FMT ", %pM, timeout: %u TUs",
4036 WDEV_PR_ARG, __entry->ap_addr, __entry->timeout)
a083ee8a
IP
4037);
4038
577e5b8c
ST
4039DECLARE_EVENT_CLASS(link_station_add_mod,
4040 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
4041 struct link_station_parameters *params),
4042 TP_ARGS(wiphy, netdev, params),
4043 TP_STRUCT__entry(
4044 WIPHY_ENTRY
4045 NETDEV_ENTRY
4046 __array(u8, mld_mac, 6)
4047 __array(u8, link_mac, 6)
4048 __field(u32, link_id)
4049 __dynamic_array(u8, supported_rates,
4050 params->supported_rates_len)
4051 __array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap))
4052 __array(u8, vht_capa, (int)sizeof(struct ieee80211_vht_cap))
4053 __field(u8, opmode_notif)
4054 __field(bool, opmode_notif_used)
4055 __dynamic_array(u8, he_capa, params->he_capa_len)
4056 __array(u8, he_6ghz_capa, (int)sizeof(struct ieee80211_he_6ghz_capa))
4057 __dynamic_array(u8, eht_capa, params->eht_capa_len)
4058 ),
4059 TP_fast_assign(
4060 WIPHY_ASSIGN;
4061 NETDEV_ASSIGN;
4062 memset(__entry->mld_mac, 0, 6);
4063 memset(__entry->link_mac, 0, 6);
4064 if (params->mld_mac)
4065 memcpy(__entry->mld_mac, params->mld_mac, 6);
4066 if (params->link_mac)
4067 memcpy(__entry->link_mac, params->link_mac, 6);
4068 __entry->link_id = params->link_id;
4069 if (params->supported_rates && params->supported_rates_len)
4070 memcpy(__get_dynamic_array(supported_rates),
4071 params->supported_rates,
4072 params->supported_rates_len);
4073 memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap));
4074 if (params->ht_capa)
4075 memcpy(__entry->ht_capa, params->ht_capa,
4076 sizeof(struct ieee80211_ht_cap));
4077 memset(__entry->vht_capa, 0, sizeof(struct ieee80211_vht_cap));
4078 if (params->vht_capa)
4079 memcpy(__entry->vht_capa, params->vht_capa,
4080 sizeof(struct ieee80211_vht_cap));
4081 __entry->opmode_notif = params->opmode_notif;
4082 __entry->opmode_notif_used = params->opmode_notif_used;
4083 if (params->he_capa && params->he_capa_len)
4084 memcpy(__get_dynamic_array(he_capa), params->he_capa,
4085 params->he_capa_len);
4086 memset(__entry->he_6ghz_capa, 0, sizeof(struct ieee80211_he_6ghz_capa));
4087 if (params->he_6ghz_capa)
4088 memcpy(__entry->he_6ghz_capa, params->he_6ghz_capa,
4089 sizeof(struct ieee80211_he_6ghz_capa));
4090 if (params->eht_capa && params->eht_capa_len)
4091 memcpy(__get_dynamic_array(eht_capa), params->eht_capa,
4092 params->eht_capa_len);
4093 ),
3d9c3617
JB
4094 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: %pM"
4095 ", link mac: %pM, link id: %u",
4096 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mld_mac,
4097 __entry->link_mac, __entry->link_id)
577e5b8c
ST
4098);
4099
4100DEFINE_EVENT(link_station_add_mod, rdev_add_link_station,
4101 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
4102 struct link_station_parameters *params),
4103 TP_ARGS(wiphy, netdev, params)
4104);
4105
4106DEFINE_EVENT(link_station_add_mod, rdev_mod_link_station,
4107 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
4108 struct link_station_parameters *params),
4109 TP_ARGS(wiphy, netdev, params)
4110);
4111
065563b2
VJ
4112TRACE_EVENT(cfg80211_links_removed,
4113 TP_PROTO(struct net_device *netdev, u16 link_mask),
4114 TP_ARGS(netdev, link_mask),
4115 TP_STRUCT__entry(
4116 NETDEV_ENTRY
4117 __field(u16, link_mask)
4118 ),
4119 TP_fast_assign(
4120 NETDEV_ASSIGN;
4121 __entry->link_mask = link_mask;
4122 ),
31320ccb 4123 TP_printk(NETDEV_PR_FMT ", link_mask:0x%x", NETDEV_PR_ARG,
065563b2
VJ
4124 __entry->link_mask)
4125);
4126
65c1c041
IP
4127TRACE_EVENT(cfg80211_mlo_reconf_add_done,
4128 TP_PROTO(struct net_device *netdev, u16 link_mask,
4129 const u8 *buf, size_t len),
4130 TP_ARGS(netdev, link_mask, buf, len),
4131 TP_STRUCT__entry(
4132 NETDEV_ENTRY
4133 __field(u16, link_mask)
4134 __dynamic_array(u8, buf, len)
4135 ),
4136 TP_fast_assign(
4137 NETDEV_ASSIGN;
4138 __entry->link_mask = link_mask;
4139 memcpy(__get_dynamic_array(buf), buf, len);
4140 ),
4141 TP_printk(NETDEV_PR_FMT ", link_mask:0x%x",
4142 NETDEV_PR_ARG, __entry->link_mask)
4143);
4144
4145TRACE_EVENT(rdev_assoc_ml_reconf,
4146 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
a096a860
JB
4147 struct cfg80211_ml_reconf_req *req),
4148 TP_ARGS(wiphy, netdev, req),
65c1c041
IP
4149 TP_STRUCT__entry(
4150 WIPHY_ENTRY
4151 NETDEV_ENTRY
4152 __field(u16, add_links)
4153 __field(u16, rem_links)
96924137 4154 __field(u16, ext_mld_capa_ops)
65c1c041
IP
4155 ),
4156 TP_fast_assign(
4157 WIPHY_ASSIGN;
4158 NETDEV_ASSIGN;
4159 u32 i;
4160
4161 __entry->add_links = 0;
a096a860
JB
4162 __entry->rem_links = req->rem_links;
4163 for (i = 0; i < IEEE80211_MLD_MAX_NUM_LINKS; i++)
4164 if (req->add_links[i].bss)
65c1c041 4165 __entry->add_links |= BIT(i);
96924137 4166 __entry->ext_mld_capa_ops = req->ext_mld_capa_ops;
65c1c041
IP
4167 ),
4168 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", add_links=0x%x, rem_links=0x%x",
4169 WIPHY_PR_ARG, NETDEV_PR_ARG,
4170 __entry->add_links, __entry->rem_links)
4171);
904c2773
IP
4172
4173TRACE_EVENT(cfg80211_epcs_changed,
4174 TP_PROTO(struct wireless_dev *wdev, bool enabled),
4175 TP_ARGS(wdev, enabled),
4176 TP_STRUCT__entry(
4177 WDEV_ENTRY
4178 __field(u32, enabled)
4179 ),
4180 TP_fast_assign(
4181 WDEV_ASSIGN;
4182 __entry->enabled = enabled;
4183 ),
4184 TP_printk(WDEV_PR_FMT ", enabled=%u",
4185 WDEV_PR_ARG, __entry->enabled)
4186);
4187
14e8a3c4
BL
4188#endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
4189
4190#undef TRACE_INCLUDE_PATH
4191#define TRACE_INCLUDE_PATH .
4192#undef TRACE_INCLUDE_FILE
4193#define TRACE_INCLUDE_FILE trace
4194#include <trace/define_trace.h>