toshiba_acpi: Add alternative keymap support for Satellite M840
[linux/fpc-iii.git] / net / wireless / trace.h
blobaabccf13e07b6860ef92ddc637a7879a8f961aab
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 #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); \
209 } while (0)
211 /*************************************************************
212 * rdev->ops traces *
213 *************************************************************/
215 TRACE_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)
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;
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)
253 TRACE_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)
260 TP_fast_assign(
261 WIPHY_ASSIGN;
262 __entry->ret = ret;
264 TP_printk(WIPHY_PR_FMT ", returned: %d", WIPHY_PR_ARG, __entry->ret)
267 TRACE_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
273 TP_fast_assign(
274 WIPHY_ASSIGN;
276 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
279 DECLARE_EVENT_CLASS(wiphy_only_evt,
280 TP_PROTO(struct wiphy *wiphy),
281 TP_ARGS(wiphy),
282 TP_STRUCT__entry(
283 WIPHY_ENTRY
285 TP_fast_assign(
286 WIPHY_ASSIGN;
288 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
291 DEFINE_EVENT(wiphy_only_evt, rdev_resume,
292 TP_PROTO(struct wiphy *wiphy),
293 TP_ARGS(wiphy)
296 DEFINE_EVENT(wiphy_only_evt, rdev_return_void,
297 TP_PROTO(struct wiphy *wiphy),
298 TP_ARGS(wiphy)
301 DEFINE_EVENT(wiphy_only_evt, rdev_get_ringparam,
302 TP_PROTO(struct wiphy *wiphy),
303 TP_ARGS(wiphy)
306 DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna,
307 TP_PROTO(struct wiphy *wiphy),
308 TP_ARGS(wiphy)
311 DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll,
312 TP_PROTO(struct wiphy *wiphy),
313 TP_ARGS(wiphy)
316 DECLARE_EVENT_CLASS(wiphy_enabled_evt,
317 TP_PROTO(struct wiphy *wiphy, bool enabled),
318 TP_ARGS(wiphy, enabled),
319 TP_STRUCT__entry(
320 WIPHY_ENTRY
321 __field(bool, enabled)
323 TP_fast_assign(
324 WIPHY_ASSIGN;
325 __entry->enabled = enabled;
327 TP_printk(WIPHY_PR_FMT ", %senabled ",
328 WIPHY_PR_ARG, __entry->enabled ? "" : "not ")
331 DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup,
332 TP_PROTO(struct wiphy *wiphy, bool enabled),
333 TP_ARGS(wiphy, enabled)
336 TRACE_EVENT(rdev_add_virtual_intf,
337 TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type),
338 TP_ARGS(wiphy, name, type),
339 TP_STRUCT__entry(
340 WIPHY_ENTRY
341 __string(vir_intf_name, name ? name : "<noname>")
342 __field(enum nl80211_iftype, type)
344 TP_fast_assign(
345 WIPHY_ASSIGN;
346 __assign_str(vir_intf_name, name ? name : "<noname>");
347 __entry->type = type;
349 TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d",
350 WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type)
353 DECLARE_EVENT_CLASS(wiphy_wdev_evt,
354 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
355 TP_ARGS(wiphy, wdev),
356 TP_STRUCT__entry(
357 WIPHY_ENTRY
358 WDEV_ENTRY
360 TP_fast_assign(
361 WIPHY_ASSIGN;
362 WDEV_ASSIGN;
364 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
367 DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev,
368 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
369 TP_ARGS(wiphy, wdev)
372 DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf,
373 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
374 TP_ARGS(wiphy, wdev)
377 TRACE_EVENT(rdev_change_virtual_intf,
378 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
379 enum nl80211_iftype type),
380 TP_ARGS(wiphy, netdev, type),
381 TP_STRUCT__entry(
382 WIPHY_ENTRY
383 NETDEV_ENTRY
384 __field(enum nl80211_iftype, type)
386 TP_fast_assign(
387 WIPHY_ASSIGN;
388 NETDEV_ASSIGN;
389 __entry->type = type;
391 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", type: %d",
392 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type)
395 DECLARE_EVENT_CLASS(key_handle,
396 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
397 bool pairwise, const u8 *mac_addr),
398 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr),
399 TP_STRUCT__entry(
400 WIPHY_ENTRY
401 NETDEV_ENTRY
402 MAC_ENTRY(mac_addr)
403 __field(u8, key_index)
404 __field(bool, pairwise)
406 TP_fast_assign(
407 WIPHY_ASSIGN;
408 NETDEV_ASSIGN;
409 MAC_ASSIGN(mac_addr, mac_addr);
410 __entry->key_index = key_index;
411 __entry->pairwise = pairwise;
413 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key_index: %u, pairwise: %s, mac addr: " MAC_PR_FMT,
414 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
415 BOOL_TO_STR(__entry->pairwise), MAC_PR_ARG(mac_addr))
418 DEFINE_EVENT(key_handle, rdev_add_key,
419 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
420 bool pairwise, const u8 *mac_addr),
421 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
424 DEFINE_EVENT(key_handle, rdev_get_key,
425 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
426 bool pairwise, const u8 *mac_addr),
427 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
430 DEFINE_EVENT(key_handle, rdev_del_key,
431 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
432 bool pairwise, const u8 *mac_addr),
433 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
436 TRACE_EVENT(rdev_set_default_key,
437 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
438 bool unicast, bool multicast),
439 TP_ARGS(wiphy, netdev, key_index, unicast, multicast),
440 TP_STRUCT__entry(
441 WIPHY_ENTRY
442 NETDEV_ENTRY
443 __field(u8, key_index)
444 __field(bool, unicast)
445 __field(bool, multicast)
447 TP_fast_assign(
448 WIPHY_ASSIGN;
449 NETDEV_ASSIGN;
450 __entry->key_index = key_index;
451 __entry->unicast = unicast;
452 __entry->multicast = multicast;
454 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u, unicast: %s, multicast: %s",
455 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
456 BOOL_TO_STR(__entry->unicast),
457 BOOL_TO_STR(__entry->multicast))
460 TRACE_EVENT(rdev_set_default_mgmt_key,
461 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
462 TP_ARGS(wiphy, netdev, key_index),
463 TP_STRUCT__entry(
464 WIPHY_ENTRY
465 NETDEV_ENTRY
466 __field(u8, key_index)
468 TP_fast_assign(
469 WIPHY_ASSIGN;
470 NETDEV_ASSIGN;
471 __entry->key_index = key_index;
473 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
474 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
477 TRACE_EVENT(rdev_start_ap,
478 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
479 struct cfg80211_ap_settings *settings),
480 TP_ARGS(wiphy, netdev, settings),
481 TP_STRUCT__entry(
482 WIPHY_ENTRY
483 NETDEV_ENTRY
484 CHAN_DEF_ENTRY
485 __field(int, beacon_interval)
486 __field(int, dtim_period)
487 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
488 __field(enum nl80211_hidden_ssid, hidden_ssid)
489 __field(u32, wpa_ver)
490 __field(bool, privacy)
491 __field(enum nl80211_auth_type, auth_type)
492 __field(int, inactivity_timeout)
494 TP_fast_assign(
495 WIPHY_ASSIGN;
496 NETDEV_ASSIGN;
497 CHAN_DEF_ASSIGN(&settings->chandef);
498 __entry->beacon_interval = settings->beacon_interval;
499 __entry->dtim_period = settings->dtim_period;
500 __entry->hidden_ssid = settings->hidden_ssid;
501 __entry->wpa_ver = settings->crypto.wpa_versions;
502 __entry->privacy = settings->privacy;
503 __entry->auth_type = settings->auth_type;
504 __entry->inactivity_timeout = settings->inactivity_timeout;
505 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
506 memcpy(__entry->ssid, settings->ssid, settings->ssid_len);
508 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", AP settings - ssid: %s, "
509 CHAN_DEF_PR_FMT ", beacon interval: %d, dtim period: %d, "
510 "hidden ssid: %d, wpa versions: %u, privacy: %s, "
511 "auth type: %d, inactivity timeout: %d",
512 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_DEF_PR_ARG,
513 __entry->beacon_interval, __entry->dtim_period,
514 __entry->hidden_ssid, __entry->wpa_ver,
515 BOOL_TO_STR(__entry->privacy), __entry->auth_type,
516 __entry->inactivity_timeout)
519 TRACE_EVENT(rdev_change_beacon,
520 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
521 struct cfg80211_beacon_data *info),
522 TP_ARGS(wiphy, netdev, info),
523 TP_STRUCT__entry(
524 WIPHY_ENTRY
525 NETDEV_ENTRY
526 __dynamic_array(u8, head, info ? info->head_len : 0)
527 __dynamic_array(u8, tail, info ? info->tail_len : 0)
528 __dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0)
529 __dynamic_array(u8, proberesp_ies,
530 info ? info->proberesp_ies_len : 0)
531 __dynamic_array(u8, assocresp_ies,
532 info ? info->assocresp_ies_len : 0)
533 __dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0)
535 TP_fast_assign(
536 WIPHY_ASSIGN;
537 NETDEV_ASSIGN;
538 if (info) {
539 if (info->head)
540 memcpy(__get_dynamic_array(head), info->head,
541 info->head_len);
542 if (info->tail)
543 memcpy(__get_dynamic_array(tail), info->tail,
544 info->tail_len);
545 if (info->beacon_ies)
546 memcpy(__get_dynamic_array(beacon_ies),
547 info->beacon_ies, info->beacon_ies_len);
548 if (info->proberesp_ies)
549 memcpy(__get_dynamic_array(proberesp_ies),
550 info->proberesp_ies,
551 info->proberesp_ies_len);
552 if (info->assocresp_ies)
553 memcpy(__get_dynamic_array(assocresp_ies),
554 info->assocresp_ies,
555 info->assocresp_ies_len);
556 if (info->probe_resp)
557 memcpy(__get_dynamic_array(probe_resp),
558 info->probe_resp, info->probe_resp_len);
561 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
564 DECLARE_EVENT_CLASS(wiphy_netdev_evt,
565 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
566 TP_ARGS(wiphy, netdev),
567 TP_STRUCT__entry(
568 WIPHY_ENTRY
569 NETDEV_ENTRY
571 TP_fast_assign(
572 WIPHY_ASSIGN;
573 NETDEV_ASSIGN;
575 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
578 DEFINE_EVENT(wiphy_netdev_evt, rdev_stop_ap,
579 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
580 TP_ARGS(wiphy, netdev)
583 DEFINE_EVENT(wiphy_netdev_evt, rdev_get_et_stats,
584 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
585 TP_ARGS(wiphy, netdev)
588 DEFINE_EVENT(wiphy_netdev_evt, rdev_sched_scan_stop,
589 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
590 TP_ARGS(wiphy, netdev)
593 DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data,
594 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
595 TP_ARGS(wiphy, netdev)
598 DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config,
599 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
600 TP_ARGS(wiphy, netdev)
603 DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh,
604 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
605 TP_ARGS(wiphy, netdev)
608 DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ibss,
609 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
610 TP_ARGS(wiphy, netdev)
613 DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa,
614 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
615 TP_ARGS(wiphy, netdev)
618 DECLARE_EVENT_CLASS(station_add_change,
619 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
620 struct station_parameters *params),
621 TP_ARGS(wiphy, netdev, mac, params),
622 TP_STRUCT__entry(
623 WIPHY_ENTRY
624 NETDEV_ENTRY
625 MAC_ENTRY(sta_mac)
626 __field(u32, sta_flags_mask)
627 __field(u32, sta_flags_set)
628 __field(u32, sta_modify_mask)
629 __field(int, listen_interval)
630 __field(u16, aid)
631 __field(u8, plink_action)
632 __field(u8, plink_state)
633 __field(u8, uapsd_queues)
634 __array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap))
636 TP_fast_assign(
637 WIPHY_ASSIGN;
638 NETDEV_ASSIGN;
639 MAC_ASSIGN(sta_mac, mac);
640 __entry->sta_flags_mask = params->sta_flags_mask;
641 __entry->sta_flags_set = params->sta_flags_set;
642 __entry->sta_modify_mask = params->sta_modify_mask;
643 __entry->listen_interval = params->listen_interval;
644 __entry->aid = params->aid;
645 __entry->plink_action = params->plink_action;
646 __entry->plink_state = params->plink_state;
647 __entry->uapsd_queues = params->uapsd_queues;
648 memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap));
649 if (params->ht_capa)
650 memcpy(__entry->ht_capa, params->ht_capa,
651 sizeof(struct ieee80211_ht_cap));
653 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
654 ", station flags mask: %u, station flags set: %u, "
655 "station modify mask: %u, listen interval: %d, aid: %u, "
656 "plink action: %u, plink state: %u, uapsd queues: %u",
657 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
658 __entry->sta_flags_mask, __entry->sta_flags_set,
659 __entry->sta_modify_mask, __entry->listen_interval,
660 __entry->aid, __entry->plink_action, __entry->plink_state,
661 __entry->uapsd_queues)
664 DEFINE_EVENT(station_add_change, rdev_add_station,
665 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
666 struct station_parameters *params),
667 TP_ARGS(wiphy, netdev, mac, params)
670 DEFINE_EVENT(station_add_change, rdev_change_station,
671 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
672 struct station_parameters *params),
673 TP_ARGS(wiphy, netdev, mac, params)
676 DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
677 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
678 TP_ARGS(wiphy, netdev, mac),
679 TP_STRUCT__entry(
680 WIPHY_ENTRY
681 NETDEV_ENTRY
682 MAC_ENTRY(sta_mac)
684 TP_fast_assign(
685 WIPHY_ASSIGN;
686 NETDEV_ASSIGN;
687 MAC_ASSIGN(sta_mac, mac);
689 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
690 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac))
693 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_station,
694 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
695 TP_ARGS(wiphy, netdev, mac)
698 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station,
699 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
700 TP_ARGS(wiphy, netdev, mac)
703 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
704 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
705 TP_ARGS(wiphy, netdev, mac)
708 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer,
709 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
710 TP_ARGS(wiphy, netdev, mac)
713 TRACE_EVENT(rdev_dump_station,
714 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
715 u8 *mac),
716 TP_ARGS(wiphy, netdev, idx, mac),
717 TP_STRUCT__entry(
718 WIPHY_ENTRY
719 NETDEV_ENTRY
720 MAC_ENTRY(sta_mac)
721 __field(int, idx)
723 TP_fast_assign(
724 WIPHY_ASSIGN;
725 NETDEV_ASSIGN;
726 MAC_ASSIGN(sta_mac, mac);
727 __entry->idx = idx;
729 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d",
730 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
731 __entry->idx)
734 TRACE_EVENT(rdev_return_int_station_info,
735 TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo),
736 TP_ARGS(wiphy, ret, sinfo),
737 TP_STRUCT__entry(
738 WIPHY_ENTRY
739 __field(int, ret)
740 SINFO_ENTRY
742 TP_fast_assign(
743 WIPHY_ASSIGN;
744 __entry->ret = ret;
745 SINFO_ASSIGN;
747 TP_printk(WIPHY_PR_FMT ", returned %d" ,
748 WIPHY_PR_ARG, __entry->ret)
751 DECLARE_EVENT_CLASS(mpath_evt,
752 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
753 u8 *next_hop),
754 TP_ARGS(wiphy, netdev, dst, next_hop),
755 TP_STRUCT__entry(
756 WIPHY_ENTRY
757 NETDEV_ENTRY
758 MAC_ENTRY(dst)
759 MAC_ENTRY(next_hop)
761 TP_fast_assign(
762 WIPHY_ASSIGN;
763 NETDEV_ASSIGN;
764 MAC_ASSIGN(dst, dst);
765 MAC_ASSIGN(next_hop, next_hop);
767 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT,
768 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst),
769 MAC_PR_ARG(next_hop))
772 DEFINE_EVENT(mpath_evt, rdev_add_mpath,
773 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
774 u8 *next_hop),
775 TP_ARGS(wiphy, netdev, dst, next_hop)
778 DEFINE_EVENT(mpath_evt, rdev_change_mpath,
779 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
780 u8 *next_hop),
781 TP_ARGS(wiphy, netdev, dst, next_hop)
784 DEFINE_EVENT(mpath_evt, rdev_get_mpath,
785 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
786 u8 *next_hop),
787 TP_ARGS(wiphy, netdev, dst, next_hop)
790 TRACE_EVENT(rdev_dump_mpath,
791 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
792 u8 *dst, u8 *next_hop),
793 TP_ARGS(wiphy, netdev, idx, dst, next_hop),
794 TP_STRUCT__entry(
795 WIPHY_ENTRY
796 NETDEV_ENTRY
797 MAC_ENTRY(dst)
798 MAC_ENTRY(next_hop)
799 __field(int, idx)
801 TP_fast_assign(
802 WIPHY_ASSIGN;
803 NETDEV_ASSIGN;
804 MAC_ASSIGN(dst, dst);
805 MAC_ASSIGN(next_hop, next_hop);
806 __entry->idx = idx;
808 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
809 MAC_PR_FMT ", next hop: " MAC_PR_FMT,
810 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
811 MAC_PR_ARG(next_hop))
814 TRACE_EVENT(rdev_return_int_mpath_info,
815 TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo),
816 TP_ARGS(wiphy, ret, pinfo),
817 TP_STRUCT__entry(
818 WIPHY_ENTRY
819 __field(int, ret)
820 __field(int, generation)
821 __field(u32, filled)
822 __field(u32, frame_qlen)
823 __field(u32, sn)
824 __field(u32, metric)
825 __field(u32, exptime)
826 __field(u32, discovery_timeout)
827 __field(u8, discovery_retries)
828 __field(u8, flags)
830 TP_fast_assign(
831 WIPHY_ASSIGN;
832 __entry->ret = ret;
833 __entry->generation = pinfo->generation;
834 __entry->filled = pinfo->filled;
835 __entry->frame_qlen = pinfo->frame_qlen;
836 __entry->sn = pinfo->sn;
837 __entry->metric = pinfo->metric;
838 __entry->exptime = pinfo->exptime;
839 __entry->discovery_timeout = pinfo->discovery_timeout;
840 __entry->discovery_retries = pinfo->discovery_retries;
841 __entry->flags = pinfo->flags;
843 TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, "
844 "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
845 " discovery timeout: %u, discovery retries: %u, flags: %u",
846 WIPHY_PR_ARG, __entry->ret, __entry->generation,
847 __entry->filled, __entry->frame_qlen, __entry->sn,
848 __entry->metric, __entry->exptime, __entry->discovery_timeout,
849 __entry->discovery_retries, __entry->flags)
852 TRACE_EVENT(rdev_return_int_mesh_config,
853 TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf),
854 TP_ARGS(wiphy, ret, conf),
855 TP_STRUCT__entry(
856 WIPHY_ENTRY
857 MESH_CFG_ENTRY
858 __field(int, ret)
860 TP_fast_assign(
861 WIPHY_ASSIGN;
862 MESH_CFG_ASSIGN;
863 __entry->ret = ret;
865 TP_printk(WIPHY_PR_FMT ", returned: %d",
866 WIPHY_PR_ARG, __entry->ret)
869 TRACE_EVENT(rdev_update_mesh_config,
870 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
871 const struct mesh_config *conf),
872 TP_ARGS(wiphy, netdev, mask, conf),
873 TP_STRUCT__entry(
874 WIPHY_ENTRY
875 NETDEV_ENTRY
876 MESH_CFG_ENTRY
877 __field(u32, mask)
879 TP_fast_assign(
880 WIPHY_ASSIGN;
881 NETDEV_ASSIGN;
882 MESH_CFG_ASSIGN;
883 __entry->mask = mask;
885 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u",
886 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
889 TRACE_EVENT(rdev_join_mesh,
890 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
891 const struct mesh_config *conf,
892 const struct mesh_setup *setup),
893 TP_ARGS(wiphy, netdev, conf, setup),
894 TP_STRUCT__entry(
895 WIPHY_ENTRY
896 NETDEV_ENTRY
897 MESH_CFG_ENTRY
899 TP_fast_assign(
900 WIPHY_ASSIGN;
901 NETDEV_ASSIGN;
902 MESH_CFG_ASSIGN;
904 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
905 WIPHY_PR_ARG, NETDEV_PR_ARG)
908 TRACE_EVENT(rdev_change_bss,
909 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
910 struct bss_parameters *params),
911 TP_ARGS(wiphy, netdev, params),
912 TP_STRUCT__entry(
913 WIPHY_ENTRY
914 NETDEV_ENTRY
915 __field(int, use_cts_prot)
916 __field(int, use_short_preamble)
917 __field(int, use_short_slot_time)
918 __field(int, ap_isolate)
919 __field(int, ht_opmode)
921 TP_fast_assign(
922 WIPHY_ASSIGN;
923 NETDEV_ASSIGN;
924 __entry->use_cts_prot = params->use_cts_prot;
925 __entry->use_short_preamble = params->use_short_preamble;
926 __entry->use_short_slot_time = params->use_short_slot_time;
927 __entry->ap_isolate = params->ap_isolate;
928 __entry->ht_opmode = params->ht_opmode;
930 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, "
931 "use short preamble: %d, use short slot time: %d, "
932 "ap isolate: %d, ht opmode: %d",
933 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot,
934 __entry->use_short_preamble, __entry->use_short_slot_time,
935 __entry->ap_isolate, __entry->ht_opmode)
938 TRACE_EVENT(rdev_set_txq_params,
939 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
940 struct ieee80211_txq_params *params),
941 TP_ARGS(wiphy, netdev, params),
942 TP_STRUCT__entry(
943 WIPHY_ENTRY
944 NETDEV_ENTRY
945 __field(enum nl80211_ac, ac)
946 __field(u16, txop)
947 __field(u16, cwmin)
948 __field(u16, cwmax)
949 __field(u8, aifs)
951 TP_fast_assign(
952 WIPHY_ASSIGN;
953 NETDEV_ASSIGN;
954 __entry->ac = params->ac;
955 __entry->txop = params->txop;
956 __entry->cwmin = params->cwmin;
957 __entry->cwmax = params->cwmax;
958 __entry->aifs = params->aifs;
960 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u",
961 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop,
962 __entry->cwmin, __entry->cwmax, __entry->aifs)
965 TRACE_EVENT(rdev_libertas_set_mesh_channel,
966 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
967 struct ieee80211_channel *chan),
968 TP_ARGS(wiphy, netdev, chan),
969 TP_STRUCT__entry(
970 WIPHY_ENTRY
971 NETDEV_ENTRY
972 CHAN_ENTRY
974 TP_fast_assign(
975 WIPHY_ASSIGN;
976 NETDEV_ASSIGN;
977 CHAN_ASSIGN(chan);
979 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG,
980 NETDEV_PR_ARG, CHAN_PR_ARG)
983 TRACE_EVENT(rdev_set_monitor_channel,
984 TP_PROTO(struct wiphy *wiphy,
985 struct cfg80211_chan_def *chandef),
986 TP_ARGS(wiphy, chandef),
987 TP_STRUCT__entry(
988 WIPHY_ENTRY
989 CHAN_DEF_ENTRY
991 TP_fast_assign(
992 WIPHY_ASSIGN;
993 CHAN_DEF_ASSIGN(chandef);
995 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
996 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
999 TRACE_EVENT(rdev_auth,
1000 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1001 struct cfg80211_auth_request *req),
1002 TP_ARGS(wiphy, netdev, req),
1003 TP_STRUCT__entry(
1004 WIPHY_ENTRY
1005 NETDEV_ENTRY
1006 MAC_ENTRY(bssid)
1007 __field(enum nl80211_auth_type, auth_type)
1009 TP_fast_assign(
1010 WIPHY_ASSIGN;
1011 NETDEV_ASSIGN;
1012 if (req->bss)
1013 MAC_ASSIGN(bssid, req->bss->bssid);
1014 else
1015 memset(__entry->bssid, 0, ETH_ALEN);
1016 __entry->auth_type = req->auth_type;
1018 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT,
1019 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type,
1020 MAC_PR_ARG(bssid))
1023 TRACE_EVENT(rdev_assoc,
1024 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1025 struct cfg80211_assoc_request *req),
1026 TP_ARGS(wiphy, netdev, req),
1027 TP_STRUCT__entry(
1028 WIPHY_ENTRY
1029 NETDEV_ENTRY
1030 MAC_ENTRY(bssid)
1031 MAC_ENTRY(prev_bssid)
1032 __field(bool, use_mfp)
1033 __field(u32, flags)
1035 TP_fast_assign(
1036 WIPHY_ASSIGN;
1037 NETDEV_ASSIGN;
1038 if (req->bss)
1039 MAC_ASSIGN(bssid, req->bss->bssid);
1040 else
1041 memset(__entry->bssid, 0, ETH_ALEN);
1042 MAC_ASSIGN(prev_bssid, req->prev_bssid);
1043 __entry->use_mfp = req->use_mfp;
1044 __entry->flags = req->flags;
1046 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
1047 ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u",
1048 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1049 MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp),
1050 __entry->flags)
1053 TRACE_EVENT(rdev_deauth,
1054 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1055 struct cfg80211_deauth_request *req),
1056 TP_ARGS(wiphy, netdev, req),
1057 TP_STRUCT__entry(
1058 WIPHY_ENTRY
1059 NETDEV_ENTRY
1060 MAC_ENTRY(bssid)
1061 __field(u16, reason_code)
1063 TP_fast_assign(
1064 WIPHY_ASSIGN;
1065 NETDEV_ASSIGN;
1066 MAC_ASSIGN(bssid, req->bssid);
1067 __entry->reason_code = req->reason_code;
1069 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u",
1070 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1071 __entry->reason_code)
1074 TRACE_EVENT(rdev_disassoc,
1075 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1076 struct cfg80211_disassoc_request *req),
1077 TP_ARGS(wiphy, netdev, req),
1078 TP_STRUCT__entry(
1079 WIPHY_ENTRY
1080 NETDEV_ENTRY
1081 MAC_ENTRY(bssid)
1082 __field(u16, reason_code)
1083 __field(bool, local_state_change)
1085 TP_fast_assign(
1086 WIPHY_ASSIGN;
1087 NETDEV_ASSIGN;
1088 if (req->bss)
1089 MAC_ASSIGN(bssid, req->bss->bssid);
1090 else
1091 memset(__entry->bssid, 0, ETH_ALEN);
1092 __entry->reason_code = req->reason_code;
1093 __entry->local_state_change = req->local_state_change;
1095 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
1096 ", reason: %u, local state change: %s",
1097 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1098 __entry->reason_code,
1099 BOOL_TO_STR(__entry->local_state_change))
1102 TRACE_EVENT(rdev_mgmt_tx_cancel_wait,
1103 TP_PROTO(struct wiphy *wiphy,
1104 struct wireless_dev *wdev, u64 cookie),
1105 TP_ARGS(wiphy, wdev, cookie),
1106 TP_STRUCT__entry(
1107 WIPHY_ENTRY
1108 WDEV_ENTRY
1109 __field(u64, cookie)
1111 TP_fast_assign(
1112 WIPHY_ASSIGN;
1113 WDEV_ASSIGN;
1114 __entry->cookie = cookie;
1116 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ",
1117 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1120 TRACE_EVENT(rdev_set_power_mgmt,
1121 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1122 bool enabled, int timeout),
1123 TP_ARGS(wiphy, netdev, enabled, timeout),
1124 TP_STRUCT__entry(
1125 WIPHY_ENTRY
1126 NETDEV_ENTRY
1127 __field(bool, enabled)
1128 __field(int, timeout)
1130 TP_fast_assign(
1131 WIPHY_ASSIGN;
1132 NETDEV_ASSIGN;
1133 __entry->enabled = enabled;
1134 __entry->timeout = timeout;
1136 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ",
1137 WIPHY_PR_ARG, NETDEV_PR_ARG,
1138 __entry->enabled ? "" : "not ", __entry->timeout)
1141 TRACE_EVENT(rdev_connect,
1142 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1143 struct cfg80211_connect_params *sme),
1144 TP_ARGS(wiphy, netdev, sme),
1145 TP_STRUCT__entry(
1146 WIPHY_ENTRY
1147 NETDEV_ENTRY
1148 MAC_ENTRY(bssid)
1149 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1150 __field(enum nl80211_auth_type, auth_type)
1151 __field(bool, privacy)
1152 __field(u32, wpa_versions)
1153 __field(u32, flags)
1155 TP_fast_assign(
1156 WIPHY_ASSIGN;
1157 NETDEV_ASSIGN;
1158 MAC_ASSIGN(bssid, sme->bssid);
1159 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1160 memcpy(__entry->ssid, sme->ssid, sme->ssid_len);
1161 __entry->auth_type = sme->auth_type;
1162 __entry->privacy = sme->privacy;
1163 __entry->wpa_versions = sme->crypto.wpa_versions;
1164 __entry->flags = sme->flags;
1166 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
1167 ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
1168 "flags: %u",
1169 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid,
1170 __entry->auth_type, BOOL_TO_STR(__entry->privacy),
1171 __entry->wpa_versions, __entry->flags)
1174 TRACE_EVENT(rdev_set_cqm_rssi_config,
1175 TP_PROTO(struct wiphy *wiphy,
1176 struct net_device *netdev, s32 rssi_thold,
1177 u32 rssi_hyst),
1178 TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
1179 TP_STRUCT__entry(
1180 WIPHY_ENTRY
1181 NETDEV_ENTRY
1182 __field(s32, rssi_thold)
1183 __field(u32, rssi_hyst)
1185 TP_fast_assign(
1186 WIPHY_ASSIGN;
1187 NETDEV_ASSIGN;
1188 __entry->rssi_thold = rssi_thold;
1189 __entry->rssi_hyst = rssi_hyst;
1191 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
1192 ", rssi_thold: %d, rssi_hyst: %u ",
1193 WIPHY_PR_ARG, NETDEV_PR_ARG,
1194 __entry->rssi_thold, __entry->rssi_hyst)
1197 TRACE_EVENT(rdev_set_cqm_txe_config,
1198 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
1199 u32 pkts, u32 intvl),
1200 TP_ARGS(wiphy, netdev, rate, pkts, intvl),
1201 TP_STRUCT__entry(
1202 WIPHY_ENTRY
1203 NETDEV_ENTRY
1204 __field(u32, rate)
1205 __field(u32, pkts)
1206 __field(u32, intvl)
1208 TP_fast_assign(
1209 WIPHY_ASSIGN;
1210 NETDEV_ASSIGN;
1211 __entry->rate = rate;
1212 __entry->pkts = pkts;
1213 __entry->intvl = intvl;
1215 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
1216 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
1217 __entry->intvl)
1220 TRACE_EVENT(rdev_disconnect,
1221 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1222 u16 reason_code),
1223 TP_ARGS(wiphy, netdev, reason_code),
1224 TP_STRUCT__entry(
1225 WIPHY_ENTRY
1226 NETDEV_ENTRY
1227 __field(u16, reason_code)
1229 TP_fast_assign(
1230 WIPHY_ASSIGN;
1231 NETDEV_ASSIGN;
1232 __entry->reason_code = reason_code;
1234 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
1235 NETDEV_PR_ARG, __entry->reason_code)
1238 TRACE_EVENT(rdev_join_ibss,
1239 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1240 struct cfg80211_ibss_params *params),
1241 TP_ARGS(wiphy, netdev, params),
1242 TP_STRUCT__entry(
1243 WIPHY_ENTRY
1244 NETDEV_ENTRY
1245 MAC_ENTRY(bssid)
1246 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1248 TP_fast_assign(
1249 WIPHY_ASSIGN;
1250 NETDEV_ASSIGN;
1251 MAC_ASSIGN(bssid, params->bssid);
1252 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1253 memcpy(__entry->ssid, params->ssid, params->ssid_len);
1255 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s",
1256 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid)
1259 TRACE_EVENT(rdev_set_wiphy_params,
1260 TP_PROTO(struct wiphy *wiphy, u32 changed),
1261 TP_ARGS(wiphy, changed),
1262 TP_STRUCT__entry(
1263 WIPHY_ENTRY
1264 __field(u32, changed)
1266 TP_fast_assign(
1267 WIPHY_ASSIGN;
1268 __entry->changed = changed;
1270 TP_printk(WIPHY_PR_FMT ", changed: %u",
1271 WIPHY_PR_ARG, __entry->changed)
1274 DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power,
1275 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1276 TP_ARGS(wiphy, wdev)
1279 TRACE_EVENT(rdev_set_tx_power,
1280 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1281 enum nl80211_tx_power_setting type, int mbm),
1282 TP_ARGS(wiphy, wdev, type, mbm),
1283 TP_STRUCT__entry(
1284 WIPHY_ENTRY
1285 WDEV_ENTRY
1286 __field(enum nl80211_tx_power_setting, type)
1287 __field(int, mbm)
1289 TP_fast_assign(
1290 WIPHY_ASSIGN;
1291 WDEV_ASSIGN;
1292 __entry->type = type;
1293 __entry->mbm = mbm;
1295 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
1296 WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
1299 TRACE_EVENT(rdev_return_int_int,
1300 TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
1301 TP_ARGS(wiphy, func_ret, func_fill),
1302 TP_STRUCT__entry(
1303 WIPHY_ENTRY
1304 __field(int, func_ret)
1305 __field(int, func_fill)
1307 TP_fast_assign(
1308 WIPHY_ASSIGN;
1309 __entry->func_ret = func_ret;
1310 __entry->func_fill = func_fill;
1312 TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
1313 WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
1316 #ifdef CONFIG_NL80211_TESTMODE
1317 TRACE_EVENT(rdev_testmode_cmd,
1318 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1319 TP_ARGS(wiphy, wdev),
1320 TP_STRUCT__entry(
1321 WIPHY_ENTRY
1322 WDEV_ENTRY
1324 TP_fast_assign(
1325 WIPHY_ASSIGN;
1326 WDEV_ASSIGN;
1328 TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
1331 TRACE_EVENT(rdev_testmode_dump,
1332 TP_PROTO(struct wiphy *wiphy),
1333 TP_ARGS(wiphy),
1334 TP_STRUCT__entry(
1335 WIPHY_ENTRY
1337 TP_fast_assign(
1338 WIPHY_ASSIGN;
1340 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
1342 #endif /* CONFIG_NL80211_TESTMODE */
1344 TRACE_EVENT(rdev_set_bitrate_mask,
1345 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1346 const u8 *peer, const struct cfg80211_bitrate_mask *mask),
1347 TP_ARGS(wiphy, netdev, peer, mask),
1348 TP_STRUCT__entry(
1349 WIPHY_ENTRY
1350 NETDEV_ENTRY
1351 MAC_ENTRY(peer)
1353 TP_fast_assign(
1354 WIPHY_ASSIGN;
1355 NETDEV_ASSIGN;
1356 MAC_ASSIGN(peer, peer);
1358 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
1359 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1362 TRACE_EVENT(rdev_mgmt_frame_register,
1363 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1364 u16 frame_type, bool reg),
1365 TP_ARGS(wiphy, wdev, frame_type, reg),
1366 TP_STRUCT__entry(
1367 WIPHY_ENTRY
1368 WDEV_ENTRY
1369 __field(u16, frame_type)
1370 __field(bool, reg)
1372 TP_fast_assign(
1373 WIPHY_ASSIGN;
1374 WDEV_ASSIGN;
1375 __entry->frame_type = frame_type;
1376 __entry->reg = reg;
1378 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", frame_type: 0x%.2x, reg: %s ",
1379 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->frame_type,
1380 __entry->reg ? "true" : "false")
1383 TRACE_EVENT(rdev_return_int_tx_rx,
1384 TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
1385 TP_ARGS(wiphy, ret, tx, rx),
1386 TP_STRUCT__entry(
1387 WIPHY_ENTRY
1388 __field(int, ret)
1389 __field(u32, tx)
1390 __field(u32, rx)
1392 TP_fast_assign(
1393 WIPHY_ASSIGN;
1394 __entry->ret = ret;
1395 __entry->tx = tx;
1396 __entry->rx = rx;
1398 TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
1399 WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
1402 TRACE_EVENT(rdev_return_void_tx_rx,
1403 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
1404 u32 rx, u32 rx_max),
1405 TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
1406 TP_STRUCT__entry(
1407 WIPHY_ENTRY
1408 __field(u32, tx)
1409 __field(u32, tx_max)
1410 __field(u32, rx)
1411 __field(u32, rx_max)
1413 TP_fast_assign(
1414 WIPHY_ASSIGN;
1415 __entry->tx = tx;
1416 __entry->tx_max = tx_max;
1417 __entry->rx = rx;
1418 __entry->rx_max = rx_max;
1420 TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
1421 WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
1422 __entry->rx_max)
1425 DECLARE_EVENT_CLASS(tx_rx_evt,
1426 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1427 TP_ARGS(wiphy, rx, tx),
1428 TP_STRUCT__entry(
1429 WIPHY_ENTRY
1430 __field(u32, tx)
1431 __field(u32, rx)
1433 TP_fast_assign(
1434 WIPHY_ASSIGN;
1435 __entry->tx = tx;
1436 __entry->rx = rx;
1438 TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
1439 WIPHY_PR_ARG, __entry->tx, __entry->rx)
1442 DEFINE_EVENT(tx_rx_evt, rdev_set_ringparam,
1443 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1444 TP_ARGS(wiphy, rx, tx)
1447 DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
1448 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1449 TP_ARGS(wiphy, rx, tx)
1452 TRACE_EVENT(rdev_sched_scan_start,
1453 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1454 struct cfg80211_sched_scan_request *request),
1455 TP_ARGS(wiphy, netdev, request),
1456 TP_STRUCT__entry(
1457 WIPHY_ENTRY
1458 NETDEV_ENTRY
1460 TP_fast_assign(
1461 WIPHY_ASSIGN;
1462 NETDEV_ASSIGN;
1464 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
1465 WIPHY_PR_ARG, NETDEV_PR_ARG)
1468 TRACE_EVENT(rdev_tdls_mgmt,
1469 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1470 u8 *peer, u8 action_code, u8 dialog_token,
1471 u16 status_code, u32 peer_capability,
1472 const u8 *buf, size_t len),
1473 TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
1474 peer_capability, buf, len),
1475 TP_STRUCT__entry(
1476 WIPHY_ENTRY
1477 NETDEV_ENTRY
1478 MAC_ENTRY(peer)
1479 __field(u8, action_code)
1480 __field(u8, dialog_token)
1481 __field(u16, status_code)
1482 __field(u32, peer_capability)
1483 __dynamic_array(u8, buf, len)
1485 TP_fast_assign(
1486 WIPHY_ASSIGN;
1487 NETDEV_ASSIGN;
1488 MAC_ASSIGN(peer, peer);
1489 __entry->action_code = action_code;
1490 __entry->dialog_token = dialog_token;
1491 __entry->status_code = status_code;
1492 __entry->peer_capability = peer_capability;
1493 memcpy(__get_dynamic_array(buf), buf, len);
1495 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, "
1496 "dialog_token: %u, status_code: %u, peer_capability: %u buf: %#.2x ",
1497 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
1498 __entry->action_code, __entry->dialog_token,
1499 __entry->status_code, __entry->peer_capability,
1500 ((u8 *)__get_dynamic_array(buf))[0])
1503 TRACE_EVENT(rdev_dump_survey,
1504 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx),
1505 TP_ARGS(wiphy, netdev, idx),
1506 TP_STRUCT__entry(
1507 WIPHY_ENTRY
1508 NETDEV_ENTRY
1509 __field(int, idx)
1511 TP_fast_assign(
1512 WIPHY_ASSIGN;
1513 NETDEV_ASSIGN;
1514 __entry->idx = idx;
1516 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
1517 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
1520 TRACE_EVENT(rdev_return_int_survey_info,
1521 TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
1522 TP_ARGS(wiphy, ret, info),
1523 TP_STRUCT__entry(
1524 WIPHY_ENTRY
1525 CHAN_ENTRY
1526 __field(int, ret)
1527 __field(u64, channel_time)
1528 __field(u64, channel_time_busy)
1529 __field(u64, channel_time_ext_busy)
1530 __field(u64, channel_time_rx)
1531 __field(u64, channel_time_tx)
1532 __field(u32, filled)
1533 __field(s8, noise)
1535 TP_fast_assign(
1536 WIPHY_ASSIGN;
1537 CHAN_ASSIGN(info->channel);
1538 __entry->ret = ret;
1539 __entry->channel_time = info->channel_time;
1540 __entry->channel_time_busy = info->channel_time_busy;
1541 __entry->channel_time_ext_busy = info->channel_time_ext_busy;
1542 __entry->channel_time_rx = info->channel_time_rx;
1543 __entry->channel_time_tx = info->channel_time_tx;
1544 __entry->filled = info->filled;
1545 __entry->noise = info->noise;
1547 TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
1548 ", channel time: %llu, channel time busy: %llu, "
1549 "channel time extension busy: %llu, channel time rx: %llu, "
1550 "channel time tx: %llu, filled: %u, noise: %d",
1551 WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
1552 __entry->channel_time, __entry->channel_time_busy,
1553 __entry->channel_time_ext_busy, __entry->channel_time_rx,
1554 __entry->channel_time_tx, __entry->filled, __entry->noise)
1557 TRACE_EVENT(rdev_tdls_oper,
1558 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1559 u8 *peer, enum nl80211_tdls_operation oper),
1560 TP_ARGS(wiphy, netdev, peer, oper),
1561 TP_STRUCT__entry(
1562 WIPHY_ENTRY
1563 NETDEV_ENTRY
1564 MAC_ENTRY(peer)
1565 __field(enum nl80211_tdls_operation, oper)
1567 TP_fast_assign(
1568 WIPHY_ASSIGN;
1569 NETDEV_ASSIGN;
1570 MAC_ASSIGN(peer, peer);
1571 __entry->oper = oper;
1573 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d",
1574 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
1577 DECLARE_EVENT_CLASS(rdev_pmksa,
1578 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1579 struct cfg80211_pmksa *pmksa),
1580 TP_ARGS(wiphy, netdev, pmksa),
1581 TP_STRUCT__entry(
1582 WIPHY_ENTRY
1583 NETDEV_ENTRY
1584 MAC_ENTRY(bssid)
1586 TP_fast_assign(
1587 WIPHY_ASSIGN;
1588 NETDEV_ASSIGN;
1589 MAC_ASSIGN(bssid, pmksa->bssid);
1591 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
1592 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
1595 TRACE_EVENT(rdev_probe_client,
1596 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1597 const u8 *peer),
1598 TP_ARGS(wiphy, netdev, peer),
1599 TP_STRUCT__entry(
1600 WIPHY_ENTRY
1601 NETDEV_ENTRY
1602 MAC_ENTRY(peer)
1604 TP_fast_assign(
1605 WIPHY_ASSIGN;
1606 NETDEV_ASSIGN;
1607 MAC_ASSIGN(peer, peer);
1609 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
1610 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1613 DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
1614 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1615 struct cfg80211_pmksa *pmksa),
1616 TP_ARGS(wiphy, netdev, pmksa)
1619 DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
1620 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1621 struct cfg80211_pmksa *pmksa),
1622 TP_ARGS(wiphy, netdev, pmksa)
1625 TRACE_EVENT(rdev_remain_on_channel,
1626 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1627 struct ieee80211_channel *chan,
1628 unsigned int duration),
1629 TP_ARGS(wiphy, wdev, chan, duration),
1630 TP_STRUCT__entry(
1631 WIPHY_ENTRY
1632 WDEV_ENTRY
1633 CHAN_ENTRY
1634 __field(unsigned int, duration)
1636 TP_fast_assign(
1637 WIPHY_ASSIGN;
1638 WDEV_ASSIGN;
1639 CHAN_ASSIGN(chan);
1640 __entry->duration = duration;
1642 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
1643 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
1646 TRACE_EVENT(rdev_return_int_cookie,
1647 TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
1648 TP_ARGS(wiphy, ret, cookie),
1649 TP_STRUCT__entry(
1650 WIPHY_ENTRY
1651 __field(int, ret)
1652 __field(u64, cookie)
1654 TP_fast_assign(
1655 WIPHY_ASSIGN;
1656 __entry->ret = ret;
1657 __entry->cookie = cookie;
1659 TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
1660 WIPHY_PR_ARG, __entry->ret, __entry->cookie)
1663 TRACE_EVENT(rdev_cancel_remain_on_channel,
1664 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
1665 TP_ARGS(wiphy, wdev, cookie),
1666 TP_STRUCT__entry(
1667 WIPHY_ENTRY
1668 WDEV_ENTRY
1669 __field(u64, cookie)
1671 TP_fast_assign(
1672 WIPHY_ASSIGN;
1673 WDEV_ASSIGN;
1674 __entry->cookie = cookie;
1676 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
1677 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1680 TRACE_EVENT(rdev_mgmt_tx,
1681 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1682 struct cfg80211_mgmt_tx_params *params),
1683 TP_ARGS(wiphy, wdev, params),
1684 TP_STRUCT__entry(
1685 WIPHY_ENTRY
1686 WDEV_ENTRY
1687 CHAN_ENTRY
1688 __field(bool, offchan)
1689 __field(unsigned int, wait)
1690 __field(bool, no_cck)
1691 __field(bool, dont_wait_for_ack)
1693 TP_fast_assign(
1694 WIPHY_ASSIGN;
1695 WDEV_ASSIGN;
1696 CHAN_ASSIGN(params->chan);
1697 __entry->offchan = params->offchan;
1698 __entry->wait = params->wait;
1699 __entry->no_cck = params->no_cck;
1700 __entry->dont_wait_for_ack = params->dont_wait_for_ack;
1702 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
1703 " wait: %u, no cck: %s, dont wait for ack: %s",
1704 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
1705 BOOL_TO_STR(__entry->offchan), __entry->wait,
1706 BOOL_TO_STR(__entry->no_cck),
1707 BOOL_TO_STR(__entry->dont_wait_for_ack))
1710 TRACE_EVENT(rdev_set_noack_map,
1711 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1712 u16 noack_map),
1713 TP_ARGS(wiphy, netdev, noack_map),
1714 TP_STRUCT__entry(
1715 WIPHY_ENTRY
1716 NETDEV_ENTRY
1717 __field(u16, noack_map)
1719 TP_fast_assign(
1720 WIPHY_ASSIGN;
1721 NETDEV_ASSIGN;
1722 __entry->noack_map = noack_map;
1724 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
1725 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
1728 TRACE_EVENT(rdev_get_et_sset_count,
1729 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int sset),
1730 TP_ARGS(wiphy, netdev, sset),
1731 TP_STRUCT__entry(
1732 WIPHY_ENTRY
1733 NETDEV_ENTRY
1734 __field(int, sset)
1736 TP_fast_assign(
1737 WIPHY_ASSIGN;
1738 NETDEV_ASSIGN;
1739 __entry->sset = sset;
1741 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", sset: %d",
1742 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sset)
1745 TRACE_EVENT(rdev_get_et_strings,
1746 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 sset),
1747 TP_ARGS(wiphy, netdev, sset),
1748 TP_STRUCT__entry(
1749 WIPHY_ENTRY
1750 NETDEV_ENTRY
1751 __field(u32, sset)
1753 TP_fast_assign(
1754 WIPHY_ASSIGN;
1755 NETDEV_ASSIGN;
1756 __entry->sset = sset;
1758 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", sset: %u",
1759 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sset)
1762 DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel,
1763 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1764 TP_ARGS(wiphy, wdev)
1767 TRACE_EVENT(rdev_return_chandef,
1768 TP_PROTO(struct wiphy *wiphy, int ret,
1769 struct cfg80211_chan_def *chandef),
1770 TP_ARGS(wiphy, ret, chandef),
1771 TP_STRUCT__entry(
1772 WIPHY_ENTRY
1773 __field(int, ret)
1774 CHAN_DEF_ENTRY
1776 TP_fast_assign(
1777 WIPHY_ASSIGN;
1778 if (ret == 0)
1779 CHAN_DEF_ASSIGN(chandef);
1780 else
1781 CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
1782 __entry->ret = ret;
1784 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
1785 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
1788 DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
1789 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1790 TP_ARGS(wiphy, wdev)
1793 DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
1794 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1795 TP_ARGS(wiphy, wdev)
1798 TRACE_EVENT(rdev_set_mac_acl,
1799 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1800 struct cfg80211_acl_data *params),
1801 TP_ARGS(wiphy, netdev, params),
1802 TP_STRUCT__entry(
1803 WIPHY_ENTRY
1804 NETDEV_ENTRY
1805 __field(u32, acl_policy)
1807 TP_fast_assign(
1808 WIPHY_ASSIGN;
1809 NETDEV_ASSIGN;
1810 __entry->acl_policy = params->acl_policy;
1812 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
1813 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
1816 TRACE_EVENT(rdev_update_ft_ies,
1817 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1818 struct cfg80211_update_ft_ies_params *ftie),
1819 TP_ARGS(wiphy, netdev, ftie),
1820 TP_STRUCT__entry(
1821 WIPHY_ENTRY
1822 NETDEV_ENTRY
1823 __field(u16, md)
1824 __dynamic_array(u8, ie, ftie->ie_len)
1826 TP_fast_assign(
1827 WIPHY_ASSIGN;
1828 NETDEV_ASSIGN;
1829 __entry->md = ftie->md;
1830 memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
1832 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
1833 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
1836 TRACE_EVENT(rdev_crit_proto_start,
1837 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1838 enum nl80211_crit_proto_id protocol, u16 duration),
1839 TP_ARGS(wiphy, wdev, protocol, duration),
1840 TP_STRUCT__entry(
1841 WIPHY_ENTRY
1842 WDEV_ENTRY
1843 __field(u16, proto)
1844 __field(u16, duration)
1846 TP_fast_assign(
1847 WIPHY_ASSIGN;
1848 WDEV_ASSIGN;
1849 __entry->proto = protocol;
1850 __entry->duration = duration;
1852 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
1853 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
1856 TRACE_EVENT(rdev_crit_proto_stop,
1857 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1858 TP_ARGS(wiphy, wdev),
1859 TP_STRUCT__entry(
1860 WIPHY_ENTRY
1861 WDEV_ENTRY
1863 TP_fast_assign(
1864 WIPHY_ASSIGN;
1865 WDEV_ASSIGN;
1867 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
1868 WIPHY_PR_ARG, WDEV_PR_ARG)
1871 TRACE_EVENT(rdev_channel_switch,
1872 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1873 struct cfg80211_csa_settings *params),
1874 TP_ARGS(wiphy, netdev, params),
1875 TP_STRUCT__entry(
1876 WIPHY_ENTRY
1877 NETDEV_ENTRY
1878 CHAN_DEF_ENTRY
1879 __field(u16, counter_offset_beacon)
1880 __field(u16, counter_offset_presp)
1881 __field(bool, radar_required)
1882 __field(bool, block_tx)
1883 __field(u8, count)
1885 TP_fast_assign(
1886 WIPHY_ASSIGN;
1887 NETDEV_ASSIGN;
1888 CHAN_DEF_ASSIGN(&params->chandef);
1889 __entry->counter_offset_beacon = params->counter_offset_beacon;
1890 __entry->counter_offset_presp = params->counter_offset_presp;
1891 __entry->radar_required = params->radar_required;
1892 __entry->block_tx = params->block_tx;
1893 __entry->count = params->count;
1895 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
1896 ", block_tx: %d, count: %u, radar_required: %d"
1897 ", counter offsets (beacon/presp): %u/%u",
1898 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
1899 __entry->block_tx, __entry->count, __entry->radar_required,
1900 __entry->counter_offset_beacon,
1901 __entry->counter_offset_presp)
1904 TRACE_EVENT(rdev_set_qos_map,
1905 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1906 struct cfg80211_qos_map *qos_map),
1907 TP_ARGS(wiphy, netdev, qos_map),
1908 TP_STRUCT__entry(
1909 WIPHY_ENTRY
1910 NETDEV_ENTRY
1911 QOS_MAP_ENTRY
1913 TP_fast_assign(
1914 WIPHY_ASSIGN;
1915 NETDEV_ASSIGN;
1916 QOS_MAP_ASSIGN(qos_map);
1918 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u",
1919 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des)
1922 /*************************************************************
1923 * cfg80211 exported functions traces *
1924 *************************************************************/
1926 TRACE_EVENT(cfg80211_return_bool,
1927 TP_PROTO(bool ret),
1928 TP_ARGS(ret),
1929 TP_STRUCT__entry(
1930 __field(bool, ret)
1932 TP_fast_assign(
1933 __entry->ret = ret;
1935 TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
1938 DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
1939 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
1940 TP_ARGS(netdev, macaddr),
1941 TP_STRUCT__entry(
1942 NETDEV_ENTRY
1943 MAC_ENTRY(macaddr)
1945 TP_fast_assign(
1946 NETDEV_ASSIGN;
1947 MAC_ASSIGN(macaddr, macaddr);
1949 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
1950 NETDEV_PR_ARG, MAC_PR_ARG(macaddr))
1953 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
1954 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
1955 TP_ARGS(netdev, macaddr)
1958 DECLARE_EVENT_CLASS(netdev_evt_only,
1959 TP_PROTO(struct net_device *netdev),
1960 TP_ARGS(netdev),
1961 TP_STRUCT__entry(
1962 NETDEV_ENTRY
1964 TP_fast_assign(
1965 NETDEV_ASSIGN;
1967 TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
1970 DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
1971 TP_PROTO(struct net_device *netdev),
1972 TP_ARGS(netdev)
1975 TRACE_EVENT(cfg80211_send_rx_assoc,
1976 TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss),
1977 TP_ARGS(netdev, bss),
1978 TP_STRUCT__entry(
1979 NETDEV_ENTRY
1980 MAC_ENTRY(bssid)
1981 CHAN_ENTRY
1983 TP_fast_assign(
1984 NETDEV_ASSIGN;
1985 MAC_ASSIGN(bssid, bss->bssid);
1986 CHAN_ASSIGN(bss->channel);
1988 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT,
1989 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
1992 DECLARE_EVENT_CLASS(netdev_frame_event,
1993 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
1994 TP_ARGS(netdev, buf, len),
1995 TP_STRUCT__entry(
1996 NETDEV_ENTRY
1997 __dynamic_array(u8, frame, len)
1999 TP_fast_assign(
2000 NETDEV_ASSIGN;
2001 memcpy(__get_dynamic_array(frame), buf, len);
2003 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2004 NETDEV_PR_ARG,
2005 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
2008 DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
2009 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2010 TP_ARGS(netdev, buf, len)
2013 DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
2014 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2015 TP_ARGS(netdev, buf, len)
2018 TRACE_EVENT(cfg80211_tx_mlme_mgmt,
2019 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2020 TP_ARGS(netdev, buf, len),
2021 TP_STRUCT__entry(
2022 NETDEV_ENTRY
2023 __dynamic_array(u8, frame, len)
2025 TP_fast_assign(
2026 NETDEV_ASSIGN;
2027 memcpy(__get_dynamic_array(frame), buf, len);
2029 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2030 NETDEV_PR_ARG,
2031 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
2034 DECLARE_EVENT_CLASS(netdev_mac_evt,
2035 TP_PROTO(struct net_device *netdev, const u8 *mac),
2036 TP_ARGS(netdev, mac),
2037 TP_STRUCT__entry(
2038 NETDEV_ENTRY
2039 MAC_ENTRY(mac)
2041 TP_fast_assign(
2042 NETDEV_ASSIGN;
2043 MAC_ASSIGN(mac, mac)
2045 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2046 NETDEV_PR_ARG, MAC_PR_ARG(mac))
2049 DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
2050 TP_PROTO(struct net_device *netdev, const u8 *mac),
2051 TP_ARGS(netdev, mac)
2054 DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout,
2055 TP_PROTO(struct net_device *netdev, const u8 *mac),
2056 TP_ARGS(netdev, mac)
2059 TRACE_EVENT(cfg80211_michael_mic_failure,
2060 TP_PROTO(struct net_device *netdev, const u8 *addr,
2061 enum nl80211_key_type key_type, int key_id, const u8 *tsc),
2062 TP_ARGS(netdev, addr, key_type, key_id, tsc),
2063 TP_STRUCT__entry(
2064 NETDEV_ENTRY
2065 MAC_ENTRY(addr)
2066 __field(enum nl80211_key_type, key_type)
2067 __field(int, key_id)
2068 __array(u8, tsc, 6)
2070 TP_fast_assign(
2071 NETDEV_ASSIGN;
2072 MAC_ASSIGN(addr, addr);
2073 __entry->key_type = key_type;
2074 __entry->key_id = key_id;
2075 memcpy(__entry->tsc, tsc, 6);
2077 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
2078 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,
2079 __entry->key_id, __entry->tsc)
2082 TRACE_EVENT(cfg80211_ready_on_channel,
2083 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2084 struct ieee80211_channel *chan,
2085 unsigned int duration),
2086 TP_ARGS(wdev, cookie, chan, duration),
2087 TP_STRUCT__entry(
2088 WDEV_ENTRY
2089 __field(u64, cookie)
2090 CHAN_ENTRY
2091 __field(unsigned int, duration)
2093 TP_fast_assign(
2094 WDEV_ASSIGN;
2095 __entry->cookie = cookie;
2096 CHAN_ASSIGN(chan);
2097 __entry->duration = duration;
2099 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
2100 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
2101 __entry->duration)
2104 TRACE_EVENT(cfg80211_ready_on_channel_expired,
2105 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2106 struct ieee80211_channel *chan),
2107 TP_ARGS(wdev, cookie, chan),
2108 TP_STRUCT__entry(
2109 WDEV_ENTRY
2110 __field(u64, cookie)
2111 CHAN_ENTRY
2113 TP_fast_assign(
2114 WDEV_ASSIGN;
2115 __entry->cookie = cookie;
2116 CHAN_ASSIGN(chan);
2118 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
2119 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
2122 TRACE_EVENT(cfg80211_new_sta,
2123 TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
2124 struct station_info *sinfo),
2125 TP_ARGS(netdev, mac_addr, sinfo),
2126 TP_STRUCT__entry(
2127 NETDEV_ENTRY
2128 MAC_ENTRY(mac_addr)
2129 SINFO_ENTRY
2131 TP_fast_assign(
2132 NETDEV_ASSIGN;
2133 MAC_ASSIGN(mac_addr, mac_addr);
2134 SINFO_ASSIGN;
2136 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT,
2137 NETDEV_PR_ARG, MAC_PR_ARG(mac_addr))
2140 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
2141 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2142 TP_ARGS(netdev, macaddr)
2145 TRACE_EVENT(cfg80211_rx_mgmt,
2146 TP_PROTO(struct wireless_dev *wdev, int freq, int sig_mbm),
2147 TP_ARGS(wdev, freq, sig_mbm),
2148 TP_STRUCT__entry(
2149 WDEV_ENTRY
2150 __field(int, freq)
2151 __field(int, sig_mbm)
2153 TP_fast_assign(
2154 WDEV_ASSIGN;
2155 __entry->freq = freq;
2156 __entry->sig_mbm = sig_mbm;
2158 TP_printk(WDEV_PR_FMT ", freq: %d, sig mbm: %d",
2159 WDEV_PR_ARG, __entry->freq, __entry->sig_mbm)
2162 TRACE_EVENT(cfg80211_mgmt_tx_status,
2163 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
2164 TP_ARGS(wdev, cookie, ack),
2165 TP_STRUCT__entry(
2166 WDEV_ENTRY
2167 __field(u64, cookie)
2168 __field(bool, ack)
2170 TP_fast_assign(
2171 WDEV_ASSIGN;
2172 __entry->cookie = cookie;
2173 __entry->ack = ack;
2175 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
2176 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
2179 TRACE_EVENT(cfg80211_cqm_rssi_notify,
2180 TP_PROTO(struct net_device *netdev,
2181 enum nl80211_cqm_rssi_threshold_event rssi_event),
2182 TP_ARGS(netdev, rssi_event),
2183 TP_STRUCT__entry(
2184 NETDEV_ENTRY
2185 __field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
2187 TP_fast_assign(
2188 NETDEV_ASSIGN;
2189 __entry->rssi_event = rssi_event;
2191 TP_printk(NETDEV_PR_FMT ", rssi event: %d",
2192 NETDEV_PR_ARG, __entry->rssi_event)
2195 TRACE_EVENT(cfg80211_reg_can_beacon,
2196 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2197 TP_ARGS(wiphy, chandef),
2198 TP_STRUCT__entry(
2199 WIPHY_ENTRY
2200 CHAN_DEF_ENTRY
2202 TP_fast_assign(
2203 WIPHY_ASSIGN;
2204 CHAN_DEF_ASSIGN(chandef);
2206 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2207 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2210 TRACE_EVENT(cfg80211_chandef_dfs_required,
2211 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2212 TP_ARGS(wiphy, chandef),
2213 TP_STRUCT__entry(
2214 WIPHY_ENTRY
2215 CHAN_DEF_ENTRY
2217 TP_fast_assign(
2218 WIPHY_ASSIGN;
2219 CHAN_DEF_ASSIGN(chandef);
2221 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2222 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2225 TRACE_EVENT(cfg80211_ch_switch_notify,
2226 TP_PROTO(struct net_device *netdev,
2227 struct cfg80211_chan_def *chandef),
2228 TP_ARGS(netdev, chandef),
2229 TP_STRUCT__entry(
2230 NETDEV_ENTRY
2231 CHAN_DEF_ENTRY
2233 TP_fast_assign(
2234 NETDEV_ASSIGN;
2235 CHAN_DEF_ASSIGN(chandef);
2237 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2238 NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2241 TRACE_EVENT(cfg80211_radar_event,
2242 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2243 TP_ARGS(wiphy, chandef),
2244 TP_STRUCT__entry(
2245 WIPHY_ENTRY
2246 CHAN_DEF_ENTRY
2248 TP_fast_assign(
2249 WIPHY_ASSIGN;
2250 CHAN_DEF_ASSIGN(chandef);
2252 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2253 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2256 TRACE_EVENT(cfg80211_cac_event,
2257 TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt),
2258 TP_ARGS(netdev, evt),
2259 TP_STRUCT__entry(
2260 NETDEV_ENTRY
2261 __field(enum nl80211_radar_event, evt)
2263 TP_fast_assign(
2264 NETDEV_ASSIGN;
2265 __entry->evt = evt;
2267 TP_printk(NETDEV_PR_FMT ", event: %d",
2268 NETDEV_PR_ARG, __entry->evt)
2271 DECLARE_EVENT_CLASS(cfg80211_rx_evt,
2272 TP_PROTO(struct net_device *netdev, const u8 *addr),
2273 TP_ARGS(netdev, addr),
2274 TP_STRUCT__entry(
2275 NETDEV_ENTRY
2276 MAC_ENTRY(addr)
2278 TP_fast_assign(
2279 NETDEV_ASSIGN;
2280 MAC_ASSIGN(addr, addr);
2282 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
2285 DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
2286 TP_PROTO(struct net_device *netdev, const u8 *addr),
2287 TP_ARGS(netdev, addr)
2290 DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
2291 TP_PROTO(struct net_device *netdev, const u8 *addr),
2292 TP_ARGS(netdev, addr)
2295 TRACE_EVENT(cfg80211_ibss_joined,
2296 TP_PROTO(struct net_device *netdev, const u8 *bssid,
2297 struct ieee80211_channel *channel),
2298 TP_ARGS(netdev, bssid, channel),
2299 TP_STRUCT__entry(
2300 NETDEV_ENTRY
2301 MAC_ENTRY(bssid)
2302 CHAN_ENTRY
2304 TP_fast_assign(
2305 NETDEV_ASSIGN;
2306 MAC_ASSIGN(bssid, bssid);
2307 CHAN_ASSIGN(channel);
2309 TP_printk(NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", " CHAN_PR_FMT,
2310 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2313 TRACE_EVENT(cfg80211_probe_status,
2314 TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
2315 bool acked),
2316 TP_ARGS(netdev, addr, cookie, acked),
2317 TP_STRUCT__entry(
2318 NETDEV_ENTRY
2319 MAC_ENTRY(addr)
2320 __field(u64, cookie)
2321 __field(bool, acked)
2323 TP_fast_assign(
2324 NETDEV_ASSIGN;
2325 MAC_ASSIGN(addr, addr);
2326 __entry->cookie = cookie;
2327 __entry->acked = acked;
2329 TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
2330 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
2331 BOOL_TO_STR(__entry->acked))
2334 TRACE_EVENT(cfg80211_cqm_pktloss_notify,
2335 TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
2336 TP_ARGS(netdev, peer, num_packets),
2337 TP_STRUCT__entry(
2338 NETDEV_ENTRY
2339 MAC_ENTRY(peer)
2340 __field(u32, num_packets)
2342 TP_fast_assign(
2343 NETDEV_ASSIGN;
2344 MAC_ASSIGN(peer, peer);
2345 __entry->num_packets = num_packets;
2347 TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u",
2348 NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets)
2351 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
2352 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2353 TP_ARGS(netdev, macaddr)
2356 TRACE_EVENT(cfg80211_pmksa_candidate_notify,
2357 TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
2358 bool preauth),
2359 TP_ARGS(netdev, index, bssid, preauth),
2360 TP_STRUCT__entry(
2361 NETDEV_ENTRY
2362 __field(int, index)
2363 MAC_ENTRY(bssid)
2364 __field(bool, preauth)
2366 TP_fast_assign(
2367 NETDEV_ASSIGN;
2368 __entry->index = index;
2369 MAC_ASSIGN(bssid, bssid);
2370 __entry->preauth = preauth;
2372 TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s",
2373 NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid),
2374 BOOL_TO_STR(__entry->preauth))
2377 TRACE_EVENT(cfg80211_report_obss_beacon,
2378 TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
2379 int freq, int sig_dbm),
2380 TP_ARGS(wiphy, frame, len, freq, sig_dbm),
2381 TP_STRUCT__entry(
2382 WIPHY_ENTRY
2383 __field(int, freq)
2384 __field(int, sig_dbm)
2386 TP_fast_assign(
2387 WIPHY_ASSIGN;
2388 __entry->freq = freq;
2389 __entry->sig_dbm = sig_dbm;
2391 TP_printk(WIPHY_PR_FMT ", freq: %d, sig_dbm: %d",
2392 WIPHY_PR_ARG, __entry->freq, __entry->sig_dbm)
2395 TRACE_EVENT(cfg80211_tdls_oper_request,
2396 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
2397 enum nl80211_tdls_operation oper, u16 reason_code),
2398 TP_ARGS(wiphy, netdev, peer, oper, reason_code),
2399 TP_STRUCT__entry(
2400 WIPHY_ENTRY
2401 NETDEV_ENTRY
2402 MAC_ENTRY(peer)
2403 __field(enum nl80211_tdls_operation, oper)
2404 __field(u16, reason_code)
2406 TP_fast_assign(
2407 WIPHY_ASSIGN;
2408 NETDEV_ASSIGN;
2409 MAC_ASSIGN(peer, peer);
2410 __entry->oper = oper;
2411 __entry->reason_code = reason_code;
2413 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u",
2414 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper,
2415 __entry->reason_code)
2418 TRACE_EVENT(cfg80211_scan_done,
2419 TP_PROTO(struct cfg80211_scan_request *request, bool aborted),
2420 TP_ARGS(request, aborted),
2421 TP_STRUCT__entry(
2422 __field(u32, n_channels)
2423 __dynamic_array(u8, ie, request ? request->ie_len : 0)
2424 __array(u32, rates, IEEE80211_NUM_BANDS)
2425 __field(u32, wdev_id)
2426 MAC_ENTRY(wiphy_mac)
2427 __field(bool, no_cck)
2428 __field(bool, aborted)
2430 TP_fast_assign(
2431 if (request) {
2432 memcpy(__get_dynamic_array(ie), request->ie,
2433 request->ie_len);
2434 memcpy(__entry->rates, request->rates,
2435 IEEE80211_NUM_BANDS);
2436 __entry->wdev_id = request->wdev ?
2437 request->wdev->identifier : 0;
2438 if (request->wiphy)
2439 MAC_ASSIGN(wiphy_mac,
2440 request->wiphy->perm_addr);
2441 __entry->no_cck = request->no_cck;
2443 __entry->aborted = aborted;
2445 TP_printk("aborted: %s", BOOL_TO_STR(__entry->aborted))
2448 DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_results,
2449 TP_PROTO(struct wiphy *wiphy),
2450 TP_ARGS(wiphy)
2453 DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_stopped,
2454 TP_PROTO(struct wiphy *wiphy),
2455 TP_ARGS(wiphy)
2458 TRACE_EVENT(cfg80211_get_bss,
2459 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
2460 const u8 *bssid, const u8 *ssid, size_t ssid_len,
2461 u16 capa_mask, u16 capa_val),
2462 TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, capa_mask, capa_val),
2463 TP_STRUCT__entry(
2464 WIPHY_ENTRY
2465 CHAN_ENTRY
2466 MAC_ENTRY(bssid)
2467 __dynamic_array(u8, ssid, ssid_len)
2468 __field(u16, capa_mask)
2469 __field(u16, capa_val)
2471 TP_fast_assign(
2472 WIPHY_ASSIGN;
2473 CHAN_ASSIGN(channel);
2474 MAC_ASSIGN(bssid, bssid);
2475 memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
2476 __entry->capa_mask = capa_mask;
2477 __entry->capa_val = capa_val;
2479 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT ", buf: %#.2x, "
2480 "capa_mask: %d, capa_val: %u", WIPHY_PR_ARG, CHAN_PR_ARG,
2481 MAC_PR_ARG(bssid), ((u8 *)__get_dynamic_array(ssid))[0],
2482 __entry->capa_mask, __entry->capa_val)
2485 TRACE_EVENT(cfg80211_inform_bss_width_frame,
2486 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
2487 enum nl80211_bss_scan_width scan_width,
2488 struct ieee80211_mgmt *mgmt, size_t len,
2489 s32 signal),
2490 TP_ARGS(wiphy, channel, scan_width, mgmt, len, signal),
2491 TP_STRUCT__entry(
2492 WIPHY_ENTRY
2493 CHAN_ENTRY
2494 __field(enum nl80211_bss_scan_width, scan_width)
2495 __dynamic_array(u8, mgmt, len)
2496 __field(s32, signal)
2498 TP_fast_assign(
2499 WIPHY_ASSIGN;
2500 CHAN_ASSIGN(channel);
2501 __entry->scan_width = scan_width;
2502 if (mgmt)
2503 memcpy(__get_dynamic_array(mgmt), mgmt, len);
2504 __entry->signal = signal;
2506 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT "(scan_width: %d) signal: %d",
2507 WIPHY_PR_ARG, CHAN_PR_ARG, __entry->scan_width,
2508 __entry->signal)
2511 DECLARE_EVENT_CLASS(cfg80211_bss_evt,
2512 TP_PROTO(struct cfg80211_bss *pub),
2513 TP_ARGS(pub),
2514 TP_STRUCT__entry(
2515 MAC_ENTRY(bssid)
2516 CHAN_ENTRY
2518 TP_fast_assign(
2519 MAC_ASSIGN(bssid, pub->bssid);
2520 CHAN_ASSIGN(pub->channel);
2522 TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2525 DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
2526 TP_PROTO(struct cfg80211_bss *pub),
2527 TP_ARGS(pub)
2530 TRACE_EVENT(cfg80211_return_uint,
2531 TP_PROTO(unsigned int ret),
2532 TP_ARGS(ret),
2533 TP_STRUCT__entry(
2534 __field(unsigned int, ret)
2536 TP_fast_assign(
2537 __entry->ret = ret;
2539 TP_printk("ret: %d", __entry->ret)
2542 TRACE_EVENT(cfg80211_return_u32,
2543 TP_PROTO(u32 ret),
2544 TP_ARGS(ret),
2545 TP_STRUCT__entry(
2546 __field(u32, ret)
2548 TP_fast_assign(
2549 __entry->ret = ret;
2551 TP_printk("ret: %u", __entry->ret)
2554 TRACE_EVENT(cfg80211_report_wowlan_wakeup,
2555 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2556 struct cfg80211_wowlan_wakeup *wakeup),
2557 TP_ARGS(wiphy, wdev, wakeup),
2558 TP_STRUCT__entry(
2559 WIPHY_ENTRY
2560 WDEV_ENTRY
2561 __field(bool, non_wireless)
2562 __field(bool, disconnect)
2563 __field(bool, magic_pkt)
2564 __field(bool, gtk_rekey_failure)
2565 __field(bool, eap_identity_req)
2566 __field(bool, four_way_handshake)
2567 __field(bool, rfkill_release)
2568 __field(s32, pattern_idx)
2569 __field(u32, packet_len)
2570 __dynamic_array(u8, packet,
2571 wakeup ? wakeup->packet_present_len : 0)
2573 TP_fast_assign(
2574 WIPHY_ASSIGN;
2575 WDEV_ASSIGN;
2576 __entry->non_wireless = !wakeup;
2577 __entry->disconnect = wakeup ? wakeup->disconnect : false;
2578 __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
2579 __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
2580 __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
2581 __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
2582 __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
2583 __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
2584 __entry->packet_len = wakeup ? wakeup->packet_len : false;
2585 if (wakeup && wakeup->packet && wakeup->packet_present_len)
2586 memcpy(__get_dynamic_array(packet), wakeup->packet,
2587 wakeup->packet_present_len);
2589 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
2592 TRACE_EVENT(cfg80211_ft_event,
2593 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2594 struct cfg80211_ft_event_params *ft_event),
2595 TP_ARGS(wiphy, netdev, ft_event),
2596 TP_STRUCT__entry(
2597 WIPHY_ENTRY
2598 NETDEV_ENTRY
2599 __dynamic_array(u8, ies, ft_event->ies_len)
2600 MAC_ENTRY(target_ap)
2601 __dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
2603 TP_fast_assign(
2604 WIPHY_ASSIGN;
2605 NETDEV_ASSIGN;
2606 if (ft_event->ies)
2607 memcpy(__get_dynamic_array(ies), ft_event->ies,
2608 ft_event->ies_len);
2609 MAC_ASSIGN(target_ap, ft_event->target_ap);
2610 if (ft_event->ric_ies)
2611 memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
2612 ft_event->ric_ies_len);
2614 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT,
2615 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
2618 #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
2620 #undef TRACE_INCLUDE_PATH
2621 #define TRACE_INCLUDE_PATH .
2622 #undef TRACE_INCLUDE_FILE
2623 #define TRACE_INCLUDE_FILE trace
2624 #include <trace/define_trace.h>