xref: /openbmc/linux/net/wireless/trace.h (revision 55fd7e02)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM cfg80211
4 
5 #if !defined(__RDEV_OPS_TRACE) || defined(TRACE_HEADER_MULTI_READ)
6 #define __RDEV_OPS_TRACE
7 
8 #include <linux/tracepoint.h>
9 
10 #include <linux/rtnetlink.h>
11 #include <linux/etherdevice.h>
12 #include <net/cfg80211.h>
13 #include "core.h"
14 
15 #define MAC_ENTRY(entry_mac) __array(u8, entry_mac, ETH_ALEN)
16 #define MAC_ASSIGN(entry_mac, given_mac) do {			     \
17 	if (given_mac)						     \
18 		memcpy(__entry->entry_mac, given_mac, ETH_ALEN);     \
19 	else							     \
20 		eth_zero_addr(__entry->entry_mac);		     \
21 	} while (0)
22 #define MAC_PR_FMT "%pM"
23 #define MAC_PR_ARG(entry_mac) (__entry->entry_mac)
24 
25 #define MAXNAME		32
26 #define WIPHY_ENTRY	__array(char, wiphy_name, 32)
27 #define WIPHY_ASSIGN	strlcpy(__entry->wiphy_name, wiphy_name(wiphy), MAXNAME)
28 #define WIPHY_PR_FMT	"%s"
29 #define WIPHY_PR_ARG	__entry->wiphy_name
30 
31 #define WDEV_ENTRY	__field(u32, id)
32 #define WDEV_ASSIGN	(__entry->id) = (!IS_ERR_OR_NULL(wdev)	\
33 					 ? wdev->identifier : 0)
34 #define WDEV_PR_FMT	"wdev(%u)"
35 #define WDEV_PR_ARG	(__entry->id)
36 
37 #define NETDEV_ENTRY	__array(char, name, IFNAMSIZ) \
38 			__field(int, ifindex)
39 #define NETDEV_ASSIGN					       \
40 	do {						       \
41 		memcpy(__entry->name, netdev->name, IFNAMSIZ); \
42 		(__entry->ifindex) = (netdev->ifindex);	       \
43 	} while (0)
44 #define NETDEV_PR_FMT	"netdev:%s(%d)"
45 #define NETDEV_PR_ARG	__entry->name, __entry->ifindex
46 
47 #define MESH_CFG_ENTRY __field(u16, dot11MeshRetryTimeout)		   \
48 		       __field(u16, dot11MeshConfirmTimeout)		   \
49 		       __field(u16, dot11MeshHoldingTimeout)		   \
50 		       __field(u16, dot11MeshMaxPeerLinks)		   \
51 		       __field(u8, dot11MeshMaxRetries)			   \
52 		       __field(u8, dot11MeshTTL)			   \
53 		       __field(u8, element_ttl)				   \
54 		       __field(bool, auto_open_plinks)			   \
55 		       __field(u32, dot11MeshNbrOffsetMaxNeighbor)	   \
56 		       __field(u8, dot11MeshHWMPmaxPREQretries)		   \
57 		       __field(u32, path_refresh_time)			   \
58 		       __field(u32, dot11MeshHWMPactivePathTimeout)	   \
59 		       __field(u16, min_discovery_timeout)		   \
60 		       __field(u16, dot11MeshHWMPpreqMinInterval)	   \
61 		       __field(u16, dot11MeshHWMPperrMinInterval)	   \
62 		       __field(u16, dot11MeshHWMPnetDiameterTraversalTime) \
63 		       __field(u8, dot11MeshHWMPRootMode)		   \
64 		       __field(u16, dot11MeshHWMPRannInterval)		   \
65 		       __field(bool, dot11MeshGateAnnouncementProtocol)	   \
66 		       __field(bool, dot11MeshForwarding)		   \
67 		       __field(s32, rssi_threshold)			   \
68 		       __field(u16, ht_opmode)				   \
69 		       __field(u32, dot11MeshHWMPactivePathToRootTimeout)  \
70 		       __field(u16, dot11MeshHWMProotInterval)		   \
71 		       __field(u16, dot11MeshHWMPconfirmationInterval)
72 #define MESH_CFG_ASSIGN							      \
73 	do {								      \
74 		__entry->dot11MeshRetryTimeout = conf->dot11MeshRetryTimeout; \
75 		__entry->dot11MeshConfirmTimeout =			      \
76 				conf->dot11MeshConfirmTimeout;		      \
77 		__entry->dot11MeshHoldingTimeout =			      \
78 				conf->dot11MeshHoldingTimeout;		      \
79 		__entry->dot11MeshMaxPeerLinks = conf->dot11MeshMaxPeerLinks; \
80 		__entry->dot11MeshMaxRetries = conf->dot11MeshMaxRetries;     \
81 		__entry->dot11MeshTTL = conf->dot11MeshTTL;		      \
82 		__entry->element_ttl = conf->element_ttl;		      \
83 		__entry->auto_open_plinks = conf->auto_open_plinks;	      \
84 		__entry->dot11MeshNbrOffsetMaxNeighbor =		      \
85 				conf->dot11MeshNbrOffsetMaxNeighbor;	      \
86 		__entry->dot11MeshHWMPmaxPREQretries =			      \
87 				conf->dot11MeshHWMPmaxPREQretries;	      \
88 		__entry->path_refresh_time = conf->path_refresh_time;	      \
89 		__entry->dot11MeshHWMPactivePathTimeout =		      \
90 				conf->dot11MeshHWMPactivePathTimeout;	      \
91 		__entry->min_discovery_timeout = conf->min_discovery_timeout; \
92 		__entry->dot11MeshHWMPpreqMinInterval =			      \
93 				conf->dot11MeshHWMPpreqMinInterval;	      \
94 		__entry->dot11MeshHWMPperrMinInterval =			      \
95 				conf->dot11MeshHWMPperrMinInterval;	      \
96 		__entry->dot11MeshHWMPnetDiameterTraversalTime =	      \
97 				conf->dot11MeshHWMPnetDiameterTraversalTime;  \
98 		__entry->dot11MeshHWMPRootMode = conf->dot11MeshHWMPRootMode; \
99 		__entry->dot11MeshHWMPRannInterval =			      \
100 				conf->dot11MeshHWMPRannInterval;	      \
101 		__entry->dot11MeshGateAnnouncementProtocol =		      \
102 				conf->dot11MeshGateAnnouncementProtocol;      \
103 		__entry->dot11MeshForwarding = conf->dot11MeshForwarding;     \
104 		__entry->rssi_threshold = conf->rssi_threshold;		      \
105 		__entry->ht_opmode = conf->ht_opmode;			      \
106 		__entry->dot11MeshHWMPactivePathToRootTimeout =		      \
107 				conf->dot11MeshHWMPactivePathToRootTimeout;   \
108 		__entry->dot11MeshHWMProotInterval =			      \
109 				conf->dot11MeshHWMProotInterval;	      \
110 		__entry->dot11MeshHWMPconfirmationInterval =		      \
111 				conf->dot11MeshHWMPconfirmationInterval;      \
112 	} while (0)
113 
114 #define CHAN_ENTRY __field(enum nl80211_band, band) \
115 		   __field(u32, center_freq)		\
116 		   __field(u16, freq_offset)
117 #define CHAN_ASSIGN(chan)					  \
118 	do {							  \
119 		if (chan) {					  \
120 			__entry->band = chan->band;		  \
121 			__entry->center_freq = chan->center_freq; \
122 			__entry->freq_offset = chan->freq_offset; \
123 		} else {					  \
124 			__entry->band = 0;			  \
125 			__entry->center_freq = 0;		  \
126 			__entry->freq_offset = 0;		  \
127 		}						  \
128 	} while (0)
129 #define CHAN_PR_FMT "band: %d, freq: %u.%03u"
130 #define CHAN_PR_ARG __entry->band, __entry->center_freq, __entry->freq_offset
131 
132 #define CHAN_DEF_ENTRY __field(enum nl80211_band, band)		\
133 		       __field(u32, control_freq)			\
134 		       __field(u32, freq_offset)			\
135 		       __field(u32, width)				\
136 		       __field(u32, center_freq1)			\
137 		       __field(u32, freq1_offset)			\
138 		       __field(u32, center_freq2)
139 #define CHAN_DEF_ASSIGN(chandef)					\
140 	do {								\
141 		if ((chandef) && (chandef)->chan) {			\
142 			__entry->band = (chandef)->chan->band;		\
143 			__entry->control_freq =				\
144 				(chandef)->chan->center_freq;		\
145 			__entry->freq_offset =				\
146 				(chandef)->chan->freq_offset;		\
147 			__entry->width = (chandef)->width;		\
148 			__entry->center_freq1 = (chandef)->center_freq1;\
149 			__entry->freq1_offset = (chandef)->freq1_offset;\
150 			__entry->center_freq2 = (chandef)->center_freq2;\
151 		} else {						\
152 			__entry->band = 0;				\
153 			__entry->control_freq = 0;			\
154 			__entry->freq_offset = 0;			\
155 			__entry->width = 0;				\
156 			__entry->center_freq1 = 0;			\
157 			__entry->freq1_offset = 0;			\
158 			__entry->center_freq2 = 0;			\
159 		}							\
160 	} while (0)
161 #define CHAN_DEF_PR_FMT							\
162 	"band: %d, control freq: %u.%03u, width: %d, cf1: %u.%03u, cf2: %u"
163 #define CHAN_DEF_PR_ARG __entry->band, __entry->control_freq,		\
164 			__entry->freq_offset, __entry->width,		\
165 			__entry->center_freq1, __entry->freq1_offset,	\
166 			__entry->center_freq2
167 
168 #define SINFO_ENTRY __field(int, generation)	    \
169 		    __field(u32, connected_time)    \
170 		    __field(u32, inactive_time)	    \
171 		    __field(u32, rx_bytes)	    \
172 		    __field(u32, tx_bytes)	    \
173 		    __field(u32, rx_packets)	    \
174 		    __field(u32, tx_packets)	    \
175 		    __field(u32, tx_retries)	    \
176 		    __field(u32, tx_failed)	    \
177 		    __field(u32, rx_dropped_misc)   \
178 		    __field(u32, beacon_loss_count) \
179 		    __field(u16, llid)		    \
180 		    __field(u16, plid)		    \
181 		    __field(u8, plink_state)
182 #define SINFO_ASSIGN						       \
183 	do {							       \
184 		__entry->generation = sinfo->generation;	       \
185 		__entry->connected_time = sinfo->connected_time;       \
186 		__entry->inactive_time = sinfo->inactive_time;	       \
187 		__entry->rx_bytes = sinfo->rx_bytes;		       \
188 		__entry->tx_bytes = sinfo->tx_bytes;		       \
189 		__entry->rx_packets = sinfo->rx_packets;	       \
190 		__entry->tx_packets = sinfo->tx_packets;	       \
191 		__entry->tx_retries = sinfo->tx_retries;	       \
192 		__entry->tx_failed = sinfo->tx_failed;		       \
193 		__entry->rx_dropped_misc = sinfo->rx_dropped_misc;     \
194 		__entry->beacon_loss_count = sinfo->beacon_loss_count; \
195 		__entry->llid = sinfo->llid;			       \
196 		__entry->plid = sinfo->plid;			       \
197 		__entry->plink_state = sinfo->plink_state;	       \
198 	} while (0)
199 
200 #define BOOL_TO_STR(bo) (bo) ? "true" : "false"
201 
202 #define QOS_MAP_ENTRY __field(u8, num_des)			\
203 		      __array(u8, dscp_exception,		\
204 			      2 * IEEE80211_QOS_MAP_MAX_EX)	\
205 		      __array(u8, up, IEEE80211_QOS_MAP_LEN_MIN)
206 #define QOS_MAP_ASSIGN(qos_map)					\
207 	do {							\
208 		if ((qos_map)) {				\
209 			__entry->num_des = (qos_map)->num_des;	\
210 			memcpy(__entry->dscp_exception,		\
211 			       &(qos_map)->dscp_exception,	\
212 			       2 * IEEE80211_QOS_MAP_MAX_EX);	\
213 			memcpy(__entry->up, &(qos_map)->up,	\
214 			       IEEE80211_QOS_MAP_LEN_MIN);	\
215 		} else {					\
216 			__entry->num_des = 0;			\
217 			memset(__entry->dscp_exception, 0,	\
218 			       2 * IEEE80211_QOS_MAP_MAX_EX);	\
219 			memset(__entry->up, 0,			\
220 			       IEEE80211_QOS_MAP_LEN_MIN);	\
221 		}						\
222 	} while (0)
223 
224 /*************************************************************
225  *			rdev->ops traces		     *
226  *************************************************************/
227 
228 TRACE_EVENT(rdev_suspend,
229 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_wowlan *wow),
230 	TP_ARGS(wiphy, wow),
231 	TP_STRUCT__entry(
232 		WIPHY_ENTRY
233 		__field(bool, any)
234 		__field(bool, disconnect)
235 		__field(bool, magic_pkt)
236 		__field(bool, gtk_rekey_failure)
237 		__field(bool, eap_identity_req)
238 		__field(bool, four_way_handshake)
239 		__field(bool, rfkill_release)
240 		__field(bool, valid_wow)
241 	),
242 	TP_fast_assign(
243 		WIPHY_ASSIGN;
244 		if (wow) {
245 			__entry->any = wow->any;
246 			__entry->disconnect = wow->disconnect;
247 			__entry->magic_pkt = wow->magic_pkt;
248 			__entry->gtk_rekey_failure = wow->gtk_rekey_failure;
249 			__entry->eap_identity_req = wow->eap_identity_req;
250 			__entry->four_way_handshake = wow->four_way_handshake;
251 			__entry->rfkill_release = wow->rfkill_release;
252 			__entry->valid_wow = true;
253 		} else {
254 			__entry->valid_wow = false;
255 		}
256 	),
257 	TP_printk(WIPHY_PR_FMT ", wow%s - any: %d, disconnect: %d, "
258 		  "magic pkt: %d, gtk rekey failure: %d, eap identify req: %d, "
259 		  "four way handshake: %d, rfkill release: %d.",
260 		  WIPHY_PR_ARG, __entry->valid_wow ? "" : "(Not configured!)",
261 		  __entry->any, __entry->disconnect, __entry->magic_pkt,
262 		  __entry->gtk_rekey_failure, __entry->eap_identity_req,
263 		  __entry->four_way_handshake, __entry->rfkill_release)
264 );
265 
266 TRACE_EVENT(rdev_return_int,
267 	TP_PROTO(struct wiphy *wiphy, int ret),
268 	TP_ARGS(wiphy, ret),
269 	TP_STRUCT__entry(
270 		WIPHY_ENTRY
271 		__field(int, ret)
272 	),
273 	TP_fast_assign(
274 		WIPHY_ASSIGN;
275 		__entry->ret = ret;
276 	),
277 	TP_printk(WIPHY_PR_FMT ", returned: %d", WIPHY_PR_ARG, __entry->ret)
278 );
279 
280 TRACE_EVENT(rdev_scan,
281 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_scan_request *request),
282 	TP_ARGS(wiphy, request),
283 	TP_STRUCT__entry(
284 		WIPHY_ENTRY
285 	),
286 	TP_fast_assign(
287 		WIPHY_ASSIGN;
288 	),
289 	TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
290 );
291 
292 DECLARE_EVENT_CLASS(wiphy_only_evt,
293 	TP_PROTO(struct wiphy *wiphy),
294 	TP_ARGS(wiphy),
295 	TP_STRUCT__entry(
296 		WIPHY_ENTRY
297 	),
298 	TP_fast_assign(
299 		WIPHY_ASSIGN;
300 	),
301 	TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
302 );
303 
304 DEFINE_EVENT(wiphy_only_evt, rdev_resume,
305 	TP_PROTO(struct wiphy *wiphy),
306 	TP_ARGS(wiphy)
307 );
308 
309 DEFINE_EVENT(wiphy_only_evt, rdev_return_void,
310 	TP_PROTO(struct wiphy *wiphy),
311 	TP_ARGS(wiphy)
312 );
313 
314 DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna,
315 	TP_PROTO(struct wiphy *wiphy),
316 	TP_ARGS(wiphy)
317 );
318 
319 DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll,
320 	TP_PROTO(struct wiphy *wiphy),
321 	TP_ARGS(wiphy)
322 );
323 
324 DECLARE_EVENT_CLASS(wiphy_enabled_evt,
325 	TP_PROTO(struct wiphy *wiphy, bool enabled),
326 	TP_ARGS(wiphy, enabled),
327 	TP_STRUCT__entry(
328 		WIPHY_ENTRY
329 		__field(bool, enabled)
330 	),
331 	TP_fast_assign(
332 		WIPHY_ASSIGN;
333 		__entry->enabled = enabled;
334 	),
335 	TP_printk(WIPHY_PR_FMT ", %senabled ",
336 		  WIPHY_PR_ARG, __entry->enabled ? "" : "not ")
337 );
338 
339 DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup,
340 	TP_PROTO(struct wiphy *wiphy, bool enabled),
341 	TP_ARGS(wiphy, enabled)
342 );
343 
344 TRACE_EVENT(rdev_add_virtual_intf,
345 	TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type),
346 	TP_ARGS(wiphy, name, type),
347 	TP_STRUCT__entry(
348 		WIPHY_ENTRY
349 		__string(vir_intf_name, name ? name : "<noname>")
350 		__field(enum nl80211_iftype, type)
351 	),
352 	TP_fast_assign(
353 		WIPHY_ASSIGN;
354 		__assign_str(vir_intf_name, name ? name : "<noname>");
355 		__entry->type = type;
356 	),
357 	TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d",
358 		  WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type)
359 );
360 
361 DECLARE_EVENT_CLASS(wiphy_wdev_evt,
362 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
363 	TP_ARGS(wiphy, wdev),
364 	TP_STRUCT__entry(
365 		WIPHY_ENTRY
366 		WDEV_ENTRY
367 	),
368 	TP_fast_assign(
369 		WIPHY_ASSIGN;
370 		WDEV_ASSIGN;
371 	),
372 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
373 );
374 
375 DECLARE_EVENT_CLASS(wiphy_wdev_cookie_evt,
376 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
377 	TP_ARGS(wiphy, wdev, cookie),
378 	TP_STRUCT__entry(
379 		WIPHY_ENTRY
380 		WDEV_ENTRY
381 		__field(u64, cookie)
382 	),
383 	TP_fast_assign(
384 		WIPHY_ASSIGN;
385 		WDEV_ASSIGN;
386 		__entry->cookie = cookie;
387 	),
388 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %lld",
389 		  WIPHY_PR_ARG, WDEV_PR_ARG,
390 		  (unsigned long long)__entry->cookie)
391 );
392 
393 DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev,
394 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
395 	TP_ARGS(wiphy, wdev)
396 );
397 
398 DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf,
399 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
400 	TP_ARGS(wiphy, wdev)
401 );
402 
403 TRACE_EVENT(rdev_change_virtual_intf,
404 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
405 		 enum nl80211_iftype type),
406 	TP_ARGS(wiphy, netdev, type),
407 	TP_STRUCT__entry(
408 		WIPHY_ENTRY
409 		NETDEV_ENTRY
410 		__field(enum nl80211_iftype, type)
411 	),
412 	TP_fast_assign(
413 		WIPHY_ASSIGN;
414 		NETDEV_ASSIGN;
415 		__entry->type = type;
416 	),
417 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", type: %d",
418 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type)
419 );
420 
421 DECLARE_EVENT_CLASS(key_handle,
422 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
423 		 bool pairwise, const u8 *mac_addr),
424 	TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr),
425 	TP_STRUCT__entry(
426 		WIPHY_ENTRY
427 		NETDEV_ENTRY
428 		MAC_ENTRY(mac_addr)
429 		__field(u8, key_index)
430 		__field(bool, pairwise)
431 	),
432 	TP_fast_assign(
433 		WIPHY_ASSIGN;
434 		NETDEV_ASSIGN;
435 		MAC_ASSIGN(mac_addr, mac_addr);
436 		__entry->key_index = key_index;
437 		__entry->pairwise = pairwise;
438 	),
439 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key_index: %u, pairwise: %s, mac addr: " MAC_PR_FMT,
440 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
441 		  BOOL_TO_STR(__entry->pairwise), MAC_PR_ARG(mac_addr))
442 );
443 
444 DEFINE_EVENT(key_handle, rdev_get_key,
445 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
446 		 bool pairwise, const u8 *mac_addr),
447 	TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
448 );
449 
450 DEFINE_EVENT(key_handle, rdev_del_key,
451 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
452 		 bool pairwise, const u8 *mac_addr),
453 	TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
454 );
455 
456 TRACE_EVENT(rdev_add_key,
457 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
458 		 bool pairwise, const u8 *mac_addr, u8 mode),
459 	TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr, mode),
460 	TP_STRUCT__entry(
461 		WIPHY_ENTRY
462 		NETDEV_ENTRY
463 		MAC_ENTRY(mac_addr)
464 		__field(u8, key_index)
465 		__field(bool, pairwise)
466 		__field(u8, mode)
467 	),
468 	TP_fast_assign(
469 		WIPHY_ASSIGN;
470 		NETDEV_ASSIGN;
471 		MAC_ASSIGN(mac_addr, mac_addr);
472 		__entry->key_index = key_index;
473 		__entry->pairwise = pairwise;
474 		__entry->mode = mode;
475 	),
476 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key_index: %u, "
477 		  "mode: %u, pairwise: %s, mac addr: " MAC_PR_FMT,
478 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
479 		  __entry->mode, BOOL_TO_STR(__entry->pairwise),
480 		  MAC_PR_ARG(mac_addr))
481 );
482 
483 TRACE_EVENT(rdev_set_default_key,
484 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
485 		 bool unicast, bool multicast),
486 	TP_ARGS(wiphy, netdev, key_index, unicast, multicast),
487 	TP_STRUCT__entry(
488 		WIPHY_ENTRY
489 		NETDEV_ENTRY
490 		__field(u8, key_index)
491 		__field(bool, unicast)
492 		__field(bool, multicast)
493 	),
494 	TP_fast_assign(
495 		WIPHY_ASSIGN;
496 		NETDEV_ASSIGN;
497 		__entry->key_index = key_index;
498 		__entry->unicast = unicast;
499 		__entry->multicast = multicast;
500 	),
501 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u, unicast: %s, multicast: %s",
502 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
503 		  BOOL_TO_STR(__entry->unicast),
504 		  BOOL_TO_STR(__entry->multicast))
505 );
506 
507 TRACE_EVENT(rdev_set_default_mgmt_key,
508 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
509 	TP_ARGS(wiphy, netdev, key_index),
510 	TP_STRUCT__entry(
511 		WIPHY_ENTRY
512 		NETDEV_ENTRY
513 		__field(u8, key_index)
514 	),
515 	TP_fast_assign(
516 		WIPHY_ASSIGN;
517 		NETDEV_ASSIGN;
518 		__entry->key_index = key_index;
519 	),
520 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
521 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
522 );
523 
524 TRACE_EVENT(rdev_set_default_beacon_key,
525 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
526 	TP_ARGS(wiphy, netdev, key_index),
527 	TP_STRUCT__entry(
528 		WIPHY_ENTRY
529 		NETDEV_ENTRY
530 		__field(u8, key_index)
531 	),
532 	TP_fast_assign(
533 		WIPHY_ASSIGN;
534 		NETDEV_ASSIGN;
535 		__entry->key_index = key_index;
536 	),
537 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
538 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
539 );
540 
541 TRACE_EVENT(rdev_start_ap,
542 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
543 		 struct cfg80211_ap_settings *settings),
544 	TP_ARGS(wiphy, netdev, settings),
545 	TP_STRUCT__entry(
546 		WIPHY_ENTRY
547 		NETDEV_ENTRY
548 		CHAN_DEF_ENTRY
549 		__field(int, beacon_interval)
550 		__field(int, dtim_period)
551 		__array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
552 		__field(enum nl80211_hidden_ssid, hidden_ssid)
553 		__field(u32, wpa_ver)
554 		__field(bool, privacy)
555 		__field(enum nl80211_auth_type, auth_type)
556 		__field(int, inactivity_timeout)
557 	),
558 	TP_fast_assign(
559 		WIPHY_ASSIGN;
560 		NETDEV_ASSIGN;
561 		CHAN_DEF_ASSIGN(&settings->chandef);
562 		__entry->beacon_interval = settings->beacon_interval;
563 		__entry->dtim_period = settings->dtim_period;
564 		__entry->hidden_ssid = settings->hidden_ssid;
565 		__entry->wpa_ver = settings->crypto.wpa_versions;
566 		__entry->privacy = settings->privacy;
567 		__entry->auth_type = settings->auth_type;
568 		__entry->inactivity_timeout = settings->inactivity_timeout;
569 		memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
570 		memcpy(__entry->ssid, settings->ssid, settings->ssid_len);
571 	),
572 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", AP settings - ssid: %s, "
573 		  CHAN_DEF_PR_FMT ", beacon interval: %d, dtim period: %d, "
574 		  "hidden ssid: %d, wpa versions: %u, privacy: %s, "
575 		  "auth type: %d, inactivity timeout: %d",
576 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_DEF_PR_ARG,
577 		  __entry->beacon_interval, __entry->dtim_period,
578 		  __entry->hidden_ssid, __entry->wpa_ver,
579 		  BOOL_TO_STR(__entry->privacy), __entry->auth_type,
580 		  __entry->inactivity_timeout)
581 );
582 
583 TRACE_EVENT(rdev_change_beacon,
584 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
585 		 struct cfg80211_beacon_data *info),
586 	TP_ARGS(wiphy, netdev, info),
587 	TP_STRUCT__entry(
588 		WIPHY_ENTRY
589 		NETDEV_ENTRY
590 		__dynamic_array(u8, head, info ? info->head_len : 0)
591 		__dynamic_array(u8, tail, info ? info->tail_len : 0)
592 		__dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0)
593 		__dynamic_array(u8, proberesp_ies,
594 				info ? info->proberesp_ies_len : 0)
595 		__dynamic_array(u8, assocresp_ies,
596 				info ? info->assocresp_ies_len : 0)
597 		__dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0)
598 	),
599 	TP_fast_assign(
600 		WIPHY_ASSIGN;
601 		NETDEV_ASSIGN;
602 		if (info) {
603 			if (info->head)
604 				memcpy(__get_dynamic_array(head), info->head,
605 				       info->head_len);
606 			if (info->tail)
607 				memcpy(__get_dynamic_array(tail), info->tail,
608 				       info->tail_len);
609 			if (info->beacon_ies)
610 				memcpy(__get_dynamic_array(beacon_ies),
611 				       info->beacon_ies, info->beacon_ies_len);
612 			if (info->proberesp_ies)
613 				memcpy(__get_dynamic_array(proberesp_ies),
614 				       info->proberesp_ies,
615 				       info->proberesp_ies_len);
616 			if (info->assocresp_ies)
617 				memcpy(__get_dynamic_array(assocresp_ies),
618 				       info->assocresp_ies,
619 				       info->assocresp_ies_len);
620 			if (info->probe_resp)
621 				memcpy(__get_dynamic_array(probe_resp),
622 				       info->probe_resp, info->probe_resp_len);
623 		}
624 	),
625 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
626 );
627 
628 DECLARE_EVENT_CLASS(wiphy_netdev_evt,
629 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
630 	TP_ARGS(wiphy, netdev),
631 	TP_STRUCT__entry(
632 		WIPHY_ENTRY
633 		NETDEV_ENTRY
634 	),
635 	TP_fast_assign(
636 		WIPHY_ASSIGN;
637 		NETDEV_ASSIGN;
638 	),
639 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
640 );
641 
642 DEFINE_EVENT(wiphy_netdev_evt, rdev_stop_ap,
643 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
644 	TP_ARGS(wiphy, netdev)
645 );
646 
647 DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data,
648 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
649 	TP_ARGS(wiphy, netdev)
650 );
651 
652 DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config,
653 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
654 	TP_ARGS(wiphy, netdev)
655 );
656 
657 DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh,
658 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
659 	TP_ARGS(wiphy, netdev)
660 );
661 
662 DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ibss,
663 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
664 	TP_ARGS(wiphy, netdev)
665 );
666 
667 DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ocb,
668 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
669 	TP_ARGS(wiphy, netdev)
670 );
671 
672 DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa,
673 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
674 	TP_ARGS(wiphy, netdev)
675 );
676 
677 DEFINE_EVENT(wiphy_netdev_evt, rdev_end_cac,
678 	     TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
679 	     TP_ARGS(wiphy, netdev)
680 );
681 
682 DECLARE_EVENT_CLASS(station_add_change,
683 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
684 		 struct station_parameters *params),
685 	TP_ARGS(wiphy, netdev, mac, params),
686 	TP_STRUCT__entry(
687 		WIPHY_ENTRY
688 		NETDEV_ENTRY
689 		MAC_ENTRY(sta_mac)
690 		__field(u32, sta_flags_mask)
691 		__field(u32, sta_flags_set)
692 		__field(u32, sta_modify_mask)
693 		__field(int, listen_interval)
694 		__field(u16, capability)
695 		__field(u16, aid)
696 		__field(u8, plink_action)
697 		__field(u8, plink_state)
698 		__field(u8, uapsd_queues)
699 		__field(u8, max_sp)
700 		__field(u8, opmode_notif)
701 		__field(bool, opmode_notif_used)
702 		__array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap))
703 		__array(u8, vht_capa, (int)sizeof(struct ieee80211_vht_cap))
704 		__array(char, vlan, IFNAMSIZ)
705 		__dynamic_array(u8, supported_rates,
706 				params->supported_rates_len)
707 		__dynamic_array(u8, ext_capab, params->ext_capab_len)
708 		__dynamic_array(u8, supported_channels,
709 				params->supported_channels_len)
710 		__dynamic_array(u8, supported_oper_classes,
711 				params->supported_oper_classes_len)
712 	),
713 	TP_fast_assign(
714 		WIPHY_ASSIGN;
715 		NETDEV_ASSIGN;
716 		MAC_ASSIGN(sta_mac, mac);
717 		__entry->sta_flags_mask = params->sta_flags_mask;
718 		__entry->sta_flags_set = params->sta_flags_set;
719 		__entry->sta_modify_mask = params->sta_modify_mask;
720 		__entry->listen_interval = params->listen_interval;
721 		__entry->aid = params->aid;
722 		__entry->plink_action = params->plink_action;
723 		__entry->plink_state = params->plink_state;
724 		__entry->uapsd_queues = params->uapsd_queues;
725 		memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap));
726 		if (params->ht_capa)
727 			memcpy(__entry->ht_capa, params->ht_capa,
728 			       sizeof(struct ieee80211_ht_cap));
729 		memset(__entry->vht_capa, 0, sizeof(struct ieee80211_vht_cap));
730 		if (params->vht_capa)
731 			memcpy(__entry->vht_capa, params->vht_capa,
732 			       sizeof(struct ieee80211_vht_cap));
733 		memset(__entry->vlan, 0, sizeof(__entry->vlan));
734 		if (params->vlan)
735 			memcpy(__entry->vlan, params->vlan->name, IFNAMSIZ);
736 		if (params->supported_rates && params->supported_rates_len)
737 			memcpy(__get_dynamic_array(supported_rates),
738 			       params->supported_rates,
739 			       params->supported_rates_len);
740 		if (params->ext_capab && params->ext_capab_len)
741 			memcpy(__get_dynamic_array(ext_capab),
742 			       params->ext_capab,
743 			       params->ext_capab_len);
744 		if (params->supported_channels &&
745 		    params->supported_channels_len)
746 			memcpy(__get_dynamic_array(supported_channels),
747 			       params->supported_channels,
748 			       params->supported_channels_len);
749 		if (params->supported_oper_classes &&
750 		    params->supported_oper_classes_len)
751 			memcpy(__get_dynamic_array(supported_oper_classes),
752 			       params->supported_oper_classes,
753 			       params->supported_oper_classes_len);
754 		__entry->max_sp = params->max_sp;
755 		__entry->capability = params->capability;
756 		__entry->opmode_notif = params->opmode_notif;
757 		__entry->opmode_notif_used = params->opmode_notif_used;
758 	),
759 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
760 		  ", station flags mask: %u, station flags set: %u, "
761 		  "station modify mask: %u, listen interval: %d, aid: %u, "
762 		  "plink action: %u, plink state: %u, uapsd queues: %u, vlan:%s",
763 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
764 		  __entry->sta_flags_mask, __entry->sta_flags_set,
765 		  __entry->sta_modify_mask, __entry->listen_interval,
766 		  __entry->aid, __entry->plink_action, __entry->plink_state,
767 		  __entry->uapsd_queues, __entry->vlan)
768 );
769 
770 DEFINE_EVENT(station_add_change, rdev_add_station,
771 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
772 		 struct station_parameters *params),
773 	TP_ARGS(wiphy, netdev, mac, params)
774 );
775 
776 DEFINE_EVENT(station_add_change, rdev_change_station,
777 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
778 		 struct station_parameters *params),
779 	TP_ARGS(wiphy, netdev, mac, params)
780 );
781 
782 DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
783 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
784 	TP_ARGS(wiphy, netdev, mac),
785 	TP_STRUCT__entry(
786 		WIPHY_ENTRY
787 		NETDEV_ENTRY
788 		MAC_ENTRY(sta_mac)
789 	),
790 	TP_fast_assign(
791 		WIPHY_ASSIGN;
792 		NETDEV_ASSIGN;
793 		MAC_ASSIGN(sta_mac, mac);
794 	),
795 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
796 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac))
797 );
798 
799 DECLARE_EVENT_CLASS(station_del,
800 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
801 		 struct station_del_parameters *params),
802 	TP_ARGS(wiphy, netdev, params),
803 	TP_STRUCT__entry(
804 		WIPHY_ENTRY
805 		NETDEV_ENTRY
806 		MAC_ENTRY(sta_mac)
807 		__field(u8, subtype)
808 		__field(u16, reason_code)
809 	),
810 	TP_fast_assign(
811 		WIPHY_ASSIGN;
812 		NETDEV_ASSIGN;
813 		MAC_ASSIGN(sta_mac, params->mac);
814 		__entry->subtype = params->subtype;
815 		__entry->reason_code = params->reason_code;
816 	),
817 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
818 		  ", subtype: %u, reason_code: %u",
819 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
820 		  __entry->subtype, __entry->reason_code)
821 );
822 
823 DEFINE_EVENT(station_del, rdev_del_station,
824 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
825 		 struct station_del_parameters *params),
826 	TP_ARGS(wiphy, netdev, params)
827 );
828 
829 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station,
830 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
831 	TP_ARGS(wiphy, netdev, mac)
832 );
833 
834 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
835 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
836 	TP_ARGS(wiphy, netdev, mac)
837 );
838 
839 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer,
840 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
841 	TP_ARGS(wiphy, netdev, mac)
842 );
843 
844 TRACE_EVENT(rdev_dump_station,
845 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
846 		 u8 *mac),
847 	TP_ARGS(wiphy, netdev, _idx, mac),
848 	TP_STRUCT__entry(
849 		WIPHY_ENTRY
850 		NETDEV_ENTRY
851 		MAC_ENTRY(sta_mac)
852 		__field(int, idx)
853 	),
854 	TP_fast_assign(
855 		WIPHY_ASSIGN;
856 		NETDEV_ASSIGN;
857 		MAC_ASSIGN(sta_mac, mac);
858 		__entry->idx = _idx;
859 	),
860 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d",
861 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
862 		  __entry->idx)
863 );
864 
865 TRACE_EVENT(rdev_return_int_station_info,
866 	TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo),
867 	TP_ARGS(wiphy, ret, sinfo),
868 	TP_STRUCT__entry(
869 		WIPHY_ENTRY
870 		__field(int, ret)
871 		SINFO_ENTRY
872 	),
873 	TP_fast_assign(
874 		WIPHY_ASSIGN;
875 		__entry->ret = ret;
876 		SINFO_ASSIGN;
877 	),
878 	TP_printk(WIPHY_PR_FMT ", returned %d" ,
879 		  WIPHY_PR_ARG, __entry->ret)
880 );
881 
882 DECLARE_EVENT_CLASS(mpath_evt,
883 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
884 		 u8 *next_hop),
885 	TP_ARGS(wiphy, netdev, dst, next_hop),
886 	TP_STRUCT__entry(
887 		WIPHY_ENTRY
888 		NETDEV_ENTRY
889 		MAC_ENTRY(dst)
890 		MAC_ENTRY(next_hop)
891 	),
892 	TP_fast_assign(
893 		WIPHY_ASSIGN;
894 		NETDEV_ASSIGN;
895 		MAC_ASSIGN(dst, dst);
896 		MAC_ASSIGN(next_hop, next_hop);
897 	),
898 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT,
899 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst),
900 		  MAC_PR_ARG(next_hop))
901 );
902 
903 DEFINE_EVENT(mpath_evt, rdev_add_mpath,
904 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
905 		 u8 *next_hop),
906 	TP_ARGS(wiphy, netdev, dst, next_hop)
907 );
908 
909 DEFINE_EVENT(mpath_evt, rdev_change_mpath,
910 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
911 		 u8 *next_hop),
912 	TP_ARGS(wiphy, netdev, dst, next_hop)
913 );
914 
915 DEFINE_EVENT(mpath_evt, rdev_get_mpath,
916 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
917 		 u8 *next_hop),
918 	TP_ARGS(wiphy, netdev, dst, next_hop)
919 );
920 
921 TRACE_EVENT(rdev_dump_mpath,
922 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
923 		 u8 *dst, u8 *next_hop),
924 	TP_ARGS(wiphy, netdev, _idx, dst, next_hop),
925 	TP_STRUCT__entry(
926 		WIPHY_ENTRY
927 		NETDEV_ENTRY
928 		MAC_ENTRY(dst)
929 		MAC_ENTRY(next_hop)
930 		__field(int, idx)
931 	),
932 	TP_fast_assign(
933 		WIPHY_ASSIGN;
934 		NETDEV_ASSIGN;
935 		MAC_ASSIGN(dst, dst);
936 		MAC_ASSIGN(next_hop, next_hop);
937 		__entry->idx = _idx;
938 	),
939 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
940 		  MAC_PR_FMT ", next hop: " MAC_PR_FMT,
941 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
942 		  MAC_PR_ARG(next_hop))
943 );
944 
945 TRACE_EVENT(rdev_get_mpp,
946 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
947 		 u8 *dst, u8 *mpp),
948 	TP_ARGS(wiphy, netdev, dst, mpp),
949 	TP_STRUCT__entry(
950 		WIPHY_ENTRY
951 		NETDEV_ENTRY
952 		MAC_ENTRY(dst)
953 		MAC_ENTRY(mpp)
954 	),
955 	TP_fast_assign(
956 		WIPHY_ASSIGN;
957 		NETDEV_ASSIGN;
958 		MAC_ASSIGN(dst, dst);
959 		MAC_ASSIGN(mpp, mpp);
960 	),
961 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT
962 		  ", mpp: " MAC_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG,
963 		  MAC_PR_ARG(dst), MAC_PR_ARG(mpp))
964 );
965 
966 TRACE_EVENT(rdev_dump_mpp,
967 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
968 		 u8 *dst, u8 *mpp),
969 	TP_ARGS(wiphy, netdev, _idx, mpp, dst),
970 	TP_STRUCT__entry(
971 		WIPHY_ENTRY
972 		NETDEV_ENTRY
973 		MAC_ENTRY(dst)
974 		MAC_ENTRY(mpp)
975 		__field(int, idx)
976 	),
977 	TP_fast_assign(
978 		WIPHY_ASSIGN;
979 		NETDEV_ASSIGN;
980 		MAC_ASSIGN(dst, dst);
981 		MAC_ASSIGN(mpp, mpp);
982 		__entry->idx = _idx;
983 	),
984 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
985 		  MAC_PR_FMT ", mpp: " MAC_PR_FMT,
986 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
987 		  MAC_PR_ARG(mpp))
988 );
989 
990 TRACE_EVENT(rdev_return_int_mpath_info,
991 	TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo),
992 	TP_ARGS(wiphy, ret, pinfo),
993 	TP_STRUCT__entry(
994 		WIPHY_ENTRY
995 		__field(int, ret)
996 		__field(int, generation)
997 		__field(u32, filled)
998 		__field(u32, frame_qlen)
999 		__field(u32, sn)
1000 		__field(u32, metric)
1001 		__field(u32, exptime)
1002 		__field(u32, discovery_timeout)
1003 		__field(u8, discovery_retries)
1004 		__field(u8, flags)
1005 	),
1006 	TP_fast_assign(
1007 		WIPHY_ASSIGN;
1008 		__entry->ret = ret;
1009 		__entry->generation = pinfo->generation;
1010 		__entry->filled = pinfo->filled;
1011 		__entry->frame_qlen = pinfo->frame_qlen;
1012 		__entry->sn = pinfo->sn;
1013 		__entry->metric = pinfo->metric;
1014 		__entry->exptime = pinfo->exptime;
1015 		__entry->discovery_timeout = pinfo->discovery_timeout;
1016 		__entry->discovery_retries = pinfo->discovery_retries;
1017 		__entry->flags = pinfo->flags;
1018 	),
1019 	TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, "
1020 		  "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
1021 		  " discovery timeout: %u, discovery retries: %u, flags: %u",
1022 		  WIPHY_PR_ARG, __entry->ret, __entry->generation,
1023 		  __entry->filled, __entry->frame_qlen, __entry->sn,
1024 		  __entry->metric, __entry->exptime, __entry->discovery_timeout,
1025 		  __entry->discovery_retries, __entry->flags)
1026 );
1027 
1028 TRACE_EVENT(rdev_return_int_mesh_config,
1029 	TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf),
1030 	TP_ARGS(wiphy, ret, conf),
1031 	TP_STRUCT__entry(
1032 		WIPHY_ENTRY
1033 		MESH_CFG_ENTRY
1034 		__field(int, ret)
1035 	),
1036 	TP_fast_assign(
1037 		WIPHY_ASSIGN;
1038 		MESH_CFG_ASSIGN;
1039 		__entry->ret = ret;
1040 	),
1041 	TP_printk(WIPHY_PR_FMT ", returned: %d",
1042 		  WIPHY_PR_ARG, __entry->ret)
1043 );
1044 
1045 TRACE_EVENT(rdev_update_mesh_config,
1046 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
1047 		 const struct mesh_config *conf),
1048 	TP_ARGS(wiphy, netdev, mask, conf),
1049 	TP_STRUCT__entry(
1050 		WIPHY_ENTRY
1051 		NETDEV_ENTRY
1052 		MESH_CFG_ENTRY
1053 		__field(u32, mask)
1054 	),
1055 	TP_fast_assign(
1056 		WIPHY_ASSIGN;
1057 		NETDEV_ASSIGN;
1058 		MESH_CFG_ASSIGN;
1059 		__entry->mask = mask;
1060 	),
1061 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u",
1062 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
1063 );
1064 
1065 TRACE_EVENT(rdev_join_mesh,
1066 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1067 		 const struct mesh_config *conf,
1068 		 const struct mesh_setup *setup),
1069 	TP_ARGS(wiphy, netdev, conf, setup),
1070 	TP_STRUCT__entry(
1071 		WIPHY_ENTRY
1072 		NETDEV_ENTRY
1073 		MESH_CFG_ENTRY
1074 	),
1075 	TP_fast_assign(
1076 		WIPHY_ASSIGN;
1077 		NETDEV_ASSIGN;
1078 		MESH_CFG_ASSIGN;
1079 	),
1080 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
1081 		  WIPHY_PR_ARG, NETDEV_PR_ARG)
1082 );
1083 
1084 TRACE_EVENT(rdev_change_bss,
1085 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1086 		 struct bss_parameters *params),
1087 	TP_ARGS(wiphy, netdev, params),
1088 	TP_STRUCT__entry(
1089 		WIPHY_ENTRY
1090 		NETDEV_ENTRY
1091 		__field(int, use_cts_prot)
1092 		__field(int, use_short_preamble)
1093 		__field(int, use_short_slot_time)
1094 		__field(int, ap_isolate)
1095 		__field(int, ht_opmode)
1096 	),
1097 	TP_fast_assign(
1098 		WIPHY_ASSIGN;
1099 		NETDEV_ASSIGN;
1100 		__entry->use_cts_prot = params->use_cts_prot;
1101 		__entry->use_short_preamble = params->use_short_preamble;
1102 		__entry->use_short_slot_time = params->use_short_slot_time;
1103 		__entry->ap_isolate = params->ap_isolate;
1104 		__entry->ht_opmode = params->ht_opmode;
1105 	),
1106 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, "
1107 		  "use short preamble: %d, use short slot time: %d, "
1108 		  "ap isolate: %d, ht opmode: %d",
1109 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot,
1110 		  __entry->use_short_preamble, __entry->use_short_slot_time,
1111 		  __entry->ap_isolate, __entry->ht_opmode)
1112 );
1113 
1114 TRACE_EVENT(rdev_set_txq_params,
1115 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1116 		 struct ieee80211_txq_params *params),
1117 	TP_ARGS(wiphy, netdev, params),
1118 	TP_STRUCT__entry(
1119 		WIPHY_ENTRY
1120 		NETDEV_ENTRY
1121 		__field(enum nl80211_ac, ac)
1122 		__field(u16, txop)
1123 		__field(u16, cwmin)
1124 		__field(u16, cwmax)
1125 		__field(u8, aifs)
1126 	),
1127 	TP_fast_assign(
1128 		WIPHY_ASSIGN;
1129 		NETDEV_ASSIGN;
1130 		__entry->ac = params->ac;
1131 		__entry->txop = params->txop;
1132 		__entry->cwmin = params->cwmin;
1133 		__entry->cwmax = params->cwmax;
1134 		__entry->aifs = params->aifs;
1135 	),
1136 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u",
1137 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop,
1138 		  __entry->cwmin, __entry->cwmax, __entry->aifs)
1139 );
1140 
1141 TRACE_EVENT(rdev_libertas_set_mesh_channel,
1142 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1143 		 struct ieee80211_channel *chan),
1144 	TP_ARGS(wiphy, netdev, chan),
1145 	TP_STRUCT__entry(
1146 		WIPHY_ENTRY
1147 		NETDEV_ENTRY
1148 		CHAN_ENTRY
1149 	),
1150 	TP_fast_assign(
1151 		WIPHY_ASSIGN;
1152 		NETDEV_ASSIGN;
1153 		CHAN_ASSIGN(chan);
1154 	),
1155 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG,
1156 		  NETDEV_PR_ARG, CHAN_PR_ARG)
1157 );
1158 
1159 TRACE_EVENT(rdev_set_monitor_channel,
1160 	TP_PROTO(struct wiphy *wiphy,
1161 		 struct cfg80211_chan_def *chandef),
1162 	TP_ARGS(wiphy, chandef),
1163 	TP_STRUCT__entry(
1164 		WIPHY_ENTRY
1165 		CHAN_DEF_ENTRY
1166 	),
1167 	TP_fast_assign(
1168 		WIPHY_ASSIGN;
1169 		CHAN_DEF_ASSIGN(chandef);
1170 	),
1171 	TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
1172 		  WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
1173 );
1174 
1175 TRACE_EVENT(rdev_auth,
1176 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1177 		 struct cfg80211_auth_request *req),
1178 	TP_ARGS(wiphy, netdev, req),
1179 	TP_STRUCT__entry(
1180 		WIPHY_ENTRY
1181 		NETDEV_ENTRY
1182 		MAC_ENTRY(bssid)
1183 		__field(enum nl80211_auth_type, auth_type)
1184 	),
1185 	TP_fast_assign(
1186 		WIPHY_ASSIGN;
1187 		NETDEV_ASSIGN;
1188 		if (req->bss)
1189 			MAC_ASSIGN(bssid, req->bss->bssid);
1190 		else
1191 			eth_zero_addr(__entry->bssid);
1192 		__entry->auth_type = req->auth_type;
1193 	),
1194 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT,
1195 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type,
1196 		  MAC_PR_ARG(bssid))
1197 );
1198 
1199 TRACE_EVENT(rdev_assoc,
1200 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1201 		 struct cfg80211_assoc_request *req),
1202 	TP_ARGS(wiphy, netdev, req),
1203 	TP_STRUCT__entry(
1204 		WIPHY_ENTRY
1205 		NETDEV_ENTRY
1206 		MAC_ENTRY(bssid)
1207 		MAC_ENTRY(prev_bssid)
1208 		__field(bool, use_mfp)
1209 		__field(u32, flags)
1210 	),
1211 	TP_fast_assign(
1212 		WIPHY_ASSIGN;
1213 		NETDEV_ASSIGN;
1214 		if (req->bss)
1215 			MAC_ASSIGN(bssid, req->bss->bssid);
1216 		else
1217 			eth_zero_addr(__entry->bssid);
1218 		MAC_ASSIGN(prev_bssid, req->prev_bssid);
1219 		__entry->use_mfp = req->use_mfp;
1220 		__entry->flags = req->flags;
1221 	),
1222 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
1223 		  ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u",
1224 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1225 		  MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp),
1226 		  __entry->flags)
1227 );
1228 
1229 TRACE_EVENT(rdev_deauth,
1230 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1231 		 struct cfg80211_deauth_request *req),
1232 	TP_ARGS(wiphy, netdev, req),
1233 	TP_STRUCT__entry(
1234 		WIPHY_ENTRY
1235 		NETDEV_ENTRY
1236 		MAC_ENTRY(bssid)
1237 		__field(u16, reason_code)
1238 	),
1239 	TP_fast_assign(
1240 		WIPHY_ASSIGN;
1241 		NETDEV_ASSIGN;
1242 		MAC_ASSIGN(bssid, req->bssid);
1243 		__entry->reason_code = req->reason_code;
1244 	),
1245 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u",
1246 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1247 		  __entry->reason_code)
1248 );
1249 
1250 TRACE_EVENT(rdev_disassoc,
1251 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1252 		 struct cfg80211_disassoc_request *req),
1253 	TP_ARGS(wiphy, netdev, req),
1254 	TP_STRUCT__entry(
1255 		WIPHY_ENTRY
1256 		NETDEV_ENTRY
1257 		MAC_ENTRY(bssid)
1258 		__field(u16, reason_code)
1259 		__field(bool, local_state_change)
1260 	),
1261 	TP_fast_assign(
1262 		WIPHY_ASSIGN;
1263 		NETDEV_ASSIGN;
1264 		if (req->bss)
1265 			MAC_ASSIGN(bssid, req->bss->bssid);
1266 		else
1267 			eth_zero_addr(__entry->bssid);
1268 		__entry->reason_code = req->reason_code;
1269 		__entry->local_state_change = req->local_state_change;
1270 	),
1271 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
1272 		  ", reason: %u, local state change: %s",
1273 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1274 		  __entry->reason_code,
1275 		  BOOL_TO_STR(__entry->local_state_change))
1276 );
1277 
1278 TRACE_EVENT(rdev_mgmt_tx_cancel_wait,
1279 	TP_PROTO(struct wiphy *wiphy,
1280 		 struct wireless_dev *wdev, u64 cookie),
1281 	TP_ARGS(wiphy, wdev, cookie),
1282 	TP_STRUCT__entry(
1283 		WIPHY_ENTRY
1284 		WDEV_ENTRY
1285 		__field(u64, cookie)
1286 	),
1287 	TP_fast_assign(
1288 		WIPHY_ASSIGN;
1289 		WDEV_ASSIGN;
1290 		__entry->cookie = cookie;
1291 	),
1292 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ",
1293 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1294 );
1295 
1296 TRACE_EVENT(rdev_set_power_mgmt,
1297 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1298 		 bool enabled, int timeout),
1299 	TP_ARGS(wiphy, netdev, enabled, timeout),
1300 	TP_STRUCT__entry(
1301 		WIPHY_ENTRY
1302 		NETDEV_ENTRY
1303 		__field(bool, enabled)
1304 		__field(int, timeout)
1305 	),
1306 	TP_fast_assign(
1307 		WIPHY_ASSIGN;
1308 		NETDEV_ASSIGN;
1309 		__entry->enabled = enabled;
1310 		__entry->timeout = timeout;
1311 	),
1312 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ",
1313 		  WIPHY_PR_ARG, NETDEV_PR_ARG,
1314 		  __entry->enabled ? "" : "not ", __entry->timeout)
1315 );
1316 
1317 TRACE_EVENT(rdev_connect,
1318 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1319 		 struct cfg80211_connect_params *sme),
1320 	TP_ARGS(wiphy, netdev, sme),
1321 	TP_STRUCT__entry(
1322 		WIPHY_ENTRY
1323 		NETDEV_ENTRY
1324 		MAC_ENTRY(bssid)
1325 		__array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1326 		__field(enum nl80211_auth_type, auth_type)
1327 		__field(bool, privacy)
1328 		__field(u32, wpa_versions)
1329 		__field(u32, flags)
1330 		MAC_ENTRY(prev_bssid)
1331 	),
1332 	TP_fast_assign(
1333 		WIPHY_ASSIGN;
1334 		NETDEV_ASSIGN;
1335 		MAC_ASSIGN(bssid, sme->bssid);
1336 		memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1337 		memcpy(__entry->ssid, sme->ssid, sme->ssid_len);
1338 		__entry->auth_type = sme->auth_type;
1339 		__entry->privacy = sme->privacy;
1340 		__entry->wpa_versions = sme->crypto.wpa_versions;
1341 		__entry->flags = sme->flags;
1342 		MAC_ASSIGN(prev_bssid, sme->prev_bssid);
1343 	),
1344 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
1345 		  ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
1346 		  "flags: %u, previous bssid: " MAC_PR_FMT,
1347 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid,
1348 		  __entry->auth_type, BOOL_TO_STR(__entry->privacy),
1349 		  __entry->wpa_versions, __entry->flags, MAC_PR_ARG(prev_bssid))
1350 );
1351 
1352 TRACE_EVENT(rdev_update_connect_params,
1353 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1354 		 struct cfg80211_connect_params *sme, u32 changed),
1355 	TP_ARGS(wiphy, netdev, sme, changed),
1356 	TP_STRUCT__entry(
1357 		WIPHY_ENTRY
1358 		NETDEV_ENTRY
1359 		__field(u32, changed)
1360 	),
1361 	TP_fast_assign(
1362 		WIPHY_ASSIGN;
1363 		NETDEV_ASSIGN;
1364 		__entry->changed = changed;
1365 	),
1366 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", parameters changed: %u",
1367 		  WIPHY_PR_ARG, NETDEV_PR_ARG,  __entry->changed)
1368 );
1369 
1370 TRACE_EVENT(rdev_set_cqm_rssi_config,
1371 	TP_PROTO(struct wiphy *wiphy,
1372 		 struct net_device *netdev, s32 rssi_thold,
1373 		 u32 rssi_hyst),
1374 	TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
1375 	TP_STRUCT__entry(
1376 		WIPHY_ENTRY
1377 		NETDEV_ENTRY
1378 		__field(s32, rssi_thold)
1379 		__field(u32, rssi_hyst)
1380 	),
1381 	TP_fast_assign(
1382 		WIPHY_ASSIGN;
1383 		NETDEV_ASSIGN;
1384 		__entry->rssi_thold = rssi_thold;
1385 		__entry->rssi_hyst = rssi_hyst;
1386 	),
1387 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
1388 		  ", rssi_thold: %d, rssi_hyst: %u ",
1389 		  WIPHY_PR_ARG, NETDEV_PR_ARG,
1390 		 __entry->rssi_thold, __entry->rssi_hyst)
1391 );
1392 
1393 TRACE_EVENT(rdev_set_cqm_rssi_range_config,
1394 	TP_PROTO(struct wiphy *wiphy,
1395 		 struct net_device *netdev, s32 low, s32 high),
1396 	TP_ARGS(wiphy, netdev, low, high),
1397 	TP_STRUCT__entry(
1398 		WIPHY_ENTRY
1399 		NETDEV_ENTRY
1400 		__field(s32, rssi_low)
1401 		__field(s32, rssi_high)
1402 	),
1403 	TP_fast_assign(
1404 		WIPHY_ASSIGN;
1405 		NETDEV_ASSIGN;
1406 		__entry->rssi_low = low;
1407 		__entry->rssi_high = high;
1408 	),
1409 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
1410 		  ", range: %d - %d ",
1411 		  WIPHY_PR_ARG, NETDEV_PR_ARG,
1412 		  __entry->rssi_low, __entry->rssi_high)
1413 );
1414 
1415 TRACE_EVENT(rdev_set_cqm_txe_config,
1416 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
1417 		 u32 pkts, u32 intvl),
1418 	TP_ARGS(wiphy, netdev, rate, pkts, intvl),
1419 	TP_STRUCT__entry(
1420 		WIPHY_ENTRY
1421 		NETDEV_ENTRY
1422 		__field(u32, rate)
1423 		__field(u32, pkts)
1424 		__field(u32, intvl)
1425 	),
1426 	TP_fast_assign(
1427 		WIPHY_ASSIGN;
1428 		NETDEV_ASSIGN;
1429 		__entry->rate = rate;
1430 		__entry->pkts = pkts;
1431 		__entry->intvl = intvl;
1432 	),
1433 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
1434 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
1435 		  __entry->intvl)
1436 );
1437 
1438 TRACE_EVENT(rdev_disconnect,
1439 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1440 		 u16 reason_code),
1441 	TP_ARGS(wiphy, netdev, reason_code),
1442 	TP_STRUCT__entry(
1443 		WIPHY_ENTRY
1444 		NETDEV_ENTRY
1445 		__field(u16, reason_code)
1446 	),
1447 	TP_fast_assign(
1448 		WIPHY_ASSIGN;
1449 		NETDEV_ASSIGN;
1450 		__entry->reason_code = reason_code;
1451 	),
1452 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
1453 		  NETDEV_PR_ARG, __entry->reason_code)
1454 );
1455 
1456 TRACE_EVENT(rdev_join_ibss,
1457 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1458 		 struct cfg80211_ibss_params *params),
1459 	TP_ARGS(wiphy, netdev, params),
1460 	TP_STRUCT__entry(
1461 		WIPHY_ENTRY
1462 		NETDEV_ENTRY
1463 		MAC_ENTRY(bssid)
1464 		__array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1465 	),
1466 	TP_fast_assign(
1467 		WIPHY_ASSIGN;
1468 		NETDEV_ASSIGN;
1469 		MAC_ASSIGN(bssid, params->bssid);
1470 		memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1471 		memcpy(__entry->ssid, params->ssid, params->ssid_len);
1472 	),
1473 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s",
1474 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid)
1475 );
1476 
1477 TRACE_EVENT(rdev_join_ocb,
1478 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1479 		 const struct ocb_setup *setup),
1480 	TP_ARGS(wiphy, netdev, setup),
1481 	TP_STRUCT__entry(
1482 		WIPHY_ENTRY
1483 		NETDEV_ENTRY
1484 	),
1485 	TP_fast_assign(
1486 		WIPHY_ASSIGN;
1487 		NETDEV_ASSIGN;
1488 	),
1489 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
1490 		  WIPHY_PR_ARG, NETDEV_PR_ARG)
1491 );
1492 
1493 TRACE_EVENT(rdev_set_wiphy_params,
1494 	TP_PROTO(struct wiphy *wiphy, u32 changed),
1495 	TP_ARGS(wiphy, changed),
1496 	TP_STRUCT__entry(
1497 		WIPHY_ENTRY
1498 		__field(u32, changed)
1499 	),
1500 	TP_fast_assign(
1501 		WIPHY_ASSIGN;
1502 		__entry->changed = changed;
1503 	),
1504 	TP_printk(WIPHY_PR_FMT ", changed: %u",
1505 		  WIPHY_PR_ARG, __entry->changed)
1506 );
1507 
1508 DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power,
1509 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1510 	TP_ARGS(wiphy, wdev)
1511 );
1512 
1513 TRACE_EVENT(rdev_set_tx_power,
1514 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1515 		 enum nl80211_tx_power_setting type, int mbm),
1516 	TP_ARGS(wiphy, wdev, type, mbm),
1517 	TP_STRUCT__entry(
1518 		WIPHY_ENTRY
1519 		WDEV_ENTRY
1520 		__field(enum nl80211_tx_power_setting, type)
1521 		__field(int, mbm)
1522 	),
1523 	TP_fast_assign(
1524 		WIPHY_ASSIGN;
1525 		WDEV_ASSIGN;
1526 		__entry->type = type;
1527 		__entry->mbm = mbm;
1528 	),
1529 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
1530 		  WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
1531 );
1532 
1533 TRACE_EVENT(rdev_return_int_int,
1534 	TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
1535 	TP_ARGS(wiphy, func_ret, func_fill),
1536 	TP_STRUCT__entry(
1537 		WIPHY_ENTRY
1538 		__field(int, func_ret)
1539 		__field(int, func_fill)
1540 	),
1541 	TP_fast_assign(
1542 		WIPHY_ASSIGN;
1543 		__entry->func_ret = func_ret;
1544 		__entry->func_fill = func_fill;
1545 	),
1546 	TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
1547 		  WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
1548 );
1549 
1550 #ifdef CONFIG_NL80211_TESTMODE
1551 TRACE_EVENT(rdev_testmode_cmd,
1552 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1553 	TP_ARGS(wiphy, wdev),
1554 	TP_STRUCT__entry(
1555 		WIPHY_ENTRY
1556 		WDEV_ENTRY
1557 	),
1558 	TP_fast_assign(
1559 		WIPHY_ASSIGN;
1560 		WDEV_ASSIGN;
1561 	),
1562 	TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
1563 );
1564 
1565 TRACE_EVENT(rdev_testmode_dump,
1566 	TP_PROTO(struct wiphy *wiphy),
1567 	TP_ARGS(wiphy),
1568 	TP_STRUCT__entry(
1569 		WIPHY_ENTRY
1570 	),
1571 	TP_fast_assign(
1572 		WIPHY_ASSIGN;
1573 	),
1574 	TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
1575 );
1576 #endif /* CONFIG_NL80211_TESTMODE */
1577 
1578 TRACE_EVENT(rdev_set_bitrate_mask,
1579 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1580 		 const u8 *peer, const struct cfg80211_bitrate_mask *mask),
1581 	TP_ARGS(wiphy, netdev, peer, mask),
1582 	TP_STRUCT__entry(
1583 		WIPHY_ENTRY
1584 		NETDEV_ENTRY
1585 		MAC_ENTRY(peer)
1586 	),
1587 	TP_fast_assign(
1588 		WIPHY_ASSIGN;
1589 		NETDEV_ASSIGN;
1590 		MAC_ASSIGN(peer, peer);
1591 	),
1592 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
1593 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1594 );
1595 
1596 TRACE_EVENT(rdev_update_mgmt_frame_registrations,
1597 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1598 		 struct mgmt_frame_regs *upd),
1599 	TP_ARGS(wiphy, wdev, upd),
1600 	TP_STRUCT__entry(
1601 		WIPHY_ENTRY
1602 		WDEV_ENTRY
1603 		__field(u16, global_stypes)
1604 		__field(u16, interface_stypes)
1605 	),
1606 	TP_fast_assign(
1607 		WIPHY_ASSIGN;
1608 		WDEV_ASSIGN;
1609 		__entry->global_stypes = upd->global_stypes;
1610 		__entry->interface_stypes = upd->interface_stypes;
1611 	),
1612 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", global: 0x%.2x, intf: 0x%.2x",
1613 		  WIPHY_PR_ARG, WDEV_PR_ARG,
1614 		  __entry->global_stypes, __entry->interface_stypes)
1615 );
1616 
1617 TRACE_EVENT(rdev_return_int_tx_rx,
1618 	TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
1619 	TP_ARGS(wiphy, ret, tx, rx),
1620 	TP_STRUCT__entry(
1621 		WIPHY_ENTRY
1622 		__field(int, ret)
1623 		__field(u32, tx)
1624 		__field(u32, rx)
1625 	),
1626 	TP_fast_assign(
1627 		WIPHY_ASSIGN;
1628 		__entry->ret = ret;
1629 		__entry->tx = tx;
1630 		__entry->rx = rx;
1631 	),
1632 	TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
1633 		  WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
1634 );
1635 
1636 TRACE_EVENT(rdev_return_void_tx_rx,
1637 	TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
1638 		 u32 rx, u32 rx_max),
1639 	TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
1640 	TP_STRUCT__entry(
1641 		WIPHY_ENTRY
1642 		__field(u32, tx)
1643 		__field(u32, tx_max)
1644 		__field(u32, rx)
1645 		__field(u32, rx_max)
1646 	),
1647 	TP_fast_assign(
1648 		WIPHY_ASSIGN;
1649 		__entry->tx = tx;
1650 		__entry->tx_max = tx_max;
1651 		__entry->rx = rx;
1652 		__entry->rx_max = rx_max;
1653 	),
1654 	TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
1655 		  WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
1656 		  __entry->rx_max)
1657 );
1658 
1659 DECLARE_EVENT_CLASS(tx_rx_evt,
1660 	TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1661 	TP_ARGS(wiphy, rx, tx),
1662 	TP_STRUCT__entry(
1663 		WIPHY_ENTRY
1664 		__field(u32, tx)
1665 		__field(u32, rx)
1666 	),
1667 	TP_fast_assign(
1668 		WIPHY_ASSIGN;
1669 		__entry->tx = tx;
1670 		__entry->rx = rx;
1671 	),
1672 	TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
1673 		  WIPHY_PR_ARG, __entry->tx, __entry->rx)
1674 );
1675 
1676 DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
1677 	TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1678 	TP_ARGS(wiphy, rx, tx)
1679 );
1680 
1681 DECLARE_EVENT_CLASS(wiphy_netdev_id_evt,
1682 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1683 	TP_ARGS(wiphy, netdev, id),
1684 	TP_STRUCT__entry(
1685 		WIPHY_ENTRY
1686 		NETDEV_ENTRY
1687 		__field(u64, id)
1688 	),
1689 	TP_fast_assign(
1690 		WIPHY_ASSIGN;
1691 		NETDEV_ASSIGN;
1692 		__entry->id = id;
1693 	),
1694 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", id: %llu",
1695 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->id)
1696 );
1697 
1698 DEFINE_EVENT(wiphy_netdev_id_evt, rdev_sched_scan_start,
1699 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1700 	TP_ARGS(wiphy, netdev, id)
1701 );
1702 
1703 DEFINE_EVENT(wiphy_netdev_id_evt, rdev_sched_scan_stop,
1704 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1705 	TP_ARGS(wiphy, netdev, id)
1706 );
1707 
1708 TRACE_EVENT(rdev_tdls_mgmt,
1709 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1710 		 u8 *peer, u8 action_code, u8 dialog_token,
1711 		 u16 status_code, u32 peer_capability,
1712 		 bool initiator, const u8 *buf, size_t len),
1713 	TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
1714 		peer_capability, initiator, buf, len),
1715 	TP_STRUCT__entry(
1716 		WIPHY_ENTRY
1717 		NETDEV_ENTRY
1718 		MAC_ENTRY(peer)
1719 		__field(u8, action_code)
1720 		__field(u8, dialog_token)
1721 		__field(u16, status_code)
1722 		__field(u32, peer_capability)
1723 		__field(bool, initiator)
1724 		__dynamic_array(u8, buf, len)
1725 	),
1726 	TP_fast_assign(
1727 		WIPHY_ASSIGN;
1728 		NETDEV_ASSIGN;
1729 		MAC_ASSIGN(peer, peer);
1730 		__entry->action_code = action_code;
1731 		__entry->dialog_token = dialog_token;
1732 		__entry->status_code = status_code;
1733 		__entry->peer_capability = peer_capability;
1734 		__entry->initiator = initiator;
1735 		memcpy(__get_dynamic_array(buf), buf, len);
1736 	),
1737 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, "
1738 		  "dialog_token: %u, status_code: %u, peer_capability: %u "
1739 		  "initiator: %s buf: %#.2x ",
1740 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
1741 		  __entry->action_code, __entry->dialog_token,
1742 		  __entry->status_code, __entry->peer_capability,
1743 		  BOOL_TO_STR(__entry->initiator),
1744 		  ((u8 *)__get_dynamic_array(buf))[0])
1745 );
1746 
1747 TRACE_EVENT(rdev_dump_survey,
1748 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx),
1749 	TP_ARGS(wiphy, netdev, _idx),
1750 	TP_STRUCT__entry(
1751 		WIPHY_ENTRY
1752 		NETDEV_ENTRY
1753 		__field(int, idx)
1754 	),
1755 	TP_fast_assign(
1756 		WIPHY_ASSIGN;
1757 		NETDEV_ASSIGN;
1758 		__entry->idx = _idx;
1759 	),
1760 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
1761 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
1762 );
1763 
1764 TRACE_EVENT(rdev_return_int_survey_info,
1765 	TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
1766 	TP_ARGS(wiphy, ret, info),
1767 	TP_STRUCT__entry(
1768 		WIPHY_ENTRY
1769 		CHAN_ENTRY
1770 		__field(int, ret)
1771 		__field(u64, time)
1772 		__field(u64, time_busy)
1773 		__field(u64, time_ext_busy)
1774 		__field(u64, time_rx)
1775 		__field(u64, time_tx)
1776 		__field(u64, time_scan)
1777 		__field(u32, filled)
1778 		__field(s8, noise)
1779 	),
1780 	TP_fast_assign(
1781 		WIPHY_ASSIGN;
1782 		CHAN_ASSIGN(info->channel);
1783 		__entry->ret = ret;
1784 		__entry->time = info->time;
1785 		__entry->time_busy = info->time_busy;
1786 		__entry->time_ext_busy = info->time_ext_busy;
1787 		__entry->time_rx = info->time_rx;
1788 		__entry->time_tx = info->time_tx;
1789 		__entry->time_scan = info->time_scan;
1790 		__entry->filled = info->filled;
1791 		__entry->noise = info->noise;
1792 	),
1793 	TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
1794 		  ", channel time: %llu, channel time busy: %llu, "
1795 		  "channel time extension busy: %llu, channel time rx: %llu, "
1796 		  "channel time tx: %llu, scan time: %llu, filled: %u, noise: %d",
1797 		  WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
1798 		  __entry->time, __entry->time_busy,
1799 		  __entry->time_ext_busy, __entry->time_rx,
1800 		  __entry->time_tx, __entry->time_scan,
1801 		  __entry->filled, __entry->noise)
1802 );
1803 
1804 TRACE_EVENT(rdev_tdls_oper,
1805 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1806 		 u8 *peer, enum nl80211_tdls_operation oper),
1807 	TP_ARGS(wiphy, netdev, peer, oper),
1808 	TP_STRUCT__entry(
1809 		WIPHY_ENTRY
1810 		NETDEV_ENTRY
1811 		MAC_ENTRY(peer)
1812 		__field(enum nl80211_tdls_operation, oper)
1813 	),
1814 	TP_fast_assign(
1815 		WIPHY_ASSIGN;
1816 		NETDEV_ASSIGN;
1817 		MAC_ASSIGN(peer, peer);
1818 		__entry->oper = oper;
1819 	),
1820 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d",
1821 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
1822 );
1823 
1824 DECLARE_EVENT_CLASS(rdev_pmksa,
1825 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1826 		 struct cfg80211_pmksa *pmksa),
1827 	TP_ARGS(wiphy, netdev, pmksa),
1828 	TP_STRUCT__entry(
1829 		WIPHY_ENTRY
1830 		NETDEV_ENTRY
1831 		MAC_ENTRY(bssid)
1832 	),
1833 	TP_fast_assign(
1834 		WIPHY_ASSIGN;
1835 		NETDEV_ASSIGN;
1836 		MAC_ASSIGN(bssid, pmksa->bssid);
1837 	),
1838 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
1839 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
1840 );
1841 
1842 TRACE_EVENT(rdev_probe_client,
1843 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1844 		 const u8 *peer),
1845 	TP_ARGS(wiphy, netdev, peer),
1846 	TP_STRUCT__entry(
1847 		WIPHY_ENTRY
1848 		NETDEV_ENTRY
1849 		MAC_ENTRY(peer)
1850 	),
1851 	TP_fast_assign(
1852 		WIPHY_ASSIGN;
1853 		NETDEV_ASSIGN;
1854 		MAC_ASSIGN(peer, peer);
1855 	),
1856 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
1857 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1858 );
1859 
1860 DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
1861 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1862 		 struct cfg80211_pmksa *pmksa),
1863 	TP_ARGS(wiphy, netdev, pmksa)
1864 );
1865 
1866 DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
1867 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1868 		 struct cfg80211_pmksa *pmksa),
1869 	TP_ARGS(wiphy, netdev, pmksa)
1870 );
1871 
1872 TRACE_EVENT(rdev_remain_on_channel,
1873 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1874 		 struct ieee80211_channel *chan,
1875 		 unsigned int duration),
1876 	TP_ARGS(wiphy, wdev, chan, duration),
1877 	TP_STRUCT__entry(
1878 		WIPHY_ENTRY
1879 		WDEV_ENTRY
1880 		CHAN_ENTRY
1881 		__field(unsigned int, duration)
1882 	),
1883 	TP_fast_assign(
1884 		WIPHY_ASSIGN;
1885 		WDEV_ASSIGN;
1886 		CHAN_ASSIGN(chan);
1887 		__entry->duration = duration;
1888 	),
1889 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
1890 		  WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
1891 );
1892 
1893 TRACE_EVENT(rdev_return_int_cookie,
1894 	TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
1895 	TP_ARGS(wiphy, ret, cookie),
1896 	TP_STRUCT__entry(
1897 		WIPHY_ENTRY
1898 		__field(int, ret)
1899 		__field(u64, cookie)
1900 	),
1901 	TP_fast_assign(
1902 		WIPHY_ASSIGN;
1903 		__entry->ret = ret;
1904 		__entry->cookie = cookie;
1905 	),
1906 	TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
1907 		  WIPHY_PR_ARG, __entry->ret, __entry->cookie)
1908 );
1909 
1910 TRACE_EVENT(rdev_cancel_remain_on_channel,
1911 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
1912 	TP_ARGS(wiphy, wdev, cookie),
1913 	TP_STRUCT__entry(
1914 		WIPHY_ENTRY
1915 		WDEV_ENTRY
1916 		__field(u64, cookie)
1917 	),
1918 	TP_fast_assign(
1919 		WIPHY_ASSIGN;
1920 		WDEV_ASSIGN;
1921 		__entry->cookie = cookie;
1922 	),
1923 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
1924 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1925 );
1926 
1927 TRACE_EVENT(rdev_mgmt_tx,
1928 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1929 		 struct cfg80211_mgmt_tx_params *params),
1930 	TP_ARGS(wiphy, wdev, params),
1931 	TP_STRUCT__entry(
1932 		WIPHY_ENTRY
1933 		WDEV_ENTRY
1934 		CHAN_ENTRY
1935 		__field(bool, offchan)
1936 		__field(unsigned int, wait)
1937 		__field(bool, no_cck)
1938 		__field(bool, dont_wait_for_ack)
1939 	),
1940 	TP_fast_assign(
1941 		WIPHY_ASSIGN;
1942 		WDEV_ASSIGN;
1943 		CHAN_ASSIGN(params->chan);
1944 		__entry->offchan = params->offchan;
1945 		__entry->wait = params->wait;
1946 		__entry->no_cck = params->no_cck;
1947 		__entry->dont_wait_for_ack = params->dont_wait_for_ack;
1948 	),
1949 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
1950 		  " wait: %u, no cck: %s, dont wait for ack: %s",
1951 		  WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
1952 		  BOOL_TO_STR(__entry->offchan), __entry->wait,
1953 		  BOOL_TO_STR(__entry->no_cck),
1954 		  BOOL_TO_STR(__entry->dont_wait_for_ack))
1955 );
1956 
1957 TRACE_EVENT(rdev_tx_control_port,
1958 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1959 		 const u8 *buf, size_t len, const u8 *dest, __be16 proto,
1960 		 bool unencrypted),
1961 	TP_ARGS(wiphy, netdev, buf, len, dest, proto, unencrypted),
1962 	TP_STRUCT__entry(
1963 		WIPHY_ENTRY
1964 		NETDEV_ENTRY
1965 		MAC_ENTRY(dest)
1966 		__field(__be16, proto)
1967 		__field(bool, unencrypted)
1968 	),
1969 	TP_fast_assign(
1970 		WIPHY_ASSIGN;
1971 		NETDEV_ASSIGN;
1972 		MAC_ASSIGN(dest, dest);
1973 		__entry->proto = proto;
1974 		__entry->unencrypted = unencrypted;
1975 	),
1976 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ","
1977 		  " proto: 0x%x, unencrypted: %s",
1978 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dest),
1979 		  be16_to_cpu(__entry->proto),
1980 		  BOOL_TO_STR(__entry->unencrypted))
1981 );
1982 
1983 TRACE_EVENT(rdev_set_noack_map,
1984 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1985 		 u16 noack_map),
1986 	TP_ARGS(wiphy, netdev, noack_map),
1987 	TP_STRUCT__entry(
1988 		WIPHY_ENTRY
1989 		NETDEV_ENTRY
1990 		__field(u16, noack_map)
1991 	),
1992 	TP_fast_assign(
1993 		WIPHY_ASSIGN;
1994 		NETDEV_ASSIGN;
1995 		__entry->noack_map = noack_map;
1996 	),
1997 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
1998 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
1999 );
2000 
2001 DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel,
2002 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2003 	TP_ARGS(wiphy, wdev)
2004 );
2005 
2006 TRACE_EVENT(rdev_return_chandef,
2007 	TP_PROTO(struct wiphy *wiphy, int ret,
2008 		 struct cfg80211_chan_def *chandef),
2009 	TP_ARGS(wiphy, ret, chandef),
2010 	TP_STRUCT__entry(
2011 		WIPHY_ENTRY
2012 		__field(int, ret)
2013 		CHAN_DEF_ENTRY
2014 	),
2015 	TP_fast_assign(
2016 		WIPHY_ASSIGN;
2017 		if (ret == 0)
2018 			CHAN_DEF_ASSIGN(chandef);
2019 		else
2020 			CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
2021 		__entry->ret = ret;
2022 	),
2023 	TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
2024 		  WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
2025 );
2026 
2027 DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
2028 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2029 	TP_ARGS(wiphy, wdev)
2030 );
2031 
2032 DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
2033 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2034 	TP_ARGS(wiphy, wdev)
2035 );
2036 
2037 TRACE_EVENT(rdev_start_nan,
2038 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2039 		 struct cfg80211_nan_conf *conf),
2040 	TP_ARGS(wiphy, wdev, conf),
2041 	TP_STRUCT__entry(
2042 		WIPHY_ENTRY
2043 		WDEV_ENTRY
2044 		__field(u8, master_pref)
2045 		__field(u8, bands)
2046 	),
2047 	TP_fast_assign(
2048 		WIPHY_ASSIGN;
2049 		WDEV_ASSIGN;
2050 		__entry->master_pref = conf->master_pref;
2051 		__entry->bands = conf->bands;
2052 	),
2053 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
2054 		  ", master preference: %u, bands: 0x%0x",
2055 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
2056 		  __entry->bands)
2057 );
2058 
2059 TRACE_EVENT(rdev_nan_change_conf,
2060 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2061 		 struct cfg80211_nan_conf *conf, u32 changes),
2062 	TP_ARGS(wiphy, wdev, conf, changes),
2063 	TP_STRUCT__entry(
2064 		WIPHY_ENTRY
2065 		WDEV_ENTRY
2066 		__field(u8, master_pref)
2067 		__field(u8, bands)
2068 		__field(u32, changes)
2069 	),
2070 	TP_fast_assign(
2071 		WIPHY_ASSIGN;
2072 		WDEV_ASSIGN;
2073 		__entry->master_pref = conf->master_pref;
2074 		__entry->bands = conf->bands;
2075 		__entry->changes = changes;
2076 	),
2077 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
2078 		  ", master preference: %u, bands: 0x%0x, changes: %x",
2079 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
2080 		  __entry->bands, __entry->changes)
2081 );
2082 
2083 DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_nan,
2084 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2085 	TP_ARGS(wiphy, wdev)
2086 );
2087 
2088 TRACE_EVENT(rdev_add_nan_func,
2089 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2090 		 const struct cfg80211_nan_func *func),
2091 	TP_ARGS(wiphy, wdev, func),
2092 	TP_STRUCT__entry(
2093 		WIPHY_ENTRY
2094 		WDEV_ENTRY
2095 		__field(u8, func_type)
2096 		__field(u64, cookie)
2097 	),
2098 	TP_fast_assign(
2099 		WIPHY_ASSIGN;
2100 		WDEV_ASSIGN;
2101 		__entry->func_type = func->type;
2102 		__entry->cookie = func->cookie
2103 	),
2104 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type=%u, cookie=%llu",
2105 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->func_type,
2106 		  __entry->cookie)
2107 );
2108 
2109 TRACE_EVENT(rdev_del_nan_func,
2110 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2111 		 u64 cookie),
2112 	TP_ARGS(wiphy, wdev, cookie),
2113 	TP_STRUCT__entry(
2114 		WIPHY_ENTRY
2115 		WDEV_ENTRY
2116 		__field(u64, cookie)
2117 	),
2118 	TP_fast_assign(
2119 		WIPHY_ASSIGN;
2120 		WDEV_ASSIGN;
2121 		__entry->cookie = cookie;
2122 	),
2123 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie=%llu",
2124 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
2125 );
2126 
2127 TRACE_EVENT(rdev_set_mac_acl,
2128 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2129 		 struct cfg80211_acl_data *params),
2130 	TP_ARGS(wiphy, netdev, params),
2131 	TP_STRUCT__entry(
2132 		WIPHY_ENTRY
2133 		NETDEV_ENTRY
2134 		__field(u32, acl_policy)
2135 	),
2136 	TP_fast_assign(
2137 		WIPHY_ASSIGN;
2138 		NETDEV_ASSIGN;
2139 		__entry->acl_policy = params->acl_policy;
2140 	),
2141 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
2142 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
2143 );
2144 
2145 TRACE_EVENT(rdev_update_ft_ies,
2146 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2147 		 struct cfg80211_update_ft_ies_params *ftie),
2148 	TP_ARGS(wiphy, netdev, ftie),
2149 	TP_STRUCT__entry(
2150 		WIPHY_ENTRY
2151 		NETDEV_ENTRY
2152 		__field(u16, md)
2153 		__dynamic_array(u8, ie, ftie->ie_len)
2154 	),
2155 	TP_fast_assign(
2156 		WIPHY_ASSIGN;
2157 		NETDEV_ASSIGN;
2158 		__entry->md = ftie->md;
2159 		memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
2160 	),
2161 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
2162 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
2163 );
2164 
2165 TRACE_EVENT(rdev_crit_proto_start,
2166 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2167 		 enum nl80211_crit_proto_id protocol, u16 duration),
2168 	TP_ARGS(wiphy, wdev, protocol, duration),
2169 	TP_STRUCT__entry(
2170 		WIPHY_ENTRY
2171 		WDEV_ENTRY
2172 		__field(u16, proto)
2173 		__field(u16, duration)
2174 	),
2175 	TP_fast_assign(
2176 		WIPHY_ASSIGN;
2177 		WDEV_ASSIGN;
2178 		__entry->proto = protocol;
2179 		__entry->duration = duration;
2180 	),
2181 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
2182 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
2183 );
2184 
2185 TRACE_EVENT(rdev_crit_proto_stop,
2186 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2187 	TP_ARGS(wiphy, wdev),
2188 	TP_STRUCT__entry(
2189 		WIPHY_ENTRY
2190 		WDEV_ENTRY
2191 	),
2192 	TP_fast_assign(
2193 		WIPHY_ASSIGN;
2194 		WDEV_ASSIGN;
2195 	),
2196 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
2197 		  WIPHY_PR_ARG, WDEV_PR_ARG)
2198 );
2199 
2200 TRACE_EVENT(rdev_channel_switch,
2201 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2202 		 struct cfg80211_csa_settings *params),
2203 	TP_ARGS(wiphy, netdev, params),
2204 	TP_STRUCT__entry(
2205 		WIPHY_ENTRY
2206 		NETDEV_ENTRY
2207 		CHAN_DEF_ENTRY
2208 		__field(bool, radar_required)
2209 		__field(bool, block_tx)
2210 		__field(u8, count)
2211 		__dynamic_array(u16, bcn_ofs, params->n_counter_offsets_beacon)
2212 		__dynamic_array(u16, pres_ofs, params->n_counter_offsets_presp)
2213 	),
2214 	TP_fast_assign(
2215 		WIPHY_ASSIGN;
2216 		NETDEV_ASSIGN;
2217 		CHAN_DEF_ASSIGN(&params->chandef);
2218 		__entry->radar_required = params->radar_required;
2219 		__entry->block_tx = params->block_tx;
2220 		__entry->count = params->count;
2221 		memcpy(__get_dynamic_array(bcn_ofs),
2222 		       params->counter_offsets_beacon,
2223 		       params->n_counter_offsets_beacon * sizeof(u16));
2224 
2225 		/* probe response offsets are optional */
2226 		if (params->n_counter_offsets_presp)
2227 			memcpy(__get_dynamic_array(pres_ofs),
2228 			       params->counter_offsets_presp,
2229 			       params->n_counter_offsets_presp * sizeof(u16));
2230 	),
2231 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
2232 		  ", block_tx: %d, count: %u, radar_required: %d",
2233 		  WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
2234 		  __entry->block_tx, __entry->count, __entry->radar_required)
2235 );
2236 
2237 TRACE_EVENT(rdev_set_qos_map,
2238 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2239 		 struct cfg80211_qos_map *qos_map),
2240 	TP_ARGS(wiphy, netdev, qos_map),
2241 	TP_STRUCT__entry(
2242 		WIPHY_ENTRY
2243 		NETDEV_ENTRY
2244 		QOS_MAP_ENTRY
2245 	),
2246 	TP_fast_assign(
2247 		WIPHY_ASSIGN;
2248 		NETDEV_ASSIGN;
2249 		QOS_MAP_ASSIGN(qos_map);
2250 	),
2251 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u",
2252 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des)
2253 );
2254 
2255 TRACE_EVENT(rdev_set_ap_chanwidth,
2256 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2257 		 struct cfg80211_chan_def *chandef),
2258 	TP_ARGS(wiphy, netdev, chandef),
2259 	TP_STRUCT__entry(
2260 		WIPHY_ENTRY
2261 		NETDEV_ENTRY
2262 		CHAN_DEF_ENTRY
2263 	),
2264 	TP_fast_assign(
2265 		WIPHY_ASSIGN;
2266 		NETDEV_ASSIGN;
2267 		CHAN_DEF_ASSIGN(chandef);
2268 	),
2269 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2270 		  WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2271 );
2272 
2273 TRACE_EVENT(rdev_add_tx_ts,
2274 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2275 		 u8 tsid, const u8 *peer, u8 user_prio, u16 admitted_time),
2276 	TP_ARGS(wiphy, netdev, tsid, peer, user_prio, admitted_time),
2277 	TP_STRUCT__entry(
2278 		WIPHY_ENTRY
2279 		NETDEV_ENTRY
2280 		MAC_ENTRY(peer)
2281 		__field(u8, tsid)
2282 		__field(u8, user_prio)
2283 		__field(u16, admitted_time)
2284 	),
2285 	TP_fast_assign(
2286 		WIPHY_ASSIGN;
2287 		NETDEV_ASSIGN;
2288 		MAC_ASSIGN(peer, peer);
2289 		__entry->tsid = tsid;
2290 		__entry->user_prio = user_prio;
2291 		__entry->admitted_time = admitted_time;
2292 	),
2293 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d, UP %d, time %d",
2294 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
2295 		  __entry->tsid, __entry->user_prio, __entry->admitted_time)
2296 );
2297 
2298 TRACE_EVENT(rdev_del_tx_ts,
2299 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2300 		 u8 tsid, const u8 *peer),
2301 	TP_ARGS(wiphy, netdev, tsid, peer),
2302 	TP_STRUCT__entry(
2303 		WIPHY_ENTRY
2304 		NETDEV_ENTRY
2305 		MAC_ENTRY(peer)
2306 		__field(u8, tsid)
2307 	),
2308 	TP_fast_assign(
2309 		WIPHY_ASSIGN;
2310 		NETDEV_ASSIGN;
2311 		MAC_ASSIGN(peer, peer);
2312 		__entry->tsid = tsid;
2313 	),
2314 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d",
2315 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tsid)
2316 );
2317 
2318 TRACE_EVENT(rdev_tdls_channel_switch,
2319 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2320 		 const u8 *addr, u8 oper_class,
2321 		 struct cfg80211_chan_def *chandef),
2322 	TP_ARGS(wiphy, netdev, addr, oper_class, chandef),
2323 	TP_STRUCT__entry(
2324 		WIPHY_ENTRY
2325 		NETDEV_ENTRY
2326 		MAC_ENTRY(addr)
2327 		__field(u8, oper_class)
2328 		CHAN_DEF_ENTRY
2329 	),
2330 	TP_fast_assign(
2331 		WIPHY_ASSIGN;
2332 		NETDEV_ASSIGN;
2333 		MAC_ASSIGN(addr, addr);
2334 		CHAN_DEF_ASSIGN(chandef);
2335 	),
2336 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT
2337 		  " oper class %d, " CHAN_DEF_PR_FMT,
2338 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr),
2339 		  __entry->oper_class, CHAN_DEF_PR_ARG)
2340 );
2341 
2342 TRACE_EVENT(rdev_tdls_cancel_channel_switch,
2343 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2344 		 const u8 *addr),
2345 	TP_ARGS(wiphy, netdev, addr),
2346 	TP_STRUCT__entry(
2347 		WIPHY_ENTRY
2348 		NETDEV_ENTRY
2349 		MAC_ENTRY(addr)
2350 	),
2351 	TP_fast_assign(
2352 		WIPHY_ASSIGN;
2353 		NETDEV_ASSIGN;
2354 		MAC_ASSIGN(addr, addr);
2355 	),
2356 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
2357 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr))
2358 );
2359 
2360 TRACE_EVENT(rdev_set_pmk,
2361 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2362 		 struct cfg80211_pmk_conf *pmk_conf),
2363 
2364 	TP_ARGS(wiphy, netdev, pmk_conf),
2365 
2366 	TP_STRUCT__entry(
2367 		WIPHY_ENTRY
2368 		NETDEV_ENTRY
2369 		MAC_ENTRY(aa)
2370 		__field(u8, pmk_len)
2371 		__field(u8, pmk_r0_name_len)
2372 		__dynamic_array(u8, pmk, pmk_conf->pmk_len)
2373 		__dynamic_array(u8, pmk_r0_name, WLAN_PMK_NAME_LEN)
2374 	),
2375 
2376 	TP_fast_assign(
2377 		WIPHY_ASSIGN;
2378 		NETDEV_ASSIGN;
2379 		MAC_ASSIGN(aa, pmk_conf->aa);
2380 		__entry->pmk_len = pmk_conf->pmk_len;
2381 		__entry->pmk_r0_name_len =
2382 		pmk_conf->pmk_r0_name ? WLAN_PMK_NAME_LEN : 0;
2383 		memcpy(__get_dynamic_array(pmk), pmk_conf->pmk,
2384 		       pmk_conf->pmk_len);
2385 		memcpy(__get_dynamic_array(pmk_r0_name), pmk_conf->pmk_r0_name,
2386 		       pmk_conf->pmk_r0_name ? WLAN_PMK_NAME_LEN : 0);
2387 	),
2388 
2389 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT
2390 		  "pmk_len=%u, pmk: %s pmk_r0_name: %s", WIPHY_PR_ARG,
2391 		  NETDEV_PR_ARG, MAC_PR_ARG(aa), __entry->pmk_len,
2392 		  __print_array(__get_dynamic_array(pmk),
2393 				__get_dynamic_array_len(pmk), 1),
2394 		  __entry->pmk_r0_name_len ?
2395 		  __print_array(__get_dynamic_array(pmk_r0_name),
2396 				__get_dynamic_array_len(pmk_r0_name), 1) : "")
2397 );
2398 
2399 TRACE_EVENT(rdev_del_pmk,
2400 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *aa),
2401 
2402 	TP_ARGS(wiphy, netdev, aa),
2403 
2404 	TP_STRUCT__entry(
2405 		WIPHY_ENTRY
2406 		NETDEV_ENTRY
2407 		MAC_ENTRY(aa)
2408 	),
2409 
2410 	TP_fast_assign(
2411 		WIPHY_ASSIGN;
2412 		NETDEV_ASSIGN;
2413 		MAC_ASSIGN(aa, aa);
2414 	),
2415 
2416 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
2417 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(aa))
2418 );
2419 
2420 TRACE_EVENT(rdev_external_auth,
2421 	    TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2422 		     struct cfg80211_external_auth_params *params),
2423 	    TP_ARGS(wiphy, netdev, params),
2424 	    TP_STRUCT__entry(WIPHY_ENTRY
2425 			     NETDEV_ENTRY
2426 			     MAC_ENTRY(bssid)
2427 			     __array(u8, ssid, IEEE80211_MAX_SSID_LEN + 1)
2428 			     __field(u16, status)
2429 	    ),
2430 	    TP_fast_assign(WIPHY_ASSIGN;
2431 			   NETDEV_ASSIGN;
2432 			   MAC_ASSIGN(bssid, params->bssid);
2433 			   memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
2434 			   memcpy(__entry->ssid, params->ssid.ssid,
2435 				  params->ssid.ssid_len);
2436 			   __entry->status = params->status;
2437 	    ),
2438 	    TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
2439 		      ", ssid: %s, status: %u", WIPHY_PR_ARG, NETDEV_PR_ARG,
2440 		      __entry->bssid, __entry->ssid, __entry->status)
2441 );
2442 
2443 TRACE_EVENT(rdev_start_radar_detection,
2444 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2445 		 struct cfg80211_chan_def *chandef,
2446 		 u32 cac_time_ms),
2447 	TP_ARGS(wiphy, netdev, chandef, cac_time_ms),
2448 	TP_STRUCT__entry(
2449 		WIPHY_ENTRY
2450 		NETDEV_ENTRY
2451 		CHAN_DEF_ENTRY
2452 		__field(u32, cac_time_ms)
2453 	),
2454 	TP_fast_assign(
2455 		WIPHY_ASSIGN;
2456 		NETDEV_ASSIGN;
2457 		CHAN_DEF_ASSIGN(chandef);
2458 		__entry->cac_time_ms = cac_time_ms;
2459 	),
2460 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
2461 		  ", cac_time_ms=%u",
2462 		  WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
2463 		  __entry->cac_time_ms)
2464 );
2465 
2466 TRACE_EVENT(rdev_set_mcast_rate,
2467 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2468 		 int *mcast_rate),
2469 	TP_ARGS(wiphy, netdev, mcast_rate),
2470 	TP_STRUCT__entry(
2471 		WIPHY_ENTRY
2472 		NETDEV_ENTRY
2473 		__array(int, mcast_rate, NUM_NL80211_BANDS)
2474 	),
2475 	TP_fast_assign(
2476 		WIPHY_ASSIGN;
2477 		NETDEV_ASSIGN;
2478 		memcpy(__entry->mcast_rate, mcast_rate,
2479 		       sizeof(int) * NUM_NL80211_BANDS);
2480 	),
2481 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", "
2482 		  "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 6GHz=0x%x, 60GHz=0x%x]",
2483 		  WIPHY_PR_ARG, NETDEV_PR_ARG,
2484 		  __entry->mcast_rate[NL80211_BAND_2GHZ],
2485 		  __entry->mcast_rate[NL80211_BAND_5GHZ],
2486 		  __entry->mcast_rate[NL80211_BAND_6GHZ],
2487 		  __entry->mcast_rate[NL80211_BAND_60GHZ])
2488 );
2489 
2490 TRACE_EVENT(rdev_set_coalesce,
2491 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_coalesce *coalesce),
2492 	TP_ARGS(wiphy, coalesce),
2493 	TP_STRUCT__entry(
2494 		WIPHY_ENTRY
2495 		__field(int, n_rules)
2496 	),
2497 	TP_fast_assign(
2498 		WIPHY_ASSIGN;
2499 		__entry->n_rules = coalesce ? coalesce->n_rules : 0;
2500 	),
2501 	TP_printk(WIPHY_PR_FMT ", n_rules=%d",
2502 		  WIPHY_PR_ARG, __entry->n_rules)
2503 );
2504 
2505 DEFINE_EVENT(wiphy_wdev_evt, rdev_abort_scan,
2506 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2507 	TP_ARGS(wiphy, wdev)
2508 );
2509 
2510 TRACE_EVENT(rdev_set_multicast_to_unicast,
2511 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2512 		 const bool enabled),
2513 	TP_ARGS(wiphy, netdev, enabled),
2514 	TP_STRUCT__entry(
2515 		WIPHY_ENTRY
2516 		NETDEV_ENTRY
2517 		__field(bool, enabled)
2518 	),
2519 	TP_fast_assign(
2520 		WIPHY_ASSIGN;
2521 		NETDEV_ASSIGN;
2522 		__entry->enabled = enabled;
2523 	),
2524 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", unicast: %s",
2525 		  WIPHY_PR_ARG, NETDEV_PR_ARG,
2526 		  BOOL_TO_STR(__entry->enabled))
2527 );
2528 
2529 DEFINE_EVENT(wiphy_wdev_evt, rdev_get_txq_stats,
2530 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2531 	TP_ARGS(wiphy, wdev)
2532 );
2533 
2534 TRACE_EVENT(rdev_get_ftm_responder_stats,
2535 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2536 		 struct cfg80211_ftm_responder_stats *ftm_stats),
2537 
2538 	TP_ARGS(wiphy, netdev, ftm_stats),
2539 
2540 	TP_STRUCT__entry(
2541 		WIPHY_ENTRY
2542 		NETDEV_ENTRY
2543 		__field(u64, timestamp)
2544 		__field(u32, success_num)
2545 		__field(u32, partial_num)
2546 		__field(u32, failed_num)
2547 		__field(u32, asap_num)
2548 		__field(u32, non_asap_num)
2549 		__field(u64, duration)
2550 		__field(u32, unknown_triggers)
2551 		__field(u32, reschedule)
2552 		__field(u32, out_of_window)
2553 	),
2554 
2555 	TP_fast_assign(
2556 		WIPHY_ASSIGN;
2557 		NETDEV_ASSIGN;
2558 		__entry->success_num = ftm_stats->success_num;
2559 		__entry->partial_num = ftm_stats->partial_num;
2560 		__entry->failed_num = ftm_stats->failed_num;
2561 		__entry->asap_num = ftm_stats->asap_num;
2562 		__entry->non_asap_num = ftm_stats->non_asap_num;
2563 		__entry->duration = ftm_stats->total_duration_ms;
2564 		__entry->unknown_triggers = ftm_stats->unknown_triggers_num;
2565 		__entry->reschedule = ftm_stats->reschedule_requests_num;
2566 		__entry->out_of_window = ftm_stats->out_of_window_triggers_num;
2567 	),
2568 
2569 	TP_printk(WIPHY_PR_FMT "Ftm responder stats: success %u, partial %u, "
2570 		"failed %u, asap %u, non asap %u, total duration %llu, unknown "
2571 		"triggers %u, rescheduled %u, out of window %u", WIPHY_PR_ARG,
2572 		__entry->success_num, __entry->partial_num, __entry->failed_num,
2573 		__entry->asap_num, __entry->non_asap_num, __entry->duration,
2574 		__entry->unknown_triggers, __entry->reschedule,
2575 		__entry->out_of_window)
2576 );
2577 
2578 DEFINE_EVENT(wiphy_wdev_cookie_evt, rdev_start_pmsr,
2579 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
2580 	TP_ARGS(wiphy, wdev, cookie)
2581 );
2582 
2583 DEFINE_EVENT(wiphy_wdev_cookie_evt, rdev_abort_pmsr,
2584 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
2585 	TP_ARGS(wiphy, wdev, cookie)
2586 );
2587 
2588 /*************************************************************
2589  *	     cfg80211 exported functions traces		     *
2590  *************************************************************/
2591 
2592 TRACE_EVENT(cfg80211_return_bool,
2593 	TP_PROTO(bool ret),
2594 	TP_ARGS(ret),
2595 	TP_STRUCT__entry(
2596 		__field(bool, ret)
2597 	),
2598 	TP_fast_assign(
2599 		__entry->ret = ret;
2600 	),
2601 	TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
2602 );
2603 
2604 DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
2605 	TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2606 	TP_ARGS(netdev, macaddr),
2607 	TP_STRUCT__entry(
2608 		NETDEV_ENTRY
2609 		MAC_ENTRY(macaddr)
2610 	),
2611 	TP_fast_assign(
2612 		NETDEV_ASSIGN;
2613 		MAC_ASSIGN(macaddr, macaddr);
2614 	),
2615 	TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2616 		  NETDEV_PR_ARG, MAC_PR_ARG(macaddr))
2617 );
2618 
2619 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
2620 	TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2621 	TP_ARGS(netdev, macaddr)
2622 );
2623 
2624 DECLARE_EVENT_CLASS(netdev_evt_only,
2625 	TP_PROTO(struct net_device *netdev),
2626 	TP_ARGS(netdev),
2627 	TP_STRUCT__entry(
2628 		NETDEV_ENTRY
2629 	),
2630 	TP_fast_assign(
2631 		NETDEV_ASSIGN;
2632 	),
2633 	TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
2634 );
2635 
2636 DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
2637 	TP_PROTO(struct net_device *netdev),
2638 	TP_ARGS(netdev)
2639 );
2640 
2641 TRACE_EVENT(cfg80211_send_rx_assoc,
2642 	TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss),
2643 	TP_ARGS(netdev, bss),
2644 	TP_STRUCT__entry(
2645 		NETDEV_ENTRY
2646 		MAC_ENTRY(bssid)
2647 		CHAN_ENTRY
2648 	),
2649 	TP_fast_assign(
2650 		NETDEV_ASSIGN;
2651 		MAC_ASSIGN(bssid, bss->bssid);
2652 		CHAN_ASSIGN(bss->channel);
2653 	),
2654 	TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT,
2655 		  NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2656 );
2657 
2658 DECLARE_EVENT_CLASS(netdev_frame_event,
2659 	TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2660 	TP_ARGS(netdev, buf, len),
2661 	TP_STRUCT__entry(
2662 		NETDEV_ENTRY
2663 		__dynamic_array(u8, frame, len)
2664 	),
2665 	TP_fast_assign(
2666 		NETDEV_ASSIGN;
2667 		memcpy(__get_dynamic_array(frame), buf, len);
2668 	),
2669 	TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2670 		  NETDEV_PR_ARG,
2671 		  le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
2672 );
2673 
2674 DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
2675 	TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2676 	TP_ARGS(netdev, buf, len)
2677 );
2678 
2679 DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
2680 	TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2681 	TP_ARGS(netdev, buf, len)
2682 );
2683 
2684 TRACE_EVENT(cfg80211_tx_mlme_mgmt,
2685 	TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2686 	TP_ARGS(netdev, buf, len),
2687 	TP_STRUCT__entry(
2688 		NETDEV_ENTRY
2689 		__dynamic_array(u8, frame, len)
2690 	),
2691 	TP_fast_assign(
2692 		NETDEV_ASSIGN;
2693 		memcpy(__get_dynamic_array(frame), buf, len);
2694 	),
2695 	TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2696 		  NETDEV_PR_ARG,
2697 		  le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
2698 );
2699 
2700 DECLARE_EVENT_CLASS(netdev_mac_evt,
2701 	TP_PROTO(struct net_device *netdev, const u8 *mac),
2702 	TP_ARGS(netdev, mac),
2703 	TP_STRUCT__entry(
2704 		NETDEV_ENTRY
2705 		MAC_ENTRY(mac)
2706 	),
2707 	TP_fast_assign(
2708 		NETDEV_ASSIGN;
2709 		MAC_ASSIGN(mac, mac)
2710 	),
2711 	TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2712 		  NETDEV_PR_ARG, MAC_PR_ARG(mac))
2713 );
2714 
2715 DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
2716 	TP_PROTO(struct net_device *netdev, const u8 *mac),
2717 	TP_ARGS(netdev, mac)
2718 );
2719 
2720 DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout,
2721 	TP_PROTO(struct net_device *netdev, const u8 *mac),
2722 	TP_ARGS(netdev, mac)
2723 );
2724 
2725 TRACE_EVENT(cfg80211_michael_mic_failure,
2726 	TP_PROTO(struct net_device *netdev, const u8 *addr,
2727 		 enum nl80211_key_type key_type, int key_id, const u8 *tsc),
2728 	TP_ARGS(netdev, addr, key_type, key_id, tsc),
2729 	TP_STRUCT__entry(
2730 		NETDEV_ENTRY
2731 		MAC_ENTRY(addr)
2732 		__field(enum nl80211_key_type, key_type)
2733 		__field(int, key_id)
2734 		__array(u8, tsc, 6)
2735 	),
2736 	TP_fast_assign(
2737 		NETDEV_ASSIGN;
2738 		MAC_ASSIGN(addr, addr);
2739 		__entry->key_type = key_type;
2740 		__entry->key_id = key_id;
2741 		if (tsc)
2742 			memcpy(__entry->tsc, tsc, 6);
2743 	),
2744 	TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
2745 		  NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,
2746 		  __entry->key_id, __entry->tsc)
2747 );
2748 
2749 TRACE_EVENT(cfg80211_ready_on_channel,
2750 	TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2751 		 struct ieee80211_channel *chan,
2752 		 unsigned int duration),
2753 	TP_ARGS(wdev, cookie, chan, duration),
2754 	TP_STRUCT__entry(
2755 		WDEV_ENTRY
2756 		__field(u64, cookie)
2757 		CHAN_ENTRY
2758 		__field(unsigned int, duration)
2759 	),
2760 	TP_fast_assign(
2761 		WDEV_ASSIGN;
2762 		__entry->cookie = cookie;
2763 		CHAN_ASSIGN(chan);
2764 		__entry->duration = duration;
2765 	),
2766 	TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
2767 		  WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
2768 		  __entry->duration)
2769 );
2770 
2771 TRACE_EVENT(cfg80211_ready_on_channel_expired,
2772 	TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2773 		 struct ieee80211_channel *chan),
2774 	TP_ARGS(wdev, cookie, chan),
2775 	TP_STRUCT__entry(
2776 		WDEV_ENTRY
2777 		__field(u64, cookie)
2778 		CHAN_ENTRY
2779 	),
2780 	TP_fast_assign(
2781 		WDEV_ASSIGN;
2782 		__entry->cookie = cookie;
2783 		CHAN_ASSIGN(chan);
2784 	),
2785 	TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
2786 		  WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
2787 );
2788 
2789 TRACE_EVENT(cfg80211_tx_mgmt_expired,
2790 	TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2791 		 struct ieee80211_channel *chan),
2792 	TP_ARGS(wdev, cookie, chan),
2793 	TP_STRUCT__entry(
2794 		WDEV_ENTRY
2795 		__field(u64, cookie)
2796 		CHAN_ENTRY
2797 	),
2798 	TP_fast_assign(
2799 		WDEV_ASSIGN;
2800 		__entry->cookie = cookie;
2801 		CHAN_ASSIGN(chan);
2802 	),
2803 	TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
2804 		  WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
2805 );
2806 
2807 TRACE_EVENT(cfg80211_new_sta,
2808 	TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
2809 		 struct station_info *sinfo),
2810 	TP_ARGS(netdev, mac_addr, sinfo),
2811 	TP_STRUCT__entry(
2812 		NETDEV_ENTRY
2813 		MAC_ENTRY(mac_addr)
2814 		SINFO_ENTRY
2815 	),
2816 	TP_fast_assign(
2817 		NETDEV_ASSIGN;
2818 		MAC_ASSIGN(mac_addr, mac_addr);
2819 		SINFO_ASSIGN;
2820 	),
2821 	TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT,
2822 		  NETDEV_PR_ARG, MAC_PR_ARG(mac_addr))
2823 );
2824 
2825 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
2826 	TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2827 	TP_ARGS(netdev, macaddr)
2828 );
2829 
2830 TRACE_EVENT(cfg80211_rx_mgmt,
2831 	TP_PROTO(struct wireless_dev *wdev, int freq, int sig_dbm),
2832 	TP_ARGS(wdev, freq, sig_dbm),
2833 	TP_STRUCT__entry(
2834 		WDEV_ENTRY
2835 		__field(int, freq)
2836 		__field(int, sig_dbm)
2837 	),
2838 	TP_fast_assign(
2839 		WDEV_ASSIGN;
2840 		__entry->freq = freq;
2841 		__entry->sig_dbm = sig_dbm;
2842 	),
2843 	TP_printk(WDEV_PR_FMT ", freq: "KHZ_F", sig dbm: %d",
2844 		  WDEV_PR_ARG, PR_KHZ(__entry->freq), __entry->sig_dbm)
2845 );
2846 
2847 TRACE_EVENT(cfg80211_mgmt_tx_status,
2848 	TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
2849 	TP_ARGS(wdev, cookie, ack),
2850 	TP_STRUCT__entry(
2851 		WDEV_ENTRY
2852 		__field(u64, cookie)
2853 		__field(bool, ack)
2854 	),
2855 	TP_fast_assign(
2856 		WDEV_ASSIGN;
2857 		__entry->cookie = cookie;
2858 		__entry->ack = ack;
2859 	),
2860 	TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
2861 		  WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
2862 );
2863 
2864 TRACE_EVENT(cfg80211_control_port_tx_status,
2865 	TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
2866 	TP_ARGS(wdev, cookie, ack),
2867 	TP_STRUCT__entry(
2868 		WDEV_ENTRY
2869 		__field(u64, cookie)
2870 		__field(bool, ack)
2871 	),
2872 	TP_fast_assign(
2873 		WDEV_ASSIGN;
2874 		__entry->cookie = cookie;
2875 		__entry->ack = ack;
2876 	),
2877 	TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
2878 		  WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
2879 );
2880 
2881 TRACE_EVENT(cfg80211_rx_control_port,
2882 	TP_PROTO(struct net_device *netdev, struct sk_buff *skb,
2883 		 bool unencrypted),
2884 	TP_ARGS(netdev, skb, unencrypted),
2885 	TP_STRUCT__entry(
2886 		NETDEV_ENTRY
2887 		__field(int, len)
2888 		MAC_ENTRY(from)
2889 		__field(u16, proto)
2890 		__field(bool, unencrypted)
2891 	),
2892 	TP_fast_assign(
2893 		NETDEV_ASSIGN;
2894 		__entry->len = skb->len;
2895 		MAC_ASSIGN(from, eth_hdr(skb)->h_source);
2896 		__entry->proto = be16_to_cpu(skb->protocol);
2897 		__entry->unencrypted = unencrypted;
2898 	),
2899 	TP_printk(NETDEV_PR_FMT ", len=%d, " MAC_PR_FMT ", proto: 0x%x, unencrypted: %s",
2900 		  NETDEV_PR_ARG, __entry->len, MAC_PR_ARG(from),
2901 		  __entry->proto, BOOL_TO_STR(__entry->unencrypted))
2902 );
2903 
2904 TRACE_EVENT(cfg80211_cqm_rssi_notify,
2905 	TP_PROTO(struct net_device *netdev,
2906 		 enum nl80211_cqm_rssi_threshold_event rssi_event,
2907 		 s32 rssi_level),
2908 	TP_ARGS(netdev, rssi_event, rssi_level),
2909 	TP_STRUCT__entry(
2910 		NETDEV_ENTRY
2911 		__field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
2912 		__field(s32, rssi_level)
2913 	),
2914 	TP_fast_assign(
2915 		NETDEV_ASSIGN;
2916 		__entry->rssi_event = rssi_event;
2917 		__entry->rssi_level = rssi_level;
2918 	),
2919 	TP_printk(NETDEV_PR_FMT ", rssi event: %d, level: %d",
2920 		  NETDEV_PR_ARG, __entry->rssi_event, __entry->rssi_level)
2921 );
2922 
2923 TRACE_EVENT(cfg80211_reg_can_beacon,
2924 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
2925 		 enum nl80211_iftype iftype, bool check_no_ir),
2926 	TP_ARGS(wiphy, chandef, iftype, check_no_ir),
2927 	TP_STRUCT__entry(
2928 		WIPHY_ENTRY
2929 		CHAN_DEF_ENTRY
2930 		__field(enum nl80211_iftype, iftype)
2931 		__field(bool, check_no_ir)
2932 	),
2933 	TP_fast_assign(
2934 		WIPHY_ASSIGN;
2935 		CHAN_DEF_ASSIGN(chandef);
2936 		__entry->iftype = iftype;
2937 		__entry->check_no_ir = check_no_ir;
2938 	),
2939 	TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d check_no_ir=%s",
2940 		  WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype,
2941 		  BOOL_TO_STR(__entry->check_no_ir))
2942 );
2943 
2944 TRACE_EVENT(cfg80211_chandef_dfs_required,
2945 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2946 	TP_ARGS(wiphy, chandef),
2947 	TP_STRUCT__entry(
2948 		WIPHY_ENTRY
2949 		CHAN_DEF_ENTRY
2950 	),
2951 	TP_fast_assign(
2952 		WIPHY_ASSIGN;
2953 		CHAN_DEF_ASSIGN(chandef);
2954 	),
2955 	TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2956 		  WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2957 );
2958 
2959 TRACE_EVENT(cfg80211_ch_switch_notify,
2960 	TP_PROTO(struct net_device *netdev,
2961 		 struct cfg80211_chan_def *chandef),
2962 	TP_ARGS(netdev, chandef),
2963 	TP_STRUCT__entry(
2964 		NETDEV_ENTRY
2965 		CHAN_DEF_ENTRY
2966 	),
2967 	TP_fast_assign(
2968 		NETDEV_ASSIGN;
2969 		CHAN_DEF_ASSIGN(chandef);
2970 	),
2971 	TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2972 		  NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2973 );
2974 
2975 TRACE_EVENT(cfg80211_ch_switch_started_notify,
2976 	TP_PROTO(struct net_device *netdev,
2977 		 struct cfg80211_chan_def *chandef),
2978 	TP_ARGS(netdev, chandef),
2979 	TP_STRUCT__entry(
2980 		NETDEV_ENTRY
2981 		CHAN_DEF_ENTRY
2982 	),
2983 	TP_fast_assign(
2984 		NETDEV_ASSIGN;
2985 		CHAN_DEF_ASSIGN(chandef);
2986 	),
2987 	TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2988 		  NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2989 );
2990 
2991 TRACE_EVENT(cfg80211_radar_event,
2992 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2993 	TP_ARGS(wiphy, chandef),
2994 	TP_STRUCT__entry(
2995 		WIPHY_ENTRY
2996 		CHAN_DEF_ENTRY
2997 	),
2998 	TP_fast_assign(
2999 		WIPHY_ASSIGN;
3000 		CHAN_DEF_ASSIGN(chandef);
3001 	),
3002 	TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
3003 		  WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
3004 );
3005 
3006 TRACE_EVENT(cfg80211_cac_event,
3007 	TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt),
3008 	TP_ARGS(netdev, evt),
3009 	TP_STRUCT__entry(
3010 		NETDEV_ENTRY
3011 		__field(enum nl80211_radar_event, evt)
3012 	),
3013 	TP_fast_assign(
3014 		NETDEV_ASSIGN;
3015 		__entry->evt = evt;
3016 	),
3017 	TP_printk(NETDEV_PR_FMT ",  event: %d",
3018 		  NETDEV_PR_ARG, __entry->evt)
3019 );
3020 
3021 DECLARE_EVENT_CLASS(cfg80211_rx_evt,
3022 	TP_PROTO(struct net_device *netdev, const u8 *addr),
3023 	TP_ARGS(netdev, addr),
3024 	TP_STRUCT__entry(
3025 		NETDEV_ENTRY
3026 		MAC_ENTRY(addr)
3027 	),
3028 	TP_fast_assign(
3029 		NETDEV_ASSIGN;
3030 		MAC_ASSIGN(addr, addr);
3031 	),
3032 	TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
3033 );
3034 
3035 DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
3036 	TP_PROTO(struct net_device *netdev, const u8 *addr),
3037 	TP_ARGS(netdev, addr)
3038 );
3039 
3040 DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
3041 	TP_PROTO(struct net_device *netdev, const u8 *addr),
3042 	TP_ARGS(netdev, addr)
3043 );
3044 
3045 TRACE_EVENT(cfg80211_ibss_joined,
3046 	TP_PROTO(struct net_device *netdev, const u8 *bssid,
3047 		 struct ieee80211_channel *channel),
3048 	TP_ARGS(netdev, bssid, channel),
3049 	TP_STRUCT__entry(
3050 		NETDEV_ENTRY
3051 		MAC_ENTRY(bssid)
3052 		CHAN_ENTRY
3053 	),
3054 	TP_fast_assign(
3055 		NETDEV_ASSIGN;
3056 		MAC_ASSIGN(bssid, bssid);
3057 		CHAN_ASSIGN(channel);
3058 	),
3059 	TP_printk(NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", " CHAN_PR_FMT,
3060 		  NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
3061 );
3062 
3063 TRACE_EVENT(cfg80211_probe_status,
3064 	TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
3065 		 bool acked),
3066 	TP_ARGS(netdev, addr, cookie, acked),
3067 	TP_STRUCT__entry(
3068 		NETDEV_ENTRY
3069 		MAC_ENTRY(addr)
3070 		__field(u64, cookie)
3071 		__field(bool, acked)
3072 	),
3073 	TP_fast_assign(
3074 		NETDEV_ASSIGN;
3075 		MAC_ASSIGN(addr, addr);
3076 		__entry->cookie = cookie;
3077 		__entry->acked = acked;
3078 	),
3079 	TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
3080 		  NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
3081 		  BOOL_TO_STR(__entry->acked))
3082 );
3083 
3084 TRACE_EVENT(cfg80211_cqm_pktloss_notify,
3085 	TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
3086 	TP_ARGS(netdev, peer, num_packets),
3087 	TP_STRUCT__entry(
3088 		NETDEV_ENTRY
3089 		MAC_ENTRY(peer)
3090 		__field(u32, num_packets)
3091 	),
3092 	TP_fast_assign(
3093 		NETDEV_ASSIGN;
3094 		MAC_ASSIGN(peer, peer);
3095 		__entry->num_packets = num_packets;
3096 	),
3097 	TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u",
3098 		  NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets)
3099 );
3100 
3101 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
3102 	TP_PROTO(struct net_device *netdev, const u8 *macaddr),
3103 	TP_ARGS(netdev, macaddr)
3104 );
3105 
3106 TRACE_EVENT(cfg80211_pmksa_candidate_notify,
3107 	TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
3108 		 bool preauth),
3109 	TP_ARGS(netdev, index, bssid, preauth),
3110 	TP_STRUCT__entry(
3111 		NETDEV_ENTRY
3112 		__field(int, index)
3113 		MAC_ENTRY(bssid)
3114 		__field(bool, preauth)
3115 	),
3116 	TP_fast_assign(
3117 		NETDEV_ASSIGN;
3118 		__entry->index = index;
3119 		MAC_ASSIGN(bssid, bssid);
3120 		__entry->preauth = preauth;
3121 	),
3122 	TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s",
3123 		  NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid),
3124 		  BOOL_TO_STR(__entry->preauth))
3125 );
3126 
3127 TRACE_EVENT(cfg80211_report_obss_beacon,
3128 	TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
3129 		 int freq, int sig_dbm),
3130 	TP_ARGS(wiphy, frame, len, freq, sig_dbm),
3131 	TP_STRUCT__entry(
3132 		WIPHY_ENTRY
3133 		__field(int, freq)
3134 		__field(int, sig_dbm)
3135 	),
3136 	TP_fast_assign(
3137 		WIPHY_ASSIGN;
3138 		__entry->freq = freq;
3139 		__entry->sig_dbm = sig_dbm;
3140 	),
3141 	TP_printk(WIPHY_PR_FMT ", freq: "KHZ_F", sig_dbm: %d",
3142 		  WIPHY_PR_ARG, PR_KHZ(__entry->freq), __entry->sig_dbm)
3143 );
3144 
3145 TRACE_EVENT(cfg80211_tdls_oper_request,
3146 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
3147 		 enum nl80211_tdls_operation oper, u16 reason_code),
3148 	TP_ARGS(wiphy, netdev, peer, oper, reason_code),
3149 	TP_STRUCT__entry(
3150 		WIPHY_ENTRY
3151 		NETDEV_ENTRY
3152 		MAC_ENTRY(peer)
3153 		__field(enum nl80211_tdls_operation, oper)
3154 		__field(u16, reason_code)
3155 	),
3156 	TP_fast_assign(
3157 		WIPHY_ASSIGN;
3158 		NETDEV_ASSIGN;
3159 		MAC_ASSIGN(peer, peer);
3160 		__entry->oper = oper;
3161 		__entry->reason_code = reason_code;
3162 	),
3163 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u",
3164 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper,
3165 		  __entry->reason_code)
3166 	);
3167 
3168 TRACE_EVENT(cfg80211_scan_done,
3169 	TP_PROTO(struct cfg80211_scan_request *request,
3170 		 struct cfg80211_scan_info *info),
3171 	TP_ARGS(request, info),
3172 	TP_STRUCT__entry(
3173 		__field(u32, n_channels)
3174 		__dynamic_array(u8, ie, request ? request->ie_len : 0)
3175 		__array(u32, rates, NUM_NL80211_BANDS)
3176 		__field(u32, wdev_id)
3177 		MAC_ENTRY(wiphy_mac)
3178 		__field(bool, no_cck)
3179 		__field(bool, aborted)
3180 		__field(u64, scan_start_tsf)
3181 		MAC_ENTRY(tsf_bssid)
3182 	),
3183 	TP_fast_assign(
3184 		if (request) {
3185 			memcpy(__get_dynamic_array(ie), request->ie,
3186 			       request->ie_len);
3187 			memcpy(__entry->rates, request->rates,
3188 			       NUM_NL80211_BANDS);
3189 			__entry->wdev_id = request->wdev ?
3190 					request->wdev->identifier : 0;
3191 			if (request->wiphy)
3192 				MAC_ASSIGN(wiphy_mac,
3193 					   request->wiphy->perm_addr);
3194 			__entry->no_cck = request->no_cck;
3195 		}
3196 		if (info) {
3197 			__entry->aborted = info->aborted;
3198 			__entry->scan_start_tsf = info->scan_start_tsf;
3199 			MAC_ASSIGN(tsf_bssid, info->tsf_bssid);
3200 		}
3201 	),
3202 	TP_printk("aborted: %s, scan start (TSF): %llu, tsf_bssid: " MAC_PR_FMT,
3203 		  BOOL_TO_STR(__entry->aborted),
3204 		  (unsigned long long)__entry->scan_start_tsf,
3205 		  MAC_PR_ARG(tsf_bssid))
3206 );
3207 
3208 DECLARE_EVENT_CLASS(wiphy_id_evt,
3209 	TP_PROTO(struct wiphy *wiphy, u64 id),
3210 	TP_ARGS(wiphy, id),
3211 	TP_STRUCT__entry(
3212 		WIPHY_ENTRY
3213 		__field(u64, id)
3214 	),
3215 	TP_fast_assign(
3216 		WIPHY_ASSIGN;
3217 		__entry->id = id;
3218 	),
3219 	TP_printk(WIPHY_PR_FMT ", id: %llu", WIPHY_PR_ARG, __entry->id)
3220 );
3221 
3222 DEFINE_EVENT(wiphy_id_evt, cfg80211_sched_scan_stopped,
3223 	TP_PROTO(struct wiphy *wiphy, u64 id),
3224 	TP_ARGS(wiphy, id)
3225 );
3226 
3227 DEFINE_EVENT(wiphy_id_evt, cfg80211_sched_scan_results,
3228 	TP_PROTO(struct wiphy *wiphy, u64 id),
3229 	TP_ARGS(wiphy, id)
3230 );
3231 
3232 TRACE_EVENT(cfg80211_get_bss,
3233 	TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
3234 		 const u8 *bssid, const u8 *ssid, size_t ssid_len,
3235 		 enum ieee80211_bss_type bss_type,
3236 		 enum ieee80211_privacy privacy),
3237 	TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, bss_type, privacy),
3238 	TP_STRUCT__entry(
3239 		WIPHY_ENTRY
3240 		CHAN_ENTRY
3241 		MAC_ENTRY(bssid)
3242 		__dynamic_array(u8, ssid, ssid_len)
3243 		__field(enum ieee80211_bss_type, bss_type)
3244 		__field(enum ieee80211_privacy, privacy)
3245 	),
3246 	TP_fast_assign(
3247 		WIPHY_ASSIGN;
3248 		CHAN_ASSIGN(channel);
3249 		MAC_ASSIGN(bssid, bssid);
3250 		memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
3251 		__entry->bss_type = bss_type;
3252 		__entry->privacy = privacy;
3253 	),
3254 	TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT
3255 		  ", buf: %#.2x, bss_type: %d, privacy: %d",
3256 		  WIPHY_PR_ARG, CHAN_PR_ARG, MAC_PR_ARG(bssid),
3257 		  ((u8 *)__get_dynamic_array(ssid))[0], __entry->bss_type,
3258 		  __entry->privacy)
3259 );
3260 
3261 TRACE_EVENT(cfg80211_inform_bss_frame,
3262 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_inform_bss *data,
3263 		 struct ieee80211_mgmt *mgmt, size_t len),
3264 	TP_ARGS(wiphy, data, mgmt, len),
3265 	TP_STRUCT__entry(
3266 		WIPHY_ENTRY
3267 		CHAN_ENTRY
3268 		__field(enum nl80211_bss_scan_width, scan_width)
3269 		__dynamic_array(u8, mgmt, len)
3270 		__field(s32, signal)
3271 		__field(u64, ts_boottime)
3272 		__field(u64, parent_tsf)
3273 		MAC_ENTRY(parent_bssid)
3274 	),
3275 	TP_fast_assign(
3276 		WIPHY_ASSIGN;
3277 		CHAN_ASSIGN(data->chan);
3278 		__entry->scan_width = data->scan_width;
3279 		if (mgmt)
3280 			memcpy(__get_dynamic_array(mgmt), mgmt, len);
3281 		__entry->signal = data->signal;
3282 		__entry->ts_boottime = data->boottime_ns;
3283 		__entry->parent_tsf = data->parent_tsf;
3284 		MAC_ASSIGN(parent_bssid, data->parent_bssid);
3285 	),
3286 	TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT
3287 		  "(scan_width: %d) signal: %d, tsb:%llu, detect_tsf:%llu, tsf_bssid: "
3288 		  MAC_PR_FMT, WIPHY_PR_ARG, CHAN_PR_ARG, __entry->scan_width,
3289 		  __entry->signal, (unsigned long long)__entry->ts_boottime,
3290 		  (unsigned long long)__entry->parent_tsf,
3291 		  MAC_PR_ARG(parent_bssid))
3292 );
3293 
3294 DECLARE_EVENT_CLASS(cfg80211_bss_evt,
3295 	TP_PROTO(struct cfg80211_bss *pub),
3296 	TP_ARGS(pub),
3297 	TP_STRUCT__entry(
3298 		MAC_ENTRY(bssid)
3299 		CHAN_ENTRY
3300 	),
3301 	TP_fast_assign(
3302 		MAC_ASSIGN(bssid, pub->bssid);
3303 		CHAN_ASSIGN(pub->channel);
3304 	),
3305 	TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG)
3306 );
3307 
3308 DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
3309 	TP_PROTO(struct cfg80211_bss *pub),
3310 	TP_ARGS(pub)
3311 );
3312 
3313 TRACE_EVENT(cfg80211_return_uint,
3314 	TP_PROTO(unsigned int ret),
3315 	TP_ARGS(ret),
3316 	TP_STRUCT__entry(
3317 		__field(unsigned int, ret)
3318 	),
3319 	TP_fast_assign(
3320 		__entry->ret = ret;
3321 	),
3322 	TP_printk("ret: %d", __entry->ret)
3323 );
3324 
3325 TRACE_EVENT(cfg80211_return_u32,
3326 	TP_PROTO(u32 ret),
3327 	TP_ARGS(ret),
3328 	TP_STRUCT__entry(
3329 		__field(u32, ret)
3330 	),
3331 	TP_fast_assign(
3332 		__entry->ret = ret;
3333 	),
3334 	TP_printk("ret: %u", __entry->ret)
3335 );
3336 
3337 TRACE_EVENT(cfg80211_report_wowlan_wakeup,
3338 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
3339 		 struct cfg80211_wowlan_wakeup *wakeup),
3340 	TP_ARGS(wiphy, wdev, wakeup),
3341 	TP_STRUCT__entry(
3342 		WIPHY_ENTRY
3343 		WDEV_ENTRY
3344 		__field(bool, non_wireless)
3345 		__field(bool, disconnect)
3346 		__field(bool, magic_pkt)
3347 		__field(bool, gtk_rekey_failure)
3348 		__field(bool, eap_identity_req)
3349 		__field(bool, four_way_handshake)
3350 		__field(bool, rfkill_release)
3351 		__field(s32, pattern_idx)
3352 		__field(u32, packet_len)
3353 		__dynamic_array(u8, packet,
3354 				wakeup ? wakeup->packet_present_len : 0)
3355 	),
3356 	TP_fast_assign(
3357 		WIPHY_ASSIGN;
3358 		WDEV_ASSIGN;
3359 		__entry->non_wireless = !wakeup;
3360 		__entry->disconnect = wakeup ? wakeup->disconnect : false;
3361 		__entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
3362 		__entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
3363 		__entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
3364 		__entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
3365 		__entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
3366 		__entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
3367 		__entry->packet_len = wakeup ? wakeup->packet_len : false;
3368 		if (wakeup && wakeup->packet && wakeup->packet_present_len)
3369 			memcpy(__get_dynamic_array(packet), wakeup->packet,
3370 			       wakeup->packet_present_len);
3371 	),
3372 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
3373 );
3374 
3375 TRACE_EVENT(cfg80211_ft_event,
3376 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3377 		 struct cfg80211_ft_event_params *ft_event),
3378 	TP_ARGS(wiphy, netdev, ft_event),
3379 	TP_STRUCT__entry(
3380 		WIPHY_ENTRY
3381 		NETDEV_ENTRY
3382 		__dynamic_array(u8, ies, ft_event->ies_len)
3383 		MAC_ENTRY(target_ap)
3384 		__dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
3385 	),
3386 	TP_fast_assign(
3387 		WIPHY_ASSIGN;
3388 		NETDEV_ASSIGN;
3389 		if (ft_event->ies)
3390 			memcpy(__get_dynamic_array(ies), ft_event->ies,
3391 			       ft_event->ies_len);
3392 		MAC_ASSIGN(target_ap, ft_event->target_ap);
3393 		if (ft_event->ric_ies)
3394 			memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
3395 			       ft_event->ric_ies_len);
3396 	),
3397 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT,
3398 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
3399 );
3400 
3401 TRACE_EVENT(cfg80211_stop_iface,
3402 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
3403 	TP_ARGS(wiphy, wdev),
3404 	TP_STRUCT__entry(
3405 		WIPHY_ENTRY
3406 		WDEV_ENTRY
3407 	),
3408 	TP_fast_assign(
3409 		WIPHY_ASSIGN;
3410 		WDEV_ASSIGN;
3411 	),
3412 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
3413 		  WIPHY_PR_ARG, WDEV_PR_ARG)
3414 );
3415 
3416 TRACE_EVENT(cfg80211_pmsr_report,
3417 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
3418 		 u64 cookie, const u8 *addr),
3419 	TP_ARGS(wiphy, wdev, cookie, addr),
3420 	TP_STRUCT__entry(
3421 		WIPHY_ENTRY
3422 		WDEV_ENTRY
3423 		__field(u64, cookie)
3424 		MAC_ENTRY(addr)
3425 	),
3426 	TP_fast_assign(
3427 		WIPHY_ASSIGN;
3428 		WDEV_ASSIGN;
3429 		__entry->cookie = cookie;
3430 		MAC_ASSIGN(addr, addr);
3431 	),
3432 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie:%lld, " MAC_PR_FMT,
3433 		  WIPHY_PR_ARG, WDEV_PR_ARG,
3434 		  (unsigned long long)__entry->cookie,
3435 		  MAC_PR_ARG(addr))
3436 );
3437 
3438 TRACE_EVENT(cfg80211_pmsr_complete,
3439 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
3440 	TP_ARGS(wiphy, wdev, cookie),
3441 	TP_STRUCT__entry(
3442 		WIPHY_ENTRY
3443 		WDEV_ENTRY
3444 		__field(u64, cookie)
3445 	),
3446 	TP_fast_assign(
3447 		WIPHY_ASSIGN;
3448 		WDEV_ASSIGN;
3449 		__entry->cookie = cookie;
3450 	),
3451 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie:%lld",
3452 		  WIPHY_PR_ARG, WDEV_PR_ARG,
3453 		  (unsigned long long)__entry->cookie)
3454 );
3455 
3456 TRACE_EVENT(rdev_update_owe_info,
3457 	    TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3458 		     struct cfg80211_update_owe_info *owe_info),
3459 	    TP_ARGS(wiphy, netdev, owe_info),
3460 	    TP_STRUCT__entry(WIPHY_ENTRY
3461 			     NETDEV_ENTRY
3462 			     MAC_ENTRY(peer)
3463 			     __field(u16, status)
3464 			     __dynamic_array(u8, ie, owe_info->ie_len)),
3465 	    TP_fast_assign(WIPHY_ASSIGN;
3466 			   NETDEV_ASSIGN;
3467 			   MAC_ASSIGN(peer, owe_info->peer);
3468 			   __entry->status = owe_info->status;
3469 			   memcpy(__get_dynamic_array(ie),
3470 				  owe_info->ie, owe_info->ie_len);),
3471 	    TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT
3472 		  " status %d", WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
3473 		  __entry->status)
3474 );
3475 
3476 TRACE_EVENT(cfg80211_update_owe_info_event,
3477 	    TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3478 		     struct cfg80211_update_owe_info *owe_info),
3479 	    TP_ARGS(wiphy, netdev, owe_info),
3480 	    TP_STRUCT__entry(WIPHY_ENTRY
3481 			     NETDEV_ENTRY
3482 			     MAC_ENTRY(peer)
3483 			     __dynamic_array(u8, ie, owe_info->ie_len)),
3484 	    TP_fast_assign(WIPHY_ASSIGN;
3485 			   NETDEV_ASSIGN;
3486 			   MAC_ASSIGN(peer, owe_info->peer);
3487 			   memcpy(__get_dynamic_array(ie), owe_info->ie,
3488 				  owe_info->ie_len);),
3489 	    TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
3490 		      WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
3491 );
3492 
3493 TRACE_EVENT(rdev_probe_mesh_link,
3494 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3495 		 const u8 *dest, const u8 *buf, size_t len),
3496 	TP_ARGS(wiphy, netdev, dest, buf, len),
3497 	TP_STRUCT__entry(
3498 		WIPHY_ENTRY
3499 		NETDEV_ENTRY
3500 		MAC_ENTRY(dest)
3501 	),
3502 	TP_fast_assign(
3503 		WIPHY_ASSIGN;
3504 		NETDEV_ASSIGN;
3505 		MAC_ASSIGN(dest, dest);
3506 	),
3507 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
3508 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dest))
3509 );
3510 
3511 TRACE_EVENT(rdev_set_tid_config,
3512 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3513 		 struct cfg80211_tid_config *tid_conf),
3514 	TP_ARGS(wiphy, netdev, tid_conf),
3515 	TP_STRUCT__entry(
3516 		WIPHY_ENTRY
3517 		NETDEV_ENTRY
3518 		MAC_ENTRY(peer)
3519 	),
3520 	TP_fast_assign(
3521 		WIPHY_ASSIGN;
3522 		NETDEV_ASSIGN;
3523 		MAC_ASSIGN(peer, tid_conf->peer);
3524 	),
3525 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
3526 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
3527 );
3528 
3529 TRACE_EVENT(rdev_reset_tid_config,
3530 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3531 		 const u8 *peer, u8 tids),
3532 	TP_ARGS(wiphy, netdev, peer, tids),
3533 	TP_STRUCT__entry(
3534 		WIPHY_ENTRY
3535 		NETDEV_ENTRY
3536 		MAC_ENTRY(peer)
3537 		__field(u8, tids)
3538 	),
3539 	TP_fast_assign(
3540 		WIPHY_ASSIGN;
3541 		NETDEV_ASSIGN;
3542 		MAC_ASSIGN(peer, peer);
3543 		__entry->tids = tids;
3544 	),
3545 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", tids: 0x%x",
3546 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tids)
3547 );
3548 #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
3549 
3550 #undef TRACE_INCLUDE_PATH
3551 #define TRACE_INCLUDE_PATH .
3552 #undef TRACE_INCLUDE_FILE
3553 #define TRACE_INCLUDE_FILE trace
3554 #include <trace/define_trace.h>
3555