wifi: cfg80211: sort trace.h
[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
JB
740 __dynamic_array(u8, supported_rates,
741 params->supported_rates_len)
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));
761 if (params->ht_capa)
762 memcpy(__entry->ht_capa, params->ht_capa,
763 sizeof(struct ieee80211_ht_cap));
6e045905
JB
764 memset(__entry->vht_capa, 0, sizeof(struct ieee80211_vht_cap));
765 if (params->vht_capa)
766 memcpy(__entry->vht_capa, params->vht_capa,
767 sizeof(struct ieee80211_vht_cap));
5d8325ec
JB
768 memset(__entry->vlan, 0, sizeof(__entry->vlan));
769 if (params->vlan)
770 memcpy(__entry->vlan, params->vlan->name, IFNAMSIZ);
6e045905
JB
771 if (params->supported_rates && params->supported_rates_len)
772 memcpy(__get_dynamic_array(supported_rates),
773 params->supported_rates,
774 params->supported_rates_len);
775 if (params->ext_capab && params->ext_capab_len)
776 memcpy(__get_dynamic_array(ext_capab),
777 params->ext_capab,
778 params->ext_capab_len);
779 if (params->supported_channels &&
780 params->supported_channels_len)
781 memcpy(__get_dynamic_array(supported_channels),
782 params->supported_channels,
783 params->supported_channels_len);
784 if (params->supported_oper_classes &&
785 params->supported_oper_classes_len)
786 memcpy(__get_dynamic_array(supported_oper_classes),
787 params->supported_oper_classes,
788 params->supported_oper_classes_len);
789 __entry->max_sp = params->max_sp;
790 __entry->capability = params->capability;
791 __entry->opmode_notif = params->opmode_notif;
792 __entry->opmode_notif_used = params->opmode_notif_used;
14e8a3c4 793 ),
ec816087 794 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
14e8a3c4
BL
795 ", station flags mask: %u, station flags set: %u, "
796 "station modify mask: %u, listen interval: %d, aid: %u, "
5d8325ec 797 "plink action: %u, plink state: %u, uapsd queues: %u, vlan:%s",
14e8a3c4
BL
798 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
799 __entry->sta_flags_mask, __entry->sta_flags_set,
800 __entry->sta_modify_mask, __entry->listen_interval,
801 __entry->aid, __entry->plink_action, __entry->plink_state,
5d8325ec 802 __entry->uapsd_queues, __entry->vlan)
14e8a3c4
BL
803);
804
805DEFINE_EVENT(station_add_change, rdev_add_station,
806 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
807 struct station_parameters *params),
808 TP_ARGS(wiphy, netdev, mac, params)
809);
810
811DEFINE_EVENT(station_add_change, rdev_change_station,
812 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
813 struct station_parameters *params),
814 TP_ARGS(wiphy, netdev, mac, params)
815);
816
817DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
818 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
819 TP_ARGS(wiphy, netdev, mac),
820 TP_STRUCT__entry(
821 WIPHY_ENTRY
822 NETDEV_ENTRY
823 MAC_ENTRY(sta_mac)
824 ),
825 TP_fast_assign(
826 WIPHY_ASSIGN;
827 NETDEV_ASSIGN;
828 MAC_ASSIGN(sta_mac, mac);
829 ),
ec816087 830 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
14e8a3c4
BL
831 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac))
832);
833
89c771e5
JM
834DECLARE_EVENT_CLASS(station_del,
835 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
836 struct station_del_parameters *params),
837 TP_ARGS(wiphy, netdev, params),
838 TP_STRUCT__entry(
839 WIPHY_ENTRY
840 NETDEV_ENTRY
841 MAC_ENTRY(sta_mac)
98856866
JM
842 __field(u8, subtype)
843 __field(u16, reason_code)
89c771e5
JM
844 ),
845 TP_fast_assign(
846 WIPHY_ASSIGN;
847 NETDEV_ASSIGN;
848 MAC_ASSIGN(sta_mac, params->mac);
98856866
JM
849 __entry->subtype = params->subtype;
850 __entry->reason_code = params->reason_code;
89c771e5 851 ),
98856866
JM
852 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
853 ", subtype: %u, reason_code: %u",
854 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
855 __entry->subtype, __entry->reason_code)
89c771e5
JM
856);
857
858DEFINE_EVENT(station_del, rdev_del_station,
859 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
860 struct station_del_parameters *params),
861 TP_ARGS(wiphy, netdev, params)
14e8a3c4
BL
862);
863
864DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station,
865 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
866 TP_ARGS(wiphy, netdev, mac)
867);
868
869DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
870 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
871 TP_ARGS(wiphy, netdev, mac)
872);
873
14e8a3c4 874TRACE_EVENT(rdev_dump_station,
aaaa10e0 875 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
14e8a3c4 876 u8 *mac),
aaaa10e0 877 TP_ARGS(wiphy, netdev, _idx, mac),
14e8a3c4
BL
878 TP_STRUCT__entry(
879 WIPHY_ENTRY
880 NETDEV_ENTRY
881 MAC_ENTRY(sta_mac)
882 __field(int, idx)
883 ),
884 TP_fast_assign(
885 WIPHY_ASSIGN;
886 NETDEV_ASSIGN;
887 MAC_ASSIGN(sta_mac, mac);
aaaa10e0 888 __entry->idx = _idx;
14e8a3c4 889 ),
ec816087 890 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d",
14e8a3c4
BL
891 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
892 __entry->idx)
893);
894
895TRACE_EVENT(rdev_return_int_station_info,
896 TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo),
897 TP_ARGS(wiphy, ret, sinfo),
898 TP_STRUCT__entry(
899 WIPHY_ENTRY
900 __field(int, ret)
901 SINFO_ENTRY
902 ),
903 TP_fast_assign(
904 WIPHY_ASSIGN;
905 __entry->ret = ret;
906 SINFO_ASSIGN;
907 ),
908 TP_printk(WIPHY_PR_FMT ", returned %d" ,
909 WIPHY_PR_ARG, __entry->ret)
910);
911
912DECLARE_EVENT_CLASS(mpath_evt,
913 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
914 u8 *next_hop),
915 TP_ARGS(wiphy, netdev, dst, next_hop),
916 TP_STRUCT__entry(
917 WIPHY_ENTRY
918 NETDEV_ENTRY
919 MAC_ENTRY(dst)
920 MAC_ENTRY(next_hop)
921 ),
922 TP_fast_assign(
923 WIPHY_ASSIGN;
924 NETDEV_ASSIGN;
925 MAC_ASSIGN(dst, dst);
926 MAC_ASSIGN(next_hop, next_hop);
927 ),
ec816087 928 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT,
14e8a3c4
BL
929 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst),
930 MAC_PR_ARG(next_hop))
931);
932
933DEFINE_EVENT(mpath_evt, rdev_add_mpath,
934 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
935 u8 *next_hop),
936 TP_ARGS(wiphy, netdev, dst, next_hop)
937);
938
939DEFINE_EVENT(mpath_evt, rdev_change_mpath,
940 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
941 u8 *next_hop),
942 TP_ARGS(wiphy, netdev, dst, next_hop)
943);
944
945DEFINE_EVENT(mpath_evt, rdev_get_mpath,
946 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
947 u8 *next_hop),
948 TP_ARGS(wiphy, netdev, dst, next_hop)
949);
950
951TRACE_EVENT(rdev_dump_mpath,
aaaa10e0 952 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
14e8a3c4 953 u8 *dst, u8 *next_hop),
aaaa10e0 954 TP_ARGS(wiphy, netdev, _idx, dst, next_hop),
14e8a3c4
BL
955 TP_STRUCT__entry(
956 WIPHY_ENTRY
957 NETDEV_ENTRY
958 MAC_ENTRY(dst)
959 MAC_ENTRY(next_hop)
960 __field(int, idx)
961 ),
962 TP_fast_assign(
963 WIPHY_ASSIGN;
964 NETDEV_ASSIGN;
965 MAC_ASSIGN(dst, dst);
966 MAC_ASSIGN(next_hop, next_hop);
aaaa10e0 967 __entry->idx = _idx;
14e8a3c4 968 ),
ec816087 969 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
14e8a3c4
BL
970 MAC_PR_FMT ", next hop: " MAC_PR_FMT,
971 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
972 MAC_PR_ARG(next_hop))
973);
974
66be7d2b
HR
975TRACE_EVENT(rdev_get_mpp,
976 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
977 u8 *dst, u8 *mpp),
978 TP_ARGS(wiphy, netdev, dst, mpp),
979 TP_STRUCT__entry(
980 WIPHY_ENTRY
981 NETDEV_ENTRY
982 MAC_ENTRY(dst)
983 MAC_ENTRY(mpp)
984 ),
985 TP_fast_assign(
986 WIPHY_ASSIGN;
987 NETDEV_ASSIGN;
988 MAC_ASSIGN(dst, dst);
989 MAC_ASSIGN(mpp, mpp);
990 ),
991 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT
992 ", mpp: " MAC_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG,
993 MAC_PR_ARG(dst), MAC_PR_ARG(mpp))
994);
995
996TRACE_EVENT(rdev_dump_mpp,
aaaa10e0 997 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
66be7d2b 998 u8 *dst, u8 *mpp),
aaaa10e0 999 TP_ARGS(wiphy, netdev, _idx, mpp, dst),
66be7d2b
HR
1000 TP_STRUCT__entry(
1001 WIPHY_ENTRY
1002 NETDEV_ENTRY
1003 MAC_ENTRY(dst)
1004 MAC_ENTRY(mpp)
1005 __field(int, idx)
1006 ),
1007 TP_fast_assign(
1008 WIPHY_ASSIGN;
1009 NETDEV_ASSIGN;
1010 MAC_ASSIGN(dst, dst);
1011 MAC_ASSIGN(mpp, mpp);
aaaa10e0 1012 __entry->idx = _idx;
66be7d2b
HR
1013 ),
1014 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
1015 MAC_PR_FMT ", mpp: " MAC_PR_FMT,
1016 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
1017 MAC_PR_ARG(mpp))
1018);
1019
14e8a3c4
BL
1020TRACE_EVENT(rdev_return_int_mpath_info,
1021 TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo),
1022 TP_ARGS(wiphy, ret, pinfo),
1023 TP_STRUCT__entry(
1024 WIPHY_ENTRY
1025 __field(int, ret)
1026 __field(int, generation)
1027 __field(u32, filled)
1028 __field(u32, frame_qlen)
1029 __field(u32, sn)
1030 __field(u32, metric)
1031 __field(u32, exptime)
1032 __field(u32, discovery_timeout)
1033 __field(u8, discovery_retries)
1034 __field(u8, flags)
1035 ),
1036 TP_fast_assign(
1037 WIPHY_ASSIGN;
1038 __entry->ret = ret;
1039 __entry->generation = pinfo->generation;
1040 __entry->filled = pinfo->filled;
1041 __entry->frame_qlen = pinfo->frame_qlen;
1042 __entry->sn = pinfo->sn;
1043 __entry->metric = pinfo->metric;
1044 __entry->exptime = pinfo->exptime;
1045 __entry->discovery_timeout = pinfo->discovery_timeout;
1046 __entry->discovery_retries = pinfo->discovery_retries;
1047 __entry->flags = pinfo->flags;
1048 ),
1049 TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, "
1050 "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
1051 " discovery timeout: %u, discovery retries: %u, flags: %u",
1052 WIPHY_PR_ARG, __entry->ret, __entry->generation,
1053 __entry->filled, __entry->frame_qlen, __entry->sn,
1054 __entry->metric, __entry->exptime, __entry->discovery_timeout,
1055 __entry->discovery_retries, __entry->flags)
1056);
1057
1058TRACE_EVENT(rdev_return_int_mesh_config,
1059 TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf),
1060 TP_ARGS(wiphy, ret, conf),
1061 TP_STRUCT__entry(
1062 WIPHY_ENTRY
1063 MESH_CFG_ENTRY
1064 __field(int, ret)
1065 ),
1066 TP_fast_assign(
1067 WIPHY_ASSIGN;
1068 MESH_CFG_ASSIGN;
1069 __entry->ret = ret;
1070 ),
1071 TP_printk(WIPHY_PR_FMT ", returned: %d",
1072 WIPHY_PR_ARG, __entry->ret)
1073);
1074
1075TRACE_EVENT(rdev_update_mesh_config,
1076 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
1077 const struct mesh_config *conf),
1078 TP_ARGS(wiphy, netdev, mask, conf),
1079 TP_STRUCT__entry(
1080 WIPHY_ENTRY
1081 NETDEV_ENTRY
1082 MESH_CFG_ENTRY
1083 __field(u32, mask)
1084 ),
1085 TP_fast_assign(
1086 WIPHY_ASSIGN;
1087 NETDEV_ASSIGN;
1088 MESH_CFG_ASSIGN;
1089 __entry->mask = mask;
1090 ),
ec816087 1091 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u",
14e8a3c4
BL
1092 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
1093);
1094
1095TRACE_EVENT(rdev_join_mesh,
1096 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1097 const struct mesh_config *conf,
1098 const struct mesh_setup *setup),
1099 TP_ARGS(wiphy, netdev, conf, setup),
1100 TP_STRUCT__entry(
1101 WIPHY_ENTRY
1102 NETDEV_ENTRY
1103 MESH_CFG_ENTRY
1104 ),
1105 TP_fast_assign(
1106 WIPHY_ASSIGN;
1107 NETDEV_ASSIGN;
1108 MESH_CFG_ASSIGN;
1109 ),
ec816087 1110 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
14e8a3c4
BL
1111 WIPHY_PR_ARG, NETDEV_PR_ARG)
1112);
1113
1114TRACE_EVENT(rdev_change_bss,
1115 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1116 struct bss_parameters *params),
1117 TP_ARGS(wiphy, netdev, params),
1118 TP_STRUCT__entry(
1119 WIPHY_ENTRY
1120 NETDEV_ENTRY
1121 __field(int, use_cts_prot)
1122 __field(int, use_short_preamble)
1123 __field(int, use_short_slot_time)
1124 __field(int, ap_isolate)
1125 __field(int, ht_opmode)
1126 ),
1127 TP_fast_assign(
1128 WIPHY_ASSIGN;
1129 NETDEV_ASSIGN;
1130 __entry->use_cts_prot = params->use_cts_prot;
1131 __entry->use_short_preamble = params->use_short_preamble;
1132 __entry->use_short_slot_time = params->use_short_slot_time;
1133 __entry->ap_isolate = params->ap_isolate;
1134 __entry->ht_opmode = params->ht_opmode;
1135 ),
ec816087 1136 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, "
14e8a3c4
BL
1137 "use short preamble: %d, use short slot time: %d, "
1138 "ap isolate: %d, ht opmode: %d",
1139 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot,
1140 __entry->use_short_preamble, __entry->use_short_slot_time,
1141 __entry->ap_isolate, __entry->ht_opmode)
1142);
1143
1144TRACE_EVENT(rdev_set_txq_params,
1145 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1146 struct ieee80211_txq_params *params),
1147 TP_ARGS(wiphy, netdev, params),
1148 TP_STRUCT__entry(
1149 WIPHY_ENTRY
1150 NETDEV_ENTRY
1151 __field(enum nl80211_ac, ac)
1152 __field(u16, txop)
1153 __field(u16, cwmin)
1154 __field(u16, cwmax)
1155 __field(u8, aifs)
1156 ),
1157 TP_fast_assign(
1158 WIPHY_ASSIGN;
1159 NETDEV_ASSIGN;
1160 __entry->ac = params->ac;
1161 __entry->txop = params->txop;
1162 __entry->cwmin = params->cwmin;
1163 __entry->cwmax = params->cwmax;
1164 __entry->aifs = params->aifs;
1165 ),
ec816087 1166 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u",
14e8a3c4
BL
1167 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop,
1168 __entry->cwmin, __entry->cwmax, __entry->aifs)
1169);
1170
1171TRACE_EVENT(rdev_libertas_set_mesh_channel,
1172 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1173 struct ieee80211_channel *chan),
1174 TP_ARGS(wiphy, netdev, chan),
1175 TP_STRUCT__entry(
1176 WIPHY_ENTRY
1177 NETDEV_ENTRY
1178 CHAN_ENTRY
1179 ),
1180 TP_fast_assign(
1181 WIPHY_ASSIGN;
1182 NETDEV_ASSIGN;
1183 CHAN_ASSIGN(chan);
1184 ),
ec816087 1185 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG,
14e8a3c4
BL
1186 NETDEV_PR_ARG, CHAN_PR_ARG)
1187);
1188
1189TRACE_EVENT(rdev_set_monitor_channel,
683b6d3b
JB
1190 TP_PROTO(struct wiphy *wiphy,
1191 struct cfg80211_chan_def *chandef),
1192 TP_ARGS(wiphy, chandef),
14e8a3c4
BL
1193 TP_STRUCT__entry(
1194 WIPHY_ENTRY
683b6d3b 1195 CHAN_DEF_ENTRY
14e8a3c4
BL
1196 ),
1197 TP_fast_assign(
1198 WIPHY_ASSIGN;
683b6d3b 1199 CHAN_DEF_ASSIGN(chandef);
14e8a3c4 1200 ),
ec816087 1201 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
683b6d3b 1202 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
14e8a3c4
BL
1203);
1204
1205TRACE_EVENT(rdev_auth,
1206 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1207 struct cfg80211_auth_request *req),
1208 TP_ARGS(wiphy, netdev, req),
1209 TP_STRUCT__entry(
1210 WIPHY_ENTRY
1211 NETDEV_ENTRY
1212 MAC_ENTRY(bssid)
1213 __field(enum nl80211_auth_type, auth_type)
1214 ),
1215 TP_fast_assign(
1216 WIPHY_ASSIGN;
1217 NETDEV_ASSIGN;
1218 if (req->bss)
1219 MAC_ASSIGN(bssid, req->bss->bssid);
1220 else
d2beae10 1221 eth_zero_addr(__entry->bssid);
14e8a3c4
BL
1222 __entry->auth_type = req->auth_type;
1223 ),
ec816087 1224 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT,
14e8a3c4
BL
1225 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type,
1226 MAC_PR_ARG(bssid))
1227);
1228
1229TRACE_EVENT(rdev_assoc,
1230 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
64a87472
JB
1231 struct cfg80211_assoc_request *req,
1232 const struct cfg80211_bss_ies *bss_ies),
1233 TP_ARGS(wiphy, netdev, req, bss_ies),
14e8a3c4
BL
1234 TP_STRUCT__entry(
1235 WIPHY_ENTRY
1236 NETDEV_ENTRY
1237 MAC_ENTRY(bssid)
1238 MAC_ENTRY(prev_bssid)
1239 __field(bool, use_mfp)
1240 __field(u32, flags)
64a87472
JB
1241 __dynamic_array(u8, bss_elements, bss_ies->len)
1242 __field(bool, bss_elements_bcon)
1243 __field(u64, bss_elements_tsf)
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 (bss_ies->len)
1264 memcpy(__get_dynamic_array(bss_elements),
1265 bss_ies->data, bss_ies->len);
1266 __entry->bss_elements_bcon = bss_ies->from_beacon;
1267 __entry->bss_elements_tsf = bss_ies->tsf;
1268 if (req->ie)
1269 memcpy(__get_dynamic_array(elements),
1270 req->ie, req->ie_len);
1271 memcpy(__entry->ht_capa, &req->ht_capa, sizeof(req->ht_capa));
1272 memcpy(__entry->ht_capa_mask, &req->ht_capa_mask,
1273 sizeof(req->ht_capa_mask));
1274 memcpy(__entry->vht_capa, &req->vht_capa, sizeof(req->vht_capa));
1275 memcpy(__entry->vht_capa_mask, &req->vht_capa_mask,
1276 sizeof(req->vht_capa_mask));
1277 if (req->fils_kek)
1278 memcpy(__get_dynamic_array(fils_kek),
1279 req->fils_kek, req->fils_kek_len);
1280 if (req->fils_nonces)
1281 memcpy(__get_dynamic_array(fils_nonces),
1282 req->fils_nonces, 2 * FILS_NONCE_LEN);
14e8a3c4 1283 ),
ec816087 1284 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
14e8a3c4
BL
1285 ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u",
1286 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1287 MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp),
1288 __entry->flags)
1289);
1290
1291TRACE_EVENT(rdev_deauth,
1292 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1293 struct cfg80211_deauth_request *req),
1294 TP_ARGS(wiphy, netdev, req),
1295 TP_STRUCT__entry(
1296 WIPHY_ENTRY
1297 NETDEV_ENTRY
1298 MAC_ENTRY(bssid)
1299 __field(u16, reason_code)
1300 ),
1301 TP_fast_assign(
1302 WIPHY_ASSIGN;
1303 NETDEV_ASSIGN;
1304 MAC_ASSIGN(bssid, req->bssid);
1305 __entry->reason_code = req->reason_code;
1306 ),
ec816087 1307 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u",
14e8a3c4
BL
1308 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1309 __entry->reason_code)
1310);
1311
1312TRACE_EVENT(rdev_disassoc,
1313 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1314 struct cfg80211_disassoc_request *req),
1315 TP_ARGS(wiphy, netdev, req),
1316 TP_STRUCT__entry(
1317 WIPHY_ENTRY
1318 NETDEV_ENTRY
1319 MAC_ENTRY(bssid)
1320 __field(u16, reason_code)
1321 __field(bool, local_state_change)
1322 ),
1323 TP_fast_assign(
1324 WIPHY_ASSIGN;
1325 NETDEV_ASSIGN;
1326 if (req->bss)
1327 MAC_ASSIGN(bssid, req->bss->bssid);
1328 else
d2beae10 1329 eth_zero_addr(__entry->bssid);
14e8a3c4
BL
1330 __entry->reason_code = req->reason_code;
1331 __entry->local_state_change = req->local_state_change;
1332 ),
ec816087 1333 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
14e8a3c4
BL
1334 ", reason: %u, local state change: %s",
1335 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1336 __entry->reason_code,
1337 BOOL_TO_STR(__entry->local_state_change))
1338);
1339
1340TRACE_EVENT(rdev_mgmt_tx_cancel_wait,
1341 TP_PROTO(struct wiphy *wiphy,
1342 struct wireless_dev *wdev, u64 cookie),
1343 TP_ARGS(wiphy, wdev, cookie),
1344 TP_STRUCT__entry(
1345 WIPHY_ENTRY
1346 WDEV_ENTRY
1347 __field(u64, cookie)
1348 ),
1349 TP_fast_assign(
1350 WIPHY_ASSIGN;
1351 WDEV_ASSIGN;
1352 __entry->cookie = cookie;
1353 ),
ec816087 1354 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ",
14e8a3c4
BL
1355 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1356);
1357
1358TRACE_EVENT(rdev_set_power_mgmt,
1359 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1360 bool enabled, int timeout),
1361 TP_ARGS(wiphy, netdev, enabled, timeout),
1362 TP_STRUCT__entry(
1363 WIPHY_ENTRY
1364 NETDEV_ENTRY
1365 __field(bool, enabled)
1366 __field(int, timeout)
1367 ),
1368 TP_fast_assign(
1369 WIPHY_ASSIGN;
1370 NETDEV_ASSIGN;
1371 __entry->enabled = enabled;
1372 __entry->timeout = timeout;
1373 ),
ec816087 1374 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ",
14e8a3c4
BL
1375 WIPHY_PR_ARG, NETDEV_PR_ARG,
1376 __entry->enabled ? "" : "not ", __entry->timeout)
1377);
1378
1379TRACE_EVENT(rdev_connect,
1380 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1381 struct cfg80211_connect_params *sme),
1382 TP_ARGS(wiphy, netdev, sme),
1383 TP_STRUCT__entry(
1384 WIPHY_ENTRY
1385 NETDEV_ENTRY
1386 MAC_ENTRY(bssid)
1387 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1388 __field(enum nl80211_auth_type, auth_type)
1389 __field(bool, privacy)
1390 __field(u32, wpa_versions)
1391 __field(u32, flags)
ba6fbacf 1392 MAC_ENTRY(prev_bssid)
14e8a3c4
BL
1393 ),
1394 TP_fast_assign(
1395 WIPHY_ASSIGN;
1396 NETDEV_ASSIGN;
1397 MAC_ASSIGN(bssid, sme->bssid);
1398 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1399 memcpy(__entry->ssid, sme->ssid, sme->ssid_len);
1400 __entry->auth_type = sme->auth_type;
1401 __entry->privacy = sme->privacy;
1402 __entry->wpa_versions = sme->crypto.wpa_versions;
1403 __entry->flags = sme->flags;
ba6fbacf 1404 MAC_ASSIGN(prev_bssid, sme->prev_bssid);
14e8a3c4 1405 ),
ec816087 1406 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
14e8a3c4 1407 ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
ba6fbacf 1408 "flags: %u, previous bssid: " MAC_PR_FMT,
14e8a3c4
BL
1409 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid,
1410 __entry->auth_type, BOOL_TO_STR(__entry->privacy),
ba6fbacf 1411 __entry->wpa_versions, __entry->flags, MAC_PR_ARG(prev_bssid))
14e8a3c4
BL
1412);
1413
088e8df8 1414TRACE_EVENT(rdev_update_connect_params,
1415 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1416 struct cfg80211_connect_params *sme, u32 changed),
1417 TP_ARGS(wiphy, netdev, sme, changed),
1418 TP_STRUCT__entry(
1419 WIPHY_ENTRY
1420 NETDEV_ENTRY
1421 __field(u32, changed)
1422 ),
1423 TP_fast_assign(
1424 WIPHY_ASSIGN;
1425 NETDEV_ASSIGN;
1426 __entry->changed = changed;
1427 ),
1428 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", parameters changed: %u",
1429 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->changed)
1430);
1431
14e8a3c4
BL
1432TRACE_EVENT(rdev_set_cqm_rssi_config,
1433 TP_PROTO(struct wiphy *wiphy,
1434 struct net_device *netdev, s32 rssi_thold,
1435 u32 rssi_hyst),
1436 TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
1437 TP_STRUCT__entry(
1438 WIPHY_ENTRY
1439 NETDEV_ENTRY
1440 __field(s32, rssi_thold)
1441 __field(u32, rssi_hyst)
1442 ),
1443 TP_fast_assign(
1444 WIPHY_ASSIGN;
1445 NETDEV_ASSIGN;
1446 __entry->rssi_thold = rssi_thold;
1447 __entry->rssi_hyst = rssi_hyst;
1448 ),
ec816087 1449 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
14e8a3c4
BL
1450 ", rssi_thold: %d, rssi_hyst: %u ",
1451 WIPHY_PR_ARG, NETDEV_PR_ARG,
1452 __entry->rssi_thold, __entry->rssi_hyst)
1453);
1454
4a4b8169
AZ
1455TRACE_EVENT(rdev_set_cqm_rssi_range_config,
1456 TP_PROTO(struct wiphy *wiphy,
1457 struct net_device *netdev, s32 low, s32 high),
1458 TP_ARGS(wiphy, netdev, low, high),
1459 TP_STRUCT__entry(
1460 WIPHY_ENTRY
1461 NETDEV_ENTRY
1462 __field(s32, rssi_low)
1463 __field(s32, rssi_high)
1464 ),
1465 TP_fast_assign(
1466 WIPHY_ASSIGN;
1467 NETDEV_ASSIGN;
1468 __entry->rssi_low = low;
1469 __entry->rssi_high = high;
1470 ),
1471 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
1472 ", range: %d - %d ",
1473 WIPHY_PR_ARG, NETDEV_PR_ARG,
1474 __entry->rssi_low, __entry->rssi_high)
1475);
1476
14e8a3c4
BL
1477TRACE_EVENT(rdev_set_cqm_txe_config,
1478 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
1479 u32 pkts, u32 intvl),
1480 TP_ARGS(wiphy, netdev, rate, pkts, intvl),
1481 TP_STRUCT__entry(
1482 WIPHY_ENTRY
1483 NETDEV_ENTRY
1484 __field(u32, rate)
1485 __field(u32, pkts)
1486 __field(u32, intvl)
1487 ),
1488 TP_fast_assign(
1489 WIPHY_ASSIGN;
1490 NETDEV_ASSIGN;
1491 __entry->rate = rate;
1492 __entry->pkts = pkts;
1493 __entry->intvl = intvl;
1494 ),
ec816087 1495 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
14e8a3c4
BL
1496 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
1497 __entry->intvl)
1498);
1499
1500TRACE_EVENT(rdev_disconnect,
1501 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1502 u16 reason_code),
1503 TP_ARGS(wiphy, netdev, reason_code),
1504 TP_STRUCT__entry(
1505 WIPHY_ENTRY
1506 NETDEV_ENTRY
1507 __field(u16, reason_code)
1508 ),
1509 TP_fast_assign(
1510 WIPHY_ASSIGN;
1511 NETDEV_ASSIGN;
1512 __entry->reason_code = reason_code;
1513 ),
ec816087 1514 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
14e8a3c4
BL
1515 NETDEV_PR_ARG, __entry->reason_code)
1516);
1517
1518TRACE_EVENT(rdev_join_ibss,
1519 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1520 struct cfg80211_ibss_params *params),
1521 TP_ARGS(wiphy, netdev, params),
1522 TP_STRUCT__entry(
1523 WIPHY_ENTRY
1524 NETDEV_ENTRY
1525 MAC_ENTRY(bssid)
1526 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1527 ),
1528 TP_fast_assign(
1529 WIPHY_ASSIGN;
1530 NETDEV_ASSIGN;
1531 MAC_ASSIGN(bssid, params->bssid);
1532 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1533 memcpy(__entry->ssid, params->ssid, params->ssid_len);
1534 ),
ec816087 1535 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s",
14e8a3c4
BL
1536 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid)
1537);
1538
6e0bd6c3
RL
1539TRACE_EVENT(rdev_join_ocb,
1540 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1541 const struct ocb_setup *setup),
1542 TP_ARGS(wiphy, netdev, setup),
1543 TP_STRUCT__entry(
1544 WIPHY_ENTRY
1545 NETDEV_ENTRY
1546 ),
1547 TP_fast_assign(
1548 WIPHY_ASSIGN;
1549 NETDEV_ASSIGN;
1550 ),
1551 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
1552 WIPHY_PR_ARG, NETDEV_PR_ARG)
1553);
1554
14e8a3c4
BL
1555TRACE_EVENT(rdev_set_wiphy_params,
1556 TP_PROTO(struct wiphy *wiphy, u32 changed),
1557 TP_ARGS(wiphy, changed),
1558 TP_STRUCT__entry(
1559 WIPHY_ENTRY
1560 __field(u32, changed)
1561 ),
1562 TP_fast_assign(
1563 WIPHY_ASSIGN;
1564 __entry->changed = changed;
1565 ),
1566 TP_printk(WIPHY_PR_FMT ", changed: %u",
1567 WIPHY_PR_ARG, __entry->changed)
1568);
1569
c8442118
JB
1570DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power,
1571 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1572 TP_ARGS(wiphy, wdev)
1573);
1574
14e8a3c4 1575TRACE_EVENT(rdev_set_tx_power,
c8442118
JB
1576 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1577 enum nl80211_tx_power_setting type, int mbm),
1578 TP_ARGS(wiphy, wdev, type, mbm),
14e8a3c4
BL
1579 TP_STRUCT__entry(
1580 WIPHY_ENTRY
c8442118 1581 WDEV_ENTRY
14e8a3c4
BL
1582 __field(enum nl80211_tx_power_setting, type)
1583 __field(int, mbm)
1584 ),
1585 TP_fast_assign(
1586 WIPHY_ASSIGN;
c8442118 1587 WDEV_ASSIGN;
14e8a3c4
BL
1588 __entry->type = type;
1589 __entry->mbm = mbm;
1590 ),
ec816087 1591 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
c8442118 1592 WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
14e8a3c4
BL
1593);
1594
1595TRACE_EVENT(rdev_return_int_int,
1596 TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
1597 TP_ARGS(wiphy, func_ret, func_fill),
1598 TP_STRUCT__entry(
1599 WIPHY_ENTRY
1600 __field(int, func_ret)
1601 __field(int, func_fill)
1602 ),
1603 TP_fast_assign(
1604 WIPHY_ASSIGN;
1605 __entry->func_ret = func_ret;
1606 __entry->func_fill = func_fill;
1607 ),
1608 TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
1609 WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
1610);
1611
1612#ifdef CONFIG_NL80211_TESTMODE
1613TRACE_EVENT(rdev_testmode_cmd,
fc73f11f
DS
1614 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1615 TP_ARGS(wiphy, wdev),
14e8a3c4
BL
1616 TP_STRUCT__entry(
1617 WIPHY_ENTRY
fc73f11f 1618 WDEV_ENTRY
14e8a3c4
BL
1619 ),
1620 TP_fast_assign(
1621 WIPHY_ASSIGN;
fc73f11f 1622 WDEV_ASSIGN;
14e8a3c4 1623 ),
fc73f11f 1624 TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
14e8a3c4
BL
1625);
1626
1627TRACE_EVENT(rdev_testmode_dump,
1628 TP_PROTO(struct wiphy *wiphy),
1629 TP_ARGS(wiphy),
1630 TP_STRUCT__entry(
1631 WIPHY_ENTRY
1632 ),
1633 TP_fast_assign(
1634 WIPHY_ASSIGN;
1635 ),
1636 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
1637);
1638#endif /* CONFIG_NL80211_TESTMODE */
1639
1640TRACE_EVENT(rdev_set_bitrate_mask,
1641 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
7b0a0e3c 1642 unsigned int link_id,
14e8a3c4 1643 const u8 *peer, const struct cfg80211_bitrate_mask *mask),
7b0a0e3c 1644 TP_ARGS(wiphy, netdev, link_id, peer, mask),
14e8a3c4
BL
1645 TP_STRUCT__entry(
1646 WIPHY_ENTRY
1647 NETDEV_ENTRY
7b0a0e3c 1648 __field(unsigned int, link_id)
14e8a3c4
BL
1649 MAC_ENTRY(peer)
1650 ),
1651 TP_fast_assign(
1652 WIPHY_ASSIGN;
1653 NETDEV_ASSIGN;
7b0a0e3c 1654 __entry->link_id = link_id;
14e8a3c4
BL
1655 MAC_ASSIGN(peer, peer);
1656 ),
7b0a0e3c
JB
1657 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", link_id: %d, peer: " MAC_PR_FMT,
1658 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->link_id,
1659 MAC_PR_ARG(peer))
14e8a3c4
BL
1660);
1661
6cd536fe 1662TRACE_EVENT(rdev_update_mgmt_frame_registrations,
14e8a3c4 1663 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
6cd536fe
JB
1664 struct mgmt_frame_regs *upd),
1665 TP_ARGS(wiphy, wdev, upd),
14e8a3c4
BL
1666 TP_STRUCT__entry(
1667 WIPHY_ENTRY
1668 WDEV_ENTRY
6cd536fe
JB
1669 __field(u16, global_stypes)
1670 __field(u16, interface_stypes)
14e8a3c4
BL
1671 ),
1672 TP_fast_assign(
1673 WIPHY_ASSIGN;
1674 WDEV_ASSIGN;
6cd536fe
JB
1675 __entry->global_stypes = upd->global_stypes;
1676 __entry->interface_stypes = upd->interface_stypes;
14e8a3c4 1677 ),
6cd536fe
JB
1678 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", global: 0x%.2x, intf: 0x%.2x",
1679 WIPHY_PR_ARG, WDEV_PR_ARG,
1680 __entry->global_stypes, __entry->interface_stypes)
14e8a3c4
BL
1681);
1682
1683TRACE_EVENT(rdev_return_int_tx_rx,
1684 TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
1685 TP_ARGS(wiphy, ret, tx, rx),
1686 TP_STRUCT__entry(
1687 WIPHY_ENTRY
1688 __field(int, ret)
1689 __field(u32, tx)
1690 __field(u32, rx)
1691 ),
1692 TP_fast_assign(
1693 WIPHY_ASSIGN;
1694 __entry->ret = ret;
1695 __entry->tx = tx;
1696 __entry->rx = rx;
1697 ),
1698 TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
1699 WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
1700);
1701
1702TRACE_EVENT(rdev_return_void_tx_rx,
1703 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
1704 u32 rx, u32 rx_max),
1705 TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
1706 TP_STRUCT__entry(
1707 WIPHY_ENTRY
1708 __field(u32, tx)
1709 __field(u32, tx_max)
1710 __field(u32, rx)
1711 __field(u32, rx_max)
1712 ),
1713 TP_fast_assign(
1714 WIPHY_ASSIGN;
1715 __entry->tx = tx;
1716 __entry->tx_max = tx_max;
1717 __entry->rx = rx;
1718 __entry->rx_max = rx_max;
1719 ),
1720 TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
1721 WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
1722 __entry->rx_max)
1723);
1724
1725DECLARE_EVENT_CLASS(tx_rx_evt,
1726 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1727 TP_ARGS(wiphy, rx, tx),
1728 TP_STRUCT__entry(
1729 WIPHY_ENTRY
1730 __field(u32, tx)
1731 __field(u32, rx)
1732 ),
1733 TP_fast_assign(
1734 WIPHY_ASSIGN;
1735 __entry->tx = tx;
1736 __entry->rx = rx;
1737 ),
1738 TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
1739 WIPHY_PR_ARG, __entry->tx, __entry->rx)
1740);
1741
14e8a3c4
BL
1742DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
1743 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1744 TP_ARGS(wiphy, rx, tx)
1745);
1746
ca986ad9
AVS
1747DECLARE_EVENT_CLASS(wiphy_netdev_id_evt,
1748 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1749 TP_ARGS(wiphy, netdev, id),
14e8a3c4
BL
1750 TP_STRUCT__entry(
1751 WIPHY_ENTRY
1752 NETDEV_ENTRY
ca986ad9 1753 __field(u64, id)
14e8a3c4
BL
1754 ),
1755 TP_fast_assign(
1756 WIPHY_ASSIGN;
1757 NETDEV_ASSIGN;
ca986ad9 1758 __entry->id = id;
14e8a3c4 1759 ),
ca986ad9
AVS
1760 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", id: %llu",
1761 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->id)
1762);
1763
1764DEFINE_EVENT(wiphy_netdev_id_evt, rdev_sched_scan_start,
1765 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1766 TP_ARGS(wiphy, netdev, id)
14e8a3c4
BL
1767);
1768
3a3ecf1d
AVS
1769DEFINE_EVENT(wiphy_netdev_id_evt, rdev_sched_scan_stop,
1770 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1771 TP_ARGS(wiphy, netdev, id)
1772);
1773
14e8a3c4
BL
1774TRACE_EVENT(rdev_tdls_mgmt,
1775 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1776 u8 *peer, u8 action_code, u8 dialog_token,
df942e7b 1777 u16 status_code, u32 peer_capability,
31fa97c5 1778 bool initiator, const u8 *buf, size_t len),
14e8a3c4 1779 TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
31fa97c5 1780 peer_capability, initiator, buf, len),
14e8a3c4
BL
1781 TP_STRUCT__entry(
1782 WIPHY_ENTRY
1783 NETDEV_ENTRY
1784 MAC_ENTRY(peer)
1785 __field(u8, action_code)
1786 __field(u8, dialog_token)
1787 __field(u16, status_code)
df942e7b 1788 __field(u32, peer_capability)
31fa97c5 1789 __field(bool, initiator)
14e8a3c4
BL
1790 __dynamic_array(u8, buf, len)
1791 ),
1792 TP_fast_assign(
1793 WIPHY_ASSIGN;
1794 NETDEV_ASSIGN;
1795 MAC_ASSIGN(peer, peer);
1796 __entry->action_code = action_code;
1797 __entry->dialog_token = dialog_token;
1798 __entry->status_code = status_code;
df942e7b 1799 __entry->peer_capability = peer_capability;
31fa97c5 1800 __entry->initiator = initiator;
14e8a3c4
BL
1801 memcpy(__get_dynamic_array(buf), buf, len);
1802 ),
ec816087 1803 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, "
31fa97c5
AN
1804 "dialog_token: %u, status_code: %u, peer_capability: %u "
1805 "initiator: %s buf: %#.2x ",
14e8a3c4
BL
1806 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
1807 __entry->action_code, __entry->dialog_token,
df942e7b 1808 __entry->status_code, __entry->peer_capability,
31fa97c5 1809 BOOL_TO_STR(__entry->initiator),
df942e7b 1810 ((u8 *)__get_dynamic_array(buf))[0])
14e8a3c4
BL
1811);
1812
1813TRACE_EVENT(rdev_dump_survey,
aaaa10e0
JB
1814 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx),
1815 TP_ARGS(wiphy, netdev, _idx),
14e8a3c4
BL
1816 TP_STRUCT__entry(
1817 WIPHY_ENTRY
1818 NETDEV_ENTRY
1819 __field(int, idx)
1820 ),
1821 TP_fast_assign(
1822 WIPHY_ASSIGN;
1823 NETDEV_ASSIGN;
aaaa10e0 1824 __entry->idx = _idx;
14e8a3c4 1825 ),
ec816087 1826 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
14e8a3c4
BL
1827 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
1828);
1829
1830TRACE_EVENT(rdev_return_int_survey_info,
1831 TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
1832 TP_ARGS(wiphy, ret, info),
1833 TP_STRUCT__entry(
1834 WIPHY_ENTRY
1835 CHAN_ENTRY
1836 __field(int, ret)
4ed20beb
JB
1837 __field(u64, time)
1838 __field(u64, time_busy)
1839 __field(u64, time_ext_busy)
1840 __field(u64, time_rx)
1841 __field(u64, time_tx)
052536ab 1842 __field(u64, time_scan)
14e8a3c4
BL
1843 __field(u32, filled)
1844 __field(s8, noise)
1845 ),
1846 TP_fast_assign(
1847 WIPHY_ASSIGN;
1848 CHAN_ASSIGN(info->channel);
1849 __entry->ret = ret;
4ed20beb
JB
1850 __entry->time = info->time;
1851 __entry->time_busy = info->time_busy;
1852 __entry->time_ext_busy = info->time_ext_busy;
1853 __entry->time_rx = info->time_rx;
1854 __entry->time_tx = info->time_tx;
052536ab 1855 __entry->time_scan = info->time_scan;
14e8a3c4
BL
1856 __entry->filled = info->filled;
1857 __entry->noise = info->noise;
1858 ),
1859 TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
1860 ", channel time: %llu, channel time busy: %llu, "
1861 "channel time extension busy: %llu, channel time rx: %llu, "
052536ab 1862 "channel time tx: %llu, scan time: %llu, filled: %u, noise: %d",
14e8a3c4 1863 WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
4ed20beb
JB
1864 __entry->time, __entry->time_busy,
1865 __entry->time_ext_busy, __entry->time_rx,
052536ab
JB
1866 __entry->time_tx, __entry->time_scan,
1867 __entry->filled, __entry->noise)
14e8a3c4
BL
1868);
1869
1870TRACE_EVENT(rdev_tdls_oper,
1871 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1872 u8 *peer, enum nl80211_tdls_operation oper),
1873 TP_ARGS(wiphy, netdev, peer, oper),
1874 TP_STRUCT__entry(
1875 WIPHY_ENTRY
1876 NETDEV_ENTRY
1877 MAC_ENTRY(peer)
1878 __field(enum nl80211_tdls_operation, oper)
1879 ),
1880 TP_fast_assign(
1881 WIPHY_ASSIGN;
1882 NETDEV_ASSIGN;
1883 MAC_ASSIGN(peer, peer);
1884 __entry->oper = oper;
1885 ),
ec816087 1886 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d",
14e8a3c4
BL
1887 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
1888);
1889
1890DECLARE_EVENT_CLASS(rdev_pmksa,
1891 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1892 struct cfg80211_pmksa *pmksa),
1893 TP_ARGS(wiphy, netdev, pmksa),
1894 TP_STRUCT__entry(
1895 WIPHY_ENTRY
1896 NETDEV_ENTRY
1897 MAC_ENTRY(bssid)
1898 ),
1899 TP_fast_assign(
1900 WIPHY_ASSIGN;
1901 NETDEV_ASSIGN;
1902 MAC_ASSIGN(bssid, pmksa->bssid);
1903 ),
ec816087 1904 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
14e8a3c4
BL
1905 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
1906);
1907
1908TRACE_EVENT(rdev_probe_client,
1909 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1910 const u8 *peer),
1911 TP_ARGS(wiphy, netdev, peer),
1912 TP_STRUCT__entry(
1913 WIPHY_ENTRY
1914 NETDEV_ENTRY
1915 MAC_ENTRY(peer)
1916 ),
1917 TP_fast_assign(
1918 WIPHY_ASSIGN;
1919 NETDEV_ASSIGN;
1920 MAC_ASSIGN(peer, peer);
1921 ),
ec816087 1922 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
14e8a3c4
BL
1923 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1924);
1925
1926DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
1927 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1928 struct cfg80211_pmksa *pmksa),
1929 TP_ARGS(wiphy, netdev, pmksa)
1930);
1931
1932DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
1933 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1934 struct cfg80211_pmksa *pmksa),
1935 TP_ARGS(wiphy, netdev, pmksa)
1936);
1937
1938TRACE_EVENT(rdev_remain_on_channel,
1939 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1940 struct ieee80211_channel *chan,
42d97a59
JB
1941 unsigned int duration),
1942 TP_ARGS(wiphy, wdev, chan, duration),
14e8a3c4
BL
1943 TP_STRUCT__entry(
1944 WIPHY_ENTRY
1945 WDEV_ENTRY
1946 CHAN_ENTRY
14e8a3c4
BL
1947 __field(unsigned int, duration)
1948 ),
1949 TP_fast_assign(
1950 WIPHY_ASSIGN;
1951 WDEV_ASSIGN;
1952 CHAN_ASSIGN(chan);
14e8a3c4
BL
1953 __entry->duration = duration;
1954 ),
ec816087 1955 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
42d97a59 1956 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
14e8a3c4
BL
1957);
1958
1959TRACE_EVENT(rdev_return_int_cookie,
1960 TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
1961 TP_ARGS(wiphy, ret, cookie),
1962 TP_STRUCT__entry(
1963 WIPHY_ENTRY
1964 __field(int, ret)
1965 __field(u64, cookie)
1966 ),
1967 TP_fast_assign(
1968 WIPHY_ASSIGN;
1969 __entry->ret = ret;
1970 __entry->cookie = cookie;
1971 ),
1972 TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
1973 WIPHY_PR_ARG, __entry->ret, __entry->cookie)
1974);
1975
1976TRACE_EVENT(rdev_cancel_remain_on_channel,
1977 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
1978 TP_ARGS(wiphy, wdev, cookie),
1979 TP_STRUCT__entry(
1980 WIPHY_ENTRY
1981 WDEV_ENTRY
1982 __field(u64, cookie)
1983 ),
1984 TP_fast_assign(
1985 WIPHY_ASSIGN;
1986 WDEV_ASSIGN;
1987 __entry->cookie = cookie;
1988 ),
ec816087 1989 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
14e8a3c4
BL
1990 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1991);
1992
1993TRACE_EVENT(rdev_mgmt_tx,
1994 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
b176e629
AO
1995 struct cfg80211_mgmt_tx_params *params),
1996 TP_ARGS(wiphy, wdev, params),
14e8a3c4
BL
1997 TP_STRUCT__entry(
1998 WIPHY_ENTRY
1999 WDEV_ENTRY
2000 CHAN_ENTRY
2001 __field(bool, offchan)
14e8a3c4
BL
2002 __field(unsigned int, wait)
2003 __field(bool, no_cck)
2004 __field(bool, dont_wait_for_ack)
2005 ),
2006 TP_fast_assign(
2007 WIPHY_ASSIGN;
2008 WDEV_ASSIGN;
b176e629
AO
2009 CHAN_ASSIGN(params->chan);
2010 __entry->offchan = params->offchan;
2011 __entry->wait = params->wait;
2012 __entry->no_cck = params->no_cck;
2013 __entry->dont_wait_for_ack = params->dont_wait_for_ack;
14e8a3c4 2014 ),
ec816087 2015 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
42d97a59 2016 " wait: %u, no cck: %s, dont wait for ack: %s",
14e8a3c4 2017 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
42d97a59 2018 BOOL_TO_STR(__entry->offchan), __entry->wait,
14e8a3c4
BL
2019 BOOL_TO_STR(__entry->no_cck),
2020 BOOL_TO_STR(__entry->dont_wait_for_ack))
2021);
2022
2576a9ac
DK
2023TRACE_EVENT(rdev_tx_control_port,
2024 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
8d74a623 2025 const u8 *buf, size_t len, const u8 *dest, __be16 proto,
2576a9ac 2026 bool unencrypted),
8d74a623 2027 TP_ARGS(wiphy, netdev, buf, len, dest, proto, unencrypted),
2576a9ac
DK
2028 TP_STRUCT__entry(
2029 WIPHY_ENTRY
2030 NETDEV_ENTRY
2031 MAC_ENTRY(dest)
8d74a623 2032 __field(__be16, proto)
2576a9ac
DK
2033 __field(bool, unencrypted)
2034 ),
2035 TP_fast_assign(
2036 WIPHY_ASSIGN;
2037 NETDEV_ASSIGN;
2038 MAC_ASSIGN(dest, dest);
8d74a623 2039 __entry->proto = proto;
2576a9ac
DK
2040 __entry->unencrypted = unencrypted;
2041 ),
8d74a623
JB
2042 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ","
2043 " proto: 0x%x, unencrypted: %s",
2044 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dest),
2045 be16_to_cpu(__entry->proto),
2576a9ac
DK
2046 BOOL_TO_STR(__entry->unencrypted))
2047);
2048
14e8a3c4
BL
2049TRACE_EVENT(rdev_set_noack_map,
2050 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2051 u16 noack_map),
2052 TP_ARGS(wiphy, netdev, noack_map),
2053 TP_STRUCT__entry(
2054 WIPHY_ENTRY
2055 NETDEV_ENTRY
2056 __field(u16, noack_map)
2057 ),
2058 TP_fast_assign(
2059 WIPHY_ASSIGN;
2060 NETDEV_ASSIGN;
2061 __entry->noack_map = noack_map;
2062 ),
ec816087 2063 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
14e8a3c4
BL
2064 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
2065);
2066
7b0a0e3c
JB
2067TRACE_EVENT(rdev_get_channel,
2068 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2069 unsigned int link_id),
2070 TP_ARGS(wiphy, wdev, link_id),
2071 TP_STRUCT__entry(
2072 WIPHY_ENTRY
2073 WDEV_ENTRY
2074 __field(unsigned int, link_id)
2075 ),
2076 TP_fast_assign(
2077 WIPHY_ASSIGN;
2078 WDEV_ASSIGN;
2079 __entry->link_id = link_id;
2080 ),
2081 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", link_id: %u",
2082 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->link_id)
14e8a3c4
BL
2083);
2084
683b6d3b
JB
2085TRACE_EVENT(rdev_return_chandef,
2086 TP_PROTO(struct wiphy *wiphy, int ret,
2087 struct cfg80211_chan_def *chandef),
2088 TP_ARGS(wiphy, ret, chandef),
14e8a3c4
BL
2089 TP_STRUCT__entry(
2090 WIPHY_ENTRY
683b6d3b
JB
2091 __field(int, ret)
2092 CHAN_DEF_ENTRY
14e8a3c4
BL
2093 ),
2094 TP_fast_assign(
2095 WIPHY_ASSIGN;
683b6d3b
JB
2096 if (ret == 0)
2097 CHAN_DEF_ASSIGN(chandef);
2098 else
2099 CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
2100 __entry->ret = ret;
14e8a3c4 2101 ),
ec816087 2102 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
683b6d3b 2103 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
14e8a3c4
BL
2104);
2105
eeb126e9
JB
2106DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
2107 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2108 TP_ARGS(wiphy, wdev)
2109);
2110
2111DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
2112 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2113 TP_ARGS(wiphy, wdev)
2114);
2115
cb3b7d87
AB
2116TRACE_EVENT(rdev_start_nan,
2117 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2118 struct cfg80211_nan_conf *conf),
2119 TP_ARGS(wiphy, wdev, conf),
2120 TP_STRUCT__entry(
2121 WIPHY_ENTRY
2122 WDEV_ENTRY
2123 __field(u8, master_pref)
04ae87a5 2124 __field(u8, bands)
cb3b7d87
AB
2125 ),
2126 TP_fast_assign(
2127 WIPHY_ASSIGN;
2128 WDEV_ASSIGN;
2129 __entry->master_pref = conf->master_pref;
8585989d 2130 __entry->bands = conf->bands;
cb3b7d87
AB
2131 ),
2132 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
8585989d 2133 ", master preference: %u, bands: 0x%0x",
cb3b7d87 2134 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
8585989d 2135 __entry->bands)
cb3b7d87
AB
2136);
2137
a5a9dcf2
AB
2138TRACE_EVENT(rdev_nan_change_conf,
2139 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2140 struct cfg80211_nan_conf *conf, u32 changes),
2141 TP_ARGS(wiphy, wdev, conf, changes),
2142 TP_STRUCT__entry(
2143 WIPHY_ENTRY
2144 WDEV_ENTRY
2145 __field(u8, master_pref)
04ae87a5
PZ
2146 __field(u8, bands)
2147 __field(u32, changes)
a5a9dcf2
AB
2148 ),
2149 TP_fast_assign(
2150 WIPHY_ASSIGN;
2151 WDEV_ASSIGN;
2152 __entry->master_pref = conf->master_pref;
8585989d 2153 __entry->bands = conf->bands;
a5a9dcf2
AB
2154 __entry->changes = changes;
2155 ),
2156 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
8585989d 2157 ", master preference: %u, bands: 0x%0x, changes: %x",
a5a9dcf2 2158 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
8585989d 2159 __entry->bands, __entry->changes)
a5a9dcf2
AB
2160);
2161
cb3b7d87
AB
2162DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_nan,
2163 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2164 TP_ARGS(wiphy, wdev)
2165);
2166
a442b761
AB
2167TRACE_EVENT(rdev_add_nan_func,
2168 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2169 const struct cfg80211_nan_func *func),
2170 TP_ARGS(wiphy, wdev, func),
2171 TP_STRUCT__entry(
2172 WIPHY_ENTRY
2173 WDEV_ENTRY
2174 __field(u8, func_type)
2175 __field(u64, cookie)
2176 ),
2177 TP_fast_assign(
2178 WIPHY_ASSIGN;
2179 WDEV_ASSIGN;
2180 __entry->func_type = func->type;
2181 __entry->cookie = func->cookie
2182 ),
2183 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type=%u, cookie=%llu",
2184 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->func_type,
2185 __entry->cookie)
2186);
2187
2188TRACE_EVENT(rdev_del_nan_func,
2189 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2190 u64 cookie),
2191 TP_ARGS(wiphy, wdev, cookie),
2192 TP_STRUCT__entry(
2193 WIPHY_ENTRY
2194 WDEV_ENTRY
2195 __field(u64, cookie)
2196 ),
2197 TP_fast_assign(
2198 WIPHY_ASSIGN;
2199 WDEV_ASSIGN;
2200 __entry->cookie = cookie;
2201 ),
2202 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie=%llu",
2203 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
2204);
2205
77765eaf
VT
2206TRACE_EVENT(rdev_set_mac_acl,
2207 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2208 struct cfg80211_acl_data *params),
2209 TP_ARGS(wiphy, netdev, params),
2210 TP_STRUCT__entry(
2211 WIPHY_ENTRY
2212 NETDEV_ENTRY
2213 __field(u32, acl_policy)
2214 ),
2215 TP_fast_assign(
2216 WIPHY_ASSIGN;
021fcdc1 2217 NETDEV_ASSIGN;
77765eaf
VT
2218 __entry->acl_policy = params->acl_policy;
2219 ),
2220 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
2221 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
2222);
2223
355199e0
JM
2224TRACE_EVENT(rdev_update_ft_ies,
2225 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2226 struct cfg80211_update_ft_ies_params *ftie),
2227 TP_ARGS(wiphy, netdev, ftie),
2228 TP_STRUCT__entry(
2229 WIPHY_ENTRY
2230 NETDEV_ENTRY
2231 __field(u16, md)
2232 __dynamic_array(u8, ie, ftie->ie_len)
2233 ),
2234 TP_fast_assign(
2235 WIPHY_ASSIGN;
2236 NETDEV_ASSIGN;
2237 __entry->md = ftie->md;
2238 memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
2239 ),
2240 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
2241 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
2242);
2243
5de17984
AS
2244TRACE_EVENT(rdev_crit_proto_start,
2245 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2246 enum nl80211_crit_proto_id protocol, u16 duration),
2247 TP_ARGS(wiphy, wdev, protocol, duration),
2248 TP_STRUCT__entry(
2249 WIPHY_ENTRY
2250 WDEV_ENTRY
2251 __field(u16, proto)
2252 __field(u16, duration)
2253 ),
2254 TP_fast_assign(
2255 WIPHY_ASSIGN;
2256 WDEV_ASSIGN;
2257 __entry->proto = protocol;
2258 __entry->duration = duration;
2259 ),
2260 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
2261 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
2262);
2263
2264TRACE_EVENT(rdev_crit_proto_stop,
2265 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2266 TP_ARGS(wiphy, wdev),
2267 TP_STRUCT__entry(
2268 WIPHY_ENTRY
2269 WDEV_ENTRY
2270 ),
2271 TP_fast_assign(
2272 WIPHY_ASSIGN;
2273 WDEV_ASSIGN;
2274 ),
2275 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
2276 WIPHY_PR_ARG, WDEV_PR_ARG)
2277);
2278
16ef1fe2
SW
2279TRACE_EVENT(rdev_channel_switch,
2280 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2281 struct cfg80211_csa_settings *params),
2282 TP_ARGS(wiphy, netdev, params),
2283 TP_STRUCT__entry(
2284 WIPHY_ENTRY
2285 NETDEV_ENTRY
2286 CHAN_DEF_ENTRY
16ef1fe2
SW
2287 __field(bool, radar_required)
2288 __field(bool, block_tx)
2289 __field(u8, count)
9a774c78
AO
2290 __dynamic_array(u16, bcn_ofs, params->n_counter_offsets_beacon)
2291 __dynamic_array(u16, pres_ofs, params->n_counter_offsets_presp)
16ef1fe2
SW
2292 ),
2293 TP_fast_assign(
2294 WIPHY_ASSIGN;
2295 NETDEV_ASSIGN;
2296 CHAN_DEF_ASSIGN(&params->chandef);
16ef1fe2
SW
2297 __entry->radar_required = params->radar_required;
2298 __entry->block_tx = params->block_tx;
2299 __entry->count = params->count;
9a774c78
AO
2300 memcpy(__get_dynamic_array(bcn_ofs),
2301 params->counter_offsets_beacon,
2302 params->n_counter_offsets_beacon * sizeof(u16));
2303
2304 /* probe response offsets are optional */
2305 if (params->n_counter_offsets_presp)
2306 memcpy(__get_dynamic_array(pres_ofs),
2307 params->counter_offsets_presp,
2308 params->n_counter_offsets_presp * sizeof(u16));
16ef1fe2
SW
2309 ),
2310 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
9a774c78 2311 ", block_tx: %d, count: %u, radar_required: %d",
16ef1fe2 2312 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
9a774c78 2313 __entry->block_tx, __entry->count, __entry->radar_required)
16ef1fe2
SW
2314);
2315
fa9ffc74
KP
2316TRACE_EVENT(rdev_set_qos_map,
2317 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2318 struct cfg80211_qos_map *qos_map),
2319 TP_ARGS(wiphy, netdev, qos_map),
2320 TP_STRUCT__entry(
2321 WIPHY_ENTRY
2322 NETDEV_ENTRY
2323 QOS_MAP_ENTRY
2324 ),
2325 TP_fast_assign(
2326 WIPHY_ASSIGN;
2327 NETDEV_ASSIGN;
2328 QOS_MAP_ASSIGN(qos_map);
2329 ),
2330 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u",
2331 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des)
2332);
2333
e16821bc
JM
2334TRACE_EVENT(rdev_set_ap_chanwidth,
2335 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
7b0a0e3c 2336 unsigned int link_id,
e16821bc 2337 struct cfg80211_chan_def *chandef),
7b0a0e3c 2338 TP_ARGS(wiphy, netdev, link_id, chandef),
e16821bc
JM
2339 TP_STRUCT__entry(
2340 WIPHY_ENTRY
2341 NETDEV_ENTRY
2342 CHAN_DEF_ENTRY
7b0a0e3c 2343 __field(unsigned int, link_id)
e16821bc
JM
2344 ),
2345 TP_fast_assign(
2346 WIPHY_ASSIGN;
2347 NETDEV_ASSIGN;
2348 CHAN_DEF_ASSIGN(chandef);
7b0a0e3c 2349 __entry->link_id = link_id;
e16821bc 2350 ),
7b0a0e3c
JB
2351 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT ", link:%d",
2352 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
2353 __entry->link_id)
e16821bc
JM
2354);
2355
960d01ac
JB
2356TRACE_EVENT(rdev_add_tx_ts,
2357 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2358 u8 tsid, const u8 *peer, u8 user_prio, u16 admitted_time),
2359 TP_ARGS(wiphy, netdev, tsid, peer, user_prio, admitted_time),
2360 TP_STRUCT__entry(
2361 WIPHY_ENTRY
2362 NETDEV_ENTRY
2363 MAC_ENTRY(peer)
2364 __field(u8, tsid)
2365 __field(u8, user_prio)
2366 __field(u16, admitted_time)
2367 ),
2368 TP_fast_assign(
2369 WIPHY_ASSIGN;
2370 NETDEV_ASSIGN;
2371 MAC_ASSIGN(peer, peer);
2372 __entry->tsid = tsid;
2373 __entry->user_prio = user_prio;
2374 __entry->admitted_time = admitted_time;
2375 ),
2376 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d, UP %d, time %d",
2377 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
2378 __entry->tsid, __entry->user_prio, __entry->admitted_time)
2379);
2380
2381TRACE_EVENT(rdev_del_tx_ts,
2382 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2383 u8 tsid, const u8 *peer),
2384 TP_ARGS(wiphy, netdev, tsid, peer),
2385 TP_STRUCT__entry(
2386 WIPHY_ENTRY
2387 NETDEV_ENTRY
2388 MAC_ENTRY(peer)
2389 __field(u8, tsid)
2390 ),
2391 TP_fast_assign(
2392 WIPHY_ASSIGN;
2393 NETDEV_ASSIGN;
2394 MAC_ASSIGN(peer, peer);
2395 __entry->tsid = tsid;
2396 ),
2397 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d",
2398 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tsid)
2399);
2400
1057d35e
AN
2401TRACE_EVENT(rdev_tdls_channel_switch,
2402 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2403 const u8 *addr, u8 oper_class,
2404 struct cfg80211_chan_def *chandef),
2405 TP_ARGS(wiphy, netdev, addr, oper_class, chandef),
2406 TP_STRUCT__entry(
2407 WIPHY_ENTRY
2408 NETDEV_ENTRY
2409 MAC_ENTRY(addr)
2410 __field(u8, oper_class)
2411 CHAN_DEF_ENTRY
2412 ),
2413 TP_fast_assign(
2414 WIPHY_ASSIGN;
2415 NETDEV_ASSIGN;
2416 MAC_ASSIGN(addr, addr);
2417 CHAN_DEF_ASSIGN(chandef);
2418 ),
2419 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT
2420 " oper class %d, " CHAN_DEF_PR_FMT,
2421 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr),
2422 __entry->oper_class, CHAN_DEF_PR_ARG)
2423);
2424
2425TRACE_EVENT(rdev_tdls_cancel_channel_switch,
2426 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2427 const u8 *addr),
2428 TP_ARGS(wiphy, netdev, addr),
2429 TP_STRUCT__entry(
2430 WIPHY_ENTRY
2431 NETDEV_ENTRY
2432 MAC_ENTRY(addr)
2433 ),
2434 TP_fast_assign(
2435 WIPHY_ASSIGN;
2436 NETDEV_ASSIGN;
2437 MAC_ASSIGN(addr, addr);
2438 ),
2439 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
2440 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr))
2441);
2442
3a00df57
AS
2443TRACE_EVENT(rdev_set_pmk,
2444 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2445 struct cfg80211_pmk_conf *pmk_conf),
2446
2447 TP_ARGS(wiphy, netdev, pmk_conf),
2448
2449 TP_STRUCT__entry(
2450 WIPHY_ENTRY
2451 NETDEV_ENTRY
2452 MAC_ENTRY(aa)
2453 __field(u8, pmk_len)
2454 __field(u8, pmk_r0_name_len)
2455 __dynamic_array(u8, pmk, pmk_conf->pmk_len)
2456 __dynamic_array(u8, pmk_r0_name, WLAN_PMK_NAME_LEN)
2457 ),
2458
2459 TP_fast_assign(
2460 WIPHY_ASSIGN;
2461 NETDEV_ASSIGN;
2462 MAC_ASSIGN(aa, pmk_conf->aa);
2463 __entry->pmk_len = pmk_conf->pmk_len;
2464 __entry->pmk_r0_name_len =
2465 pmk_conf->pmk_r0_name ? WLAN_PMK_NAME_LEN : 0;
2466 memcpy(__get_dynamic_array(pmk), pmk_conf->pmk,
2467 pmk_conf->pmk_len);
2468 memcpy(__get_dynamic_array(pmk_r0_name), pmk_conf->pmk_r0_name,
2469 pmk_conf->pmk_r0_name ? WLAN_PMK_NAME_LEN : 0);
2470 ),
2471
2472 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT
2473 "pmk_len=%u, pmk: %s pmk_r0_name: %s", WIPHY_PR_ARG,
2474 NETDEV_PR_ARG, MAC_PR_ARG(aa), __entry->pmk_len,
2475 __print_array(__get_dynamic_array(pmk),
2476 __get_dynamic_array_len(pmk), 1),
2477 __entry->pmk_r0_name_len ?
2478 __print_array(__get_dynamic_array(pmk_r0_name),
2479 __get_dynamic_array_len(pmk_r0_name), 1) : "")
2480);
2481
2482TRACE_EVENT(rdev_del_pmk,
2483 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *aa),
2484
2485 TP_ARGS(wiphy, netdev, aa),
2486
2487 TP_STRUCT__entry(
2488 WIPHY_ENTRY
2489 NETDEV_ENTRY
2490 MAC_ENTRY(aa)
2491 ),
2492
2493 TP_fast_assign(
2494 WIPHY_ASSIGN;
2495 NETDEV_ASSIGN;
2496 MAC_ASSIGN(aa, aa);
2497 ),
2498
2499 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
2500 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(aa))
2501);
2502
40cbfa90
SD
2503TRACE_EVENT(rdev_external_auth,
2504 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2505 struct cfg80211_external_auth_params *params),
2506 TP_ARGS(wiphy, netdev, params),
2507 TP_STRUCT__entry(WIPHY_ENTRY
2508 NETDEV_ENTRY
2509 MAC_ENTRY(bssid)
2510 __array(u8, ssid, IEEE80211_MAX_SSID_LEN + 1)
2511 __field(u16, status)
2512 ),
2513 TP_fast_assign(WIPHY_ASSIGN;
2514 NETDEV_ASSIGN;
2515 MAC_ASSIGN(bssid, params->bssid);
2516 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
2517 memcpy(__entry->ssid, params->ssid.ssid,
2518 params->ssid.ssid_len);
2519 __entry->status = params->status;
2520 ),
2521 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
2522 ", ssid: %s, status: %u", WIPHY_PR_ARG, NETDEV_PR_ARG,
2523 __entry->bssid, __entry->ssid, __entry->status)
2524);
2525
5207ca55
JB
2526TRACE_EVENT(rdev_start_radar_detection,
2527 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2528 struct cfg80211_chan_def *chandef,
2529 u32 cac_time_ms),
2530 TP_ARGS(wiphy, netdev, chandef, cac_time_ms),
2531 TP_STRUCT__entry(
2532 WIPHY_ENTRY
2533 NETDEV_ENTRY
2534 CHAN_DEF_ENTRY
2535 __field(u32, cac_time_ms)
2536 ),
2537 TP_fast_assign(
2538 WIPHY_ASSIGN;
2539 NETDEV_ASSIGN;
2540 CHAN_DEF_ASSIGN(chandef);
2541 __entry->cac_time_ms = cac_time_ms;
2542 ),
2543 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
2544 ", cac_time_ms=%u",
2545 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
2546 __entry->cac_time_ms)
2547);
2548
2549TRACE_EVENT(rdev_set_mcast_rate,
2550 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2551 int *mcast_rate),
2552 TP_ARGS(wiphy, netdev, mcast_rate),
2553 TP_STRUCT__entry(
2554 WIPHY_ENTRY
2555 NETDEV_ENTRY
2556 __array(int, mcast_rate, NUM_NL80211_BANDS)
2557 ),
2558 TP_fast_assign(
2559 WIPHY_ASSIGN;
2560 NETDEV_ASSIGN;
2561 memcpy(__entry->mcast_rate, mcast_rate,
2562 sizeof(int) * NUM_NL80211_BANDS);
2563 ),
2564 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", "
e548a1c3 2565 "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 6GHz=0x%x, 60GHz=0x%x]",
5207ca55
JB
2566 WIPHY_PR_ARG, NETDEV_PR_ARG,
2567 __entry->mcast_rate[NL80211_BAND_2GHZ],
2568 __entry->mcast_rate[NL80211_BAND_5GHZ],
e548a1c3 2569 __entry->mcast_rate[NL80211_BAND_6GHZ],
5207ca55
JB
2570 __entry->mcast_rate[NL80211_BAND_60GHZ])
2571);
2572
2573TRACE_EVENT(rdev_set_coalesce,
2574 TP_PROTO(struct wiphy *wiphy, struct cfg80211_coalesce *coalesce),
2575 TP_ARGS(wiphy, coalesce),
2576 TP_STRUCT__entry(
2577 WIPHY_ENTRY
2578 __field(int, n_rules)
2579 ),
2580 TP_fast_assign(
2581 WIPHY_ASSIGN;
2582 __entry->n_rules = coalesce ? coalesce->n_rules : 0;
2583 ),
2584 TP_printk(WIPHY_PR_FMT ", n_rules=%d",
2585 WIPHY_PR_ARG, __entry->n_rules)
2586);
2587
2588DEFINE_EVENT(wiphy_wdev_evt, rdev_abort_scan,
2589 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2590 TP_ARGS(wiphy, wdev)
2591);
2592
2593TRACE_EVENT(rdev_set_multicast_to_unicast,
2594 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2595 const bool enabled),
2596 TP_ARGS(wiphy, netdev, enabled),
2597 TP_STRUCT__entry(
2598 WIPHY_ENTRY
2599 NETDEV_ENTRY
2600 __field(bool, enabled)
2601 ),
2602 TP_fast_assign(
2603 WIPHY_ASSIGN;
2604 NETDEV_ASSIGN;
2605 __entry->enabled = enabled;
2606 ),
2607 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", unicast: %s",
2608 WIPHY_PR_ARG, NETDEV_PR_ARG,
2609 BOOL_TO_STR(__entry->enabled))
2610);
2611
2612DEFINE_EVENT(wiphy_wdev_evt, rdev_get_txq_stats,
2613 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2614 TP_ARGS(wiphy, wdev)
2615);
2616
2617TRACE_EVENT(rdev_get_ftm_responder_stats,
2618 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2619 struct cfg80211_ftm_responder_stats *ftm_stats),
2620
2621 TP_ARGS(wiphy, netdev, ftm_stats),
2622
2623 TP_STRUCT__entry(
2624 WIPHY_ENTRY
2625 NETDEV_ENTRY
2626 __field(u64, timestamp)
2627 __field(u32, success_num)
2628 __field(u32, partial_num)
2629 __field(u32, failed_num)
2630 __field(u32, asap_num)
2631 __field(u32, non_asap_num)
2632 __field(u64, duration)
2633 __field(u32, unknown_triggers)
2634 __field(u32, reschedule)
2635 __field(u32, out_of_window)
2636 ),
2637
2638 TP_fast_assign(
2639 WIPHY_ASSIGN;
2640 NETDEV_ASSIGN;
2641 __entry->success_num = ftm_stats->success_num;
2642 __entry->partial_num = ftm_stats->partial_num;
2643 __entry->failed_num = ftm_stats->failed_num;
2644 __entry->asap_num = ftm_stats->asap_num;
2645 __entry->non_asap_num = ftm_stats->non_asap_num;
2646 __entry->duration = ftm_stats->total_duration_ms;
2647 __entry->unknown_triggers = ftm_stats->unknown_triggers_num;
2648 __entry->reschedule = ftm_stats->reschedule_requests_num;
2649 __entry->out_of_window = ftm_stats->out_of_window_triggers_num;
2650 ),
2651
2652 TP_printk(WIPHY_PR_FMT "Ftm responder stats: success %u, partial %u, "
2653 "failed %u, asap %u, non asap %u, total duration %llu, unknown "
2654 "triggers %u, rescheduled %u, out of window %u", WIPHY_PR_ARG,
2655 __entry->success_num, __entry->partial_num, __entry->failed_num,
2656 __entry->asap_num, __entry->non_asap_num, __entry->duration,
2657 __entry->unknown_triggers, __entry->reschedule,
2658 __entry->out_of_window)
2659);
2660
9bb7e0f2
JB
2661DEFINE_EVENT(wiphy_wdev_cookie_evt, rdev_start_pmsr,
2662 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
2663 TP_ARGS(wiphy, wdev, cookie)
2664);
2665
2666DEFINE_EVENT(wiphy_wdev_cookie_evt, rdev_abort_pmsr,
2667 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
2668 TP_ARGS(wiphy, wdev, cookie)
2669);
2670
e306784a
SM
2671TRACE_EVENT(rdev_set_fils_aad,
2672 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2673 struct cfg80211_fils_aad *fils_aad),
2674 TP_ARGS(wiphy, netdev, fils_aad),
2675 TP_STRUCT__entry(WIPHY_ENTRY
2676 NETDEV_ENTRY
2677 __array(u8, macaddr, ETH_ALEN)
2678 __field(u8, kek_len)
2679 ),
2680 TP_fast_assign(WIPHY_ASSIGN;
2681 NETDEV_ASSIGN;
2682 FILS_AAD_ASSIGN(fils_aad);
2683 ),
2684 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " FILS_AAD_PR_FMT,
2685 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->macaddr,
2686 __entry->kek_len)
2687);
2688
c8a11ed5
JB
2689TRACE_EVENT(rdev_update_owe_info,
2690 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2691 struct cfg80211_update_owe_info *owe_info),
2692 TP_ARGS(wiphy, netdev, owe_info),
2693 TP_STRUCT__entry(WIPHY_ENTRY
2694 NETDEV_ENTRY
2695 MAC_ENTRY(peer)
2696 __field(u16, status)
2697 __dynamic_array(u8, ie, owe_info->ie_len)),
2698 TP_fast_assign(WIPHY_ASSIGN;
2699 NETDEV_ASSIGN;
2700 MAC_ASSIGN(peer, owe_info->peer);
2701 __entry->status = owe_info->status;
2702 memcpy(__get_dynamic_array(ie),
2703 owe_info->ie, owe_info->ie_len);),
2704 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT
2705 " status %d", WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
2706 __entry->status)
2707);
2708
2709TRACE_EVENT(rdev_probe_mesh_link,
2710 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2711 const u8 *dest, const u8 *buf, size_t len),
2712 TP_ARGS(wiphy, netdev, dest, buf, len),
2713 TP_STRUCT__entry(
2714 WIPHY_ENTRY
2715 NETDEV_ENTRY
2716 MAC_ENTRY(dest)
2717 ),
2718 TP_fast_assign(
2719 WIPHY_ASSIGN;
2720 NETDEV_ASSIGN;
2721 MAC_ASSIGN(dest, dest);
2722 ),
2723 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
2724 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dest))
2725);
2726
2727TRACE_EVENT(rdev_set_tid_config,
2728 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2729 struct cfg80211_tid_config *tid_conf),
2730 TP_ARGS(wiphy, netdev, tid_conf),
2731 TP_STRUCT__entry(
2732 WIPHY_ENTRY
2733 NETDEV_ENTRY
2734 MAC_ENTRY(peer)
2735 ),
2736 TP_fast_assign(
2737 WIPHY_ASSIGN;
2738 NETDEV_ASSIGN;
2739 MAC_ASSIGN(peer, tid_conf->peer);
2740 ),
2741 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
2742 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
2743);
2744
2745TRACE_EVENT(rdev_reset_tid_config,
2746 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2747 const u8 *peer, u8 tids),
2748 TP_ARGS(wiphy, netdev, peer, tids),
2749 TP_STRUCT__entry(
2750 WIPHY_ENTRY
2751 NETDEV_ENTRY
2752 MAC_ENTRY(peer)
2753 __field(u8, tids)
2754 ),
2755 TP_fast_assign(
2756 WIPHY_ASSIGN;
2757 NETDEV_ASSIGN;
2758 MAC_ASSIGN(peer, peer);
2759 __entry->tids = tids;
2760 ),
2761 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", tids: 0x%x",
2762 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tids)
2763);
2764
2765TRACE_EVENT(rdev_set_sar_specs,
2766 TP_PROTO(struct wiphy *wiphy, struct cfg80211_sar_specs *sar),
2767 TP_ARGS(wiphy, sar),
2768 TP_STRUCT__entry(
2769 WIPHY_ENTRY
2770 __field(u16, type)
2771 __field(u16, num)
2772 ),
2773 TP_fast_assign(
2774 WIPHY_ASSIGN;
2775 __entry->type = sar->type;
2776 __entry->num = sar->num_sub_specs;
2777
2778 ),
2779 TP_printk(WIPHY_PR_FMT ", Set type:%d, num_specs:%d",
2780 WIPHY_PR_ARG, __entry->type, __entry->num)
2781);
2782
2783TRACE_EVENT(rdev_color_change,
2784 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2785 struct cfg80211_color_change_settings *params),
2786 TP_ARGS(wiphy, netdev, params),
2787 TP_STRUCT__entry(
2788 WIPHY_ENTRY
2789 NETDEV_ENTRY
2790 __field(u8, count)
2791 __field(u16, bcn_ofs)
2792 __field(u16, pres_ofs)
2793 ),
2794 TP_fast_assign(
2795 WIPHY_ASSIGN;
2796 NETDEV_ASSIGN;
2797 __entry->count = params->count;
2798 __entry->bcn_ofs = params->counter_offset_beacon;
2799 __entry->pres_ofs = params->counter_offset_presp;
2800 ),
2801 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
2802 ", count: %u",
2803 WIPHY_PR_ARG, NETDEV_PR_ARG,
2804 __entry->count)
2805);
2806
2807TRACE_EVENT(rdev_set_radar_background,
2808 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2809
2810 TP_ARGS(wiphy, chandef),
2811
2812 TP_STRUCT__entry(
2813 WIPHY_ENTRY
2814 CHAN_DEF_ENTRY
2815 ),
2816
2817 TP_fast_assign(
2818 WIPHY_ASSIGN;
2819 CHAN_DEF_ASSIGN(chandef)
2820 ),
2821
2822 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2823 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2824);
2825
4ee3e063
BL
2826/*************************************************************
2827 * cfg80211 exported functions traces *
2828 *************************************************************/
2829
2830TRACE_EVENT(cfg80211_return_bool,
2831 TP_PROTO(bool ret),
2832 TP_ARGS(ret),
2833 TP_STRUCT__entry(
2834 __field(bool, ret)
2835 ),
2836 TP_fast_assign(
2837 __entry->ret = ret;
2838 ),
2839 TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
2840);
2841
2842DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
2843 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2844 TP_ARGS(netdev, macaddr),
2845 TP_STRUCT__entry(
2846 NETDEV_ENTRY
2847 MAC_ENTRY(macaddr)
2848 ),
2849 TP_fast_assign(
2850 NETDEV_ASSIGN;
2851 MAC_ASSIGN(macaddr, macaddr);
2852 ),
2853 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2854 NETDEV_PR_ARG, MAC_PR_ARG(macaddr))
2855);
2856
2857DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
2858 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2859 TP_ARGS(netdev, macaddr)
2860);
2861
2862DECLARE_EVENT_CLASS(netdev_evt_only,
2863 TP_PROTO(struct net_device *netdev),
2864 TP_ARGS(netdev),
2865 TP_STRUCT__entry(
2866 NETDEV_ENTRY
2867 ),
2868 TP_fast_assign(
2869 NETDEV_ASSIGN;
2870 ),
2871 TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
2872);
2873
2874DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
2875 TP_PROTO(struct net_device *netdev),
2876 TP_ARGS(netdev)
2877);
2878
2879TRACE_EVENT(cfg80211_send_rx_assoc,
2880 TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss),
2881 TP_ARGS(netdev, bss),
2882 TP_STRUCT__entry(
2883 NETDEV_ENTRY
2884 MAC_ENTRY(bssid)
2885 CHAN_ENTRY
2886 ),
2887 TP_fast_assign(
2888 NETDEV_ASSIGN;
2889 MAC_ASSIGN(bssid, bss->bssid);
2890 CHAN_ASSIGN(bss->channel);
2891 ),
ec816087 2892 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT,
4ee3e063
BL
2893 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2894);
2895
6ff57cf8
JB
2896DECLARE_EVENT_CLASS(netdev_frame_event,
2897 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2898 TP_ARGS(netdev, buf, len),
2899 TP_STRUCT__entry(
2900 NETDEV_ENTRY
2901 __dynamic_array(u8, frame, len)
2902 ),
2903 TP_fast_assign(
2904 NETDEV_ASSIGN;
2905 memcpy(__get_dynamic_array(frame), buf, len);
2906 ),
2907 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2908 NETDEV_PR_ARG,
2909 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
4ee3e063
BL
2910);
2911
6ff57cf8
JB
2912DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
2913 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2914 TP_ARGS(netdev, buf, len)
4ee3e063
BL
2915);
2916
6ff57cf8
JB
2917DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
2918 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2919 TP_ARGS(netdev, buf, len)
4ee3e063
BL
2920);
2921
6ff57cf8 2922TRACE_EVENT(cfg80211_tx_mlme_mgmt,
3bb02143
JB
2923 TP_PROTO(struct net_device *netdev, const u8 *buf, int len,
2924 bool reconnect),
2925 TP_ARGS(netdev, buf, len, reconnect),
6ff57cf8
JB
2926 TP_STRUCT__entry(
2927 NETDEV_ENTRY
2928 __dynamic_array(u8, frame, len)
3bb02143 2929 __field(int, reconnect)
6ff57cf8
JB
2930 ),
2931 TP_fast_assign(
2932 NETDEV_ASSIGN;
2933 memcpy(__get_dynamic_array(frame), buf, len);
3bb02143 2934 __entry->reconnect = reconnect;
6ff57cf8 2935 ),
3bb02143 2936 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x reconnect:%d",
6ff57cf8 2937 NETDEV_PR_ARG,
3bb02143
JB
2938 le16_to_cpup((__le16 *)__get_dynamic_array(frame)),
2939 __entry->reconnect)
4ee3e063
BL
2940);
2941
2942DECLARE_EVENT_CLASS(netdev_mac_evt,
2943 TP_PROTO(struct net_device *netdev, const u8 *mac),
2944 TP_ARGS(netdev, mac),
2945 TP_STRUCT__entry(
2946 NETDEV_ENTRY
2947 MAC_ENTRY(mac)
2948 ),
2949 TP_fast_assign(
2950 NETDEV_ASSIGN;
2951 MAC_ASSIGN(mac, mac)
2952 ),
2953 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2954 NETDEV_PR_ARG, MAC_PR_ARG(mac))
2955);
2956
2957DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
2958 TP_PROTO(struct net_device *netdev, const u8 *mac),
2959 TP_ARGS(netdev, mac)
2960);
2961
2962DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout,
2963 TP_PROTO(struct net_device *netdev, const u8 *mac),
2964 TP_ARGS(netdev, mac)
2965);
2966
2967TRACE_EVENT(cfg80211_michael_mic_failure,
2968 TP_PROTO(struct net_device *netdev, const u8 *addr,
2969 enum nl80211_key_type key_type, int key_id, const u8 *tsc),
2970 TP_ARGS(netdev, addr, key_type, key_id, tsc),
2971 TP_STRUCT__entry(
2972 NETDEV_ENTRY
2973 MAC_ENTRY(addr)
2974 __field(enum nl80211_key_type, key_type)
2975 __field(int, key_id)
2976 __array(u8, tsc, 6)
2977 ),
2978 TP_fast_assign(
2979 NETDEV_ASSIGN;
2980 MAC_ASSIGN(addr, addr);
2981 __entry->key_type = key_type;
2982 __entry->key_id = key_id;
8c26d458
EP
2983 if (tsc)
2984 memcpy(__entry->tsc, tsc, 6);
4ee3e063 2985 ),
ec816087 2986 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
4ee3e063
BL
2987 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,
2988 __entry->key_id, __entry->tsc)
2989);
2990
2991TRACE_EVENT(cfg80211_ready_on_channel,
2992 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2993 struct ieee80211_channel *chan,
42d97a59
JB
2994 unsigned int duration),
2995 TP_ARGS(wdev, cookie, chan, duration),
4ee3e063
BL
2996 TP_STRUCT__entry(
2997 WDEV_ENTRY
2998 __field(u64, cookie)
2999 CHAN_ENTRY
4ee3e063
BL
3000 __field(unsigned int, duration)
3001 ),
3002 TP_fast_assign(
3003 WDEV_ASSIGN;
3004 __entry->cookie = cookie;
3005 CHAN_ASSIGN(chan);
4ee3e063
BL
3006 __entry->duration = duration;
3007 ),
42d97a59 3008 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
4ee3e063 3009 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
42d97a59 3010 __entry->duration)
4ee3e063
BL
3011);
3012
3013TRACE_EVENT(cfg80211_ready_on_channel_expired,
3014 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
42d97a59
JB
3015 struct ieee80211_channel *chan),
3016 TP_ARGS(wdev, cookie, chan),
4ee3e063
BL
3017 TP_STRUCT__entry(
3018 WDEV_ENTRY
3019 __field(u64, cookie)
3020 CHAN_ENTRY
4ee3e063
BL
3021 ),
3022 TP_fast_assign(
3023 WDEV_ASSIGN;
3024 __entry->cookie = cookie;
3025 CHAN_ASSIGN(chan);
4ee3e063 3026 ),
42d97a59
JB
3027 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
3028 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
4ee3e063
BL
3029);
3030
1c38c7f2
JP
3031TRACE_EVENT(cfg80211_tx_mgmt_expired,
3032 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
3033 struct ieee80211_channel *chan),
3034 TP_ARGS(wdev, cookie, chan),
3035 TP_STRUCT__entry(
3036 WDEV_ENTRY
3037 __field(u64, cookie)
3038 CHAN_ENTRY
3039 ),
3040 TP_fast_assign(
3041 WDEV_ASSIGN;
3042 __entry->cookie = cookie;
3043 CHAN_ASSIGN(chan);
3044 ),
3045 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
3046 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
3047);
3048
4ee3e063
BL
3049TRACE_EVENT(cfg80211_new_sta,
3050 TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
3051 struct station_info *sinfo),
3052 TP_ARGS(netdev, mac_addr, sinfo),
3053 TP_STRUCT__entry(
3054 NETDEV_ENTRY
3055 MAC_ENTRY(mac_addr)
3056 SINFO_ENTRY
3057 ),
3058 TP_fast_assign(
3059 NETDEV_ASSIGN;
3060 MAC_ASSIGN(mac_addr, mac_addr);
3061 SINFO_ASSIGN;
3062 ),
ec816087 3063 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT,
4ee3e063
BL
3064 NETDEV_PR_ARG, MAC_PR_ARG(mac_addr))
3065);
3066
3067DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
3068 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
3069 TP_ARGS(netdev, macaddr)
3070);
3071
3072TRACE_EVENT(cfg80211_rx_mgmt,
6c2fb1e6
SM
3073 TP_PROTO(struct wireless_dev *wdev, int freq, int sig_dbm),
3074 TP_ARGS(wdev, freq, sig_dbm),
4ee3e063
BL
3075 TP_STRUCT__entry(
3076 WDEV_ENTRY
3077 __field(int, freq)
6c2fb1e6 3078 __field(int, sig_dbm)
4ee3e063
BL
3079 ),
3080 TP_fast_assign(
3081 WDEV_ASSIGN;
3082 __entry->freq = freq;
6c2fb1e6 3083 __entry->sig_dbm = sig_dbm;
4ee3e063 3084 ),
e76fede8
TP
3085 TP_printk(WDEV_PR_FMT ", freq: "KHZ_F", sig dbm: %d",
3086 WDEV_PR_ARG, PR_KHZ(__entry->freq), __entry->sig_dbm)
4ee3e063
BL
3087);
3088
3089TRACE_EVENT(cfg80211_mgmt_tx_status,
3090 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
3091 TP_ARGS(wdev, cookie, ack),
3092 TP_STRUCT__entry(
3093 WDEV_ENTRY
3094 __field(u64, cookie)
3095 __field(bool, ack)
3096 ),
3097 TP_fast_assign(
3098 WDEV_ASSIGN;
3099 __entry->cookie = cookie;
3100 __entry->ack = ack;
3101 ),
3102 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
3103 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
dca9ca2d
MT
3104);
3105
3106TRACE_EVENT(cfg80211_control_port_tx_status,
3107 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
3108 TP_ARGS(wdev, cookie, ack),
3109 TP_STRUCT__entry(
3110 WDEV_ENTRY
3111 __field(u64, cookie)
3112 __field(bool, ack)
3113 ),
3114 TP_fast_assign(
3115 WDEV_ASSIGN;
3116 __entry->cookie = cookie;
3117 __entry->ack = ack;
3118 ),
3119 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
3120 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
4ee3e063
BL
3121);
3122
6a671a50 3123TRACE_EVENT(cfg80211_rx_control_port,
a948f713
DK
3124 TP_PROTO(struct net_device *netdev, struct sk_buff *skb,
3125 bool unencrypted),
3126 TP_ARGS(netdev, skb, unencrypted),
6a671a50
DK
3127 TP_STRUCT__entry(
3128 NETDEV_ENTRY
a948f713
DK
3129 __field(int, len)
3130 MAC_ENTRY(from)
6a671a50
DK
3131 __field(u16, proto)
3132 __field(bool, unencrypted)
3133 ),
3134 TP_fast_assign(
3135 NETDEV_ASSIGN;
a948f713
DK
3136 __entry->len = skb->len;
3137 MAC_ASSIGN(from, eth_hdr(skb)->h_source);
3138 __entry->proto = be16_to_cpu(skb->protocol);
6a671a50
DK
3139 __entry->unencrypted = unencrypted;
3140 ),
8d74a623
JB
3141 TP_printk(NETDEV_PR_FMT ", len=%d, " MAC_PR_FMT ", proto: 0x%x, unencrypted: %s",
3142 NETDEV_PR_ARG, __entry->len, MAC_PR_ARG(from),
6a671a50
DK
3143 __entry->proto, BOOL_TO_STR(__entry->unencrypted))
3144);
3145
4ee3e063
BL
3146TRACE_EVENT(cfg80211_cqm_rssi_notify,
3147 TP_PROTO(struct net_device *netdev,
bee427b8
AZ
3148 enum nl80211_cqm_rssi_threshold_event rssi_event,
3149 s32 rssi_level),
3150 TP_ARGS(netdev, rssi_event, rssi_level),
4ee3e063
BL
3151 TP_STRUCT__entry(
3152 NETDEV_ENTRY
3153 __field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
bee427b8 3154 __field(s32, rssi_level)
4ee3e063
BL
3155 ),
3156 TP_fast_assign(
3157 NETDEV_ASSIGN;
3158 __entry->rssi_event = rssi_event;
bee427b8 3159 __entry->rssi_level = rssi_level;
4ee3e063 3160 ),
bee427b8
AZ
3161 TP_printk(NETDEV_PR_FMT ", rssi event: %d, level: %d",
3162 NETDEV_PR_ARG, __entry->rssi_event, __entry->rssi_level)
4ee3e063
BL
3163);
3164
683b6d3b 3165TRACE_EVENT(cfg80211_reg_can_beacon,
174e0cd2 3166 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
923b352f
AN
3167 enum nl80211_iftype iftype, bool check_no_ir),
3168 TP_ARGS(wiphy, chandef, iftype, check_no_ir),
4ee3e063
BL
3169 TP_STRUCT__entry(
3170 WIPHY_ENTRY
683b6d3b 3171 CHAN_DEF_ENTRY
174e0cd2 3172 __field(enum nl80211_iftype, iftype)
923b352f 3173 __field(bool, check_no_ir)
4ee3e063
BL
3174 ),
3175 TP_fast_assign(
3176 WIPHY_ASSIGN;
683b6d3b 3177 CHAN_DEF_ASSIGN(chandef);
174e0cd2 3178 __entry->iftype = iftype;
923b352f 3179 __entry->check_no_ir = check_no_ir;
4ee3e063 3180 ),
923b352f
AN
3181 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d check_no_ir=%s",
3182 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype,
3183 BOOL_TO_STR(__entry->check_no_ir))
4ee3e063
BL
3184);
3185
04f39047
SW
3186TRACE_EVENT(cfg80211_chandef_dfs_required,
3187 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
3188 TP_ARGS(wiphy, chandef),
3189 TP_STRUCT__entry(
3190 WIPHY_ENTRY
3191 CHAN_DEF_ENTRY
3192 ),
3193 TP_fast_assign(
3194 WIPHY_ASSIGN;
3195 CHAN_DEF_ASSIGN(chandef);
3196 ),
3197 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
3198 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
3199);
3200
4ee3e063 3201TRACE_EVENT(cfg80211_ch_switch_notify,
683b6d3b 3202 TP_PROTO(struct net_device *netdev,
7b0a0e3c
JB
3203 struct cfg80211_chan_def *chandef,
3204 unsigned int link_id),
3205 TP_ARGS(netdev, chandef, link_id),
4ee3e063
BL
3206 TP_STRUCT__entry(
3207 NETDEV_ENTRY
683b6d3b 3208 CHAN_DEF_ENTRY
7b0a0e3c 3209 __field(unsigned int, link_id)
4ee3e063
BL
3210 ),
3211 TP_fast_assign(
3212 NETDEV_ASSIGN;
683b6d3b 3213 CHAN_DEF_ASSIGN(chandef);
7b0a0e3c 3214 __entry->link_id = link_id;
4ee3e063 3215 ),
7b0a0e3c
JB
3216 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT ", link:%d",
3217 NETDEV_PR_ARG, CHAN_DEF_PR_ARG, __entry->link_id)
4ee3e063
BL
3218);
3219
f8d7552e
LC
3220TRACE_EVENT(cfg80211_ch_switch_started_notify,
3221 TP_PROTO(struct net_device *netdev,
3222 struct cfg80211_chan_def *chandef),
3223 TP_ARGS(netdev, chandef),
3224 TP_STRUCT__entry(
3225 NETDEV_ENTRY
3226 CHAN_DEF_ENTRY
3227 ),
3228 TP_fast_assign(
3229 NETDEV_ASSIGN;
3230 CHAN_DEF_ASSIGN(chandef);
3231 ),
3232 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
3233 NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
3234);
3235
04f39047 3236TRACE_EVENT(cfg80211_radar_event,
c47240cb
LB
3237 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
3238 bool offchan),
3239 TP_ARGS(wiphy, chandef, offchan),
04f39047
SW
3240 TP_STRUCT__entry(
3241 WIPHY_ENTRY
3242 CHAN_DEF_ENTRY
c47240cb 3243 __field(bool, offchan)
04f39047
SW
3244 ),
3245 TP_fast_assign(
3246 WIPHY_ASSIGN;
3247 CHAN_DEF_ASSIGN(chandef);
c47240cb 3248 __entry->offchan = offchan;
04f39047 3249 ),
c47240cb
LB
3250 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", offchan %d",
3251 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->offchan)
04f39047
SW
3252);
3253
3254TRACE_EVENT(cfg80211_cac_event,
3255 TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt),
3256 TP_ARGS(netdev, evt),
3257 TP_STRUCT__entry(
3258 NETDEV_ENTRY
3259 __field(enum nl80211_radar_event, evt)
3260 ),
3261 TP_fast_assign(
3262 NETDEV_ASSIGN;
3263 __entry->evt = evt;
3264 ),
3265 TP_printk(NETDEV_PR_FMT ", event: %d",
3266 NETDEV_PR_ARG, __entry->evt)
3267);
3268
4ee3e063
BL
3269DECLARE_EVENT_CLASS(cfg80211_rx_evt,
3270 TP_PROTO(struct net_device *netdev, const u8 *addr),
3271 TP_ARGS(netdev, addr),
3272 TP_STRUCT__entry(
3273 NETDEV_ENTRY
3274 MAC_ENTRY(addr)
3275 ),
3276 TP_fast_assign(
3277 NETDEV_ASSIGN;
3278 MAC_ASSIGN(addr, addr);
3279 ),
ec816087 3280 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
4ee3e063
BL
3281);
3282
4ee3e063
BL
3283DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
3284 TP_PROTO(struct net_device *netdev, const u8 *addr),
3285 TP_ARGS(netdev, addr)
3286);
3287
3288DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
3289 TP_PROTO(struct net_device *netdev, const u8 *addr),
3290 TP_ARGS(netdev, addr)
3291);
3292
fe94f3a4
AQ
3293TRACE_EVENT(cfg80211_ibss_joined,
3294 TP_PROTO(struct net_device *netdev, const u8 *bssid,
3295 struct ieee80211_channel *channel),
3296 TP_ARGS(netdev, bssid, channel),
3297 TP_STRUCT__entry(
3298 NETDEV_ENTRY
3299 MAC_ENTRY(bssid)
3300 CHAN_ENTRY
3301 ),
3302 TP_fast_assign(
3303 NETDEV_ASSIGN;
3304 MAC_ASSIGN(bssid, bssid);
3305 CHAN_ASSIGN(channel);
3306 ),
3307 TP_printk(NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", " CHAN_PR_FMT,
3308 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
3309);
3310
4ee3e063
BL
3311TRACE_EVENT(cfg80211_probe_status,
3312 TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
3313 bool acked),
3314 TP_ARGS(netdev, addr, cookie, acked),
3315 TP_STRUCT__entry(
3316 NETDEV_ENTRY
3317 MAC_ENTRY(addr)
3318 __field(u64, cookie)
3319 __field(bool, acked)
3320 ),
3321 TP_fast_assign(
3322 NETDEV_ASSIGN;
3323 MAC_ASSIGN(addr, addr);
3324 __entry->cookie = cookie;
3325 __entry->acked = acked;
3326 ),
ec816087 3327 TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
4ee3e063
BL
3328 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
3329 BOOL_TO_STR(__entry->acked))
3330);
3331
3332TRACE_EVENT(cfg80211_cqm_pktloss_notify,
3333 TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
3334 TP_ARGS(netdev, peer, num_packets),
3335 TP_STRUCT__entry(
3336 NETDEV_ENTRY
3337 MAC_ENTRY(peer)
3338 __field(u32, num_packets)
3339 ),
3340 TP_fast_assign(
3341 NETDEV_ASSIGN;
3342 MAC_ASSIGN(peer, peer);
3343 __entry->num_packets = num_packets;
3344 ),
3345 TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u",
3346 NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets)
3347);
3348
3349DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
3350 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
3351 TP_ARGS(netdev, macaddr)
3352);
3353
3354TRACE_EVENT(cfg80211_pmksa_candidate_notify,
3355 TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
3356 bool preauth),
3357 TP_ARGS(netdev, index, bssid, preauth),
3358 TP_STRUCT__entry(
3359 NETDEV_ENTRY
3360 __field(int, index)
3361 MAC_ENTRY(bssid)
3362 __field(bool, preauth)
3363 ),
3364 TP_fast_assign(
3365 NETDEV_ASSIGN;
3366 __entry->index = index;
3367 MAC_ASSIGN(bssid, bssid);
3368 __entry->preauth = preauth;
3369 ),
3370 TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s",
3371 NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid),
3372 BOOL_TO_STR(__entry->preauth))
3373);
3374
3375TRACE_EVENT(cfg80211_report_obss_beacon,
3376 TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
3377 int freq, int sig_dbm),
3378 TP_ARGS(wiphy, frame, len, freq, sig_dbm),
3379 TP_STRUCT__entry(
3380 WIPHY_ENTRY
3381 __field(int, freq)
3382 __field(int, sig_dbm)
3383 ),
3384 TP_fast_assign(
3385 WIPHY_ASSIGN;
3386 __entry->freq = freq;
3387 __entry->sig_dbm = sig_dbm;
3388 ),
e76fede8
TP
3389 TP_printk(WIPHY_PR_FMT ", freq: "KHZ_F", sig_dbm: %d",
3390 WIPHY_PR_ARG, PR_KHZ(__entry->freq), __entry->sig_dbm)
4ee3e063
BL
3391);
3392
3475b094
JM
3393TRACE_EVENT(cfg80211_tdls_oper_request,
3394 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
3395 enum nl80211_tdls_operation oper, u16 reason_code),
3396 TP_ARGS(wiphy, netdev, peer, oper, reason_code),
3397 TP_STRUCT__entry(
3398 WIPHY_ENTRY
3399 NETDEV_ENTRY
3400 MAC_ENTRY(peer)
3401 __field(enum nl80211_tdls_operation, oper)
3402 __field(u16, reason_code)
3403 ),
3404 TP_fast_assign(
3405 WIPHY_ASSIGN;
3406 NETDEV_ASSIGN;
3407 MAC_ASSIGN(peer, peer);
3408 __entry->oper = oper;
3409 __entry->reason_code = reason_code;
3410 ),
3411 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u",
3412 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper,
3413 __entry->reason_code)
3414 );
3415
4ee3e063 3416TRACE_EVENT(cfg80211_scan_done,
1d76250b
AS
3417 TP_PROTO(struct cfg80211_scan_request *request,
3418 struct cfg80211_scan_info *info),
3419 TP_ARGS(request, info),
4ee3e063
BL
3420 TP_STRUCT__entry(
3421 __field(u32, n_channels)
3422 __dynamic_array(u8, ie, request ? request->ie_len : 0)
57fbcce3 3423 __array(u32, rates, NUM_NL80211_BANDS)
4ee3e063
BL
3424 __field(u32, wdev_id)
3425 MAC_ENTRY(wiphy_mac)
3426 __field(bool, no_cck)
3427 __field(bool, aborted)
1d76250b
AS
3428 __field(u64, scan_start_tsf)
3429 MAC_ENTRY(tsf_bssid)
4ee3e063
BL
3430 ),
3431 TP_fast_assign(
3432 if (request) {
3433 memcpy(__get_dynamic_array(ie), request->ie,
3434 request->ie_len);
3435 memcpy(__entry->rates, request->rates,
57fbcce3 3436 NUM_NL80211_BANDS);
4ee3e063
BL
3437 __entry->wdev_id = request->wdev ?
3438 request->wdev->identifier : 0;
3439 if (request->wiphy)
3440 MAC_ASSIGN(wiphy_mac,
3441 request->wiphy->perm_addr);
3442 __entry->no_cck = request->no_cck;
3443 }
1d76250b
AS
3444 if (info) {
3445 __entry->aborted = info->aborted;
3446 __entry->scan_start_tsf = info->scan_start_tsf;
3447 MAC_ASSIGN(tsf_bssid, info->tsf_bssid);
3448 }
4ee3e063 3449 ),
1d76250b
AS
3450 TP_printk("aborted: %s, scan start (TSF): %llu, tsf_bssid: " MAC_PR_FMT,
3451 BOOL_TO_STR(__entry->aborted),
3452 (unsigned long long)__entry->scan_start_tsf,
3453 MAC_PR_ARG(tsf_bssid))
4ee3e063
BL
3454);
3455
b34939b9
AVS
3456DECLARE_EVENT_CLASS(wiphy_id_evt,
3457 TP_PROTO(struct wiphy *wiphy, u64 id),
3458 TP_ARGS(wiphy, id),
3459 TP_STRUCT__entry(
3460 WIPHY_ENTRY
3461 __field(u64, id)
3462 ),
3463 TP_fast_assign(
3464 WIPHY_ASSIGN;
3465 __entry->id = id;
3466 ),
3467 TP_printk(WIPHY_PR_FMT ", id: %llu", WIPHY_PR_ARG, __entry->id)
4ee3e063
BL
3468);
3469
b34939b9
AVS
3470DEFINE_EVENT(wiphy_id_evt, cfg80211_sched_scan_stopped,
3471 TP_PROTO(struct wiphy *wiphy, u64 id),
3472 TP_ARGS(wiphy, id)
3473);
3474
3475DEFINE_EVENT(wiphy_id_evt, cfg80211_sched_scan_results,
3476 TP_PROTO(struct wiphy *wiphy, u64 id),
3477 TP_ARGS(wiphy, id)
4ee3e063
BL
3478);
3479
3480TRACE_EVENT(cfg80211_get_bss,
3481 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
3482 const u8 *bssid, const u8 *ssid, size_t ssid_len,
6eb18137
DL
3483 enum ieee80211_bss_type bss_type,
3484 enum ieee80211_privacy privacy),
3485 TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, bss_type, privacy),
4ee3e063
BL
3486 TP_STRUCT__entry(
3487 WIPHY_ENTRY
3488 CHAN_ENTRY
3489 MAC_ENTRY(bssid)
3490 __dynamic_array(u8, ssid, ssid_len)
6eb18137
DL
3491 __field(enum ieee80211_bss_type, bss_type)
3492 __field(enum ieee80211_privacy, privacy)
4ee3e063
BL
3493 ),
3494 TP_fast_assign(
3495 WIPHY_ASSIGN;
3496 CHAN_ASSIGN(channel);
3497 MAC_ASSIGN(bssid, bssid);
3498 memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
6eb18137
DL
3499 __entry->bss_type = bss_type;
3500 __entry->privacy = privacy;
3501 ),
3502 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT
3503 ", buf: %#.2x, bss_type: %d, privacy: %d",
3504 WIPHY_PR_ARG, CHAN_PR_ARG, MAC_PR_ARG(bssid),
3505 ((u8 *)__get_dynamic_array(ssid))[0], __entry->bss_type,
3506 __entry->privacy)
4ee3e063
BL
3507);
3508
6e19bc4b
DS
3509TRACE_EVENT(cfg80211_inform_bss_frame,
3510 TP_PROTO(struct wiphy *wiphy, struct cfg80211_inform_bss *data,
3511 struct ieee80211_mgmt *mgmt, size_t len),
3512 TP_ARGS(wiphy, data, mgmt, len),
4ee3e063
BL
3513 TP_STRUCT__entry(
3514 WIPHY_ENTRY
3515 CHAN_ENTRY
dcd6eac1 3516 __field(enum nl80211_bss_scan_width, scan_width)
4ee3e063
BL
3517 __dynamic_array(u8, mgmt, len)
3518 __field(s32, signal)
6e19bc4b 3519 __field(u64, ts_boottime)
1d76250b
AS
3520 __field(u64, parent_tsf)
3521 MAC_ENTRY(parent_bssid)
4ee3e063
BL
3522 ),
3523 TP_fast_assign(
3524 WIPHY_ASSIGN;
6e19bc4b
DS
3525 CHAN_ASSIGN(data->chan);
3526 __entry->scan_width = data->scan_width;
4ee3e063
BL
3527 if (mgmt)
3528 memcpy(__get_dynamic_array(mgmt), mgmt, len);
6e19bc4b
DS
3529 __entry->signal = data->signal;
3530 __entry->ts_boottime = data->boottime_ns;
1d76250b
AS
3531 __entry->parent_tsf = data->parent_tsf;
3532 MAC_ASSIGN(parent_bssid, data->parent_bssid);
3533 ),
3534 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT
3535 "(scan_width: %d) signal: %d, tsb:%llu, detect_tsf:%llu, tsf_bssid: "
3536 MAC_PR_FMT, WIPHY_PR_ARG, CHAN_PR_ARG, __entry->scan_width,
3537 __entry->signal, (unsigned long long)__entry->ts_boottime,
3538 (unsigned long long)__entry->parent_tsf,
3539 MAC_PR_ARG(parent_bssid))
4ee3e063
BL
3540);
3541
3542DECLARE_EVENT_CLASS(cfg80211_bss_evt,
3543 TP_PROTO(struct cfg80211_bss *pub),
3544 TP_ARGS(pub),
3545 TP_STRUCT__entry(
3546 MAC_ENTRY(bssid)
3547 CHAN_ENTRY
3548 ),
3549 TP_fast_assign(
3550 MAC_ASSIGN(bssid, pub->bssid);
3551 CHAN_ASSIGN(pub->channel);
3552 ),
ec816087 3553 TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG)
4ee3e063
BL
3554);
3555
3556DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
3557 TP_PROTO(struct cfg80211_bss *pub),
3558 TP_ARGS(pub)
3559);
3560
3561TRACE_EVENT(cfg80211_return_uint,
3562 TP_PROTO(unsigned int ret),
3563 TP_ARGS(ret),
3564 TP_STRUCT__entry(
3565 __field(unsigned int, ret)
3566 ),
3567 TP_fast_assign(
3568 __entry->ret = ret;
3569 ),
3570 TP_printk("ret: %d", __entry->ret)
3571);
3572
3573TRACE_EVENT(cfg80211_return_u32,
3574 TP_PROTO(u32 ret),
3575 TP_ARGS(ret),
3576 TP_STRUCT__entry(
3577 __field(u32, ret)
3578 ),
3579 TP_fast_assign(
3580 __entry->ret = ret;
3581 ),
3582 TP_printk("ret: %u", __entry->ret)
3583);
3584
cd8f7cb4
JB
3585TRACE_EVENT(cfg80211_report_wowlan_wakeup,
3586 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
3587 struct cfg80211_wowlan_wakeup *wakeup),
3588 TP_ARGS(wiphy, wdev, wakeup),
3589 TP_STRUCT__entry(
3590 WIPHY_ENTRY
3591 WDEV_ENTRY
a92eecbb 3592 __field(bool, non_wireless)
cd8f7cb4
JB
3593 __field(bool, disconnect)
3594 __field(bool, magic_pkt)
3595 __field(bool, gtk_rekey_failure)
3596 __field(bool, eap_identity_req)
3597 __field(bool, four_way_handshake)
3598 __field(bool, rfkill_release)
3599 __field(s32, pattern_idx)
3600 __field(u32, packet_len)
a92eecbb
JB
3601 __dynamic_array(u8, packet,
3602 wakeup ? wakeup->packet_present_len : 0)
cd8f7cb4
JB
3603 ),
3604 TP_fast_assign(
3605 WIPHY_ASSIGN;
3606 WDEV_ASSIGN;
a92eecbb
JB
3607 __entry->non_wireless = !wakeup;
3608 __entry->disconnect = wakeup ? wakeup->disconnect : false;
3609 __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
3610 __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
3611 __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
3612 __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
3613 __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
3614 __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
3615 __entry->packet_len = wakeup ? wakeup->packet_len : false;
3616 if (wakeup && wakeup->packet && wakeup->packet_present_len)
cd8f7cb4
JB
3617 memcpy(__get_dynamic_array(packet), wakeup->packet,
3618 wakeup->packet_present_len);
3619 ),
3620 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
3621);
3622
355199e0
JM
3623TRACE_EVENT(cfg80211_ft_event,
3624 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3625 struct cfg80211_ft_event_params *ft_event),
3626 TP_ARGS(wiphy, netdev, ft_event),
3627 TP_STRUCT__entry(
3628 WIPHY_ENTRY
3629 NETDEV_ENTRY
3630 __dynamic_array(u8, ies, ft_event->ies_len)
3631 MAC_ENTRY(target_ap)
3632 __dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
3633 ),
3634 TP_fast_assign(
3635 WIPHY_ASSIGN;
3636 NETDEV_ASSIGN;
3637 if (ft_event->ies)
3638 memcpy(__get_dynamic_array(ies), ft_event->ies,
3639 ft_event->ies_len);
3640 MAC_ASSIGN(target_ap, ft_event->target_ap);
3641 if (ft_event->ric_ies)
3642 memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
3643 ft_event->ric_ies_len);
3644 ),
3645 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT,
3646 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
3647);
3648
f04c2203
MK
3649TRACE_EVENT(cfg80211_stop_iface,
3650 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
3651 TP_ARGS(wiphy, wdev),
3652 TP_STRUCT__entry(
3653 WIPHY_ENTRY
3654 WDEV_ENTRY
3655 ),
3656 TP_fast_assign(
3657 WIPHY_ASSIGN;
3658 WDEV_ASSIGN;
3659 ),
3660 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
3661 WIPHY_PR_ARG, WDEV_PR_ARG)
3662);
9bb7e0f2
JB
3663
3664TRACE_EVENT(cfg80211_pmsr_report,
3665 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
3666 u64 cookie, const u8 *addr),
3667 TP_ARGS(wiphy, wdev, cookie, addr),
3668 TP_STRUCT__entry(
3669 WIPHY_ENTRY
3670 WDEV_ENTRY
3671 __field(u64, cookie)
3672 MAC_ENTRY(addr)
3673 ),
3674 TP_fast_assign(
3675 WIPHY_ASSIGN;
3676 WDEV_ASSIGN;
3677 __entry->cookie = cookie;
3678 MAC_ASSIGN(addr, addr);
3679 ),
3680 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie:%lld, " MAC_PR_FMT,
3681 WIPHY_PR_ARG, WDEV_PR_ARG,
3682 (unsigned long long)__entry->cookie,
3683 MAC_PR_ARG(addr))
3684);
3685
3686TRACE_EVENT(cfg80211_pmsr_complete,
3687 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
3688 TP_ARGS(wiphy, wdev, cookie),
3689 TP_STRUCT__entry(
3690 WIPHY_ENTRY
3691 WDEV_ENTRY
3692 __field(u64, cookie)
3693 ),
3694 TP_fast_assign(
3695 WIPHY_ASSIGN;
3696 WDEV_ASSIGN;
3697 __entry->cookie = cookie;
3698 ),
3699 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie:%lld",
3700 WIPHY_PR_ARG, WDEV_PR_ARG,
3701 (unsigned long long)__entry->cookie)
3702);
cb74e977 3703
cb74e977
SD
3704TRACE_EVENT(cfg80211_update_owe_info_event,
3705 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3706 struct cfg80211_update_owe_info *owe_info),
3707 TP_ARGS(wiphy, netdev, owe_info),
3708 TP_STRUCT__entry(WIPHY_ENTRY
3709 NETDEV_ENTRY
3710 MAC_ENTRY(peer)
3711 __dynamic_array(u8, ie, owe_info->ie_len)),
3712 TP_fast_assign(WIPHY_ASSIGN;
3713 NETDEV_ASSIGN;
3714 MAC_ASSIGN(peer, owe_info->peer);
3715 memcpy(__get_dynamic_array(ie), owe_info->ie,
3716 owe_info->ie_len);),
3717 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
3718 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
3719);
3720
0d2ab3ae
JC
3721TRACE_EVENT(cfg80211_bss_color_notify,
3722 TP_PROTO(struct net_device *netdev,
3723 enum nl80211_commands cmd,
3724 u8 count, u64 color_bitmap),
3725 TP_ARGS(netdev, cmd, count, color_bitmap),
3726 TP_STRUCT__entry(
3727 NETDEV_ENTRY
c448f0fd 3728 __field(u32, cmd)
0d2ab3ae
JC
3729 __field(u8, count)
3730 __field(u64, color_bitmap)
3731 ),
3732 TP_fast_assign(
3733 NETDEV_ASSIGN;
3734 __entry->cmd = cmd;
3735 __entry->count = count;
3736 __entry->color_bitmap = color_bitmap;
3737 ),
3738 TP_printk(NETDEV_PR_FMT ", cmd: %x, count: %u, bitmap: %llx",
3739 NETDEV_PR_ARG, __entry->cmd, __entry->count,
3740 __entry->color_bitmap)
3741);
3742
a083ee8a
IP
3743TRACE_EVENT(cfg80211_assoc_comeback,
3744 TP_PROTO(struct wireless_dev *wdev, const u8 *bssid, u32 timeout),
3745 TP_ARGS(wdev, bssid, timeout),
3746 TP_STRUCT__entry(
3747 WDEV_ENTRY
3748 MAC_ENTRY(bssid)
3749 __field(u32, timeout)
3750 ),
3751 TP_fast_assign(
3752 WDEV_ASSIGN;
3753 MAC_ASSIGN(bssid, bssid);
3754 __entry->timeout = timeout;
3755 ),
3756 TP_printk(WDEV_PR_FMT ", " MAC_PR_FMT ", timeout: %u TUs",
3757 WDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->timeout)
3758);
3759
14e8a3c4
BL
3760#endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
3761
3762#undef TRACE_INCLUDE_PATH
3763#define TRACE_INCLUDE_PATH .
3764#undef TRACE_INCLUDE_FILE
3765#define TRACE_INCLUDE_FILE trace
3766#include <trace/define_trace.h>