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 <linux/etherdevice.h>
11 #include <net/cfg80211.h>
14 #define MAC_ENTRY(entry_mac) __array(u8, entry_mac, ETH_ALEN)
15 #define MAC_ASSIGN(entry_mac, given_mac) do { \
17 memcpy(__entry->entry_mac, given_mac, ETH_ALEN); \
19 eth_zero_addr(__entry->entry_mac); \
21 #define MAC_PR_FMT "%pM"
22 #define MAC_PR_ARG(entry_mac) (__entry->entry_mac)
25 #define WIPHY_ENTRY __array(char, wiphy_name, 32)
26 #define WIPHY_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(wiphy), MAXNAME)
27 #define WIPHY_PR_FMT "%s"
28 #define WIPHY_PR_ARG __entry->wiphy_name
30 #define WDEV_ENTRY __field(u32, id)
31 #define WDEV_ASSIGN (__entry->id) = (!IS_ERR_OR_NULL(wdev) \
32 ? wdev->identifier : 0)
33 #define WDEV_PR_FMT "wdev(%u)"
34 #define WDEV_PR_ARG (__entry->id)
36 #define NETDEV_ENTRY __array(char, name, IFNAMSIZ) \
38 #define NETDEV_ASSIGN \
40 memcpy(__entry->name, netdev->name, IFNAMSIZ); \
41 (__entry->ifindex) = (netdev->ifindex); \
43 #define NETDEV_PR_FMT "netdev:%s(%d)"
44 #define NETDEV_PR_ARG __entry->name, __entry->ifindex
46 #define MESH_CFG_ENTRY __field(u16, dot11MeshRetryTimeout) \
47 __field(u16, dot11MeshConfirmTimeout) \
48 __field(u16, dot11MeshHoldingTimeout) \
49 __field(u16, dot11MeshMaxPeerLinks) \
50 __field(u8, dot11MeshMaxRetries) \
51 __field(u8, dot11MeshTTL) \
52 __field(u8, element_ttl) \
53 __field(bool, auto_open_plinks) \
54 __field(u32, dot11MeshNbrOffsetMaxNeighbor) \
55 __field(u8, dot11MeshHWMPmaxPREQretries) \
56 __field(u32, path_refresh_time) \
57 __field(u32, dot11MeshHWMPactivePathTimeout) \
58 __field(u16, min_discovery_timeout) \
59 __field(u16, dot11MeshHWMPpreqMinInterval) \
60 __field(u16, dot11MeshHWMPperrMinInterval) \
61 __field(u16, dot11MeshHWMPnetDiameterTraversalTime) \
62 __field(u8, dot11MeshHWMPRootMode) \
63 __field(u16, dot11MeshHWMPRannInterval) \
64 __field(bool, dot11MeshGateAnnouncementProtocol) \
65 __field(bool, dot11MeshForwarding) \
66 __field(s32, rssi_threshold) \
67 __field(u16, ht_opmode) \
68 __field(u32, dot11MeshHWMPactivePathToRootTimeout) \
69 __field(u16, dot11MeshHWMProotInterval) \
70 __field(u16, dot11MeshHWMPconfirmationInterval)
71 #define MESH_CFG_ASSIGN \
73 __entry->dot11MeshRetryTimeout = conf->dot11MeshRetryTimeout; \
74 __entry->dot11MeshConfirmTimeout = \
75 conf->dot11MeshConfirmTimeout; \
76 __entry->dot11MeshHoldingTimeout = \
77 conf->dot11MeshHoldingTimeout; \
78 __entry->dot11MeshMaxPeerLinks = conf->dot11MeshMaxPeerLinks; \
79 __entry->dot11MeshMaxRetries = conf->dot11MeshMaxRetries; \
80 __entry->dot11MeshTTL = conf->dot11MeshTTL; \
81 __entry->element_ttl = conf->element_ttl; \
82 __entry->auto_open_plinks = conf->auto_open_plinks; \
83 __entry->dot11MeshNbrOffsetMaxNeighbor = \
84 conf->dot11MeshNbrOffsetMaxNeighbor; \
85 __entry->dot11MeshHWMPmaxPREQretries = \
86 conf->dot11MeshHWMPmaxPREQretries; \
87 __entry->path_refresh_time = conf->path_refresh_time; \
88 __entry->dot11MeshHWMPactivePathTimeout = \
89 conf->dot11MeshHWMPactivePathTimeout; \
90 __entry->min_discovery_timeout = conf->min_discovery_timeout; \
91 __entry->dot11MeshHWMPpreqMinInterval = \
92 conf->dot11MeshHWMPpreqMinInterval; \
93 __entry->dot11MeshHWMPperrMinInterval = \
94 conf->dot11MeshHWMPperrMinInterval; \
95 __entry->dot11MeshHWMPnetDiameterTraversalTime = \
96 conf->dot11MeshHWMPnetDiameterTraversalTime; \
97 __entry->dot11MeshHWMPRootMode = conf->dot11MeshHWMPRootMode; \
98 __entry->dot11MeshHWMPRannInterval = \
99 conf->dot11MeshHWMPRannInterval; \
100 __entry->dot11MeshGateAnnouncementProtocol = \
101 conf->dot11MeshGateAnnouncementProtocol; \
102 __entry->dot11MeshForwarding = conf->dot11MeshForwarding; \
103 __entry->rssi_threshold = conf->rssi_threshold; \
104 __entry->ht_opmode = conf->ht_opmode; \
105 __entry->dot11MeshHWMPactivePathToRootTimeout = \
106 conf->dot11MeshHWMPactivePathToRootTimeout; \
107 __entry->dot11MeshHWMProotInterval = \
108 conf->dot11MeshHWMProotInterval; \
109 __entry->dot11MeshHWMPconfirmationInterval = \
110 conf->dot11MeshHWMPconfirmationInterval; \
113 #define CHAN_ENTRY __field(enum ieee80211_band, band) \
114 __field(u16, center_freq)
115 #define CHAN_ASSIGN(chan) \
118 __entry->band = chan->band; \
119 __entry->center_freq = chan->center_freq; \
122 __entry->center_freq = 0; \
125 #define CHAN_PR_FMT "band: %d, freq: %u"
126 #define CHAN_PR_ARG __entry->band, __entry->center_freq
128 #define CHAN_DEF_ENTRY __field(enum ieee80211_band, band) \
129 __field(u32, control_freq) \
130 __field(u32, width) \
131 __field(u32, center_freq1) \
132 __field(u32, center_freq2)
133 #define CHAN_DEF_ASSIGN(chandef) \
135 if ((chandef) && (chandef)->chan) { \
136 __entry->band = (chandef)->chan->band; \
137 __entry->control_freq = \
138 (chandef)->chan->center_freq; \
139 __entry->width = (chandef)->width; \
140 __entry->center_freq1 = (chandef)->center_freq1;\
141 __entry->center_freq2 = (chandef)->center_freq2;\
144 __entry->control_freq = 0; \
145 __entry->width = 0; \
146 __entry->center_freq1 = 0; \
147 __entry->center_freq2 = 0; \
150 #define CHAN_DEF_PR_FMT \
151 "band: %d, control freq: %u, width: %d, cf1: %u, cf2: %u"
152 #define CHAN_DEF_PR_ARG __entry->band, __entry->control_freq, \
153 __entry->width, __entry->center_freq1, \
154 __entry->center_freq2
156 #define SINFO_ENTRY __field(int, generation) \
157 __field(u32, connected_time) \
158 __field(u32, inactive_time) \
159 __field(u32, rx_bytes) \
160 __field(u32, tx_bytes) \
161 __field(u32, rx_packets) \
162 __field(u32, tx_packets) \
163 __field(u32, tx_retries) \
164 __field(u32, tx_failed) \
165 __field(u32, rx_dropped_misc) \
166 __field(u32, beacon_loss_count) \
169 __field(u8, plink_state)
170 #define SINFO_ASSIGN \
172 __entry->generation = sinfo->generation; \
173 __entry->connected_time = sinfo->connected_time; \
174 __entry->inactive_time = sinfo->inactive_time; \
175 __entry->rx_bytes = sinfo->rx_bytes; \
176 __entry->tx_bytes = sinfo->tx_bytes; \
177 __entry->rx_packets = sinfo->rx_packets; \
178 __entry->tx_packets = sinfo->tx_packets; \
179 __entry->tx_retries = sinfo->tx_retries; \
180 __entry->tx_failed = sinfo->tx_failed; \
181 __entry->rx_dropped_misc = sinfo->rx_dropped_misc; \
182 __entry->beacon_loss_count = sinfo->beacon_loss_count; \
183 __entry->llid = sinfo->llid; \
184 __entry->plid = sinfo->plid; \
185 __entry->plink_state = sinfo->plink_state; \
188 #define BOOL_TO_STR(bo) (bo) ? "true" : "false"
190 #define QOS_MAP_ENTRY __field(u8, num_des) \
191 __array(u8, dscp_exception, \
192 2 * IEEE80211_QOS_MAP_MAX_EX) \
193 __array(u8, up, IEEE80211_QOS_MAP_LEN_MIN)
194 #define QOS_MAP_ASSIGN(qos_map) \
197 __entry->num_des = (qos_map)->num_des; \
198 memcpy(__entry->dscp_exception, \
199 &(qos_map)->dscp_exception, \
200 2 * IEEE80211_QOS_MAP_MAX_EX); \
201 memcpy(__entry->up, &(qos_map)->up, \
202 IEEE80211_QOS_MAP_LEN_MIN); \
204 __entry->num_des = 0; \
205 memset(__entry->dscp_exception, 0, \
206 2 * IEEE80211_QOS_MAP_MAX_EX); \
207 memset(__entry->up, 0, \
208 IEEE80211_QOS_MAP_LEN_MIN); \
212 /*************************************************************
214 *************************************************************/
216 TRACE_EVENT(rdev_suspend,
217 TP_PROTO(struct wiphy *wiphy, struct cfg80211_wowlan *wow),
222 __field(bool, disconnect)
223 __field(bool, magic_pkt)
224 __field(bool, gtk_rekey_failure)
225 __field(bool, eap_identity_req)
226 __field(bool, four_way_handshake)
227 __field(bool, rfkill_release)
228 __field(bool, valid_wow)
233 __entry->any = wow->any;
234 __entry->disconnect = wow->disconnect;
235 __entry->magic_pkt = wow->magic_pkt;
236 __entry->gtk_rekey_failure = wow->gtk_rekey_failure;
237 __entry->eap_identity_req = wow->eap_identity_req;
238 __entry->four_way_handshake = wow->four_way_handshake;
239 __entry->rfkill_release = wow->rfkill_release;
240 __entry->valid_wow = true;
242 __entry->valid_wow = false;
245 TP_printk(WIPHY_PR_FMT ", wow%s - any: %d, disconnect: %d, "
246 "magic pkt: %d, gtk rekey failure: %d, eap identify req: %d, "
247 "four way handshake: %d, rfkill release: %d.",
248 WIPHY_PR_ARG, __entry->valid_wow ? "" : "(Not configured!)",
249 __entry->any, __entry->disconnect, __entry->magic_pkt,
250 __entry->gtk_rekey_failure, __entry->eap_identity_req,
251 __entry->four_way_handshake, __entry->rfkill_release)
254 TRACE_EVENT(rdev_return_int,
255 TP_PROTO(struct wiphy *wiphy, int ret),
265 TP_printk(WIPHY_PR_FMT ", returned: %d", WIPHY_PR_ARG, __entry->ret)
268 TRACE_EVENT(rdev_scan,
269 TP_PROTO(struct wiphy *wiphy, struct cfg80211_scan_request *request),
270 TP_ARGS(wiphy, request),
277 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
280 DECLARE_EVENT_CLASS(wiphy_only_evt,
281 TP_PROTO(struct wiphy *wiphy),
289 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
292 DEFINE_EVENT(wiphy_only_evt, rdev_resume,
293 TP_PROTO(struct wiphy *wiphy),
297 DEFINE_EVENT(wiphy_only_evt, rdev_return_void,
298 TP_PROTO(struct wiphy *wiphy),
302 DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna,
303 TP_PROTO(struct wiphy *wiphy),
307 DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll,
308 TP_PROTO(struct wiphy *wiphy),
312 DECLARE_EVENT_CLASS(wiphy_enabled_evt,
313 TP_PROTO(struct wiphy *wiphy, bool enabled),
314 TP_ARGS(wiphy, enabled),
317 __field(bool, enabled)
321 __entry->enabled = enabled;
323 TP_printk(WIPHY_PR_FMT ", %senabled ",
324 WIPHY_PR_ARG, __entry->enabled ? "" : "not ")
327 DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup,
328 TP_PROTO(struct wiphy *wiphy, bool enabled),
329 TP_ARGS(wiphy, enabled)
332 TRACE_EVENT(rdev_add_virtual_intf,
333 TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type),
334 TP_ARGS(wiphy, name, type),
337 __string(vir_intf_name, name ? name : "<noname>")
338 __field(enum nl80211_iftype, type)
342 __assign_str(vir_intf_name, name ? name : "<noname>");
343 __entry->type = type;
345 TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d",
346 WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type)
349 DECLARE_EVENT_CLASS(wiphy_wdev_evt,
350 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
351 TP_ARGS(wiphy, wdev),
360 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
363 DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev,
364 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
368 DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf,
369 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
373 TRACE_EVENT(rdev_change_virtual_intf,
374 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
375 enum nl80211_iftype type),
376 TP_ARGS(wiphy, netdev, type),
380 __field(enum nl80211_iftype, type)
385 __entry->type = type;
387 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", type: %d",
388 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type)
391 DECLARE_EVENT_CLASS(key_handle,
392 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
393 bool pairwise, const u8 *mac_addr),
394 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr),
399 __field(u8, key_index)
400 __field(bool, pairwise)
405 MAC_ASSIGN(mac_addr, mac_addr);
406 __entry->key_index = key_index;
407 __entry->pairwise = pairwise;
409 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key_index: %u, pairwise: %s, mac addr: " MAC_PR_FMT,
410 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
411 BOOL_TO_STR(__entry->pairwise), MAC_PR_ARG(mac_addr))
414 DEFINE_EVENT(key_handle, rdev_add_key,
415 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
416 bool pairwise, const u8 *mac_addr),
417 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
420 DEFINE_EVENT(key_handle, rdev_get_key,
421 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
422 bool pairwise, const u8 *mac_addr),
423 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
426 DEFINE_EVENT(key_handle, rdev_del_key,
427 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
428 bool pairwise, const u8 *mac_addr),
429 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
432 TRACE_EVENT(rdev_set_default_key,
433 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
434 bool unicast, bool multicast),
435 TP_ARGS(wiphy, netdev, key_index, unicast, multicast),
439 __field(u8, key_index)
440 __field(bool, unicast)
441 __field(bool, multicast)
446 __entry->key_index = key_index;
447 __entry->unicast = unicast;
448 __entry->multicast = multicast;
450 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u, unicast: %s, multicast: %s",
451 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
452 BOOL_TO_STR(__entry->unicast),
453 BOOL_TO_STR(__entry->multicast))
456 TRACE_EVENT(rdev_set_default_mgmt_key,
457 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
458 TP_ARGS(wiphy, netdev, key_index),
462 __field(u8, key_index)
467 __entry->key_index = key_index;
469 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
470 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
473 TRACE_EVENT(rdev_start_ap,
474 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
475 struct cfg80211_ap_settings *settings),
476 TP_ARGS(wiphy, netdev, settings),
481 __field(int, beacon_interval)
482 __field(int, dtim_period)
483 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
484 __field(enum nl80211_hidden_ssid, hidden_ssid)
485 __field(u32, wpa_ver)
486 __field(bool, privacy)
487 __field(enum nl80211_auth_type, auth_type)
488 __field(int, inactivity_timeout)
493 CHAN_DEF_ASSIGN(&settings->chandef);
494 __entry->beacon_interval = settings->beacon_interval;
495 __entry->dtim_period = settings->dtim_period;
496 __entry->hidden_ssid = settings->hidden_ssid;
497 __entry->wpa_ver = settings->crypto.wpa_versions;
498 __entry->privacy = settings->privacy;
499 __entry->auth_type = settings->auth_type;
500 __entry->inactivity_timeout = settings->inactivity_timeout;
501 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
502 memcpy(__entry->ssid, settings->ssid, settings->ssid_len);
504 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", AP settings - ssid: %s, "
505 CHAN_DEF_PR_FMT ", beacon interval: %d, dtim period: %d, "
506 "hidden ssid: %d, wpa versions: %u, privacy: %s, "
507 "auth type: %d, inactivity timeout: %d",
508 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_DEF_PR_ARG,
509 __entry->beacon_interval, __entry->dtim_period,
510 __entry->hidden_ssid, __entry->wpa_ver,
511 BOOL_TO_STR(__entry->privacy), __entry->auth_type,
512 __entry->inactivity_timeout)
515 TRACE_EVENT(rdev_change_beacon,
516 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
517 struct cfg80211_beacon_data *info),
518 TP_ARGS(wiphy, netdev, info),
522 __dynamic_array(u8, head, info ? info->head_len : 0)
523 __dynamic_array(u8, tail, info ? info->tail_len : 0)
524 __dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0)
525 __dynamic_array(u8, proberesp_ies,
526 info ? info->proberesp_ies_len : 0)
527 __dynamic_array(u8, assocresp_ies,
528 info ? info->assocresp_ies_len : 0)
529 __dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0)
536 memcpy(__get_dynamic_array(head), info->head,
539 memcpy(__get_dynamic_array(tail), info->tail,
541 if (info->beacon_ies)
542 memcpy(__get_dynamic_array(beacon_ies),
543 info->beacon_ies, info->beacon_ies_len);
544 if (info->proberesp_ies)
545 memcpy(__get_dynamic_array(proberesp_ies),
547 info->proberesp_ies_len);
548 if (info->assocresp_ies)
549 memcpy(__get_dynamic_array(assocresp_ies),
551 info->assocresp_ies_len);
552 if (info->probe_resp)
553 memcpy(__get_dynamic_array(probe_resp),
554 info->probe_resp, info->probe_resp_len);
557 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
560 DECLARE_EVENT_CLASS(wiphy_netdev_evt,
561 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
562 TP_ARGS(wiphy, netdev),
571 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
574 DEFINE_EVENT(wiphy_netdev_evt, rdev_stop_ap,
575 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
576 TP_ARGS(wiphy, netdev)
579 DEFINE_EVENT(wiphy_netdev_evt, rdev_sched_scan_stop,
580 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
581 TP_ARGS(wiphy, netdev)
584 DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data,
585 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
586 TP_ARGS(wiphy, netdev)
589 DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config,
590 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
591 TP_ARGS(wiphy, netdev)
594 DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh,
595 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
596 TP_ARGS(wiphy, netdev)
599 DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ibss,
600 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
601 TP_ARGS(wiphy, netdev)
604 DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ocb,
605 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
606 TP_ARGS(wiphy, netdev)
609 DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa,
610 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
611 TP_ARGS(wiphy, netdev)
614 DECLARE_EVENT_CLASS(station_add_change,
615 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
616 struct station_parameters *params),
617 TP_ARGS(wiphy, netdev, mac, params),
622 __field(u32, sta_flags_mask)
623 __field(u32, sta_flags_set)
624 __field(u32, sta_modify_mask)
625 __field(int, listen_interval)
627 __field(u8, plink_action)
628 __field(u8, plink_state)
629 __field(u8, uapsd_queues)
630 __array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap))
635 MAC_ASSIGN(sta_mac, mac);
636 __entry->sta_flags_mask = params->sta_flags_mask;
637 __entry->sta_flags_set = params->sta_flags_set;
638 __entry->sta_modify_mask = params->sta_modify_mask;
639 __entry->listen_interval = params->listen_interval;
640 __entry->aid = params->aid;
641 __entry->plink_action = params->plink_action;
642 __entry->plink_state = params->plink_state;
643 __entry->uapsd_queues = params->uapsd_queues;
644 memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap));
646 memcpy(__entry->ht_capa, params->ht_capa,
647 sizeof(struct ieee80211_ht_cap));
649 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
650 ", station flags mask: %u, station flags set: %u, "
651 "station modify mask: %u, listen interval: %d, aid: %u, "
652 "plink action: %u, plink state: %u, uapsd queues: %u",
653 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
654 __entry->sta_flags_mask, __entry->sta_flags_set,
655 __entry->sta_modify_mask, __entry->listen_interval,
656 __entry->aid, __entry->plink_action, __entry->plink_state,
657 __entry->uapsd_queues)
660 DEFINE_EVENT(station_add_change, rdev_add_station,
661 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
662 struct station_parameters *params),
663 TP_ARGS(wiphy, netdev, mac, params)
666 DEFINE_EVENT(station_add_change, rdev_change_station,
667 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
668 struct station_parameters *params),
669 TP_ARGS(wiphy, netdev, mac, params)
672 DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
673 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
674 TP_ARGS(wiphy, netdev, mac),
683 MAC_ASSIGN(sta_mac, mac);
685 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
686 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac))
689 DECLARE_EVENT_CLASS(station_del,
690 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
691 struct station_del_parameters *params),
692 TP_ARGS(wiphy, netdev, params),
698 __field(u16, reason_code)
703 MAC_ASSIGN(sta_mac, params->mac);
704 __entry->subtype = params->subtype;
705 __entry->reason_code = params->reason_code;
707 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
708 ", subtype: %u, reason_code: %u",
709 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
710 __entry->subtype, __entry->reason_code)
713 DEFINE_EVENT(station_del, rdev_del_station,
714 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
715 struct station_del_parameters *params),
716 TP_ARGS(wiphy, netdev, params)
719 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station,
720 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
721 TP_ARGS(wiphy, netdev, mac)
724 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
725 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
726 TP_ARGS(wiphy, netdev, mac)
729 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer,
730 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
731 TP_ARGS(wiphy, netdev, mac)
734 TRACE_EVENT(rdev_dump_station,
735 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
737 TP_ARGS(wiphy, netdev, idx, mac),
747 MAC_ASSIGN(sta_mac, mac);
750 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d",
751 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
755 TRACE_EVENT(rdev_return_int_station_info,
756 TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo),
757 TP_ARGS(wiphy, ret, sinfo),
768 TP_printk(WIPHY_PR_FMT ", returned %d" ,
769 WIPHY_PR_ARG, __entry->ret)
772 DECLARE_EVENT_CLASS(mpath_evt,
773 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
775 TP_ARGS(wiphy, netdev, dst, next_hop),
785 MAC_ASSIGN(dst, dst);
786 MAC_ASSIGN(next_hop, next_hop);
788 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT,
789 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst),
790 MAC_PR_ARG(next_hop))
793 DEFINE_EVENT(mpath_evt, rdev_add_mpath,
794 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
796 TP_ARGS(wiphy, netdev, dst, next_hop)
799 DEFINE_EVENT(mpath_evt, rdev_change_mpath,
800 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
802 TP_ARGS(wiphy, netdev, dst, next_hop)
805 DEFINE_EVENT(mpath_evt, rdev_get_mpath,
806 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
808 TP_ARGS(wiphy, netdev, dst, next_hop)
811 TRACE_EVENT(rdev_dump_mpath,
812 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
813 u8 *dst, u8 *next_hop),
814 TP_ARGS(wiphy, netdev, idx, dst, next_hop),
825 MAC_ASSIGN(dst, dst);
826 MAC_ASSIGN(next_hop, next_hop);
829 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
830 MAC_PR_FMT ", next hop: " MAC_PR_FMT,
831 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
832 MAC_PR_ARG(next_hop))
835 TRACE_EVENT(rdev_get_mpp,
836 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
838 TP_ARGS(wiphy, netdev, dst, mpp),
848 MAC_ASSIGN(dst, dst);
849 MAC_ASSIGN(mpp, mpp);
851 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT
852 ", mpp: " MAC_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG,
853 MAC_PR_ARG(dst), MAC_PR_ARG(mpp))
856 TRACE_EVENT(rdev_dump_mpp,
857 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
859 TP_ARGS(wiphy, netdev, idx, mpp, dst),
870 MAC_ASSIGN(dst, dst);
871 MAC_ASSIGN(mpp, mpp);
874 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
875 MAC_PR_FMT ", mpp: " MAC_PR_FMT,
876 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
880 TRACE_EVENT(rdev_return_int_mpath_info,
881 TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo),
882 TP_ARGS(wiphy, ret, pinfo),
886 __field(int, generation)
888 __field(u32, frame_qlen)
891 __field(u32, exptime)
892 __field(u32, discovery_timeout)
893 __field(u8, discovery_retries)
899 __entry->generation = pinfo->generation;
900 __entry->filled = pinfo->filled;
901 __entry->frame_qlen = pinfo->frame_qlen;
902 __entry->sn = pinfo->sn;
903 __entry->metric = pinfo->metric;
904 __entry->exptime = pinfo->exptime;
905 __entry->discovery_timeout = pinfo->discovery_timeout;
906 __entry->discovery_retries = pinfo->discovery_retries;
907 __entry->flags = pinfo->flags;
909 TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, "
910 "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
911 " discovery timeout: %u, discovery retries: %u, flags: %u",
912 WIPHY_PR_ARG, __entry->ret, __entry->generation,
913 __entry->filled, __entry->frame_qlen, __entry->sn,
914 __entry->metric, __entry->exptime, __entry->discovery_timeout,
915 __entry->discovery_retries, __entry->flags)
918 TRACE_EVENT(rdev_return_int_mesh_config,
919 TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf),
920 TP_ARGS(wiphy, ret, conf),
931 TP_printk(WIPHY_PR_FMT ", returned: %d",
932 WIPHY_PR_ARG, __entry->ret)
935 TRACE_EVENT(rdev_update_mesh_config,
936 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
937 const struct mesh_config *conf),
938 TP_ARGS(wiphy, netdev, mask, conf),
949 __entry->mask = mask;
951 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u",
952 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
955 TRACE_EVENT(rdev_join_mesh,
956 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
957 const struct mesh_config *conf,
958 const struct mesh_setup *setup),
959 TP_ARGS(wiphy, netdev, conf, setup),
970 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
971 WIPHY_PR_ARG, NETDEV_PR_ARG)
974 TRACE_EVENT(rdev_change_bss,
975 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
976 struct bss_parameters *params),
977 TP_ARGS(wiphy, netdev, params),
981 __field(int, use_cts_prot)
982 __field(int, use_short_preamble)
983 __field(int, use_short_slot_time)
984 __field(int, ap_isolate)
985 __field(int, ht_opmode)
990 __entry->use_cts_prot = params->use_cts_prot;
991 __entry->use_short_preamble = params->use_short_preamble;
992 __entry->use_short_slot_time = params->use_short_slot_time;
993 __entry->ap_isolate = params->ap_isolate;
994 __entry->ht_opmode = params->ht_opmode;
996 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, "
997 "use short preamble: %d, use short slot time: %d, "
998 "ap isolate: %d, ht opmode: %d",
999 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot,
1000 __entry->use_short_preamble, __entry->use_short_slot_time,
1001 __entry->ap_isolate, __entry->ht_opmode)
1004 TRACE_EVENT(rdev_set_txq_params,
1005 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1006 struct ieee80211_txq_params *params),
1007 TP_ARGS(wiphy, netdev, params),
1011 __field(enum nl80211_ac, ac)
1020 __entry->ac = params->ac;
1021 __entry->txop = params->txop;
1022 __entry->cwmin = params->cwmin;
1023 __entry->cwmax = params->cwmax;
1024 __entry->aifs = params->aifs;
1026 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u",
1027 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop,
1028 __entry->cwmin, __entry->cwmax, __entry->aifs)
1031 TRACE_EVENT(rdev_libertas_set_mesh_channel,
1032 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1033 struct ieee80211_channel *chan),
1034 TP_ARGS(wiphy, netdev, chan),
1045 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG,
1046 NETDEV_PR_ARG, CHAN_PR_ARG)
1049 TRACE_EVENT(rdev_set_monitor_channel,
1050 TP_PROTO(struct wiphy *wiphy,
1051 struct cfg80211_chan_def *chandef),
1052 TP_ARGS(wiphy, chandef),
1059 CHAN_DEF_ASSIGN(chandef);
1061 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
1062 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
1065 TRACE_EVENT(rdev_auth,
1066 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1067 struct cfg80211_auth_request *req),
1068 TP_ARGS(wiphy, netdev, req),
1073 __field(enum nl80211_auth_type, auth_type)
1079 MAC_ASSIGN(bssid, req->bss->bssid);
1081 eth_zero_addr(__entry->bssid);
1082 __entry->auth_type = req->auth_type;
1084 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT,
1085 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type,
1089 TRACE_EVENT(rdev_assoc,
1090 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1091 struct cfg80211_assoc_request *req),
1092 TP_ARGS(wiphy, netdev, req),
1097 MAC_ENTRY(prev_bssid)
1098 __field(bool, use_mfp)
1105 MAC_ASSIGN(bssid, req->bss->bssid);
1107 eth_zero_addr(__entry->bssid);
1108 MAC_ASSIGN(prev_bssid, req->prev_bssid);
1109 __entry->use_mfp = req->use_mfp;
1110 __entry->flags = req->flags;
1112 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
1113 ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u",
1114 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1115 MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp),
1119 TRACE_EVENT(rdev_deauth,
1120 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1121 struct cfg80211_deauth_request *req),
1122 TP_ARGS(wiphy, netdev, req),
1127 __field(u16, reason_code)
1132 MAC_ASSIGN(bssid, req->bssid);
1133 __entry->reason_code = req->reason_code;
1135 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u",
1136 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1137 __entry->reason_code)
1140 TRACE_EVENT(rdev_disassoc,
1141 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1142 struct cfg80211_disassoc_request *req),
1143 TP_ARGS(wiphy, netdev, req),
1148 __field(u16, reason_code)
1149 __field(bool, local_state_change)
1155 MAC_ASSIGN(bssid, req->bss->bssid);
1157 eth_zero_addr(__entry->bssid);
1158 __entry->reason_code = req->reason_code;
1159 __entry->local_state_change = req->local_state_change;
1161 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
1162 ", reason: %u, local state change: %s",
1163 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1164 __entry->reason_code,
1165 BOOL_TO_STR(__entry->local_state_change))
1168 TRACE_EVENT(rdev_mgmt_tx_cancel_wait,
1169 TP_PROTO(struct wiphy *wiphy,
1170 struct wireless_dev *wdev, u64 cookie),
1171 TP_ARGS(wiphy, wdev, cookie),
1175 __field(u64, cookie)
1180 __entry->cookie = cookie;
1182 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ",
1183 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1186 TRACE_EVENT(rdev_set_power_mgmt,
1187 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1188 bool enabled, int timeout),
1189 TP_ARGS(wiphy, netdev, enabled, timeout),
1193 __field(bool, enabled)
1194 __field(int, timeout)
1199 __entry->enabled = enabled;
1200 __entry->timeout = timeout;
1202 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ",
1203 WIPHY_PR_ARG, NETDEV_PR_ARG,
1204 __entry->enabled ? "" : "not ", __entry->timeout)
1207 TRACE_EVENT(rdev_connect,
1208 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1209 struct cfg80211_connect_params *sme),
1210 TP_ARGS(wiphy, netdev, sme),
1215 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1216 __field(enum nl80211_auth_type, auth_type)
1217 __field(bool, privacy)
1218 __field(u32, wpa_versions)
1224 MAC_ASSIGN(bssid, sme->bssid);
1225 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1226 memcpy(__entry->ssid, sme->ssid, sme->ssid_len);
1227 __entry->auth_type = sme->auth_type;
1228 __entry->privacy = sme->privacy;
1229 __entry->wpa_versions = sme->crypto.wpa_versions;
1230 __entry->flags = sme->flags;
1232 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
1233 ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
1235 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid,
1236 __entry->auth_type, BOOL_TO_STR(__entry->privacy),
1237 __entry->wpa_versions, __entry->flags)
1240 TRACE_EVENT(rdev_set_cqm_rssi_config,
1241 TP_PROTO(struct wiphy *wiphy,
1242 struct net_device *netdev, s32 rssi_thold,
1244 TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
1248 __field(s32, rssi_thold)
1249 __field(u32, rssi_hyst)
1254 __entry->rssi_thold = rssi_thold;
1255 __entry->rssi_hyst = rssi_hyst;
1257 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
1258 ", rssi_thold: %d, rssi_hyst: %u ",
1259 WIPHY_PR_ARG, NETDEV_PR_ARG,
1260 __entry->rssi_thold, __entry->rssi_hyst)
1263 TRACE_EVENT(rdev_set_cqm_txe_config,
1264 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
1265 u32 pkts, u32 intvl),
1266 TP_ARGS(wiphy, netdev, rate, pkts, intvl),
1277 __entry->rate = rate;
1278 __entry->pkts = pkts;
1279 __entry->intvl = intvl;
1281 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
1282 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
1286 TRACE_EVENT(rdev_disconnect,
1287 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1289 TP_ARGS(wiphy, netdev, reason_code),
1293 __field(u16, reason_code)
1298 __entry->reason_code = reason_code;
1300 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
1301 NETDEV_PR_ARG, __entry->reason_code)
1304 TRACE_EVENT(rdev_join_ibss,
1305 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1306 struct cfg80211_ibss_params *params),
1307 TP_ARGS(wiphy, netdev, params),
1312 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1317 MAC_ASSIGN(bssid, params->bssid);
1318 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1319 memcpy(__entry->ssid, params->ssid, params->ssid_len);
1321 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s",
1322 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid)
1325 TRACE_EVENT(rdev_join_ocb,
1326 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1327 const struct ocb_setup *setup),
1328 TP_ARGS(wiphy, netdev, setup),
1337 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
1338 WIPHY_PR_ARG, NETDEV_PR_ARG)
1341 TRACE_EVENT(rdev_set_wiphy_params,
1342 TP_PROTO(struct wiphy *wiphy, u32 changed),
1343 TP_ARGS(wiphy, changed),
1346 __field(u32, changed)
1350 __entry->changed = changed;
1352 TP_printk(WIPHY_PR_FMT ", changed: %u",
1353 WIPHY_PR_ARG, __entry->changed)
1356 DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power,
1357 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1358 TP_ARGS(wiphy, wdev)
1361 TRACE_EVENT(rdev_set_tx_power,
1362 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1363 enum nl80211_tx_power_setting type, int mbm),
1364 TP_ARGS(wiphy, wdev, type, mbm),
1368 __field(enum nl80211_tx_power_setting, type)
1374 __entry->type = type;
1377 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
1378 WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
1381 TRACE_EVENT(rdev_return_int_int,
1382 TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
1383 TP_ARGS(wiphy, func_ret, func_fill),
1386 __field(int, func_ret)
1387 __field(int, func_fill)
1391 __entry->func_ret = func_ret;
1392 __entry->func_fill = func_fill;
1394 TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
1395 WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
1398 #ifdef CONFIG_NL80211_TESTMODE
1399 TRACE_EVENT(rdev_testmode_cmd,
1400 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1401 TP_ARGS(wiphy, wdev),
1410 TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
1413 TRACE_EVENT(rdev_testmode_dump,
1414 TP_PROTO(struct wiphy *wiphy),
1422 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
1424 #endif /* CONFIG_NL80211_TESTMODE */
1426 TRACE_EVENT(rdev_set_bitrate_mask,
1427 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1428 const u8 *peer, const struct cfg80211_bitrate_mask *mask),
1429 TP_ARGS(wiphy, netdev, peer, mask),
1438 MAC_ASSIGN(peer, peer);
1440 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
1441 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1444 TRACE_EVENT(rdev_mgmt_frame_register,
1445 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1446 u16 frame_type, bool reg),
1447 TP_ARGS(wiphy, wdev, frame_type, reg),
1451 __field(u16, frame_type)
1457 __entry->frame_type = frame_type;
1460 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", frame_type: 0x%.2x, reg: %s ",
1461 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->frame_type,
1462 __entry->reg ? "true" : "false")
1465 TRACE_EVENT(rdev_return_int_tx_rx,
1466 TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
1467 TP_ARGS(wiphy, ret, tx, rx),
1480 TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
1481 WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
1484 TRACE_EVENT(rdev_return_void_tx_rx,
1485 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
1486 u32 rx, u32 rx_max),
1487 TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
1491 __field(u32, tx_max)
1493 __field(u32, rx_max)
1498 __entry->tx_max = tx_max;
1500 __entry->rx_max = rx_max;
1502 TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
1503 WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
1507 DECLARE_EVENT_CLASS(tx_rx_evt,
1508 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1509 TP_ARGS(wiphy, rx, tx),
1520 TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
1521 WIPHY_PR_ARG, __entry->tx, __entry->rx)
1524 DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
1525 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1526 TP_ARGS(wiphy, rx, tx)
1529 TRACE_EVENT(rdev_sched_scan_start,
1530 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1531 struct cfg80211_sched_scan_request *request),
1532 TP_ARGS(wiphy, netdev, request),
1541 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
1542 WIPHY_PR_ARG, NETDEV_PR_ARG)
1545 TRACE_EVENT(rdev_tdls_mgmt,
1546 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1547 u8 *peer, u8 action_code, u8 dialog_token,
1548 u16 status_code, u32 peer_capability,
1549 bool initiator, const u8 *buf, size_t len),
1550 TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
1551 peer_capability, initiator, buf, len),
1556 __field(u8, action_code)
1557 __field(u8, dialog_token)
1558 __field(u16, status_code)
1559 __field(u32, peer_capability)
1560 __field(bool, initiator)
1561 __dynamic_array(u8, buf, len)
1566 MAC_ASSIGN(peer, peer);
1567 __entry->action_code = action_code;
1568 __entry->dialog_token = dialog_token;
1569 __entry->status_code = status_code;
1570 __entry->peer_capability = peer_capability;
1571 __entry->initiator = initiator;
1572 memcpy(__get_dynamic_array(buf), buf, len);
1574 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, "
1575 "dialog_token: %u, status_code: %u, peer_capability: %u "
1576 "initiator: %s buf: %#.2x ",
1577 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
1578 __entry->action_code, __entry->dialog_token,
1579 __entry->status_code, __entry->peer_capability,
1580 BOOL_TO_STR(__entry->initiator),
1581 ((u8 *)__get_dynamic_array(buf))[0])
1584 TRACE_EVENT(rdev_dump_survey,
1585 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx),
1586 TP_ARGS(wiphy, netdev, idx),
1597 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
1598 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
1601 TRACE_EVENT(rdev_return_int_survey_info,
1602 TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
1603 TP_ARGS(wiphy, ret, info),
1609 __field(u64, time_busy)
1610 __field(u64, time_ext_busy)
1611 __field(u64, time_rx)
1612 __field(u64, time_tx)
1613 __field(u64, time_scan)
1614 __field(u32, filled)
1619 CHAN_ASSIGN(info->channel);
1621 __entry->time = info->time;
1622 __entry->time_busy = info->time_busy;
1623 __entry->time_ext_busy = info->time_ext_busy;
1624 __entry->time_rx = info->time_rx;
1625 __entry->time_tx = info->time_tx;
1626 __entry->time_scan = info->time_scan;
1627 __entry->filled = info->filled;
1628 __entry->noise = info->noise;
1630 TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
1631 ", channel time: %llu, channel time busy: %llu, "
1632 "channel time extension busy: %llu, channel time rx: %llu, "
1633 "channel time tx: %llu, scan time: %llu, filled: %u, noise: %d",
1634 WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
1635 __entry->time, __entry->time_busy,
1636 __entry->time_ext_busy, __entry->time_rx,
1637 __entry->time_tx, __entry->time_scan,
1638 __entry->filled, __entry->noise)
1641 TRACE_EVENT(rdev_tdls_oper,
1642 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1643 u8 *peer, enum nl80211_tdls_operation oper),
1644 TP_ARGS(wiphy, netdev, peer, oper),
1649 __field(enum nl80211_tdls_operation, oper)
1654 MAC_ASSIGN(peer, peer);
1655 __entry->oper = oper;
1657 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d",
1658 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
1661 DECLARE_EVENT_CLASS(rdev_pmksa,
1662 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1663 struct cfg80211_pmksa *pmksa),
1664 TP_ARGS(wiphy, netdev, pmksa),
1673 MAC_ASSIGN(bssid, pmksa->bssid);
1675 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
1676 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
1679 TRACE_EVENT(rdev_probe_client,
1680 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1682 TP_ARGS(wiphy, netdev, peer),
1691 MAC_ASSIGN(peer, peer);
1693 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
1694 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1697 DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
1698 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1699 struct cfg80211_pmksa *pmksa),
1700 TP_ARGS(wiphy, netdev, pmksa)
1703 DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
1704 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1705 struct cfg80211_pmksa *pmksa),
1706 TP_ARGS(wiphy, netdev, pmksa)
1709 TRACE_EVENT(rdev_remain_on_channel,
1710 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1711 struct ieee80211_channel *chan,
1712 unsigned int duration),
1713 TP_ARGS(wiphy, wdev, chan, duration),
1718 __field(unsigned int, duration)
1724 __entry->duration = duration;
1726 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
1727 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
1730 TRACE_EVENT(rdev_return_int_cookie,
1731 TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
1732 TP_ARGS(wiphy, ret, cookie),
1736 __field(u64, cookie)
1741 __entry->cookie = cookie;
1743 TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
1744 WIPHY_PR_ARG, __entry->ret, __entry->cookie)
1747 TRACE_EVENT(rdev_cancel_remain_on_channel,
1748 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
1749 TP_ARGS(wiphy, wdev, cookie),
1753 __field(u64, cookie)
1758 __entry->cookie = cookie;
1760 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
1761 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1764 TRACE_EVENT(rdev_mgmt_tx,
1765 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1766 struct cfg80211_mgmt_tx_params *params),
1767 TP_ARGS(wiphy, wdev, params),
1772 __field(bool, offchan)
1773 __field(unsigned int, wait)
1774 __field(bool, no_cck)
1775 __field(bool, dont_wait_for_ack)
1780 CHAN_ASSIGN(params->chan);
1781 __entry->offchan = params->offchan;
1782 __entry->wait = params->wait;
1783 __entry->no_cck = params->no_cck;
1784 __entry->dont_wait_for_ack = params->dont_wait_for_ack;
1786 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
1787 " wait: %u, no cck: %s, dont wait for ack: %s",
1788 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
1789 BOOL_TO_STR(__entry->offchan), __entry->wait,
1790 BOOL_TO_STR(__entry->no_cck),
1791 BOOL_TO_STR(__entry->dont_wait_for_ack))
1794 TRACE_EVENT(rdev_set_noack_map,
1795 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1797 TP_ARGS(wiphy, netdev, noack_map),
1801 __field(u16, noack_map)
1806 __entry->noack_map = noack_map;
1808 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
1809 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
1812 DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel,
1813 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1814 TP_ARGS(wiphy, wdev)
1817 TRACE_EVENT(rdev_return_chandef,
1818 TP_PROTO(struct wiphy *wiphy, int ret,
1819 struct cfg80211_chan_def *chandef),
1820 TP_ARGS(wiphy, ret, chandef),
1829 CHAN_DEF_ASSIGN(chandef);
1831 CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
1834 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
1835 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
1838 DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
1839 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1840 TP_ARGS(wiphy, wdev)
1843 DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
1844 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1845 TP_ARGS(wiphy, wdev)
1848 TRACE_EVENT(rdev_set_mac_acl,
1849 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1850 struct cfg80211_acl_data *params),
1851 TP_ARGS(wiphy, netdev, params),
1855 __field(u32, acl_policy)
1860 __entry->acl_policy = params->acl_policy;
1862 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
1863 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
1866 TRACE_EVENT(rdev_update_ft_ies,
1867 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1868 struct cfg80211_update_ft_ies_params *ftie),
1869 TP_ARGS(wiphy, netdev, ftie),
1874 __dynamic_array(u8, ie, ftie->ie_len)
1879 __entry->md = ftie->md;
1880 memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
1882 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
1883 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
1886 TRACE_EVENT(rdev_crit_proto_start,
1887 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1888 enum nl80211_crit_proto_id protocol, u16 duration),
1889 TP_ARGS(wiphy, wdev, protocol, duration),
1894 __field(u16, duration)
1899 __entry->proto = protocol;
1900 __entry->duration = duration;
1902 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
1903 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
1906 TRACE_EVENT(rdev_crit_proto_stop,
1907 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1908 TP_ARGS(wiphy, wdev),
1917 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
1918 WIPHY_PR_ARG, WDEV_PR_ARG)
1921 TRACE_EVENT(rdev_channel_switch,
1922 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1923 struct cfg80211_csa_settings *params),
1924 TP_ARGS(wiphy, netdev, params),
1929 __field(bool, radar_required)
1930 __field(bool, block_tx)
1932 __dynamic_array(u16, bcn_ofs, params->n_counter_offsets_beacon)
1933 __dynamic_array(u16, pres_ofs, params->n_counter_offsets_presp)
1938 CHAN_DEF_ASSIGN(¶ms->chandef);
1939 __entry->radar_required = params->radar_required;
1940 __entry->block_tx = params->block_tx;
1941 __entry->count = params->count;
1942 memcpy(__get_dynamic_array(bcn_ofs),
1943 params->counter_offsets_beacon,
1944 params->n_counter_offsets_beacon * sizeof(u16));
1946 /* probe response offsets are optional */
1947 if (params->n_counter_offsets_presp)
1948 memcpy(__get_dynamic_array(pres_ofs),
1949 params->counter_offsets_presp,
1950 params->n_counter_offsets_presp * sizeof(u16));
1952 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
1953 ", block_tx: %d, count: %u, radar_required: %d",
1954 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
1955 __entry->block_tx, __entry->count, __entry->radar_required)
1958 TRACE_EVENT(rdev_set_qos_map,
1959 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1960 struct cfg80211_qos_map *qos_map),
1961 TP_ARGS(wiphy, netdev, qos_map),
1970 QOS_MAP_ASSIGN(qos_map);
1972 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u",
1973 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des)
1976 TRACE_EVENT(rdev_set_ap_chanwidth,
1977 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1978 struct cfg80211_chan_def *chandef),
1979 TP_ARGS(wiphy, netdev, chandef),
1988 CHAN_DEF_ASSIGN(chandef);
1990 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
1991 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
1994 TRACE_EVENT(rdev_add_tx_ts,
1995 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1996 u8 tsid, const u8 *peer, u8 user_prio, u16 admitted_time),
1997 TP_ARGS(wiphy, netdev, tsid, peer, user_prio, admitted_time),
2003 __field(u8, user_prio)
2004 __field(u16, admitted_time)
2009 MAC_ASSIGN(peer, peer);
2010 __entry->tsid = tsid;
2011 __entry->user_prio = user_prio;
2012 __entry->admitted_time = admitted_time;
2014 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d, UP %d, time %d",
2015 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
2016 __entry->tsid, __entry->user_prio, __entry->admitted_time)
2019 TRACE_EVENT(rdev_del_tx_ts,
2020 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2021 u8 tsid, const u8 *peer),
2022 TP_ARGS(wiphy, netdev, tsid, peer),
2032 MAC_ASSIGN(peer, peer);
2033 __entry->tsid = tsid;
2035 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d",
2036 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tsid)
2039 TRACE_EVENT(rdev_tdls_channel_switch,
2040 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2041 const u8 *addr, u8 oper_class,
2042 struct cfg80211_chan_def *chandef),
2043 TP_ARGS(wiphy, netdev, addr, oper_class, chandef),
2048 __field(u8, oper_class)
2054 MAC_ASSIGN(addr, addr);
2055 CHAN_DEF_ASSIGN(chandef);
2057 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT
2058 " oper class %d, " CHAN_DEF_PR_FMT,
2059 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr),
2060 __entry->oper_class, CHAN_DEF_PR_ARG)
2063 TRACE_EVENT(rdev_tdls_cancel_channel_switch,
2064 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2066 TP_ARGS(wiphy, netdev, addr),
2075 MAC_ASSIGN(addr, addr);
2077 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
2078 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr))
2081 /*************************************************************
2082 * cfg80211 exported functions traces *
2083 *************************************************************/
2085 TRACE_EVENT(cfg80211_return_bool,
2094 TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
2097 DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
2098 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2099 TP_ARGS(netdev, macaddr),
2106 MAC_ASSIGN(macaddr, macaddr);
2108 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2109 NETDEV_PR_ARG, MAC_PR_ARG(macaddr))
2112 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
2113 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2114 TP_ARGS(netdev, macaddr)
2117 DECLARE_EVENT_CLASS(netdev_evt_only,
2118 TP_PROTO(struct net_device *netdev),
2126 TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
2129 DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
2130 TP_PROTO(struct net_device *netdev),
2134 TRACE_EVENT(cfg80211_send_rx_assoc,
2135 TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss),
2136 TP_ARGS(netdev, bss),
2144 MAC_ASSIGN(bssid, bss->bssid);
2145 CHAN_ASSIGN(bss->channel);
2147 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT,
2148 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2151 DECLARE_EVENT_CLASS(netdev_frame_event,
2152 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2153 TP_ARGS(netdev, buf, len),
2156 __dynamic_array(u8, frame, len)
2160 memcpy(__get_dynamic_array(frame), buf, len);
2162 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2164 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
2167 DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
2168 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2169 TP_ARGS(netdev, buf, len)
2172 DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
2173 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2174 TP_ARGS(netdev, buf, len)
2177 TRACE_EVENT(cfg80211_tx_mlme_mgmt,
2178 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2179 TP_ARGS(netdev, buf, len),
2182 __dynamic_array(u8, frame, len)
2186 memcpy(__get_dynamic_array(frame), buf, len);
2188 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2190 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
2193 DECLARE_EVENT_CLASS(netdev_mac_evt,
2194 TP_PROTO(struct net_device *netdev, const u8 *mac),
2195 TP_ARGS(netdev, mac),
2202 MAC_ASSIGN(mac, mac)
2204 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2205 NETDEV_PR_ARG, MAC_PR_ARG(mac))
2208 DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
2209 TP_PROTO(struct net_device *netdev, const u8 *mac),
2210 TP_ARGS(netdev, mac)
2213 DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout,
2214 TP_PROTO(struct net_device *netdev, const u8 *mac),
2215 TP_ARGS(netdev, mac)
2218 TRACE_EVENT(cfg80211_michael_mic_failure,
2219 TP_PROTO(struct net_device *netdev, const u8 *addr,
2220 enum nl80211_key_type key_type, int key_id, const u8 *tsc),
2221 TP_ARGS(netdev, addr, key_type, key_id, tsc),
2225 __field(enum nl80211_key_type, key_type)
2226 __field(int, key_id)
2231 MAC_ASSIGN(addr, addr);
2232 __entry->key_type = key_type;
2233 __entry->key_id = key_id;
2235 memcpy(__entry->tsc, tsc, 6);
2237 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
2238 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,
2239 __entry->key_id, __entry->tsc)
2242 TRACE_EVENT(cfg80211_ready_on_channel,
2243 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2244 struct ieee80211_channel *chan,
2245 unsigned int duration),
2246 TP_ARGS(wdev, cookie, chan, duration),
2249 __field(u64, cookie)
2251 __field(unsigned int, duration)
2255 __entry->cookie = cookie;
2257 __entry->duration = duration;
2259 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
2260 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
2264 TRACE_EVENT(cfg80211_ready_on_channel_expired,
2265 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2266 struct ieee80211_channel *chan),
2267 TP_ARGS(wdev, cookie, chan),
2270 __field(u64, cookie)
2275 __entry->cookie = cookie;
2278 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
2279 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
2282 TRACE_EVENT(cfg80211_new_sta,
2283 TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
2284 struct station_info *sinfo),
2285 TP_ARGS(netdev, mac_addr, sinfo),
2293 MAC_ASSIGN(mac_addr, mac_addr);
2296 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT,
2297 NETDEV_PR_ARG, MAC_PR_ARG(mac_addr))
2300 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
2301 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2302 TP_ARGS(netdev, macaddr)
2305 TRACE_EVENT(cfg80211_rx_mgmt,
2306 TP_PROTO(struct wireless_dev *wdev, int freq, int sig_mbm),
2307 TP_ARGS(wdev, freq, sig_mbm),
2311 __field(int, sig_mbm)
2315 __entry->freq = freq;
2316 __entry->sig_mbm = sig_mbm;
2318 TP_printk(WDEV_PR_FMT ", freq: %d, sig mbm: %d",
2319 WDEV_PR_ARG, __entry->freq, __entry->sig_mbm)
2322 TRACE_EVENT(cfg80211_mgmt_tx_status,
2323 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
2324 TP_ARGS(wdev, cookie, ack),
2327 __field(u64, cookie)
2332 __entry->cookie = cookie;
2335 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
2336 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
2339 TRACE_EVENT(cfg80211_cqm_rssi_notify,
2340 TP_PROTO(struct net_device *netdev,
2341 enum nl80211_cqm_rssi_threshold_event rssi_event),
2342 TP_ARGS(netdev, rssi_event),
2345 __field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
2349 __entry->rssi_event = rssi_event;
2351 TP_printk(NETDEV_PR_FMT ", rssi event: %d",
2352 NETDEV_PR_ARG, __entry->rssi_event)
2355 TRACE_EVENT(cfg80211_reg_can_beacon,
2356 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
2357 enum nl80211_iftype iftype),
2358 TP_ARGS(wiphy, chandef, iftype),
2362 __field(enum nl80211_iftype, iftype)
2366 CHAN_DEF_ASSIGN(chandef);
2367 __entry->iftype = iftype;
2369 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d",
2370 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype)
2373 TRACE_EVENT(cfg80211_chandef_dfs_required,
2374 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2375 TP_ARGS(wiphy, chandef),
2382 CHAN_DEF_ASSIGN(chandef);
2384 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2385 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2388 TRACE_EVENT(cfg80211_ch_switch_notify,
2389 TP_PROTO(struct net_device *netdev,
2390 struct cfg80211_chan_def *chandef),
2391 TP_ARGS(netdev, chandef),
2398 CHAN_DEF_ASSIGN(chandef);
2400 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2401 NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2404 TRACE_EVENT(cfg80211_ch_switch_started_notify,
2405 TP_PROTO(struct net_device *netdev,
2406 struct cfg80211_chan_def *chandef),
2407 TP_ARGS(netdev, chandef),
2414 CHAN_DEF_ASSIGN(chandef);
2416 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2417 NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2420 TRACE_EVENT(cfg80211_radar_event,
2421 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2422 TP_ARGS(wiphy, chandef),
2429 CHAN_DEF_ASSIGN(chandef);
2431 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2432 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2435 TRACE_EVENT(cfg80211_cac_event,
2436 TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt),
2437 TP_ARGS(netdev, evt),
2440 __field(enum nl80211_radar_event, evt)
2446 TP_printk(NETDEV_PR_FMT ", event: %d",
2447 NETDEV_PR_ARG, __entry->evt)
2450 DECLARE_EVENT_CLASS(cfg80211_rx_evt,
2451 TP_PROTO(struct net_device *netdev, const u8 *addr),
2452 TP_ARGS(netdev, addr),
2459 MAC_ASSIGN(addr, addr);
2461 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
2464 DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
2465 TP_PROTO(struct net_device *netdev, const u8 *addr),
2466 TP_ARGS(netdev, addr)
2469 DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
2470 TP_PROTO(struct net_device *netdev, const u8 *addr),
2471 TP_ARGS(netdev, addr)
2474 TRACE_EVENT(cfg80211_ibss_joined,
2475 TP_PROTO(struct net_device *netdev, const u8 *bssid,
2476 struct ieee80211_channel *channel),
2477 TP_ARGS(netdev, bssid, channel),
2485 MAC_ASSIGN(bssid, bssid);
2486 CHAN_ASSIGN(channel);
2488 TP_printk(NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", " CHAN_PR_FMT,
2489 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2492 TRACE_EVENT(cfg80211_probe_status,
2493 TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
2495 TP_ARGS(netdev, addr, cookie, acked),
2499 __field(u64, cookie)
2500 __field(bool, acked)
2504 MAC_ASSIGN(addr, addr);
2505 __entry->cookie = cookie;
2506 __entry->acked = acked;
2508 TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
2509 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
2510 BOOL_TO_STR(__entry->acked))
2513 TRACE_EVENT(cfg80211_cqm_pktloss_notify,
2514 TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
2515 TP_ARGS(netdev, peer, num_packets),
2519 __field(u32, num_packets)
2523 MAC_ASSIGN(peer, peer);
2524 __entry->num_packets = num_packets;
2526 TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u",
2527 NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets)
2530 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
2531 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2532 TP_ARGS(netdev, macaddr)
2535 TRACE_EVENT(cfg80211_pmksa_candidate_notify,
2536 TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
2538 TP_ARGS(netdev, index, bssid, preauth),
2543 __field(bool, preauth)
2547 __entry->index = index;
2548 MAC_ASSIGN(bssid, bssid);
2549 __entry->preauth = preauth;
2551 TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s",
2552 NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid),
2553 BOOL_TO_STR(__entry->preauth))
2556 TRACE_EVENT(cfg80211_report_obss_beacon,
2557 TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
2558 int freq, int sig_dbm),
2559 TP_ARGS(wiphy, frame, len, freq, sig_dbm),
2563 __field(int, sig_dbm)
2567 __entry->freq = freq;
2568 __entry->sig_dbm = sig_dbm;
2570 TP_printk(WIPHY_PR_FMT ", freq: %d, sig_dbm: %d",
2571 WIPHY_PR_ARG, __entry->freq, __entry->sig_dbm)
2574 TRACE_EVENT(cfg80211_tdls_oper_request,
2575 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
2576 enum nl80211_tdls_operation oper, u16 reason_code),
2577 TP_ARGS(wiphy, netdev, peer, oper, reason_code),
2582 __field(enum nl80211_tdls_operation, oper)
2583 __field(u16, reason_code)
2588 MAC_ASSIGN(peer, peer);
2589 __entry->oper = oper;
2590 __entry->reason_code = reason_code;
2592 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u",
2593 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper,
2594 __entry->reason_code)
2597 TRACE_EVENT(cfg80211_scan_done,
2598 TP_PROTO(struct cfg80211_scan_request *request, bool aborted),
2599 TP_ARGS(request, aborted),
2601 __field(u32, n_channels)
2602 __dynamic_array(u8, ie, request ? request->ie_len : 0)
2603 __array(u32, rates, IEEE80211_NUM_BANDS)
2604 __field(u32, wdev_id)
2605 MAC_ENTRY(wiphy_mac)
2606 __field(bool, no_cck)
2607 __field(bool, aborted)
2611 memcpy(__get_dynamic_array(ie), request->ie,
2613 memcpy(__entry->rates, request->rates,
2614 IEEE80211_NUM_BANDS);
2615 __entry->wdev_id = request->wdev ?
2616 request->wdev->identifier : 0;
2618 MAC_ASSIGN(wiphy_mac,
2619 request->wiphy->perm_addr);
2620 __entry->no_cck = request->no_cck;
2622 __entry->aborted = aborted;
2624 TP_printk("aborted: %s", BOOL_TO_STR(__entry->aborted))
2627 DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_results,
2628 TP_PROTO(struct wiphy *wiphy),
2632 DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_stopped,
2633 TP_PROTO(struct wiphy *wiphy),
2637 TRACE_EVENT(cfg80211_get_bss,
2638 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
2639 const u8 *bssid, const u8 *ssid, size_t ssid_len,
2640 u16 capa_mask, u16 capa_val),
2641 TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, capa_mask, capa_val),
2646 __dynamic_array(u8, ssid, ssid_len)
2647 __field(u16, capa_mask)
2648 __field(u16, capa_val)
2652 CHAN_ASSIGN(channel);
2653 MAC_ASSIGN(bssid, bssid);
2654 memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
2655 __entry->capa_mask = capa_mask;
2656 __entry->capa_val = capa_val;
2658 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT ", buf: %#.2x, "
2659 "capa_mask: %d, capa_val: %u", WIPHY_PR_ARG, CHAN_PR_ARG,
2660 MAC_PR_ARG(bssid), ((u8 *)__get_dynamic_array(ssid))[0],
2661 __entry->capa_mask, __entry->capa_val)
2664 TRACE_EVENT(cfg80211_inform_bss_width_frame,
2665 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
2666 enum nl80211_bss_scan_width scan_width,
2667 struct ieee80211_mgmt *mgmt, size_t len,
2669 TP_ARGS(wiphy, channel, scan_width, mgmt, len, signal),
2673 __field(enum nl80211_bss_scan_width, scan_width)
2674 __dynamic_array(u8, mgmt, len)
2675 __field(s32, signal)
2679 CHAN_ASSIGN(channel);
2680 __entry->scan_width = scan_width;
2682 memcpy(__get_dynamic_array(mgmt), mgmt, len);
2683 __entry->signal = signal;
2685 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT "(scan_width: %d) signal: %d",
2686 WIPHY_PR_ARG, CHAN_PR_ARG, __entry->scan_width,
2690 DECLARE_EVENT_CLASS(cfg80211_bss_evt,
2691 TP_PROTO(struct cfg80211_bss *pub),
2698 MAC_ASSIGN(bssid, pub->bssid);
2699 CHAN_ASSIGN(pub->channel);
2701 TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2704 DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
2705 TP_PROTO(struct cfg80211_bss *pub),
2709 TRACE_EVENT(cfg80211_return_uint,
2710 TP_PROTO(unsigned int ret),
2713 __field(unsigned int, ret)
2718 TP_printk("ret: %d", __entry->ret)
2721 TRACE_EVENT(cfg80211_return_u32,
2730 TP_printk("ret: %u", __entry->ret)
2733 TRACE_EVENT(cfg80211_report_wowlan_wakeup,
2734 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2735 struct cfg80211_wowlan_wakeup *wakeup),
2736 TP_ARGS(wiphy, wdev, wakeup),
2740 __field(bool, non_wireless)
2741 __field(bool, disconnect)
2742 __field(bool, magic_pkt)
2743 __field(bool, gtk_rekey_failure)
2744 __field(bool, eap_identity_req)
2745 __field(bool, four_way_handshake)
2746 __field(bool, rfkill_release)
2747 __field(s32, pattern_idx)
2748 __field(u32, packet_len)
2749 __dynamic_array(u8, packet,
2750 wakeup ? wakeup->packet_present_len : 0)
2755 __entry->non_wireless = !wakeup;
2756 __entry->disconnect = wakeup ? wakeup->disconnect : false;
2757 __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
2758 __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
2759 __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
2760 __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
2761 __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
2762 __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
2763 __entry->packet_len = wakeup ? wakeup->packet_len : false;
2764 if (wakeup && wakeup->packet && wakeup->packet_present_len)
2765 memcpy(__get_dynamic_array(packet), wakeup->packet,
2766 wakeup->packet_present_len);
2768 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
2771 TRACE_EVENT(cfg80211_ft_event,
2772 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2773 struct cfg80211_ft_event_params *ft_event),
2774 TP_ARGS(wiphy, netdev, ft_event),
2778 __dynamic_array(u8, ies, ft_event->ies_len)
2779 MAC_ENTRY(target_ap)
2780 __dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
2786 memcpy(__get_dynamic_array(ies), ft_event->ies,
2788 MAC_ASSIGN(target_ap, ft_event->target_ap);
2789 if (ft_event->ric_ies)
2790 memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
2791 ft_event->ric_ies_len);
2793 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT,
2794 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
2797 TRACE_EVENT(cfg80211_stop_iface,
2798 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2799 TP_ARGS(wiphy, wdev),
2808 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
2809 WIPHY_PR_ARG, WDEV_PR_ARG)
2812 #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
2814 #undef TRACE_INCLUDE_PATH
2815 #define TRACE_INCLUDE_PATH .
2816 #undef TRACE_INCLUDE_FILE
2817 #define TRACE_INCLUDE_FILE trace
2818 #include <trace/define_trace.h>