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>
13 #define MAC_ENTRY(entry_mac) __array(u8, entry_mac, ETH_ALEN)
14 #define MAC_ASSIGN(entry_mac, given_mac) do { \
16 memcpy(__entry->entry_mac, given_mac, ETH_ALEN); \
18 memset(__entry->entry_mac, 0, ETH_ALEN); \
20 #define MAC_PR_FMT "%pM"
21 #define MAC_PR_ARG(entry_mac) (__entry->entry_mac)
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) \
37 #define NETDEV_ASSIGN \
39 memcpy(__entry->name, netdev->name, IFNAMSIZ); \
40 (__entry->ifindex) = (netdev->ifindex); \
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 \
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; \
112 #define CHAN_ENTRY __field(enum ieee80211_band, band) \
113 __field(u16, center_freq)
114 #define CHAN_ASSIGN(chan) \
117 __entry->band = chan->band; \
118 __entry->center_freq = chan->center_freq; \
121 __entry->center_freq = 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) \
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;\
143 __entry->control_freq = 0; \
144 __entry->width = 0; \
145 __entry->center_freq1 = 0; \
146 __entry->center_freq2 = 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) \
168 __field(u8, plink_state)
169 #define SINFO_ASSIGN \
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; \
187 #define BOOL_TO_STR(bo) (bo) ? "true" : "false"
189 /*************************************************************
191 *************************************************************/
193 TRACE_EVENT(rdev_suspend
,
194 TP_PROTO(struct wiphy
*wiphy
, struct cfg80211_wowlan
*wow
),
199 __field(bool, disconnect
)
200 __field(bool, magic_pkt
)
201 __field(bool, gtk_rekey_failure
)
202 __field(bool, eap_identity_req
)
203 __field(bool, four_way_handshake
)
204 __field(bool, rfkill_release
)
205 __field(bool, valid_wow
)
210 __entry
->any
= wow
->any
;
211 __entry
->disconnect
= wow
->disconnect
;
212 __entry
->magic_pkt
= wow
->magic_pkt
;
213 __entry
->gtk_rekey_failure
= wow
->gtk_rekey_failure
;
214 __entry
->eap_identity_req
= wow
->eap_identity_req
;
215 __entry
->four_way_handshake
= wow
->four_way_handshake
;
216 __entry
->rfkill_release
= wow
->rfkill_release
;
217 __entry
->valid_wow
= true;
219 __entry
->valid_wow
= false;
222 TP_printk(WIPHY_PR_FMT
", wow%s - any: %d, disconnect: %d, "
223 "magic pkt: %d, gtk rekey failure: %d, eap identify req: %d, "
224 "four way handshake: %d, rfkill release: %d.",
225 WIPHY_PR_ARG
, __entry
->valid_wow
? "" : "(Not configured!)",
226 __entry
->any
, __entry
->disconnect
, __entry
->magic_pkt
,
227 __entry
->gtk_rekey_failure
, __entry
->eap_identity_req
,
228 __entry
->four_way_handshake
, __entry
->rfkill_release
)
231 TRACE_EVENT(rdev_return_int
,
232 TP_PROTO(struct wiphy
*wiphy
, int ret
),
242 TP_printk(WIPHY_PR_FMT
", returned: %d", WIPHY_PR_ARG
, __entry
->ret
)
245 TRACE_EVENT(rdev_scan
,
246 TP_PROTO(struct wiphy
*wiphy
, struct cfg80211_scan_request
*request
),
247 TP_ARGS(wiphy
, request
),
254 TP_printk(WIPHY_PR_FMT
, WIPHY_PR_ARG
)
257 DECLARE_EVENT_CLASS(wiphy_only_evt
,
258 TP_PROTO(struct wiphy
*wiphy
),
266 TP_printk(WIPHY_PR_FMT
, WIPHY_PR_ARG
)
269 DEFINE_EVENT(wiphy_only_evt
, rdev_resume
,
270 TP_PROTO(struct wiphy
*wiphy
),
274 DEFINE_EVENT(wiphy_only_evt
, rdev_return_void
,
275 TP_PROTO(struct wiphy
*wiphy
),
279 DEFINE_EVENT(wiphy_only_evt
, rdev_get_ringparam
,
280 TP_PROTO(struct wiphy
*wiphy
),
284 DEFINE_EVENT(wiphy_only_evt
, rdev_get_antenna
,
285 TP_PROTO(struct wiphy
*wiphy
),
289 DEFINE_EVENT(wiphy_only_evt
, rdev_rfkill_poll
,
290 TP_PROTO(struct wiphy
*wiphy
),
294 DECLARE_EVENT_CLASS(wiphy_enabled_evt
,
295 TP_PROTO(struct wiphy
*wiphy
, bool enabled
),
296 TP_ARGS(wiphy
, enabled
),
299 __field(bool, enabled
)
303 __entry
->enabled
= enabled
;
305 TP_printk(WIPHY_PR_FMT
", %senabled ",
306 WIPHY_PR_ARG
, __entry
->enabled
? "" : "not ")
309 DEFINE_EVENT(wiphy_enabled_evt
, rdev_set_wakeup
,
310 TP_PROTO(struct wiphy
*wiphy
, bool enabled
),
311 TP_ARGS(wiphy
, enabled
)
314 TRACE_EVENT(rdev_add_virtual_intf
,
315 TP_PROTO(struct wiphy
*wiphy
, char *name
, enum nl80211_iftype type
),
316 TP_ARGS(wiphy
, name
, type
),
319 __string(vir_intf_name
, name
? name
: "<noname>")
320 __field(enum nl80211_iftype
, type
)
324 __assign_str(vir_intf_name
, name
? name
: "<noname>");
325 __entry
->type
= type
;
327 TP_printk(WIPHY_PR_FMT
", virtual intf name: %s, type: %d",
328 WIPHY_PR_ARG
, __get_str(vir_intf_name
), __entry
->type
)
331 DECLARE_EVENT_CLASS(wiphy_wdev_evt
,
332 TP_PROTO(struct wiphy
*wiphy
, struct wireless_dev
*wdev
),
333 TP_ARGS(wiphy
, wdev
),
342 TP_printk(WIPHY_PR_FMT
", " WDEV_PR_FMT
, WIPHY_PR_ARG
, WDEV_PR_ARG
)
345 DEFINE_EVENT(wiphy_wdev_evt
, rdev_return_wdev
,
346 TP_PROTO(struct wiphy
*wiphy
, struct wireless_dev
*wdev
),
350 DEFINE_EVENT(wiphy_wdev_evt
, rdev_del_virtual_intf
,
351 TP_PROTO(struct wiphy
*wiphy
, struct wireless_dev
*wdev
),
355 TRACE_EVENT(rdev_change_virtual_intf
,
356 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
357 enum nl80211_iftype type
),
358 TP_ARGS(wiphy
, netdev
, type
),
362 __field(enum nl80211_iftype
, type
)
367 __entry
->type
= type
;
369 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", type: %d",
370 WIPHY_PR_ARG
, NETDEV_PR_ARG
, __entry
->type
)
373 DECLARE_EVENT_CLASS(key_handle
,
374 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, u8 key_index
,
375 bool pairwise
, const u8
*mac_addr
),
376 TP_ARGS(wiphy
, netdev
, key_index
, pairwise
, mac_addr
),
381 __field(u8
, key_index
)
382 __field(bool, pairwise
)
387 MAC_ASSIGN(mac_addr
, mac_addr
);
388 __entry
->key_index
= key_index
;
389 __entry
->pairwise
= pairwise
;
391 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", key_index: %u, pairwise: %s, mac addr: " MAC_PR_FMT
,
392 WIPHY_PR_ARG
, NETDEV_PR_ARG
, __entry
->key_index
,
393 BOOL_TO_STR(__entry
->pairwise
), MAC_PR_ARG(mac_addr
))
396 DEFINE_EVENT(key_handle
, rdev_add_key
,
397 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, u8 key_index
,
398 bool pairwise
, const u8
*mac_addr
),
399 TP_ARGS(wiphy
, netdev
, key_index
, pairwise
, mac_addr
)
402 DEFINE_EVENT(key_handle
, rdev_get_key
,
403 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, u8 key_index
,
404 bool pairwise
, const u8
*mac_addr
),
405 TP_ARGS(wiphy
, netdev
, key_index
, pairwise
, mac_addr
)
408 DEFINE_EVENT(key_handle
, rdev_del_key
,
409 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, u8 key_index
,
410 bool pairwise
, const u8
*mac_addr
),
411 TP_ARGS(wiphy
, netdev
, key_index
, pairwise
, mac_addr
)
414 TRACE_EVENT(rdev_set_default_key
,
415 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, u8 key_index
,
416 bool unicast
, bool multicast
),
417 TP_ARGS(wiphy
, netdev
, key_index
, unicast
, multicast
),
421 __field(u8
, key_index
)
422 __field(bool, unicast
)
423 __field(bool, multicast
)
428 __entry
->key_index
= key_index
;
429 __entry
->unicast
= unicast
;
430 __entry
->multicast
= multicast
;
432 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", key index: %u, unicast: %s, multicast: %s",
433 WIPHY_PR_ARG
, NETDEV_PR_ARG
, __entry
->key_index
,
434 BOOL_TO_STR(__entry
->unicast
),
435 BOOL_TO_STR(__entry
->multicast
))
438 TRACE_EVENT(rdev_set_default_mgmt_key
,
439 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, u8 key_index
),
440 TP_ARGS(wiphy
, netdev
, key_index
),
444 __field(u8
, key_index
)
449 __entry
->key_index
= key_index
;
451 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", key index: %u",
452 WIPHY_PR_ARG
, NETDEV_PR_ARG
, __entry
->key_index
)
455 TRACE_EVENT(rdev_start_ap
,
456 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
457 struct cfg80211_ap_settings
*settings
),
458 TP_ARGS(wiphy
, netdev
, settings
),
463 __field(int, beacon_interval
)
464 __field(int, dtim_period
)
465 __array(char, ssid
, IEEE80211_MAX_SSID_LEN
+ 1)
466 __field(enum nl80211_hidden_ssid
, hidden_ssid
)
467 __field(u32
, wpa_ver
)
468 __field(bool, privacy
)
469 __field(enum nl80211_auth_type
, auth_type
)
470 __field(int, inactivity_timeout
)
475 CHAN_DEF_ASSIGN(&settings
->chandef
);
476 __entry
->beacon_interval
= settings
->beacon_interval
;
477 __entry
->dtim_period
= settings
->dtim_period
;
478 __entry
->hidden_ssid
= settings
->hidden_ssid
;
479 __entry
->wpa_ver
= settings
->crypto
.wpa_versions
;
480 __entry
->privacy
= settings
->privacy
;
481 __entry
->auth_type
= settings
->auth_type
;
482 __entry
->inactivity_timeout
= settings
->inactivity_timeout
;
483 memset(__entry
->ssid
, 0, IEEE80211_MAX_SSID_LEN
+ 1);
484 memcpy(__entry
->ssid
, settings
->ssid
, settings
->ssid_len
);
486 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", AP settings - ssid: %s, "
487 CHAN_DEF_PR_FMT
", beacon interval: %d, dtim period: %d, "
488 "hidden ssid: %d, wpa versions: %u, privacy: %s, "
489 "auth type: %d, inactivity timeout: %d",
490 WIPHY_PR_ARG
, NETDEV_PR_ARG
, __entry
->ssid
, CHAN_DEF_PR_ARG
,
491 __entry
->beacon_interval
, __entry
->dtim_period
,
492 __entry
->hidden_ssid
, __entry
->wpa_ver
,
493 BOOL_TO_STR(__entry
->privacy
), __entry
->auth_type
,
494 __entry
->inactivity_timeout
)
497 TRACE_EVENT(rdev_change_beacon
,
498 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
499 struct cfg80211_beacon_data
*info
),
500 TP_ARGS(wiphy
, netdev
, info
),
504 __dynamic_array(u8
, head
, info
? info
->head_len
: 0)
505 __dynamic_array(u8
, tail
, info
? info
->tail_len
: 0)
506 __dynamic_array(u8
, beacon_ies
, info
? info
->beacon_ies_len
: 0)
507 __dynamic_array(u8
, proberesp_ies
,
508 info
? info
->proberesp_ies_len
: 0)
509 __dynamic_array(u8
, assocresp_ies
,
510 info
? info
->assocresp_ies_len
: 0)
511 __dynamic_array(u8
, probe_resp
, info
? info
->probe_resp_len
: 0)
518 memcpy(__get_dynamic_array(head
), info
->head
,
521 memcpy(__get_dynamic_array(tail
), info
->tail
,
523 if (info
->beacon_ies
)
524 memcpy(__get_dynamic_array(beacon_ies
),
525 info
->beacon_ies
, info
->beacon_ies_len
);
526 if (info
->proberesp_ies
)
527 memcpy(__get_dynamic_array(proberesp_ies
),
529 info
->proberesp_ies_len
);
530 if (info
->assocresp_ies
)
531 memcpy(__get_dynamic_array(assocresp_ies
),
533 info
->assocresp_ies_len
);
534 if (info
->probe_resp
)
535 memcpy(__get_dynamic_array(probe_resp
),
536 info
->probe_resp
, info
->probe_resp_len
);
539 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
, WIPHY_PR_ARG
, NETDEV_PR_ARG
)
542 DECLARE_EVENT_CLASS(wiphy_netdev_evt
,
543 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
),
544 TP_ARGS(wiphy
, netdev
),
553 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
, WIPHY_PR_ARG
, NETDEV_PR_ARG
)
556 DEFINE_EVENT(wiphy_netdev_evt
, rdev_stop_ap
,
557 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
),
558 TP_ARGS(wiphy
, netdev
)
561 DEFINE_EVENT(wiphy_netdev_evt
, rdev_get_et_stats
,
562 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
),
563 TP_ARGS(wiphy
, netdev
)
566 DEFINE_EVENT(wiphy_netdev_evt
, rdev_sched_scan_stop
,
567 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
),
568 TP_ARGS(wiphy
, netdev
)
571 DEFINE_EVENT(wiphy_netdev_evt
, rdev_set_rekey_data
,
572 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
),
573 TP_ARGS(wiphy
, netdev
)
576 DEFINE_EVENT(wiphy_netdev_evt
, rdev_get_mesh_config
,
577 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
),
578 TP_ARGS(wiphy
, netdev
)
581 DEFINE_EVENT(wiphy_netdev_evt
, rdev_leave_mesh
,
582 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
),
583 TP_ARGS(wiphy
, netdev
)
586 DEFINE_EVENT(wiphy_netdev_evt
, rdev_leave_ibss
,
587 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
),
588 TP_ARGS(wiphy
, netdev
)
591 DEFINE_EVENT(wiphy_netdev_evt
, rdev_flush_pmksa
,
592 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
),
593 TP_ARGS(wiphy
, netdev
)
596 DECLARE_EVENT_CLASS(station_add_change
,
597 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, u8
*mac
,
598 struct station_parameters
*params
),
599 TP_ARGS(wiphy
, netdev
, mac
, params
),
604 __field(u32
, sta_flags_mask
)
605 __field(u32
, sta_flags_set
)
606 __field(u32
, sta_modify_mask
)
607 __field(int, listen_interval
)
609 __field(u8
, plink_action
)
610 __field(u8
, plink_state
)
611 __field(u8
, uapsd_queues
)
612 __array(u8
, ht_capa
, (int)sizeof(struct ieee80211_ht_cap
))
617 MAC_ASSIGN(sta_mac
, mac
);
618 __entry
->sta_flags_mask
= params
->sta_flags_mask
;
619 __entry
->sta_flags_set
= params
->sta_flags_set
;
620 __entry
->sta_modify_mask
= params
->sta_modify_mask
;
621 __entry
->listen_interval
= params
->listen_interval
;
622 __entry
->aid
= params
->aid
;
623 __entry
->plink_action
= params
->plink_action
;
624 __entry
->plink_state
= params
->plink_state
;
625 __entry
->uapsd_queues
= params
->uapsd_queues
;
626 memset(__entry
->ht_capa
, 0, sizeof(struct ieee80211_ht_cap
));
628 memcpy(__entry
->ht_capa
, params
->ht_capa
,
629 sizeof(struct ieee80211_ht_cap
));
631 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", station mac: " MAC_PR_FMT
632 ", station flags mask: %u, station flags set: %u, "
633 "station modify mask: %u, listen interval: %d, aid: %u, "
634 "plink action: %u, plink state: %u, uapsd queues: %u",
635 WIPHY_PR_ARG
, NETDEV_PR_ARG
, MAC_PR_ARG(sta_mac
),
636 __entry
->sta_flags_mask
, __entry
->sta_flags_set
,
637 __entry
->sta_modify_mask
, __entry
->listen_interval
,
638 __entry
->aid
, __entry
->plink_action
, __entry
->plink_state
,
639 __entry
->uapsd_queues
)
642 DEFINE_EVENT(station_add_change
, rdev_add_station
,
643 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, u8
*mac
,
644 struct station_parameters
*params
),
645 TP_ARGS(wiphy
, netdev
, mac
, params
)
648 DEFINE_EVENT(station_add_change
, rdev_change_station
,
649 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, u8
*mac
,
650 struct station_parameters
*params
),
651 TP_ARGS(wiphy
, netdev
, mac
, params
)
654 DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt
,
655 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, const u8
*mac
),
656 TP_ARGS(wiphy
, netdev
, mac
),
665 MAC_ASSIGN(sta_mac
, mac
);
667 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", mac: " MAC_PR_FMT
,
668 WIPHY_PR_ARG
, NETDEV_PR_ARG
, MAC_PR_ARG(sta_mac
))
671 DEFINE_EVENT(wiphy_netdev_mac_evt
, rdev_del_station
,
672 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, const u8
*mac
),
673 TP_ARGS(wiphy
, netdev
, mac
)
676 DEFINE_EVENT(wiphy_netdev_mac_evt
, rdev_get_station
,
677 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, const u8
*mac
),
678 TP_ARGS(wiphy
, netdev
, mac
)
681 DEFINE_EVENT(wiphy_netdev_mac_evt
, rdev_del_mpath
,
682 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, const u8
*mac
),
683 TP_ARGS(wiphy
, netdev
, mac
)
686 DEFINE_EVENT(wiphy_netdev_mac_evt
, rdev_set_wds_peer
,
687 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, const u8
*mac
),
688 TP_ARGS(wiphy
, netdev
, mac
)
691 TRACE_EVENT(rdev_dump_station
,
692 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, int idx
,
694 TP_ARGS(wiphy
, netdev
, idx
, mac
),
704 MAC_ASSIGN(sta_mac
, mac
);
707 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", station mac: " MAC_PR_FMT
", idx: %d",
708 WIPHY_PR_ARG
, NETDEV_PR_ARG
, MAC_PR_ARG(sta_mac
),
712 TRACE_EVENT(rdev_return_int_station_info
,
713 TP_PROTO(struct wiphy
*wiphy
, int ret
, struct station_info
*sinfo
),
714 TP_ARGS(wiphy
, ret
, sinfo
),
725 TP_printk(WIPHY_PR_FMT
", returned %d" ,
726 WIPHY_PR_ARG
, __entry
->ret
)
729 DECLARE_EVENT_CLASS(mpath_evt
,
730 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, u8
*dst
,
732 TP_ARGS(wiphy
, netdev
, dst
, next_hop
),
742 MAC_ASSIGN(dst
, dst
);
743 MAC_ASSIGN(next_hop
, next_hop
);
745 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", destination: " MAC_PR_FMT
", next hop: " MAC_PR_FMT
,
746 WIPHY_PR_ARG
, NETDEV_PR_ARG
, MAC_PR_ARG(dst
),
747 MAC_PR_ARG(next_hop
))
750 DEFINE_EVENT(mpath_evt
, rdev_add_mpath
,
751 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, u8
*dst
,
753 TP_ARGS(wiphy
, netdev
, dst
, next_hop
)
756 DEFINE_EVENT(mpath_evt
, rdev_change_mpath
,
757 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, u8
*dst
,
759 TP_ARGS(wiphy
, netdev
, dst
, next_hop
)
762 DEFINE_EVENT(mpath_evt
, rdev_get_mpath
,
763 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, u8
*dst
,
765 TP_ARGS(wiphy
, netdev
, dst
, next_hop
)
768 TRACE_EVENT(rdev_dump_mpath
,
769 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, int idx
,
770 u8
*dst
, u8
*next_hop
),
771 TP_ARGS(wiphy
, netdev
, idx
, dst
, next_hop
),
782 MAC_ASSIGN(dst
, dst
);
783 MAC_ASSIGN(next_hop
, next_hop
);
786 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", index: %d, destination: "
787 MAC_PR_FMT
", next hop: " MAC_PR_FMT
,
788 WIPHY_PR_ARG
, NETDEV_PR_ARG
, __entry
->idx
, MAC_PR_ARG(dst
),
789 MAC_PR_ARG(next_hop
))
792 TRACE_EVENT(rdev_return_int_mpath_info
,
793 TP_PROTO(struct wiphy
*wiphy
, int ret
, struct mpath_info
*pinfo
),
794 TP_ARGS(wiphy
, ret
, pinfo
),
798 __field(int, generation
)
800 __field(u32
, frame_qlen
)
803 __field(u32
, exptime
)
804 __field(u32
, discovery_timeout
)
805 __field(u8
, discovery_retries
)
811 __entry
->generation
= pinfo
->generation
;
812 __entry
->filled
= pinfo
->filled
;
813 __entry
->frame_qlen
= pinfo
->frame_qlen
;
814 __entry
->sn
= pinfo
->sn
;
815 __entry
->metric
= pinfo
->metric
;
816 __entry
->exptime
= pinfo
->exptime
;
817 __entry
->discovery_timeout
= pinfo
->discovery_timeout
;
818 __entry
->discovery_retries
= pinfo
->discovery_retries
;
819 __entry
->flags
= pinfo
->flags
;
821 TP_printk(WIPHY_PR_FMT
", returned %d. mpath info - generation: %d, "
822 "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
823 " discovery timeout: %u, discovery retries: %u, flags: %u",
824 WIPHY_PR_ARG
, __entry
->ret
, __entry
->generation
,
825 __entry
->filled
, __entry
->frame_qlen
, __entry
->sn
,
826 __entry
->metric
, __entry
->exptime
, __entry
->discovery_timeout
,
827 __entry
->discovery_retries
, __entry
->flags
)
830 TRACE_EVENT(rdev_return_int_mesh_config
,
831 TP_PROTO(struct wiphy
*wiphy
, int ret
, struct mesh_config
*conf
),
832 TP_ARGS(wiphy
, ret
, conf
),
843 TP_printk(WIPHY_PR_FMT
", returned: %d",
844 WIPHY_PR_ARG
, __entry
->ret
)
847 TRACE_EVENT(rdev_update_mesh_config
,
848 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, u32 mask
,
849 const struct mesh_config
*conf
),
850 TP_ARGS(wiphy
, netdev
, mask
, conf
),
861 __entry
->mask
= mask
;
863 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", mask: %u",
864 WIPHY_PR_ARG
, NETDEV_PR_ARG
, __entry
->mask
)
867 TRACE_EVENT(rdev_join_mesh
,
868 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
869 const struct mesh_config
*conf
,
870 const struct mesh_setup
*setup
),
871 TP_ARGS(wiphy
, netdev
, conf
, setup
),
882 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
,
883 WIPHY_PR_ARG
, NETDEV_PR_ARG
)
886 TRACE_EVENT(rdev_change_bss
,
887 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
888 struct bss_parameters
*params
),
889 TP_ARGS(wiphy
, netdev
, params
),
893 __field(int, use_cts_prot
)
894 __field(int, use_short_preamble
)
895 __field(int, use_short_slot_time
)
896 __field(int, ap_isolate
)
897 __field(int, ht_opmode
)
902 __entry
->use_cts_prot
= params
->use_cts_prot
;
903 __entry
->use_short_preamble
= params
->use_short_preamble
;
904 __entry
->use_short_slot_time
= params
->use_short_slot_time
;
905 __entry
->ap_isolate
= params
->ap_isolate
;
906 __entry
->ht_opmode
= params
->ht_opmode
;
908 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", use cts prot: %d, "
909 "use short preamble: %d, use short slot time: %d, "
910 "ap isolate: %d, ht opmode: %d",
911 WIPHY_PR_ARG
, NETDEV_PR_ARG
, __entry
->use_cts_prot
,
912 __entry
->use_short_preamble
, __entry
->use_short_slot_time
,
913 __entry
->ap_isolate
, __entry
->ht_opmode
)
916 TRACE_EVENT(rdev_set_txq_params
,
917 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
918 struct ieee80211_txq_params
*params
),
919 TP_ARGS(wiphy
, netdev
, params
),
923 __field(enum nl80211_ac
, ac
)
932 __entry
->ac
= params
->ac
;
933 __entry
->txop
= params
->txop
;
934 __entry
->cwmin
= params
->cwmin
;
935 __entry
->cwmax
= params
->cwmax
;
936 __entry
->aifs
= params
->aifs
;
938 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u",
939 WIPHY_PR_ARG
, NETDEV_PR_ARG
, __entry
->ac
, __entry
->txop
,
940 __entry
->cwmin
, __entry
->cwmax
, __entry
->aifs
)
943 TRACE_EVENT(rdev_libertas_set_mesh_channel
,
944 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
945 struct ieee80211_channel
*chan
),
946 TP_ARGS(wiphy
, netdev
, chan
),
957 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", " CHAN_PR_FMT
, WIPHY_PR_ARG
,
958 NETDEV_PR_ARG
, CHAN_PR_ARG
)
961 TRACE_EVENT(rdev_set_monitor_channel
,
962 TP_PROTO(struct wiphy
*wiphy
,
963 struct cfg80211_chan_def
*chandef
),
964 TP_ARGS(wiphy
, chandef
),
971 CHAN_DEF_ASSIGN(chandef
);
973 TP_printk(WIPHY_PR_FMT
", " CHAN_DEF_PR_FMT
,
974 WIPHY_PR_ARG
, CHAN_DEF_PR_ARG
)
977 TRACE_EVENT(rdev_auth
,
978 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
979 struct cfg80211_auth_request
*req
),
980 TP_ARGS(wiphy
, netdev
, req
),
985 __field(enum nl80211_auth_type
, auth_type
)
991 MAC_ASSIGN(bssid
, req
->bss
->bssid
);
993 memset(__entry
->bssid
, 0, ETH_ALEN
);
994 __entry
->auth_type
= req
->auth_type
;
996 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", auth type: %d, bssid: " MAC_PR_FMT
,
997 WIPHY_PR_ARG
, NETDEV_PR_ARG
, __entry
->auth_type
,
1001 TRACE_EVENT(rdev_assoc
,
1002 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1003 struct cfg80211_assoc_request
*req
),
1004 TP_ARGS(wiphy
, netdev
, req
),
1009 MAC_ENTRY(prev_bssid
)
1010 __field(bool, use_mfp
)
1017 MAC_ASSIGN(bssid
, req
->bss
->bssid
);
1019 memset(__entry
->bssid
, 0, ETH_ALEN
);
1020 MAC_ASSIGN(prev_bssid
, req
->prev_bssid
);
1021 __entry
->use_mfp
= req
->use_mfp
;
1022 __entry
->flags
= req
->flags
;
1024 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", bssid: " MAC_PR_FMT
1025 ", previous bssid: " MAC_PR_FMT
", use mfp: %s, flags: %u",
1026 WIPHY_PR_ARG
, NETDEV_PR_ARG
, MAC_PR_ARG(bssid
),
1027 MAC_PR_ARG(prev_bssid
), BOOL_TO_STR(__entry
->use_mfp
),
1031 TRACE_EVENT(rdev_deauth
,
1032 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1033 struct cfg80211_deauth_request
*req
),
1034 TP_ARGS(wiphy
, netdev
, req
),
1039 __field(u16
, reason_code
)
1044 MAC_ASSIGN(bssid
, req
->bssid
);
1045 __entry
->reason_code
= req
->reason_code
;
1047 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", bssid: " MAC_PR_FMT
", reason: %u",
1048 WIPHY_PR_ARG
, NETDEV_PR_ARG
, MAC_PR_ARG(bssid
),
1049 __entry
->reason_code
)
1052 TRACE_EVENT(rdev_disassoc
,
1053 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1054 struct cfg80211_disassoc_request
*req
),
1055 TP_ARGS(wiphy
, netdev
, req
),
1060 __field(u16
, reason_code
)
1061 __field(bool, local_state_change
)
1067 MAC_ASSIGN(bssid
, req
->bss
->bssid
);
1069 memset(__entry
->bssid
, 0, ETH_ALEN
);
1070 __entry
->reason_code
= req
->reason_code
;
1071 __entry
->local_state_change
= req
->local_state_change
;
1073 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", bssid: " MAC_PR_FMT
1074 ", reason: %u, local state change: %s",
1075 WIPHY_PR_ARG
, NETDEV_PR_ARG
, MAC_PR_ARG(bssid
),
1076 __entry
->reason_code
,
1077 BOOL_TO_STR(__entry
->local_state_change
))
1080 TRACE_EVENT(rdev_mgmt_tx_cancel_wait
,
1081 TP_PROTO(struct wiphy
*wiphy
,
1082 struct wireless_dev
*wdev
, u64 cookie
),
1083 TP_ARGS(wiphy
, wdev
, cookie
),
1087 __field(u64
, cookie
)
1092 __entry
->cookie
= cookie
;
1094 TP_printk(WIPHY_PR_FMT
", " WDEV_PR_FMT
", cookie: %llu ",
1095 WIPHY_PR_ARG
, WDEV_PR_ARG
, __entry
->cookie
)
1098 TRACE_EVENT(rdev_set_power_mgmt
,
1099 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1100 bool enabled
, int timeout
),
1101 TP_ARGS(wiphy
, netdev
, enabled
, timeout
),
1105 __field(bool, enabled
)
1106 __field(int, timeout
)
1111 __entry
->enabled
= enabled
;
1112 __entry
->timeout
= timeout
;
1114 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", %senabled, timeout: %d ",
1115 WIPHY_PR_ARG
, NETDEV_PR_ARG
,
1116 __entry
->enabled
? "" : "not ", __entry
->timeout
)
1119 TRACE_EVENT(rdev_connect
,
1120 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1121 struct cfg80211_connect_params
*sme
),
1122 TP_ARGS(wiphy
, netdev
, sme
),
1127 __array(char, ssid
, IEEE80211_MAX_SSID_LEN
+ 1)
1128 __field(enum nl80211_auth_type
, auth_type
)
1129 __field(bool, privacy
)
1130 __field(u32
, wpa_versions
)
1136 MAC_ASSIGN(bssid
, sme
->bssid
);
1137 memset(__entry
->ssid
, 0, IEEE80211_MAX_SSID_LEN
+ 1);
1138 memcpy(__entry
->ssid
, sme
->ssid
, sme
->ssid_len
);
1139 __entry
->auth_type
= sme
->auth_type
;
1140 __entry
->privacy
= sme
->privacy
;
1141 __entry
->wpa_versions
= sme
->crypto
.wpa_versions
;
1142 __entry
->flags
= sme
->flags
;
1144 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", bssid: " MAC_PR_FMT
1145 ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
1147 WIPHY_PR_ARG
, NETDEV_PR_ARG
, MAC_PR_ARG(bssid
), __entry
->ssid
,
1148 __entry
->auth_type
, BOOL_TO_STR(__entry
->privacy
),
1149 __entry
->wpa_versions
, __entry
->flags
)
1152 TRACE_EVENT(rdev_set_cqm_rssi_config
,
1153 TP_PROTO(struct wiphy
*wiphy
,
1154 struct net_device
*netdev
, s32 rssi_thold
,
1156 TP_ARGS(wiphy
, netdev
, rssi_thold
, rssi_hyst
),
1160 __field(s32
, rssi_thold
)
1161 __field(u32
, rssi_hyst
)
1166 __entry
->rssi_thold
= rssi_thold
;
1167 __entry
->rssi_hyst
= rssi_hyst
;
1169 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
1170 ", rssi_thold: %d, rssi_hyst: %u ",
1171 WIPHY_PR_ARG
, NETDEV_PR_ARG
,
1172 __entry
->rssi_thold
, __entry
->rssi_hyst
)
1175 TRACE_EVENT(rdev_set_cqm_txe_config
,
1176 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, u32 rate
,
1177 u32 pkts
, u32 intvl
),
1178 TP_ARGS(wiphy
, netdev
, rate
, pkts
, intvl
),
1189 __entry
->rate
= rate
;
1190 __entry
->pkts
= pkts
;
1191 __entry
->intvl
= intvl
;
1193 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", rate: %u, packets: %u, interval: %u",
1194 WIPHY_PR_ARG
, NETDEV_PR_ARG
, __entry
->rate
, __entry
->pkts
,
1198 TRACE_EVENT(rdev_disconnect
,
1199 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1201 TP_ARGS(wiphy
, netdev
, reason_code
),
1205 __field(u16
, reason_code
)
1210 __entry
->reason_code
= reason_code
;
1212 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", reason code: %u", WIPHY_PR_ARG
,
1213 NETDEV_PR_ARG
, __entry
->reason_code
)
1216 TRACE_EVENT(rdev_join_ibss
,
1217 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1218 struct cfg80211_ibss_params
*params
),
1219 TP_ARGS(wiphy
, netdev
, params
),
1224 __array(char, ssid
, IEEE80211_MAX_SSID_LEN
+ 1)
1229 MAC_ASSIGN(bssid
, params
->bssid
);
1230 memset(__entry
->ssid
, 0, IEEE80211_MAX_SSID_LEN
+ 1);
1231 memcpy(__entry
->ssid
, params
->ssid
, params
->ssid_len
);
1233 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", bssid: " MAC_PR_FMT
", ssid: %s",
1234 WIPHY_PR_ARG
, NETDEV_PR_ARG
, MAC_PR_ARG(bssid
), __entry
->ssid
)
1237 TRACE_EVENT(rdev_set_wiphy_params
,
1238 TP_PROTO(struct wiphy
*wiphy
, u32 changed
),
1239 TP_ARGS(wiphy
, changed
),
1242 __field(u32
, changed
)
1246 __entry
->changed
= changed
;
1248 TP_printk(WIPHY_PR_FMT
", changed: %u",
1249 WIPHY_PR_ARG
, __entry
->changed
)
1252 DEFINE_EVENT(wiphy_wdev_evt
, rdev_get_tx_power
,
1253 TP_PROTO(struct wiphy
*wiphy
, struct wireless_dev
*wdev
),
1254 TP_ARGS(wiphy
, wdev
)
1257 TRACE_EVENT(rdev_set_tx_power
,
1258 TP_PROTO(struct wiphy
*wiphy
, struct wireless_dev
*wdev
,
1259 enum nl80211_tx_power_setting type
, int mbm
),
1260 TP_ARGS(wiphy
, wdev
, type
, mbm
),
1264 __field(enum nl80211_tx_power_setting
, type
)
1270 __entry
->type
= type
;
1273 TP_printk(WIPHY_PR_FMT
", " WDEV_PR_FMT
", type: %u, mbm: %d",
1274 WIPHY_PR_ARG
, WDEV_PR_ARG
,__entry
->type
, __entry
->mbm
)
1277 TRACE_EVENT(rdev_return_int_int
,
1278 TP_PROTO(struct wiphy
*wiphy
, int func_ret
, int func_fill
),
1279 TP_ARGS(wiphy
, func_ret
, func_fill
),
1282 __field(int, func_ret
)
1283 __field(int, func_fill
)
1287 __entry
->func_ret
= func_ret
;
1288 __entry
->func_fill
= func_fill
;
1290 TP_printk(WIPHY_PR_FMT
", function returns: %d, function filled: %d",
1291 WIPHY_PR_ARG
, __entry
->func_ret
, __entry
->func_fill
)
1294 #ifdef CONFIG_NL80211_TESTMODE
1295 TRACE_EVENT(rdev_testmode_cmd
,
1296 TP_PROTO(struct wiphy
*wiphy
, struct wireless_dev
*wdev
),
1297 TP_ARGS(wiphy
, wdev
),
1306 TP_printk(WIPHY_PR_FMT WDEV_PR_FMT
, WIPHY_PR_ARG
, WDEV_PR_ARG
)
1309 TRACE_EVENT(rdev_testmode_dump
,
1310 TP_PROTO(struct wiphy
*wiphy
),
1318 TP_printk(WIPHY_PR_FMT
, WIPHY_PR_ARG
)
1320 #endif /* CONFIG_NL80211_TESTMODE */
1322 TRACE_EVENT(rdev_set_bitrate_mask
,
1323 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1324 const u8
*peer
, const struct cfg80211_bitrate_mask
*mask
),
1325 TP_ARGS(wiphy
, netdev
, peer
, mask
),
1334 MAC_ASSIGN(peer
, peer
);
1336 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", peer: " MAC_PR_FMT
,
1337 WIPHY_PR_ARG
, NETDEV_PR_ARG
, MAC_PR_ARG(peer
))
1340 TRACE_EVENT(rdev_mgmt_frame_register
,
1341 TP_PROTO(struct wiphy
*wiphy
, struct wireless_dev
*wdev
,
1342 u16 frame_type
, bool reg
),
1343 TP_ARGS(wiphy
, wdev
, frame_type
, reg
),
1347 __field(u16
, frame_type
)
1353 __entry
->frame_type
= frame_type
;
1356 TP_printk(WIPHY_PR_FMT
", " WDEV_PR_FMT
", frame_type: 0x%.2x, reg: %s ",
1357 WIPHY_PR_ARG
, WDEV_PR_ARG
, __entry
->frame_type
,
1358 __entry
->reg
? "true" : "false")
1361 TRACE_EVENT(rdev_return_int_tx_rx
,
1362 TP_PROTO(struct wiphy
*wiphy
, int ret
, u32 tx
, u32 rx
),
1363 TP_ARGS(wiphy
, ret
, tx
, rx
),
1376 TP_printk(WIPHY_PR_FMT
", returned %d, tx: %u, rx: %u",
1377 WIPHY_PR_ARG
, __entry
->ret
, __entry
->tx
, __entry
->rx
)
1380 TRACE_EVENT(rdev_return_void_tx_rx
,
1381 TP_PROTO(struct wiphy
*wiphy
, u32 tx
, u32 tx_max
,
1382 u32 rx
, u32 rx_max
),
1383 TP_ARGS(wiphy
, tx
, tx_max
, rx
, rx_max
),
1387 __field(u32
, tx_max
)
1389 __field(u32
, rx_max
)
1394 __entry
->tx_max
= tx_max
;
1396 __entry
->rx_max
= rx_max
;
1398 TP_printk(WIPHY_PR_FMT
", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
1399 WIPHY_PR_ARG
, __entry
->tx
, __entry
->tx_max
, __entry
->rx
,
1403 DECLARE_EVENT_CLASS(tx_rx_evt
,
1404 TP_PROTO(struct wiphy
*wiphy
, u32 tx
, u32 rx
),
1405 TP_ARGS(wiphy
, rx
, tx
),
1416 TP_printk(WIPHY_PR_FMT
", tx: %u, rx: %u ",
1417 WIPHY_PR_ARG
, __entry
->tx
, __entry
->rx
)
1420 DEFINE_EVENT(tx_rx_evt
, rdev_set_ringparam
,
1421 TP_PROTO(struct wiphy
*wiphy
, u32 tx
, u32 rx
),
1422 TP_ARGS(wiphy
, rx
, tx
)
1425 DEFINE_EVENT(tx_rx_evt
, rdev_set_antenna
,
1426 TP_PROTO(struct wiphy
*wiphy
, u32 tx
, u32 rx
),
1427 TP_ARGS(wiphy
, rx
, tx
)
1430 TRACE_EVENT(rdev_sched_scan_start
,
1431 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1432 struct cfg80211_sched_scan_request
*request
),
1433 TP_ARGS(wiphy
, netdev
, request
),
1442 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
,
1443 WIPHY_PR_ARG
, NETDEV_PR_ARG
)
1446 TRACE_EVENT(rdev_tdls_mgmt
,
1447 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1448 u8
*peer
, u8 action_code
, u8 dialog_token
,
1449 u16 status_code
, const u8
*buf
, size_t len
),
1450 TP_ARGS(wiphy
, netdev
, peer
, action_code
, dialog_token
, status_code
,
1456 __field(u8
, action_code
)
1457 __field(u8
, dialog_token
)
1458 __field(u16
, status_code
)
1459 __dynamic_array(u8
, buf
, len
)
1464 MAC_ASSIGN(peer
, peer
);
1465 __entry
->action_code
= action_code
;
1466 __entry
->dialog_token
= dialog_token
;
1467 __entry
->status_code
= status_code
;
1468 memcpy(__get_dynamic_array(buf
), buf
, len
);
1470 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", " MAC_PR_FMT
", action_code: %u, "
1471 "dialog_token: %u, status_code: %u, buf: %#.2x ",
1472 WIPHY_PR_ARG
, NETDEV_PR_ARG
, MAC_PR_ARG(peer
),
1473 __entry
->action_code
, __entry
->dialog_token
,
1474 __entry
->status_code
, ((u8
*)__get_dynamic_array(buf
))[0])
1477 TRACE_EVENT(rdev_dump_survey
,
1478 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, int idx
),
1479 TP_ARGS(wiphy
, netdev
, idx
),
1490 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", index: %d",
1491 WIPHY_PR_ARG
, NETDEV_PR_ARG
, __entry
->idx
)
1494 TRACE_EVENT(rdev_return_int_survey_info
,
1495 TP_PROTO(struct wiphy
*wiphy
, int ret
, struct survey_info
*info
),
1496 TP_ARGS(wiphy
, ret
, info
),
1501 __field(u64
, channel_time
)
1502 __field(u64
, channel_time_busy
)
1503 __field(u64
, channel_time_ext_busy
)
1504 __field(u64
, channel_time_rx
)
1505 __field(u64
, channel_time_tx
)
1506 __field(u32
, filled
)
1511 CHAN_ASSIGN(info
->channel
);
1513 __entry
->channel_time
= info
->channel_time
;
1514 __entry
->channel_time_busy
= info
->channel_time_busy
;
1515 __entry
->channel_time_ext_busy
= info
->channel_time_ext_busy
;
1516 __entry
->channel_time_rx
= info
->channel_time_rx
;
1517 __entry
->channel_time_tx
= info
->channel_time_tx
;
1518 __entry
->filled
= info
->filled
;
1519 __entry
->noise
= info
->noise
;
1521 TP_printk(WIPHY_PR_FMT
", returned: %d, " CHAN_PR_FMT
1522 ", channel time: %llu, channel time busy: %llu, "
1523 "channel time extension busy: %llu, channel time rx: %llu, "
1524 "channel time tx: %llu, filled: %u, noise: %d",
1525 WIPHY_PR_ARG
, __entry
->ret
, CHAN_PR_ARG
,
1526 __entry
->channel_time
, __entry
->channel_time_busy
,
1527 __entry
->channel_time_ext_busy
, __entry
->channel_time_rx
,
1528 __entry
->channel_time_tx
, __entry
->filled
, __entry
->noise
)
1531 TRACE_EVENT(rdev_tdls_oper
,
1532 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1533 u8
*peer
, enum nl80211_tdls_operation oper
),
1534 TP_ARGS(wiphy
, netdev
, peer
, oper
),
1539 __field(enum nl80211_tdls_operation
, oper
)
1544 MAC_ASSIGN(peer
, peer
);
1545 __entry
->oper
= oper
;
1547 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", " MAC_PR_FMT
", oper: %d",
1548 WIPHY_PR_ARG
, NETDEV_PR_ARG
, MAC_PR_ARG(peer
), __entry
->oper
)
1551 DECLARE_EVENT_CLASS(rdev_pmksa
,
1552 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1553 struct cfg80211_pmksa
*pmksa
),
1554 TP_ARGS(wiphy
, netdev
, pmksa
),
1563 MAC_ASSIGN(bssid
, pmksa
->bssid
);
1565 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", bssid: " MAC_PR_FMT
,
1566 WIPHY_PR_ARG
, NETDEV_PR_ARG
, MAC_PR_ARG(bssid
))
1569 TRACE_EVENT(rdev_probe_client
,
1570 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1572 TP_ARGS(wiphy
, netdev
, peer
),
1581 MAC_ASSIGN(peer
, peer
);
1583 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", " MAC_PR_FMT
,
1584 WIPHY_PR_ARG
, NETDEV_PR_ARG
, MAC_PR_ARG(peer
))
1587 DEFINE_EVENT(rdev_pmksa
, rdev_set_pmksa
,
1588 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1589 struct cfg80211_pmksa
*pmksa
),
1590 TP_ARGS(wiphy
, netdev
, pmksa
)
1593 DEFINE_EVENT(rdev_pmksa
, rdev_del_pmksa
,
1594 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1595 struct cfg80211_pmksa
*pmksa
),
1596 TP_ARGS(wiphy
, netdev
, pmksa
)
1599 TRACE_EVENT(rdev_remain_on_channel
,
1600 TP_PROTO(struct wiphy
*wiphy
, struct wireless_dev
*wdev
,
1601 struct ieee80211_channel
*chan
,
1602 unsigned int duration
),
1603 TP_ARGS(wiphy
, wdev
, chan
, duration
),
1608 __field(unsigned int, duration
)
1614 __entry
->duration
= duration
;
1616 TP_printk(WIPHY_PR_FMT
", " WDEV_PR_FMT
", " CHAN_PR_FMT
", duration: %u",
1617 WIPHY_PR_ARG
, WDEV_PR_ARG
, CHAN_PR_ARG
, __entry
->duration
)
1620 TRACE_EVENT(rdev_return_int_cookie
,
1621 TP_PROTO(struct wiphy
*wiphy
, int ret
, u64 cookie
),
1622 TP_ARGS(wiphy
, ret
, cookie
),
1626 __field(u64
, cookie
)
1631 __entry
->cookie
= cookie
;
1633 TP_printk(WIPHY_PR_FMT
", returned %d, cookie: %llu",
1634 WIPHY_PR_ARG
, __entry
->ret
, __entry
->cookie
)
1637 TRACE_EVENT(rdev_cancel_remain_on_channel
,
1638 TP_PROTO(struct wiphy
*wiphy
, struct wireless_dev
*wdev
, u64 cookie
),
1639 TP_ARGS(wiphy
, wdev
, cookie
),
1643 __field(u64
, cookie
)
1648 __entry
->cookie
= cookie
;
1650 TP_printk(WIPHY_PR_FMT
", " WDEV_PR_FMT
", cookie: %llu",
1651 WIPHY_PR_ARG
, WDEV_PR_ARG
, __entry
->cookie
)
1654 TRACE_EVENT(rdev_mgmt_tx
,
1655 TP_PROTO(struct wiphy
*wiphy
, struct wireless_dev
*wdev
,
1656 struct ieee80211_channel
*chan
, bool offchan
,
1657 unsigned int wait
, bool no_cck
, bool dont_wait_for_ack
),
1658 TP_ARGS(wiphy
, wdev
, chan
, offchan
, wait
, no_cck
, dont_wait_for_ack
),
1663 __field(bool, offchan
)
1664 __field(unsigned int, wait
)
1665 __field(bool, no_cck
)
1666 __field(bool, dont_wait_for_ack
)
1672 __entry
->offchan
= offchan
;
1673 __entry
->wait
= wait
;
1674 __entry
->no_cck
= no_cck
;
1675 __entry
->dont_wait_for_ack
= dont_wait_for_ack
;
1677 TP_printk(WIPHY_PR_FMT
", " WDEV_PR_FMT
", " CHAN_PR_FMT
", offchan: %s,"
1678 " wait: %u, no cck: %s, dont wait for ack: %s",
1679 WIPHY_PR_ARG
, WDEV_PR_ARG
, CHAN_PR_ARG
,
1680 BOOL_TO_STR(__entry
->offchan
), __entry
->wait
,
1681 BOOL_TO_STR(__entry
->no_cck
),
1682 BOOL_TO_STR(__entry
->dont_wait_for_ack
))
1685 TRACE_EVENT(rdev_set_noack_map
,
1686 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1688 TP_ARGS(wiphy
, netdev
, noack_map
),
1692 __field(u16
, noack_map
)
1697 __entry
->noack_map
= noack_map
;
1699 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", noack_map: %u",
1700 WIPHY_PR_ARG
, NETDEV_PR_ARG
, __entry
->noack_map
)
1703 TRACE_EVENT(rdev_get_et_sset_count
,
1704 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, int sset
),
1705 TP_ARGS(wiphy
, netdev
, sset
),
1714 __entry
->sset
= sset
;
1716 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", sset: %d",
1717 WIPHY_PR_ARG
, NETDEV_PR_ARG
, __entry
->sset
)
1720 TRACE_EVENT(rdev_get_et_strings
,
1721 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, u32 sset
),
1722 TP_ARGS(wiphy
, netdev
, sset
),
1731 __entry
->sset
= sset
;
1733 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", sset: %u",
1734 WIPHY_PR_ARG
, NETDEV_PR_ARG
, __entry
->sset
)
1737 DEFINE_EVENT(wiphy_wdev_evt
, rdev_get_channel
,
1738 TP_PROTO(struct wiphy
*wiphy
, struct wireless_dev
*wdev
),
1739 TP_ARGS(wiphy
, wdev
)
1742 TRACE_EVENT(rdev_return_chandef
,
1743 TP_PROTO(struct wiphy
*wiphy
, int ret
,
1744 struct cfg80211_chan_def
*chandef
),
1745 TP_ARGS(wiphy
, ret
, chandef
),
1754 CHAN_DEF_ASSIGN(chandef
);
1756 CHAN_DEF_ASSIGN((struct cfg80211_chan_def
*)NULL
);
1759 TP_printk(WIPHY_PR_FMT
", " CHAN_DEF_PR_FMT
", ret: %d",
1760 WIPHY_PR_ARG
, CHAN_DEF_PR_ARG
, __entry
->ret
)
1763 DEFINE_EVENT(wiphy_wdev_evt
, rdev_start_p2p_device
,
1764 TP_PROTO(struct wiphy
*wiphy
, struct wireless_dev
*wdev
),
1765 TP_ARGS(wiphy
, wdev
)
1768 DEFINE_EVENT(wiphy_wdev_evt
, rdev_stop_p2p_device
,
1769 TP_PROTO(struct wiphy
*wiphy
, struct wireless_dev
*wdev
),
1770 TP_ARGS(wiphy
, wdev
)
1773 TRACE_EVENT(rdev_set_mac_acl
,
1774 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1775 struct cfg80211_acl_data
*params
),
1776 TP_ARGS(wiphy
, netdev
, params
),
1780 __field(u32
, acl_policy
)
1785 __entry
->acl_policy
= params
->acl_policy
;
1787 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", acl policy: %d",
1788 WIPHY_PR_ARG
, NETDEV_PR_ARG
, __entry
->acl_policy
)
1791 TRACE_EVENT(rdev_update_ft_ies
,
1792 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1793 struct cfg80211_update_ft_ies_params
*ftie
),
1794 TP_ARGS(wiphy
, netdev
, ftie
),
1799 __dynamic_array(u8
, ie
, ftie
->ie_len
)
1804 __entry
->md
= ftie
->md
;
1805 memcpy(__get_dynamic_array(ie
), ftie
->ie
, ftie
->ie_len
);
1807 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", md: 0x%x",
1808 WIPHY_PR_ARG
, NETDEV_PR_ARG
, __entry
->md
)
1811 TRACE_EVENT(rdev_crit_proto_start
,
1812 TP_PROTO(struct wiphy
*wiphy
, struct wireless_dev
*wdev
,
1813 enum nl80211_crit_proto_id protocol
, u16 duration
),
1814 TP_ARGS(wiphy
, wdev
, protocol
, duration
),
1819 __field(u16
, duration
)
1824 __entry
->proto
= protocol
;
1825 __entry
->duration
= duration
;
1827 TP_printk(WIPHY_PR_FMT
", " WDEV_PR_FMT
", proto=%x, duration=%u",
1828 WIPHY_PR_ARG
, WDEV_PR_ARG
, __entry
->proto
, __entry
->duration
)
1831 TRACE_EVENT(rdev_crit_proto_stop
,
1832 TP_PROTO(struct wiphy
*wiphy
, struct wireless_dev
*wdev
),
1833 TP_ARGS(wiphy
, wdev
),
1842 TP_printk(WIPHY_PR_FMT
", " WDEV_PR_FMT
,
1843 WIPHY_PR_ARG
, WDEV_PR_ARG
)
1846 TRACE_EVENT(rdev_channel_switch
,
1847 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
1848 struct cfg80211_csa_settings
*params
),
1849 TP_ARGS(wiphy
, netdev
, params
),
1854 __field(u16
, counter_offset_beacon
)
1855 __field(u16
, counter_offset_presp
)
1856 __field(bool, radar_required
)
1857 __field(bool, block_tx
)
1863 CHAN_DEF_ASSIGN(¶ms
->chandef
);
1864 __entry
->counter_offset_beacon
= params
->counter_offset_beacon
;
1865 __entry
->counter_offset_presp
= params
->counter_offset_presp
;
1866 __entry
->radar_required
= params
->radar_required
;
1867 __entry
->block_tx
= params
->block_tx
;
1868 __entry
->count
= params
->count
;
1870 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", " CHAN_DEF_PR_FMT
1871 ", block_tx: %d, count: %u, radar_required: %d"
1872 ", counter offsets (beacon/presp): %u/%u",
1873 WIPHY_PR_ARG
, NETDEV_PR_ARG
, CHAN_DEF_PR_ARG
,
1874 __entry
->block_tx
, __entry
->count
, __entry
->radar_required
,
1875 __entry
->counter_offset_beacon
,
1876 __entry
->counter_offset_presp
)
1879 /*************************************************************
1880 * cfg80211 exported functions traces *
1881 *************************************************************/
1883 TRACE_EVENT(cfg80211_return_bool
,
1892 TP_printk("returned %s", BOOL_TO_STR(__entry
->ret
))
1895 DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt
,
1896 TP_PROTO(struct net_device
*netdev
, const u8
*macaddr
),
1897 TP_ARGS(netdev
, macaddr
),
1904 MAC_ASSIGN(macaddr
, macaddr
);
1906 TP_printk(NETDEV_PR_FMT
", mac: " MAC_PR_FMT
,
1907 NETDEV_PR_ARG
, MAC_PR_ARG(macaddr
))
1910 DEFINE_EVENT(cfg80211_netdev_mac_evt
, cfg80211_notify_new_peer_candidate
,
1911 TP_PROTO(struct net_device
*netdev
, const u8
*macaddr
),
1912 TP_ARGS(netdev
, macaddr
)
1915 DECLARE_EVENT_CLASS(netdev_evt_only
,
1916 TP_PROTO(struct net_device
*netdev
),
1924 TP_printk(NETDEV_PR_FMT
, NETDEV_PR_ARG
)
1927 DEFINE_EVENT(netdev_evt_only
, cfg80211_send_rx_auth
,
1928 TP_PROTO(struct net_device
*netdev
),
1932 TRACE_EVENT(cfg80211_send_rx_assoc
,
1933 TP_PROTO(struct net_device
*netdev
, struct cfg80211_bss
*bss
),
1934 TP_ARGS(netdev
, bss
),
1942 MAC_ASSIGN(bssid
, bss
->bssid
);
1943 CHAN_ASSIGN(bss
->channel
);
1945 TP_printk(NETDEV_PR_FMT
", " MAC_PR_FMT
", " CHAN_PR_FMT
,
1946 NETDEV_PR_ARG
, MAC_PR_ARG(bssid
), CHAN_PR_ARG
)
1949 DECLARE_EVENT_CLASS(netdev_frame_event
,
1950 TP_PROTO(struct net_device
*netdev
, const u8
*buf
, int len
),
1951 TP_ARGS(netdev
, buf
, len
),
1954 __dynamic_array(u8
, frame
, len
)
1958 memcpy(__get_dynamic_array(frame
), buf
, len
);
1960 TP_printk(NETDEV_PR_FMT
", ftype:0x%.2x",
1962 le16_to_cpup((__le16
*)__get_dynamic_array(frame
)))
1965 DEFINE_EVENT(netdev_frame_event
, cfg80211_rx_unprot_mlme_mgmt
,
1966 TP_PROTO(struct net_device
*netdev
, const u8
*buf
, int len
),
1967 TP_ARGS(netdev
, buf
, len
)
1970 DEFINE_EVENT(netdev_frame_event
, cfg80211_rx_mlme_mgmt
,
1971 TP_PROTO(struct net_device
*netdev
, const u8
*buf
, int len
),
1972 TP_ARGS(netdev
, buf
, len
)
1975 TRACE_EVENT(cfg80211_tx_mlme_mgmt
,
1976 TP_PROTO(struct net_device
*netdev
, const u8
*buf
, int len
),
1977 TP_ARGS(netdev
, buf
, len
),
1980 __dynamic_array(u8
, frame
, len
)
1984 memcpy(__get_dynamic_array(frame
), buf
, len
);
1986 TP_printk(NETDEV_PR_FMT
", ftype:0x%.2x",
1988 le16_to_cpup((__le16
*)__get_dynamic_array(frame
)))
1991 DECLARE_EVENT_CLASS(netdev_mac_evt
,
1992 TP_PROTO(struct net_device
*netdev
, const u8
*mac
),
1993 TP_ARGS(netdev
, mac
),
2000 MAC_ASSIGN(mac
, mac
)
2002 TP_printk(NETDEV_PR_FMT
", mac: " MAC_PR_FMT
,
2003 NETDEV_PR_ARG
, MAC_PR_ARG(mac
))
2006 DEFINE_EVENT(netdev_mac_evt
, cfg80211_send_auth_timeout
,
2007 TP_PROTO(struct net_device
*netdev
, const u8
*mac
),
2008 TP_ARGS(netdev
, mac
)
2011 DEFINE_EVENT(netdev_mac_evt
, cfg80211_send_assoc_timeout
,
2012 TP_PROTO(struct net_device
*netdev
, const u8
*mac
),
2013 TP_ARGS(netdev
, mac
)
2016 TRACE_EVENT(cfg80211_michael_mic_failure
,
2017 TP_PROTO(struct net_device
*netdev
, const u8
*addr
,
2018 enum nl80211_key_type key_type
, int key_id
, const u8
*tsc
),
2019 TP_ARGS(netdev
, addr
, key_type
, key_id
, tsc
),
2023 __field(enum nl80211_key_type
, key_type
)
2024 __field(int, key_id
)
2029 MAC_ASSIGN(addr
, addr
);
2030 __entry
->key_type
= key_type
;
2031 __entry
->key_id
= key_id
;
2032 memcpy(__entry
->tsc
, tsc
, 6);
2034 TP_printk(NETDEV_PR_FMT
", " MAC_PR_FMT
", key type: %d, key id: %d, tsc: %pm",
2035 NETDEV_PR_ARG
, MAC_PR_ARG(addr
), __entry
->key_type
,
2036 __entry
->key_id
, __entry
->tsc
)
2039 TRACE_EVENT(cfg80211_ready_on_channel
,
2040 TP_PROTO(struct wireless_dev
*wdev
, u64 cookie
,
2041 struct ieee80211_channel
*chan
,
2042 unsigned int duration
),
2043 TP_ARGS(wdev
, cookie
, chan
, duration
),
2046 __field(u64
, cookie
)
2048 __field(unsigned int, duration
)
2052 __entry
->cookie
= cookie
;
2054 __entry
->duration
= duration
;
2056 TP_printk(WDEV_PR_FMT
", cookie: %llu, " CHAN_PR_FMT
", duration: %u",
2057 WDEV_PR_ARG
, __entry
->cookie
, CHAN_PR_ARG
,
2061 TRACE_EVENT(cfg80211_ready_on_channel_expired
,
2062 TP_PROTO(struct wireless_dev
*wdev
, u64 cookie
,
2063 struct ieee80211_channel
*chan
),
2064 TP_ARGS(wdev
, cookie
, chan
),
2067 __field(u64
, cookie
)
2072 __entry
->cookie
= cookie
;
2075 TP_printk(WDEV_PR_FMT
", cookie: %llu, " CHAN_PR_FMT
,
2076 WDEV_PR_ARG
, __entry
->cookie
, CHAN_PR_ARG
)
2079 TRACE_EVENT(cfg80211_new_sta
,
2080 TP_PROTO(struct net_device
*netdev
, const u8
*mac_addr
,
2081 struct station_info
*sinfo
),
2082 TP_ARGS(netdev
, mac_addr
, sinfo
),
2090 MAC_ASSIGN(mac_addr
, mac_addr
);
2093 TP_printk(NETDEV_PR_FMT
", " MAC_PR_FMT
,
2094 NETDEV_PR_ARG
, MAC_PR_ARG(mac_addr
))
2097 DEFINE_EVENT(cfg80211_netdev_mac_evt
, cfg80211_del_sta
,
2098 TP_PROTO(struct net_device
*netdev
, const u8
*macaddr
),
2099 TP_ARGS(netdev
, macaddr
)
2102 TRACE_EVENT(cfg80211_rx_mgmt
,
2103 TP_PROTO(struct wireless_dev
*wdev
, int freq
, int sig_mbm
),
2104 TP_ARGS(wdev
, freq
, sig_mbm
),
2108 __field(int, sig_mbm
)
2112 __entry
->freq
= freq
;
2113 __entry
->sig_mbm
= sig_mbm
;
2115 TP_printk(WDEV_PR_FMT
", freq: %d, sig mbm: %d",
2116 WDEV_PR_ARG
, __entry
->freq
, __entry
->sig_mbm
)
2119 TRACE_EVENT(cfg80211_mgmt_tx_status
,
2120 TP_PROTO(struct wireless_dev
*wdev
, u64 cookie
, bool ack
),
2121 TP_ARGS(wdev
, cookie
, ack
),
2124 __field(u64
, cookie
)
2129 __entry
->cookie
= cookie
;
2132 TP_printk(WDEV_PR_FMT
", cookie: %llu, ack: %s",
2133 WDEV_PR_ARG
, __entry
->cookie
, BOOL_TO_STR(__entry
->ack
))
2136 TRACE_EVENT(cfg80211_cqm_rssi_notify
,
2137 TP_PROTO(struct net_device
*netdev
,
2138 enum nl80211_cqm_rssi_threshold_event rssi_event
),
2139 TP_ARGS(netdev
, rssi_event
),
2142 __field(enum nl80211_cqm_rssi_threshold_event
, rssi_event
)
2146 __entry
->rssi_event
= rssi_event
;
2148 TP_printk(NETDEV_PR_FMT
", rssi event: %d",
2149 NETDEV_PR_ARG
, __entry
->rssi_event
)
2152 TRACE_EVENT(cfg80211_reg_can_beacon
,
2153 TP_PROTO(struct wiphy
*wiphy
, struct cfg80211_chan_def
*chandef
),
2154 TP_ARGS(wiphy
, chandef
),
2161 CHAN_DEF_ASSIGN(chandef
);
2163 TP_printk(WIPHY_PR_FMT
", " CHAN_DEF_PR_FMT
,
2164 WIPHY_PR_ARG
, CHAN_DEF_PR_ARG
)
2167 TRACE_EVENT(cfg80211_chandef_dfs_required
,
2168 TP_PROTO(struct wiphy
*wiphy
, struct cfg80211_chan_def
*chandef
),
2169 TP_ARGS(wiphy
, chandef
),
2176 CHAN_DEF_ASSIGN(chandef
);
2178 TP_printk(WIPHY_PR_FMT
", " CHAN_DEF_PR_FMT
,
2179 WIPHY_PR_ARG
, CHAN_DEF_PR_ARG
)
2182 TRACE_EVENT(cfg80211_ch_switch_notify
,
2183 TP_PROTO(struct net_device
*netdev
,
2184 struct cfg80211_chan_def
*chandef
),
2185 TP_ARGS(netdev
, chandef
),
2192 CHAN_DEF_ASSIGN(chandef
);
2194 TP_printk(NETDEV_PR_FMT
", " CHAN_DEF_PR_FMT
,
2195 NETDEV_PR_ARG
, CHAN_DEF_PR_ARG
)
2198 TRACE_EVENT(cfg80211_radar_event
,
2199 TP_PROTO(struct wiphy
*wiphy
, struct cfg80211_chan_def
*chandef
),
2200 TP_ARGS(wiphy
, chandef
),
2207 CHAN_DEF_ASSIGN(chandef
);
2209 TP_printk(WIPHY_PR_FMT
", " CHAN_DEF_PR_FMT
,
2210 WIPHY_PR_ARG
, CHAN_DEF_PR_ARG
)
2213 TRACE_EVENT(cfg80211_cac_event
,
2214 TP_PROTO(struct net_device
*netdev
, enum nl80211_radar_event evt
),
2215 TP_ARGS(netdev
, evt
),
2218 __field(enum nl80211_radar_event
, evt
)
2224 TP_printk(NETDEV_PR_FMT
", event: %d",
2225 NETDEV_PR_ARG
, __entry
->evt
)
2228 DECLARE_EVENT_CLASS(cfg80211_rx_evt
,
2229 TP_PROTO(struct net_device
*netdev
, const u8
*addr
),
2230 TP_ARGS(netdev
, addr
),
2237 MAC_ASSIGN(addr
, addr
);
2239 TP_printk(NETDEV_PR_FMT
", " MAC_PR_FMT
, NETDEV_PR_ARG
, MAC_PR_ARG(addr
))
2242 DEFINE_EVENT(cfg80211_rx_evt
, cfg80211_ibss_joined
,
2243 TP_PROTO(struct net_device
*netdev
, const u8
*addr
),
2244 TP_ARGS(netdev
, addr
)
2247 DEFINE_EVENT(cfg80211_rx_evt
, cfg80211_rx_spurious_frame
,
2248 TP_PROTO(struct net_device
*netdev
, const u8
*addr
),
2249 TP_ARGS(netdev
, addr
)
2252 DEFINE_EVENT(cfg80211_rx_evt
, cfg80211_rx_unexpected_4addr_frame
,
2253 TP_PROTO(struct net_device
*netdev
, const u8
*addr
),
2254 TP_ARGS(netdev
, addr
)
2257 TRACE_EVENT(cfg80211_probe_status
,
2258 TP_PROTO(struct net_device
*netdev
, const u8
*addr
, u64 cookie
,
2260 TP_ARGS(netdev
, addr
, cookie
, acked
),
2264 __field(u64
, cookie
)
2265 __field(bool, acked
)
2269 MAC_ASSIGN(addr
, addr
);
2270 __entry
->cookie
= cookie
;
2271 __entry
->acked
= acked
;
2273 TP_printk(NETDEV_PR_FMT
" addr:" MAC_PR_FMT
", cookie: %llu, acked: %s",
2274 NETDEV_PR_ARG
, MAC_PR_ARG(addr
), __entry
->cookie
,
2275 BOOL_TO_STR(__entry
->acked
))
2278 TRACE_EVENT(cfg80211_cqm_pktloss_notify
,
2279 TP_PROTO(struct net_device
*netdev
, const u8
*peer
, u32 num_packets
),
2280 TP_ARGS(netdev
, peer
, num_packets
),
2284 __field(u32
, num_packets
)
2288 MAC_ASSIGN(peer
, peer
);
2289 __entry
->num_packets
= num_packets
;
2291 TP_printk(NETDEV_PR_FMT
", peer: " MAC_PR_FMT
", num of lost packets: %u",
2292 NETDEV_PR_ARG
, MAC_PR_ARG(peer
), __entry
->num_packets
)
2295 DEFINE_EVENT(cfg80211_netdev_mac_evt
, cfg80211_gtk_rekey_notify
,
2296 TP_PROTO(struct net_device
*netdev
, const u8
*macaddr
),
2297 TP_ARGS(netdev
, macaddr
)
2300 TRACE_EVENT(cfg80211_pmksa_candidate_notify
,
2301 TP_PROTO(struct net_device
*netdev
, int index
, const u8
*bssid
,
2303 TP_ARGS(netdev
, index
, bssid
, preauth
),
2308 __field(bool, preauth
)
2312 __entry
->index
= index
;
2313 MAC_ASSIGN(bssid
, bssid
);
2314 __entry
->preauth
= preauth
;
2316 TP_printk(NETDEV_PR_FMT
", index:%d, bssid: " MAC_PR_FMT
", pre auth: %s",
2317 NETDEV_PR_ARG
, __entry
->index
, MAC_PR_ARG(bssid
),
2318 BOOL_TO_STR(__entry
->preauth
))
2321 TRACE_EVENT(cfg80211_report_obss_beacon
,
2322 TP_PROTO(struct wiphy
*wiphy
, const u8
*frame
, size_t len
,
2323 int freq
, int sig_dbm
),
2324 TP_ARGS(wiphy
, frame
, len
, freq
, sig_dbm
),
2328 __field(int, sig_dbm
)
2332 __entry
->freq
= freq
;
2333 __entry
->sig_dbm
= sig_dbm
;
2335 TP_printk(WIPHY_PR_FMT
", freq: %d, sig_dbm: %d",
2336 WIPHY_PR_ARG
, __entry
->freq
, __entry
->sig_dbm
)
2339 TRACE_EVENT(cfg80211_tdls_oper_request
,
2340 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
, const u8
*peer
,
2341 enum nl80211_tdls_operation oper
, u16 reason_code
),
2342 TP_ARGS(wiphy
, netdev
, peer
, oper
, reason_code
),
2347 __field(enum nl80211_tdls_operation
, oper
)
2348 __field(u16
, reason_code
)
2353 MAC_ASSIGN(peer
, peer
);
2354 __entry
->oper
= oper
;
2355 __entry
->reason_code
= reason_code
;
2357 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", peer: " MAC_PR_FMT
", oper: %d, reason_code %u",
2358 WIPHY_PR_ARG
, NETDEV_PR_ARG
, MAC_PR_ARG(peer
), __entry
->oper
,
2359 __entry
->reason_code
)
2362 TRACE_EVENT(cfg80211_scan_done
,
2363 TP_PROTO(struct cfg80211_scan_request
*request
, bool aborted
),
2364 TP_ARGS(request
, aborted
),
2366 __field(u32
, n_channels
)
2367 __dynamic_array(u8
, ie
, request
? request
->ie_len
: 0)
2368 __array(u32
, rates
, IEEE80211_NUM_BANDS
)
2369 __field(u32
, wdev_id
)
2370 MAC_ENTRY(wiphy_mac
)
2371 __field(bool, no_cck
)
2372 __field(bool, aborted
)
2376 memcpy(__get_dynamic_array(ie
), request
->ie
,
2378 memcpy(__entry
->rates
, request
->rates
,
2379 IEEE80211_NUM_BANDS
);
2380 __entry
->wdev_id
= request
->wdev
?
2381 request
->wdev
->identifier
: 0;
2383 MAC_ASSIGN(wiphy_mac
,
2384 request
->wiphy
->perm_addr
);
2385 __entry
->no_cck
= request
->no_cck
;
2387 __entry
->aborted
= aborted
;
2389 TP_printk("aborted: %s", BOOL_TO_STR(__entry
->aborted
))
2392 DEFINE_EVENT(wiphy_only_evt
, cfg80211_sched_scan_results
,
2393 TP_PROTO(struct wiphy
*wiphy
),
2397 DEFINE_EVENT(wiphy_only_evt
, cfg80211_sched_scan_stopped
,
2398 TP_PROTO(struct wiphy
*wiphy
),
2402 TRACE_EVENT(cfg80211_get_bss
,
2403 TP_PROTO(struct wiphy
*wiphy
, struct ieee80211_channel
*channel
,
2404 const u8
*bssid
, const u8
*ssid
, size_t ssid_len
,
2405 u16 capa_mask
, u16 capa_val
),
2406 TP_ARGS(wiphy
, channel
, bssid
, ssid
, ssid_len
, capa_mask
, capa_val
),
2411 __dynamic_array(u8
, ssid
, ssid_len
)
2412 __field(u16
, capa_mask
)
2413 __field(u16
, capa_val
)
2417 CHAN_ASSIGN(channel
);
2418 MAC_ASSIGN(bssid
, bssid
);
2419 memcpy(__get_dynamic_array(ssid
), ssid
, ssid_len
);
2420 __entry
->capa_mask
= capa_mask
;
2421 __entry
->capa_val
= capa_val
;
2423 TP_printk(WIPHY_PR_FMT
", " CHAN_PR_FMT
", " MAC_PR_FMT
", buf: %#.2x, "
2424 "capa_mask: %d, capa_val: %u", WIPHY_PR_ARG
, CHAN_PR_ARG
,
2425 MAC_PR_ARG(bssid
), ((u8
*)__get_dynamic_array(ssid
))[0],
2426 __entry
->capa_mask
, __entry
->capa_val
)
2429 TRACE_EVENT(cfg80211_inform_bss_width_frame
,
2430 TP_PROTO(struct wiphy
*wiphy
, struct ieee80211_channel
*channel
,
2431 enum nl80211_bss_scan_width scan_width
,
2432 struct ieee80211_mgmt
*mgmt
, size_t len
,
2434 TP_ARGS(wiphy
, channel
, scan_width
, mgmt
, len
, signal
),
2438 __field(enum nl80211_bss_scan_width
, scan_width
)
2439 __dynamic_array(u8
, mgmt
, len
)
2440 __field(s32
, signal
)
2444 CHAN_ASSIGN(channel
);
2445 __entry
->scan_width
= scan_width
;
2447 memcpy(__get_dynamic_array(mgmt
), mgmt
, len
);
2448 __entry
->signal
= signal
;
2450 TP_printk(WIPHY_PR_FMT
", " CHAN_PR_FMT
"(scan_width: %d) signal: %d",
2451 WIPHY_PR_ARG
, CHAN_PR_ARG
, __entry
->scan_width
,
2455 DECLARE_EVENT_CLASS(cfg80211_bss_evt
,
2456 TP_PROTO(struct cfg80211_bss
*pub
),
2463 MAC_ASSIGN(bssid
, pub
->bssid
);
2464 CHAN_ASSIGN(pub
->channel
);
2466 TP_printk(MAC_PR_FMT
", " CHAN_PR_FMT
, MAC_PR_ARG(bssid
), CHAN_PR_ARG
)
2469 DEFINE_EVENT(cfg80211_bss_evt
, cfg80211_return_bss
,
2470 TP_PROTO(struct cfg80211_bss
*pub
),
2474 TRACE_EVENT(cfg80211_return_uint
,
2475 TP_PROTO(unsigned int ret
),
2478 __field(unsigned int, ret
)
2483 TP_printk("ret: %d", __entry
->ret
)
2486 TRACE_EVENT(cfg80211_return_u32
,
2495 TP_printk("ret: %u", __entry
->ret
)
2498 TRACE_EVENT(cfg80211_report_wowlan_wakeup
,
2499 TP_PROTO(struct wiphy
*wiphy
, struct wireless_dev
*wdev
,
2500 struct cfg80211_wowlan_wakeup
*wakeup
),
2501 TP_ARGS(wiphy
, wdev
, wakeup
),
2505 __field(bool, non_wireless
)
2506 __field(bool, disconnect
)
2507 __field(bool, magic_pkt
)
2508 __field(bool, gtk_rekey_failure
)
2509 __field(bool, eap_identity_req
)
2510 __field(bool, four_way_handshake
)
2511 __field(bool, rfkill_release
)
2512 __field(s32
, pattern_idx
)
2513 __field(u32
, packet_len
)
2514 __dynamic_array(u8
, packet
,
2515 wakeup
? wakeup
->packet_present_len
: 0)
2520 __entry
->non_wireless
= !wakeup
;
2521 __entry
->disconnect
= wakeup
? wakeup
->disconnect
: false;
2522 __entry
->magic_pkt
= wakeup
? wakeup
->magic_pkt
: false;
2523 __entry
->gtk_rekey_failure
= wakeup
? wakeup
->gtk_rekey_failure
: false;
2524 __entry
->eap_identity_req
= wakeup
? wakeup
->eap_identity_req
: false;
2525 __entry
->four_way_handshake
= wakeup
? wakeup
->four_way_handshake
: false;
2526 __entry
->rfkill_release
= wakeup
? wakeup
->rfkill_release
: false;
2527 __entry
->pattern_idx
= wakeup
? wakeup
->pattern_idx
: false;
2528 __entry
->packet_len
= wakeup
? wakeup
->packet_len
: false;
2529 if (wakeup
&& wakeup
->packet
&& wakeup
->packet_present_len
)
2530 memcpy(__get_dynamic_array(packet
), wakeup
->packet
,
2531 wakeup
->packet_present_len
);
2533 TP_printk(WIPHY_PR_FMT
", " WDEV_PR_FMT
, WIPHY_PR_ARG
, WDEV_PR_ARG
)
2536 TRACE_EVENT(cfg80211_ft_event
,
2537 TP_PROTO(struct wiphy
*wiphy
, struct net_device
*netdev
,
2538 struct cfg80211_ft_event_params
*ft_event
),
2539 TP_ARGS(wiphy
, netdev
, ft_event
),
2543 __dynamic_array(u8
, ies
, ft_event
->ies_len
)
2544 MAC_ENTRY(target_ap
)
2545 __dynamic_array(u8
, ric_ies
, ft_event
->ric_ies_len
)
2551 memcpy(__get_dynamic_array(ies
), ft_event
->ies
,
2553 MAC_ASSIGN(target_ap
, ft_event
->target_ap
);
2554 if (ft_event
->ric_ies
)
2555 memcpy(__get_dynamic_array(ric_ies
), ft_event
->ric_ies
,
2556 ft_event
->ric_ies_len
);
2558 TP_printk(WIPHY_PR_FMT
", " NETDEV_PR_FMT
", target_ap: " MAC_PR_FMT
,
2559 WIPHY_PR_ARG
, NETDEV_PR_ARG
, MAC_PR_ARG(target_ap
))
2562 #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
2564 #undef TRACE_INCLUDE_PATH
2565 #define TRACE_INCLUDE_PATH .
2566 #undef TRACE_INCLUDE_FILE
2567 #define TRACE_INCLUDE_FILE trace
2568 #include <trace/define_trace.h>