pktgen: add needed include file
[linux/fpc-iii.git] / net / wireless / trace.h
blobe1534baf2ebbe5d0fdc41d4e2d6ceb42fd9630f3
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM cfg80211
4 #if !defined(__RDEV_OPS_TRACE) || defined(TRACE_HEADER_MULTI_READ)
5 #define __RDEV_OPS_TRACE
7 #include <linux/tracepoint.h>
9 #include <linux/rtnetlink.h>
10 #include <net/cfg80211.h>
11 #include "core.h"
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)
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
29 #define WDEV_ENTRY __field(u32, id)
30 #define WDEV_ASSIGN (__entry->id) = (!IS_ERR_OR_NULL(wdev) \
31 ? wdev->identifier : 0)
32 #define WDEV_PR_FMT "wdev(%u)"
33 #define WDEV_PR_ARG (__entry->id)
35 #define NETDEV_ENTRY __array(char, name, IFNAMSIZ) \
36 __field(int, ifindex)
37 #define NETDEV_ASSIGN \
38 do { \
39 memcpy(__entry->name, netdev->name, IFNAMSIZ); \
40 (__entry->ifindex) = (netdev->ifindex); \
41 } while (0)
42 #define NETDEV_PR_FMT "netdev:%s(%d)"
43 #define NETDEV_PR_ARG __entry->name, __entry->ifindex
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)
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; \
123 } while (0)
124 #define CHAN_PR_FMT "band: %d, freq: %u"
125 #define CHAN_PR_ARG __entry->band, __entry->center_freq
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)
132 #define CHAN_DEF_ASSIGN(chandef) \
133 do { \
134 if ((chandef) && (chandef)->chan) { \
135 __entry->band = (chandef)->chan->band; \
136 __entry->control_freq = \
137 (chandef)->chan->center_freq; \
138 __entry->width = (chandef)->width; \
139 __entry->center_freq1 = (chandef)->center_freq1;\
140 __entry->center_freq2 = (chandef)->center_freq2;\
141 } else { \
142 __entry->band = 0; \
143 __entry->control_freq = 0; \
144 __entry->width = 0; \
145 __entry->center_freq1 = 0; \
146 __entry->center_freq2 = 0; \
148 } while (0)
149 #define CHAN_DEF_PR_FMT \
150 "band: %d, control freq: %u, width: %d, cf1: %u, cf2: %u"
151 #define CHAN_DEF_PR_ARG __entry->band, __entry->control_freq, \
152 __entry->width, __entry->center_freq1, \
153 __entry->center_freq2
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)
187 #define BOOL_TO_STR(bo) (bo) ? "true" : "false"
189 /*************************************************************
190 * rdev->ops traces *
191 *************************************************************/
193 TRACE_EVENT(rdev_suspend,
194 TP_PROTO(struct wiphy *wiphy, struct cfg80211_wowlan *wow),
195 TP_ARGS(wiphy, wow),
196 TP_STRUCT__entry(
197 WIPHY_ENTRY
198 __field(bool, any)
199 __field(bool, disconnect)
200 __field(bool, magic_pkt)
201 __field(bool, gtk_rekey_failure)
202 __field(bool, eap_identity_req)
203 __field(bool, four_way_handshake)
204 __field(bool, rfkill_release)
205 __field(bool, valid_wow)
207 TP_fast_assign(
208 WIPHY_ASSIGN;
209 if (wow) {
210 __entry->any = wow->any;
211 __entry->disconnect = wow->disconnect;
212 __entry->magic_pkt = wow->magic_pkt;
213 __entry->gtk_rekey_failure = wow->gtk_rekey_failure;
214 __entry->eap_identity_req = wow->eap_identity_req;
215 __entry->four_way_handshake = wow->four_way_handshake;
216 __entry->rfkill_release = wow->rfkill_release;
217 __entry->valid_wow = true;
218 } else {
219 __entry->valid_wow = false;
222 TP_printk(WIPHY_PR_FMT ", wow%s - any: %d, disconnect: %d, "
223 "magic pkt: %d, gtk rekey failure: %d, eap identify req: %d, "
224 "four way handshake: %d, rfkill release: %d.",
225 WIPHY_PR_ARG, __entry->valid_wow ? "" : "(Not configured!)",
226 __entry->any, __entry->disconnect, __entry->magic_pkt,
227 __entry->gtk_rekey_failure, __entry->eap_identity_req,
228 __entry->four_way_handshake, __entry->rfkill_release)
231 TRACE_EVENT(rdev_return_int,
232 TP_PROTO(struct wiphy *wiphy, int ret),
233 TP_ARGS(wiphy, ret),
234 TP_STRUCT__entry(
235 WIPHY_ENTRY
236 __field(int, ret)
238 TP_fast_assign(
239 WIPHY_ASSIGN;
240 __entry->ret = ret;
242 TP_printk(WIPHY_PR_FMT ", returned: %d", WIPHY_PR_ARG, __entry->ret)
245 TRACE_EVENT(rdev_scan,
246 TP_PROTO(struct wiphy *wiphy, struct cfg80211_scan_request *request),
247 TP_ARGS(wiphy, request),
248 TP_STRUCT__entry(
249 WIPHY_ENTRY
251 TP_fast_assign(
252 WIPHY_ASSIGN;
254 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
257 DECLARE_EVENT_CLASS(wiphy_only_evt,
258 TP_PROTO(struct wiphy *wiphy),
259 TP_ARGS(wiphy),
260 TP_STRUCT__entry(
261 WIPHY_ENTRY
263 TP_fast_assign(
264 WIPHY_ASSIGN;
266 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
269 DEFINE_EVENT(wiphy_only_evt, rdev_resume,
270 TP_PROTO(struct wiphy *wiphy),
271 TP_ARGS(wiphy)
274 DEFINE_EVENT(wiphy_only_evt, rdev_return_void,
275 TP_PROTO(struct wiphy *wiphy),
276 TP_ARGS(wiphy)
279 DEFINE_EVENT(wiphy_only_evt, rdev_get_ringparam,
280 TP_PROTO(struct wiphy *wiphy),
281 TP_ARGS(wiphy)
284 DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna,
285 TP_PROTO(struct wiphy *wiphy),
286 TP_ARGS(wiphy)
289 DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll,
290 TP_PROTO(struct wiphy *wiphy),
291 TP_ARGS(wiphy)
294 DECLARE_EVENT_CLASS(wiphy_enabled_evt,
295 TP_PROTO(struct wiphy *wiphy, bool enabled),
296 TP_ARGS(wiphy, enabled),
297 TP_STRUCT__entry(
298 WIPHY_ENTRY
299 __field(bool, enabled)
301 TP_fast_assign(
302 WIPHY_ASSIGN;
303 __entry->enabled = enabled;
305 TP_printk(WIPHY_PR_FMT ", %senabled ",
306 WIPHY_PR_ARG, __entry->enabled ? "" : "not ")
309 DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup,
310 TP_PROTO(struct wiphy *wiphy, bool enabled),
311 TP_ARGS(wiphy, enabled)
314 TRACE_EVENT(rdev_add_virtual_intf,
315 TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type),
316 TP_ARGS(wiphy, name, type),
317 TP_STRUCT__entry(
318 WIPHY_ENTRY
319 __string(vir_intf_name, name ? name : "<noname>")
320 __field(enum nl80211_iftype, type)
322 TP_fast_assign(
323 WIPHY_ASSIGN;
324 __assign_str(vir_intf_name, name ? name : "<noname>");
325 __entry->type = type;
327 TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d",
328 WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type)
331 DECLARE_EVENT_CLASS(wiphy_wdev_evt,
332 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
333 TP_ARGS(wiphy, wdev),
334 TP_STRUCT__entry(
335 WIPHY_ENTRY
336 WDEV_ENTRY
338 TP_fast_assign(
339 WIPHY_ASSIGN;
340 WDEV_ASSIGN;
342 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
345 DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev,
346 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
347 TP_ARGS(wiphy, wdev)
350 DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf,
351 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
352 TP_ARGS(wiphy, wdev)
355 TRACE_EVENT(rdev_change_virtual_intf,
356 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
357 enum nl80211_iftype type),
358 TP_ARGS(wiphy, netdev, type),
359 TP_STRUCT__entry(
360 WIPHY_ENTRY
361 NETDEV_ENTRY
362 __field(enum nl80211_iftype, type)
364 TP_fast_assign(
365 WIPHY_ASSIGN;
366 NETDEV_ASSIGN;
367 __entry->type = type;
369 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", type: %d",
370 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type)
373 DECLARE_EVENT_CLASS(key_handle,
374 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
375 bool pairwise, const u8 *mac_addr),
376 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr),
377 TP_STRUCT__entry(
378 WIPHY_ENTRY
379 NETDEV_ENTRY
380 MAC_ENTRY(mac_addr)
381 __field(u8, key_index)
382 __field(bool, pairwise)
384 TP_fast_assign(
385 WIPHY_ASSIGN;
386 NETDEV_ASSIGN;
387 MAC_ASSIGN(mac_addr, mac_addr);
388 __entry->key_index = key_index;
389 __entry->pairwise = pairwise;
391 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key_index: %u, pairwise: %s, mac addr: " MAC_PR_FMT,
392 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
393 BOOL_TO_STR(__entry->pairwise), MAC_PR_ARG(mac_addr))
396 DEFINE_EVENT(key_handle, rdev_add_key,
397 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
398 bool pairwise, const u8 *mac_addr),
399 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
402 DEFINE_EVENT(key_handle, rdev_get_key,
403 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
404 bool pairwise, const u8 *mac_addr),
405 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
408 DEFINE_EVENT(key_handle, rdev_del_key,
409 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
410 bool pairwise, const u8 *mac_addr),
411 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
414 TRACE_EVENT(rdev_set_default_key,
415 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
416 bool unicast, bool multicast),
417 TP_ARGS(wiphy, netdev, key_index, unicast, multicast),
418 TP_STRUCT__entry(
419 WIPHY_ENTRY
420 NETDEV_ENTRY
421 __field(u8, key_index)
422 __field(bool, unicast)
423 __field(bool, multicast)
425 TP_fast_assign(
426 WIPHY_ASSIGN;
427 NETDEV_ASSIGN;
428 __entry->key_index = key_index;
429 __entry->unicast = unicast;
430 __entry->multicast = multicast;
432 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u, unicast: %s, multicast: %s",
433 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
434 BOOL_TO_STR(__entry->unicast),
435 BOOL_TO_STR(__entry->multicast))
438 TRACE_EVENT(rdev_set_default_mgmt_key,
439 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
440 TP_ARGS(wiphy, netdev, key_index),
441 TP_STRUCT__entry(
442 WIPHY_ENTRY
443 NETDEV_ENTRY
444 __field(u8, key_index)
446 TP_fast_assign(
447 WIPHY_ASSIGN;
448 NETDEV_ASSIGN;
449 __entry->key_index = key_index;
451 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
452 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
455 TRACE_EVENT(rdev_start_ap,
456 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
457 struct cfg80211_ap_settings *settings),
458 TP_ARGS(wiphy, netdev, settings),
459 TP_STRUCT__entry(
460 WIPHY_ENTRY
461 NETDEV_ENTRY
462 CHAN_DEF_ENTRY
463 __field(int, beacon_interval)
464 __field(int, dtim_period)
465 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
466 __field(enum nl80211_hidden_ssid, hidden_ssid)
467 __field(u32, wpa_ver)
468 __field(bool, privacy)
469 __field(enum nl80211_auth_type, auth_type)
470 __field(int, inactivity_timeout)
472 TP_fast_assign(
473 WIPHY_ASSIGN;
474 NETDEV_ASSIGN;
475 CHAN_DEF_ASSIGN(&settings->chandef);
476 __entry->beacon_interval = settings->beacon_interval;
477 __entry->dtim_period = settings->dtim_period;
478 __entry->hidden_ssid = settings->hidden_ssid;
479 __entry->wpa_ver = settings->crypto.wpa_versions;
480 __entry->privacy = settings->privacy;
481 __entry->auth_type = settings->auth_type;
482 __entry->inactivity_timeout = settings->inactivity_timeout;
483 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
484 memcpy(__entry->ssid, settings->ssid, settings->ssid_len);
486 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", AP settings - ssid: %s, "
487 CHAN_DEF_PR_FMT ", beacon interval: %d, dtim period: %d, "
488 "hidden ssid: %d, wpa versions: %u, privacy: %s, "
489 "auth type: %d, inactivity timeout: %d",
490 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_DEF_PR_ARG,
491 __entry->beacon_interval, __entry->dtim_period,
492 __entry->hidden_ssid, __entry->wpa_ver,
493 BOOL_TO_STR(__entry->privacy), __entry->auth_type,
494 __entry->inactivity_timeout)
497 TRACE_EVENT(rdev_change_beacon,
498 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
499 struct cfg80211_beacon_data *info),
500 TP_ARGS(wiphy, netdev, info),
501 TP_STRUCT__entry(
502 WIPHY_ENTRY
503 NETDEV_ENTRY
504 __dynamic_array(u8, head, info ? info->head_len : 0)
505 __dynamic_array(u8, tail, info ? info->tail_len : 0)
506 __dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0)
507 __dynamic_array(u8, proberesp_ies,
508 info ? info->proberesp_ies_len : 0)
509 __dynamic_array(u8, assocresp_ies,
510 info ? info->assocresp_ies_len : 0)
511 __dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0)
513 TP_fast_assign(
514 WIPHY_ASSIGN;
515 NETDEV_ASSIGN;
516 if (info) {
517 if (info->head)
518 memcpy(__get_dynamic_array(head), info->head,
519 info->head_len);
520 if (info->tail)
521 memcpy(__get_dynamic_array(tail), info->tail,
522 info->tail_len);
523 if (info->beacon_ies)
524 memcpy(__get_dynamic_array(beacon_ies),
525 info->beacon_ies, info->beacon_ies_len);
526 if (info->proberesp_ies)
527 memcpy(__get_dynamic_array(proberesp_ies),
528 info->proberesp_ies,
529 info->proberesp_ies_len);
530 if (info->assocresp_ies)
531 memcpy(__get_dynamic_array(assocresp_ies),
532 info->assocresp_ies,
533 info->assocresp_ies_len);
534 if (info->probe_resp)
535 memcpy(__get_dynamic_array(probe_resp),
536 info->probe_resp, info->probe_resp_len);
539 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
542 DECLARE_EVENT_CLASS(wiphy_netdev_evt,
543 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
544 TP_ARGS(wiphy, netdev),
545 TP_STRUCT__entry(
546 WIPHY_ENTRY
547 NETDEV_ENTRY
549 TP_fast_assign(
550 WIPHY_ASSIGN;
551 NETDEV_ASSIGN;
553 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
556 DEFINE_EVENT(wiphy_netdev_evt, rdev_stop_ap,
557 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
558 TP_ARGS(wiphy, netdev)
561 DEFINE_EVENT(wiphy_netdev_evt, rdev_get_et_stats,
562 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
563 TP_ARGS(wiphy, netdev)
566 DEFINE_EVENT(wiphy_netdev_evt, rdev_sched_scan_stop,
567 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
568 TP_ARGS(wiphy, netdev)
571 DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data,
572 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
573 TP_ARGS(wiphy, netdev)
576 DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config,
577 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
578 TP_ARGS(wiphy, netdev)
581 DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh,
582 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
583 TP_ARGS(wiphy, netdev)
586 DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ibss,
587 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
588 TP_ARGS(wiphy, netdev)
591 DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa,
592 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
593 TP_ARGS(wiphy, netdev)
596 DECLARE_EVENT_CLASS(station_add_change,
597 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
598 struct station_parameters *params),
599 TP_ARGS(wiphy, netdev, mac, params),
600 TP_STRUCT__entry(
601 WIPHY_ENTRY
602 NETDEV_ENTRY
603 MAC_ENTRY(sta_mac)
604 __field(u32, sta_flags_mask)
605 __field(u32, sta_flags_set)
606 __field(u32, sta_modify_mask)
607 __field(int, listen_interval)
608 __field(u16, aid)
609 __field(u8, plink_action)
610 __field(u8, plink_state)
611 __field(u8, uapsd_queues)
612 __array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap))
614 TP_fast_assign(
615 WIPHY_ASSIGN;
616 NETDEV_ASSIGN;
617 MAC_ASSIGN(sta_mac, mac);
618 __entry->sta_flags_mask = params->sta_flags_mask;
619 __entry->sta_flags_set = params->sta_flags_set;
620 __entry->sta_modify_mask = params->sta_modify_mask;
621 __entry->listen_interval = params->listen_interval;
622 __entry->aid = params->aid;
623 __entry->plink_action = params->plink_action;
624 __entry->plink_state = params->plink_state;
625 __entry->uapsd_queues = params->uapsd_queues;
626 memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap));
627 if (params->ht_capa)
628 memcpy(__entry->ht_capa, params->ht_capa,
629 sizeof(struct ieee80211_ht_cap));
631 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
632 ", station flags mask: %u, station flags set: %u, "
633 "station modify mask: %u, listen interval: %d, aid: %u, "
634 "plink action: %u, plink state: %u, uapsd queues: %u",
635 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
636 __entry->sta_flags_mask, __entry->sta_flags_set,
637 __entry->sta_modify_mask, __entry->listen_interval,
638 __entry->aid, __entry->plink_action, __entry->plink_state,
639 __entry->uapsd_queues)
642 DEFINE_EVENT(station_add_change, rdev_add_station,
643 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
644 struct station_parameters *params),
645 TP_ARGS(wiphy, netdev, mac, params)
648 DEFINE_EVENT(station_add_change, rdev_change_station,
649 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
650 struct station_parameters *params),
651 TP_ARGS(wiphy, netdev, mac, params)
654 DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
655 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
656 TP_ARGS(wiphy, netdev, mac),
657 TP_STRUCT__entry(
658 WIPHY_ENTRY
659 NETDEV_ENTRY
660 MAC_ENTRY(sta_mac)
662 TP_fast_assign(
663 WIPHY_ASSIGN;
664 NETDEV_ASSIGN;
665 MAC_ASSIGN(sta_mac, mac);
667 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
668 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac))
671 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_station,
672 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
673 TP_ARGS(wiphy, netdev, mac)
676 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station,
677 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
678 TP_ARGS(wiphy, netdev, mac)
681 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
682 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
683 TP_ARGS(wiphy, netdev, mac)
686 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer,
687 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
688 TP_ARGS(wiphy, netdev, mac)
691 TRACE_EVENT(rdev_dump_station,
692 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
693 u8 *mac),
694 TP_ARGS(wiphy, netdev, idx, mac),
695 TP_STRUCT__entry(
696 WIPHY_ENTRY
697 NETDEV_ENTRY
698 MAC_ENTRY(sta_mac)
699 __field(int, idx)
701 TP_fast_assign(
702 WIPHY_ASSIGN;
703 NETDEV_ASSIGN;
704 MAC_ASSIGN(sta_mac, mac);
705 __entry->idx = idx;
707 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d",
708 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
709 __entry->idx)
712 TRACE_EVENT(rdev_return_int_station_info,
713 TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo),
714 TP_ARGS(wiphy, ret, sinfo),
715 TP_STRUCT__entry(
716 WIPHY_ENTRY
717 __field(int, ret)
718 SINFO_ENTRY
720 TP_fast_assign(
721 WIPHY_ASSIGN;
722 __entry->ret = ret;
723 SINFO_ASSIGN;
725 TP_printk(WIPHY_PR_FMT ", returned %d" ,
726 WIPHY_PR_ARG, __entry->ret)
729 DECLARE_EVENT_CLASS(mpath_evt,
730 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
731 u8 *next_hop),
732 TP_ARGS(wiphy, netdev, dst, next_hop),
733 TP_STRUCT__entry(
734 WIPHY_ENTRY
735 NETDEV_ENTRY
736 MAC_ENTRY(dst)
737 MAC_ENTRY(next_hop)
739 TP_fast_assign(
740 WIPHY_ASSIGN;
741 NETDEV_ASSIGN;
742 MAC_ASSIGN(dst, dst);
743 MAC_ASSIGN(next_hop, next_hop);
745 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT,
746 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst),
747 MAC_PR_ARG(next_hop))
750 DEFINE_EVENT(mpath_evt, rdev_add_mpath,
751 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
752 u8 *next_hop),
753 TP_ARGS(wiphy, netdev, dst, next_hop)
756 DEFINE_EVENT(mpath_evt, rdev_change_mpath,
757 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
758 u8 *next_hop),
759 TP_ARGS(wiphy, netdev, dst, next_hop)
762 DEFINE_EVENT(mpath_evt, rdev_get_mpath,
763 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
764 u8 *next_hop),
765 TP_ARGS(wiphy, netdev, dst, next_hop)
768 TRACE_EVENT(rdev_dump_mpath,
769 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
770 u8 *dst, u8 *next_hop),
771 TP_ARGS(wiphy, netdev, idx, dst, next_hop),
772 TP_STRUCT__entry(
773 WIPHY_ENTRY
774 NETDEV_ENTRY
775 MAC_ENTRY(dst)
776 MAC_ENTRY(next_hop)
777 __field(int, idx)
779 TP_fast_assign(
780 WIPHY_ASSIGN;
781 NETDEV_ASSIGN;
782 MAC_ASSIGN(dst, dst);
783 MAC_ASSIGN(next_hop, next_hop);
784 __entry->idx = idx;
786 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
787 MAC_PR_FMT ", next hop: " MAC_PR_FMT,
788 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
789 MAC_PR_ARG(next_hop))
792 TRACE_EVENT(rdev_return_int_mpath_info,
793 TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo),
794 TP_ARGS(wiphy, ret, pinfo),
795 TP_STRUCT__entry(
796 WIPHY_ENTRY
797 __field(int, ret)
798 __field(int, generation)
799 __field(u32, filled)
800 __field(u32, frame_qlen)
801 __field(u32, sn)
802 __field(u32, metric)
803 __field(u32, exptime)
804 __field(u32, discovery_timeout)
805 __field(u8, discovery_retries)
806 __field(u8, flags)
808 TP_fast_assign(
809 WIPHY_ASSIGN;
810 __entry->ret = ret;
811 __entry->generation = pinfo->generation;
812 __entry->filled = pinfo->filled;
813 __entry->frame_qlen = pinfo->frame_qlen;
814 __entry->sn = pinfo->sn;
815 __entry->metric = pinfo->metric;
816 __entry->exptime = pinfo->exptime;
817 __entry->discovery_timeout = pinfo->discovery_timeout;
818 __entry->discovery_retries = pinfo->discovery_retries;
819 __entry->flags = pinfo->flags;
821 TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, "
822 "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
823 " discovery timeout: %u, discovery retries: %u, flags: %u",
824 WIPHY_PR_ARG, __entry->ret, __entry->generation,
825 __entry->filled, __entry->frame_qlen, __entry->sn,
826 __entry->metric, __entry->exptime, __entry->discovery_timeout,
827 __entry->discovery_retries, __entry->flags)
830 TRACE_EVENT(rdev_return_int_mesh_config,
831 TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf),
832 TP_ARGS(wiphy, ret, conf),
833 TP_STRUCT__entry(
834 WIPHY_ENTRY
835 MESH_CFG_ENTRY
836 __field(int, ret)
838 TP_fast_assign(
839 WIPHY_ASSIGN;
840 MESH_CFG_ASSIGN;
841 __entry->ret = ret;
843 TP_printk(WIPHY_PR_FMT ", returned: %d",
844 WIPHY_PR_ARG, __entry->ret)
847 TRACE_EVENT(rdev_update_mesh_config,
848 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
849 const struct mesh_config *conf),
850 TP_ARGS(wiphy, netdev, mask, conf),
851 TP_STRUCT__entry(
852 WIPHY_ENTRY
853 NETDEV_ENTRY
854 MESH_CFG_ENTRY
855 __field(u32, mask)
857 TP_fast_assign(
858 WIPHY_ASSIGN;
859 NETDEV_ASSIGN;
860 MESH_CFG_ASSIGN;
861 __entry->mask = mask;
863 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u",
864 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
867 TRACE_EVENT(rdev_join_mesh,
868 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
869 const struct mesh_config *conf,
870 const struct mesh_setup *setup),
871 TP_ARGS(wiphy, netdev, conf, setup),
872 TP_STRUCT__entry(
873 WIPHY_ENTRY
874 NETDEV_ENTRY
875 MESH_CFG_ENTRY
877 TP_fast_assign(
878 WIPHY_ASSIGN;
879 NETDEV_ASSIGN;
880 MESH_CFG_ASSIGN;
882 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
883 WIPHY_PR_ARG, NETDEV_PR_ARG)
886 TRACE_EVENT(rdev_change_bss,
887 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
888 struct bss_parameters *params),
889 TP_ARGS(wiphy, netdev, params),
890 TP_STRUCT__entry(
891 WIPHY_ENTRY
892 NETDEV_ENTRY
893 __field(int, use_cts_prot)
894 __field(int, use_short_preamble)
895 __field(int, use_short_slot_time)
896 __field(int, ap_isolate)
897 __field(int, ht_opmode)
899 TP_fast_assign(
900 WIPHY_ASSIGN;
901 NETDEV_ASSIGN;
902 __entry->use_cts_prot = params->use_cts_prot;
903 __entry->use_short_preamble = params->use_short_preamble;
904 __entry->use_short_slot_time = params->use_short_slot_time;
905 __entry->ap_isolate = params->ap_isolate;
906 __entry->ht_opmode = params->ht_opmode;
908 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, "
909 "use short preamble: %d, use short slot time: %d, "
910 "ap isolate: %d, ht opmode: %d",
911 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot,
912 __entry->use_short_preamble, __entry->use_short_slot_time,
913 __entry->ap_isolate, __entry->ht_opmode)
916 TRACE_EVENT(rdev_set_txq_params,
917 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
918 struct ieee80211_txq_params *params),
919 TP_ARGS(wiphy, netdev, params),
920 TP_STRUCT__entry(
921 WIPHY_ENTRY
922 NETDEV_ENTRY
923 __field(enum nl80211_ac, ac)
924 __field(u16, txop)
925 __field(u16, cwmin)
926 __field(u16, cwmax)
927 __field(u8, aifs)
929 TP_fast_assign(
930 WIPHY_ASSIGN;
931 NETDEV_ASSIGN;
932 __entry->ac = params->ac;
933 __entry->txop = params->txop;
934 __entry->cwmin = params->cwmin;
935 __entry->cwmax = params->cwmax;
936 __entry->aifs = params->aifs;
938 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u",
939 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop,
940 __entry->cwmin, __entry->cwmax, __entry->aifs)
943 TRACE_EVENT(rdev_libertas_set_mesh_channel,
944 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
945 struct ieee80211_channel *chan),
946 TP_ARGS(wiphy, netdev, chan),
947 TP_STRUCT__entry(
948 WIPHY_ENTRY
949 NETDEV_ENTRY
950 CHAN_ENTRY
952 TP_fast_assign(
953 WIPHY_ASSIGN;
954 NETDEV_ASSIGN;
955 CHAN_ASSIGN(chan);
957 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG,
958 NETDEV_PR_ARG, CHAN_PR_ARG)
961 TRACE_EVENT(rdev_set_monitor_channel,
962 TP_PROTO(struct wiphy *wiphy,
963 struct cfg80211_chan_def *chandef),
964 TP_ARGS(wiphy, chandef),
965 TP_STRUCT__entry(
966 WIPHY_ENTRY
967 CHAN_DEF_ENTRY
969 TP_fast_assign(
970 WIPHY_ASSIGN;
971 CHAN_DEF_ASSIGN(chandef);
973 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
974 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
977 TRACE_EVENT(rdev_auth,
978 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
979 struct cfg80211_auth_request *req),
980 TP_ARGS(wiphy, netdev, req),
981 TP_STRUCT__entry(
982 WIPHY_ENTRY
983 NETDEV_ENTRY
984 MAC_ENTRY(bssid)
985 __field(enum nl80211_auth_type, auth_type)
987 TP_fast_assign(
988 WIPHY_ASSIGN;
989 NETDEV_ASSIGN;
990 if (req->bss)
991 MAC_ASSIGN(bssid, req->bss->bssid);
992 else
993 memset(__entry->bssid, 0, ETH_ALEN);
994 __entry->auth_type = req->auth_type;
996 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT,
997 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type,
998 MAC_PR_ARG(bssid))
1001 TRACE_EVENT(rdev_assoc,
1002 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1003 struct cfg80211_assoc_request *req),
1004 TP_ARGS(wiphy, netdev, req),
1005 TP_STRUCT__entry(
1006 WIPHY_ENTRY
1007 NETDEV_ENTRY
1008 MAC_ENTRY(bssid)
1009 MAC_ENTRY(prev_bssid)
1010 __field(bool, use_mfp)
1011 __field(u32, flags)
1013 TP_fast_assign(
1014 WIPHY_ASSIGN;
1015 NETDEV_ASSIGN;
1016 if (req->bss)
1017 MAC_ASSIGN(bssid, req->bss->bssid);
1018 else
1019 memset(__entry->bssid, 0, ETH_ALEN);
1020 MAC_ASSIGN(prev_bssid, req->prev_bssid);
1021 __entry->use_mfp = req->use_mfp;
1022 __entry->flags = req->flags;
1024 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
1025 ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u",
1026 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1027 MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp),
1028 __entry->flags)
1031 TRACE_EVENT(rdev_deauth,
1032 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1033 struct cfg80211_deauth_request *req),
1034 TP_ARGS(wiphy, netdev, req),
1035 TP_STRUCT__entry(
1036 WIPHY_ENTRY
1037 NETDEV_ENTRY
1038 MAC_ENTRY(bssid)
1039 __field(u16, reason_code)
1041 TP_fast_assign(
1042 WIPHY_ASSIGN;
1043 NETDEV_ASSIGN;
1044 MAC_ASSIGN(bssid, req->bssid);
1045 __entry->reason_code = req->reason_code;
1047 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u",
1048 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1049 __entry->reason_code)
1052 TRACE_EVENT(rdev_disassoc,
1053 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1054 struct cfg80211_disassoc_request *req),
1055 TP_ARGS(wiphy, netdev, req),
1056 TP_STRUCT__entry(
1057 WIPHY_ENTRY
1058 NETDEV_ENTRY
1059 MAC_ENTRY(bssid)
1060 __field(u16, reason_code)
1061 __field(bool, local_state_change)
1063 TP_fast_assign(
1064 WIPHY_ASSIGN;
1065 NETDEV_ASSIGN;
1066 if (req->bss)
1067 MAC_ASSIGN(bssid, req->bss->bssid);
1068 else
1069 memset(__entry->bssid, 0, ETH_ALEN);
1070 __entry->reason_code = req->reason_code;
1071 __entry->local_state_change = req->local_state_change;
1073 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
1074 ", reason: %u, local state change: %s",
1075 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1076 __entry->reason_code,
1077 BOOL_TO_STR(__entry->local_state_change))
1080 TRACE_EVENT(rdev_mgmt_tx_cancel_wait,
1081 TP_PROTO(struct wiphy *wiphy,
1082 struct wireless_dev *wdev, u64 cookie),
1083 TP_ARGS(wiphy, wdev, cookie),
1084 TP_STRUCT__entry(
1085 WIPHY_ENTRY
1086 WDEV_ENTRY
1087 __field(u64, cookie)
1089 TP_fast_assign(
1090 WIPHY_ASSIGN;
1091 WDEV_ASSIGN;
1092 __entry->cookie = cookie;
1094 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ",
1095 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1098 TRACE_EVENT(rdev_set_power_mgmt,
1099 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1100 bool enabled, int timeout),
1101 TP_ARGS(wiphy, netdev, enabled, timeout),
1102 TP_STRUCT__entry(
1103 WIPHY_ENTRY
1104 NETDEV_ENTRY
1105 __field(bool, enabled)
1106 __field(int, timeout)
1108 TP_fast_assign(
1109 WIPHY_ASSIGN;
1110 NETDEV_ASSIGN;
1111 __entry->enabled = enabled;
1112 __entry->timeout = timeout;
1114 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ",
1115 WIPHY_PR_ARG, NETDEV_PR_ARG,
1116 __entry->enabled ? "" : "not ", __entry->timeout)
1119 TRACE_EVENT(rdev_connect,
1120 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1121 struct cfg80211_connect_params *sme),
1122 TP_ARGS(wiphy, netdev, sme),
1123 TP_STRUCT__entry(
1124 WIPHY_ENTRY
1125 NETDEV_ENTRY
1126 MAC_ENTRY(bssid)
1127 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1128 __field(enum nl80211_auth_type, auth_type)
1129 __field(bool, privacy)
1130 __field(u32, wpa_versions)
1131 __field(u32, flags)
1133 TP_fast_assign(
1134 WIPHY_ASSIGN;
1135 NETDEV_ASSIGN;
1136 MAC_ASSIGN(bssid, sme->bssid);
1137 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1138 memcpy(__entry->ssid, sme->ssid, sme->ssid_len);
1139 __entry->auth_type = sme->auth_type;
1140 __entry->privacy = sme->privacy;
1141 __entry->wpa_versions = sme->crypto.wpa_versions;
1142 __entry->flags = sme->flags;
1144 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
1145 ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
1146 "flags: %u",
1147 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid,
1148 __entry->auth_type, BOOL_TO_STR(__entry->privacy),
1149 __entry->wpa_versions, __entry->flags)
1152 TRACE_EVENT(rdev_set_cqm_rssi_config,
1153 TP_PROTO(struct wiphy *wiphy,
1154 struct net_device *netdev, s32 rssi_thold,
1155 u32 rssi_hyst),
1156 TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
1157 TP_STRUCT__entry(
1158 WIPHY_ENTRY
1159 NETDEV_ENTRY
1160 __field(s32, rssi_thold)
1161 __field(u32, rssi_hyst)
1163 TP_fast_assign(
1164 WIPHY_ASSIGN;
1165 NETDEV_ASSIGN;
1166 __entry->rssi_thold = rssi_thold;
1167 __entry->rssi_hyst = rssi_hyst;
1169 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
1170 ", rssi_thold: %d, rssi_hyst: %u ",
1171 WIPHY_PR_ARG, NETDEV_PR_ARG,
1172 __entry->rssi_thold, __entry->rssi_hyst)
1175 TRACE_EVENT(rdev_set_cqm_txe_config,
1176 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
1177 u32 pkts, u32 intvl),
1178 TP_ARGS(wiphy, netdev, rate, pkts, intvl),
1179 TP_STRUCT__entry(
1180 WIPHY_ENTRY
1181 NETDEV_ENTRY
1182 __field(u32, rate)
1183 __field(u32, pkts)
1184 __field(u32, intvl)
1186 TP_fast_assign(
1187 WIPHY_ASSIGN;
1188 NETDEV_ASSIGN;
1189 __entry->rate = rate;
1190 __entry->pkts = pkts;
1191 __entry->intvl = intvl;
1193 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
1194 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
1195 __entry->intvl)
1198 TRACE_EVENT(rdev_disconnect,
1199 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1200 u16 reason_code),
1201 TP_ARGS(wiphy, netdev, reason_code),
1202 TP_STRUCT__entry(
1203 WIPHY_ENTRY
1204 NETDEV_ENTRY
1205 __field(u16, reason_code)
1207 TP_fast_assign(
1208 WIPHY_ASSIGN;
1209 NETDEV_ASSIGN;
1210 __entry->reason_code = reason_code;
1212 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
1213 NETDEV_PR_ARG, __entry->reason_code)
1216 TRACE_EVENT(rdev_join_ibss,
1217 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1218 struct cfg80211_ibss_params *params),
1219 TP_ARGS(wiphy, netdev, params),
1220 TP_STRUCT__entry(
1221 WIPHY_ENTRY
1222 NETDEV_ENTRY
1223 MAC_ENTRY(bssid)
1224 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1226 TP_fast_assign(
1227 WIPHY_ASSIGN;
1228 NETDEV_ASSIGN;
1229 MAC_ASSIGN(bssid, params->bssid);
1230 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1231 memcpy(__entry->ssid, params->ssid, params->ssid_len);
1233 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s",
1234 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid)
1237 TRACE_EVENT(rdev_set_wiphy_params,
1238 TP_PROTO(struct wiphy *wiphy, u32 changed),
1239 TP_ARGS(wiphy, changed),
1240 TP_STRUCT__entry(
1241 WIPHY_ENTRY
1242 __field(u32, changed)
1244 TP_fast_assign(
1245 WIPHY_ASSIGN;
1246 __entry->changed = changed;
1248 TP_printk(WIPHY_PR_FMT ", changed: %u",
1249 WIPHY_PR_ARG, __entry->changed)
1252 DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power,
1253 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1254 TP_ARGS(wiphy, wdev)
1257 TRACE_EVENT(rdev_set_tx_power,
1258 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1259 enum nl80211_tx_power_setting type, int mbm),
1260 TP_ARGS(wiphy, wdev, type, mbm),
1261 TP_STRUCT__entry(
1262 WIPHY_ENTRY
1263 WDEV_ENTRY
1264 __field(enum nl80211_tx_power_setting, type)
1265 __field(int, mbm)
1267 TP_fast_assign(
1268 WIPHY_ASSIGN;
1269 WDEV_ASSIGN;
1270 __entry->type = type;
1271 __entry->mbm = mbm;
1273 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
1274 WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
1277 TRACE_EVENT(rdev_return_int_int,
1278 TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
1279 TP_ARGS(wiphy, func_ret, func_fill),
1280 TP_STRUCT__entry(
1281 WIPHY_ENTRY
1282 __field(int, func_ret)
1283 __field(int, func_fill)
1285 TP_fast_assign(
1286 WIPHY_ASSIGN;
1287 __entry->func_ret = func_ret;
1288 __entry->func_fill = func_fill;
1290 TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
1291 WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
1294 #ifdef CONFIG_NL80211_TESTMODE
1295 TRACE_EVENT(rdev_testmode_cmd,
1296 TP_PROTO(struct wiphy *wiphy),
1297 TP_ARGS(wiphy),
1298 TP_STRUCT__entry(
1299 WIPHY_ENTRY
1301 TP_fast_assign(
1302 WIPHY_ASSIGN;
1304 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
1307 TRACE_EVENT(rdev_testmode_dump,
1308 TP_PROTO(struct wiphy *wiphy),
1309 TP_ARGS(wiphy),
1310 TP_STRUCT__entry(
1311 WIPHY_ENTRY
1313 TP_fast_assign(
1314 WIPHY_ASSIGN;
1316 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
1318 #endif /* CONFIG_NL80211_TESTMODE */
1320 TRACE_EVENT(rdev_set_bitrate_mask,
1321 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1322 const u8 *peer, const struct cfg80211_bitrate_mask *mask),
1323 TP_ARGS(wiphy, netdev, peer, mask),
1324 TP_STRUCT__entry(
1325 WIPHY_ENTRY
1326 NETDEV_ENTRY
1327 MAC_ENTRY(peer)
1329 TP_fast_assign(
1330 WIPHY_ASSIGN;
1331 NETDEV_ASSIGN;
1332 MAC_ASSIGN(peer, peer);
1334 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
1335 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1338 TRACE_EVENT(rdev_mgmt_frame_register,
1339 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1340 u16 frame_type, bool reg),
1341 TP_ARGS(wiphy, wdev, frame_type, reg),
1342 TP_STRUCT__entry(
1343 WIPHY_ENTRY
1344 WDEV_ENTRY
1345 __field(u16, frame_type)
1346 __field(bool, reg)
1348 TP_fast_assign(
1349 WIPHY_ASSIGN;
1350 WDEV_ASSIGN;
1351 __entry->frame_type = frame_type;
1352 __entry->reg = reg;
1354 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", frame_type: 0x%.2x, reg: %s ",
1355 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->frame_type,
1356 __entry->reg ? "true" : "false")
1359 TRACE_EVENT(rdev_return_int_tx_rx,
1360 TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
1361 TP_ARGS(wiphy, ret, tx, rx),
1362 TP_STRUCT__entry(
1363 WIPHY_ENTRY
1364 __field(int, ret)
1365 __field(u32, tx)
1366 __field(u32, rx)
1368 TP_fast_assign(
1369 WIPHY_ASSIGN;
1370 __entry->ret = ret;
1371 __entry->tx = tx;
1372 __entry->rx = rx;
1374 TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
1375 WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
1378 TRACE_EVENT(rdev_return_void_tx_rx,
1379 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
1380 u32 rx, u32 rx_max),
1381 TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
1382 TP_STRUCT__entry(
1383 WIPHY_ENTRY
1384 __field(u32, tx)
1385 __field(u32, tx_max)
1386 __field(u32, rx)
1387 __field(u32, rx_max)
1389 TP_fast_assign(
1390 WIPHY_ASSIGN;
1391 __entry->tx = tx;
1392 __entry->tx_max = tx_max;
1393 __entry->rx = rx;
1394 __entry->rx_max = rx_max;
1396 TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
1397 WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
1398 __entry->rx_max)
1401 DECLARE_EVENT_CLASS(tx_rx_evt,
1402 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1403 TP_ARGS(wiphy, rx, tx),
1404 TP_STRUCT__entry(
1405 WIPHY_ENTRY
1406 __field(u32, tx)
1407 __field(u32, rx)
1409 TP_fast_assign(
1410 WIPHY_ASSIGN;
1411 __entry->tx = tx;
1412 __entry->rx = rx;
1414 TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
1415 WIPHY_PR_ARG, __entry->tx, __entry->rx)
1418 DEFINE_EVENT(tx_rx_evt, rdev_set_ringparam,
1419 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1420 TP_ARGS(wiphy, rx, tx)
1423 DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
1424 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1425 TP_ARGS(wiphy, rx, tx)
1428 TRACE_EVENT(rdev_sched_scan_start,
1429 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1430 struct cfg80211_sched_scan_request *request),
1431 TP_ARGS(wiphy, netdev, request),
1432 TP_STRUCT__entry(
1433 WIPHY_ENTRY
1434 NETDEV_ENTRY
1436 TP_fast_assign(
1437 WIPHY_ASSIGN;
1438 NETDEV_ASSIGN;
1440 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
1441 WIPHY_PR_ARG, NETDEV_PR_ARG)
1444 TRACE_EVENT(rdev_tdls_mgmt,
1445 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1446 u8 *peer, u8 action_code, u8 dialog_token,
1447 u16 status_code, const u8 *buf, size_t len),
1448 TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
1449 buf, len),
1450 TP_STRUCT__entry(
1451 WIPHY_ENTRY
1452 NETDEV_ENTRY
1453 MAC_ENTRY(peer)
1454 __field(u8, action_code)
1455 __field(u8, dialog_token)
1456 __field(u16, status_code)
1457 __dynamic_array(u8, buf, len)
1459 TP_fast_assign(
1460 WIPHY_ASSIGN;
1461 NETDEV_ASSIGN;
1462 MAC_ASSIGN(peer, peer);
1463 __entry->action_code = action_code;
1464 __entry->dialog_token = dialog_token;
1465 __entry->status_code = status_code;
1466 memcpy(__get_dynamic_array(buf), buf, len);
1468 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, "
1469 "dialog_token: %u, status_code: %u, buf: %#.2x ",
1470 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
1471 __entry->action_code, __entry->dialog_token,
1472 __entry->status_code, ((u8 *)__get_dynamic_array(buf))[0])
1475 TRACE_EVENT(rdev_dump_survey,
1476 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx),
1477 TP_ARGS(wiphy, netdev, idx),
1478 TP_STRUCT__entry(
1479 WIPHY_ENTRY
1480 NETDEV_ENTRY
1481 __field(int, idx)
1483 TP_fast_assign(
1484 WIPHY_ASSIGN;
1485 NETDEV_ASSIGN;
1486 __entry->idx = idx;
1488 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
1489 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
1492 TRACE_EVENT(rdev_return_int_survey_info,
1493 TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
1494 TP_ARGS(wiphy, ret, info),
1495 TP_STRUCT__entry(
1496 WIPHY_ENTRY
1497 CHAN_ENTRY
1498 __field(int, ret)
1499 __field(u64, channel_time)
1500 __field(u64, channel_time_busy)
1501 __field(u64, channel_time_ext_busy)
1502 __field(u64, channel_time_rx)
1503 __field(u64, channel_time_tx)
1504 __field(u32, filled)
1505 __field(s8, noise)
1507 TP_fast_assign(
1508 WIPHY_ASSIGN;
1509 CHAN_ASSIGN(info->channel);
1510 __entry->ret = ret;
1511 __entry->channel_time = info->channel_time;
1512 __entry->channel_time_busy = info->channel_time_busy;
1513 __entry->channel_time_ext_busy = info->channel_time_ext_busy;
1514 __entry->channel_time_rx = info->channel_time_rx;
1515 __entry->channel_time_tx = info->channel_time_tx;
1516 __entry->filled = info->filled;
1517 __entry->noise = info->noise;
1519 TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
1520 ", channel time: %llu, channel time busy: %llu, "
1521 "channel time extension busy: %llu, channel time rx: %llu, "
1522 "channel time tx: %llu, filled: %u, noise: %d",
1523 WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
1524 __entry->channel_time, __entry->channel_time_busy,
1525 __entry->channel_time_ext_busy, __entry->channel_time_rx,
1526 __entry->channel_time_tx, __entry->filled, __entry->noise)
1529 TRACE_EVENT(rdev_tdls_oper,
1530 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1531 u8 *peer, enum nl80211_tdls_operation oper),
1532 TP_ARGS(wiphy, netdev, peer, oper),
1533 TP_STRUCT__entry(
1534 WIPHY_ENTRY
1535 NETDEV_ENTRY
1536 MAC_ENTRY(peer)
1537 __field(enum nl80211_tdls_operation, oper)
1539 TP_fast_assign(
1540 WIPHY_ASSIGN;
1541 NETDEV_ASSIGN;
1542 MAC_ASSIGN(peer, peer);
1543 __entry->oper = oper;
1545 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d",
1546 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
1549 DECLARE_EVENT_CLASS(rdev_pmksa,
1550 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1551 struct cfg80211_pmksa *pmksa),
1552 TP_ARGS(wiphy, netdev, pmksa),
1553 TP_STRUCT__entry(
1554 WIPHY_ENTRY
1555 NETDEV_ENTRY
1556 MAC_ENTRY(bssid)
1558 TP_fast_assign(
1559 WIPHY_ASSIGN;
1560 NETDEV_ASSIGN;
1561 MAC_ASSIGN(bssid, pmksa->bssid);
1563 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
1564 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
1567 TRACE_EVENT(rdev_probe_client,
1568 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1569 const u8 *peer),
1570 TP_ARGS(wiphy, netdev, peer),
1571 TP_STRUCT__entry(
1572 WIPHY_ENTRY
1573 NETDEV_ENTRY
1574 MAC_ENTRY(peer)
1576 TP_fast_assign(
1577 WIPHY_ASSIGN;
1578 NETDEV_ASSIGN;
1579 MAC_ASSIGN(peer, peer);
1581 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
1582 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1585 DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
1586 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1587 struct cfg80211_pmksa *pmksa),
1588 TP_ARGS(wiphy, netdev, pmksa)
1591 DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
1592 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1593 struct cfg80211_pmksa *pmksa),
1594 TP_ARGS(wiphy, netdev, pmksa)
1597 TRACE_EVENT(rdev_remain_on_channel,
1598 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1599 struct ieee80211_channel *chan,
1600 unsigned int duration),
1601 TP_ARGS(wiphy, wdev, chan, duration),
1602 TP_STRUCT__entry(
1603 WIPHY_ENTRY
1604 WDEV_ENTRY
1605 CHAN_ENTRY
1606 __field(unsigned int, duration)
1608 TP_fast_assign(
1609 WIPHY_ASSIGN;
1610 WDEV_ASSIGN;
1611 CHAN_ASSIGN(chan);
1612 __entry->duration = duration;
1614 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
1615 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
1618 TRACE_EVENT(rdev_return_int_cookie,
1619 TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
1620 TP_ARGS(wiphy, ret, cookie),
1621 TP_STRUCT__entry(
1622 WIPHY_ENTRY
1623 __field(int, ret)
1624 __field(u64, cookie)
1626 TP_fast_assign(
1627 WIPHY_ASSIGN;
1628 __entry->ret = ret;
1629 __entry->cookie = cookie;
1631 TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
1632 WIPHY_PR_ARG, __entry->ret, __entry->cookie)
1635 TRACE_EVENT(rdev_cancel_remain_on_channel,
1636 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
1637 TP_ARGS(wiphy, wdev, cookie),
1638 TP_STRUCT__entry(
1639 WIPHY_ENTRY
1640 WDEV_ENTRY
1641 __field(u64, cookie)
1643 TP_fast_assign(
1644 WIPHY_ASSIGN;
1645 WDEV_ASSIGN;
1646 __entry->cookie = cookie;
1648 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
1649 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1652 TRACE_EVENT(rdev_mgmt_tx,
1653 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1654 struct ieee80211_channel *chan, bool offchan,
1655 unsigned int wait, bool no_cck, bool dont_wait_for_ack),
1656 TP_ARGS(wiphy, wdev, chan, offchan, wait, no_cck, dont_wait_for_ack),
1657 TP_STRUCT__entry(
1658 WIPHY_ENTRY
1659 WDEV_ENTRY
1660 CHAN_ENTRY
1661 __field(bool, offchan)
1662 __field(unsigned int, wait)
1663 __field(bool, no_cck)
1664 __field(bool, dont_wait_for_ack)
1666 TP_fast_assign(
1667 WIPHY_ASSIGN;
1668 WDEV_ASSIGN;
1669 CHAN_ASSIGN(chan);
1670 __entry->offchan = offchan;
1671 __entry->wait = wait;
1672 __entry->no_cck = no_cck;
1673 __entry->dont_wait_for_ack = dont_wait_for_ack;
1675 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
1676 " wait: %u, no cck: %s, dont wait for ack: %s",
1677 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
1678 BOOL_TO_STR(__entry->offchan), __entry->wait,
1679 BOOL_TO_STR(__entry->no_cck),
1680 BOOL_TO_STR(__entry->dont_wait_for_ack))
1683 TRACE_EVENT(rdev_set_noack_map,
1684 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1685 u16 noack_map),
1686 TP_ARGS(wiphy, netdev, noack_map),
1687 TP_STRUCT__entry(
1688 WIPHY_ENTRY
1689 NETDEV_ENTRY
1690 __field(u16, noack_map)
1692 TP_fast_assign(
1693 WIPHY_ASSIGN;
1694 NETDEV_ASSIGN;
1695 __entry->noack_map = noack_map;
1697 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
1698 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
1701 TRACE_EVENT(rdev_get_et_sset_count,
1702 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int sset),
1703 TP_ARGS(wiphy, netdev, sset),
1704 TP_STRUCT__entry(
1705 WIPHY_ENTRY
1706 NETDEV_ENTRY
1707 __field(int, sset)
1709 TP_fast_assign(
1710 WIPHY_ASSIGN;
1711 NETDEV_ASSIGN;
1712 __entry->sset = sset;
1714 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", sset: %d",
1715 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sset)
1718 TRACE_EVENT(rdev_get_et_strings,
1719 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 sset),
1720 TP_ARGS(wiphy, netdev, sset),
1721 TP_STRUCT__entry(
1722 WIPHY_ENTRY
1723 NETDEV_ENTRY
1724 __field(u32, sset)
1726 TP_fast_assign(
1727 WIPHY_ASSIGN;
1728 NETDEV_ASSIGN;
1729 __entry->sset = sset;
1731 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", sset: %u",
1732 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sset)
1735 DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel,
1736 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1737 TP_ARGS(wiphy, wdev)
1740 TRACE_EVENT(rdev_return_chandef,
1741 TP_PROTO(struct wiphy *wiphy, int ret,
1742 struct cfg80211_chan_def *chandef),
1743 TP_ARGS(wiphy, ret, chandef),
1744 TP_STRUCT__entry(
1745 WIPHY_ENTRY
1746 __field(int, ret)
1747 CHAN_DEF_ENTRY
1749 TP_fast_assign(
1750 WIPHY_ASSIGN;
1751 if (ret == 0)
1752 CHAN_DEF_ASSIGN(chandef);
1753 else
1754 CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
1755 __entry->ret = ret;
1757 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
1758 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
1761 DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
1762 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1763 TP_ARGS(wiphy, wdev)
1766 DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
1767 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1768 TP_ARGS(wiphy, wdev)
1771 TRACE_EVENT(rdev_set_mac_acl,
1772 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1773 struct cfg80211_acl_data *params),
1774 TP_ARGS(wiphy, netdev, params),
1775 TP_STRUCT__entry(
1776 WIPHY_ENTRY
1777 NETDEV_ENTRY
1778 __field(u32, acl_policy)
1780 TP_fast_assign(
1781 WIPHY_ASSIGN;
1782 NETDEV_ASSIGN;
1783 __entry->acl_policy = params->acl_policy;
1785 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
1786 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
1789 TRACE_EVENT(rdev_update_ft_ies,
1790 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1791 struct cfg80211_update_ft_ies_params *ftie),
1792 TP_ARGS(wiphy, netdev, ftie),
1793 TP_STRUCT__entry(
1794 WIPHY_ENTRY
1795 NETDEV_ENTRY
1796 __field(u16, md)
1797 __dynamic_array(u8, ie, ftie->ie_len)
1799 TP_fast_assign(
1800 WIPHY_ASSIGN;
1801 NETDEV_ASSIGN;
1802 __entry->md = ftie->md;
1803 memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
1805 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
1806 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
1809 TRACE_EVENT(rdev_crit_proto_start,
1810 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1811 enum nl80211_crit_proto_id protocol, u16 duration),
1812 TP_ARGS(wiphy, wdev, protocol, duration),
1813 TP_STRUCT__entry(
1814 WIPHY_ENTRY
1815 WDEV_ENTRY
1816 __field(u16, proto)
1817 __field(u16, duration)
1819 TP_fast_assign(
1820 WIPHY_ASSIGN;
1821 WDEV_ASSIGN;
1822 __entry->proto = protocol;
1823 __entry->duration = duration;
1825 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
1826 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
1829 TRACE_EVENT(rdev_crit_proto_stop,
1830 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1831 TP_ARGS(wiphy, wdev),
1832 TP_STRUCT__entry(
1833 WIPHY_ENTRY
1834 WDEV_ENTRY
1836 TP_fast_assign(
1837 WIPHY_ASSIGN;
1838 WDEV_ASSIGN;
1840 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
1841 WIPHY_PR_ARG, WDEV_PR_ARG)
1844 /*************************************************************
1845 * cfg80211 exported functions traces *
1846 *************************************************************/
1848 TRACE_EVENT(cfg80211_return_bool,
1849 TP_PROTO(bool ret),
1850 TP_ARGS(ret),
1851 TP_STRUCT__entry(
1852 __field(bool, ret)
1854 TP_fast_assign(
1855 __entry->ret = ret;
1857 TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
1860 DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
1861 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
1862 TP_ARGS(netdev, macaddr),
1863 TP_STRUCT__entry(
1864 NETDEV_ENTRY
1865 MAC_ENTRY(macaddr)
1867 TP_fast_assign(
1868 NETDEV_ASSIGN;
1869 MAC_ASSIGN(macaddr, macaddr);
1871 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
1872 NETDEV_PR_ARG, MAC_PR_ARG(macaddr))
1875 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
1876 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
1877 TP_ARGS(netdev, macaddr)
1880 DECLARE_EVENT_CLASS(netdev_evt_only,
1881 TP_PROTO(struct net_device *netdev),
1882 TP_ARGS(netdev),
1883 TP_STRUCT__entry(
1884 NETDEV_ENTRY
1886 TP_fast_assign(
1887 NETDEV_ASSIGN;
1889 TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
1892 DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
1893 TP_PROTO(struct net_device *netdev),
1894 TP_ARGS(netdev)
1897 TRACE_EVENT(cfg80211_send_rx_assoc,
1898 TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss),
1899 TP_ARGS(netdev, bss),
1900 TP_STRUCT__entry(
1901 NETDEV_ENTRY
1902 MAC_ENTRY(bssid)
1903 CHAN_ENTRY
1905 TP_fast_assign(
1906 NETDEV_ASSIGN;
1907 MAC_ASSIGN(bssid, bss->bssid);
1908 CHAN_ASSIGN(bss->channel);
1910 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT,
1911 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
1914 DECLARE_EVENT_CLASS(netdev_frame_event,
1915 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
1916 TP_ARGS(netdev, buf, len),
1917 TP_STRUCT__entry(
1918 NETDEV_ENTRY
1919 __dynamic_array(u8, frame, len)
1921 TP_fast_assign(
1922 NETDEV_ASSIGN;
1923 memcpy(__get_dynamic_array(frame), buf, len);
1925 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
1926 NETDEV_PR_ARG,
1927 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
1930 DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
1931 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
1932 TP_ARGS(netdev, buf, len)
1935 DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
1936 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
1937 TP_ARGS(netdev, buf, len)
1940 TRACE_EVENT(cfg80211_tx_mlme_mgmt,
1941 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
1942 TP_ARGS(netdev, buf, len),
1943 TP_STRUCT__entry(
1944 NETDEV_ENTRY
1945 __dynamic_array(u8, frame, len)
1947 TP_fast_assign(
1948 NETDEV_ASSIGN;
1949 memcpy(__get_dynamic_array(frame), buf, len);
1951 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
1952 NETDEV_PR_ARG,
1953 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
1956 DECLARE_EVENT_CLASS(netdev_mac_evt,
1957 TP_PROTO(struct net_device *netdev, const u8 *mac),
1958 TP_ARGS(netdev, mac),
1959 TP_STRUCT__entry(
1960 NETDEV_ENTRY
1961 MAC_ENTRY(mac)
1963 TP_fast_assign(
1964 NETDEV_ASSIGN;
1965 MAC_ASSIGN(mac, mac)
1967 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
1968 NETDEV_PR_ARG, MAC_PR_ARG(mac))
1971 DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
1972 TP_PROTO(struct net_device *netdev, const u8 *mac),
1973 TP_ARGS(netdev, mac)
1976 DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout,
1977 TP_PROTO(struct net_device *netdev, const u8 *mac),
1978 TP_ARGS(netdev, mac)
1981 TRACE_EVENT(cfg80211_michael_mic_failure,
1982 TP_PROTO(struct net_device *netdev, const u8 *addr,
1983 enum nl80211_key_type key_type, int key_id, const u8 *tsc),
1984 TP_ARGS(netdev, addr, key_type, key_id, tsc),
1985 TP_STRUCT__entry(
1986 NETDEV_ENTRY
1987 MAC_ENTRY(addr)
1988 __field(enum nl80211_key_type, key_type)
1989 __field(int, key_id)
1990 __array(u8, tsc, 6)
1992 TP_fast_assign(
1993 NETDEV_ASSIGN;
1994 MAC_ASSIGN(addr, addr);
1995 __entry->key_type = key_type;
1996 __entry->key_id = key_id;
1997 memcpy(__entry->tsc, tsc, 6);
1999 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
2000 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,
2001 __entry->key_id, __entry->tsc)
2004 TRACE_EVENT(cfg80211_ready_on_channel,
2005 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2006 struct ieee80211_channel *chan,
2007 unsigned int duration),
2008 TP_ARGS(wdev, cookie, chan, duration),
2009 TP_STRUCT__entry(
2010 WDEV_ENTRY
2011 __field(u64, cookie)
2012 CHAN_ENTRY
2013 __field(unsigned int, duration)
2015 TP_fast_assign(
2016 WDEV_ASSIGN;
2017 __entry->cookie = cookie;
2018 CHAN_ASSIGN(chan);
2019 __entry->duration = duration;
2021 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
2022 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
2023 __entry->duration)
2026 TRACE_EVENT(cfg80211_ready_on_channel_expired,
2027 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2028 struct ieee80211_channel *chan),
2029 TP_ARGS(wdev, cookie, chan),
2030 TP_STRUCT__entry(
2031 WDEV_ENTRY
2032 __field(u64, cookie)
2033 CHAN_ENTRY
2035 TP_fast_assign(
2036 WDEV_ASSIGN;
2037 __entry->cookie = cookie;
2038 CHAN_ASSIGN(chan);
2040 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
2041 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
2044 TRACE_EVENT(cfg80211_new_sta,
2045 TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
2046 struct station_info *sinfo),
2047 TP_ARGS(netdev, mac_addr, sinfo),
2048 TP_STRUCT__entry(
2049 NETDEV_ENTRY
2050 MAC_ENTRY(mac_addr)
2051 SINFO_ENTRY
2053 TP_fast_assign(
2054 NETDEV_ASSIGN;
2055 MAC_ASSIGN(mac_addr, mac_addr);
2056 SINFO_ASSIGN;
2058 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT,
2059 NETDEV_PR_ARG, MAC_PR_ARG(mac_addr))
2062 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
2063 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2064 TP_ARGS(netdev, macaddr)
2067 TRACE_EVENT(cfg80211_rx_mgmt,
2068 TP_PROTO(struct wireless_dev *wdev, int freq, int sig_mbm),
2069 TP_ARGS(wdev, freq, sig_mbm),
2070 TP_STRUCT__entry(
2071 WDEV_ENTRY
2072 __field(int, freq)
2073 __field(int, sig_mbm)
2075 TP_fast_assign(
2076 WDEV_ASSIGN;
2077 __entry->freq = freq;
2078 __entry->sig_mbm = sig_mbm;
2080 TP_printk(WDEV_PR_FMT ", freq: %d, sig mbm: %d",
2081 WDEV_PR_ARG, __entry->freq, __entry->sig_mbm)
2084 TRACE_EVENT(cfg80211_mgmt_tx_status,
2085 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
2086 TP_ARGS(wdev, cookie, ack),
2087 TP_STRUCT__entry(
2088 WDEV_ENTRY
2089 __field(u64, cookie)
2090 __field(bool, ack)
2092 TP_fast_assign(
2093 WDEV_ASSIGN;
2094 __entry->cookie = cookie;
2095 __entry->ack = ack;
2097 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
2098 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
2101 TRACE_EVENT(cfg80211_cqm_rssi_notify,
2102 TP_PROTO(struct net_device *netdev,
2103 enum nl80211_cqm_rssi_threshold_event rssi_event),
2104 TP_ARGS(netdev, rssi_event),
2105 TP_STRUCT__entry(
2106 NETDEV_ENTRY
2107 __field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
2109 TP_fast_assign(
2110 NETDEV_ASSIGN;
2111 __entry->rssi_event = rssi_event;
2113 TP_printk(NETDEV_PR_FMT ", rssi event: %d",
2114 NETDEV_PR_ARG, __entry->rssi_event)
2117 TRACE_EVENT(cfg80211_reg_can_beacon,
2118 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2119 TP_ARGS(wiphy, chandef),
2120 TP_STRUCT__entry(
2121 WIPHY_ENTRY
2122 CHAN_DEF_ENTRY
2124 TP_fast_assign(
2125 WIPHY_ASSIGN;
2126 CHAN_DEF_ASSIGN(chandef);
2128 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2129 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2132 TRACE_EVENT(cfg80211_chandef_dfs_required,
2133 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2134 TP_ARGS(wiphy, chandef),
2135 TP_STRUCT__entry(
2136 WIPHY_ENTRY
2137 CHAN_DEF_ENTRY
2139 TP_fast_assign(
2140 WIPHY_ASSIGN;
2141 CHAN_DEF_ASSIGN(chandef);
2143 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2144 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2147 TRACE_EVENT(cfg80211_ch_switch_notify,
2148 TP_PROTO(struct net_device *netdev,
2149 struct cfg80211_chan_def *chandef),
2150 TP_ARGS(netdev, chandef),
2151 TP_STRUCT__entry(
2152 NETDEV_ENTRY
2153 CHAN_DEF_ENTRY
2155 TP_fast_assign(
2156 NETDEV_ASSIGN;
2157 CHAN_DEF_ASSIGN(chandef);
2159 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2160 NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2163 TRACE_EVENT(cfg80211_radar_event,
2164 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2165 TP_ARGS(wiphy, chandef),
2166 TP_STRUCT__entry(
2167 WIPHY_ENTRY
2168 CHAN_DEF_ENTRY
2170 TP_fast_assign(
2171 WIPHY_ASSIGN;
2172 CHAN_DEF_ASSIGN(chandef);
2174 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2175 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2178 TRACE_EVENT(cfg80211_cac_event,
2179 TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt),
2180 TP_ARGS(netdev, evt),
2181 TP_STRUCT__entry(
2182 NETDEV_ENTRY
2183 __field(enum nl80211_radar_event, evt)
2185 TP_fast_assign(
2186 NETDEV_ASSIGN;
2187 __entry->evt = evt;
2189 TP_printk(NETDEV_PR_FMT ", event: %d",
2190 NETDEV_PR_ARG, __entry->evt)
2193 DECLARE_EVENT_CLASS(cfg80211_rx_evt,
2194 TP_PROTO(struct net_device *netdev, const u8 *addr),
2195 TP_ARGS(netdev, addr),
2196 TP_STRUCT__entry(
2197 NETDEV_ENTRY
2198 MAC_ENTRY(addr)
2200 TP_fast_assign(
2201 NETDEV_ASSIGN;
2202 MAC_ASSIGN(addr, addr);
2204 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
2207 DEFINE_EVENT(cfg80211_rx_evt, cfg80211_ibss_joined,
2208 TP_PROTO(struct net_device *netdev, const u8 *addr),
2209 TP_ARGS(netdev, addr)
2212 DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
2213 TP_PROTO(struct net_device *netdev, const u8 *addr),
2214 TP_ARGS(netdev, addr)
2217 DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
2218 TP_PROTO(struct net_device *netdev, const u8 *addr),
2219 TP_ARGS(netdev, addr)
2222 TRACE_EVENT(cfg80211_probe_status,
2223 TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
2224 bool acked),
2225 TP_ARGS(netdev, addr, cookie, acked),
2226 TP_STRUCT__entry(
2227 NETDEV_ENTRY
2228 MAC_ENTRY(addr)
2229 __field(u64, cookie)
2230 __field(bool, acked)
2232 TP_fast_assign(
2233 NETDEV_ASSIGN;
2234 MAC_ASSIGN(addr, addr);
2235 __entry->cookie = cookie;
2236 __entry->acked = acked;
2238 TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
2239 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
2240 BOOL_TO_STR(__entry->acked))
2243 TRACE_EVENT(cfg80211_cqm_pktloss_notify,
2244 TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
2245 TP_ARGS(netdev, peer, num_packets),
2246 TP_STRUCT__entry(
2247 NETDEV_ENTRY
2248 MAC_ENTRY(peer)
2249 __field(u32, num_packets)
2251 TP_fast_assign(
2252 NETDEV_ASSIGN;
2253 MAC_ASSIGN(peer, peer);
2254 __entry->num_packets = num_packets;
2256 TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u",
2257 NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets)
2260 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
2261 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2262 TP_ARGS(netdev, macaddr)
2265 TRACE_EVENT(cfg80211_pmksa_candidate_notify,
2266 TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
2267 bool preauth),
2268 TP_ARGS(netdev, index, bssid, preauth),
2269 TP_STRUCT__entry(
2270 NETDEV_ENTRY
2271 __field(int, index)
2272 MAC_ENTRY(bssid)
2273 __field(bool, preauth)
2275 TP_fast_assign(
2276 NETDEV_ASSIGN;
2277 __entry->index = index;
2278 MAC_ASSIGN(bssid, bssid);
2279 __entry->preauth = preauth;
2281 TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s",
2282 NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid),
2283 BOOL_TO_STR(__entry->preauth))
2286 TRACE_EVENT(cfg80211_report_obss_beacon,
2287 TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
2288 int freq, int sig_dbm),
2289 TP_ARGS(wiphy, frame, len, freq, sig_dbm),
2290 TP_STRUCT__entry(
2291 WIPHY_ENTRY
2292 __field(int, freq)
2293 __field(int, sig_dbm)
2295 TP_fast_assign(
2296 WIPHY_ASSIGN;
2297 __entry->freq = freq;
2298 __entry->sig_dbm = sig_dbm;
2300 TP_printk(WIPHY_PR_FMT ", freq: %d, sig_dbm: %d",
2301 WIPHY_PR_ARG, __entry->freq, __entry->sig_dbm)
2304 TRACE_EVENT(cfg80211_tdls_oper_request,
2305 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
2306 enum nl80211_tdls_operation oper, u16 reason_code),
2307 TP_ARGS(wiphy, netdev, peer, oper, reason_code),
2308 TP_STRUCT__entry(
2309 WIPHY_ENTRY
2310 NETDEV_ENTRY
2311 MAC_ENTRY(peer)
2312 __field(enum nl80211_tdls_operation, oper)
2313 __field(u16, reason_code)
2315 TP_fast_assign(
2316 WIPHY_ASSIGN;
2317 NETDEV_ASSIGN;
2318 MAC_ASSIGN(peer, peer);
2319 __entry->oper = oper;
2320 __entry->reason_code = reason_code;
2322 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u",
2323 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper,
2324 __entry->reason_code)
2327 TRACE_EVENT(cfg80211_scan_done,
2328 TP_PROTO(struct cfg80211_scan_request *request, bool aborted),
2329 TP_ARGS(request, aborted),
2330 TP_STRUCT__entry(
2331 __field(u32, n_channels)
2332 __dynamic_array(u8, ie, request ? request->ie_len : 0)
2333 __array(u32, rates, IEEE80211_NUM_BANDS)
2334 __field(u32, wdev_id)
2335 MAC_ENTRY(wiphy_mac)
2336 __field(bool, no_cck)
2337 __field(bool, aborted)
2339 TP_fast_assign(
2340 if (request) {
2341 memcpy(__get_dynamic_array(ie), request->ie,
2342 request->ie_len);
2343 memcpy(__entry->rates, request->rates,
2344 IEEE80211_NUM_BANDS);
2345 __entry->wdev_id = request->wdev ?
2346 request->wdev->identifier : 0;
2347 if (request->wiphy)
2348 MAC_ASSIGN(wiphy_mac,
2349 request->wiphy->perm_addr);
2350 __entry->no_cck = request->no_cck;
2352 __entry->aborted = aborted;
2354 TP_printk("aborted: %s", BOOL_TO_STR(__entry->aborted))
2357 DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_results,
2358 TP_PROTO(struct wiphy *wiphy),
2359 TP_ARGS(wiphy)
2362 DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_stopped,
2363 TP_PROTO(struct wiphy *wiphy),
2364 TP_ARGS(wiphy)
2367 TRACE_EVENT(cfg80211_get_bss,
2368 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
2369 const u8 *bssid, const u8 *ssid, size_t ssid_len,
2370 u16 capa_mask, u16 capa_val),
2371 TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, capa_mask, capa_val),
2372 TP_STRUCT__entry(
2373 WIPHY_ENTRY
2374 CHAN_ENTRY
2375 MAC_ENTRY(bssid)
2376 __dynamic_array(u8, ssid, ssid_len)
2377 __field(u16, capa_mask)
2378 __field(u16, capa_val)
2380 TP_fast_assign(
2381 WIPHY_ASSIGN;
2382 CHAN_ASSIGN(channel);
2383 MAC_ASSIGN(bssid, bssid);
2384 memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
2385 __entry->capa_mask = capa_mask;
2386 __entry->capa_val = capa_val;
2388 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT ", buf: %#.2x, "
2389 "capa_mask: %d, capa_val: %u", WIPHY_PR_ARG, CHAN_PR_ARG,
2390 MAC_PR_ARG(bssid), ((u8 *)__get_dynamic_array(ssid))[0],
2391 __entry->capa_mask, __entry->capa_val)
2394 TRACE_EVENT(cfg80211_inform_bss_frame,
2395 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
2396 struct ieee80211_mgmt *mgmt, size_t len,
2397 s32 signal),
2398 TP_ARGS(wiphy, channel, mgmt, len, signal),
2399 TP_STRUCT__entry(
2400 WIPHY_ENTRY
2401 CHAN_ENTRY
2402 __dynamic_array(u8, mgmt, len)
2403 __field(s32, signal)
2405 TP_fast_assign(
2406 WIPHY_ASSIGN;
2407 CHAN_ASSIGN(channel);
2408 if (mgmt)
2409 memcpy(__get_dynamic_array(mgmt), mgmt, len);
2410 __entry->signal = signal;
2412 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT "signal: %d",
2413 WIPHY_PR_ARG, CHAN_PR_ARG, __entry->signal)
2416 DECLARE_EVENT_CLASS(cfg80211_bss_evt,
2417 TP_PROTO(struct cfg80211_bss *pub),
2418 TP_ARGS(pub),
2419 TP_STRUCT__entry(
2420 MAC_ENTRY(bssid)
2421 CHAN_ENTRY
2423 TP_fast_assign(
2424 MAC_ASSIGN(bssid, pub->bssid);
2425 CHAN_ASSIGN(pub->channel);
2427 TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2430 DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
2431 TP_PROTO(struct cfg80211_bss *pub),
2432 TP_ARGS(pub)
2435 TRACE_EVENT(cfg80211_return_uint,
2436 TP_PROTO(unsigned int ret),
2437 TP_ARGS(ret),
2438 TP_STRUCT__entry(
2439 __field(unsigned int, ret)
2441 TP_fast_assign(
2442 __entry->ret = ret;
2444 TP_printk("ret: %d", __entry->ret)
2447 TRACE_EVENT(cfg80211_return_u32,
2448 TP_PROTO(u32 ret),
2449 TP_ARGS(ret),
2450 TP_STRUCT__entry(
2451 __field(u32, ret)
2453 TP_fast_assign(
2454 __entry->ret = ret;
2456 TP_printk("ret: %u", __entry->ret)
2459 TRACE_EVENT(cfg80211_report_wowlan_wakeup,
2460 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2461 struct cfg80211_wowlan_wakeup *wakeup),
2462 TP_ARGS(wiphy, wdev, wakeup),
2463 TP_STRUCT__entry(
2464 WIPHY_ENTRY
2465 WDEV_ENTRY
2466 __field(bool, non_wireless)
2467 __field(bool, disconnect)
2468 __field(bool, magic_pkt)
2469 __field(bool, gtk_rekey_failure)
2470 __field(bool, eap_identity_req)
2471 __field(bool, four_way_handshake)
2472 __field(bool, rfkill_release)
2473 __field(s32, pattern_idx)
2474 __field(u32, packet_len)
2475 __dynamic_array(u8, packet,
2476 wakeup ? wakeup->packet_present_len : 0)
2478 TP_fast_assign(
2479 WIPHY_ASSIGN;
2480 WDEV_ASSIGN;
2481 __entry->non_wireless = !wakeup;
2482 __entry->disconnect = wakeup ? wakeup->disconnect : false;
2483 __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
2484 __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
2485 __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
2486 __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
2487 __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
2488 __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
2489 __entry->packet_len = wakeup ? wakeup->packet_len : false;
2490 if (wakeup && wakeup->packet && wakeup->packet_present_len)
2491 memcpy(__get_dynamic_array(packet), wakeup->packet,
2492 wakeup->packet_present_len);
2494 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
2497 TRACE_EVENT(cfg80211_ft_event,
2498 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2499 struct cfg80211_ft_event_params *ft_event),
2500 TP_ARGS(wiphy, netdev, ft_event),
2501 TP_STRUCT__entry(
2502 WIPHY_ENTRY
2503 NETDEV_ENTRY
2504 __dynamic_array(u8, ies, ft_event->ies_len)
2505 MAC_ENTRY(target_ap)
2506 __dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
2508 TP_fast_assign(
2509 WIPHY_ASSIGN;
2510 NETDEV_ASSIGN;
2511 if (ft_event->ies)
2512 memcpy(__get_dynamic_array(ies), ft_event->ies,
2513 ft_event->ies_len);
2514 MAC_ASSIGN(target_ap, ft_event->target_ap);
2515 if (ft_event->ric_ies)
2516 memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
2517 ft_event->ric_ies_len);
2519 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT,
2520 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
2523 #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
2525 #undef TRACE_INCLUDE_PATH
2526 #define TRACE_INCLUDE_PATH .
2527 #undef TRACE_INCLUDE_FILE
2528 #define TRACE_INCLUDE_FILE trace
2529 #include <trace/define_trace.h>