mac80211: Re-fix accounting of the tailroom-needed counter
[linux-block.git] / net / wireless / trace.h
CommitLineData
14e8a3c4
BL
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM cfg80211
3
4#if !defined(__RDEV_OPS_TRACE) || defined(TRACE_HEADER_MULTI_READ)
5#define __RDEV_OPS_TRACE
6
7#include <linux/tracepoint.h>
8
9#include <linux/rtnetlink.h>
10#include <net/cfg80211.h>
11#include "core.h"
12
13#define MAC_ENTRY(entry_mac) __array(u8, entry_mac, ETH_ALEN)
14#define MAC_ASSIGN(entry_mac, given_mac) do { \
15 if (given_mac) \
16 memcpy(__entry->entry_mac, given_mac, ETH_ALEN); \
17 else \
18 memset(__entry->entry_mac, 0, ETH_ALEN); \
19 } while (0)
20#define MAC_PR_FMT "%pM"
21#define MAC_PR_ARG(entry_mac) (__entry->entry_mac)
22
ec816087
JB
23#define MAXNAME 32
24#define WIPHY_ENTRY __array(char, wiphy_name, 32)
25#define WIPHY_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(wiphy), MAXNAME)
26#define WIPHY_PR_FMT "%s"
27#define WIPHY_PR_ARG __entry->wiphy_name
28
29#define WDEV_ENTRY __field(u32, id)
ce1eadda
JB
30#define WDEV_ASSIGN (__entry->id) = (!IS_ERR_OR_NULL(wdev) \
31 ? wdev->identifier : 0)
ec816087
JB
32#define WDEV_PR_FMT "wdev(%u)"
33#define WDEV_PR_ARG (__entry->id)
34
35#define NETDEV_ENTRY __array(char, name, IFNAMSIZ) \
36 __field(int, ifindex)
14e8a3c4
BL
37#define NETDEV_ASSIGN \
38 do { \
39 memcpy(__entry->name, netdev->name, IFNAMSIZ); \
14e8a3c4
BL
40 (__entry->ifindex) = (netdev->ifindex); \
41 } while (0)
ec816087
JB
42#define NETDEV_PR_FMT "netdev:%s(%d)"
43#define NETDEV_PR_ARG __entry->name, __entry->ifindex
14e8a3c4
BL
44
45#define MESH_CFG_ENTRY __field(u16, dot11MeshRetryTimeout) \
46 __field(u16, dot11MeshConfirmTimeout) \
47 __field(u16, dot11MeshHoldingTimeout) \
48 __field(u16, dot11MeshMaxPeerLinks) \
49 __field(u8, dot11MeshMaxRetries) \
50 __field(u8, dot11MeshTTL) \
51 __field(u8, element_ttl) \
52 __field(bool, auto_open_plinks) \
53 __field(u32, dot11MeshNbrOffsetMaxNeighbor) \
54 __field(u8, dot11MeshHWMPmaxPREQretries) \
55 __field(u32, path_refresh_time) \
56 __field(u32, dot11MeshHWMPactivePathTimeout) \
57 __field(u16, min_discovery_timeout) \
58 __field(u16, dot11MeshHWMPpreqMinInterval) \
59 __field(u16, dot11MeshHWMPperrMinInterval) \
60 __field(u16, dot11MeshHWMPnetDiameterTraversalTime) \
61 __field(u8, dot11MeshHWMPRootMode) \
62 __field(u16, dot11MeshHWMPRannInterval) \
63 __field(bool, dot11MeshGateAnnouncementProtocol) \
64 __field(bool, dot11MeshForwarding) \
65 __field(s32, rssi_threshold) \
66 __field(u16, ht_opmode) \
67 __field(u32, dot11MeshHWMPactivePathToRootTimeout) \
68 __field(u16, dot11MeshHWMProotInterval) \
69 __field(u16, dot11MeshHWMPconfirmationInterval)
70#define MESH_CFG_ASSIGN \
71 do { \
72 __entry->dot11MeshRetryTimeout = conf->dot11MeshRetryTimeout; \
73 __entry->dot11MeshConfirmTimeout = \
74 conf->dot11MeshConfirmTimeout; \
75 __entry->dot11MeshHoldingTimeout = \
76 conf->dot11MeshHoldingTimeout; \
77 __entry->dot11MeshMaxPeerLinks = conf->dot11MeshMaxPeerLinks; \
78 __entry->dot11MeshMaxRetries = conf->dot11MeshMaxRetries; \
79 __entry->dot11MeshTTL = conf->dot11MeshTTL; \
80 __entry->element_ttl = conf->element_ttl; \
81 __entry->auto_open_plinks = conf->auto_open_plinks; \
82 __entry->dot11MeshNbrOffsetMaxNeighbor = \
83 conf->dot11MeshNbrOffsetMaxNeighbor; \
84 __entry->dot11MeshHWMPmaxPREQretries = \
85 conf->dot11MeshHWMPmaxPREQretries; \
86 __entry->path_refresh_time = conf->path_refresh_time; \
87 __entry->dot11MeshHWMPactivePathTimeout = \
88 conf->dot11MeshHWMPactivePathTimeout; \
89 __entry->min_discovery_timeout = conf->min_discovery_timeout; \
90 __entry->dot11MeshHWMPpreqMinInterval = \
91 conf->dot11MeshHWMPpreqMinInterval; \
92 __entry->dot11MeshHWMPperrMinInterval = \
93 conf->dot11MeshHWMPperrMinInterval; \
94 __entry->dot11MeshHWMPnetDiameterTraversalTime = \
95 conf->dot11MeshHWMPnetDiameterTraversalTime; \
96 __entry->dot11MeshHWMPRootMode = conf->dot11MeshHWMPRootMode; \
97 __entry->dot11MeshHWMPRannInterval = \
98 conf->dot11MeshHWMPRannInterval; \
99 __entry->dot11MeshGateAnnouncementProtocol = \
100 conf->dot11MeshGateAnnouncementProtocol; \
101 __entry->dot11MeshForwarding = conf->dot11MeshForwarding; \
102 __entry->rssi_threshold = conf->rssi_threshold; \
103 __entry->ht_opmode = conf->ht_opmode; \
104 __entry->dot11MeshHWMPactivePathToRootTimeout = \
105 conf->dot11MeshHWMPactivePathToRootTimeout; \
106 __entry->dot11MeshHWMProotInterval = \
107 conf->dot11MeshHWMProotInterval; \
108 __entry->dot11MeshHWMPconfirmationInterval = \
109 conf->dot11MeshHWMPconfirmationInterval; \
110 } while (0)
111
112#define CHAN_ENTRY __field(enum ieee80211_band, band) \
113 __field(u16, center_freq)
114#define CHAN_ASSIGN(chan) \
115 do { \
116 if (chan) { \
117 __entry->band = chan->band; \
118 __entry->center_freq = chan->center_freq; \
119 } else { \
120 __entry->band = 0; \
121 __entry->center_freq = 0; \
122 } \
123 } while (0)
ec816087 124#define CHAN_PR_FMT "band: %d, freq: %u"
14e8a3c4
BL
125#define CHAN_PR_ARG __entry->band, __entry->center_freq
126
3d9d1d66
JB
127#define CHAN_DEF_ENTRY __field(enum ieee80211_band, band) \
128 __field(u32, control_freq) \
129 __field(u32, width) \
130 __field(u32, center_freq1) \
131 __field(u32, center_freq2)
683b6d3b
JB
132#define CHAN_DEF_ASSIGN(chandef) \
133 do { \
134 if ((chandef) && (chandef)->chan) { \
135 __entry->band = (chandef)->chan->band; \
3d9d1d66 136 __entry->control_freq = \
683b6d3b 137 (chandef)->chan->center_freq; \
3d9d1d66
JB
138 __entry->width = (chandef)->width; \
139 __entry->center_freq1 = (chandef)->center_freq1;\
140 __entry->center_freq2 = (chandef)->center_freq2;\
683b6d3b
JB
141 } else { \
142 __entry->band = 0; \
3d9d1d66
JB
143 __entry->control_freq = 0; \
144 __entry->width = 0; \
145 __entry->center_freq1 = 0; \
146 __entry->center_freq2 = 0; \
683b6d3b
JB
147 } \
148 } while (0)
3d9d1d66 149#define CHAN_DEF_PR_FMT \
ec816087 150 "band: %d, control freq: %u, width: %d, cf1: %u, cf2: %u"
3d9d1d66
JB
151#define CHAN_DEF_PR_ARG __entry->band, __entry->control_freq, \
152 __entry->width, __entry->center_freq1, \
153 __entry->center_freq2
683b6d3b 154
14e8a3c4
BL
155#define SINFO_ENTRY __field(int, generation) \
156 __field(u32, connected_time) \
157 __field(u32, inactive_time) \
158 __field(u32, rx_bytes) \
159 __field(u32, tx_bytes) \
160 __field(u32, rx_packets) \
161 __field(u32, tx_packets) \
162 __field(u32, tx_retries) \
163 __field(u32, tx_failed) \
164 __field(u32, rx_dropped_misc) \
165 __field(u32, beacon_loss_count) \
166 __field(u16, llid) \
167 __field(u16, plid) \
168 __field(u8, plink_state)
169#define SINFO_ASSIGN \
170 do { \
171 __entry->generation = sinfo->generation; \
172 __entry->connected_time = sinfo->connected_time; \
173 __entry->inactive_time = sinfo->inactive_time; \
174 __entry->rx_bytes = sinfo->rx_bytes; \
175 __entry->tx_bytes = sinfo->tx_bytes; \
176 __entry->rx_packets = sinfo->rx_packets; \
177 __entry->tx_packets = sinfo->tx_packets; \
178 __entry->tx_retries = sinfo->tx_retries; \
179 __entry->tx_failed = sinfo->tx_failed; \
180 __entry->rx_dropped_misc = sinfo->rx_dropped_misc; \
181 __entry->beacon_loss_count = sinfo->beacon_loss_count; \
182 __entry->llid = sinfo->llid; \
183 __entry->plid = sinfo->plid; \
184 __entry->plink_state = sinfo->plink_state; \
185 } while (0)
186
187#define BOOL_TO_STR(bo) (bo) ? "true" : "false"
188
fa9ffc74
KP
189#define QOS_MAP_ENTRY __field(u8, num_des) \
190 __array(u8, dscp_exception, \
191 2 * IEEE80211_QOS_MAP_MAX_EX) \
192 __array(u8, up, IEEE80211_QOS_MAP_LEN_MIN)
193#define QOS_MAP_ASSIGN(qos_map) \
194 do { \
195 if ((qos_map)) { \
196 __entry->num_des = (qos_map)->num_des; \
197 memcpy(__entry->dscp_exception, \
198 &(qos_map)->dscp_exception, \
199 2 * IEEE80211_QOS_MAP_MAX_EX); \
200 memcpy(__entry->up, &(qos_map)->up, \
201 IEEE80211_QOS_MAP_LEN_MIN); \
202 } else { \
203 __entry->num_des = 0; \
204 memset(__entry->dscp_exception, 0, \
205 2 * IEEE80211_QOS_MAP_MAX_EX); \
206 memset(__entry->up, 0, \
207 IEEE80211_QOS_MAP_LEN_MIN); \
208 } \
209 } while (0)
210
14e8a3c4
BL
211/*************************************************************
212 * rdev->ops traces *
213 *************************************************************/
214
215TRACE_EVENT(rdev_suspend,
216 TP_PROTO(struct wiphy *wiphy, struct cfg80211_wowlan *wow),
217 TP_ARGS(wiphy, wow),
218 TP_STRUCT__entry(
219 WIPHY_ENTRY
220 __field(bool, any)
221 __field(bool, disconnect)
222 __field(bool, magic_pkt)
223 __field(bool, gtk_rekey_failure)
224 __field(bool, eap_identity_req)
225 __field(bool, four_way_handshake)
226 __field(bool, rfkill_release)
227 __field(bool, valid_wow)
228 ),
229 TP_fast_assign(
230 WIPHY_ASSIGN;
231 if (wow) {
232 __entry->any = wow->any;
233 __entry->disconnect = wow->disconnect;
234 __entry->magic_pkt = wow->magic_pkt;
235 __entry->gtk_rekey_failure = wow->gtk_rekey_failure;
236 __entry->eap_identity_req = wow->eap_identity_req;
237 __entry->four_way_handshake = wow->four_way_handshake;
238 __entry->rfkill_release = wow->rfkill_release;
239 __entry->valid_wow = true;
240 } else {
241 __entry->valid_wow = false;
242 }
243 ),
244 TP_printk(WIPHY_PR_FMT ", wow%s - any: %d, disconnect: %d, "
245 "magic pkt: %d, gtk rekey failure: %d, eap identify req: %d, "
246 "four way handshake: %d, rfkill release: %d.",
247 WIPHY_PR_ARG, __entry->valid_wow ? "" : "(Not configured!)",
248 __entry->any, __entry->disconnect, __entry->magic_pkt,
249 __entry->gtk_rekey_failure, __entry->eap_identity_req,
250 __entry->four_way_handshake, __entry->rfkill_release)
251);
252
253TRACE_EVENT(rdev_return_int,
254 TP_PROTO(struct wiphy *wiphy, int ret),
255 TP_ARGS(wiphy, ret),
256 TP_STRUCT__entry(
257 WIPHY_ENTRY
258 __field(int, ret)
259 ),
260 TP_fast_assign(
261 WIPHY_ASSIGN;
262 __entry->ret = ret;
263 ),
264 TP_printk(WIPHY_PR_FMT ", returned: %d", WIPHY_PR_ARG, __entry->ret)
265);
266
267TRACE_EVENT(rdev_scan,
268 TP_PROTO(struct wiphy *wiphy, struct cfg80211_scan_request *request),
269 TP_ARGS(wiphy, request),
270 TP_STRUCT__entry(
271 WIPHY_ENTRY
272 ),
273 TP_fast_assign(
274 WIPHY_ASSIGN;
275 ),
276 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
277);
278
279DECLARE_EVENT_CLASS(wiphy_only_evt,
280 TP_PROTO(struct wiphy *wiphy),
281 TP_ARGS(wiphy),
282 TP_STRUCT__entry(
283 WIPHY_ENTRY
284 ),
285 TP_fast_assign(
286 WIPHY_ASSIGN;
287 ),
288 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
289);
290
291DEFINE_EVENT(wiphy_only_evt, rdev_resume,
292 TP_PROTO(struct wiphy *wiphy),
293 TP_ARGS(wiphy)
294);
295
296DEFINE_EVENT(wiphy_only_evt, rdev_return_void,
297 TP_PROTO(struct wiphy *wiphy),
298 TP_ARGS(wiphy)
299);
300
14e8a3c4
BL
301DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna,
302 TP_PROTO(struct wiphy *wiphy),
303 TP_ARGS(wiphy)
304);
305
14e8a3c4
BL
306DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll,
307 TP_PROTO(struct wiphy *wiphy),
308 TP_ARGS(wiphy)
309);
310
311DECLARE_EVENT_CLASS(wiphy_enabled_evt,
312 TP_PROTO(struct wiphy *wiphy, bool enabled),
313 TP_ARGS(wiphy, enabled),
314 TP_STRUCT__entry(
315 WIPHY_ENTRY
316 __field(bool, enabled)
317 ),
318 TP_fast_assign(
319 WIPHY_ASSIGN;
320 __entry->enabled = enabled;
321 ),
322 TP_printk(WIPHY_PR_FMT ", %senabled ",
323 WIPHY_PR_ARG, __entry->enabled ? "" : "not ")
324);
325
326DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup,
327 TP_PROTO(struct wiphy *wiphy, bool enabled),
328 TP_ARGS(wiphy, enabled)
329);
330
331TRACE_EVENT(rdev_add_virtual_intf,
332 TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type),
333 TP_ARGS(wiphy, name, type),
334 TP_STRUCT__entry(
335 WIPHY_ENTRY
336 __string(vir_intf_name, name ? name : "<noname>")
337 __field(enum nl80211_iftype, type)
338 ),
339 TP_fast_assign(
340 WIPHY_ASSIGN;
341 __assign_str(vir_intf_name, name ? name : "<noname>");
342 __entry->type = type;
343 ),
344 TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d",
345 WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type)
346);
347
348DECLARE_EVENT_CLASS(wiphy_wdev_evt,
349 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
350 TP_ARGS(wiphy, wdev),
351 TP_STRUCT__entry(
352 WIPHY_ENTRY
353 WDEV_ENTRY
354 ),
355 TP_fast_assign(
356 WIPHY_ASSIGN;
357 WDEV_ASSIGN;
358 ),
ec816087 359 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
14e8a3c4
BL
360);
361
362DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev,
363 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
364 TP_ARGS(wiphy, wdev)
365);
366
367DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf,
368 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
369 TP_ARGS(wiphy, wdev)
370);
371
372TRACE_EVENT(rdev_change_virtual_intf,
373 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
374 enum nl80211_iftype type),
375 TP_ARGS(wiphy, netdev, type),
376 TP_STRUCT__entry(
377 WIPHY_ENTRY
378 NETDEV_ENTRY
379 __field(enum nl80211_iftype, type)
380 ),
381 TP_fast_assign(
382 WIPHY_ASSIGN;
383 NETDEV_ASSIGN;
384 __entry->type = type;
385 ),
ec816087 386 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", type: %d",
14e8a3c4
BL
387 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type)
388);
389
390DECLARE_EVENT_CLASS(key_handle,
391 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
392 bool pairwise, const u8 *mac_addr),
393 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr),
394 TP_STRUCT__entry(
395 WIPHY_ENTRY
396 NETDEV_ENTRY
397 MAC_ENTRY(mac_addr)
398 __field(u8, key_index)
399 __field(bool, pairwise)
400 ),
401 TP_fast_assign(
402 WIPHY_ASSIGN;
403 NETDEV_ASSIGN;
404 MAC_ASSIGN(mac_addr, mac_addr);
405 __entry->key_index = key_index;
406 __entry->pairwise = pairwise;
407 ),
ec816087 408 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key_index: %u, pairwise: %s, mac addr: " MAC_PR_FMT,
14e8a3c4
BL
409 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
410 BOOL_TO_STR(__entry->pairwise), MAC_PR_ARG(mac_addr))
411);
412
413DEFINE_EVENT(key_handle, rdev_add_key,
414 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
415 bool pairwise, const u8 *mac_addr),
416 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
417);
418
419DEFINE_EVENT(key_handle, rdev_get_key,
420 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
421 bool pairwise, const u8 *mac_addr),
422 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
423);
424
425DEFINE_EVENT(key_handle, rdev_del_key,
426 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
427 bool pairwise, const u8 *mac_addr),
428 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
429);
430
431TRACE_EVENT(rdev_set_default_key,
432 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
433 bool unicast, bool multicast),
434 TP_ARGS(wiphy, netdev, key_index, unicast, multicast),
435 TP_STRUCT__entry(
436 WIPHY_ENTRY
437 NETDEV_ENTRY
438 __field(u8, key_index)
439 __field(bool, unicast)
440 __field(bool, multicast)
441 ),
442 TP_fast_assign(
443 WIPHY_ASSIGN;
444 NETDEV_ASSIGN;
445 __entry->key_index = key_index;
446 __entry->unicast = unicast;
447 __entry->multicast = multicast;
448 ),
ec816087 449 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u, unicast: %s, multicast: %s",
14e8a3c4
BL
450 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
451 BOOL_TO_STR(__entry->unicast),
452 BOOL_TO_STR(__entry->multicast))
453);
454
455TRACE_EVENT(rdev_set_default_mgmt_key,
456 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
457 TP_ARGS(wiphy, netdev, key_index),
458 TP_STRUCT__entry(
459 WIPHY_ENTRY
460 NETDEV_ENTRY
461 __field(u8, key_index)
462 ),
463 TP_fast_assign(
464 WIPHY_ASSIGN;
465 NETDEV_ASSIGN;
466 __entry->key_index = key_index;
467 ),
ec816087 468 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
14e8a3c4
BL
469 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
470);
471
472TRACE_EVENT(rdev_start_ap,
473 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
474 struct cfg80211_ap_settings *settings),
475 TP_ARGS(wiphy, netdev, settings),
476 TP_STRUCT__entry(
477 WIPHY_ENTRY
478 NETDEV_ENTRY
683b6d3b 479 CHAN_DEF_ENTRY
14e8a3c4
BL
480 __field(int, beacon_interval)
481 __field(int, dtim_period)
482 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
483 __field(enum nl80211_hidden_ssid, hidden_ssid)
484 __field(u32, wpa_ver)
485 __field(bool, privacy)
486 __field(enum nl80211_auth_type, auth_type)
487 __field(int, inactivity_timeout)
488 ),
489 TP_fast_assign(
490 WIPHY_ASSIGN;
491 NETDEV_ASSIGN;
683b6d3b 492 CHAN_DEF_ASSIGN(&settings->chandef);
14e8a3c4
BL
493 __entry->beacon_interval = settings->beacon_interval;
494 __entry->dtim_period = settings->dtim_period;
495 __entry->hidden_ssid = settings->hidden_ssid;
496 __entry->wpa_ver = settings->crypto.wpa_versions;
497 __entry->privacy = settings->privacy;
498 __entry->auth_type = settings->auth_type;
499 __entry->inactivity_timeout = settings->inactivity_timeout;
500 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
501 memcpy(__entry->ssid, settings->ssid, settings->ssid_len);
502 ),
ec816087 503 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", AP settings - ssid: %s, "
683b6d3b 504 CHAN_DEF_PR_FMT ", beacon interval: %d, dtim period: %d, "
14e8a3c4
BL
505 "hidden ssid: %d, wpa versions: %u, privacy: %s, "
506 "auth type: %d, inactivity timeout: %d",
683b6d3b 507 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_DEF_PR_ARG,
14e8a3c4
BL
508 __entry->beacon_interval, __entry->dtim_period,
509 __entry->hidden_ssid, __entry->wpa_ver,
510 BOOL_TO_STR(__entry->privacy), __entry->auth_type,
511 __entry->inactivity_timeout)
512);
513
514TRACE_EVENT(rdev_change_beacon,
515 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
516 struct cfg80211_beacon_data *info),
517 TP_ARGS(wiphy, netdev, info),
518 TP_STRUCT__entry(
519 WIPHY_ENTRY
520 NETDEV_ENTRY
521 __dynamic_array(u8, head, info ? info->head_len : 0)
522 __dynamic_array(u8, tail, info ? info->tail_len : 0)
523 __dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0)
524 __dynamic_array(u8, proberesp_ies,
525 info ? info->proberesp_ies_len : 0)
526 __dynamic_array(u8, assocresp_ies,
527 info ? info->assocresp_ies_len : 0)
528 __dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0)
529 ),
530 TP_fast_assign(
531 WIPHY_ASSIGN;
532 NETDEV_ASSIGN;
533 if (info) {
534 if (info->head)
535 memcpy(__get_dynamic_array(head), info->head,
536 info->head_len);
537 if (info->tail)
538 memcpy(__get_dynamic_array(tail), info->tail,
539 info->tail_len);
540 if (info->beacon_ies)
541 memcpy(__get_dynamic_array(beacon_ies),
542 info->beacon_ies, info->beacon_ies_len);
543 if (info->proberesp_ies)
544 memcpy(__get_dynamic_array(proberesp_ies),
545 info->proberesp_ies,
546 info->proberesp_ies_len);
547 if (info->assocresp_ies)
548 memcpy(__get_dynamic_array(assocresp_ies),
549 info->assocresp_ies,
550 info->assocresp_ies_len);
551 if (info->probe_resp)
552 memcpy(__get_dynamic_array(probe_resp),
553 info->probe_resp, info->probe_resp_len);
554 }
555 ),
ec816087 556 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
14e8a3c4
BL
557);
558
559DECLARE_EVENT_CLASS(wiphy_netdev_evt,
560 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
561 TP_ARGS(wiphy, netdev),
562 TP_STRUCT__entry(
563 WIPHY_ENTRY
564 NETDEV_ENTRY
565 ),
566 TP_fast_assign(
567 WIPHY_ASSIGN;
568 NETDEV_ASSIGN;
569 ),
ec816087 570 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
14e8a3c4
BL
571);
572
573DEFINE_EVENT(wiphy_netdev_evt, rdev_stop_ap,
574 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
575 TP_ARGS(wiphy, netdev)
576);
577
14e8a3c4
BL
578DEFINE_EVENT(wiphy_netdev_evt, rdev_sched_scan_stop,
579 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
580 TP_ARGS(wiphy, netdev)
581);
582
583DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data,
584 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
585 TP_ARGS(wiphy, netdev)
586);
587
588DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config,
589 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
590 TP_ARGS(wiphy, netdev)
591);
592
593DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh,
594 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
595 TP_ARGS(wiphy, netdev)
596);
597
598DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ibss,
599 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
600 TP_ARGS(wiphy, netdev)
601);
602
6e0bd6c3
RL
603DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ocb,
604 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
605 TP_ARGS(wiphy, netdev)
606);
607
14e8a3c4
BL
608DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa,
609 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
610 TP_ARGS(wiphy, netdev)
611);
612
613DECLARE_EVENT_CLASS(station_add_change,
614 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
615 struct station_parameters *params),
616 TP_ARGS(wiphy, netdev, mac, params),
617 TP_STRUCT__entry(
618 WIPHY_ENTRY
619 NETDEV_ENTRY
620 MAC_ENTRY(sta_mac)
621 __field(u32, sta_flags_mask)
622 __field(u32, sta_flags_set)
623 __field(u32, sta_modify_mask)
624 __field(int, listen_interval)
625 __field(u16, aid)
626 __field(u8, plink_action)
627 __field(u8, plink_state)
628 __field(u8, uapsd_queues)
629 __array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap))
630 ),
631 TP_fast_assign(
632 WIPHY_ASSIGN;
633 NETDEV_ASSIGN;
634 MAC_ASSIGN(sta_mac, mac);
635 __entry->sta_flags_mask = params->sta_flags_mask;
636 __entry->sta_flags_set = params->sta_flags_set;
637 __entry->sta_modify_mask = params->sta_modify_mask;
638 __entry->listen_interval = params->listen_interval;
639 __entry->aid = params->aid;
640 __entry->plink_action = params->plink_action;
641 __entry->plink_state = params->plink_state;
642 __entry->uapsd_queues = params->uapsd_queues;
643 memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap));
644 if (params->ht_capa)
645 memcpy(__entry->ht_capa, params->ht_capa,
646 sizeof(struct ieee80211_ht_cap));
647 ),
ec816087 648 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
14e8a3c4
BL
649 ", station flags mask: %u, station flags set: %u, "
650 "station modify mask: %u, listen interval: %d, aid: %u, "
651 "plink action: %u, plink state: %u, uapsd queues: %u",
652 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
653 __entry->sta_flags_mask, __entry->sta_flags_set,
654 __entry->sta_modify_mask, __entry->listen_interval,
655 __entry->aid, __entry->plink_action, __entry->plink_state,
656 __entry->uapsd_queues)
657);
658
659DEFINE_EVENT(station_add_change, rdev_add_station,
660 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
661 struct station_parameters *params),
662 TP_ARGS(wiphy, netdev, mac, params)
663);
664
665DEFINE_EVENT(station_add_change, rdev_change_station,
666 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
667 struct station_parameters *params),
668 TP_ARGS(wiphy, netdev, mac, params)
669);
670
671DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
672 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
673 TP_ARGS(wiphy, netdev, mac),
674 TP_STRUCT__entry(
675 WIPHY_ENTRY
676 NETDEV_ENTRY
677 MAC_ENTRY(sta_mac)
678 ),
679 TP_fast_assign(
680 WIPHY_ASSIGN;
681 NETDEV_ASSIGN;
682 MAC_ASSIGN(sta_mac, mac);
683 ),
ec816087 684 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
14e8a3c4
BL
685 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac))
686);
687
89c771e5
JM
688DECLARE_EVENT_CLASS(station_del,
689 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
690 struct station_del_parameters *params),
691 TP_ARGS(wiphy, netdev, params),
692 TP_STRUCT__entry(
693 WIPHY_ENTRY
694 NETDEV_ENTRY
695 MAC_ENTRY(sta_mac)
98856866
JM
696 __field(u8, subtype)
697 __field(u16, reason_code)
89c771e5
JM
698 ),
699 TP_fast_assign(
700 WIPHY_ASSIGN;
701 NETDEV_ASSIGN;
702 MAC_ASSIGN(sta_mac, params->mac);
98856866
JM
703 __entry->subtype = params->subtype;
704 __entry->reason_code = params->reason_code;
89c771e5 705 ),
98856866
JM
706 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
707 ", subtype: %u, reason_code: %u",
708 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
709 __entry->subtype, __entry->reason_code)
89c771e5
JM
710);
711
712DEFINE_EVENT(station_del, rdev_del_station,
713 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
714 struct station_del_parameters *params),
715 TP_ARGS(wiphy, netdev, params)
14e8a3c4
BL
716);
717
718DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station,
719 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
720 TP_ARGS(wiphy, netdev, mac)
721);
722
723DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
724 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
725 TP_ARGS(wiphy, netdev, mac)
726);
727
728DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer,
729 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
730 TP_ARGS(wiphy, netdev, mac)
731);
732
733TRACE_EVENT(rdev_dump_station,
734 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
735 u8 *mac),
736 TP_ARGS(wiphy, netdev, idx, mac),
737 TP_STRUCT__entry(
738 WIPHY_ENTRY
739 NETDEV_ENTRY
740 MAC_ENTRY(sta_mac)
741 __field(int, idx)
742 ),
743 TP_fast_assign(
744 WIPHY_ASSIGN;
745 NETDEV_ASSIGN;
746 MAC_ASSIGN(sta_mac, mac);
747 __entry->idx = idx;
748 ),
ec816087 749 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d",
14e8a3c4
BL
750 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
751 __entry->idx)
752);
753
754TRACE_EVENT(rdev_return_int_station_info,
755 TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo),
756 TP_ARGS(wiphy, ret, sinfo),
757 TP_STRUCT__entry(
758 WIPHY_ENTRY
759 __field(int, ret)
760 SINFO_ENTRY
761 ),
762 TP_fast_assign(
763 WIPHY_ASSIGN;
764 __entry->ret = ret;
765 SINFO_ASSIGN;
766 ),
767 TP_printk(WIPHY_PR_FMT ", returned %d" ,
768 WIPHY_PR_ARG, __entry->ret)
769);
770
771DECLARE_EVENT_CLASS(mpath_evt,
772 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
773 u8 *next_hop),
774 TP_ARGS(wiphy, netdev, dst, next_hop),
775 TP_STRUCT__entry(
776 WIPHY_ENTRY
777 NETDEV_ENTRY
778 MAC_ENTRY(dst)
779 MAC_ENTRY(next_hop)
780 ),
781 TP_fast_assign(
782 WIPHY_ASSIGN;
783 NETDEV_ASSIGN;
784 MAC_ASSIGN(dst, dst);
785 MAC_ASSIGN(next_hop, next_hop);
786 ),
ec816087 787 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT,
14e8a3c4
BL
788 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst),
789 MAC_PR_ARG(next_hop))
790);
791
792DEFINE_EVENT(mpath_evt, rdev_add_mpath,
793 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
794 u8 *next_hop),
795 TP_ARGS(wiphy, netdev, dst, next_hop)
796);
797
798DEFINE_EVENT(mpath_evt, rdev_change_mpath,
799 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
800 u8 *next_hop),
801 TP_ARGS(wiphy, netdev, dst, next_hop)
802);
803
804DEFINE_EVENT(mpath_evt, rdev_get_mpath,
805 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
806 u8 *next_hop),
807 TP_ARGS(wiphy, netdev, dst, next_hop)
808);
809
810TRACE_EVENT(rdev_dump_mpath,
811 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
812 u8 *dst, u8 *next_hop),
813 TP_ARGS(wiphy, netdev, idx, dst, next_hop),
814 TP_STRUCT__entry(
815 WIPHY_ENTRY
816 NETDEV_ENTRY
817 MAC_ENTRY(dst)
818 MAC_ENTRY(next_hop)
819 __field(int, idx)
820 ),
821 TP_fast_assign(
822 WIPHY_ASSIGN;
823 NETDEV_ASSIGN;
824 MAC_ASSIGN(dst, dst);
825 MAC_ASSIGN(next_hop, next_hop);
826 __entry->idx = idx;
827 ),
ec816087 828 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
14e8a3c4
BL
829 MAC_PR_FMT ", next hop: " MAC_PR_FMT,
830 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
831 MAC_PR_ARG(next_hop))
832);
833
66be7d2b
HR
834TRACE_EVENT(rdev_get_mpp,
835 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
836 u8 *dst, u8 *mpp),
837 TP_ARGS(wiphy, netdev, dst, mpp),
838 TP_STRUCT__entry(
839 WIPHY_ENTRY
840 NETDEV_ENTRY
841 MAC_ENTRY(dst)
842 MAC_ENTRY(mpp)
843 ),
844 TP_fast_assign(
845 WIPHY_ASSIGN;
846 NETDEV_ASSIGN;
847 MAC_ASSIGN(dst, dst);
848 MAC_ASSIGN(mpp, mpp);
849 ),
850 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT
851 ", mpp: " MAC_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG,
852 MAC_PR_ARG(dst), MAC_PR_ARG(mpp))
853);
854
855TRACE_EVENT(rdev_dump_mpp,
856 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
857 u8 *dst, u8 *mpp),
858 TP_ARGS(wiphy, netdev, idx, mpp, dst),
859 TP_STRUCT__entry(
860 WIPHY_ENTRY
861 NETDEV_ENTRY
862 MAC_ENTRY(dst)
863 MAC_ENTRY(mpp)
864 __field(int, idx)
865 ),
866 TP_fast_assign(
867 WIPHY_ASSIGN;
868 NETDEV_ASSIGN;
869 MAC_ASSIGN(dst, dst);
870 MAC_ASSIGN(mpp, mpp);
871 __entry->idx = idx;
872 ),
873 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
874 MAC_PR_FMT ", mpp: " MAC_PR_FMT,
875 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
876 MAC_PR_ARG(mpp))
877);
878
14e8a3c4
BL
879TRACE_EVENT(rdev_return_int_mpath_info,
880 TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo),
881 TP_ARGS(wiphy, ret, pinfo),
882 TP_STRUCT__entry(
883 WIPHY_ENTRY
884 __field(int, ret)
885 __field(int, generation)
886 __field(u32, filled)
887 __field(u32, frame_qlen)
888 __field(u32, sn)
889 __field(u32, metric)
890 __field(u32, exptime)
891 __field(u32, discovery_timeout)
892 __field(u8, discovery_retries)
893 __field(u8, flags)
894 ),
895 TP_fast_assign(
896 WIPHY_ASSIGN;
897 __entry->ret = ret;
898 __entry->generation = pinfo->generation;
899 __entry->filled = pinfo->filled;
900 __entry->frame_qlen = pinfo->frame_qlen;
901 __entry->sn = pinfo->sn;
902 __entry->metric = pinfo->metric;
903 __entry->exptime = pinfo->exptime;
904 __entry->discovery_timeout = pinfo->discovery_timeout;
905 __entry->discovery_retries = pinfo->discovery_retries;
906 __entry->flags = pinfo->flags;
907 ),
908 TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, "
909 "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
910 " discovery timeout: %u, discovery retries: %u, flags: %u",
911 WIPHY_PR_ARG, __entry->ret, __entry->generation,
912 __entry->filled, __entry->frame_qlen, __entry->sn,
913 __entry->metric, __entry->exptime, __entry->discovery_timeout,
914 __entry->discovery_retries, __entry->flags)
915);
916
917TRACE_EVENT(rdev_return_int_mesh_config,
918 TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf),
919 TP_ARGS(wiphy, ret, conf),
920 TP_STRUCT__entry(
921 WIPHY_ENTRY
922 MESH_CFG_ENTRY
923 __field(int, ret)
924 ),
925 TP_fast_assign(
926 WIPHY_ASSIGN;
927 MESH_CFG_ASSIGN;
928 __entry->ret = ret;
929 ),
930 TP_printk(WIPHY_PR_FMT ", returned: %d",
931 WIPHY_PR_ARG, __entry->ret)
932);
933
934TRACE_EVENT(rdev_update_mesh_config,
935 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
936 const struct mesh_config *conf),
937 TP_ARGS(wiphy, netdev, mask, conf),
938 TP_STRUCT__entry(
939 WIPHY_ENTRY
940 NETDEV_ENTRY
941 MESH_CFG_ENTRY
942 __field(u32, mask)
943 ),
944 TP_fast_assign(
945 WIPHY_ASSIGN;
946 NETDEV_ASSIGN;
947 MESH_CFG_ASSIGN;
948 __entry->mask = mask;
949 ),
ec816087 950 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u",
14e8a3c4
BL
951 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
952);
953
954TRACE_EVENT(rdev_join_mesh,
955 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
956 const struct mesh_config *conf,
957 const struct mesh_setup *setup),
958 TP_ARGS(wiphy, netdev, conf, setup),
959 TP_STRUCT__entry(
960 WIPHY_ENTRY
961 NETDEV_ENTRY
962 MESH_CFG_ENTRY
963 ),
964 TP_fast_assign(
965 WIPHY_ASSIGN;
966 NETDEV_ASSIGN;
967 MESH_CFG_ASSIGN;
968 ),
ec816087 969 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
14e8a3c4
BL
970 WIPHY_PR_ARG, NETDEV_PR_ARG)
971);
972
973TRACE_EVENT(rdev_change_bss,
974 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
975 struct bss_parameters *params),
976 TP_ARGS(wiphy, netdev, params),
977 TP_STRUCT__entry(
978 WIPHY_ENTRY
979 NETDEV_ENTRY
980 __field(int, use_cts_prot)
981 __field(int, use_short_preamble)
982 __field(int, use_short_slot_time)
983 __field(int, ap_isolate)
984 __field(int, ht_opmode)
985 ),
986 TP_fast_assign(
987 WIPHY_ASSIGN;
988 NETDEV_ASSIGN;
989 __entry->use_cts_prot = params->use_cts_prot;
990 __entry->use_short_preamble = params->use_short_preamble;
991 __entry->use_short_slot_time = params->use_short_slot_time;
992 __entry->ap_isolate = params->ap_isolate;
993 __entry->ht_opmode = params->ht_opmode;
994 ),
ec816087 995 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, "
14e8a3c4
BL
996 "use short preamble: %d, use short slot time: %d, "
997 "ap isolate: %d, ht opmode: %d",
998 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot,
999 __entry->use_short_preamble, __entry->use_short_slot_time,
1000 __entry->ap_isolate, __entry->ht_opmode)
1001);
1002
1003TRACE_EVENT(rdev_set_txq_params,
1004 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1005 struct ieee80211_txq_params *params),
1006 TP_ARGS(wiphy, netdev, params),
1007 TP_STRUCT__entry(
1008 WIPHY_ENTRY
1009 NETDEV_ENTRY
1010 __field(enum nl80211_ac, ac)
1011 __field(u16, txop)
1012 __field(u16, cwmin)
1013 __field(u16, cwmax)
1014 __field(u8, aifs)
1015 ),
1016 TP_fast_assign(
1017 WIPHY_ASSIGN;
1018 NETDEV_ASSIGN;
1019 __entry->ac = params->ac;
1020 __entry->txop = params->txop;
1021 __entry->cwmin = params->cwmin;
1022 __entry->cwmax = params->cwmax;
1023 __entry->aifs = params->aifs;
1024 ),
ec816087 1025 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u",
14e8a3c4
BL
1026 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop,
1027 __entry->cwmin, __entry->cwmax, __entry->aifs)
1028);
1029
1030TRACE_EVENT(rdev_libertas_set_mesh_channel,
1031 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1032 struct ieee80211_channel *chan),
1033 TP_ARGS(wiphy, netdev, chan),
1034 TP_STRUCT__entry(
1035 WIPHY_ENTRY
1036 NETDEV_ENTRY
1037 CHAN_ENTRY
1038 ),
1039 TP_fast_assign(
1040 WIPHY_ASSIGN;
1041 NETDEV_ASSIGN;
1042 CHAN_ASSIGN(chan);
1043 ),
ec816087 1044 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG,
14e8a3c4
BL
1045 NETDEV_PR_ARG, CHAN_PR_ARG)
1046);
1047
1048TRACE_EVENT(rdev_set_monitor_channel,
683b6d3b
JB
1049 TP_PROTO(struct wiphy *wiphy,
1050 struct cfg80211_chan_def *chandef),
1051 TP_ARGS(wiphy, chandef),
14e8a3c4
BL
1052 TP_STRUCT__entry(
1053 WIPHY_ENTRY
683b6d3b 1054 CHAN_DEF_ENTRY
14e8a3c4
BL
1055 ),
1056 TP_fast_assign(
1057 WIPHY_ASSIGN;
683b6d3b 1058 CHAN_DEF_ASSIGN(chandef);
14e8a3c4 1059 ),
ec816087 1060 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
683b6d3b 1061 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
14e8a3c4
BL
1062);
1063
1064TRACE_EVENT(rdev_auth,
1065 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1066 struct cfg80211_auth_request *req),
1067 TP_ARGS(wiphy, netdev, req),
1068 TP_STRUCT__entry(
1069 WIPHY_ENTRY
1070 NETDEV_ENTRY
1071 MAC_ENTRY(bssid)
1072 __field(enum nl80211_auth_type, auth_type)
1073 ),
1074 TP_fast_assign(
1075 WIPHY_ASSIGN;
1076 NETDEV_ASSIGN;
1077 if (req->bss)
1078 MAC_ASSIGN(bssid, req->bss->bssid);
1079 else
1080 memset(__entry->bssid, 0, ETH_ALEN);
1081 __entry->auth_type = req->auth_type;
1082 ),
ec816087 1083 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT,
14e8a3c4
BL
1084 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type,
1085 MAC_PR_ARG(bssid))
1086);
1087
1088TRACE_EVENT(rdev_assoc,
1089 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1090 struct cfg80211_assoc_request *req),
1091 TP_ARGS(wiphy, netdev, req),
1092 TP_STRUCT__entry(
1093 WIPHY_ENTRY
1094 NETDEV_ENTRY
1095 MAC_ENTRY(bssid)
1096 MAC_ENTRY(prev_bssid)
1097 __field(bool, use_mfp)
1098 __field(u32, flags)
1099 ),
1100 TP_fast_assign(
1101 WIPHY_ASSIGN;
1102 NETDEV_ASSIGN;
1103 if (req->bss)
1104 MAC_ASSIGN(bssid, req->bss->bssid);
1105 else
1106 memset(__entry->bssid, 0, ETH_ALEN);
1107 MAC_ASSIGN(prev_bssid, req->prev_bssid);
1108 __entry->use_mfp = req->use_mfp;
1109 __entry->flags = req->flags;
1110 ),
ec816087 1111 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
14e8a3c4
BL
1112 ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u",
1113 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1114 MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp),
1115 __entry->flags)
1116);
1117
1118TRACE_EVENT(rdev_deauth,
1119 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1120 struct cfg80211_deauth_request *req),
1121 TP_ARGS(wiphy, netdev, req),
1122 TP_STRUCT__entry(
1123 WIPHY_ENTRY
1124 NETDEV_ENTRY
1125 MAC_ENTRY(bssid)
1126 __field(u16, reason_code)
1127 ),
1128 TP_fast_assign(
1129 WIPHY_ASSIGN;
1130 NETDEV_ASSIGN;
1131 MAC_ASSIGN(bssid, req->bssid);
1132 __entry->reason_code = req->reason_code;
1133 ),
ec816087 1134 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u",
14e8a3c4
BL
1135 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1136 __entry->reason_code)
1137);
1138
1139TRACE_EVENT(rdev_disassoc,
1140 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1141 struct cfg80211_disassoc_request *req),
1142 TP_ARGS(wiphy, netdev, req),
1143 TP_STRUCT__entry(
1144 WIPHY_ENTRY
1145 NETDEV_ENTRY
1146 MAC_ENTRY(bssid)
1147 __field(u16, reason_code)
1148 __field(bool, local_state_change)
1149 ),
1150 TP_fast_assign(
1151 WIPHY_ASSIGN;
1152 NETDEV_ASSIGN;
1153 if (req->bss)
1154 MAC_ASSIGN(bssid, req->bss->bssid);
1155 else
1156 memset(__entry->bssid, 0, ETH_ALEN);
1157 __entry->reason_code = req->reason_code;
1158 __entry->local_state_change = req->local_state_change;
1159 ),
ec816087 1160 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
14e8a3c4
BL
1161 ", reason: %u, local state change: %s",
1162 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1163 __entry->reason_code,
1164 BOOL_TO_STR(__entry->local_state_change))
1165);
1166
1167TRACE_EVENT(rdev_mgmt_tx_cancel_wait,
1168 TP_PROTO(struct wiphy *wiphy,
1169 struct wireless_dev *wdev, u64 cookie),
1170 TP_ARGS(wiphy, wdev, cookie),
1171 TP_STRUCT__entry(
1172 WIPHY_ENTRY
1173 WDEV_ENTRY
1174 __field(u64, cookie)
1175 ),
1176 TP_fast_assign(
1177 WIPHY_ASSIGN;
1178 WDEV_ASSIGN;
1179 __entry->cookie = cookie;
1180 ),
ec816087 1181 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ",
14e8a3c4
BL
1182 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1183);
1184
1185TRACE_EVENT(rdev_set_power_mgmt,
1186 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1187 bool enabled, int timeout),
1188 TP_ARGS(wiphy, netdev, enabled, timeout),
1189 TP_STRUCT__entry(
1190 WIPHY_ENTRY
1191 NETDEV_ENTRY
1192 __field(bool, enabled)
1193 __field(int, timeout)
1194 ),
1195 TP_fast_assign(
1196 WIPHY_ASSIGN;
1197 NETDEV_ASSIGN;
1198 __entry->enabled = enabled;
1199 __entry->timeout = timeout;
1200 ),
ec816087 1201 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ",
14e8a3c4
BL
1202 WIPHY_PR_ARG, NETDEV_PR_ARG,
1203 __entry->enabled ? "" : "not ", __entry->timeout)
1204);
1205
1206TRACE_EVENT(rdev_connect,
1207 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1208 struct cfg80211_connect_params *sme),
1209 TP_ARGS(wiphy, netdev, sme),
1210 TP_STRUCT__entry(
1211 WIPHY_ENTRY
1212 NETDEV_ENTRY
1213 MAC_ENTRY(bssid)
1214 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1215 __field(enum nl80211_auth_type, auth_type)
1216 __field(bool, privacy)
1217 __field(u32, wpa_versions)
1218 __field(u32, flags)
1219 ),
1220 TP_fast_assign(
1221 WIPHY_ASSIGN;
1222 NETDEV_ASSIGN;
1223 MAC_ASSIGN(bssid, sme->bssid);
1224 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1225 memcpy(__entry->ssid, sme->ssid, sme->ssid_len);
1226 __entry->auth_type = sme->auth_type;
1227 __entry->privacy = sme->privacy;
1228 __entry->wpa_versions = sme->crypto.wpa_versions;
1229 __entry->flags = sme->flags;
1230 ),
ec816087 1231 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
14e8a3c4
BL
1232 ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
1233 "flags: %u",
1234 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid,
1235 __entry->auth_type, BOOL_TO_STR(__entry->privacy),
1236 __entry->wpa_versions, __entry->flags)
1237);
1238
1239TRACE_EVENT(rdev_set_cqm_rssi_config,
1240 TP_PROTO(struct wiphy *wiphy,
1241 struct net_device *netdev, s32 rssi_thold,
1242 u32 rssi_hyst),
1243 TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
1244 TP_STRUCT__entry(
1245 WIPHY_ENTRY
1246 NETDEV_ENTRY
1247 __field(s32, rssi_thold)
1248 __field(u32, rssi_hyst)
1249 ),
1250 TP_fast_assign(
1251 WIPHY_ASSIGN;
1252 NETDEV_ASSIGN;
1253 __entry->rssi_thold = rssi_thold;
1254 __entry->rssi_hyst = rssi_hyst;
1255 ),
ec816087 1256 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
14e8a3c4
BL
1257 ", rssi_thold: %d, rssi_hyst: %u ",
1258 WIPHY_PR_ARG, NETDEV_PR_ARG,
1259 __entry->rssi_thold, __entry->rssi_hyst)
1260);
1261
1262TRACE_EVENT(rdev_set_cqm_txe_config,
1263 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
1264 u32 pkts, u32 intvl),
1265 TP_ARGS(wiphy, netdev, rate, pkts, intvl),
1266 TP_STRUCT__entry(
1267 WIPHY_ENTRY
1268 NETDEV_ENTRY
1269 __field(u32, rate)
1270 __field(u32, pkts)
1271 __field(u32, intvl)
1272 ),
1273 TP_fast_assign(
1274 WIPHY_ASSIGN;
1275 NETDEV_ASSIGN;
1276 __entry->rate = rate;
1277 __entry->pkts = pkts;
1278 __entry->intvl = intvl;
1279 ),
ec816087 1280 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
14e8a3c4
BL
1281 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
1282 __entry->intvl)
1283);
1284
1285TRACE_EVENT(rdev_disconnect,
1286 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1287 u16 reason_code),
1288 TP_ARGS(wiphy, netdev, reason_code),
1289 TP_STRUCT__entry(
1290 WIPHY_ENTRY
1291 NETDEV_ENTRY
1292 __field(u16, reason_code)
1293 ),
1294 TP_fast_assign(
1295 WIPHY_ASSIGN;
1296 NETDEV_ASSIGN;
1297 __entry->reason_code = reason_code;
1298 ),
ec816087 1299 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
14e8a3c4
BL
1300 NETDEV_PR_ARG, __entry->reason_code)
1301);
1302
1303TRACE_EVENT(rdev_join_ibss,
1304 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1305 struct cfg80211_ibss_params *params),
1306 TP_ARGS(wiphy, netdev, params),
1307 TP_STRUCT__entry(
1308 WIPHY_ENTRY
1309 NETDEV_ENTRY
1310 MAC_ENTRY(bssid)
1311 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1312 ),
1313 TP_fast_assign(
1314 WIPHY_ASSIGN;
1315 NETDEV_ASSIGN;
1316 MAC_ASSIGN(bssid, params->bssid);
1317 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1318 memcpy(__entry->ssid, params->ssid, params->ssid_len);
1319 ),
ec816087 1320 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s",
14e8a3c4
BL
1321 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid)
1322);
1323
6e0bd6c3
RL
1324TRACE_EVENT(rdev_join_ocb,
1325 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1326 const struct ocb_setup *setup),
1327 TP_ARGS(wiphy, netdev, setup),
1328 TP_STRUCT__entry(
1329 WIPHY_ENTRY
1330 NETDEV_ENTRY
1331 ),
1332 TP_fast_assign(
1333 WIPHY_ASSIGN;
1334 NETDEV_ASSIGN;
1335 ),
1336 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
1337 WIPHY_PR_ARG, NETDEV_PR_ARG)
1338);
1339
14e8a3c4
BL
1340TRACE_EVENT(rdev_set_wiphy_params,
1341 TP_PROTO(struct wiphy *wiphy, u32 changed),
1342 TP_ARGS(wiphy, changed),
1343 TP_STRUCT__entry(
1344 WIPHY_ENTRY
1345 __field(u32, changed)
1346 ),
1347 TP_fast_assign(
1348 WIPHY_ASSIGN;
1349 __entry->changed = changed;
1350 ),
1351 TP_printk(WIPHY_PR_FMT ", changed: %u",
1352 WIPHY_PR_ARG, __entry->changed)
1353);
1354
c8442118
JB
1355DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power,
1356 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1357 TP_ARGS(wiphy, wdev)
1358);
1359
14e8a3c4 1360TRACE_EVENT(rdev_set_tx_power,
c8442118
JB
1361 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1362 enum nl80211_tx_power_setting type, int mbm),
1363 TP_ARGS(wiphy, wdev, type, mbm),
14e8a3c4
BL
1364 TP_STRUCT__entry(
1365 WIPHY_ENTRY
c8442118 1366 WDEV_ENTRY
14e8a3c4
BL
1367 __field(enum nl80211_tx_power_setting, type)
1368 __field(int, mbm)
1369 ),
1370 TP_fast_assign(
1371 WIPHY_ASSIGN;
c8442118 1372 WDEV_ASSIGN;
14e8a3c4
BL
1373 __entry->type = type;
1374 __entry->mbm = mbm;
1375 ),
ec816087 1376 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
c8442118 1377 WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
14e8a3c4
BL
1378);
1379
1380TRACE_EVENT(rdev_return_int_int,
1381 TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
1382 TP_ARGS(wiphy, func_ret, func_fill),
1383 TP_STRUCT__entry(
1384 WIPHY_ENTRY
1385 __field(int, func_ret)
1386 __field(int, func_fill)
1387 ),
1388 TP_fast_assign(
1389 WIPHY_ASSIGN;
1390 __entry->func_ret = func_ret;
1391 __entry->func_fill = func_fill;
1392 ),
1393 TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
1394 WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
1395);
1396
1397#ifdef CONFIG_NL80211_TESTMODE
1398TRACE_EVENT(rdev_testmode_cmd,
fc73f11f
DS
1399 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1400 TP_ARGS(wiphy, wdev),
14e8a3c4
BL
1401 TP_STRUCT__entry(
1402 WIPHY_ENTRY
fc73f11f 1403 WDEV_ENTRY
14e8a3c4
BL
1404 ),
1405 TP_fast_assign(
1406 WIPHY_ASSIGN;
fc73f11f 1407 WDEV_ASSIGN;
14e8a3c4 1408 ),
fc73f11f 1409 TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
14e8a3c4
BL
1410);
1411
1412TRACE_EVENT(rdev_testmode_dump,
1413 TP_PROTO(struct wiphy *wiphy),
1414 TP_ARGS(wiphy),
1415 TP_STRUCT__entry(
1416 WIPHY_ENTRY
1417 ),
1418 TP_fast_assign(
1419 WIPHY_ASSIGN;
1420 ),
1421 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
1422);
1423#endif /* CONFIG_NL80211_TESTMODE */
1424
1425TRACE_EVENT(rdev_set_bitrate_mask,
1426 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1427 const u8 *peer, const struct cfg80211_bitrate_mask *mask),
1428 TP_ARGS(wiphy, netdev, peer, mask),
1429 TP_STRUCT__entry(
1430 WIPHY_ENTRY
1431 NETDEV_ENTRY
1432 MAC_ENTRY(peer)
1433 ),
1434 TP_fast_assign(
1435 WIPHY_ASSIGN;
1436 NETDEV_ASSIGN;
1437 MAC_ASSIGN(peer, peer);
1438 ),
ec816087 1439 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
14e8a3c4
BL
1440 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1441);
1442
1443TRACE_EVENT(rdev_mgmt_frame_register,
1444 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1445 u16 frame_type, bool reg),
1446 TP_ARGS(wiphy, wdev, frame_type, reg),
1447 TP_STRUCT__entry(
1448 WIPHY_ENTRY
1449 WDEV_ENTRY
1450 __field(u16, frame_type)
1451 __field(bool, reg)
1452 ),
1453 TP_fast_assign(
1454 WIPHY_ASSIGN;
1455 WDEV_ASSIGN;
1456 __entry->frame_type = frame_type;
1457 __entry->reg = reg;
1458 ),
ec816087 1459 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", frame_type: 0x%.2x, reg: %s ",
14e8a3c4
BL
1460 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->frame_type,
1461 __entry->reg ? "true" : "false")
1462);
1463
1464TRACE_EVENT(rdev_return_int_tx_rx,
1465 TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
1466 TP_ARGS(wiphy, ret, tx, rx),
1467 TP_STRUCT__entry(
1468 WIPHY_ENTRY
1469 __field(int, ret)
1470 __field(u32, tx)
1471 __field(u32, rx)
1472 ),
1473 TP_fast_assign(
1474 WIPHY_ASSIGN;
1475 __entry->ret = ret;
1476 __entry->tx = tx;
1477 __entry->rx = rx;
1478 ),
1479 TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
1480 WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
1481);
1482
1483TRACE_EVENT(rdev_return_void_tx_rx,
1484 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
1485 u32 rx, u32 rx_max),
1486 TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
1487 TP_STRUCT__entry(
1488 WIPHY_ENTRY
1489 __field(u32, tx)
1490 __field(u32, tx_max)
1491 __field(u32, rx)
1492 __field(u32, rx_max)
1493 ),
1494 TP_fast_assign(
1495 WIPHY_ASSIGN;
1496 __entry->tx = tx;
1497 __entry->tx_max = tx_max;
1498 __entry->rx = rx;
1499 __entry->rx_max = rx_max;
1500 ),
1501 TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
1502 WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
1503 __entry->rx_max)
1504);
1505
1506DECLARE_EVENT_CLASS(tx_rx_evt,
1507 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1508 TP_ARGS(wiphy, rx, tx),
1509 TP_STRUCT__entry(
1510 WIPHY_ENTRY
1511 __field(u32, tx)
1512 __field(u32, rx)
1513 ),
1514 TP_fast_assign(
1515 WIPHY_ASSIGN;
1516 __entry->tx = tx;
1517 __entry->rx = rx;
1518 ),
1519 TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
1520 WIPHY_PR_ARG, __entry->tx, __entry->rx)
1521);
1522
14e8a3c4
BL
1523DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
1524 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1525 TP_ARGS(wiphy, rx, tx)
1526);
1527
1528TRACE_EVENT(rdev_sched_scan_start,
1529 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1530 struct cfg80211_sched_scan_request *request),
1531 TP_ARGS(wiphy, netdev, request),
1532 TP_STRUCT__entry(
1533 WIPHY_ENTRY
1534 NETDEV_ENTRY
1535 ),
1536 TP_fast_assign(
1537 WIPHY_ASSIGN;
1538 NETDEV_ASSIGN;
1539 ),
ec816087 1540 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
14e8a3c4
BL
1541 WIPHY_PR_ARG, NETDEV_PR_ARG)
1542);
1543
1544TRACE_EVENT(rdev_tdls_mgmt,
1545 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1546 u8 *peer, u8 action_code, u8 dialog_token,
df942e7b 1547 u16 status_code, u32 peer_capability,
31fa97c5 1548 bool initiator, const u8 *buf, size_t len),
14e8a3c4 1549 TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
31fa97c5 1550 peer_capability, initiator, buf, len),
14e8a3c4
BL
1551 TP_STRUCT__entry(
1552 WIPHY_ENTRY
1553 NETDEV_ENTRY
1554 MAC_ENTRY(peer)
1555 __field(u8, action_code)
1556 __field(u8, dialog_token)
1557 __field(u16, status_code)
df942e7b 1558 __field(u32, peer_capability)
31fa97c5 1559 __field(bool, initiator)
14e8a3c4
BL
1560 __dynamic_array(u8, buf, len)
1561 ),
1562 TP_fast_assign(
1563 WIPHY_ASSIGN;
1564 NETDEV_ASSIGN;
1565 MAC_ASSIGN(peer, peer);
1566 __entry->action_code = action_code;
1567 __entry->dialog_token = dialog_token;
1568 __entry->status_code = status_code;
df942e7b 1569 __entry->peer_capability = peer_capability;
31fa97c5 1570 __entry->initiator = initiator;
14e8a3c4
BL
1571 memcpy(__get_dynamic_array(buf), buf, len);
1572 ),
ec816087 1573 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, "
31fa97c5
AN
1574 "dialog_token: %u, status_code: %u, peer_capability: %u "
1575 "initiator: %s buf: %#.2x ",
14e8a3c4
BL
1576 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
1577 __entry->action_code, __entry->dialog_token,
df942e7b 1578 __entry->status_code, __entry->peer_capability,
31fa97c5 1579 BOOL_TO_STR(__entry->initiator),
df942e7b 1580 ((u8 *)__get_dynamic_array(buf))[0])
14e8a3c4
BL
1581);
1582
1583TRACE_EVENT(rdev_dump_survey,
1584 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx),
1585 TP_ARGS(wiphy, netdev, idx),
1586 TP_STRUCT__entry(
1587 WIPHY_ENTRY
1588 NETDEV_ENTRY
1589 __field(int, idx)
1590 ),
1591 TP_fast_assign(
1592 WIPHY_ASSIGN;
1593 NETDEV_ASSIGN;
1594 __entry->idx = idx;
1595 ),
ec816087 1596 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
14e8a3c4
BL
1597 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
1598);
1599
1600TRACE_EVENT(rdev_return_int_survey_info,
1601 TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
1602 TP_ARGS(wiphy, ret, info),
1603 TP_STRUCT__entry(
1604 WIPHY_ENTRY
1605 CHAN_ENTRY
1606 __field(int, ret)
1607 __field(u64, channel_time)
1608 __field(u64, channel_time_busy)
1609 __field(u64, channel_time_ext_busy)
1610 __field(u64, channel_time_rx)
1611 __field(u64, channel_time_tx)
1612 __field(u32, filled)
1613 __field(s8, noise)
1614 ),
1615 TP_fast_assign(
1616 WIPHY_ASSIGN;
1617 CHAN_ASSIGN(info->channel);
1618 __entry->ret = ret;
1619 __entry->channel_time = info->channel_time;
1620 __entry->channel_time_busy = info->channel_time_busy;
1621 __entry->channel_time_ext_busy = info->channel_time_ext_busy;
1622 __entry->channel_time_rx = info->channel_time_rx;
1623 __entry->channel_time_tx = info->channel_time_tx;
1624 __entry->filled = info->filled;
1625 __entry->noise = info->noise;
1626 ),
1627 TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
1628 ", channel time: %llu, channel time busy: %llu, "
1629 "channel time extension busy: %llu, channel time rx: %llu, "
1630 "channel time tx: %llu, filled: %u, noise: %d",
1631 WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
1632 __entry->channel_time, __entry->channel_time_busy,
1633 __entry->channel_time_ext_busy, __entry->channel_time_rx,
1634 __entry->channel_time_tx, __entry->filled, __entry->noise)
1635);
1636
1637TRACE_EVENT(rdev_tdls_oper,
1638 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1639 u8 *peer, enum nl80211_tdls_operation oper),
1640 TP_ARGS(wiphy, netdev, peer, oper),
1641 TP_STRUCT__entry(
1642 WIPHY_ENTRY
1643 NETDEV_ENTRY
1644 MAC_ENTRY(peer)
1645 __field(enum nl80211_tdls_operation, oper)
1646 ),
1647 TP_fast_assign(
1648 WIPHY_ASSIGN;
1649 NETDEV_ASSIGN;
1650 MAC_ASSIGN(peer, peer);
1651 __entry->oper = oper;
1652 ),
ec816087 1653 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d",
14e8a3c4
BL
1654 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
1655);
1656
1657DECLARE_EVENT_CLASS(rdev_pmksa,
1658 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1659 struct cfg80211_pmksa *pmksa),
1660 TP_ARGS(wiphy, netdev, pmksa),
1661 TP_STRUCT__entry(
1662 WIPHY_ENTRY
1663 NETDEV_ENTRY
1664 MAC_ENTRY(bssid)
1665 ),
1666 TP_fast_assign(
1667 WIPHY_ASSIGN;
1668 NETDEV_ASSIGN;
1669 MAC_ASSIGN(bssid, pmksa->bssid);
1670 ),
ec816087 1671 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
14e8a3c4
BL
1672 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
1673);
1674
1675TRACE_EVENT(rdev_probe_client,
1676 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1677 const u8 *peer),
1678 TP_ARGS(wiphy, netdev, peer),
1679 TP_STRUCT__entry(
1680 WIPHY_ENTRY
1681 NETDEV_ENTRY
1682 MAC_ENTRY(peer)
1683 ),
1684 TP_fast_assign(
1685 WIPHY_ASSIGN;
1686 NETDEV_ASSIGN;
1687 MAC_ASSIGN(peer, peer);
1688 ),
ec816087 1689 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
14e8a3c4
BL
1690 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1691);
1692
1693DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
1694 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1695 struct cfg80211_pmksa *pmksa),
1696 TP_ARGS(wiphy, netdev, pmksa)
1697);
1698
1699DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
1700 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1701 struct cfg80211_pmksa *pmksa),
1702 TP_ARGS(wiphy, netdev, pmksa)
1703);
1704
1705TRACE_EVENT(rdev_remain_on_channel,
1706 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1707 struct ieee80211_channel *chan,
42d97a59
JB
1708 unsigned int duration),
1709 TP_ARGS(wiphy, wdev, chan, duration),
14e8a3c4
BL
1710 TP_STRUCT__entry(
1711 WIPHY_ENTRY
1712 WDEV_ENTRY
1713 CHAN_ENTRY
14e8a3c4
BL
1714 __field(unsigned int, duration)
1715 ),
1716 TP_fast_assign(
1717 WIPHY_ASSIGN;
1718 WDEV_ASSIGN;
1719 CHAN_ASSIGN(chan);
14e8a3c4
BL
1720 __entry->duration = duration;
1721 ),
ec816087 1722 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
42d97a59 1723 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
14e8a3c4
BL
1724);
1725
1726TRACE_EVENT(rdev_return_int_cookie,
1727 TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
1728 TP_ARGS(wiphy, ret, cookie),
1729 TP_STRUCT__entry(
1730 WIPHY_ENTRY
1731 __field(int, ret)
1732 __field(u64, cookie)
1733 ),
1734 TP_fast_assign(
1735 WIPHY_ASSIGN;
1736 __entry->ret = ret;
1737 __entry->cookie = cookie;
1738 ),
1739 TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
1740 WIPHY_PR_ARG, __entry->ret, __entry->cookie)
1741);
1742
1743TRACE_EVENT(rdev_cancel_remain_on_channel,
1744 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
1745 TP_ARGS(wiphy, wdev, cookie),
1746 TP_STRUCT__entry(
1747 WIPHY_ENTRY
1748 WDEV_ENTRY
1749 __field(u64, cookie)
1750 ),
1751 TP_fast_assign(
1752 WIPHY_ASSIGN;
1753 WDEV_ASSIGN;
1754 __entry->cookie = cookie;
1755 ),
ec816087 1756 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
14e8a3c4
BL
1757 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1758);
1759
1760TRACE_EVENT(rdev_mgmt_tx,
1761 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
b176e629
AO
1762 struct cfg80211_mgmt_tx_params *params),
1763 TP_ARGS(wiphy, wdev, params),
14e8a3c4
BL
1764 TP_STRUCT__entry(
1765 WIPHY_ENTRY
1766 WDEV_ENTRY
1767 CHAN_ENTRY
1768 __field(bool, offchan)
14e8a3c4
BL
1769 __field(unsigned int, wait)
1770 __field(bool, no_cck)
1771 __field(bool, dont_wait_for_ack)
1772 ),
1773 TP_fast_assign(
1774 WIPHY_ASSIGN;
1775 WDEV_ASSIGN;
b176e629
AO
1776 CHAN_ASSIGN(params->chan);
1777 __entry->offchan = params->offchan;
1778 __entry->wait = params->wait;
1779 __entry->no_cck = params->no_cck;
1780 __entry->dont_wait_for_ack = params->dont_wait_for_ack;
14e8a3c4 1781 ),
ec816087 1782 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
42d97a59 1783 " wait: %u, no cck: %s, dont wait for ack: %s",
14e8a3c4 1784 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
42d97a59 1785 BOOL_TO_STR(__entry->offchan), __entry->wait,
14e8a3c4
BL
1786 BOOL_TO_STR(__entry->no_cck),
1787 BOOL_TO_STR(__entry->dont_wait_for_ack))
1788);
1789
1790TRACE_EVENT(rdev_set_noack_map,
1791 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1792 u16 noack_map),
1793 TP_ARGS(wiphy, netdev, noack_map),
1794 TP_STRUCT__entry(
1795 WIPHY_ENTRY
1796 NETDEV_ENTRY
1797 __field(u16, noack_map)
1798 ),
1799 TP_fast_assign(
1800 WIPHY_ASSIGN;
1801 NETDEV_ASSIGN;
1802 __entry->noack_map = noack_map;
1803 ),
ec816087 1804 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
14e8a3c4
BL
1805 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
1806);
1807
14e8a3c4
BL
1808DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel,
1809 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1810 TP_ARGS(wiphy, wdev)
1811);
1812
683b6d3b
JB
1813TRACE_EVENT(rdev_return_chandef,
1814 TP_PROTO(struct wiphy *wiphy, int ret,
1815 struct cfg80211_chan_def *chandef),
1816 TP_ARGS(wiphy, ret, chandef),
14e8a3c4
BL
1817 TP_STRUCT__entry(
1818 WIPHY_ENTRY
683b6d3b
JB
1819 __field(int, ret)
1820 CHAN_DEF_ENTRY
14e8a3c4
BL
1821 ),
1822 TP_fast_assign(
1823 WIPHY_ASSIGN;
683b6d3b
JB
1824 if (ret == 0)
1825 CHAN_DEF_ASSIGN(chandef);
1826 else
1827 CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
1828 __entry->ret = ret;
14e8a3c4 1829 ),
ec816087 1830 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
683b6d3b 1831 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
14e8a3c4
BL
1832);
1833
eeb126e9
JB
1834DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
1835 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1836 TP_ARGS(wiphy, wdev)
1837);
1838
1839DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
1840 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1841 TP_ARGS(wiphy, wdev)
1842);
1843
77765eaf
VT
1844TRACE_EVENT(rdev_set_mac_acl,
1845 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1846 struct cfg80211_acl_data *params),
1847 TP_ARGS(wiphy, netdev, params),
1848 TP_STRUCT__entry(
1849 WIPHY_ENTRY
1850 NETDEV_ENTRY
1851 __field(u32, acl_policy)
1852 ),
1853 TP_fast_assign(
1854 WIPHY_ASSIGN;
021fcdc1 1855 NETDEV_ASSIGN;
77765eaf
VT
1856 __entry->acl_policy = params->acl_policy;
1857 ),
1858 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
1859 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
1860);
1861
355199e0
JM
1862TRACE_EVENT(rdev_update_ft_ies,
1863 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1864 struct cfg80211_update_ft_ies_params *ftie),
1865 TP_ARGS(wiphy, netdev, ftie),
1866 TP_STRUCT__entry(
1867 WIPHY_ENTRY
1868 NETDEV_ENTRY
1869 __field(u16, md)
1870 __dynamic_array(u8, ie, ftie->ie_len)
1871 ),
1872 TP_fast_assign(
1873 WIPHY_ASSIGN;
1874 NETDEV_ASSIGN;
1875 __entry->md = ftie->md;
1876 memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
1877 ),
1878 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
1879 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
1880);
1881
5de17984
AS
1882TRACE_EVENT(rdev_crit_proto_start,
1883 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1884 enum nl80211_crit_proto_id protocol, u16 duration),
1885 TP_ARGS(wiphy, wdev, protocol, duration),
1886 TP_STRUCT__entry(
1887 WIPHY_ENTRY
1888 WDEV_ENTRY
1889 __field(u16, proto)
1890 __field(u16, duration)
1891 ),
1892 TP_fast_assign(
1893 WIPHY_ASSIGN;
1894 WDEV_ASSIGN;
1895 __entry->proto = protocol;
1896 __entry->duration = duration;
1897 ),
1898 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
1899 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
1900);
1901
1902TRACE_EVENT(rdev_crit_proto_stop,
1903 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1904 TP_ARGS(wiphy, wdev),
1905 TP_STRUCT__entry(
1906 WIPHY_ENTRY
1907 WDEV_ENTRY
1908 ),
1909 TP_fast_assign(
1910 WIPHY_ASSIGN;
1911 WDEV_ASSIGN;
1912 ),
1913 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
1914 WIPHY_PR_ARG, WDEV_PR_ARG)
1915);
1916
16ef1fe2
SW
1917TRACE_EVENT(rdev_channel_switch,
1918 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1919 struct cfg80211_csa_settings *params),
1920 TP_ARGS(wiphy, netdev, params),
1921 TP_STRUCT__entry(
1922 WIPHY_ENTRY
1923 NETDEV_ENTRY
1924 CHAN_DEF_ENTRY
16ef1fe2
SW
1925 __field(bool, radar_required)
1926 __field(bool, block_tx)
1927 __field(u8, count)
9a774c78
AO
1928 __dynamic_array(u16, bcn_ofs, params->n_counter_offsets_beacon)
1929 __dynamic_array(u16, pres_ofs, params->n_counter_offsets_presp)
16ef1fe2
SW
1930 ),
1931 TP_fast_assign(
1932 WIPHY_ASSIGN;
1933 NETDEV_ASSIGN;
1934 CHAN_DEF_ASSIGN(&params->chandef);
16ef1fe2
SW
1935 __entry->radar_required = params->radar_required;
1936 __entry->block_tx = params->block_tx;
1937 __entry->count = params->count;
9a774c78
AO
1938 memcpy(__get_dynamic_array(bcn_ofs),
1939 params->counter_offsets_beacon,
1940 params->n_counter_offsets_beacon * sizeof(u16));
1941
1942 /* probe response offsets are optional */
1943 if (params->n_counter_offsets_presp)
1944 memcpy(__get_dynamic_array(pres_ofs),
1945 params->counter_offsets_presp,
1946 params->n_counter_offsets_presp * sizeof(u16));
16ef1fe2
SW
1947 ),
1948 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
9a774c78 1949 ", block_tx: %d, count: %u, radar_required: %d",
16ef1fe2 1950 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
9a774c78 1951 __entry->block_tx, __entry->count, __entry->radar_required)
16ef1fe2
SW
1952);
1953
fa9ffc74
KP
1954TRACE_EVENT(rdev_set_qos_map,
1955 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1956 struct cfg80211_qos_map *qos_map),
1957 TP_ARGS(wiphy, netdev, qos_map),
1958 TP_STRUCT__entry(
1959 WIPHY_ENTRY
1960 NETDEV_ENTRY
1961 QOS_MAP_ENTRY
1962 ),
1963 TP_fast_assign(
1964 WIPHY_ASSIGN;
1965 NETDEV_ASSIGN;
1966 QOS_MAP_ASSIGN(qos_map);
1967 ),
1968 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u",
1969 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des)
1970);
1971
e16821bc
JM
1972TRACE_EVENT(rdev_set_ap_chanwidth,
1973 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1974 struct cfg80211_chan_def *chandef),
1975 TP_ARGS(wiphy, netdev, chandef),
1976 TP_STRUCT__entry(
1977 WIPHY_ENTRY
1978 NETDEV_ENTRY
1979 CHAN_DEF_ENTRY
1980 ),
1981 TP_fast_assign(
1982 WIPHY_ASSIGN;
1983 NETDEV_ASSIGN;
1984 CHAN_DEF_ASSIGN(chandef);
1985 ),
1986 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
1987 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
1988);
1989
960d01ac
JB
1990TRACE_EVENT(rdev_add_tx_ts,
1991 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1992 u8 tsid, const u8 *peer, u8 user_prio, u16 admitted_time),
1993 TP_ARGS(wiphy, netdev, tsid, peer, user_prio, admitted_time),
1994 TP_STRUCT__entry(
1995 WIPHY_ENTRY
1996 NETDEV_ENTRY
1997 MAC_ENTRY(peer)
1998 __field(u8, tsid)
1999 __field(u8, user_prio)
2000 __field(u16, admitted_time)
2001 ),
2002 TP_fast_assign(
2003 WIPHY_ASSIGN;
2004 NETDEV_ASSIGN;
2005 MAC_ASSIGN(peer, peer);
2006 __entry->tsid = tsid;
2007 __entry->user_prio = user_prio;
2008 __entry->admitted_time = admitted_time;
2009 ),
2010 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d, UP %d, time %d",
2011 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
2012 __entry->tsid, __entry->user_prio, __entry->admitted_time)
2013);
2014
2015TRACE_EVENT(rdev_del_tx_ts,
2016 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2017 u8 tsid, const u8 *peer),
2018 TP_ARGS(wiphy, netdev, tsid, peer),
2019 TP_STRUCT__entry(
2020 WIPHY_ENTRY
2021 NETDEV_ENTRY
2022 MAC_ENTRY(peer)
2023 __field(u8, tsid)
2024 ),
2025 TP_fast_assign(
2026 WIPHY_ASSIGN;
2027 NETDEV_ASSIGN;
2028 MAC_ASSIGN(peer, peer);
2029 __entry->tsid = tsid;
2030 ),
2031 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d",
2032 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tsid)
2033);
2034
1057d35e
AN
2035TRACE_EVENT(rdev_tdls_channel_switch,
2036 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2037 const u8 *addr, u8 oper_class,
2038 struct cfg80211_chan_def *chandef),
2039 TP_ARGS(wiphy, netdev, addr, oper_class, chandef),
2040 TP_STRUCT__entry(
2041 WIPHY_ENTRY
2042 NETDEV_ENTRY
2043 MAC_ENTRY(addr)
2044 __field(u8, oper_class)
2045 CHAN_DEF_ENTRY
2046 ),
2047 TP_fast_assign(
2048 WIPHY_ASSIGN;
2049 NETDEV_ASSIGN;
2050 MAC_ASSIGN(addr, addr);
2051 CHAN_DEF_ASSIGN(chandef);
2052 ),
2053 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT
2054 " oper class %d, " CHAN_DEF_PR_FMT,
2055 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr),
2056 __entry->oper_class, CHAN_DEF_PR_ARG)
2057);
2058
2059TRACE_EVENT(rdev_tdls_cancel_channel_switch,
2060 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2061 const u8 *addr),
2062 TP_ARGS(wiphy, netdev, addr),
2063 TP_STRUCT__entry(
2064 WIPHY_ENTRY
2065 NETDEV_ENTRY
2066 MAC_ENTRY(addr)
2067 ),
2068 TP_fast_assign(
2069 WIPHY_ASSIGN;
2070 NETDEV_ASSIGN;
2071 MAC_ASSIGN(addr, addr);
2072 ),
2073 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
2074 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr))
2075);
2076
4ee3e063
BL
2077/*************************************************************
2078 * cfg80211 exported functions traces *
2079 *************************************************************/
2080
2081TRACE_EVENT(cfg80211_return_bool,
2082 TP_PROTO(bool ret),
2083 TP_ARGS(ret),
2084 TP_STRUCT__entry(
2085 __field(bool, ret)
2086 ),
2087 TP_fast_assign(
2088 __entry->ret = ret;
2089 ),
2090 TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
2091);
2092
2093DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
2094 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2095 TP_ARGS(netdev, macaddr),
2096 TP_STRUCT__entry(
2097 NETDEV_ENTRY
2098 MAC_ENTRY(macaddr)
2099 ),
2100 TP_fast_assign(
2101 NETDEV_ASSIGN;
2102 MAC_ASSIGN(macaddr, macaddr);
2103 ),
2104 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2105 NETDEV_PR_ARG, MAC_PR_ARG(macaddr))
2106);
2107
2108DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
2109 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2110 TP_ARGS(netdev, macaddr)
2111);
2112
2113DECLARE_EVENT_CLASS(netdev_evt_only,
2114 TP_PROTO(struct net_device *netdev),
2115 TP_ARGS(netdev),
2116 TP_STRUCT__entry(
2117 NETDEV_ENTRY
2118 ),
2119 TP_fast_assign(
2120 NETDEV_ASSIGN;
2121 ),
2122 TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
2123);
2124
2125DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
2126 TP_PROTO(struct net_device *netdev),
2127 TP_ARGS(netdev)
2128);
2129
2130TRACE_EVENT(cfg80211_send_rx_assoc,
2131 TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss),
2132 TP_ARGS(netdev, bss),
2133 TP_STRUCT__entry(
2134 NETDEV_ENTRY
2135 MAC_ENTRY(bssid)
2136 CHAN_ENTRY
2137 ),
2138 TP_fast_assign(
2139 NETDEV_ASSIGN;
2140 MAC_ASSIGN(bssid, bss->bssid);
2141 CHAN_ASSIGN(bss->channel);
2142 ),
ec816087 2143 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT,
4ee3e063
BL
2144 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2145);
2146
6ff57cf8
JB
2147DECLARE_EVENT_CLASS(netdev_frame_event,
2148 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2149 TP_ARGS(netdev, buf, len),
2150 TP_STRUCT__entry(
2151 NETDEV_ENTRY
2152 __dynamic_array(u8, frame, len)
2153 ),
2154 TP_fast_assign(
2155 NETDEV_ASSIGN;
2156 memcpy(__get_dynamic_array(frame), buf, len);
2157 ),
2158 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2159 NETDEV_PR_ARG,
2160 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
4ee3e063
BL
2161);
2162
6ff57cf8
JB
2163DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
2164 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2165 TP_ARGS(netdev, buf, len)
4ee3e063
BL
2166);
2167
6ff57cf8
JB
2168DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
2169 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2170 TP_ARGS(netdev, buf, len)
4ee3e063
BL
2171);
2172
6ff57cf8
JB
2173TRACE_EVENT(cfg80211_tx_mlme_mgmt,
2174 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2175 TP_ARGS(netdev, buf, len),
2176 TP_STRUCT__entry(
2177 NETDEV_ENTRY
2178 __dynamic_array(u8, frame, len)
2179 ),
2180 TP_fast_assign(
2181 NETDEV_ASSIGN;
2182 memcpy(__get_dynamic_array(frame), buf, len);
2183 ),
2184 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2185 NETDEV_PR_ARG,
2186 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
4ee3e063
BL
2187);
2188
2189DECLARE_EVENT_CLASS(netdev_mac_evt,
2190 TP_PROTO(struct net_device *netdev, const u8 *mac),
2191 TP_ARGS(netdev, mac),
2192 TP_STRUCT__entry(
2193 NETDEV_ENTRY
2194 MAC_ENTRY(mac)
2195 ),
2196 TP_fast_assign(
2197 NETDEV_ASSIGN;
2198 MAC_ASSIGN(mac, mac)
2199 ),
2200 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2201 NETDEV_PR_ARG, MAC_PR_ARG(mac))
2202);
2203
2204DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
2205 TP_PROTO(struct net_device *netdev, const u8 *mac),
2206 TP_ARGS(netdev, mac)
2207);
2208
2209DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout,
2210 TP_PROTO(struct net_device *netdev, const u8 *mac),
2211 TP_ARGS(netdev, mac)
2212);
2213
2214TRACE_EVENT(cfg80211_michael_mic_failure,
2215 TP_PROTO(struct net_device *netdev, const u8 *addr,
2216 enum nl80211_key_type key_type, int key_id, const u8 *tsc),
2217 TP_ARGS(netdev, addr, key_type, key_id, tsc),
2218 TP_STRUCT__entry(
2219 NETDEV_ENTRY
2220 MAC_ENTRY(addr)
2221 __field(enum nl80211_key_type, key_type)
2222 __field(int, key_id)
2223 __array(u8, tsc, 6)
2224 ),
2225 TP_fast_assign(
2226 NETDEV_ASSIGN;
2227 MAC_ASSIGN(addr, addr);
2228 __entry->key_type = key_type;
2229 __entry->key_id = key_id;
8c26d458
EP
2230 if (tsc)
2231 memcpy(__entry->tsc, tsc, 6);
4ee3e063 2232 ),
ec816087 2233 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
4ee3e063
BL
2234 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,
2235 __entry->key_id, __entry->tsc)
2236);
2237
2238TRACE_EVENT(cfg80211_ready_on_channel,
2239 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2240 struct ieee80211_channel *chan,
42d97a59
JB
2241 unsigned int duration),
2242 TP_ARGS(wdev, cookie, chan, duration),
4ee3e063
BL
2243 TP_STRUCT__entry(
2244 WDEV_ENTRY
2245 __field(u64, cookie)
2246 CHAN_ENTRY
4ee3e063
BL
2247 __field(unsigned int, duration)
2248 ),
2249 TP_fast_assign(
2250 WDEV_ASSIGN;
2251 __entry->cookie = cookie;
2252 CHAN_ASSIGN(chan);
4ee3e063
BL
2253 __entry->duration = duration;
2254 ),
42d97a59 2255 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
4ee3e063 2256 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
42d97a59 2257 __entry->duration)
4ee3e063
BL
2258);
2259
2260TRACE_EVENT(cfg80211_ready_on_channel_expired,
2261 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
42d97a59
JB
2262 struct ieee80211_channel *chan),
2263 TP_ARGS(wdev, cookie, chan),
4ee3e063
BL
2264 TP_STRUCT__entry(
2265 WDEV_ENTRY
2266 __field(u64, cookie)
2267 CHAN_ENTRY
4ee3e063
BL
2268 ),
2269 TP_fast_assign(
2270 WDEV_ASSIGN;
2271 __entry->cookie = cookie;
2272 CHAN_ASSIGN(chan);
4ee3e063 2273 ),
42d97a59
JB
2274 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
2275 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
4ee3e063
BL
2276);
2277
2278TRACE_EVENT(cfg80211_new_sta,
2279 TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
2280 struct station_info *sinfo),
2281 TP_ARGS(netdev, mac_addr, sinfo),
2282 TP_STRUCT__entry(
2283 NETDEV_ENTRY
2284 MAC_ENTRY(mac_addr)
2285 SINFO_ENTRY
2286 ),
2287 TP_fast_assign(
2288 NETDEV_ASSIGN;
2289 MAC_ASSIGN(mac_addr, mac_addr);
2290 SINFO_ASSIGN;
2291 ),
ec816087 2292 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT,
4ee3e063
BL
2293 NETDEV_PR_ARG, MAC_PR_ARG(mac_addr))
2294);
2295
2296DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
2297 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2298 TP_ARGS(netdev, macaddr)
2299);
2300
2301TRACE_EVENT(cfg80211_rx_mgmt,
2302 TP_PROTO(struct wireless_dev *wdev, int freq, int sig_mbm),
2303 TP_ARGS(wdev, freq, sig_mbm),
2304 TP_STRUCT__entry(
2305 WDEV_ENTRY
2306 __field(int, freq)
2307 __field(int, sig_mbm)
2308 ),
2309 TP_fast_assign(
2310 WDEV_ASSIGN;
2311 __entry->freq = freq;
2312 __entry->sig_mbm = sig_mbm;
2313 ),
2314 TP_printk(WDEV_PR_FMT ", freq: %d, sig mbm: %d",
2315 WDEV_PR_ARG, __entry->freq, __entry->sig_mbm)
2316);
2317
2318TRACE_EVENT(cfg80211_mgmt_tx_status,
2319 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
2320 TP_ARGS(wdev, cookie, ack),
2321 TP_STRUCT__entry(
2322 WDEV_ENTRY
2323 __field(u64, cookie)
2324 __field(bool, ack)
2325 ),
2326 TP_fast_assign(
2327 WDEV_ASSIGN;
2328 __entry->cookie = cookie;
2329 __entry->ack = ack;
2330 ),
2331 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
2332 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
2333);
2334
2335TRACE_EVENT(cfg80211_cqm_rssi_notify,
2336 TP_PROTO(struct net_device *netdev,
2337 enum nl80211_cqm_rssi_threshold_event rssi_event),
2338 TP_ARGS(netdev, rssi_event),
2339 TP_STRUCT__entry(
2340 NETDEV_ENTRY
2341 __field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
2342 ),
2343 TP_fast_assign(
2344 NETDEV_ASSIGN;
2345 __entry->rssi_event = rssi_event;
2346 ),
2347 TP_printk(NETDEV_PR_FMT ", rssi event: %d",
2348 NETDEV_PR_ARG, __entry->rssi_event)
2349);
2350
683b6d3b 2351TRACE_EVENT(cfg80211_reg_can_beacon,
174e0cd2
IP
2352 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
2353 enum nl80211_iftype iftype),
2354 TP_ARGS(wiphy, chandef, iftype),
4ee3e063
BL
2355 TP_STRUCT__entry(
2356 WIPHY_ENTRY
683b6d3b 2357 CHAN_DEF_ENTRY
174e0cd2 2358 __field(enum nl80211_iftype, iftype)
4ee3e063
BL
2359 ),
2360 TP_fast_assign(
2361 WIPHY_ASSIGN;
683b6d3b 2362 CHAN_DEF_ASSIGN(chandef);
174e0cd2 2363 __entry->iftype = iftype;
4ee3e063 2364 ),
174e0cd2
IP
2365 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d",
2366 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype)
4ee3e063
BL
2367);
2368
04f39047
SW
2369TRACE_EVENT(cfg80211_chandef_dfs_required,
2370 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2371 TP_ARGS(wiphy, chandef),
2372 TP_STRUCT__entry(
2373 WIPHY_ENTRY
2374 CHAN_DEF_ENTRY
2375 ),
2376 TP_fast_assign(
2377 WIPHY_ASSIGN;
2378 CHAN_DEF_ASSIGN(chandef);
2379 ),
2380 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2381 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2382);
2383
4ee3e063 2384TRACE_EVENT(cfg80211_ch_switch_notify,
683b6d3b
JB
2385 TP_PROTO(struct net_device *netdev,
2386 struct cfg80211_chan_def *chandef),
2387 TP_ARGS(netdev, chandef),
4ee3e063
BL
2388 TP_STRUCT__entry(
2389 NETDEV_ENTRY
683b6d3b 2390 CHAN_DEF_ENTRY
4ee3e063
BL
2391 ),
2392 TP_fast_assign(
2393 NETDEV_ASSIGN;
683b6d3b 2394 CHAN_DEF_ASSIGN(chandef);
4ee3e063 2395 ),
ec816087 2396 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
683b6d3b 2397 NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
4ee3e063
BL
2398);
2399
f8d7552e
LC
2400TRACE_EVENT(cfg80211_ch_switch_started_notify,
2401 TP_PROTO(struct net_device *netdev,
2402 struct cfg80211_chan_def *chandef),
2403 TP_ARGS(netdev, chandef),
2404 TP_STRUCT__entry(
2405 NETDEV_ENTRY
2406 CHAN_DEF_ENTRY
2407 ),
2408 TP_fast_assign(
2409 NETDEV_ASSIGN;
2410 CHAN_DEF_ASSIGN(chandef);
2411 ),
2412 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2413 NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2414);
2415
04f39047
SW
2416TRACE_EVENT(cfg80211_radar_event,
2417 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2418 TP_ARGS(wiphy, chandef),
2419 TP_STRUCT__entry(
2420 WIPHY_ENTRY
2421 CHAN_DEF_ENTRY
2422 ),
2423 TP_fast_assign(
2424 WIPHY_ASSIGN;
2425 CHAN_DEF_ASSIGN(chandef);
2426 ),
2427 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2428 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2429);
2430
2431TRACE_EVENT(cfg80211_cac_event,
2432 TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt),
2433 TP_ARGS(netdev, evt),
2434 TP_STRUCT__entry(
2435 NETDEV_ENTRY
2436 __field(enum nl80211_radar_event, evt)
2437 ),
2438 TP_fast_assign(
2439 NETDEV_ASSIGN;
2440 __entry->evt = evt;
2441 ),
2442 TP_printk(NETDEV_PR_FMT ", event: %d",
2443 NETDEV_PR_ARG, __entry->evt)
2444);
2445
4ee3e063
BL
2446DECLARE_EVENT_CLASS(cfg80211_rx_evt,
2447 TP_PROTO(struct net_device *netdev, const u8 *addr),
2448 TP_ARGS(netdev, addr),
2449 TP_STRUCT__entry(
2450 NETDEV_ENTRY
2451 MAC_ENTRY(addr)
2452 ),
2453 TP_fast_assign(
2454 NETDEV_ASSIGN;
2455 MAC_ASSIGN(addr, addr);
2456 ),
ec816087 2457 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
4ee3e063
BL
2458);
2459
4ee3e063
BL
2460DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
2461 TP_PROTO(struct net_device *netdev, const u8 *addr),
2462 TP_ARGS(netdev, addr)
2463);
2464
2465DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
2466 TP_PROTO(struct net_device *netdev, const u8 *addr),
2467 TP_ARGS(netdev, addr)
2468);
2469
fe94f3a4
AQ
2470TRACE_EVENT(cfg80211_ibss_joined,
2471 TP_PROTO(struct net_device *netdev, const u8 *bssid,
2472 struct ieee80211_channel *channel),
2473 TP_ARGS(netdev, bssid, channel),
2474 TP_STRUCT__entry(
2475 NETDEV_ENTRY
2476 MAC_ENTRY(bssid)
2477 CHAN_ENTRY
2478 ),
2479 TP_fast_assign(
2480 NETDEV_ASSIGN;
2481 MAC_ASSIGN(bssid, bssid);
2482 CHAN_ASSIGN(channel);
2483 ),
2484 TP_printk(NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", " CHAN_PR_FMT,
2485 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2486);
2487
4ee3e063
BL
2488TRACE_EVENT(cfg80211_probe_status,
2489 TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
2490 bool acked),
2491 TP_ARGS(netdev, addr, cookie, acked),
2492 TP_STRUCT__entry(
2493 NETDEV_ENTRY
2494 MAC_ENTRY(addr)
2495 __field(u64, cookie)
2496 __field(bool, acked)
2497 ),
2498 TP_fast_assign(
2499 NETDEV_ASSIGN;
2500 MAC_ASSIGN(addr, addr);
2501 __entry->cookie = cookie;
2502 __entry->acked = acked;
2503 ),
ec816087 2504 TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
4ee3e063
BL
2505 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
2506 BOOL_TO_STR(__entry->acked))
2507);
2508
2509TRACE_EVENT(cfg80211_cqm_pktloss_notify,
2510 TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
2511 TP_ARGS(netdev, peer, num_packets),
2512 TP_STRUCT__entry(
2513 NETDEV_ENTRY
2514 MAC_ENTRY(peer)
2515 __field(u32, num_packets)
2516 ),
2517 TP_fast_assign(
2518 NETDEV_ASSIGN;
2519 MAC_ASSIGN(peer, peer);
2520 __entry->num_packets = num_packets;
2521 ),
2522 TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u",
2523 NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets)
2524);
2525
2526DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
2527 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2528 TP_ARGS(netdev, macaddr)
2529);
2530
2531TRACE_EVENT(cfg80211_pmksa_candidate_notify,
2532 TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
2533 bool preauth),
2534 TP_ARGS(netdev, index, bssid, preauth),
2535 TP_STRUCT__entry(
2536 NETDEV_ENTRY
2537 __field(int, index)
2538 MAC_ENTRY(bssid)
2539 __field(bool, preauth)
2540 ),
2541 TP_fast_assign(
2542 NETDEV_ASSIGN;
2543 __entry->index = index;
2544 MAC_ASSIGN(bssid, bssid);
2545 __entry->preauth = preauth;
2546 ),
2547 TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s",
2548 NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid),
2549 BOOL_TO_STR(__entry->preauth))
2550);
2551
2552TRACE_EVENT(cfg80211_report_obss_beacon,
2553 TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
2554 int freq, int sig_dbm),
2555 TP_ARGS(wiphy, frame, len, freq, sig_dbm),
2556 TP_STRUCT__entry(
2557 WIPHY_ENTRY
2558 __field(int, freq)
2559 __field(int, sig_dbm)
2560 ),
2561 TP_fast_assign(
2562 WIPHY_ASSIGN;
2563 __entry->freq = freq;
2564 __entry->sig_dbm = sig_dbm;
2565 ),
2566 TP_printk(WIPHY_PR_FMT ", freq: %d, sig_dbm: %d",
2567 WIPHY_PR_ARG, __entry->freq, __entry->sig_dbm)
2568);
2569
3475b094
JM
2570TRACE_EVENT(cfg80211_tdls_oper_request,
2571 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
2572 enum nl80211_tdls_operation oper, u16 reason_code),
2573 TP_ARGS(wiphy, netdev, peer, oper, reason_code),
2574 TP_STRUCT__entry(
2575 WIPHY_ENTRY
2576 NETDEV_ENTRY
2577 MAC_ENTRY(peer)
2578 __field(enum nl80211_tdls_operation, oper)
2579 __field(u16, reason_code)
2580 ),
2581 TP_fast_assign(
2582 WIPHY_ASSIGN;
2583 NETDEV_ASSIGN;
2584 MAC_ASSIGN(peer, peer);
2585 __entry->oper = oper;
2586 __entry->reason_code = reason_code;
2587 ),
2588 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u",
2589 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper,
2590 __entry->reason_code)
2591 );
2592
4ee3e063
BL
2593TRACE_EVENT(cfg80211_scan_done,
2594 TP_PROTO(struct cfg80211_scan_request *request, bool aborted),
2595 TP_ARGS(request, aborted),
2596 TP_STRUCT__entry(
2597 __field(u32, n_channels)
2598 __dynamic_array(u8, ie, request ? request->ie_len : 0)
2599 __array(u32, rates, IEEE80211_NUM_BANDS)
2600 __field(u32, wdev_id)
2601 MAC_ENTRY(wiphy_mac)
2602 __field(bool, no_cck)
2603 __field(bool, aborted)
2604 ),
2605 TP_fast_assign(
2606 if (request) {
2607 memcpy(__get_dynamic_array(ie), request->ie,
2608 request->ie_len);
2609 memcpy(__entry->rates, request->rates,
2610 IEEE80211_NUM_BANDS);
2611 __entry->wdev_id = request->wdev ?
2612 request->wdev->identifier : 0;
2613 if (request->wiphy)
2614 MAC_ASSIGN(wiphy_mac,
2615 request->wiphy->perm_addr);
2616 __entry->no_cck = request->no_cck;
2617 }
2618 __entry->aborted = aborted;
2619 ),
2620 TP_printk("aborted: %s", BOOL_TO_STR(__entry->aborted))
2621);
2622
2623DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_results,
2624 TP_PROTO(struct wiphy *wiphy),
2625 TP_ARGS(wiphy)
2626);
2627
2628DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_stopped,
2629 TP_PROTO(struct wiphy *wiphy),
2630 TP_ARGS(wiphy)
2631);
2632
2633TRACE_EVENT(cfg80211_get_bss,
2634 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
2635 const u8 *bssid, const u8 *ssid, size_t ssid_len,
2636 u16 capa_mask, u16 capa_val),
2637 TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, capa_mask, capa_val),
2638 TP_STRUCT__entry(
2639 WIPHY_ENTRY
2640 CHAN_ENTRY
2641 MAC_ENTRY(bssid)
2642 __dynamic_array(u8, ssid, ssid_len)
2643 __field(u16, capa_mask)
2644 __field(u16, capa_val)
2645 ),
2646 TP_fast_assign(
2647 WIPHY_ASSIGN;
2648 CHAN_ASSIGN(channel);
2649 MAC_ASSIGN(bssid, bssid);
2650 memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
2651 __entry->capa_mask = capa_mask;
2652 __entry->capa_val = capa_val;
2653 ),
ec816087 2654 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT ", buf: %#.2x, "
4ee3e063
BL
2655 "capa_mask: %d, capa_val: %u", WIPHY_PR_ARG, CHAN_PR_ARG,
2656 MAC_PR_ARG(bssid), ((u8 *)__get_dynamic_array(ssid))[0],
2657 __entry->capa_mask, __entry->capa_val)
2658);
2659
dcd6eac1 2660TRACE_EVENT(cfg80211_inform_bss_width_frame,
4ee3e063 2661 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
dcd6eac1 2662 enum nl80211_bss_scan_width scan_width,
4ee3e063
BL
2663 struct ieee80211_mgmt *mgmt, size_t len,
2664 s32 signal),
dcd6eac1 2665 TP_ARGS(wiphy, channel, scan_width, mgmt, len, signal),
4ee3e063
BL
2666 TP_STRUCT__entry(
2667 WIPHY_ENTRY
2668 CHAN_ENTRY
dcd6eac1 2669 __field(enum nl80211_bss_scan_width, scan_width)
4ee3e063
BL
2670 __dynamic_array(u8, mgmt, len)
2671 __field(s32, signal)
2672 ),
2673 TP_fast_assign(
2674 WIPHY_ASSIGN;
2675 CHAN_ASSIGN(channel);
dcd6eac1 2676 __entry->scan_width = scan_width;
4ee3e063
BL
2677 if (mgmt)
2678 memcpy(__get_dynamic_array(mgmt), mgmt, len);
2679 __entry->signal = signal;
2680 ),
dcd6eac1
SW
2681 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT "(scan_width: %d) signal: %d",
2682 WIPHY_PR_ARG, CHAN_PR_ARG, __entry->scan_width,
2683 __entry->signal)
4ee3e063
BL
2684);
2685
2686DECLARE_EVENT_CLASS(cfg80211_bss_evt,
2687 TP_PROTO(struct cfg80211_bss *pub),
2688 TP_ARGS(pub),
2689 TP_STRUCT__entry(
2690 MAC_ENTRY(bssid)
2691 CHAN_ENTRY
2692 ),
2693 TP_fast_assign(
2694 MAC_ASSIGN(bssid, pub->bssid);
2695 CHAN_ASSIGN(pub->channel);
2696 ),
ec816087 2697 TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG)
4ee3e063
BL
2698);
2699
2700DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
2701 TP_PROTO(struct cfg80211_bss *pub),
2702 TP_ARGS(pub)
2703);
2704
2705TRACE_EVENT(cfg80211_return_uint,
2706 TP_PROTO(unsigned int ret),
2707 TP_ARGS(ret),
2708 TP_STRUCT__entry(
2709 __field(unsigned int, ret)
2710 ),
2711 TP_fast_assign(
2712 __entry->ret = ret;
2713 ),
2714 TP_printk("ret: %d", __entry->ret)
2715);
2716
2717TRACE_EVENT(cfg80211_return_u32,
2718 TP_PROTO(u32 ret),
2719 TP_ARGS(ret),
2720 TP_STRUCT__entry(
2721 __field(u32, ret)
2722 ),
2723 TP_fast_assign(
2724 __entry->ret = ret;
2725 ),
2726 TP_printk("ret: %u", __entry->ret)
2727);
2728
cd8f7cb4
JB
2729TRACE_EVENT(cfg80211_report_wowlan_wakeup,
2730 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2731 struct cfg80211_wowlan_wakeup *wakeup),
2732 TP_ARGS(wiphy, wdev, wakeup),
2733 TP_STRUCT__entry(
2734 WIPHY_ENTRY
2735 WDEV_ENTRY
a92eecbb 2736 __field(bool, non_wireless)
cd8f7cb4
JB
2737 __field(bool, disconnect)
2738 __field(bool, magic_pkt)
2739 __field(bool, gtk_rekey_failure)
2740 __field(bool, eap_identity_req)
2741 __field(bool, four_way_handshake)
2742 __field(bool, rfkill_release)
2743 __field(s32, pattern_idx)
2744 __field(u32, packet_len)
a92eecbb
JB
2745 __dynamic_array(u8, packet,
2746 wakeup ? wakeup->packet_present_len : 0)
cd8f7cb4
JB
2747 ),
2748 TP_fast_assign(
2749 WIPHY_ASSIGN;
2750 WDEV_ASSIGN;
a92eecbb
JB
2751 __entry->non_wireless = !wakeup;
2752 __entry->disconnect = wakeup ? wakeup->disconnect : false;
2753 __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
2754 __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
2755 __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
2756 __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
2757 __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
2758 __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
2759 __entry->packet_len = wakeup ? wakeup->packet_len : false;
2760 if (wakeup && wakeup->packet && wakeup->packet_present_len)
cd8f7cb4
JB
2761 memcpy(__get_dynamic_array(packet), wakeup->packet,
2762 wakeup->packet_present_len);
2763 ),
2764 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
2765);
2766
355199e0
JM
2767TRACE_EVENT(cfg80211_ft_event,
2768 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2769 struct cfg80211_ft_event_params *ft_event),
2770 TP_ARGS(wiphy, netdev, ft_event),
2771 TP_STRUCT__entry(
2772 WIPHY_ENTRY
2773 NETDEV_ENTRY
2774 __dynamic_array(u8, ies, ft_event->ies_len)
2775 MAC_ENTRY(target_ap)
2776 __dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
2777 ),
2778 TP_fast_assign(
2779 WIPHY_ASSIGN;
2780 NETDEV_ASSIGN;
2781 if (ft_event->ies)
2782 memcpy(__get_dynamic_array(ies), ft_event->ies,
2783 ft_event->ies_len);
2784 MAC_ASSIGN(target_ap, ft_event->target_ap);
2785 if (ft_event->ric_ies)
2786 memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
2787 ft_event->ric_ies_len);
2788 ),
2789 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT,
2790 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
2791);
2792
f04c2203
MK
2793TRACE_EVENT(cfg80211_stop_iface,
2794 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2795 TP_ARGS(wiphy, wdev),
2796 TP_STRUCT__entry(
2797 WIPHY_ENTRY
2798 WDEV_ENTRY
2799 ),
2800 TP_fast_assign(
2801 WIPHY_ASSIGN;
2802 WDEV_ASSIGN;
2803 ),
2804 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
2805 WIPHY_PR_ARG, WDEV_PR_ARG)
2806);
2807
14e8a3c4
BL
2808#endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
2809
2810#undef TRACE_INCLUDE_PATH
2811#define TRACE_INCLUDE_PATH .
2812#undef TRACE_INCLUDE_FILE
2813#define TRACE_INCLUDE_FILE trace
2814#include <trace/define_trace.h>