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