xref: /openbmc/linux/net/wireless/trace.h (revision dca9ca2d588bd2c0989c671f048540b82e57cf1e)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
214e8a3c4SBeni Lev #undef TRACE_SYSTEM
314e8a3c4SBeni Lev #define TRACE_SYSTEM cfg80211
414e8a3c4SBeni Lev 
514e8a3c4SBeni Lev #if !defined(__RDEV_OPS_TRACE) || defined(TRACE_HEADER_MULTI_READ)
614e8a3c4SBeni Lev #define __RDEV_OPS_TRACE
714e8a3c4SBeni Lev 
814e8a3c4SBeni Lev #include <linux/tracepoint.h>
914e8a3c4SBeni Lev 
1014e8a3c4SBeni Lev #include <linux/rtnetlink.h>
11d2beae10SJoe Perches #include <linux/etherdevice.h>
1214e8a3c4SBeni Lev #include <net/cfg80211.h>
1314e8a3c4SBeni Lev #include "core.h"
1414e8a3c4SBeni Lev 
1514e8a3c4SBeni Lev #define MAC_ENTRY(entry_mac) __array(u8, entry_mac, ETH_ALEN)
1614e8a3c4SBeni Lev #define MAC_ASSIGN(entry_mac, given_mac) do {			     \
1714e8a3c4SBeni Lev 	if (given_mac)						     \
1814e8a3c4SBeni Lev 		memcpy(__entry->entry_mac, given_mac, ETH_ALEN);     \
1914e8a3c4SBeni Lev 	else							     \
20d2beae10SJoe Perches 		eth_zero_addr(__entry->entry_mac);		     \
2114e8a3c4SBeni Lev 	} while (0)
2214e8a3c4SBeni Lev #define MAC_PR_FMT "%pM"
2314e8a3c4SBeni Lev #define MAC_PR_ARG(entry_mac) (__entry->entry_mac)
2414e8a3c4SBeni Lev 
25ec816087SJohannes Berg #define MAXNAME		32
26ec816087SJohannes Berg #define WIPHY_ENTRY	__array(char, wiphy_name, 32)
27ec816087SJohannes Berg #define WIPHY_ASSIGN	strlcpy(__entry->wiphy_name, wiphy_name(wiphy), MAXNAME)
28ec816087SJohannes Berg #define WIPHY_PR_FMT	"%s"
29ec816087SJohannes Berg #define WIPHY_PR_ARG	__entry->wiphy_name
3014e8a3c4SBeni Lev 
3114e8a3c4SBeni Lev #define WDEV_ENTRY	__field(u32, id)
32ce1eaddaSJohannes Berg #define WDEV_ASSIGN	(__entry->id) = (!IS_ERR_OR_NULL(wdev)	\
33ce1eaddaSJohannes Berg 					 ? wdev->identifier : 0)
34ec816087SJohannes Berg #define WDEV_PR_FMT	"wdev(%u)"
3514e8a3c4SBeni Lev #define WDEV_PR_ARG	(__entry->id)
3614e8a3c4SBeni Lev 
3714e8a3c4SBeni Lev #define NETDEV_ENTRY	__array(char, name, IFNAMSIZ) \
3814e8a3c4SBeni Lev 			__field(int, ifindex)
3914e8a3c4SBeni Lev #define NETDEV_ASSIGN					       \
4014e8a3c4SBeni Lev 	do {						       \
4114e8a3c4SBeni Lev 		memcpy(__entry->name, netdev->name, IFNAMSIZ); \
4214e8a3c4SBeni Lev 		(__entry->ifindex) = (netdev->ifindex);	       \
4314e8a3c4SBeni Lev 	} while (0)
44ec816087SJohannes Berg #define NETDEV_PR_FMT	"netdev:%s(%d)"
45ec816087SJohannes Berg #define NETDEV_PR_ARG	__entry->name, __entry->ifindex
4614e8a3c4SBeni Lev 
4714e8a3c4SBeni Lev #define MESH_CFG_ENTRY __field(u16, dot11MeshRetryTimeout)		   \
4814e8a3c4SBeni Lev 		       __field(u16, dot11MeshConfirmTimeout)		   \
4914e8a3c4SBeni Lev 		       __field(u16, dot11MeshHoldingTimeout)		   \
5014e8a3c4SBeni Lev 		       __field(u16, dot11MeshMaxPeerLinks)		   \
5114e8a3c4SBeni Lev 		       __field(u8, dot11MeshMaxRetries)			   \
5214e8a3c4SBeni Lev 		       __field(u8, dot11MeshTTL)			   \
5314e8a3c4SBeni Lev 		       __field(u8, element_ttl)				   \
5414e8a3c4SBeni Lev 		       __field(bool, auto_open_plinks)			   \
5514e8a3c4SBeni Lev 		       __field(u32, dot11MeshNbrOffsetMaxNeighbor)	   \
5614e8a3c4SBeni Lev 		       __field(u8, dot11MeshHWMPmaxPREQretries)		   \
5714e8a3c4SBeni Lev 		       __field(u32, path_refresh_time)			   \
5814e8a3c4SBeni Lev 		       __field(u32, dot11MeshHWMPactivePathTimeout)	   \
5914e8a3c4SBeni Lev 		       __field(u16, min_discovery_timeout)		   \
6014e8a3c4SBeni Lev 		       __field(u16, dot11MeshHWMPpreqMinInterval)	   \
6114e8a3c4SBeni Lev 		       __field(u16, dot11MeshHWMPperrMinInterval)	   \
6214e8a3c4SBeni Lev 		       __field(u16, dot11MeshHWMPnetDiameterTraversalTime) \
6314e8a3c4SBeni Lev 		       __field(u8, dot11MeshHWMPRootMode)		   \
6414e8a3c4SBeni Lev 		       __field(u16, dot11MeshHWMPRannInterval)		   \
6514e8a3c4SBeni Lev 		       __field(bool, dot11MeshGateAnnouncementProtocol)	   \
6614e8a3c4SBeni Lev 		       __field(bool, dot11MeshForwarding)		   \
6714e8a3c4SBeni Lev 		       __field(s32, rssi_threshold)			   \
6814e8a3c4SBeni Lev 		       __field(u16, ht_opmode)				   \
6914e8a3c4SBeni Lev 		       __field(u32, dot11MeshHWMPactivePathToRootTimeout)  \
7014e8a3c4SBeni Lev 		       __field(u16, dot11MeshHWMProotInterval)		   \
7114e8a3c4SBeni Lev 		       __field(u16, dot11MeshHWMPconfirmationInterval)
7214e8a3c4SBeni Lev #define MESH_CFG_ASSIGN							      \
7314e8a3c4SBeni Lev 	do {								      \
7414e8a3c4SBeni Lev 		__entry->dot11MeshRetryTimeout = conf->dot11MeshRetryTimeout; \
7514e8a3c4SBeni Lev 		__entry->dot11MeshConfirmTimeout =			      \
7614e8a3c4SBeni Lev 				conf->dot11MeshConfirmTimeout;		      \
7714e8a3c4SBeni Lev 		__entry->dot11MeshHoldingTimeout =			      \
7814e8a3c4SBeni Lev 				conf->dot11MeshHoldingTimeout;		      \
7914e8a3c4SBeni Lev 		__entry->dot11MeshMaxPeerLinks = conf->dot11MeshMaxPeerLinks; \
8014e8a3c4SBeni Lev 		__entry->dot11MeshMaxRetries = conf->dot11MeshMaxRetries;     \
8114e8a3c4SBeni Lev 		__entry->dot11MeshTTL = conf->dot11MeshTTL;		      \
8214e8a3c4SBeni Lev 		__entry->element_ttl = conf->element_ttl;		      \
8314e8a3c4SBeni Lev 		__entry->auto_open_plinks = conf->auto_open_plinks;	      \
8414e8a3c4SBeni Lev 		__entry->dot11MeshNbrOffsetMaxNeighbor =		      \
8514e8a3c4SBeni Lev 				conf->dot11MeshNbrOffsetMaxNeighbor;	      \
8614e8a3c4SBeni Lev 		__entry->dot11MeshHWMPmaxPREQretries =			      \
8714e8a3c4SBeni Lev 				conf->dot11MeshHWMPmaxPREQretries;	      \
8814e8a3c4SBeni Lev 		__entry->path_refresh_time = conf->path_refresh_time;	      \
8914e8a3c4SBeni Lev 		__entry->dot11MeshHWMPactivePathTimeout =		      \
9014e8a3c4SBeni Lev 				conf->dot11MeshHWMPactivePathTimeout;	      \
9114e8a3c4SBeni Lev 		__entry->min_discovery_timeout = conf->min_discovery_timeout; \
9214e8a3c4SBeni Lev 		__entry->dot11MeshHWMPpreqMinInterval =			      \
9314e8a3c4SBeni Lev 				conf->dot11MeshHWMPpreqMinInterval;	      \
9414e8a3c4SBeni Lev 		__entry->dot11MeshHWMPperrMinInterval =			      \
9514e8a3c4SBeni Lev 				conf->dot11MeshHWMPperrMinInterval;	      \
9614e8a3c4SBeni Lev 		__entry->dot11MeshHWMPnetDiameterTraversalTime =	      \
9714e8a3c4SBeni Lev 				conf->dot11MeshHWMPnetDiameterTraversalTime;  \
9814e8a3c4SBeni Lev 		__entry->dot11MeshHWMPRootMode = conf->dot11MeshHWMPRootMode; \
9914e8a3c4SBeni Lev 		__entry->dot11MeshHWMPRannInterval =			      \
10014e8a3c4SBeni Lev 				conf->dot11MeshHWMPRannInterval;	      \
10114e8a3c4SBeni Lev 		__entry->dot11MeshGateAnnouncementProtocol =		      \
10214e8a3c4SBeni Lev 				conf->dot11MeshGateAnnouncementProtocol;      \
10314e8a3c4SBeni Lev 		__entry->dot11MeshForwarding = conf->dot11MeshForwarding;     \
10414e8a3c4SBeni Lev 		__entry->rssi_threshold = conf->rssi_threshold;		      \
10514e8a3c4SBeni Lev 		__entry->ht_opmode = conf->ht_opmode;			      \
10614e8a3c4SBeni Lev 		__entry->dot11MeshHWMPactivePathToRootTimeout =		      \
10714e8a3c4SBeni Lev 				conf->dot11MeshHWMPactivePathToRootTimeout;   \
10814e8a3c4SBeni Lev 		__entry->dot11MeshHWMProotInterval =			      \
10914e8a3c4SBeni Lev 				conf->dot11MeshHWMProotInterval;	      \
11014e8a3c4SBeni Lev 		__entry->dot11MeshHWMPconfirmationInterval =		      \
11114e8a3c4SBeni Lev 				conf->dot11MeshHWMPconfirmationInterval;      \
11214e8a3c4SBeni Lev 	} while (0)
11314e8a3c4SBeni Lev 
11457fbcce3SJohannes Berg #define CHAN_ENTRY __field(enum nl80211_band, band) \
115934f4c7dSThomas Pedersen 		   __field(u32, center_freq)		\
116934f4c7dSThomas Pedersen 		   __field(u16, freq_offset)
11714e8a3c4SBeni Lev #define CHAN_ASSIGN(chan)					  \
11814e8a3c4SBeni Lev 	do {							  \
11914e8a3c4SBeni Lev 		if (chan) {					  \
12014e8a3c4SBeni Lev 			__entry->band = chan->band;		  \
12114e8a3c4SBeni Lev 			__entry->center_freq = chan->center_freq; \
122934f4c7dSThomas Pedersen 			__entry->freq_offset = chan->freq_offset; \
12314e8a3c4SBeni Lev 		} else {					  \
12414e8a3c4SBeni Lev 			__entry->band = 0;			  \
12514e8a3c4SBeni Lev 			__entry->center_freq = 0;		  \
126934f4c7dSThomas Pedersen 			__entry->freq_offset = 0;		  \
12714e8a3c4SBeni Lev 		}						  \
12814e8a3c4SBeni Lev 	} while (0)
129934f4c7dSThomas Pedersen #define CHAN_PR_FMT "band: %d, freq: %u.%03u"
130934f4c7dSThomas Pedersen #define CHAN_PR_ARG __entry->band, __entry->center_freq, __entry->freq_offset
13114e8a3c4SBeni Lev 
13257fbcce3SJohannes Berg #define CHAN_DEF_ENTRY __field(enum nl80211_band, band)		\
1333d9d1d66SJohannes Berg 		       __field(u32, control_freq)			\
134934f4c7dSThomas Pedersen 		       __field(u32, freq_offset)			\
1353d9d1d66SJohannes Berg 		       __field(u32, width)				\
1363d9d1d66SJohannes Berg 		       __field(u32, center_freq1)			\
137934f4c7dSThomas Pedersen 		       __field(u32, freq1_offset)			\
1383d9d1d66SJohannes Berg 		       __field(u32, center_freq2)
139683b6d3bSJohannes Berg #define CHAN_DEF_ASSIGN(chandef)					\
140683b6d3bSJohannes Berg 	do {								\
141683b6d3bSJohannes Berg 		if ((chandef) && (chandef)->chan) {			\
142683b6d3bSJohannes Berg 			__entry->band = (chandef)->chan->band;		\
1433d9d1d66SJohannes Berg 			__entry->control_freq =				\
144683b6d3bSJohannes Berg 				(chandef)->chan->center_freq;		\
145934f4c7dSThomas Pedersen 			__entry->freq_offset =				\
146934f4c7dSThomas Pedersen 				(chandef)->chan->freq_offset;		\
1473d9d1d66SJohannes Berg 			__entry->width = (chandef)->width;		\
1483d9d1d66SJohannes Berg 			__entry->center_freq1 = (chandef)->center_freq1;\
149934f4c7dSThomas Pedersen 			__entry->freq1_offset = (chandef)->freq1_offset;\
1503d9d1d66SJohannes Berg 			__entry->center_freq2 = (chandef)->center_freq2;\
151683b6d3bSJohannes Berg 		} else {						\
152683b6d3bSJohannes Berg 			__entry->band = 0;				\
1533d9d1d66SJohannes Berg 			__entry->control_freq = 0;			\
154934f4c7dSThomas Pedersen 			__entry->freq_offset = 0;			\
1553d9d1d66SJohannes Berg 			__entry->width = 0;				\
1563d9d1d66SJohannes Berg 			__entry->center_freq1 = 0;			\
157934f4c7dSThomas Pedersen 			__entry->freq1_offset = 0;			\
1583d9d1d66SJohannes Berg 			__entry->center_freq2 = 0;			\
159683b6d3bSJohannes Berg 		}							\
160683b6d3bSJohannes Berg 	} while (0)
1613d9d1d66SJohannes Berg #define CHAN_DEF_PR_FMT							\
162934f4c7dSThomas Pedersen 	"band: %d, control freq: %u.%03u, width: %d, cf1: %u.%03u, cf2: %u"
1633d9d1d66SJohannes Berg #define CHAN_DEF_PR_ARG __entry->band, __entry->control_freq,		\
164934f4c7dSThomas Pedersen 			__entry->freq_offset, __entry->width,		\
165934f4c7dSThomas Pedersen 			__entry->center_freq1, __entry->freq1_offset,	\
1663d9d1d66SJohannes Berg 			__entry->center_freq2
167683b6d3bSJohannes Berg 
16814e8a3c4SBeni Lev #define SINFO_ENTRY __field(int, generation)	    \
16914e8a3c4SBeni Lev 		    __field(u32, connected_time)    \
17014e8a3c4SBeni Lev 		    __field(u32, inactive_time)	    \
17114e8a3c4SBeni Lev 		    __field(u32, rx_bytes)	    \
17214e8a3c4SBeni Lev 		    __field(u32, tx_bytes)	    \
17314e8a3c4SBeni Lev 		    __field(u32, rx_packets)	    \
17414e8a3c4SBeni Lev 		    __field(u32, tx_packets)	    \
17514e8a3c4SBeni Lev 		    __field(u32, tx_retries)	    \
17614e8a3c4SBeni Lev 		    __field(u32, tx_failed)	    \
17714e8a3c4SBeni Lev 		    __field(u32, rx_dropped_misc)   \
17814e8a3c4SBeni Lev 		    __field(u32, beacon_loss_count) \
17914e8a3c4SBeni Lev 		    __field(u16, llid)		    \
18014e8a3c4SBeni Lev 		    __field(u16, plid)		    \
18114e8a3c4SBeni Lev 		    __field(u8, plink_state)
18214e8a3c4SBeni Lev #define SINFO_ASSIGN						       \
18314e8a3c4SBeni Lev 	do {							       \
18414e8a3c4SBeni Lev 		__entry->generation = sinfo->generation;	       \
18514e8a3c4SBeni Lev 		__entry->connected_time = sinfo->connected_time;       \
18614e8a3c4SBeni Lev 		__entry->inactive_time = sinfo->inactive_time;	       \
18714e8a3c4SBeni Lev 		__entry->rx_bytes = sinfo->rx_bytes;		       \
18814e8a3c4SBeni Lev 		__entry->tx_bytes = sinfo->tx_bytes;		       \
18914e8a3c4SBeni Lev 		__entry->rx_packets = sinfo->rx_packets;	       \
19014e8a3c4SBeni Lev 		__entry->tx_packets = sinfo->tx_packets;	       \
19114e8a3c4SBeni Lev 		__entry->tx_retries = sinfo->tx_retries;	       \
19214e8a3c4SBeni Lev 		__entry->tx_failed = sinfo->tx_failed;		       \
19314e8a3c4SBeni Lev 		__entry->rx_dropped_misc = sinfo->rx_dropped_misc;     \
19414e8a3c4SBeni Lev 		__entry->beacon_loss_count = sinfo->beacon_loss_count; \
19514e8a3c4SBeni Lev 		__entry->llid = sinfo->llid;			       \
19614e8a3c4SBeni Lev 		__entry->plid = sinfo->plid;			       \
19714e8a3c4SBeni Lev 		__entry->plink_state = sinfo->plink_state;	       \
19814e8a3c4SBeni Lev 	} while (0)
19914e8a3c4SBeni Lev 
20014e8a3c4SBeni Lev #define BOOL_TO_STR(bo) (bo) ? "true" : "false"
20114e8a3c4SBeni Lev 
202fa9ffc74SKyeyoon Park #define QOS_MAP_ENTRY __field(u8, num_des)			\
203fa9ffc74SKyeyoon Park 		      __array(u8, dscp_exception,		\
204fa9ffc74SKyeyoon Park 			      2 * IEEE80211_QOS_MAP_MAX_EX)	\
205fa9ffc74SKyeyoon Park 		      __array(u8, up, IEEE80211_QOS_MAP_LEN_MIN)
206fa9ffc74SKyeyoon Park #define QOS_MAP_ASSIGN(qos_map)					\
207fa9ffc74SKyeyoon Park 	do {							\
208fa9ffc74SKyeyoon Park 		if ((qos_map)) {				\
209fa9ffc74SKyeyoon Park 			__entry->num_des = (qos_map)->num_des;	\
210fa9ffc74SKyeyoon Park 			memcpy(__entry->dscp_exception,		\
211fa9ffc74SKyeyoon Park 			       &(qos_map)->dscp_exception,	\
212fa9ffc74SKyeyoon Park 			       2 * IEEE80211_QOS_MAP_MAX_EX);	\
213fa9ffc74SKyeyoon Park 			memcpy(__entry->up, &(qos_map)->up,	\
214fa9ffc74SKyeyoon Park 			       IEEE80211_QOS_MAP_LEN_MIN);	\
215fa9ffc74SKyeyoon Park 		} else {					\
216fa9ffc74SKyeyoon Park 			__entry->num_des = 0;			\
217fa9ffc74SKyeyoon Park 			memset(__entry->dscp_exception, 0,	\
218fa9ffc74SKyeyoon Park 			       2 * IEEE80211_QOS_MAP_MAX_EX);	\
219fa9ffc74SKyeyoon Park 			memset(__entry->up, 0,			\
220fa9ffc74SKyeyoon Park 			       IEEE80211_QOS_MAP_LEN_MIN);	\
221fa9ffc74SKyeyoon Park 		}						\
222fa9ffc74SKyeyoon Park 	} while (0)
223fa9ffc74SKyeyoon Park 
22414e8a3c4SBeni Lev /*************************************************************
22514e8a3c4SBeni Lev  *			rdev->ops traces		     *
22614e8a3c4SBeni Lev  *************************************************************/
22714e8a3c4SBeni Lev 
22814e8a3c4SBeni Lev TRACE_EVENT(rdev_suspend,
22914e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_wowlan *wow),
23014e8a3c4SBeni Lev 	TP_ARGS(wiphy, wow),
23114e8a3c4SBeni Lev 	TP_STRUCT__entry(
23214e8a3c4SBeni Lev 		WIPHY_ENTRY
23314e8a3c4SBeni Lev 		__field(bool, any)
23414e8a3c4SBeni Lev 		__field(bool, disconnect)
23514e8a3c4SBeni Lev 		__field(bool, magic_pkt)
23614e8a3c4SBeni Lev 		__field(bool, gtk_rekey_failure)
23714e8a3c4SBeni Lev 		__field(bool, eap_identity_req)
23814e8a3c4SBeni Lev 		__field(bool, four_way_handshake)
23914e8a3c4SBeni Lev 		__field(bool, rfkill_release)
24014e8a3c4SBeni Lev 		__field(bool, valid_wow)
24114e8a3c4SBeni Lev 	),
24214e8a3c4SBeni Lev 	TP_fast_assign(
24314e8a3c4SBeni Lev 		WIPHY_ASSIGN;
24414e8a3c4SBeni Lev 		if (wow) {
24514e8a3c4SBeni Lev 			__entry->any = wow->any;
24614e8a3c4SBeni Lev 			__entry->disconnect = wow->disconnect;
24714e8a3c4SBeni Lev 			__entry->magic_pkt = wow->magic_pkt;
24814e8a3c4SBeni Lev 			__entry->gtk_rekey_failure = wow->gtk_rekey_failure;
24914e8a3c4SBeni Lev 			__entry->eap_identity_req = wow->eap_identity_req;
25014e8a3c4SBeni Lev 			__entry->four_way_handshake = wow->four_way_handshake;
25114e8a3c4SBeni Lev 			__entry->rfkill_release = wow->rfkill_release;
25214e8a3c4SBeni Lev 			__entry->valid_wow = true;
25314e8a3c4SBeni Lev 		} else {
25414e8a3c4SBeni Lev 			__entry->valid_wow = false;
25514e8a3c4SBeni Lev 		}
25614e8a3c4SBeni Lev 	),
25714e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", wow%s - any: %d, disconnect: %d, "
25814e8a3c4SBeni Lev 		  "magic pkt: %d, gtk rekey failure: %d, eap identify req: %d, "
25914e8a3c4SBeni Lev 		  "four way handshake: %d, rfkill release: %d.",
26014e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->valid_wow ? "" : "(Not configured!)",
26114e8a3c4SBeni Lev 		  __entry->any, __entry->disconnect, __entry->magic_pkt,
26214e8a3c4SBeni Lev 		  __entry->gtk_rekey_failure, __entry->eap_identity_req,
26314e8a3c4SBeni Lev 		  __entry->four_way_handshake, __entry->rfkill_release)
26414e8a3c4SBeni Lev );
26514e8a3c4SBeni Lev 
26614e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int,
26714e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret),
26814e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret),
26914e8a3c4SBeni Lev 	TP_STRUCT__entry(
27014e8a3c4SBeni Lev 		WIPHY_ENTRY
27114e8a3c4SBeni Lev 		__field(int, ret)
27214e8a3c4SBeni Lev 	),
27314e8a3c4SBeni Lev 	TP_fast_assign(
27414e8a3c4SBeni Lev 		WIPHY_ASSIGN;
27514e8a3c4SBeni Lev 		__entry->ret = ret;
27614e8a3c4SBeni Lev 	),
27714e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned: %d", WIPHY_PR_ARG, __entry->ret)
27814e8a3c4SBeni Lev );
27914e8a3c4SBeni Lev 
28014e8a3c4SBeni Lev TRACE_EVENT(rdev_scan,
28114e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_scan_request *request),
28214e8a3c4SBeni Lev 	TP_ARGS(wiphy, request),
28314e8a3c4SBeni Lev 	TP_STRUCT__entry(
28414e8a3c4SBeni Lev 		WIPHY_ENTRY
28514e8a3c4SBeni Lev 	),
28614e8a3c4SBeni Lev 	TP_fast_assign(
28714e8a3c4SBeni Lev 		WIPHY_ASSIGN;
28814e8a3c4SBeni Lev 	),
28914e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
29014e8a3c4SBeni Lev );
29114e8a3c4SBeni Lev 
29214e8a3c4SBeni Lev DECLARE_EVENT_CLASS(wiphy_only_evt,
29314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
29414e8a3c4SBeni Lev 	TP_ARGS(wiphy),
29514e8a3c4SBeni Lev 	TP_STRUCT__entry(
29614e8a3c4SBeni Lev 		WIPHY_ENTRY
29714e8a3c4SBeni Lev 	),
29814e8a3c4SBeni Lev 	TP_fast_assign(
29914e8a3c4SBeni Lev 		WIPHY_ASSIGN;
30014e8a3c4SBeni Lev 	),
30114e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
30214e8a3c4SBeni Lev );
30314e8a3c4SBeni Lev 
30414e8a3c4SBeni Lev DEFINE_EVENT(wiphy_only_evt, rdev_resume,
30514e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
30614e8a3c4SBeni Lev 	TP_ARGS(wiphy)
30714e8a3c4SBeni Lev );
30814e8a3c4SBeni Lev 
30914e8a3c4SBeni Lev DEFINE_EVENT(wiphy_only_evt, rdev_return_void,
31014e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
31114e8a3c4SBeni Lev 	TP_ARGS(wiphy)
31214e8a3c4SBeni Lev );
31314e8a3c4SBeni Lev 
31414e8a3c4SBeni Lev DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna,
31514e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
31614e8a3c4SBeni Lev 	TP_ARGS(wiphy)
31714e8a3c4SBeni Lev );
31814e8a3c4SBeni Lev 
31914e8a3c4SBeni Lev DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll,
32014e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
32114e8a3c4SBeni Lev 	TP_ARGS(wiphy)
32214e8a3c4SBeni Lev );
32314e8a3c4SBeni Lev 
32414e8a3c4SBeni Lev DECLARE_EVENT_CLASS(wiphy_enabled_evt,
32514e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, bool enabled),
32614e8a3c4SBeni Lev 	TP_ARGS(wiphy, enabled),
32714e8a3c4SBeni Lev 	TP_STRUCT__entry(
32814e8a3c4SBeni Lev 		WIPHY_ENTRY
32914e8a3c4SBeni Lev 		__field(bool, enabled)
33014e8a3c4SBeni Lev 	),
33114e8a3c4SBeni Lev 	TP_fast_assign(
33214e8a3c4SBeni Lev 		WIPHY_ASSIGN;
33314e8a3c4SBeni Lev 		__entry->enabled = enabled;
33414e8a3c4SBeni Lev 	),
33514e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", %senabled ",
33614e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->enabled ? "" : "not ")
33714e8a3c4SBeni Lev );
33814e8a3c4SBeni Lev 
33914e8a3c4SBeni Lev DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup,
34014e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, bool enabled),
34114e8a3c4SBeni Lev 	TP_ARGS(wiphy, enabled)
34214e8a3c4SBeni Lev );
34314e8a3c4SBeni Lev 
34414e8a3c4SBeni Lev TRACE_EVENT(rdev_add_virtual_intf,
34514e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type),
34614e8a3c4SBeni Lev 	TP_ARGS(wiphy, name, type),
34714e8a3c4SBeni Lev 	TP_STRUCT__entry(
34814e8a3c4SBeni Lev 		WIPHY_ENTRY
34914e8a3c4SBeni Lev 		__string(vir_intf_name, name ? name : "<noname>")
35014e8a3c4SBeni Lev 		__field(enum nl80211_iftype, type)
35114e8a3c4SBeni Lev 	),
35214e8a3c4SBeni Lev 	TP_fast_assign(
35314e8a3c4SBeni Lev 		WIPHY_ASSIGN;
35414e8a3c4SBeni Lev 		__assign_str(vir_intf_name, name ? name : "<noname>");
35514e8a3c4SBeni Lev 		__entry->type = type;
35614e8a3c4SBeni Lev 	),
35714e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d",
35814e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type)
35914e8a3c4SBeni Lev );
36014e8a3c4SBeni Lev 
36114e8a3c4SBeni Lev DECLARE_EVENT_CLASS(wiphy_wdev_evt,
36214e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
36314e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev),
36414e8a3c4SBeni Lev 	TP_STRUCT__entry(
36514e8a3c4SBeni Lev 		WIPHY_ENTRY
36614e8a3c4SBeni Lev 		WDEV_ENTRY
36714e8a3c4SBeni Lev 	),
36814e8a3c4SBeni Lev 	TP_fast_assign(
36914e8a3c4SBeni Lev 		WIPHY_ASSIGN;
37014e8a3c4SBeni Lev 		WDEV_ASSIGN;
37114e8a3c4SBeni Lev 	),
372ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
37314e8a3c4SBeni Lev );
37414e8a3c4SBeni Lev 
3759bb7e0f2SJohannes Berg DECLARE_EVENT_CLASS(wiphy_wdev_cookie_evt,
3769bb7e0f2SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
3779bb7e0f2SJohannes Berg 	TP_ARGS(wiphy, wdev, cookie),
3789bb7e0f2SJohannes Berg 	TP_STRUCT__entry(
3799bb7e0f2SJohannes Berg 		WIPHY_ENTRY
3809bb7e0f2SJohannes Berg 		WDEV_ENTRY
3819bb7e0f2SJohannes Berg 		__field(u64, cookie)
3829bb7e0f2SJohannes Berg 	),
3839bb7e0f2SJohannes Berg 	TP_fast_assign(
3849bb7e0f2SJohannes Berg 		WIPHY_ASSIGN;
3859bb7e0f2SJohannes Berg 		WDEV_ASSIGN;
3869bb7e0f2SJohannes Berg 		__entry->cookie = cookie;
3879bb7e0f2SJohannes Berg 	),
3889bb7e0f2SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %lld",
3899bb7e0f2SJohannes Berg 		  WIPHY_PR_ARG, WDEV_PR_ARG,
3909bb7e0f2SJohannes Berg 		  (unsigned long long)__entry->cookie)
3919bb7e0f2SJohannes Berg );
3929bb7e0f2SJohannes Berg 
39314e8a3c4SBeni Lev DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev,
39414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
39514e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev)
39614e8a3c4SBeni Lev );
39714e8a3c4SBeni Lev 
39814e8a3c4SBeni Lev DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf,
39914e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
40014e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev)
40114e8a3c4SBeni Lev );
40214e8a3c4SBeni Lev 
40314e8a3c4SBeni Lev TRACE_EVENT(rdev_change_virtual_intf,
40414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
40514e8a3c4SBeni Lev 		 enum nl80211_iftype type),
40614e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, type),
40714e8a3c4SBeni Lev 	TP_STRUCT__entry(
40814e8a3c4SBeni Lev 		WIPHY_ENTRY
40914e8a3c4SBeni Lev 		NETDEV_ENTRY
41014e8a3c4SBeni Lev 		__field(enum nl80211_iftype, type)
41114e8a3c4SBeni Lev 	),
41214e8a3c4SBeni Lev 	TP_fast_assign(
41314e8a3c4SBeni Lev 		WIPHY_ASSIGN;
41414e8a3c4SBeni Lev 		NETDEV_ASSIGN;
41514e8a3c4SBeni Lev 		__entry->type = type;
41614e8a3c4SBeni Lev 	),
417ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", type: %d",
41814e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type)
41914e8a3c4SBeni Lev );
42014e8a3c4SBeni Lev 
42114e8a3c4SBeni Lev DECLARE_EVENT_CLASS(key_handle,
42214e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
42314e8a3c4SBeni Lev 		 bool pairwise, const u8 *mac_addr),
42414e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr),
42514e8a3c4SBeni Lev 	TP_STRUCT__entry(
42614e8a3c4SBeni Lev 		WIPHY_ENTRY
42714e8a3c4SBeni Lev 		NETDEV_ENTRY
42814e8a3c4SBeni Lev 		MAC_ENTRY(mac_addr)
42914e8a3c4SBeni Lev 		__field(u8, key_index)
43014e8a3c4SBeni Lev 		__field(bool, pairwise)
43114e8a3c4SBeni Lev 	),
43214e8a3c4SBeni Lev 	TP_fast_assign(
43314e8a3c4SBeni Lev 		WIPHY_ASSIGN;
43414e8a3c4SBeni Lev 		NETDEV_ASSIGN;
43514e8a3c4SBeni Lev 		MAC_ASSIGN(mac_addr, mac_addr);
43614e8a3c4SBeni Lev 		__entry->key_index = key_index;
43714e8a3c4SBeni Lev 		__entry->pairwise = pairwise;
43814e8a3c4SBeni Lev 	),
439ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key_index: %u, pairwise: %s, mac addr: " MAC_PR_FMT,
44014e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
44114e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->pairwise), MAC_PR_ARG(mac_addr))
44214e8a3c4SBeni Lev );
44314e8a3c4SBeni Lev 
44414e8a3c4SBeni Lev DEFINE_EVENT(key_handle, rdev_get_key,
44514e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
44614e8a3c4SBeni Lev 		 bool pairwise, const u8 *mac_addr),
44714e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
44814e8a3c4SBeni Lev );
44914e8a3c4SBeni Lev 
45014e8a3c4SBeni Lev DEFINE_EVENT(key_handle, rdev_del_key,
45114e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
45214e8a3c4SBeni Lev 		 bool pairwise, const u8 *mac_addr),
45314e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
45414e8a3c4SBeni Lev );
45514e8a3c4SBeni Lev 
4566cdd3979SAlexander Wetzel TRACE_EVENT(rdev_add_key,
4576cdd3979SAlexander Wetzel 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
4586cdd3979SAlexander Wetzel 		 bool pairwise, const u8 *mac_addr, u8 mode),
4596cdd3979SAlexander Wetzel 	TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr, mode),
4606cdd3979SAlexander Wetzel 	TP_STRUCT__entry(
4616cdd3979SAlexander Wetzel 		WIPHY_ENTRY
4626cdd3979SAlexander Wetzel 		NETDEV_ENTRY
4636cdd3979SAlexander Wetzel 		MAC_ENTRY(mac_addr)
4646cdd3979SAlexander Wetzel 		__field(u8, key_index)
4656cdd3979SAlexander Wetzel 		__field(bool, pairwise)
4666cdd3979SAlexander Wetzel 		__field(u8, mode)
4676cdd3979SAlexander Wetzel 	),
4686cdd3979SAlexander Wetzel 	TP_fast_assign(
4696cdd3979SAlexander Wetzel 		WIPHY_ASSIGN;
4706cdd3979SAlexander Wetzel 		NETDEV_ASSIGN;
4716cdd3979SAlexander Wetzel 		MAC_ASSIGN(mac_addr, mac_addr);
4726cdd3979SAlexander Wetzel 		__entry->key_index = key_index;
4736cdd3979SAlexander Wetzel 		__entry->pairwise = pairwise;
4746cdd3979SAlexander Wetzel 		__entry->mode = mode;
4756cdd3979SAlexander Wetzel 	),
4766cdd3979SAlexander Wetzel 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key_index: %u, "
4776cdd3979SAlexander Wetzel 		  "mode: %u, pairwise: %s, mac addr: " MAC_PR_FMT,
4786cdd3979SAlexander Wetzel 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
4796cdd3979SAlexander Wetzel 		  __entry->mode, BOOL_TO_STR(__entry->pairwise),
4806cdd3979SAlexander Wetzel 		  MAC_PR_ARG(mac_addr))
4816cdd3979SAlexander Wetzel );
4826cdd3979SAlexander Wetzel 
48314e8a3c4SBeni Lev TRACE_EVENT(rdev_set_default_key,
48414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
48514e8a3c4SBeni Lev 		 bool unicast, bool multicast),
48614e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, key_index, unicast, multicast),
48714e8a3c4SBeni Lev 	TP_STRUCT__entry(
48814e8a3c4SBeni Lev 		WIPHY_ENTRY
48914e8a3c4SBeni Lev 		NETDEV_ENTRY
49014e8a3c4SBeni Lev 		__field(u8, key_index)
49114e8a3c4SBeni Lev 		__field(bool, unicast)
49214e8a3c4SBeni Lev 		__field(bool, multicast)
49314e8a3c4SBeni Lev 	),
49414e8a3c4SBeni Lev 	TP_fast_assign(
49514e8a3c4SBeni Lev 		WIPHY_ASSIGN;
49614e8a3c4SBeni Lev 		NETDEV_ASSIGN;
49714e8a3c4SBeni Lev 		__entry->key_index = key_index;
49814e8a3c4SBeni Lev 		__entry->unicast = unicast;
49914e8a3c4SBeni Lev 		__entry->multicast = multicast;
50014e8a3c4SBeni Lev 	),
501ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u, unicast: %s, multicast: %s",
50214e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
50314e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->unicast),
50414e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->multicast))
50514e8a3c4SBeni Lev );
50614e8a3c4SBeni Lev 
50714e8a3c4SBeni Lev TRACE_EVENT(rdev_set_default_mgmt_key,
50814e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
50914e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, key_index),
51014e8a3c4SBeni Lev 	TP_STRUCT__entry(
51114e8a3c4SBeni Lev 		WIPHY_ENTRY
51214e8a3c4SBeni Lev 		NETDEV_ENTRY
51314e8a3c4SBeni Lev 		__field(u8, key_index)
51414e8a3c4SBeni Lev 	),
51514e8a3c4SBeni Lev 	TP_fast_assign(
51614e8a3c4SBeni Lev 		WIPHY_ASSIGN;
51714e8a3c4SBeni Lev 		NETDEV_ASSIGN;
51814e8a3c4SBeni Lev 		__entry->key_index = key_index;
51914e8a3c4SBeni Lev 	),
520ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
52114e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
52214e8a3c4SBeni Lev );
52314e8a3c4SBeni Lev 
52456be393fSJouni Malinen TRACE_EVENT(rdev_set_default_beacon_key,
52556be393fSJouni Malinen 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
52656be393fSJouni Malinen 	TP_ARGS(wiphy, netdev, key_index),
52756be393fSJouni Malinen 	TP_STRUCT__entry(
52856be393fSJouni Malinen 		WIPHY_ENTRY
52956be393fSJouni Malinen 		NETDEV_ENTRY
53056be393fSJouni Malinen 		__field(u8, key_index)
53156be393fSJouni Malinen 	),
53256be393fSJouni Malinen 	TP_fast_assign(
53356be393fSJouni Malinen 		WIPHY_ASSIGN;
53456be393fSJouni Malinen 		NETDEV_ASSIGN;
53556be393fSJouni Malinen 		__entry->key_index = key_index;
53656be393fSJouni Malinen 	),
53756be393fSJouni Malinen 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
53856be393fSJouni Malinen 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
53956be393fSJouni Malinen );
54056be393fSJouni Malinen 
54114e8a3c4SBeni Lev TRACE_EVENT(rdev_start_ap,
54214e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
54314e8a3c4SBeni Lev 		 struct cfg80211_ap_settings *settings),
54414e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, settings),
54514e8a3c4SBeni Lev 	TP_STRUCT__entry(
54614e8a3c4SBeni Lev 		WIPHY_ENTRY
54714e8a3c4SBeni Lev 		NETDEV_ENTRY
548683b6d3bSJohannes Berg 		CHAN_DEF_ENTRY
54914e8a3c4SBeni Lev 		__field(int, beacon_interval)
55014e8a3c4SBeni Lev 		__field(int, dtim_period)
55114e8a3c4SBeni Lev 		__array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
55214e8a3c4SBeni Lev 		__field(enum nl80211_hidden_ssid, hidden_ssid)
55314e8a3c4SBeni Lev 		__field(u32, wpa_ver)
55414e8a3c4SBeni Lev 		__field(bool, privacy)
55514e8a3c4SBeni Lev 		__field(enum nl80211_auth_type, auth_type)
55614e8a3c4SBeni Lev 		__field(int, inactivity_timeout)
55714e8a3c4SBeni Lev 	),
55814e8a3c4SBeni Lev 	TP_fast_assign(
55914e8a3c4SBeni Lev 		WIPHY_ASSIGN;
56014e8a3c4SBeni Lev 		NETDEV_ASSIGN;
561683b6d3bSJohannes Berg 		CHAN_DEF_ASSIGN(&settings->chandef);
56214e8a3c4SBeni Lev 		__entry->beacon_interval = settings->beacon_interval;
56314e8a3c4SBeni Lev 		__entry->dtim_period = settings->dtim_period;
56414e8a3c4SBeni Lev 		__entry->hidden_ssid = settings->hidden_ssid;
56514e8a3c4SBeni Lev 		__entry->wpa_ver = settings->crypto.wpa_versions;
56614e8a3c4SBeni Lev 		__entry->privacy = settings->privacy;
56714e8a3c4SBeni Lev 		__entry->auth_type = settings->auth_type;
56814e8a3c4SBeni Lev 		__entry->inactivity_timeout = settings->inactivity_timeout;
56914e8a3c4SBeni Lev 		memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
57014e8a3c4SBeni Lev 		memcpy(__entry->ssid, settings->ssid, settings->ssid_len);
57114e8a3c4SBeni Lev 	),
572ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", AP settings - ssid: %s, "
573683b6d3bSJohannes Berg 		  CHAN_DEF_PR_FMT ", beacon interval: %d, dtim period: %d, "
57414e8a3c4SBeni Lev 		  "hidden ssid: %d, wpa versions: %u, privacy: %s, "
57514e8a3c4SBeni Lev 		  "auth type: %d, inactivity timeout: %d",
576683b6d3bSJohannes Berg 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_DEF_PR_ARG,
57714e8a3c4SBeni Lev 		  __entry->beacon_interval, __entry->dtim_period,
57814e8a3c4SBeni Lev 		  __entry->hidden_ssid, __entry->wpa_ver,
57914e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->privacy), __entry->auth_type,
58014e8a3c4SBeni Lev 		  __entry->inactivity_timeout)
58114e8a3c4SBeni Lev );
58214e8a3c4SBeni Lev 
58314e8a3c4SBeni Lev TRACE_EVENT(rdev_change_beacon,
58414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
58514e8a3c4SBeni Lev 		 struct cfg80211_beacon_data *info),
58614e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, info),
58714e8a3c4SBeni Lev 	TP_STRUCT__entry(
58814e8a3c4SBeni Lev 		WIPHY_ENTRY
58914e8a3c4SBeni Lev 		NETDEV_ENTRY
59014e8a3c4SBeni Lev 		__dynamic_array(u8, head, info ? info->head_len : 0)
59114e8a3c4SBeni Lev 		__dynamic_array(u8, tail, info ? info->tail_len : 0)
59214e8a3c4SBeni Lev 		__dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0)
59314e8a3c4SBeni Lev 		__dynamic_array(u8, proberesp_ies,
59414e8a3c4SBeni Lev 				info ? info->proberesp_ies_len : 0)
59514e8a3c4SBeni Lev 		__dynamic_array(u8, assocresp_ies,
59614e8a3c4SBeni Lev 				info ? info->assocresp_ies_len : 0)
59714e8a3c4SBeni Lev 		__dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0)
59814e8a3c4SBeni Lev 	),
59914e8a3c4SBeni Lev 	TP_fast_assign(
60014e8a3c4SBeni Lev 		WIPHY_ASSIGN;
60114e8a3c4SBeni Lev 		NETDEV_ASSIGN;
60214e8a3c4SBeni Lev 		if (info) {
60314e8a3c4SBeni Lev 			if (info->head)
60414e8a3c4SBeni Lev 				memcpy(__get_dynamic_array(head), info->head,
60514e8a3c4SBeni Lev 				       info->head_len);
60614e8a3c4SBeni Lev 			if (info->tail)
60714e8a3c4SBeni Lev 				memcpy(__get_dynamic_array(tail), info->tail,
60814e8a3c4SBeni Lev 				       info->tail_len);
60914e8a3c4SBeni Lev 			if (info->beacon_ies)
61014e8a3c4SBeni Lev 				memcpy(__get_dynamic_array(beacon_ies),
61114e8a3c4SBeni Lev 				       info->beacon_ies, info->beacon_ies_len);
61214e8a3c4SBeni Lev 			if (info->proberesp_ies)
61314e8a3c4SBeni Lev 				memcpy(__get_dynamic_array(proberesp_ies),
61414e8a3c4SBeni Lev 				       info->proberesp_ies,
61514e8a3c4SBeni Lev 				       info->proberesp_ies_len);
61614e8a3c4SBeni Lev 			if (info->assocresp_ies)
61714e8a3c4SBeni Lev 				memcpy(__get_dynamic_array(assocresp_ies),
61814e8a3c4SBeni Lev 				       info->assocresp_ies,
61914e8a3c4SBeni Lev 				       info->assocresp_ies_len);
62014e8a3c4SBeni Lev 			if (info->probe_resp)
62114e8a3c4SBeni Lev 				memcpy(__get_dynamic_array(probe_resp),
62214e8a3c4SBeni Lev 				       info->probe_resp, info->probe_resp_len);
62314e8a3c4SBeni Lev 		}
62414e8a3c4SBeni Lev 	),
625ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
62614e8a3c4SBeni Lev );
62714e8a3c4SBeni Lev 
62814e8a3c4SBeni Lev DECLARE_EVENT_CLASS(wiphy_netdev_evt,
62914e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
63014e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev),
63114e8a3c4SBeni Lev 	TP_STRUCT__entry(
63214e8a3c4SBeni Lev 		WIPHY_ENTRY
63314e8a3c4SBeni Lev 		NETDEV_ENTRY
63414e8a3c4SBeni Lev 	),
63514e8a3c4SBeni Lev 	TP_fast_assign(
63614e8a3c4SBeni Lev 		WIPHY_ASSIGN;
63714e8a3c4SBeni Lev 		NETDEV_ASSIGN;
63814e8a3c4SBeni Lev 	),
639ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
64014e8a3c4SBeni Lev );
64114e8a3c4SBeni Lev 
64214e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_stop_ap,
64314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
64414e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
64514e8a3c4SBeni Lev );
64614e8a3c4SBeni Lev 
64714e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data,
64814e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
64914e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
65014e8a3c4SBeni Lev );
65114e8a3c4SBeni Lev 
65214e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config,
65314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
65414e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
65514e8a3c4SBeni Lev );
65614e8a3c4SBeni Lev 
65714e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh,
65814e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
65914e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
66014e8a3c4SBeni Lev );
66114e8a3c4SBeni Lev 
66214e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ibss,
66314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
66414e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
66514e8a3c4SBeni Lev );
66614e8a3c4SBeni Lev 
6676e0bd6c3SRostislav Lisovy DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ocb,
6686e0bd6c3SRostislav Lisovy 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
6696e0bd6c3SRostislav Lisovy 	TP_ARGS(wiphy, netdev)
6706e0bd6c3SRostislav Lisovy );
6716e0bd6c3SRostislav Lisovy 
67214e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa,
67314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
67414e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
67514e8a3c4SBeni Lev );
67614e8a3c4SBeni Lev 
67726ec17a1SOrr Mazor DEFINE_EVENT(wiphy_netdev_evt, rdev_end_cac,
67826ec17a1SOrr Mazor 	     TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
67926ec17a1SOrr Mazor 	     TP_ARGS(wiphy, netdev)
68026ec17a1SOrr Mazor );
68126ec17a1SOrr Mazor 
68214e8a3c4SBeni Lev DECLARE_EVENT_CLASS(station_add_change,
68314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
68414e8a3c4SBeni Lev 		 struct station_parameters *params),
68514e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac, params),
68614e8a3c4SBeni Lev 	TP_STRUCT__entry(
68714e8a3c4SBeni Lev 		WIPHY_ENTRY
68814e8a3c4SBeni Lev 		NETDEV_ENTRY
68914e8a3c4SBeni Lev 		MAC_ENTRY(sta_mac)
69014e8a3c4SBeni Lev 		__field(u32, sta_flags_mask)
69114e8a3c4SBeni Lev 		__field(u32, sta_flags_set)
69214e8a3c4SBeni Lev 		__field(u32, sta_modify_mask)
69314e8a3c4SBeni Lev 		__field(int, listen_interval)
6946e045905SJohannes Berg 		__field(u16, capability)
69514e8a3c4SBeni Lev 		__field(u16, aid)
69614e8a3c4SBeni Lev 		__field(u8, plink_action)
69714e8a3c4SBeni Lev 		__field(u8, plink_state)
69814e8a3c4SBeni Lev 		__field(u8, uapsd_queues)
6996e045905SJohannes Berg 		__field(u8, max_sp)
7006e045905SJohannes Berg 		__field(u8, opmode_notif)
7016e045905SJohannes Berg 		__field(bool, opmode_notif_used)
70214e8a3c4SBeni Lev 		__array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap))
7036e045905SJohannes Berg 		__array(u8, vht_capa, (int)sizeof(struct ieee80211_vht_cap))
7045d8325ecSJohannes Berg 		__array(char, vlan, IFNAMSIZ)
7056e045905SJohannes Berg 		__dynamic_array(u8, supported_rates,
7066e045905SJohannes Berg 				params->supported_rates_len)
7076e045905SJohannes Berg 		__dynamic_array(u8, ext_capab, params->ext_capab_len)
7086e045905SJohannes Berg 		__dynamic_array(u8, supported_channels,
7096e045905SJohannes Berg 				params->supported_channels_len)
7106e045905SJohannes Berg 		__dynamic_array(u8, supported_oper_classes,
7116e045905SJohannes Berg 				params->supported_oper_classes_len)
71214e8a3c4SBeni Lev 	),
71314e8a3c4SBeni Lev 	TP_fast_assign(
71414e8a3c4SBeni Lev 		WIPHY_ASSIGN;
71514e8a3c4SBeni Lev 		NETDEV_ASSIGN;
71614e8a3c4SBeni Lev 		MAC_ASSIGN(sta_mac, mac);
71714e8a3c4SBeni Lev 		__entry->sta_flags_mask = params->sta_flags_mask;
71814e8a3c4SBeni Lev 		__entry->sta_flags_set = params->sta_flags_set;
71914e8a3c4SBeni Lev 		__entry->sta_modify_mask = params->sta_modify_mask;
72014e8a3c4SBeni Lev 		__entry->listen_interval = params->listen_interval;
72114e8a3c4SBeni Lev 		__entry->aid = params->aid;
72214e8a3c4SBeni Lev 		__entry->plink_action = params->plink_action;
72314e8a3c4SBeni Lev 		__entry->plink_state = params->plink_state;
72414e8a3c4SBeni Lev 		__entry->uapsd_queues = params->uapsd_queues;
72514e8a3c4SBeni Lev 		memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap));
72614e8a3c4SBeni Lev 		if (params->ht_capa)
72714e8a3c4SBeni Lev 			memcpy(__entry->ht_capa, params->ht_capa,
72814e8a3c4SBeni Lev 			       sizeof(struct ieee80211_ht_cap));
7296e045905SJohannes Berg 		memset(__entry->vht_capa, 0, sizeof(struct ieee80211_vht_cap));
7306e045905SJohannes Berg 		if (params->vht_capa)
7316e045905SJohannes Berg 			memcpy(__entry->vht_capa, params->vht_capa,
7326e045905SJohannes Berg 			       sizeof(struct ieee80211_vht_cap));
7335d8325ecSJohannes Berg 		memset(__entry->vlan, 0, sizeof(__entry->vlan));
7345d8325ecSJohannes Berg 		if (params->vlan)
7355d8325ecSJohannes Berg 			memcpy(__entry->vlan, params->vlan->name, IFNAMSIZ);
7366e045905SJohannes Berg 		if (params->supported_rates && params->supported_rates_len)
7376e045905SJohannes Berg 			memcpy(__get_dynamic_array(supported_rates),
7386e045905SJohannes Berg 			       params->supported_rates,
7396e045905SJohannes Berg 			       params->supported_rates_len);
7406e045905SJohannes Berg 		if (params->ext_capab && params->ext_capab_len)
7416e045905SJohannes Berg 			memcpy(__get_dynamic_array(ext_capab),
7426e045905SJohannes Berg 			       params->ext_capab,
7436e045905SJohannes Berg 			       params->ext_capab_len);
7446e045905SJohannes Berg 		if (params->supported_channels &&
7456e045905SJohannes Berg 		    params->supported_channels_len)
7466e045905SJohannes Berg 			memcpy(__get_dynamic_array(supported_channels),
7476e045905SJohannes Berg 			       params->supported_channels,
7486e045905SJohannes Berg 			       params->supported_channels_len);
7496e045905SJohannes Berg 		if (params->supported_oper_classes &&
7506e045905SJohannes Berg 		    params->supported_oper_classes_len)
7516e045905SJohannes Berg 			memcpy(__get_dynamic_array(supported_oper_classes),
7526e045905SJohannes Berg 			       params->supported_oper_classes,
7536e045905SJohannes Berg 			       params->supported_oper_classes_len);
7546e045905SJohannes Berg 		__entry->max_sp = params->max_sp;
7556e045905SJohannes Berg 		__entry->capability = params->capability;
7566e045905SJohannes Berg 		__entry->opmode_notif = params->opmode_notif;
7576e045905SJohannes Berg 		__entry->opmode_notif_used = params->opmode_notif_used;
75814e8a3c4SBeni Lev 	),
759ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
76014e8a3c4SBeni Lev 		  ", station flags mask: %u, station flags set: %u, "
76114e8a3c4SBeni Lev 		  "station modify mask: %u, listen interval: %d, aid: %u, "
7625d8325ecSJohannes Berg 		  "plink action: %u, plink state: %u, uapsd queues: %u, vlan:%s",
76314e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
76414e8a3c4SBeni Lev 		  __entry->sta_flags_mask, __entry->sta_flags_set,
76514e8a3c4SBeni Lev 		  __entry->sta_modify_mask, __entry->listen_interval,
76614e8a3c4SBeni Lev 		  __entry->aid, __entry->plink_action, __entry->plink_state,
7675d8325ecSJohannes Berg 		  __entry->uapsd_queues, __entry->vlan)
76814e8a3c4SBeni Lev );
76914e8a3c4SBeni Lev 
77014e8a3c4SBeni Lev DEFINE_EVENT(station_add_change, rdev_add_station,
77114e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
77214e8a3c4SBeni Lev 		 struct station_parameters *params),
77314e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac, params)
77414e8a3c4SBeni Lev );
77514e8a3c4SBeni Lev 
77614e8a3c4SBeni Lev DEFINE_EVENT(station_add_change, rdev_change_station,
77714e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
77814e8a3c4SBeni Lev 		 struct station_parameters *params),
77914e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac, params)
78014e8a3c4SBeni Lev );
78114e8a3c4SBeni Lev 
78214e8a3c4SBeni Lev DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
78314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
78414e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac),
78514e8a3c4SBeni Lev 	TP_STRUCT__entry(
78614e8a3c4SBeni Lev 		WIPHY_ENTRY
78714e8a3c4SBeni Lev 		NETDEV_ENTRY
78814e8a3c4SBeni Lev 		MAC_ENTRY(sta_mac)
78914e8a3c4SBeni Lev 	),
79014e8a3c4SBeni Lev 	TP_fast_assign(
79114e8a3c4SBeni Lev 		WIPHY_ASSIGN;
79214e8a3c4SBeni Lev 		NETDEV_ASSIGN;
79314e8a3c4SBeni Lev 		MAC_ASSIGN(sta_mac, mac);
79414e8a3c4SBeni Lev 	),
795ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
79614e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac))
79714e8a3c4SBeni Lev );
79814e8a3c4SBeni Lev 
79989c771e5SJouni Malinen DECLARE_EVENT_CLASS(station_del,
80089c771e5SJouni Malinen 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
80189c771e5SJouni Malinen 		 struct station_del_parameters *params),
80289c771e5SJouni Malinen 	TP_ARGS(wiphy, netdev, params),
80389c771e5SJouni Malinen 	TP_STRUCT__entry(
80489c771e5SJouni Malinen 		WIPHY_ENTRY
80589c771e5SJouni Malinen 		NETDEV_ENTRY
80689c771e5SJouni Malinen 		MAC_ENTRY(sta_mac)
80798856866SJouni Malinen 		__field(u8, subtype)
80898856866SJouni Malinen 		__field(u16, reason_code)
80989c771e5SJouni Malinen 	),
81089c771e5SJouni Malinen 	TP_fast_assign(
81189c771e5SJouni Malinen 		WIPHY_ASSIGN;
81289c771e5SJouni Malinen 		NETDEV_ASSIGN;
81389c771e5SJouni Malinen 		MAC_ASSIGN(sta_mac, params->mac);
81498856866SJouni Malinen 		__entry->subtype = params->subtype;
81598856866SJouni Malinen 		__entry->reason_code = params->reason_code;
81689c771e5SJouni Malinen 	),
81798856866SJouni Malinen 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
81898856866SJouni Malinen 		  ", subtype: %u, reason_code: %u",
81998856866SJouni Malinen 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
82098856866SJouni Malinen 		  __entry->subtype, __entry->reason_code)
82189c771e5SJouni Malinen );
82289c771e5SJouni Malinen 
82389c771e5SJouni Malinen DEFINE_EVENT(station_del, rdev_del_station,
82489c771e5SJouni Malinen 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
82589c771e5SJouni Malinen 		 struct station_del_parameters *params),
82689c771e5SJouni Malinen 	TP_ARGS(wiphy, netdev, params)
82714e8a3c4SBeni Lev );
82814e8a3c4SBeni Lev 
82914e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station,
83014e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
83114e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac)
83214e8a3c4SBeni Lev );
83314e8a3c4SBeni Lev 
83414e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
83514e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
83614e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac)
83714e8a3c4SBeni Lev );
83814e8a3c4SBeni Lev 
83914e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer,
84014e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
84114e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac)
84214e8a3c4SBeni Lev );
84314e8a3c4SBeni Lev 
84414e8a3c4SBeni Lev TRACE_EVENT(rdev_dump_station,
845aaaa10e0SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
84614e8a3c4SBeni Lev 		 u8 *mac),
847aaaa10e0SJohannes Berg 	TP_ARGS(wiphy, netdev, _idx, mac),
84814e8a3c4SBeni Lev 	TP_STRUCT__entry(
84914e8a3c4SBeni Lev 		WIPHY_ENTRY
85014e8a3c4SBeni Lev 		NETDEV_ENTRY
85114e8a3c4SBeni Lev 		MAC_ENTRY(sta_mac)
85214e8a3c4SBeni Lev 		__field(int, idx)
85314e8a3c4SBeni Lev 	),
85414e8a3c4SBeni Lev 	TP_fast_assign(
85514e8a3c4SBeni Lev 		WIPHY_ASSIGN;
85614e8a3c4SBeni Lev 		NETDEV_ASSIGN;
85714e8a3c4SBeni Lev 		MAC_ASSIGN(sta_mac, mac);
858aaaa10e0SJohannes Berg 		__entry->idx = _idx;
85914e8a3c4SBeni Lev 	),
860ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d",
86114e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
86214e8a3c4SBeni Lev 		  __entry->idx)
86314e8a3c4SBeni Lev );
86414e8a3c4SBeni Lev 
86514e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_station_info,
86614e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo),
86714e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret, sinfo),
86814e8a3c4SBeni Lev 	TP_STRUCT__entry(
86914e8a3c4SBeni Lev 		WIPHY_ENTRY
87014e8a3c4SBeni Lev 		__field(int, ret)
87114e8a3c4SBeni Lev 		SINFO_ENTRY
87214e8a3c4SBeni Lev 	),
87314e8a3c4SBeni Lev 	TP_fast_assign(
87414e8a3c4SBeni Lev 		WIPHY_ASSIGN;
87514e8a3c4SBeni Lev 		__entry->ret = ret;
87614e8a3c4SBeni Lev 		SINFO_ASSIGN;
87714e8a3c4SBeni Lev 	),
87814e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned %d" ,
87914e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->ret)
88014e8a3c4SBeni Lev );
88114e8a3c4SBeni Lev 
88214e8a3c4SBeni Lev DECLARE_EVENT_CLASS(mpath_evt,
88314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
88414e8a3c4SBeni Lev 		 u8 *next_hop),
88514e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, dst, next_hop),
88614e8a3c4SBeni Lev 	TP_STRUCT__entry(
88714e8a3c4SBeni Lev 		WIPHY_ENTRY
88814e8a3c4SBeni Lev 		NETDEV_ENTRY
88914e8a3c4SBeni Lev 		MAC_ENTRY(dst)
89014e8a3c4SBeni Lev 		MAC_ENTRY(next_hop)
89114e8a3c4SBeni Lev 	),
89214e8a3c4SBeni Lev 	TP_fast_assign(
89314e8a3c4SBeni Lev 		WIPHY_ASSIGN;
89414e8a3c4SBeni Lev 		NETDEV_ASSIGN;
89514e8a3c4SBeni Lev 		MAC_ASSIGN(dst, dst);
89614e8a3c4SBeni Lev 		MAC_ASSIGN(next_hop, next_hop);
89714e8a3c4SBeni Lev 	),
898ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT,
89914e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst),
90014e8a3c4SBeni Lev 		  MAC_PR_ARG(next_hop))
90114e8a3c4SBeni Lev );
90214e8a3c4SBeni Lev 
90314e8a3c4SBeni Lev DEFINE_EVENT(mpath_evt, rdev_add_mpath,
90414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
90514e8a3c4SBeni Lev 		 u8 *next_hop),
90614e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, dst, next_hop)
90714e8a3c4SBeni Lev );
90814e8a3c4SBeni Lev 
90914e8a3c4SBeni Lev DEFINE_EVENT(mpath_evt, rdev_change_mpath,
91014e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
91114e8a3c4SBeni Lev 		 u8 *next_hop),
91214e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, dst, next_hop)
91314e8a3c4SBeni Lev );
91414e8a3c4SBeni Lev 
91514e8a3c4SBeni Lev DEFINE_EVENT(mpath_evt, rdev_get_mpath,
91614e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
91714e8a3c4SBeni Lev 		 u8 *next_hop),
91814e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, dst, next_hop)
91914e8a3c4SBeni Lev );
92014e8a3c4SBeni Lev 
92114e8a3c4SBeni Lev TRACE_EVENT(rdev_dump_mpath,
922aaaa10e0SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
92314e8a3c4SBeni Lev 		 u8 *dst, u8 *next_hop),
924aaaa10e0SJohannes Berg 	TP_ARGS(wiphy, netdev, _idx, dst, next_hop),
92514e8a3c4SBeni Lev 	TP_STRUCT__entry(
92614e8a3c4SBeni Lev 		WIPHY_ENTRY
92714e8a3c4SBeni Lev 		NETDEV_ENTRY
92814e8a3c4SBeni Lev 		MAC_ENTRY(dst)
92914e8a3c4SBeni Lev 		MAC_ENTRY(next_hop)
93014e8a3c4SBeni Lev 		__field(int, idx)
93114e8a3c4SBeni Lev 	),
93214e8a3c4SBeni Lev 	TP_fast_assign(
93314e8a3c4SBeni Lev 		WIPHY_ASSIGN;
93414e8a3c4SBeni Lev 		NETDEV_ASSIGN;
93514e8a3c4SBeni Lev 		MAC_ASSIGN(dst, dst);
93614e8a3c4SBeni Lev 		MAC_ASSIGN(next_hop, next_hop);
937aaaa10e0SJohannes Berg 		__entry->idx = _idx;
93814e8a3c4SBeni Lev 	),
939ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
94014e8a3c4SBeni Lev 		  MAC_PR_FMT ", next hop: " MAC_PR_FMT,
94114e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
94214e8a3c4SBeni Lev 		  MAC_PR_ARG(next_hop))
94314e8a3c4SBeni Lev );
94414e8a3c4SBeni Lev 
94566be7d2bSHenning Rogge TRACE_EVENT(rdev_get_mpp,
94666be7d2bSHenning Rogge 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
94766be7d2bSHenning Rogge 		 u8 *dst, u8 *mpp),
94866be7d2bSHenning Rogge 	TP_ARGS(wiphy, netdev, dst, mpp),
94966be7d2bSHenning Rogge 	TP_STRUCT__entry(
95066be7d2bSHenning Rogge 		WIPHY_ENTRY
95166be7d2bSHenning Rogge 		NETDEV_ENTRY
95266be7d2bSHenning Rogge 		MAC_ENTRY(dst)
95366be7d2bSHenning Rogge 		MAC_ENTRY(mpp)
95466be7d2bSHenning Rogge 	),
95566be7d2bSHenning Rogge 	TP_fast_assign(
95666be7d2bSHenning Rogge 		WIPHY_ASSIGN;
95766be7d2bSHenning Rogge 		NETDEV_ASSIGN;
95866be7d2bSHenning Rogge 		MAC_ASSIGN(dst, dst);
95966be7d2bSHenning Rogge 		MAC_ASSIGN(mpp, mpp);
96066be7d2bSHenning Rogge 	),
96166be7d2bSHenning Rogge 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT
96266be7d2bSHenning Rogge 		  ", mpp: " MAC_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG,
96366be7d2bSHenning Rogge 		  MAC_PR_ARG(dst), MAC_PR_ARG(mpp))
96466be7d2bSHenning Rogge );
96566be7d2bSHenning Rogge 
96666be7d2bSHenning Rogge TRACE_EVENT(rdev_dump_mpp,
967aaaa10e0SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
96866be7d2bSHenning Rogge 		 u8 *dst, u8 *mpp),
969aaaa10e0SJohannes Berg 	TP_ARGS(wiphy, netdev, _idx, mpp, dst),
97066be7d2bSHenning Rogge 	TP_STRUCT__entry(
97166be7d2bSHenning Rogge 		WIPHY_ENTRY
97266be7d2bSHenning Rogge 		NETDEV_ENTRY
97366be7d2bSHenning Rogge 		MAC_ENTRY(dst)
97466be7d2bSHenning Rogge 		MAC_ENTRY(mpp)
97566be7d2bSHenning Rogge 		__field(int, idx)
97666be7d2bSHenning Rogge 	),
97766be7d2bSHenning Rogge 	TP_fast_assign(
97866be7d2bSHenning Rogge 		WIPHY_ASSIGN;
97966be7d2bSHenning Rogge 		NETDEV_ASSIGN;
98066be7d2bSHenning Rogge 		MAC_ASSIGN(dst, dst);
98166be7d2bSHenning Rogge 		MAC_ASSIGN(mpp, mpp);
982aaaa10e0SJohannes Berg 		__entry->idx = _idx;
98366be7d2bSHenning Rogge 	),
98466be7d2bSHenning Rogge 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
98566be7d2bSHenning Rogge 		  MAC_PR_FMT ", mpp: " MAC_PR_FMT,
98666be7d2bSHenning Rogge 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
98766be7d2bSHenning Rogge 		  MAC_PR_ARG(mpp))
98866be7d2bSHenning Rogge );
98966be7d2bSHenning Rogge 
99014e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_mpath_info,
99114e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo),
99214e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret, pinfo),
99314e8a3c4SBeni Lev 	TP_STRUCT__entry(
99414e8a3c4SBeni Lev 		WIPHY_ENTRY
99514e8a3c4SBeni Lev 		__field(int, ret)
99614e8a3c4SBeni Lev 		__field(int, generation)
99714e8a3c4SBeni Lev 		__field(u32, filled)
99814e8a3c4SBeni Lev 		__field(u32, frame_qlen)
99914e8a3c4SBeni Lev 		__field(u32, sn)
100014e8a3c4SBeni Lev 		__field(u32, metric)
100114e8a3c4SBeni Lev 		__field(u32, exptime)
100214e8a3c4SBeni Lev 		__field(u32, discovery_timeout)
100314e8a3c4SBeni Lev 		__field(u8, discovery_retries)
100414e8a3c4SBeni Lev 		__field(u8, flags)
100514e8a3c4SBeni Lev 	),
100614e8a3c4SBeni Lev 	TP_fast_assign(
100714e8a3c4SBeni Lev 		WIPHY_ASSIGN;
100814e8a3c4SBeni Lev 		__entry->ret = ret;
100914e8a3c4SBeni Lev 		__entry->generation = pinfo->generation;
101014e8a3c4SBeni Lev 		__entry->filled = pinfo->filled;
101114e8a3c4SBeni Lev 		__entry->frame_qlen = pinfo->frame_qlen;
101214e8a3c4SBeni Lev 		__entry->sn = pinfo->sn;
101314e8a3c4SBeni Lev 		__entry->metric = pinfo->metric;
101414e8a3c4SBeni Lev 		__entry->exptime = pinfo->exptime;
101514e8a3c4SBeni Lev 		__entry->discovery_timeout = pinfo->discovery_timeout;
101614e8a3c4SBeni Lev 		__entry->discovery_retries = pinfo->discovery_retries;
101714e8a3c4SBeni Lev 		__entry->flags = pinfo->flags;
101814e8a3c4SBeni Lev 	),
101914e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, "
102014e8a3c4SBeni Lev 		  "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
102114e8a3c4SBeni Lev 		  " discovery timeout: %u, discovery retries: %u, flags: %u",
102214e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->ret, __entry->generation,
102314e8a3c4SBeni Lev 		  __entry->filled, __entry->frame_qlen, __entry->sn,
102414e8a3c4SBeni Lev 		  __entry->metric, __entry->exptime, __entry->discovery_timeout,
102514e8a3c4SBeni Lev 		  __entry->discovery_retries, __entry->flags)
102614e8a3c4SBeni Lev );
102714e8a3c4SBeni Lev 
102814e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_mesh_config,
102914e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf),
103014e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret, conf),
103114e8a3c4SBeni Lev 	TP_STRUCT__entry(
103214e8a3c4SBeni Lev 		WIPHY_ENTRY
103314e8a3c4SBeni Lev 		MESH_CFG_ENTRY
103414e8a3c4SBeni Lev 		__field(int, ret)
103514e8a3c4SBeni Lev 	),
103614e8a3c4SBeni Lev 	TP_fast_assign(
103714e8a3c4SBeni Lev 		WIPHY_ASSIGN;
103814e8a3c4SBeni Lev 		MESH_CFG_ASSIGN;
103914e8a3c4SBeni Lev 		__entry->ret = ret;
104014e8a3c4SBeni Lev 	),
104114e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned: %d",
104214e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->ret)
104314e8a3c4SBeni Lev );
104414e8a3c4SBeni Lev 
104514e8a3c4SBeni Lev TRACE_EVENT(rdev_update_mesh_config,
104614e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
104714e8a3c4SBeni Lev 		 const struct mesh_config *conf),
104814e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mask, conf),
104914e8a3c4SBeni Lev 	TP_STRUCT__entry(
105014e8a3c4SBeni Lev 		WIPHY_ENTRY
105114e8a3c4SBeni Lev 		NETDEV_ENTRY
105214e8a3c4SBeni Lev 		MESH_CFG_ENTRY
105314e8a3c4SBeni Lev 		__field(u32, mask)
105414e8a3c4SBeni Lev 	),
105514e8a3c4SBeni Lev 	TP_fast_assign(
105614e8a3c4SBeni Lev 		WIPHY_ASSIGN;
105714e8a3c4SBeni Lev 		NETDEV_ASSIGN;
105814e8a3c4SBeni Lev 		MESH_CFG_ASSIGN;
105914e8a3c4SBeni Lev 		__entry->mask = mask;
106014e8a3c4SBeni Lev 	),
1061ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u",
106214e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
106314e8a3c4SBeni Lev );
106414e8a3c4SBeni Lev 
106514e8a3c4SBeni Lev TRACE_EVENT(rdev_join_mesh,
106614e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
106714e8a3c4SBeni Lev 		 const struct mesh_config *conf,
106814e8a3c4SBeni Lev 		 const struct mesh_setup *setup),
106914e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, conf, setup),
107014e8a3c4SBeni Lev 	TP_STRUCT__entry(
107114e8a3c4SBeni Lev 		WIPHY_ENTRY
107214e8a3c4SBeni Lev 		NETDEV_ENTRY
107314e8a3c4SBeni Lev 		MESH_CFG_ENTRY
107414e8a3c4SBeni Lev 	),
107514e8a3c4SBeni Lev 	TP_fast_assign(
107614e8a3c4SBeni Lev 		WIPHY_ASSIGN;
107714e8a3c4SBeni Lev 		NETDEV_ASSIGN;
107814e8a3c4SBeni Lev 		MESH_CFG_ASSIGN;
107914e8a3c4SBeni Lev 	),
1080ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
108114e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG)
108214e8a3c4SBeni Lev );
108314e8a3c4SBeni Lev 
108414e8a3c4SBeni Lev TRACE_EVENT(rdev_change_bss,
108514e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
108614e8a3c4SBeni Lev 		 struct bss_parameters *params),
108714e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, params),
108814e8a3c4SBeni Lev 	TP_STRUCT__entry(
108914e8a3c4SBeni Lev 		WIPHY_ENTRY
109014e8a3c4SBeni Lev 		NETDEV_ENTRY
109114e8a3c4SBeni Lev 		__field(int, use_cts_prot)
109214e8a3c4SBeni Lev 		__field(int, use_short_preamble)
109314e8a3c4SBeni Lev 		__field(int, use_short_slot_time)
109414e8a3c4SBeni Lev 		__field(int, ap_isolate)
109514e8a3c4SBeni Lev 		__field(int, ht_opmode)
109614e8a3c4SBeni Lev 	),
109714e8a3c4SBeni Lev 	TP_fast_assign(
109814e8a3c4SBeni Lev 		WIPHY_ASSIGN;
109914e8a3c4SBeni Lev 		NETDEV_ASSIGN;
110014e8a3c4SBeni Lev 		__entry->use_cts_prot = params->use_cts_prot;
110114e8a3c4SBeni Lev 		__entry->use_short_preamble = params->use_short_preamble;
110214e8a3c4SBeni Lev 		__entry->use_short_slot_time = params->use_short_slot_time;
110314e8a3c4SBeni Lev 		__entry->ap_isolate = params->ap_isolate;
110414e8a3c4SBeni Lev 		__entry->ht_opmode = params->ht_opmode;
110514e8a3c4SBeni Lev 	),
1106ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, "
110714e8a3c4SBeni Lev 		  "use short preamble: %d, use short slot time: %d, "
110814e8a3c4SBeni Lev 		  "ap isolate: %d, ht opmode: %d",
110914e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot,
111014e8a3c4SBeni Lev 		  __entry->use_short_preamble, __entry->use_short_slot_time,
111114e8a3c4SBeni Lev 		  __entry->ap_isolate, __entry->ht_opmode)
111214e8a3c4SBeni Lev );
111314e8a3c4SBeni Lev 
111414e8a3c4SBeni Lev TRACE_EVENT(rdev_set_txq_params,
111514e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
111614e8a3c4SBeni Lev 		 struct ieee80211_txq_params *params),
111714e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, params),
111814e8a3c4SBeni Lev 	TP_STRUCT__entry(
111914e8a3c4SBeni Lev 		WIPHY_ENTRY
112014e8a3c4SBeni Lev 		NETDEV_ENTRY
112114e8a3c4SBeni Lev 		__field(enum nl80211_ac, ac)
112214e8a3c4SBeni Lev 		__field(u16, txop)
112314e8a3c4SBeni Lev 		__field(u16, cwmin)
112414e8a3c4SBeni Lev 		__field(u16, cwmax)
112514e8a3c4SBeni Lev 		__field(u8, aifs)
112614e8a3c4SBeni Lev 	),
112714e8a3c4SBeni Lev 	TP_fast_assign(
112814e8a3c4SBeni Lev 		WIPHY_ASSIGN;
112914e8a3c4SBeni Lev 		NETDEV_ASSIGN;
113014e8a3c4SBeni Lev 		__entry->ac = params->ac;
113114e8a3c4SBeni Lev 		__entry->txop = params->txop;
113214e8a3c4SBeni Lev 		__entry->cwmin = params->cwmin;
113314e8a3c4SBeni Lev 		__entry->cwmax = params->cwmax;
113414e8a3c4SBeni Lev 		__entry->aifs = params->aifs;
113514e8a3c4SBeni Lev 	),
1136ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u",
113714e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop,
113814e8a3c4SBeni Lev 		  __entry->cwmin, __entry->cwmax, __entry->aifs)
113914e8a3c4SBeni Lev );
114014e8a3c4SBeni Lev 
114114e8a3c4SBeni Lev TRACE_EVENT(rdev_libertas_set_mesh_channel,
114214e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
114314e8a3c4SBeni Lev 		 struct ieee80211_channel *chan),
114414e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, chan),
114514e8a3c4SBeni Lev 	TP_STRUCT__entry(
114614e8a3c4SBeni Lev 		WIPHY_ENTRY
114714e8a3c4SBeni Lev 		NETDEV_ENTRY
114814e8a3c4SBeni Lev 		CHAN_ENTRY
114914e8a3c4SBeni Lev 	),
115014e8a3c4SBeni Lev 	TP_fast_assign(
115114e8a3c4SBeni Lev 		WIPHY_ASSIGN;
115214e8a3c4SBeni Lev 		NETDEV_ASSIGN;
115314e8a3c4SBeni Lev 		CHAN_ASSIGN(chan);
115414e8a3c4SBeni Lev 	),
1155ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG,
115614e8a3c4SBeni Lev 		  NETDEV_PR_ARG, CHAN_PR_ARG)
115714e8a3c4SBeni Lev );
115814e8a3c4SBeni Lev 
115914e8a3c4SBeni Lev TRACE_EVENT(rdev_set_monitor_channel,
1160683b6d3bSJohannes Berg 	TP_PROTO(struct wiphy *wiphy,
1161683b6d3bSJohannes Berg 		 struct cfg80211_chan_def *chandef),
1162683b6d3bSJohannes Berg 	TP_ARGS(wiphy, chandef),
116314e8a3c4SBeni Lev 	TP_STRUCT__entry(
116414e8a3c4SBeni Lev 		WIPHY_ENTRY
1165683b6d3bSJohannes Berg 		CHAN_DEF_ENTRY
116614e8a3c4SBeni Lev 	),
116714e8a3c4SBeni Lev 	TP_fast_assign(
116814e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1169683b6d3bSJohannes Berg 		CHAN_DEF_ASSIGN(chandef);
117014e8a3c4SBeni Lev 	),
1171ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
1172683b6d3bSJohannes Berg 		  WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
117314e8a3c4SBeni Lev );
117414e8a3c4SBeni Lev 
117514e8a3c4SBeni Lev TRACE_EVENT(rdev_auth,
117614e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
117714e8a3c4SBeni Lev 		 struct cfg80211_auth_request *req),
117814e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, req),
117914e8a3c4SBeni Lev 	TP_STRUCT__entry(
118014e8a3c4SBeni Lev 		WIPHY_ENTRY
118114e8a3c4SBeni Lev 		NETDEV_ENTRY
118214e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
118314e8a3c4SBeni Lev 		__field(enum nl80211_auth_type, auth_type)
118414e8a3c4SBeni Lev 	),
118514e8a3c4SBeni Lev 	TP_fast_assign(
118614e8a3c4SBeni Lev 		WIPHY_ASSIGN;
118714e8a3c4SBeni Lev 		NETDEV_ASSIGN;
118814e8a3c4SBeni Lev 		if (req->bss)
118914e8a3c4SBeni Lev 			MAC_ASSIGN(bssid, req->bss->bssid);
119014e8a3c4SBeni Lev 		else
1191d2beae10SJoe Perches 			eth_zero_addr(__entry->bssid);
119214e8a3c4SBeni Lev 		__entry->auth_type = req->auth_type;
119314e8a3c4SBeni Lev 	),
1194ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT,
119514e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type,
119614e8a3c4SBeni Lev 		  MAC_PR_ARG(bssid))
119714e8a3c4SBeni Lev );
119814e8a3c4SBeni Lev 
119914e8a3c4SBeni Lev TRACE_EVENT(rdev_assoc,
120014e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
120114e8a3c4SBeni Lev 		 struct cfg80211_assoc_request *req),
120214e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, req),
120314e8a3c4SBeni Lev 	TP_STRUCT__entry(
120414e8a3c4SBeni Lev 		WIPHY_ENTRY
120514e8a3c4SBeni Lev 		NETDEV_ENTRY
120614e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
120714e8a3c4SBeni Lev 		MAC_ENTRY(prev_bssid)
120814e8a3c4SBeni Lev 		__field(bool, use_mfp)
120914e8a3c4SBeni Lev 		__field(u32, flags)
121014e8a3c4SBeni Lev 	),
121114e8a3c4SBeni Lev 	TP_fast_assign(
121214e8a3c4SBeni Lev 		WIPHY_ASSIGN;
121314e8a3c4SBeni Lev 		NETDEV_ASSIGN;
121414e8a3c4SBeni Lev 		if (req->bss)
121514e8a3c4SBeni Lev 			MAC_ASSIGN(bssid, req->bss->bssid);
121614e8a3c4SBeni Lev 		else
1217d2beae10SJoe Perches 			eth_zero_addr(__entry->bssid);
121814e8a3c4SBeni Lev 		MAC_ASSIGN(prev_bssid, req->prev_bssid);
121914e8a3c4SBeni Lev 		__entry->use_mfp = req->use_mfp;
122014e8a3c4SBeni Lev 		__entry->flags = req->flags;
122114e8a3c4SBeni Lev 	),
1222ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
122314e8a3c4SBeni Lev 		  ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u",
122414e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
122514e8a3c4SBeni Lev 		  MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp),
122614e8a3c4SBeni Lev 		  __entry->flags)
122714e8a3c4SBeni Lev );
122814e8a3c4SBeni Lev 
122914e8a3c4SBeni Lev TRACE_EVENT(rdev_deauth,
123014e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
123114e8a3c4SBeni Lev 		 struct cfg80211_deauth_request *req),
123214e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, req),
123314e8a3c4SBeni Lev 	TP_STRUCT__entry(
123414e8a3c4SBeni Lev 		WIPHY_ENTRY
123514e8a3c4SBeni Lev 		NETDEV_ENTRY
123614e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
123714e8a3c4SBeni Lev 		__field(u16, reason_code)
123814e8a3c4SBeni Lev 	),
123914e8a3c4SBeni Lev 	TP_fast_assign(
124014e8a3c4SBeni Lev 		WIPHY_ASSIGN;
124114e8a3c4SBeni Lev 		NETDEV_ASSIGN;
124214e8a3c4SBeni Lev 		MAC_ASSIGN(bssid, req->bssid);
124314e8a3c4SBeni Lev 		__entry->reason_code = req->reason_code;
124414e8a3c4SBeni Lev 	),
1245ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u",
124614e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
124714e8a3c4SBeni Lev 		  __entry->reason_code)
124814e8a3c4SBeni Lev );
124914e8a3c4SBeni Lev 
125014e8a3c4SBeni Lev TRACE_EVENT(rdev_disassoc,
125114e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
125214e8a3c4SBeni Lev 		 struct cfg80211_disassoc_request *req),
125314e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, req),
125414e8a3c4SBeni Lev 	TP_STRUCT__entry(
125514e8a3c4SBeni Lev 		WIPHY_ENTRY
125614e8a3c4SBeni Lev 		NETDEV_ENTRY
125714e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
125814e8a3c4SBeni Lev 		__field(u16, reason_code)
125914e8a3c4SBeni Lev 		__field(bool, local_state_change)
126014e8a3c4SBeni Lev 	),
126114e8a3c4SBeni Lev 	TP_fast_assign(
126214e8a3c4SBeni Lev 		WIPHY_ASSIGN;
126314e8a3c4SBeni Lev 		NETDEV_ASSIGN;
126414e8a3c4SBeni Lev 		if (req->bss)
126514e8a3c4SBeni Lev 			MAC_ASSIGN(bssid, req->bss->bssid);
126614e8a3c4SBeni Lev 		else
1267d2beae10SJoe Perches 			eth_zero_addr(__entry->bssid);
126814e8a3c4SBeni Lev 		__entry->reason_code = req->reason_code;
126914e8a3c4SBeni Lev 		__entry->local_state_change = req->local_state_change;
127014e8a3c4SBeni Lev 	),
1271ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
127214e8a3c4SBeni Lev 		  ", reason: %u, local state change: %s",
127314e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
127414e8a3c4SBeni Lev 		  __entry->reason_code,
127514e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->local_state_change))
127614e8a3c4SBeni Lev );
127714e8a3c4SBeni Lev 
127814e8a3c4SBeni Lev TRACE_EVENT(rdev_mgmt_tx_cancel_wait,
127914e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy,
128014e8a3c4SBeni Lev 		 struct wireless_dev *wdev, u64 cookie),
128114e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev, cookie),
128214e8a3c4SBeni Lev 	TP_STRUCT__entry(
128314e8a3c4SBeni Lev 		WIPHY_ENTRY
128414e8a3c4SBeni Lev 		WDEV_ENTRY
128514e8a3c4SBeni Lev 		__field(u64, cookie)
128614e8a3c4SBeni Lev 	),
128714e8a3c4SBeni Lev 	TP_fast_assign(
128814e8a3c4SBeni Lev 		WIPHY_ASSIGN;
128914e8a3c4SBeni Lev 		WDEV_ASSIGN;
129014e8a3c4SBeni Lev 		__entry->cookie = cookie;
129114e8a3c4SBeni Lev 	),
1292ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ",
129314e8a3c4SBeni Lev 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
129414e8a3c4SBeni Lev );
129514e8a3c4SBeni Lev 
129614e8a3c4SBeni Lev TRACE_EVENT(rdev_set_power_mgmt,
129714e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
129814e8a3c4SBeni Lev 		 bool enabled, int timeout),
129914e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, enabled, timeout),
130014e8a3c4SBeni Lev 	TP_STRUCT__entry(
130114e8a3c4SBeni Lev 		WIPHY_ENTRY
130214e8a3c4SBeni Lev 		NETDEV_ENTRY
130314e8a3c4SBeni Lev 		__field(bool, enabled)
130414e8a3c4SBeni Lev 		__field(int, timeout)
130514e8a3c4SBeni Lev 	),
130614e8a3c4SBeni Lev 	TP_fast_assign(
130714e8a3c4SBeni Lev 		WIPHY_ASSIGN;
130814e8a3c4SBeni Lev 		NETDEV_ASSIGN;
130914e8a3c4SBeni Lev 		__entry->enabled = enabled;
131014e8a3c4SBeni Lev 		__entry->timeout = timeout;
131114e8a3c4SBeni Lev 	),
1312ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ",
131314e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG,
131414e8a3c4SBeni Lev 		  __entry->enabled ? "" : "not ", __entry->timeout)
131514e8a3c4SBeni Lev );
131614e8a3c4SBeni Lev 
131714e8a3c4SBeni Lev TRACE_EVENT(rdev_connect,
131814e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
131914e8a3c4SBeni Lev 		 struct cfg80211_connect_params *sme),
132014e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, sme),
132114e8a3c4SBeni Lev 	TP_STRUCT__entry(
132214e8a3c4SBeni Lev 		WIPHY_ENTRY
132314e8a3c4SBeni Lev 		NETDEV_ENTRY
132414e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
132514e8a3c4SBeni Lev 		__array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
132614e8a3c4SBeni Lev 		__field(enum nl80211_auth_type, auth_type)
132714e8a3c4SBeni Lev 		__field(bool, privacy)
132814e8a3c4SBeni Lev 		__field(u32, wpa_versions)
132914e8a3c4SBeni Lev 		__field(u32, flags)
1330ba6fbacfSJouni Malinen 		MAC_ENTRY(prev_bssid)
133114e8a3c4SBeni Lev 	),
133214e8a3c4SBeni Lev 	TP_fast_assign(
133314e8a3c4SBeni Lev 		WIPHY_ASSIGN;
133414e8a3c4SBeni Lev 		NETDEV_ASSIGN;
133514e8a3c4SBeni Lev 		MAC_ASSIGN(bssid, sme->bssid);
133614e8a3c4SBeni Lev 		memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
133714e8a3c4SBeni Lev 		memcpy(__entry->ssid, sme->ssid, sme->ssid_len);
133814e8a3c4SBeni Lev 		__entry->auth_type = sme->auth_type;
133914e8a3c4SBeni Lev 		__entry->privacy = sme->privacy;
134014e8a3c4SBeni Lev 		__entry->wpa_versions = sme->crypto.wpa_versions;
134114e8a3c4SBeni Lev 		__entry->flags = sme->flags;
1342ba6fbacfSJouni Malinen 		MAC_ASSIGN(prev_bssid, sme->prev_bssid);
134314e8a3c4SBeni Lev 	),
1344ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
134514e8a3c4SBeni Lev 		  ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
1346ba6fbacfSJouni Malinen 		  "flags: %u, previous bssid: " MAC_PR_FMT,
134714e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid,
134814e8a3c4SBeni Lev 		  __entry->auth_type, BOOL_TO_STR(__entry->privacy),
1349ba6fbacfSJouni Malinen 		  __entry->wpa_versions, __entry->flags, MAC_PR_ARG(prev_bssid))
135014e8a3c4SBeni Lev );
135114e8a3c4SBeni Lev 
1352088e8df8Svamsi krishna TRACE_EVENT(rdev_update_connect_params,
1353088e8df8Svamsi krishna 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1354088e8df8Svamsi krishna 		 struct cfg80211_connect_params *sme, u32 changed),
1355088e8df8Svamsi krishna 	TP_ARGS(wiphy, netdev, sme, changed),
1356088e8df8Svamsi krishna 	TP_STRUCT__entry(
1357088e8df8Svamsi krishna 		WIPHY_ENTRY
1358088e8df8Svamsi krishna 		NETDEV_ENTRY
1359088e8df8Svamsi krishna 		__field(u32, changed)
1360088e8df8Svamsi krishna 	),
1361088e8df8Svamsi krishna 	TP_fast_assign(
1362088e8df8Svamsi krishna 		WIPHY_ASSIGN;
1363088e8df8Svamsi krishna 		NETDEV_ASSIGN;
1364088e8df8Svamsi krishna 		__entry->changed = changed;
1365088e8df8Svamsi krishna 	),
1366088e8df8Svamsi krishna 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", parameters changed: %u",
1367088e8df8Svamsi krishna 		  WIPHY_PR_ARG, NETDEV_PR_ARG,  __entry->changed)
1368088e8df8Svamsi krishna );
1369088e8df8Svamsi krishna 
137014e8a3c4SBeni Lev TRACE_EVENT(rdev_set_cqm_rssi_config,
137114e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy,
137214e8a3c4SBeni Lev 		 struct net_device *netdev, s32 rssi_thold,
137314e8a3c4SBeni Lev 		 u32 rssi_hyst),
137414e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
137514e8a3c4SBeni Lev 	TP_STRUCT__entry(
137614e8a3c4SBeni Lev 		WIPHY_ENTRY
137714e8a3c4SBeni Lev 		NETDEV_ENTRY
137814e8a3c4SBeni Lev 		__field(s32, rssi_thold)
137914e8a3c4SBeni Lev 		__field(u32, rssi_hyst)
138014e8a3c4SBeni Lev 	),
138114e8a3c4SBeni Lev 	TP_fast_assign(
138214e8a3c4SBeni Lev 		WIPHY_ASSIGN;
138314e8a3c4SBeni Lev 		NETDEV_ASSIGN;
138414e8a3c4SBeni Lev 		__entry->rssi_thold = rssi_thold;
138514e8a3c4SBeni Lev 		__entry->rssi_hyst = rssi_hyst;
138614e8a3c4SBeni Lev 	),
1387ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
138814e8a3c4SBeni Lev 		  ", rssi_thold: %d, rssi_hyst: %u ",
138914e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG,
139014e8a3c4SBeni Lev 		 __entry->rssi_thold, __entry->rssi_hyst)
139114e8a3c4SBeni Lev );
139214e8a3c4SBeni Lev 
13934a4b8169SAndrew Zaborowski TRACE_EVENT(rdev_set_cqm_rssi_range_config,
13944a4b8169SAndrew Zaborowski 	TP_PROTO(struct wiphy *wiphy,
13954a4b8169SAndrew Zaborowski 		 struct net_device *netdev, s32 low, s32 high),
13964a4b8169SAndrew Zaborowski 	TP_ARGS(wiphy, netdev, low, high),
13974a4b8169SAndrew Zaborowski 	TP_STRUCT__entry(
13984a4b8169SAndrew Zaborowski 		WIPHY_ENTRY
13994a4b8169SAndrew Zaborowski 		NETDEV_ENTRY
14004a4b8169SAndrew Zaborowski 		__field(s32, rssi_low)
14014a4b8169SAndrew Zaborowski 		__field(s32, rssi_high)
14024a4b8169SAndrew Zaborowski 	),
14034a4b8169SAndrew Zaborowski 	TP_fast_assign(
14044a4b8169SAndrew Zaborowski 		WIPHY_ASSIGN;
14054a4b8169SAndrew Zaborowski 		NETDEV_ASSIGN;
14064a4b8169SAndrew Zaborowski 		__entry->rssi_low = low;
14074a4b8169SAndrew Zaborowski 		__entry->rssi_high = high;
14084a4b8169SAndrew Zaborowski 	),
14094a4b8169SAndrew Zaborowski 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
14104a4b8169SAndrew Zaborowski 		  ", range: %d - %d ",
14114a4b8169SAndrew Zaborowski 		  WIPHY_PR_ARG, NETDEV_PR_ARG,
14124a4b8169SAndrew Zaborowski 		  __entry->rssi_low, __entry->rssi_high)
14134a4b8169SAndrew Zaborowski );
14144a4b8169SAndrew Zaborowski 
141514e8a3c4SBeni Lev TRACE_EVENT(rdev_set_cqm_txe_config,
141614e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
141714e8a3c4SBeni Lev 		 u32 pkts, u32 intvl),
141814e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, rate, pkts, intvl),
141914e8a3c4SBeni Lev 	TP_STRUCT__entry(
142014e8a3c4SBeni Lev 		WIPHY_ENTRY
142114e8a3c4SBeni Lev 		NETDEV_ENTRY
142214e8a3c4SBeni Lev 		__field(u32, rate)
142314e8a3c4SBeni Lev 		__field(u32, pkts)
142414e8a3c4SBeni Lev 		__field(u32, intvl)
142514e8a3c4SBeni Lev 	),
142614e8a3c4SBeni Lev 	TP_fast_assign(
142714e8a3c4SBeni Lev 		WIPHY_ASSIGN;
142814e8a3c4SBeni Lev 		NETDEV_ASSIGN;
142914e8a3c4SBeni Lev 		__entry->rate = rate;
143014e8a3c4SBeni Lev 		__entry->pkts = pkts;
143114e8a3c4SBeni Lev 		__entry->intvl = intvl;
143214e8a3c4SBeni Lev 	),
1433ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
143414e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
143514e8a3c4SBeni Lev 		  __entry->intvl)
143614e8a3c4SBeni Lev );
143714e8a3c4SBeni Lev 
143814e8a3c4SBeni Lev TRACE_EVENT(rdev_disconnect,
143914e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
144014e8a3c4SBeni Lev 		 u16 reason_code),
144114e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, reason_code),
144214e8a3c4SBeni Lev 	TP_STRUCT__entry(
144314e8a3c4SBeni Lev 		WIPHY_ENTRY
144414e8a3c4SBeni Lev 		NETDEV_ENTRY
144514e8a3c4SBeni Lev 		__field(u16, reason_code)
144614e8a3c4SBeni Lev 	),
144714e8a3c4SBeni Lev 	TP_fast_assign(
144814e8a3c4SBeni Lev 		WIPHY_ASSIGN;
144914e8a3c4SBeni Lev 		NETDEV_ASSIGN;
145014e8a3c4SBeni Lev 		__entry->reason_code = reason_code;
145114e8a3c4SBeni Lev 	),
1452ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
145314e8a3c4SBeni Lev 		  NETDEV_PR_ARG, __entry->reason_code)
145414e8a3c4SBeni Lev );
145514e8a3c4SBeni Lev 
145614e8a3c4SBeni Lev TRACE_EVENT(rdev_join_ibss,
145714e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
145814e8a3c4SBeni Lev 		 struct cfg80211_ibss_params *params),
145914e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, params),
146014e8a3c4SBeni Lev 	TP_STRUCT__entry(
146114e8a3c4SBeni Lev 		WIPHY_ENTRY
146214e8a3c4SBeni Lev 		NETDEV_ENTRY
146314e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
146414e8a3c4SBeni Lev 		__array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
146514e8a3c4SBeni Lev 	),
146614e8a3c4SBeni Lev 	TP_fast_assign(
146714e8a3c4SBeni Lev 		WIPHY_ASSIGN;
146814e8a3c4SBeni Lev 		NETDEV_ASSIGN;
146914e8a3c4SBeni Lev 		MAC_ASSIGN(bssid, params->bssid);
147014e8a3c4SBeni Lev 		memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
147114e8a3c4SBeni Lev 		memcpy(__entry->ssid, params->ssid, params->ssid_len);
147214e8a3c4SBeni Lev 	),
1473ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s",
147414e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid)
147514e8a3c4SBeni Lev );
147614e8a3c4SBeni Lev 
14776e0bd6c3SRostislav Lisovy TRACE_EVENT(rdev_join_ocb,
14786e0bd6c3SRostislav Lisovy 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
14796e0bd6c3SRostislav Lisovy 		 const struct ocb_setup *setup),
14806e0bd6c3SRostislav Lisovy 	TP_ARGS(wiphy, netdev, setup),
14816e0bd6c3SRostislav Lisovy 	TP_STRUCT__entry(
14826e0bd6c3SRostislav Lisovy 		WIPHY_ENTRY
14836e0bd6c3SRostislav Lisovy 		NETDEV_ENTRY
14846e0bd6c3SRostislav Lisovy 	),
14856e0bd6c3SRostislav Lisovy 	TP_fast_assign(
14866e0bd6c3SRostislav Lisovy 		WIPHY_ASSIGN;
14876e0bd6c3SRostislav Lisovy 		NETDEV_ASSIGN;
14886e0bd6c3SRostislav Lisovy 	),
14896e0bd6c3SRostislav Lisovy 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
14906e0bd6c3SRostislav Lisovy 		  WIPHY_PR_ARG, NETDEV_PR_ARG)
14916e0bd6c3SRostislav Lisovy );
14926e0bd6c3SRostislav Lisovy 
149314e8a3c4SBeni Lev TRACE_EVENT(rdev_set_wiphy_params,
149414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, u32 changed),
149514e8a3c4SBeni Lev 	TP_ARGS(wiphy, changed),
149614e8a3c4SBeni Lev 	TP_STRUCT__entry(
149714e8a3c4SBeni Lev 		WIPHY_ENTRY
149814e8a3c4SBeni Lev 		__field(u32, changed)
149914e8a3c4SBeni Lev 	),
150014e8a3c4SBeni Lev 	TP_fast_assign(
150114e8a3c4SBeni Lev 		WIPHY_ASSIGN;
150214e8a3c4SBeni Lev 		__entry->changed = changed;
150314e8a3c4SBeni Lev 	),
150414e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", changed: %u",
150514e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->changed)
150614e8a3c4SBeni Lev );
150714e8a3c4SBeni Lev 
1508c8442118SJohannes Berg DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power,
1509c8442118SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1510c8442118SJohannes Berg 	TP_ARGS(wiphy, wdev)
1511c8442118SJohannes Berg );
1512c8442118SJohannes Berg 
151314e8a3c4SBeni Lev TRACE_EVENT(rdev_set_tx_power,
1514c8442118SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1515c8442118SJohannes Berg 		 enum nl80211_tx_power_setting type, int mbm),
1516c8442118SJohannes Berg 	TP_ARGS(wiphy, wdev, type, mbm),
151714e8a3c4SBeni Lev 	TP_STRUCT__entry(
151814e8a3c4SBeni Lev 		WIPHY_ENTRY
1519c8442118SJohannes Berg 		WDEV_ENTRY
152014e8a3c4SBeni Lev 		__field(enum nl80211_tx_power_setting, type)
152114e8a3c4SBeni Lev 		__field(int, mbm)
152214e8a3c4SBeni Lev 	),
152314e8a3c4SBeni Lev 	TP_fast_assign(
152414e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1525c8442118SJohannes Berg 		WDEV_ASSIGN;
152614e8a3c4SBeni Lev 		__entry->type = type;
152714e8a3c4SBeni Lev 		__entry->mbm = mbm;
152814e8a3c4SBeni Lev 	),
1529ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
1530c8442118SJohannes Berg 		  WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
153114e8a3c4SBeni Lev );
153214e8a3c4SBeni Lev 
153314e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_int,
153414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
153514e8a3c4SBeni Lev 	TP_ARGS(wiphy, func_ret, func_fill),
153614e8a3c4SBeni Lev 	TP_STRUCT__entry(
153714e8a3c4SBeni Lev 		WIPHY_ENTRY
153814e8a3c4SBeni Lev 		__field(int, func_ret)
153914e8a3c4SBeni Lev 		__field(int, func_fill)
154014e8a3c4SBeni Lev 	),
154114e8a3c4SBeni Lev 	TP_fast_assign(
154214e8a3c4SBeni Lev 		WIPHY_ASSIGN;
154314e8a3c4SBeni Lev 		__entry->func_ret = func_ret;
154414e8a3c4SBeni Lev 		__entry->func_fill = func_fill;
154514e8a3c4SBeni Lev 	),
154614e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
154714e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
154814e8a3c4SBeni Lev );
154914e8a3c4SBeni Lev 
155014e8a3c4SBeni Lev #ifdef CONFIG_NL80211_TESTMODE
155114e8a3c4SBeni Lev TRACE_EVENT(rdev_testmode_cmd,
1552fc73f11fSDavid Spinadel 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1553fc73f11fSDavid Spinadel 	TP_ARGS(wiphy, wdev),
155414e8a3c4SBeni Lev 	TP_STRUCT__entry(
155514e8a3c4SBeni Lev 		WIPHY_ENTRY
1556fc73f11fSDavid Spinadel 		WDEV_ENTRY
155714e8a3c4SBeni Lev 	),
155814e8a3c4SBeni Lev 	TP_fast_assign(
155914e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1560fc73f11fSDavid Spinadel 		WDEV_ASSIGN;
156114e8a3c4SBeni Lev 	),
1562fc73f11fSDavid Spinadel 	TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
156314e8a3c4SBeni Lev );
156414e8a3c4SBeni Lev 
156514e8a3c4SBeni Lev TRACE_EVENT(rdev_testmode_dump,
156614e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
156714e8a3c4SBeni Lev 	TP_ARGS(wiphy),
156814e8a3c4SBeni Lev 	TP_STRUCT__entry(
156914e8a3c4SBeni Lev 		WIPHY_ENTRY
157014e8a3c4SBeni Lev 	),
157114e8a3c4SBeni Lev 	TP_fast_assign(
157214e8a3c4SBeni Lev 		WIPHY_ASSIGN;
157314e8a3c4SBeni Lev 	),
157414e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
157514e8a3c4SBeni Lev );
157614e8a3c4SBeni Lev #endif /* CONFIG_NL80211_TESTMODE */
157714e8a3c4SBeni Lev 
157814e8a3c4SBeni Lev TRACE_EVENT(rdev_set_bitrate_mask,
157914e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
158014e8a3c4SBeni Lev 		 const u8 *peer, const struct cfg80211_bitrate_mask *mask),
158114e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, peer, mask),
158214e8a3c4SBeni Lev 	TP_STRUCT__entry(
158314e8a3c4SBeni Lev 		WIPHY_ENTRY
158414e8a3c4SBeni Lev 		NETDEV_ENTRY
158514e8a3c4SBeni Lev 		MAC_ENTRY(peer)
158614e8a3c4SBeni Lev 	),
158714e8a3c4SBeni Lev 	TP_fast_assign(
158814e8a3c4SBeni Lev 		WIPHY_ASSIGN;
158914e8a3c4SBeni Lev 		NETDEV_ASSIGN;
159014e8a3c4SBeni Lev 		MAC_ASSIGN(peer, peer);
159114e8a3c4SBeni Lev 	),
1592ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
159314e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
159414e8a3c4SBeni Lev );
159514e8a3c4SBeni Lev 
15966cd536feSJohannes Berg TRACE_EVENT(rdev_update_mgmt_frame_registrations,
159714e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
15986cd536feSJohannes Berg 		 struct mgmt_frame_regs *upd),
15996cd536feSJohannes Berg 	TP_ARGS(wiphy, wdev, upd),
160014e8a3c4SBeni Lev 	TP_STRUCT__entry(
160114e8a3c4SBeni Lev 		WIPHY_ENTRY
160214e8a3c4SBeni Lev 		WDEV_ENTRY
16036cd536feSJohannes Berg 		__field(u16, global_stypes)
16046cd536feSJohannes Berg 		__field(u16, interface_stypes)
160514e8a3c4SBeni Lev 	),
160614e8a3c4SBeni Lev 	TP_fast_assign(
160714e8a3c4SBeni Lev 		WIPHY_ASSIGN;
160814e8a3c4SBeni Lev 		WDEV_ASSIGN;
16096cd536feSJohannes Berg 		__entry->global_stypes = upd->global_stypes;
16106cd536feSJohannes Berg 		__entry->interface_stypes = upd->interface_stypes;
161114e8a3c4SBeni Lev 	),
16126cd536feSJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", global: 0x%.2x, intf: 0x%.2x",
16136cd536feSJohannes Berg 		  WIPHY_PR_ARG, WDEV_PR_ARG,
16146cd536feSJohannes Berg 		  __entry->global_stypes, __entry->interface_stypes)
161514e8a3c4SBeni Lev );
161614e8a3c4SBeni Lev 
161714e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_tx_rx,
161814e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
161914e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret, tx, rx),
162014e8a3c4SBeni Lev 	TP_STRUCT__entry(
162114e8a3c4SBeni Lev 		WIPHY_ENTRY
162214e8a3c4SBeni Lev 		__field(int, ret)
162314e8a3c4SBeni Lev 		__field(u32, tx)
162414e8a3c4SBeni Lev 		__field(u32, rx)
162514e8a3c4SBeni Lev 	),
162614e8a3c4SBeni Lev 	TP_fast_assign(
162714e8a3c4SBeni Lev 		WIPHY_ASSIGN;
162814e8a3c4SBeni Lev 		__entry->ret = ret;
162914e8a3c4SBeni Lev 		__entry->tx = tx;
163014e8a3c4SBeni Lev 		__entry->rx = rx;
163114e8a3c4SBeni Lev 	),
163214e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
163314e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
163414e8a3c4SBeni Lev );
163514e8a3c4SBeni Lev 
163614e8a3c4SBeni Lev TRACE_EVENT(rdev_return_void_tx_rx,
163714e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
163814e8a3c4SBeni Lev 		 u32 rx, u32 rx_max),
163914e8a3c4SBeni Lev 	TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
164014e8a3c4SBeni Lev 	TP_STRUCT__entry(
164114e8a3c4SBeni Lev 		WIPHY_ENTRY
164214e8a3c4SBeni Lev 		__field(u32, tx)
164314e8a3c4SBeni Lev 		__field(u32, tx_max)
164414e8a3c4SBeni Lev 		__field(u32, rx)
164514e8a3c4SBeni Lev 		__field(u32, rx_max)
164614e8a3c4SBeni Lev 	),
164714e8a3c4SBeni Lev 	TP_fast_assign(
164814e8a3c4SBeni Lev 		WIPHY_ASSIGN;
164914e8a3c4SBeni Lev 		__entry->tx = tx;
165014e8a3c4SBeni Lev 		__entry->tx_max = tx_max;
165114e8a3c4SBeni Lev 		__entry->rx = rx;
165214e8a3c4SBeni Lev 		__entry->rx_max = rx_max;
165314e8a3c4SBeni Lev 	),
165414e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
165514e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
165614e8a3c4SBeni Lev 		  __entry->rx_max)
165714e8a3c4SBeni Lev );
165814e8a3c4SBeni Lev 
165914e8a3c4SBeni Lev DECLARE_EVENT_CLASS(tx_rx_evt,
166014e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
166114e8a3c4SBeni Lev 	TP_ARGS(wiphy, rx, tx),
166214e8a3c4SBeni Lev 	TP_STRUCT__entry(
166314e8a3c4SBeni Lev 		WIPHY_ENTRY
166414e8a3c4SBeni Lev 		__field(u32, tx)
166514e8a3c4SBeni Lev 		__field(u32, rx)
166614e8a3c4SBeni Lev 	),
166714e8a3c4SBeni Lev 	TP_fast_assign(
166814e8a3c4SBeni Lev 		WIPHY_ASSIGN;
166914e8a3c4SBeni Lev 		__entry->tx = tx;
167014e8a3c4SBeni Lev 		__entry->rx = rx;
167114e8a3c4SBeni Lev 	),
167214e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
167314e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->tx, __entry->rx)
167414e8a3c4SBeni Lev );
167514e8a3c4SBeni Lev 
167614e8a3c4SBeni Lev DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
167714e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
167814e8a3c4SBeni Lev 	TP_ARGS(wiphy, rx, tx)
167914e8a3c4SBeni Lev );
168014e8a3c4SBeni Lev 
1681ca986ad9SArend Van Spriel DECLARE_EVENT_CLASS(wiphy_netdev_id_evt,
1682ca986ad9SArend Van Spriel 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1683ca986ad9SArend Van Spriel 	TP_ARGS(wiphy, netdev, id),
168414e8a3c4SBeni Lev 	TP_STRUCT__entry(
168514e8a3c4SBeni Lev 		WIPHY_ENTRY
168614e8a3c4SBeni Lev 		NETDEV_ENTRY
1687ca986ad9SArend Van Spriel 		__field(u64, id)
168814e8a3c4SBeni Lev 	),
168914e8a3c4SBeni Lev 	TP_fast_assign(
169014e8a3c4SBeni Lev 		WIPHY_ASSIGN;
169114e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1692ca986ad9SArend Van Spriel 		__entry->id = id;
169314e8a3c4SBeni Lev 	),
1694ca986ad9SArend Van Spriel 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", id: %llu",
1695ca986ad9SArend Van Spriel 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->id)
1696ca986ad9SArend Van Spriel );
1697ca986ad9SArend Van Spriel 
1698ca986ad9SArend Van Spriel DEFINE_EVENT(wiphy_netdev_id_evt, rdev_sched_scan_start,
1699ca986ad9SArend Van Spriel 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1700ca986ad9SArend Van Spriel 	TP_ARGS(wiphy, netdev, id)
170114e8a3c4SBeni Lev );
170214e8a3c4SBeni Lev 
17033a3ecf1dSArend Van Spriel DEFINE_EVENT(wiphy_netdev_id_evt, rdev_sched_scan_stop,
17043a3ecf1dSArend Van Spriel 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
17053a3ecf1dSArend Van Spriel 	TP_ARGS(wiphy, netdev, id)
17063a3ecf1dSArend Van Spriel );
17073a3ecf1dSArend Van Spriel 
170814e8a3c4SBeni Lev TRACE_EVENT(rdev_tdls_mgmt,
170914e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
171014e8a3c4SBeni Lev 		 u8 *peer, u8 action_code, u8 dialog_token,
1711df942e7bSSunil Dutt Undekari 		 u16 status_code, u32 peer_capability,
171231fa97c5SArik Nemtsov 		 bool initiator, const u8 *buf, size_t len),
171314e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
171431fa97c5SArik Nemtsov 		peer_capability, initiator, buf, len),
171514e8a3c4SBeni Lev 	TP_STRUCT__entry(
171614e8a3c4SBeni Lev 		WIPHY_ENTRY
171714e8a3c4SBeni Lev 		NETDEV_ENTRY
171814e8a3c4SBeni Lev 		MAC_ENTRY(peer)
171914e8a3c4SBeni Lev 		__field(u8, action_code)
172014e8a3c4SBeni Lev 		__field(u8, dialog_token)
172114e8a3c4SBeni Lev 		__field(u16, status_code)
1722df942e7bSSunil Dutt Undekari 		__field(u32, peer_capability)
172331fa97c5SArik Nemtsov 		__field(bool, initiator)
172414e8a3c4SBeni Lev 		__dynamic_array(u8, buf, len)
172514e8a3c4SBeni Lev 	),
172614e8a3c4SBeni Lev 	TP_fast_assign(
172714e8a3c4SBeni Lev 		WIPHY_ASSIGN;
172814e8a3c4SBeni Lev 		NETDEV_ASSIGN;
172914e8a3c4SBeni Lev 		MAC_ASSIGN(peer, peer);
173014e8a3c4SBeni Lev 		__entry->action_code = action_code;
173114e8a3c4SBeni Lev 		__entry->dialog_token = dialog_token;
173214e8a3c4SBeni Lev 		__entry->status_code = status_code;
1733df942e7bSSunil Dutt Undekari 		__entry->peer_capability = peer_capability;
173431fa97c5SArik Nemtsov 		__entry->initiator = initiator;
173514e8a3c4SBeni Lev 		memcpy(__get_dynamic_array(buf), buf, len);
173614e8a3c4SBeni Lev 	),
1737ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, "
173831fa97c5SArik Nemtsov 		  "dialog_token: %u, status_code: %u, peer_capability: %u "
173931fa97c5SArik Nemtsov 		  "initiator: %s buf: %#.2x ",
174014e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
174114e8a3c4SBeni Lev 		  __entry->action_code, __entry->dialog_token,
1742df942e7bSSunil Dutt Undekari 		  __entry->status_code, __entry->peer_capability,
174331fa97c5SArik Nemtsov 		  BOOL_TO_STR(__entry->initiator),
1744df942e7bSSunil Dutt Undekari 		  ((u8 *)__get_dynamic_array(buf))[0])
174514e8a3c4SBeni Lev );
174614e8a3c4SBeni Lev 
174714e8a3c4SBeni Lev TRACE_EVENT(rdev_dump_survey,
1748aaaa10e0SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx),
1749aaaa10e0SJohannes Berg 	TP_ARGS(wiphy, netdev, _idx),
175014e8a3c4SBeni Lev 	TP_STRUCT__entry(
175114e8a3c4SBeni Lev 		WIPHY_ENTRY
175214e8a3c4SBeni Lev 		NETDEV_ENTRY
175314e8a3c4SBeni Lev 		__field(int, idx)
175414e8a3c4SBeni Lev 	),
175514e8a3c4SBeni Lev 	TP_fast_assign(
175614e8a3c4SBeni Lev 		WIPHY_ASSIGN;
175714e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1758aaaa10e0SJohannes Berg 		__entry->idx = _idx;
175914e8a3c4SBeni Lev 	),
1760ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
176114e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
176214e8a3c4SBeni Lev );
176314e8a3c4SBeni Lev 
176414e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_survey_info,
176514e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
176614e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret, info),
176714e8a3c4SBeni Lev 	TP_STRUCT__entry(
176814e8a3c4SBeni Lev 		WIPHY_ENTRY
176914e8a3c4SBeni Lev 		CHAN_ENTRY
177014e8a3c4SBeni Lev 		__field(int, ret)
17714ed20bebSJohannes Berg 		__field(u64, time)
17724ed20bebSJohannes Berg 		__field(u64, time_busy)
17734ed20bebSJohannes Berg 		__field(u64, time_ext_busy)
17744ed20bebSJohannes Berg 		__field(u64, time_rx)
17754ed20bebSJohannes Berg 		__field(u64, time_tx)
1776052536abSJohannes Berg 		__field(u64, time_scan)
177714e8a3c4SBeni Lev 		__field(u32, filled)
177814e8a3c4SBeni Lev 		__field(s8, noise)
177914e8a3c4SBeni Lev 	),
178014e8a3c4SBeni Lev 	TP_fast_assign(
178114e8a3c4SBeni Lev 		WIPHY_ASSIGN;
178214e8a3c4SBeni Lev 		CHAN_ASSIGN(info->channel);
178314e8a3c4SBeni Lev 		__entry->ret = ret;
17844ed20bebSJohannes Berg 		__entry->time = info->time;
17854ed20bebSJohannes Berg 		__entry->time_busy = info->time_busy;
17864ed20bebSJohannes Berg 		__entry->time_ext_busy = info->time_ext_busy;
17874ed20bebSJohannes Berg 		__entry->time_rx = info->time_rx;
17884ed20bebSJohannes Berg 		__entry->time_tx = info->time_tx;
1789052536abSJohannes Berg 		__entry->time_scan = info->time_scan;
179014e8a3c4SBeni Lev 		__entry->filled = info->filled;
179114e8a3c4SBeni Lev 		__entry->noise = info->noise;
179214e8a3c4SBeni Lev 	),
179314e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
179414e8a3c4SBeni Lev 		  ", channel time: %llu, channel time busy: %llu, "
179514e8a3c4SBeni Lev 		  "channel time extension busy: %llu, channel time rx: %llu, "
1796052536abSJohannes Berg 		  "channel time tx: %llu, scan time: %llu, filled: %u, noise: %d",
179714e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
17984ed20bebSJohannes Berg 		  __entry->time, __entry->time_busy,
17994ed20bebSJohannes Berg 		  __entry->time_ext_busy, __entry->time_rx,
1800052536abSJohannes Berg 		  __entry->time_tx, __entry->time_scan,
1801052536abSJohannes Berg 		  __entry->filled, __entry->noise)
180214e8a3c4SBeni Lev );
180314e8a3c4SBeni Lev 
180414e8a3c4SBeni Lev TRACE_EVENT(rdev_tdls_oper,
180514e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
180614e8a3c4SBeni Lev 		 u8 *peer, enum nl80211_tdls_operation oper),
180714e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, peer, oper),
180814e8a3c4SBeni Lev 	TP_STRUCT__entry(
180914e8a3c4SBeni Lev 		WIPHY_ENTRY
181014e8a3c4SBeni Lev 		NETDEV_ENTRY
181114e8a3c4SBeni Lev 		MAC_ENTRY(peer)
181214e8a3c4SBeni Lev 		__field(enum nl80211_tdls_operation, oper)
181314e8a3c4SBeni Lev 	),
181414e8a3c4SBeni Lev 	TP_fast_assign(
181514e8a3c4SBeni Lev 		WIPHY_ASSIGN;
181614e8a3c4SBeni Lev 		NETDEV_ASSIGN;
181714e8a3c4SBeni Lev 		MAC_ASSIGN(peer, peer);
181814e8a3c4SBeni Lev 		__entry->oper = oper;
181914e8a3c4SBeni Lev 	),
1820ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d",
182114e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
182214e8a3c4SBeni Lev );
182314e8a3c4SBeni Lev 
182414e8a3c4SBeni Lev DECLARE_EVENT_CLASS(rdev_pmksa,
182514e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
182614e8a3c4SBeni Lev 		 struct cfg80211_pmksa *pmksa),
182714e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, pmksa),
182814e8a3c4SBeni Lev 	TP_STRUCT__entry(
182914e8a3c4SBeni Lev 		WIPHY_ENTRY
183014e8a3c4SBeni Lev 		NETDEV_ENTRY
183114e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
183214e8a3c4SBeni Lev 	),
183314e8a3c4SBeni Lev 	TP_fast_assign(
183414e8a3c4SBeni Lev 		WIPHY_ASSIGN;
183514e8a3c4SBeni Lev 		NETDEV_ASSIGN;
183614e8a3c4SBeni Lev 		MAC_ASSIGN(bssid, pmksa->bssid);
183714e8a3c4SBeni Lev 	),
1838ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
183914e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
184014e8a3c4SBeni Lev );
184114e8a3c4SBeni Lev 
184214e8a3c4SBeni Lev TRACE_EVENT(rdev_probe_client,
184314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
184414e8a3c4SBeni Lev 		 const u8 *peer),
184514e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, peer),
184614e8a3c4SBeni Lev 	TP_STRUCT__entry(
184714e8a3c4SBeni Lev 		WIPHY_ENTRY
184814e8a3c4SBeni Lev 		NETDEV_ENTRY
184914e8a3c4SBeni Lev 		MAC_ENTRY(peer)
185014e8a3c4SBeni Lev 	),
185114e8a3c4SBeni Lev 	TP_fast_assign(
185214e8a3c4SBeni Lev 		WIPHY_ASSIGN;
185314e8a3c4SBeni Lev 		NETDEV_ASSIGN;
185414e8a3c4SBeni Lev 		MAC_ASSIGN(peer, peer);
185514e8a3c4SBeni Lev 	),
1856ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
185714e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
185814e8a3c4SBeni Lev );
185914e8a3c4SBeni Lev 
186014e8a3c4SBeni Lev DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
186114e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
186214e8a3c4SBeni Lev 		 struct cfg80211_pmksa *pmksa),
186314e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, pmksa)
186414e8a3c4SBeni Lev );
186514e8a3c4SBeni Lev 
186614e8a3c4SBeni Lev DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
186714e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
186814e8a3c4SBeni Lev 		 struct cfg80211_pmksa *pmksa),
186914e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, pmksa)
187014e8a3c4SBeni Lev );
187114e8a3c4SBeni Lev 
187214e8a3c4SBeni Lev TRACE_EVENT(rdev_remain_on_channel,
187314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
187414e8a3c4SBeni Lev 		 struct ieee80211_channel *chan,
187542d97a59SJohannes Berg 		 unsigned int duration),
187642d97a59SJohannes Berg 	TP_ARGS(wiphy, wdev, chan, duration),
187714e8a3c4SBeni Lev 	TP_STRUCT__entry(
187814e8a3c4SBeni Lev 		WIPHY_ENTRY
187914e8a3c4SBeni Lev 		WDEV_ENTRY
188014e8a3c4SBeni Lev 		CHAN_ENTRY
188114e8a3c4SBeni Lev 		__field(unsigned int, duration)
188214e8a3c4SBeni Lev 	),
188314e8a3c4SBeni Lev 	TP_fast_assign(
188414e8a3c4SBeni Lev 		WIPHY_ASSIGN;
188514e8a3c4SBeni Lev 		WDEV_ASSIGN;
188614e8a3c4SBeni Lev 		CHAN_ASSIGN(chan);
188714e8a3c4SBeni Lev 		__entry->duration = duration;
188814e8a3c4SBeni Lev 	),
1889ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
189042d97a59SJohannes Berg 		  WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
189114e8a3c4SBeni Lev );
189214e8a3c4SBeni Lev 
189314e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_cookie,
189414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
189514e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret, cookie),
189614e8a3c4SBeni Lev 	TP_STRUCT__entry(
189714e8a3c4SBeni Lev 		WIPHY_ENTRY
189814e8a3c4SBeni Lev 		__field(int, ret)
189914e8a3c4SBeni Lev 		__field(u64, cookie)
190014e8a3c4SBeni Lev 	),
190114e8a3c4SBeni Lev 	TP_fast_assign(
190214e8a3c4SBeni Lev 		WIPHY_ASSIGN;
190314e8a3c4SBeni Lev 		__entry->ret = ret;
190414e8a3c4SBeni Lev 		__entry->cookie = cookie;
190514e8a3c4SBeni Lev 	),
190614e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
190714e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->ret, __entry->cookie)
190814e8a3c4SBeni Lev );
190914e8a3c4SBeni Lev 
191014e8a3c4SBeni Lev TRACE_EVENT(rdev_cancel_remain_on_channel,
191114e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
191214e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev, cookie),
191314e8a3c4SBeni Lev 	TP_STRUCT__entry(
191414e8a3c4SBeni Lev 		WIPHY_ENTRY
191514e8a3c4SBeni Lev 		WDEV_ENTRY
191614e8a3c4SBeni Lev 		__field(u64, cookie)
191714e8a3c4SBeni Lev 	),
191814e8a3c4SBeni Lev 	TP_fast_assign(
191914e8a3c4SBeni Lev 		WIPHY_ASSIGN;
192014e8a3c4SBeni Lev 		WDEV_ASSIGN;
192114e8a3c4SBeni Lev 		__entry->cookie = cookie;
192214e8a3c4SBeni Lev 	),
1923ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
192414e8a3c4SBeni Lev 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
192514e8a3c4SBeni Lev );
192614e8a3c4SBeni Lev 
192714e8a3c4SBeni Lev TRACE_EVENT(rdev_mgmt_tx,
192814e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1929b176e629SAndrei Otcheretianski 		 struct cfg80211_mgmt_tx_params *params),
1930b176e629SAndrei Otcheretianski 	TP_ARGS(wiphy, wdev, params),
193114e8a3c4SBeni Lev 	TP_STRUCT__entry(
193214e8a3c4SBeni Lev 		WIPHY_ENTRY
193314e8a3c4SBeni Lev 		WDEV_ENTRY
193414e8a3c4SBeni Lev 		CHAN_ENTRY
193514e8a3c4SBeni Lev 		__field(bool, offchan)
193614e8a3c4SBeni Lev 		__field(unsigned int, wait)
193714e8a3c4SBeni Lev 		__field(bool, no_cck)
193814e8a3c4SBeni Lev 		__field(bool, dont_wait_for_ack)
193914e8a3c4SBeni Lev 	),
194014e8a3c4SBeni Lev 	TP_fast_assign(
194114e8a3c4SBeni Lev 		WIPHY_ASSIGN;
194214e8a3c4SBeni Lev 		WDEV_ASSIGN;
1943b176e629SAndrei Otcheretianski 		CHAN_ASSIGN(params->chan);
1944b176e629SAndrei Otcheretianski 		__entry->offchan = params->offchan;
1945b176e629SAndrei Otcheretianski 		__entry->wait = params->wait;
1946b176e629SAndrei Otcheretianski 		__entry->no_cck = params->no_cck;
1947b176e629SAndrei Otcheretianski 		__entry->dont_wait_for_ack = params->dont_wait_for_ack;
194814e8a3c4SBeni Lev 	),
1949ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
195042d97a59SJohannes Berg 		  " wait: %u, no cck: %s, dont wait for ack: %s",
195114e8a3c4SBeni Lev 		  WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
195242d97a59SJohannes Berg 		  BOOL_TO_STR(__entry->offchan), __entry->wait,
195314e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->no_cck),
195414e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->dont_wait_for_ack))
195514e8a3c4SBeni Lev );
195614e8a3c4SBeni Lev 
19572576a9acSDenis Kenzior TRACE_EVENT(rdev_tx_control_port,
19582576a9acSDenis Kenzior 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
19598d74a623SJohannes Berg 		 const u8 *buf, size_t len, const u8 *dest, __be16 proto,
19602576a9acSDenis Kenzior 		 bool unencrypted),
19618d74a623SJohannes Berg 	TP_ARGS(wiphy, netdev, buf, len, dest, proto, unencrypted),
19622576a9acSDenis Kenzior 	TP_STRUCT__entry(
19632576a9acSDenis Kenzior 		WIPHY_ENTRY
19642576a9acSDenis Kenzior 		NETDEV_ENTRY
19652576a9acSDenis Kenzior 		MAC_ENTRY(dest)
19668d74a623SJohannes Berg 		__field(__be16, proto)
19672576a9acSDenis Kenzior 		__field(bool, unencrypted)
19682576a9acSDenis Kenzior 	),
19692576a9acSDenis Kenzior 	TP_fast_assign(
19702576a9acSDenis Kenzior 		WIPHY_ASSIGN;
19712576a9acSDenis Kenzior 		NETDEV_ASSIGN;
19722576a9acSDenis Kenzior 		MAC_ASSIGN(dest, dest);
19738d74a623SJohannes Berg 		__entry->proto = proto;
19742576a9acSDenis Kenzior 		__entry->unencrypted = unencrypted;
19752576a9acSDenis Kenzior 	),
19768d74a623SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ","
19778d74a623SJohannes Berg 		  " proto: 0x%x, unencrypted: %s",
19788d74a623SJohannes Berg 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dest),
19798d74a623SJohannes Berg 		  be16_to_cpu(__entry->proto),
19802576a9acSDenis Kenzior 		  BOOL_TO_STR(__entry->unencrypted))
19812576a9acSDenis Kenzior );
19822576a9acSDenis Kenzior 
198314e8a3c4SBeni Lev TRACE_EVENT(rdev_set_noack_map,
198414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
198514e8a3c4SBeni Lev 		 u16 noack_map),
198614e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, noack_map),
198714e8a3c4SBeni Lev 	TP_STRUCT__entry(
198814e8a3c4SBeni Lev 		WIPHY_ENTRY
198914e8a3c4SBeni Lev 		NETDEV_ENTRY
199014e8a3c4SBeni Lev 		__field(u16, noack_map)
199114e8a3c4SBeni Lev 	),
199214e8a3c4SBeni Lev 	TP_fast_assign(
199314e8a3c4SBeni Lev 		WIPHY_ASSIGN;
199414e8a3c4SBeni Lev 		NETDEV_ASSIGN;
199514e8a3c4SBeni Lev 		__entry->noack_map = noack_map;
199614e8a3c4SBeni Lev 	),
1997ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
199814e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
199914e8a3c4SBeni Lev );
200014e8a3c4SBeni Lev 
200114e8a3c4SBeni Lev DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel,
200214e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
200314e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev)
200414e8a3c4SBeni Lev );
200514e8a3c4SBeni Lev 
2006683b6d3bSJohannes Berg TRACE_EVENT(rdev_return_chandef,
2007683b6d3bSJohannes Berg 	TP_PROTO(struct wiphy *wiphy, int ret,
2008683b6d3bSJohannes Berg 		 struct cfg80211_chan_def *chandef),
2009683b6d3bSJohannes Berg 	TP_ARGS(wiphy, ret, chandef),
201014e8a3c4SBeni Lev 	TP_STRUCT__entry(
201114e8a3c4SBeni Lev 		WIPHY_ENTRY
2012683b6d3bSJohannes Berg 		__field(int, ret)
2013683b6d3bSJohannes Berg 		CHAN_DEF_ENTRY
201414e8a3c4SBeni Lev 	),
201514e8a3c4SBeni Lev 	TP_fast_assign(
201614e8a3c4SBeni Lev 		WIPHY_ASSIGN;
2017683b6d3bSJohannes Berg 		if (ret == 0)
2018683b6d3bSJohannes Berg 			CHAN_DEF_ASSIGN(chandef);
2019683b6d3bSJohannes Berg 		else
2020683b6d3bSJohannes Berg 			CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
2021683b6d3bSJohannes Berg 		__entry->ret = ret;
202214e8a3c4SBeni Lev 	),
2023ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
2024683b6d3bSJohannes Berg 		  WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
202514e8a3c4SBeni Lev );
202614e8a3c4SBeni Lev 
2027eeb126e9SJohannes Berg DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
2028eeb126e9SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2029eeb126e9SJohannes Berg 	TP_ARGS(wiphy, wdev)
2030eeb126e9SJohannes Berg );
2031eeb126e9SJohannes Berg 
2032eeb126e9SJohannes Berg DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
2033eeb126e9SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2034eeb126e9SJohannes Berg 	TP_ARGS(wiphy, wdev)
2035eeb126e9SJohannes Berg );
2036eeb126e9SJohannes Berg 
2037cb3b7d87SAyala Beker TRACE_EVENT(rdev_start_nan,
2038cb3b7d87SAyala Beker 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2039cb3b7d87SAyala Beker 		 struct cfg80211_nan_conf *conf),
2040cb3b7d87SAyala Beker 	TP_ARGS(wiphy, wdev, conf),
2041cb3b7d87SAyala Beker 	TP_STRUCT__entry(
2042cb3b7d87SAyala Beker 		WIPHY_ENTRY
2043cb3b7d87SAyala Beker 		WDEV_ENTRY
2044cb3b7d87SAyala Beker 		__field(u8, master_pref)
204504ae87a5SPeter Zijlstra 		__field(u8, bands)
2046cb3b7d87SAyala Beker 	),
2047cb3b7d87SAyala Beker 	TP_fast_assign(
2048cb3b7d87SAyala Beker 		WIPHY_ASSIGN;
2049cb3b7d87SAyala Beker 		WDEV_ASSIGN;
2050cb3b7d87SAyala Beker 		__entry->master_pref = conf->master_pref;
20518585989dSLuca Coelho 		__entry->bands = conf->bands;
2052cb3b7d87SAyala Beker 	),
2053cb3b7d87SAyala Beker 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
20548585989dSLuca Coelho 		  ", master preference: %u, bands: 0x%0x",
2055cb3b7d87SAyala Beker 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
20568585989dSLuca Coelho 		  __entry->bands)
2057cb3b7d87SAyala Beker );
2058cb3b7d87SAyala Beker 
2059a5a9dcf2SAyala Beker TRACE_EVENT(rdev_nan_change_conf,
2060a5a9dcf2SAyala Beker 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2061a5a9dcf2SAyala Beker 		 struct cfg80211_nan_conf *conf, u32 changes),
2062a5a9dcf2SAyala Beker 	TP_ARGS(wiphy, wdev, conf, changes),
2063a5a9dcf2SAyala Beker 	TP_STRUCT__entry(
2064a5a9dcf2SAyala Beker 		WIPHY_ENTRY
2065a5a9dcf2SAyala Beker 		WDEV_ENTRY
2066a5a9dcf2SAyala Beker 		__field(u8, master_pref)
206704ae87a5SPeter Zijlstra 		__field(u8, bands)
206804ae87a5SPeter Zijlstra 		__field(u32, changes)
2069a5a9dcf2SAyala Beker 	),
2070a5a9dcf2SAyala Beker 	TP_fast_assign(
2071a5a9dcf2SAyala Beker 		WIPHY_ASSIGN;
2072a5a9dcf2SAyala Beker 		WDEV_ASSIGN;
2073a5a9dcf2SAyala Beker 		__entry->master_pref = conf->master_pref;
20748585989dSLuca Coelho 		__entry->bands = conf->bands;
2075a5a9dcf2SAyala Beker 		__entry->changes = changes;
2076a5a9dcf2SAyala Beker 	),
2077a5a9dcf2SAyala Beker 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
20788585989dSLuca Coelho 		  ", master preference: %u, bands: 0x%0x, changes: %x",
2079a5a9dcf2SAyala Beker 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
20808585989dSLuca Coelho 		  __entry->bands, __entry->changes)
2081a5a9dcf2SAyala Beker );
2082a5a9dcf2SAyala Beker 
2083cb3b7d87SAyala Beker DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_nan,
2084cb3b7d87SAyala Beker 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2085cb3b7d87SAyala Beker 	TP_ARGS(wiphy, wdev)
2086cb3b7d87SAyala Beker );
2087cb3b7d87SAyala Beker 
2088a442b761SAyala Beker TRACE_EVENT(rdev_add_nan_func,
2089a442b761SAyala Beker 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2090a442b761SAyala Beker 		 const struct cfg80211_nan_func *func),
2091a442b761SAyala Beker 	TP_ARGS(wiphy, wdev, func),
2092a442b761SAyala Beker 	TP_STRUCT__entry(
2093a442b761SAyala Beker 		WIPHY_ENTRY
2094a442b761SAyala Beker 		WDEV_ENTRY
2095a442b761SAyala Beker 		__field(u8, func_type)
2096a442b761SAyala Beker 		__field(u64, cookie)
2097a442b761SAyala Beker 	),
2098a442b761SAyala Beker 	TP_fast_assign(
2099a442b761SAyala Beker 		WIPHY_ASSIGN;
2100a442b761SAyala Beker 		WDEV_ASSIGN;
2101a442b761SAyala Beker 		__entry->func_type = func->type;
2102a442b761SAyala Beker 		__entry->cookie = func->cookie
2103a442b761SAyala Beker 	),
2104a442b761SAyala Beker 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type=%u, cookie=%llu",
2105a442b761SAyala Beker 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->func_type,
2106a442b761SAyala Beker 		  __entry->cookie)
2107a442b761SAyala Beker );
2108a442b761SAyala Beker 
2109a442b761SAyala Beker TRACE_EVENT(rdev_del_nan_func,
2110a442b761SAyala Beker 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2111a442b761SAyala Beker 		 u64 cookie),
2112a442b761SAyala Beker 	TP_ARGS(wiphy, wdev, cookie),
2113a442b761SAyala Beker 	TP_STRUCT__entry(
2114a442b761SAyala Beker 		WIPHY_ENTRY
2115a442b761SAyala Beker 		WDEV_ENTRY
2116a442b761SAyala Beker 		__field(u64, cookie)
2117a442b761SAyala Beker 	),
2118a442b761SAyala Beker 	TP_fast_assign(
2119a442b761SAyala Beker 		WIPHY_ASSIGN;
2120a442b761SAyala Beker 		WDEV_ASSIGN;
2121a442b761SAyala Beker 		__entry->cookie = cookie;
2122a442b761SAyala Beker 	),
2123a442b761SAyala Beker 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie=%llu",
2124a442b761SAyala Beker 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
2125a442b761SAyala Beker );
2126a442b761SAyala Beker 
212777765eafSVasanthakumar Thiagarajan TRACE_EVENT(rdev_set_mac_acl,
212877765eafSVasanthakumar Thiagarajan 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
212977765eafSVasanthakumar Thiagarajan 		 struct cfg80211_acl_data *params),
213077765eafSVasanthakumar Thiagarajan 	TP_ARGS(wiphy, netdev, params),
213177765eafSVasanthakumar Thiagarajan 	TP_STRUCT__entry(
213277765eafSVasanthakumar Thiagarajan 		WIPHY_ENTRY
213377765eafSVasanthakumar Thiagarajan 		NETDEV_ENTRY
213477765eafSVasanthakumar Thiagarajan 		__field(u32, acl_policy)
213577765eafSVasanthakumar Thiagarajan 	),
213677765eafSVasanthakumar Thiagarajan 	TP_fast_assign(
213777765eafSVasanthakumar Thiagarajan 		WIPHY_ASSIGN;
2138021fcdc1SVladimir Kondratiev 		NETDEV_ASSIGN;
213977765eafSVasanthakumar Thiagarajan 		__entry->acl_policy = params->acl_policy;
214077765eafSVasanthakumar Thiagarajan 	),
214177765eafSVasanthakumar Thiagarajan 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
214277765eafSVasanthakumar Thiagarajan 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
214377765eafSVasanthakumar Thiagarajan );
214477765eafSVasanthakumar Thiagarajan 
2145355199e0SJouni Malinen TRACE_EVENT(rdev_update_ft_ies,
2146355199e0SJouni Malinen 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2147355199e0SJouni Malinen 		 struct cfg80211_update_ft_ies_params *ftie),
2148355199e0SJouni Malinen 	TP_ARGS(wiphy, netdev, ftie),
2149355199e0SJouni Malinen 	TP_STRUCT__entry(
2150355199e0SJouni Malinen 		WIPHY_ENTRY
2151355199e0SJouni Malinen 		NETDEV_ENTRY
2152355199e0SJouni Malinen 		__field(u16, md)
2153355199e0SJouni Malinen 		__dynamic_array(u8, ie, ftie->ie_len)
2154355199e0SJouni Malinen 	),
2155355199e0SJouni Malinen 	TP_fast_assign(
2156355199e0SJouni Malinen 		WIPHY_ASSIGN;
2157355199e0SJouni Malinen 		NETDEV_ASSIGN;
2158355199e0SJouni Malinen 		__entry->md = ftie->md;
2159355199e0SJouni Malinen 		memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
2160355199e0SJouni Malinen 	),
2161355199e0SJouni Malinen 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
2162355199e0SJouni Malinen 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
2163355199e0SJouni Malinen );
2164355199e0SJouni Malinen 
21655de17984SArend van Spriel TRACE_EVENT(rdev_crit_proto_start,
21665de17984SArend van Spriel 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
21675de17984SArend van Spriel 		 enum nl80211_crit_proto_id protocol, u16 duration),
21685de17984SArend van Spriel 	TP_ARGS(wiphy, wdev, protocol, duration),
21695de17984SArend van Spriel 	TP_STRUCT__entry(
21705de17984SArend van Spriel 		WIPHY_ENTRY
21715de17984SArend van Spriel 		WDEV_ENTRY
21725de17984SArend van Spriel 		__field(u16, proto)
21735de17984SArend van Spriel 		__field(u16, duration)
21745de17984SArend van Spriel 	),
21755de17984SArend van Spriel 	TP_fast_assign(
21765de17984SArend van Spriel 		WIPHY_ASSIGN;
21775de17984SArend van Spriel 		WDEV_ASSIGN;
21785de17984SArend van Spriel 		__entry->proto = protocol;
21795de17984SArend van Spriel 		__entry->duration = duration;
21805de17984SArend van Spriel 	),
21815de17984SArend van Spriel 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
21825de17984SArend van Spriel 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
21835de17984SArend van Spriel );
21845de17984SArend van Spriel 
21855de17984SArend van Spriel TRACE_EVENT(rdev_crit_proto_stop,
21865de17984SArend van Spriel 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
21875de17984SArend van Spriel 	TP_ARGS(wiphy, wdev),
21885de17984SArend van Spriel 	TP_STRUCT__entry(
21895de17984SArend van Spriel 		WIPHY_ENTRY
21905de17984SArend van Spriel 		WDEV_ENTRY
21915de17984SArend van Spriel 	),
21925de17984SArend van Spriel 	TP_fast_assign(
21935de17984SArend van Spriel 		WIPHY_ASSIGN;
21945de17984SArend van Spriel 		WDEV_ASSIGN;
21955de17984SArend van Spriel 	),
21965de17984SArend van Spriel 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
21975de17984SArend van Spriel 		  WIPHY_PR_ARG, WDEV_PR_ARG)
21985de17984SArend van Spriel );
21995de17984SArend van Spriel 
220016ef1fe2SSimon Wunderlich TRACE_EVENT(rdev_channel_switch,
220116ef1fe2SSimon Wunderlich 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
220216ef1fe2SSimon Wunderlich 		 struct cfg80211_csa_settings *params),
220316ef1fe2SSimon Wunderlich 	TP_ARGS(wiphy, netdev, params),
220416ef1fe2SSimon Wunderlich 	TP_STRUCT__entry(
220516ef1fe2SSimon Wunderlich 		WIPHY_ENTRY
220616ef1fe2SSimon Wunderlich 		NETDEV_ENTRY
220716ef1fe2SSimon Wunderlich 		CHAN_DEF_ENTRY
220816ef1fe2SSimon Wunderlich 		__field(bool, radar_required)
220916ef1fe2SSimon Wunderlich 		__field(bool, block_tx)
221016ef1fe2SSimon Wunderlich 		__field(u8, count)
22119a774c78SAndrei Otcheretianski 		__dynamic_array(u16, bcn_ofs, params->n_counter_offsets_beacon)
22129a774c78SAndrei Otcheretianski 		__dynamic_array(u16, pres_ofs, params->n_counter_offsets_presp)
221316ef1fe2SSimon Wunderlich 	),
221416ef1fe2SSimon Wunderlich 	TP_fast_assign(
221516ef1fe2SSimon Wunderlich 		WIPHY_ASSIGN;
221616ef1fe2SSimon Wunderlich 		NETDEV_ASSIGN;
221716ef1fe2SSimon Wunderlich 		CHAN_DEF_ASSIGN(&params->chandef);
221816ef1fe2SSimon Wunderlich 		__entry->radar_required = params->radar_required;
221916ef1fe2SSimon Wunderlich 		__entry->block_tx = params->block_tx;
222016ef1fe2SSimon Wunderlich 		__entry->count = params->count;
22219a774c78SAndrei Otcheretianski 		memcpy(__get_dynamic_array(bcn_ofs),
22229a774c78SAndrei Otcheretianski 		       params->counter_offsets_beacon,
22239a774c78SAndrei Otcheretianski 		       params->n_counter_offsets_beacon * sizeof(u16));
22249a774c78SAndrei Otcheretianski 
22259a774c78SAndrei Otcheretianski 		/* probe response offsets are optional */
22269a774c78SAndrei Otcheretianski 		if (params->n_counter_offsets_presp)
22279a774c78SAndrei Otcheretianski 			memcpy(__get_dynamic_array(pres_ofs),
22289a774c78SAndrei Otcheretianski 			       params->counter_offsets_presp,
22299a774c78SAndrei Otcheretianski 			       params->n_counter_offsets_presp * sizeof(u16));
223016ef1fe2SSimon Wunderlich 	),
223116ef1fe2SSimon Wunderlich 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
22329a774c78SAndrei Otcheretianski 		  ", block_tx: %d, count: %u, radar_required: %d",
223316ef1fe2SSimon Wunderlich 		  WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
22349a774c78SAndrei Otcheretianski 		  __entry->block_tx, __entry->count, __entry->radar_required)
223516ef1fe2SSimon Wunderlich );
223616ef1fe2SSimon Wunderlich 
2237fa9ffc74SKyeyoon Park TRACE_EVENT(rdev_set_qos_map,
2238fa9ffc74SKyeyoon Park 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2239fa9ffc74SKyeyoon Park 		 struct cfg80211_qos_map *qos_map),
2240fa9ffc74SKyeyoon Park 	TP_ARGS(wiphy, netdev, qos_map),
2241fa9ffc74SKyeyoon Park 	TP_STRUCT__entry(
2242fa9ffc74SKyeyoon Park 		WIPHY_ENTRY
2243fa9ffc74SKyeyoon Park 		NETDEV_ENTRY
2244fa9ffc74SKyeyoon Park 		QOS_MAP_ENTRY
2245fa9ffc74SKyeyoon Park 	),
2246fa9ffc74SKyeyoon Park 	TP_fast_assign(
2247fa9ffc74SKyeyoon Park 		WIPHY_ASSIGN;
2248fa9ffc74SKyeyoon Park 		NETDEV_ASSIGN;
2249fa9ffc74SKyeyoon Park 		QOS_MAP_ASSIGN(qos_map);
2250fa9ffc74SKyeyoon Park 	),
2251fa9ffc74SKyeyoon Park 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u",
2252fa9ffc74SKyeyoon Park 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des)
2253fa9ffc74SKyeyoon Park );
2254fa9ffc74SKyeyoon Park 
2255e16821bcSJouni Malinen TRACE_EVENT(rdev_set_ap_chanwidth,
2256e16821bcSJouni Malinen 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2257e16821bcSJouni Malinen 		 struct cfg80211_chan_def *chandef),
2258e16821bcSJouni Malinen 	TP_ARGS(wiphy, netdev, chandef),
2259e16821bcSJouni Malinen 	TP_STRUCT__entry(
2260e16821bcSJouni Malinen 		WIPHY_ENTRY
2261e16821bcSJouni Malinen 		NETDEV_ENTRY
2262e16821bcSJouni Malinen 		CHAN_DEF_ENTRY
2263e16821bcSJouni Malinen 	),
2264e16821bcSJouni Malinen 	TP_fast_assign(
2265e16821bcSJouni Malinen 		WIPHY_ASSIGN;
2266e16821bcSJouni Malinen 		NETDEV_ASSIGN;
2267e16821bcSJouni Malinen 		CHAN_DEF_ASSIGN(chandef);
2268e16821bcSJouni Malinen 	),
2269e16821bcSJouni Malinen 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2270e16821bcSJouni Malinen 		  WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2271e16821bcSJouni Malinen );
2272e16821bcSJouni Malinen 
2273960d01acSJohannes Berg TRACE_EVENT(rdev_add_tx_ts,
2274960d01acSJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2275960d01acSJohannes Berg 		 u8 tsid, const u8 *peer, u8 user_prio, u16 admitted_time),
2276960d01acSJohannes Berg 	TP_ARGS(wiphy, netdev, tsid, peer, user_prio, admitted_time),
2277960d01acSJohannes Berg 	TP_STRUCT__entry(
2278960d01acSJohannes Berg 		WIPHY_ENTRY
2279960d01acSJohannes Berg 		NETDEV_ENTRY
2280960d01acSJohannes Berg 		MAC_ENTRY(peer)
2281960d01acSJohannes Berg 		__field(u8, tsid)
2282960d01acSJohannes Berg 		__field(u8, user_prio)
2283960d01acSJohannes Berg 		__field(u16, admitted_time)
2284960d01acSJohannes Berg 	),
2285960d01acSJohannes Berg 	TP_fast_assign(
2286960d01acSJohannes Berg 		WIPHY_ASSIGN;
2287960d01acSJohannes Berg 		NETDEV_ASSIGN;
2288960d01acSJohannes Berg 		MAC_ASSIGN(peer, peer);
2289960d01acSJohannes Berg 		__entry->tsid = tsid;
2290960d01acSJohannes Berg 		__entry->user_prio = user_prio;
2291960d01acSJohannes Berg 		__entry->admitted_time = admitted_time;
2292960d01acSJohannes Berg 	),
2293960d01acSJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d, UP %d, time %d",
2294960d01acSJohannes Berg 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
2295960d01acSJohannes Berg 		  __entry->tsid, __entry->user_prio, __entry->admitted_time)
2296960d01acSJohannes Berg );
2297960d01acSJohannes Berg 
2298960d01acSJohannes Berg TRACE_EVENT(rdev_del_tx_ts,
2299960d01acSJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2300960d01acSJohannes Berg 		 u8 tsid, const u8 *peer),
2301960d01acSJohannes Berg 	TP_ARGS(wiphy, netdev, tsid, peer),
2302960d01acSJohannes Berg 	TP_STRUCT__entry(
2303960d01acSJohannes Berg 		WIPHY_ENTRY
2304960d01acSJohannes Berg 		NETDEV_ENTRY
2305960d01acSJohannes Berg 		MAC_ENTRY(peer)
2306960d01acSJohannes Berg 		__field(u8, tsid)
2307960d01acSJohannes Berg 	),
2308960d01acSJohannes Berg 	TP_fast_assign(
2309960d01acSJohannes Berg 		WIPHY_ASSIGN;
2310960d01acSJohannes Berg 		NETDEV_ASSIGN;
2311960d01acSJohannes Berg 		MAC_ASSIGN(peer, peer);
2312960d01acSJohannes Berg 		__entry->tsid = tsid;
2313960d01acSJohannes Berg 	),
2314960d01acSJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d",
2315960d01acSJohannes Berg 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tsid)
2316960d01acSJohannes Berg );
2317960d01acSJohannes Berg 
23181057d35eSArik Nemtsov TRACE_EVENT(rdev_tdls_channel_switch,
23191057d35eSArik Nemtsov 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
23201057d35eSArik Nemtsov 		 const u8 *addr, u8 oper_class,
23211057d35eSArik Nemtsov 		 struct cfg80211_chan_def *chandef),
23221057d35eSArik Nemtsov 	TP_ARGS(wiphy, netdev, addr, oper_class, chandef),
23231057d35eSArik Nemtsov 	TP_STRUCT__entry(
23241057d35eSArik Nemtsov 		WIPHY_ENTRY
23251057d35eSArik Nemtsov 		NETDEV_ENTRY
23261057d35eSArik Nemtsov 		MAC_ENTRY(addr)
23271057d35eSArik Nemtsov 		__field(u8, oper_class)
23281057d35eSArik Nemtsov 		CHAN_DEF_ENTRY
23291057d35eSArik Nemtsov 	),
23301057d35eSArik Nemtsov 	TP_fast_assign(
23311057d35eSArik Nemtsov 		WIPHY_ASSIGN;
23321057d35eSArik Nemtsov 		NETDEV_ASSIGN;
23331057d35eSArik Nemtsov 		MAC_ASSIGN(addr, addr);
23341057d35eSArik Nemtsov 		CHAN_DEF_ASSIGN(chandef);
23351057d35eSArik Nemtsov 	),
23361057d35eSArik Nemtsov 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT
23371057d35eSArik Nemtsov 		  " oper class %d, " CHAN_DEF_PR_FMT,
23381057d35eSArik Nemtsov 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr),
23391057d35eSArik Nemtsov 		  __entry->oper_class, CHAN_DEF_PR_ARG)
23401057d35eSArik Nemtsov );
23411057d35eSArik Nemtsov 
23421057d35eSArik Nemtsov TRACE_EVENT(rdev_tdls_cancel_channel_switch,
23431057d35eSArik Nemtsov 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
23441057d35eSArik Nemtsov 		 const u8 *addr),
23451057d35eSArik Nemtsov 	TP_ARGS(wiphy, netdev, addr),
23461057d35eSArik Nemtsov 	TP_STRUCT__entry(
23471057d35eSArik Nemtsov 		WIPHY_ENTRY
23481057d35eSArik Nemtsov 		NETDEV_ENTRY
23491057d35eSArik Nemtsov 		MAC_ENTRY(addr)
23501057d35eSArik Nemtsov 	),
23511057d35eSArik Nemtsov 	TP_fast_assign(
23521057d35eSArik Nemtsov 		WIPHY_ASSIGN;
23531057d35eSArik Nemtsov 		NETDEV_ASSIGN;
23541057d35eSArik Nemtsov 		MAC_ASSIGN(addr, addr);
23551057d35eSArik Nemtsov 	),
23561057d35eSArik Nemtsov 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
23571057d35eSArik Nemtsov 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr))
23581057d35eSArik Nemtsov );
23591057d35eSArik Nemtsov 
23603a00df57SAvraham Stern TRACE_EVENT(rdev_set_pmk,
23613a00df57SAvraham Stern 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
23623a00df57SAvraham Stern 		 struct cfg80211_pmk_conf *pmk_conf),
23633a00df57SAvraham Stern 
23643a00df57SAvraham Stern 	TP_ARGS(wiphy, netdev, pmk_conf),
23653a00df57SAvraham Stern 
23663a00df57SAvraham Stern 	TP_STRUCT__entry(
23673a00df57SAvraham Stern 		WIPHY_ENTRY
23683a00df57SAvraham Stern 		NETDEV_ENTRY
23693a00df57SAvraham Stern 		MAC_ENTRY(aa)
23703a00df57SAvraham Stern 		__field(u8, pmk_len)
23713a00df57SAvraham Stern 		__field(u8, pmk_r0_name_len)
23723a00df57SAvraham Stern 		__dynamic_array(u8, pmk, pmk_conf->pmk_len)
23733a00df57SAvraham Stern 		__dynamic_array(u8, pmk_r0_name, WLAN_PMK_NAME_LEN)
23743a00df57SAvraham Stern 	),
23753a00df57SAvraham Stern 
23763a00df57SAvraham Stern 	TP_fast_assign(
23773a00df57SAvraham Stern 		WIPHY_ASSIGN;
23783a00df57SAvraham Stern 		NETDEV_ASSIGN;
23793a00df57SAvraham Stern 		MAC_ASSIGN(aa, pmk_conf->aa);
23803a00df57SAvraham Stern 		__entry->pmk_len = pmk_conf->pmk_len;
23813a00df57SAvraham Stern 		__entry->pmk_r0_name_len =
23823a00df57SAvraham Stern 		pmk_conf->pmk_r0_name ? WLAN_PMK_NAME_LEN : 0;
23833a00df57SAvraham Stern 		memcpy(__get_dynamic_array(pmk), pmk_conf->pmk,
23843a00df57SAvraham Stern 		       pmk_conf->pmk_len);
23853a00df57SAvraham Stern 		memcpy(__get_dynamic_array(pmk_r0_name), pmk_conf->pmk_r0_name,
23863a00df57SAvraham Stern 		       pmk_conf->pmk_r0_name ? WLAN_PMK_NAME_LEN : 0);
23873a00df57SAvraham Stern 	),
23883a00df57SAvraham Stern 
23893a00df57SAvraham Stern 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT
23903a00df57SAvraham Stern 		  "pmk_len=%u, pmk: %s pmk_r0_name: %s", WIPHY_PR_ARG,
23913a00df57SAvraham Stern 		  NETDEV_PR_ARG, MAC_PR_ARG(aa), __entry->pmk_len,
23923a00df57SAvraham Stern 		  __print_array(__get_dynamic_array(pmk),
23933a00df57SAvraham Stern 				__get_dynamic_array_len(pmk), 1),
23943a00df57SAvraham Stern 		  __entry->pmk_r0_name_len ?
23953a00df57SAvraham Stern 		  __print_array(__get_dynamic_array(pmk_r0_name),
23963a00df57SAvraham Stern 				__get_dynamic_array_len(pmk_r0_name), 1) : "")
23973a00df57SAvraham Stern );
23983a00df57SAvraham Stern 
23993a00df57SAvraham Stern TRACE_EVENT(rdev_del_pmk,
24003a00df57SAvraham Stern 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *aa),
24013a00df57SAvraham Stern 
24023a00df57SAvraham Stern 	TP_ARGS(wiphy, netdev, aa),
24033a00df57SAvraham Stern 
24043a00df57SAvraham Stern 	TP_STRUCT__entry(
24053a00df57SAvraham Stern 		WIPHY_ENTRY
24063a00df57SAvraham Stern 		NETDEV_ENTRY
24073a00df57SAvraham Stern 		MAC_ENTRY(aa)
24083a00df57SAvraham Stern 	),
24093a00df57SAvraham Stern 
24103a00df57SAvraham Stern 	TP_fast_assign(
24113a00df57SAvraham Stern 		WIPHY_ASSIGN;
24123a00df57SAvraham Stern 		NETDEV_ASSIGN;
24133a00df57SAvraham Stern 		MAC_ASSIGN(aa, aa);
24143a00df57SAvraham Stern 	),
24153a00df57SAvraham Stern 
24163a00df57SAvraham Stern 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
24173a00df57SAvraham Stern 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(aa))
24183a00df57SAvraham Stern );
24193a00df57SAvraham Stern 
242040cbfa90SSrinivas Dasari TRACE_EVENT(rdev_external_auth,
242140cbfa90SSrinivas Dasari 	    TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
242240cbfa90SSrinivas Dasari 		     struct cfg80211_external_auth_params *params),
242340cbfa90SSrinivas Dasari 	    TP_ARGS(wiphy, netdev, params),
242440cbfa90SSrinivas Dasari 	    TP_STRUCT__entry(WIPHY_ENTRY
242540cbfa90SSrinivas Dasari 			     NETDEV_ENTRY
242640cbfa90SSrinivas Dasari 			     MAC_ENTRY(bssid)
242740cbfa90SSrinivas Dasari 			     __array(u8, ssid, IEEE80211_MAX_SSID_LEN + 1)
242840cbfa90SSrinivas Dasari 			     __field(u16, status)
242940cbfa90SSrinivas Dasari 	    ),
243040cbfa90SSrinivas Dasari 	    TP_fast_assign(WIPHY_ASSIGN;
243140cbfa90SSrinivas Dasari 			   NETDEV_ASSIGN;
243240cbfa90SSrinivas Dasari 			   MAC_ASSIGN(bssid, params->bssid);
243340cbfa90SSrinivas Dasari 			   memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
243440cbfa90SSrinivas Dasari 			   memcpy(__entry->ssid, params->ssid.ssid,
243540cbfa90SSrinivas Dasari 				  params->ssid.ssid_len);
243640cbfa90SSrinivas Dasari 			   __entry->status = params->status;
243740cbfa90SSrinivas Dasari 	    ),
243840cbfa90SSrinivas Dasari 	    TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
243940cbfa90SSrinivas Dasari 		      ", ssid: %s, status: %u", WIPHY_PR_ARG, NETDEV_PR_ARG,
244040cbfa90SSrinivas Dasari 		      __entry->bssid, __entry->ssid, __entry->status)
244140cbfa90SSrinivas Dasari );
244240cbfa90SSrinivas Dasari 
24435207ca55SJohannes Berg TRACE_EVENT(rdev_start_radar_detection,
24445207ca55SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
24455207ca55SJohannes Berg 		 struct cfg80211_chan_def *chandef,
24465207ca55SJohannes Berg 		 u32 cac_time_ms),
24475207ca55SJohannes Berg 	TP_ARGS(wiphy, netdev, chandef, cac_time_ms),
24485207ca55SJohannes Berg 	TP_STRUCT__entry(
24495207ca55SJohannes Berg 		WIPHY_ENTRY
24505207ca55SJohannes Berg 		NETDEV_ENTRY
24515207ca55SJohannes Berg 		CHAN_DEF_ENTRY
24525207ca55SJohannes Berg 		__field(u32, cac_time_ms)
24535207ca55SJohannes Berg 	),
24545207ca55SJohannes Berg 	TP_fast_assign(
24555207ca55SJohannes Berg 		WIPHY_ASSIGN;
24565207ca55SJohannes Berg 		NETDEV_ASSIGN;
24575207ca55SJohannes Berg 		CHAN_DEF_ASSIGN(chandef);
24585207ca55SJohannes Berg 		__entry->cac_time_ms = cac_time_ms;
24595207ca55SJohannes Berg 	),
24605207ca55SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
24615207ca55SJohannes Berg 		  ", cac_time_ms=%u",
24625207ca55SJohannes Berg 		  WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
24635207ca55SJohannes Berg 		  __entry->cac_time_ms)
24645207ca55SJohannes Berg );
24655207ca55SJohannes Berg 
24665207ca55SJohannes Berg TRACE_EVENT(rdev_set_mcast_rate,
24675207ca55SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
24685207ca55SJohannes Berg 		 int *mcast_rate),
24695207ca55SJohannes Berg 	TP_ARGS(wiphy, netdev, mcast_rate),
24705207ca55SJohannes Berg 	TP_STRUCT__entry(
24715207ca55SJohannes Berg 		WIPHY_ENTRY
24725207ca55SJohannes Berg 		NETDEV_ENTRY
24735207ca55SJohannes Berg 		__array(int, mcast_rate, NUM_NL80211_BANDS)
24745207ca55SJohannes Berg 	),
24755207ca55SJohannes Berg 	TP_fast_assign(
24765207ca55SJohannes Berg 		WIPHY_ASSIGN;
24775207ca55SJohannes Berg 		NETDEV_ASSIGN;
24785207ca55SJohannes Berg 		memcpy(__entry->mcast_rate, mcast_rate,
24795207ca55SJohannes Berg 		       sizeof(int) * NUM_NL80211_BANDS);
24805207ca55SJohannes Berg 	),
24815207ca55SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", "
2482e548a1c3SArend van Spriel 		  "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 6GHz=0x%x, 60GHz=0x%x]",
24835207ca55SJohannes Berg 		  WIPHY_PR_ARG, NETDEV_PR_ARG,
24845207ca55SJohannes Berg 		  __entry->mcast_rate[NL80211_BAND_2GHZ],
24855207ca55SJohannes Berg 		  __entry->mcast_rate[NL80211_BAND_5GHZ],
2486e548a1c3SArend van Spriel 		  __entry->mcast_rate[NL80211_BAND_6GHZ],
24875207ca55SJohannes Berg 		  __entry->mcast_rate[NL80211_BAND_60GHZ])
24885207ca55SJohannes Berg );
24895207ca55SJohannes Berg 
24905207ca55SJohannes Berg TRACE_EVENT(rdev_set_coalesce,
24915207ca55SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_coalesce *coalesce),
24925207ca55SJohannes Berg 	TP_ARGS(wiphy, coalesce),
24935207ca55SJohannes Berg 	TP_STRUCT__entry(
24945207ca55SJohannes Berg 		WIPHY_ENTRY
24955207ca55SJohannes Berg 		__field(int, n_rules)
24965207ca55SJohannes Berg 	),
24975207ca55SJohannes Berg 	TP_fast_assign(
24985207ca55SJohannes Berg 		WIPHY_ASSIGN;
24995207ca55SJohannes Berg 		__entry->n_rules = coalesce ? coalesce->n_rules : 0;
25005207ca55SJohannes Berg 	),
25015207ca55SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", n_rules=%d",
25025207ca55SJohannes Berg 		  WIPHY_PR_ARG, __entry->n_rules)
25035207ca55SJohannes Berg );
25045207ca55SJohannes Berg 
25055207ca55SJohannes Berg DEFINE_EVENT(wiphy_wdev_evt, rdev_abort_scan,
25065207ca55SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
25075207ca55SJohannes Berg 	TP_ARGS(wiphy, wdev)
25085207ca55SJohannes Berg );
25095207ca55SJohannes Berg 
25105207ca55SJohannes Berg TRACE_EVENT(rdev_set_multicast_to_unicast,
25115207ca55SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
25125207ca55SJohannes Berg 		 const bool enabled),
25135207ca55SJohannes Berg 	TP_ARGS(wiphy, netdev, enabled),
25145207ca55SJohannes Berg 	TP_STRUCT__entry(
25155207ca55SJohannes Berg 		WIPHY_ENTRY
25165207ca55SJohannes Berg 		NETDEV_ENTRY
25175207ca55SJohannes Berg 		__field(bool, enabled)
25185207ca55SJohannes Berg 	),
25195207ca55SJohannes Berg 	TP_fast_assign(
25205207ca55SJohannes Berg 		WIPHY_ASSIGN;
25215207ca55SJohannes Berg 		NETDEV_ASSIGN;
25225207ca55SJohannes Berg 		__entry->enabled = enabled;
25235207ca55SJohannes Berg 	),
25245207ca55SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", unicast: %s",
25255207ca55SJohannes Berg 		  WIPHY_PR_ARG, NETDEV_PR_ARG,
25265207ca55SJohannes Berg 		  BOOL_TO_STR(__entry->enabled))
25275207ca55SJohannes Berg );
25285207ca55SJohannes Berg 
25295207ca55SJohannes Berg DEFINE_EVENT(wiphy_wdev_evt, rdev_get_txq_stats,
25305207ca55SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
25315207ca55SJohannes Berg 	TP_ARGS(wiphy, wdev)
25325207ca55SJohannes Berg );
25335207ca55SJohannes Berg 
25345207ca55SJohannes Berg TRACE_EVENT(rdev_get_ftm_responder_stats,
25355207ca55SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
25365207ca55SJohannes Berg 		 struct cfg80211_ftm_responder_stats *ftm_stats),
25375207ca55SJohannes Berg 
25385207ca55SJohannes Berg 	TP_ARGS(wiphy, netdev, ftm_stats),
25395207ca55SJohannes Berg 
25405207ca55SJohannes Berg 	TP_STRUCT__entry(
25415207ca55SJohannes Berg 		WIPHY_ENTRY
25425207ca55SJohannes Berg 		NETDEV_ENTRY
25435207ca55SJohannes Berg 		__field(u64, timestamp)
25445207ca55SJohannes Berg 		__field(u32, success_num)
25455207ca55SJohannes Berg 		__field(u32, partial_num)
25465207ca55SJohannes Berg 		__field(u32, failed_num)
25475207ca55SJohannes Berg 		__field(u32, asap_num)
25485207ca55SJohannes Berg 		__field(u32, non_asap_num)
25495207ca55SJohannes Berg 		__field(u64, duration)
25505207ca55SJohannes Berg 		__field(u32, unknown_triggers)
25515207ca55SJohannes Berg 		__field(u32, reschedule)
25525207ca55SJohannes Berg 		__field(u32, out_of_window)
25535207ca55SJohannes Berg 	),
25545207ca55SJohannes Berg 
25555207ca55SJohannes Berg 	TP_fast_assign(
25565207ca55SJohannes Berg 		WIPHY_ASSIGN;
25575207ca55SJohannes Berg 		NETDEV_ASSIGN;
25585207ca55SJohannes Berg 		__entry->success_num = ftm_stats->success_num;
25595207ca55SJohannes Berg 		__entry->partial_num = ftm_stats->partial_num;
25605207ca55SJohannes Berg 		__entry->failed_num = ftm_stats->failed_num;
25615207ca55SJohannes Berg 		__entry->asap_num = ftm_stats->asap_num;
25625207ca55SJohannes Berg 		__entry->non_asap_num = ftm_stats->non_asap_num;
25635207ca55SJohannes Berg 		__entry->duration = ftm_stats->total_duration_ms;
25645207ca55SJohannes Berg 		__entry->unknown_triggers = ftm_stats->unknown_triggers_num;
25655207ca55SJohannes Berg 		__entry->reschedule = ftm_stats->reschedule_requests_num;
25665207ca55SJohannes Berg 		__entry->out_of_window = ftm_stats->out_of_window_triggers_num;
25675207ca55SJohannes Berg 	),
25685207ca55SJohannes Berg 
25695207ca55SJohannes Berg 	TP_printk(WIPHY_PR_FMT "Ftm responder stats: success %u, partial %u, "
25705207ca55SJohannes Berg 		"failed %u, asap %u, non asap %u, total duration %llu, unknown "
25715207ca55SJohannes Berg 		"triggers %u, rescheduled %u, out of window %u", WIPHY_PR_ARG,
25725207ca55SJohannes Berg 		__entry->success_num, __entry->partial_num, __entry->failed_num,
25735207ca55SJohannes Berg 		__entry->asap_num, __entry->non_asap_num, __entry->duration,
25745207ca55SJohannes Berg 		__entry->unknown_triggers, __entry->reschedule,
25755207ca55SJohannes Berg 		__entry->out_of_window)
25765207ca55SJohannes Berg );
25775207ca55SJohannes Berg 
25789bb7e0f2SJohannes Berg DEFINE_EVENT(wiphy_wdev_cookie_evt, rdev_start_pmsr,
25799bb7e0f2SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
25809bb7e0f2SJohannes Berg 	TP_ARGS(wiphy, wdev, cookie)
25819bb7e0f2SJohannes Berg );
25829bb7e0f2SJohannes Berg 
25839bb7e0f2SJohannes Berg DEFINE_EVENT(wiphy_wdev_cookie_evt, rdev_abort_pmsr,
25849bb7e0f2SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
25859bb7e0f2SJohannes Berg 	TP_ARGS(wiphy, wdev, cookie)
25869bb7e0f2SJohannes Berg );
25879bb7e0f2SJohannes Berg 
25884ee3e063SBeni Lev /*************************************************************
25894ee3e063SBeni Lev  *	     cfg80211 exported functions traces		     *
25904ee3e063SBeni Lev  *************************************************************/
25914ee3e063SBeni Lev 
25924ee3e063SBeni Lev TRACE_EVENT(cfg80211_return_bool,
25934ee3e063SBeni Lev 	TP_PROTO(bool ret),
25944ee3e063SBeni Lev 	TP_ARGS(ret),
25954ee3e063SBeni Lev 	TP_STRUCT__entry(
25964ee3e063SBeni Lev 		__field(bool, ret)
25974ee3e063SBeni Lev 	),
25984ee3e063SBeni Lev 	TP_fast_assign(
25994ee3e063SBeni Lev 		__entry->ret = ret;
26004ee3e063SBeni Lev 	),
26014ee3e063SBeni Lev 	TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
26024ee3e063SBeni Lev );
26034ee3e063SBeni Lev 
26044ee3e063SBeni Lev DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
26054ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *macaddr),
26064ee3e063SBeni Lev 	TP_ARGS(netdev, macaddr),
26074ee3e063SBeni Lev 	TP_STRUCT__entry(
26084ee3e063SBeni Lev 		NETDEV_ENTRY
26094ee3e063SBeni Lev 		MAC_ENTRY(macaddr)
26104ee3e063SBeni Lev 	),
26114ee3e063SBeni Lev 	TP_fast_assign(
26124ee3e063SBeni Lev 		NETDEV_ASSIGN;
26134ee3e063SBeni Lev 		MAC_ASSIGN(macaddr, macaddr);
26144ee3e063SBeni Lev 	),
26154ee3e063SBeni Lev 	TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
26164ee3e063SBeni Lev 		  NETDEV_PR_ARG, MAC_PR_ARG(macaddr))
26174ee3e063SBeni Lev );
26184ee3e063SBeni Lev 
26194ee3e063SBeni Lev DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
26204ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *macaddr),
26214ee3e063SBeni Lev 	TP_ARGS(netdev, macaddr)
26224ee3e063SBeni Lev );
26234ee3e063SBeni Lev 
26244ee3e063SBeni Lev DECLARE_EVENT_CLASS(netdev_evt_only,
26254ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev),
26264ee3e063SBeni Lev 	TP_ARGS(netdev),
26274ee3e063SBeni Lev 	TP_STRUCT__entry(
26284ee3e063SBeni Lev 		NETDEV_ENTRY
26294ee3e063SBeni Lev 	),
26304ee3e063SBeni Lev 	TP_fast_assign(
26314ee3e063SBeni Lev 		NETDEV_ASSIGN;
26324ee3e063SBeni Lev 	),
26334ee3e063SBeni Lev 	TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
26344ee3e063SBeni Lev );
26354ee3e063SBeni Lev 
26364ee3e063SBeni Lev DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
26374ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev),
26384ee3e063SBeni Lev 	TP_ARGS(netdev)
26394ee3e063SBeni Lev );
26404ee3e063SBeni Lev 
26414ee3e063SBeni Lev TRACE_EVENT(cfg80211_send_rx_assoc,
26424ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss),
26434ee3e063SBeni Lev 	TP_ARGS(netdev, bss),
26444ee3e063SBeni Lev 	TP_STRUCT__entry(
26454ee3e063SBeni Lev 		NETDEV_ENTRY
26464ee3e063SBeni Lev 		MAC_ENTRY(bssid)
26474ee3e063SBeni Lev 		CHAN_ENTRY
26484ee3e063SBeni Lev 	),
26494ee3e063SBeni Lev 	TP_fast_assign(
26504ee3e063SBeni Lev 		NETDEV_ASSIGN;
26514ee3e063SBeni Lev 		MAC_ASSIGN(bssid, bss->bssid);
26524ee3e063SBeni Lev 		CHAN_ASSIGN(bss->channel);
26534ee3e063SBeni Lev 	),
2654ec816087SJohannes Berg 	TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT,
26554ee3e063SBeni Lev 		  NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
26564ee3e063SBeni Lev );
26574ee3e063SBeni Lev 
26586ff57cf8SJohannes Berg DECLARE_EVENT_CLASS(netdev_frame_event,
26596ff57cf8SJohannes Berg 	TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
26606ff57cf8SJohannes Berg 	TP_ARGS(netdev, buf, len),
26616ff57cf8SJohannes Berg 	TP_STRUCT__entry(
26626ff57cf8SJohannes Berg 		NETDEV_ENTRY
26636ff57cf8SJohannes Berg 		__dynamic_array(u8, frame, len)
26646ff57cf8SJohannes Berg 	),
26656ff57cf8SJohannes Berg 	TP_fast_assign(
26666ff57cf8SJohannes Berg 		NETDEV_ASSIGN;
26676ff57cf8SJohannes Berg 		memcpy(__get_dynamic_array(frame), buf, len);
26686ff57cf8SJohannes Berg 	),
26696ff57cf8SJohannes Berg 	TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
26706ff57cf8SJohannes Berg 		  NETDEV_PR_ARG,
26716ff57cf8SJohannes Berg 		  le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
26724ee3e063SBeni Lev );
26734ee3e063SBeni Lev 
26746ff57cf8SJohannes Berg DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
26756ff57cf8SJohannes Berg 	TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
26766ff57cf8SJohannes Berg 	TP_ARGS(netdev, buf, len)
26774ee3e063SBeni Lev );
26784ee3e063SBeni Lev 
26796ff57cf8SJohannes Berg DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
26806ff57cf8SJohannes Berg 	TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
26816ff57cf8SJohannes Berg 	TP_ARGS(netdev, buf, len)
26824ee3e063SBeni Lev );
26834ee3e063SBeni Lev 
26846ff57cf8SJohannes Berg TRACE_EVENT(cfg80211_tx_mlme_mgmt,
26856ff57cf8SJohannes Berg 	TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
26866ff57cf8SJohannes Berg 	TP_ARGS(netdev, buf, len),
26876ff57cf8SJohannes Berg 	TP_STRUCT__entry(
26886ff57cf8SJohannes Berg 		NETDEV_ENTRY
26896ff57cf8SJohannes Berg 		__dynamic_array(u8, frame, len)
26906ff57cf8SJohannes Berg 	),
26916ff57cf8SJohannes Berg 	TP_fast_assign(
26926ff57cf8SJohannes Berg 		NETDEV_ASSIGN;
26936ff57cf8SJohannes Berg 		memcpy(__get_dynamic_array(frame), buf, len);
26946ff57cf8SJohannes Berg 	),
26956ff57cf8SJohannes Berg 	TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
26966ff57cf8SJohannes Berg 		  NETDEV_PR_ARG,
26976ff57cf8SJohannes Berg 		  le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
26984ee3e063SBeni Lev );
26994ee3e063SBeni Lev 
27004ee3e063SBeni Lev DECLARE_EVENT_CLASS(netdev_mac_evt,
27014ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *mac),
27024ee3e063SBeni Lev 	TP_ARGS(netdev, mac),
27034ee3e063SBeni Lev 	TP_STRUCT__entry(
27044ee3e063SBeni Lev 		NETDEV_ENTRY
27054ee3e063SBeni Lev 		MAC_ENTRY(mac)
27064ee3e063SBeni Lev 	),
27074ee3e063SBeni Lev 	TP_fast_assign(
27084ee3e063SBeni Lev 		NETDEV_ASSIGN;
27094ee3e063SBeni Lev 		MAC_ASSIGN(mac, mac)
27104ee3e063SBeni Lev 	),
27114ee3e063SBeni Lev 	TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
27124ee3e063SBeni Lev 		  NETDEV_PR_ARG, MAC_PR_ARG(mac))
27134ee3e063SBeni Lev );
27144ee3e063SBeni Lev 
27154ee3e063SBeni Lev DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
27164ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *mac),
27174ee3e063SBeni Lev 	TP_ARGS(netdev, mac)
27184ee3e063SBeni Lev );
27194ee3e063SBeni Lev 
27204ee3e063SBeni Lev DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout,
27214ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *mac),
27224ee3e063SBeni Lev 	TP_ARGS(netdev, mac)
27234ee3e063SBeni Lev );
27244ee3e063SBeni Lev 
27254ee3e063SBeni Lev TRACE_EVENT(cfg80211_michael_mic_failure,
27264ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *addr,
27274ee3e063SBeni Lev 		 enum nl80211_key_type key_type, int key_id, const u8 *tsc),
27284ee3e063SBeni Lev 	TP_ARGS(netdev, addr, key_type, key_id, tsc),
27294ee3e063SBeni Lev 	TP_STRUCT__entry(
27304ee3e063SBeni Lev 		NETDEV_ENTRY
27314ee3e063SBeni Lev 		MAC_ENTRY(addr)
27324ee3e063SBeni Lev 		__field(enum nl80211_key_type, key_type)
27334ee3e063SBeni Lev 		__field(int, key_id)
27344ee3e063SBeni Lev 		__array(u8, tsc, 6)
27354ee3e063SBeni Lev 	),
27364ee3e063SBeni Lev 	TP_fast_assign(
27374ee3e063SBeni Lev 		NETDEV_ASSIGN;
27384ee3e063SBeni Lev 		MAC_ASSIGN(addr, addr);
27394ee3e063SBeni Lev 		__entry->key_type = key_type;
27404ee3e063SBeni Lev 		__entry->key_id = key_id;
27418c26d458SEliad Peller 		if (tsc)
27424ee3e063SBeni Lev 			memcpy(__entry->tsc, tsc, 6);
27434ee3e063SBeni Lev 	),
2744ec816087SJohannes Berg 	TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
27454ee3e063SBeni Lev 		  NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,
27464ee3e063SBeni Lev 		  __entry->key_id, __entry->tsc)
27474ee3e063SBeni Lev );
27484ee3e063SBeni Lev 
27494ee3e063SBeni Lev TRACE_EVENT(cfg80211_ready_on_channel,
27504ee3e063SBeni Lev 	TP_PROTO(struct wireless_dev *wdev, u64 cookie,
27514ee3e063SBeni Lev 		 struct ieee80211_channel *chan,
275242d97a59SJohannes Berg 		 unsigned int duration),
275342d97a59SJohannes Berg 	TP_ARGS(wdev, cookie, chan, duration),
27544ee3e063SBeni Lev 	TP_STRUCT__entry(
27554ee3e063SBeni Lev 		WDEV_ENTRY
27564ee3e063SBeni Lev 		__field(u64, cookie)
27574ee3e063SBeni Lev 		CHAN_ENTRY
27584ee3e063SBeni Lev 		__field(unsigned int, duration)
27594ee3e063SBeni Lev 	),
27604ee3e063SBeni Lev 	TP_fast_assign(
27614ee3e063SBeni Lev 		WDEV_ASSIGN;
27624ee3e063SBeni Lev 		__entry->cookie = cookie;
27634ee3e063SBeni Lev 		CHAN_ASSIGN(chan);
27644ee3e063SBeni Lev 		__entry->duration = duration;
27654ee3e063SBeni Lev 	),
276642d97a59SJohannes Berg 	TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
27674ee3e063SBeni Lev 		  WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
276842d97a59SJohannes Berg 		  __entry->duration)
27694ee3e063SBeni Lev );
27704ee3e063SBeni Lev 
27714ee3e063SBeni Lev TRACE_EVENT(cfg80211_ready_on_channel_expired,
27724ee3e063SBeni Lev 	TP_PROTO(struct wireless_dev *wdev, u64 cookie,
277342d97a59SJohannes Berg 		 struct ieee80211_channel *chan),
277442d97a59SJohannes Berg 	TP_ARGS(wdev, cookie, chan),
27754ee3e063SBeni Lev 	TP_STRUCT__entry(
27764ee3e063SBeni Lev 		WDEV_ENTRY
27774ee3e063SBeni Lev 		__field(u64, cookie)
27784ee3e063SBeni Lev 		CHAN_ENTRY
27794ee3e063SBeni Lev 	),
27804ee3e063SBeni Lev 	TP_fast_assign(
27814ee3e063SBeni Lev 		WDEV_ASSIGN;
27824ee3e063SBeni Lev 		__entry->cookie = cookie;
27834ee3e063SBeni Lev 		CHAN_ASSIGN(chan);
27844ee3e063SBeni Lev 	),
278542d97a59SJohannes Berg 	TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
278642d97a59SJohannes Berg 		  WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
27874ee3e063SBeni Lev );
27884ee3e063SBeni Lev 
27891c38c7f2SJames Prestwood TRACE_EVENT(cfg80211_tx_mgmt_expired,
27901c38c7f2SJames Prestwood 	TP_PROTO(struct wireless_dev *wdev, u64 cookie,
27911c38c7f2SJames Prestwood 		 struct ieee80211_channel *chan),
27921c38c7f2SJames Prestwood 	TP_ARGS(wdev, cookie, chan),
27931c38c7f2SJames Prestwood 	TP_STRUCT__entry(
27941c38c7f2SJames Prestwood 		WDEV_ENTRY
27951c38c7f2SJames Prestwood 		__field(u64, cookie)
27961c38c7f2SJames Prestwood 		CHAN_ENTRY
27971c38c7f2SJames Prestwood 	),
27981c38c7f2SJames Prestwood 	TP_fast_assign(
27991c38c7f2SJames Prestwood 		WDEV_ASSIGN;
28001c38c7f2SJames Prestwood 		__entry->cookie = cookie;
28011c38c7f2SJames Prestwood 		CHAN_ASSIGN(chan);
28021c38c7f2SJames Prestwood 	),
28031c38c7f2SJames Prestwood 	TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
28041c38c7f2SJames Prestwood 		  WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
28051c38c7f2SJames Prestwood );
28061c38c7f2SJames Prestwood 
28074ee3e063SBeni Lev TRACE_EVENT(cfg80211_new_sta,
28084ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
28094ee3e063SBeni Lev 		 struct station_info *sinfo),
28104ee3e063SBeni Lev 	TP_ARGS(netdev, mac_addr, sinfo),
28114ee3e063SBeni Lev 	TP_STRUCT__entry(
28124ee3e063SBeni Lev 		NETDEV_ENTRY
28134ee3e063SBeni Lev 		MAC_ENTRY(mac_addr)
28144ee3e063SBeni Lev 		SINFO_ENTRY
28154ee3e063SBeni Lev 	),
28164ee3e063SBeni Lev 	TP_fast_assign(
28174ee3e063SBeni Lev 		NETDEV_ASSIGN;
28184ee3e063SBeni Lev 		MAC_ASSIGN(mac_addr, mac_addr);
28194ee3e063SBeni Lev 		SINFO_ASSIGN;
28204ee3e063SBeni Lev 	),
2821ec816087SJohannes Berg 	TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT,
28224ee3e063SBeni Lev 		  NETDEV_PR_ARG, MAC_PR_ARG(mac_addr))
28234ee3e063SBeni Lev );
28244ee3e063SBeni Lev 
28254ee3e063SBeni Lev DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
28264ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *macaddr),
28274ee3e063SBeni Lev 	TP_ARGS(netdev, macaddr)
28284ee3e063SBeni Lev );
28294ee3e063SBeni Lev 
28304ee3e063SBeni Lev TRACE_EVENT(cfg80211_rx_mgmt,
28316c2fb1e6SSergey Matyukevich 	TP_PROTO(struct wireless_dev *wdev, int freq, int sig_dbm),
28326c2fb1e6SSergey Matyukevich 	TP_ARGS(wdev, freq, sig_dbm),
28334ee3e063SBeni Lev 	TP_STRUCT__entry(
28344ee3e063SBeni Lev 		WDEV_ENTRY
28354ee3e063SBeni Lev 		__field(int, freq)
28366c2fb1e6SSergey Matyukevich 		__field(int, sig_dbm)
28374ee3e063SBeni Lev 	),
28384ee3e063SBeni Lev 	TP_fast_assign(
28394ee3e063SBeni Lev 		WDEV_ASSIGN;
28404ee3e063SBeni Lev 		__entry->freq = freq;
28416c2fb1e6SSergey Matyukevich 		__entry->sig_dbm = sig_dbm;
28424ee3e063SBeni Lev 	),
2843e76fede8SThomas Pedersen 	TP_printk(WDEV_PR_FMT ", freq: "KHZ_F", sig dbm: %d",
2844e76fede8SThomas Pedersen 		  WDEV_PR_ARG, PR_KHZ(__entry->freq), __entry->sig_dbm)
28454ee3e063SBeni Lev );
28464ee3e063SBeni Lev 
28474ee3e063SBeni Lev TRACE_EVENT(cfg80211_mgmt_tx_status,
28484ee3e063SBeni Lev 	TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
28494ee3e063SBeni Lev 	TP_ARGS(wdev, cookie, ack),
28504ee3e063SBeni Lev 	TP_STRUCT__entry(
28514ee3e063SBeni Lev 		WDEV_ENTRY
28524ee3e063SBeni Lev 		__field(u64, cookie)
28534ee3e063SBeni Lev 		__field(bool, ack)
28544ee3e063SBeni Lev 	),
28554ee3e063SBeni Lev 	TP_fast_assign(
28564ee3e063SBeni Lev 		WDEV_ASSIGN;
28574ee3e063SBeni Lev 		__entry->cookie = cookie;
28584ee3e063SBeni Lev 		__entry->ack = ack;
28594ee3e063SBeni Lev 	),
28604ee3e063SBeni Lev 	TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
28614ee3e063SBeni Lev 		  WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
28624ee3e063SBeni Lev );
28634ee3e063SBeni Lev 
2864*dca9ca2dSMarkus Theil TRACE_EVENT(cfg80211_control_port_tx_status,
2865*dca9ca2dSMarkus Theil 	TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
2866*dca9ca2dSMarkus Theil 	TP_ARGS(wdev, cookie, ack),
2867*dca9ca2dSMarkus Theil 	TP_STRUCT__entry(
2868*dca9ca2dSMarkus Theil 		WDEV_ENTRY
2869*dca9ca2dSMarkus Theil 		__field(u64, cookie)
2870*dca9ca2dSMarkus Theil 		__field(bool, ack)
2871*dca9ca2dSMarkus Theil 	),
2872*dca9ca2dSMarkus Theil 	TP_fast_assign(
2873*dca9ca2dSMarkus Theil 		WDEV_ASSIGN;
2874*dca9ca2dSMarkus Theil 		__entry->cookie = cookie;
2875*dca9ca2dSMarkus Theil 		__entry->ack = ack;
2876*dca9ca2dSMarkus Theil 	),
2877*dca9ca2dSMarkus Theil 	TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
2878*dca9ca2dSMarkus Theil 		  WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
2879*dca9ca2dSMarkus Theil );
2880*dca9ca2dSMarkus Theil 
28816a671a50SDenis Kenzior TRACE_EVENT(cfg80211_rx_control_port,
2882a948f713SDenis Kenzior 	TP_PROTO(struct net_device *netdev, struct sk_buff *skb,
2883a948f713SDenis Kenzior 		 bool unencrypted),
2884a948f713SDenis Kenzior 	TP_ARGS(netdev, skb, unencrypted),
28856a671a50SDenis Kenzior 	TP_STRUCT__entry(
28866a671a50SDenis Kenzior 		NETDEV_ENTRY
2887a948f713SDenis Kenzior 		__field(int, len)
2888a948f713SDenis Kenzior 		MAC_ENTRY(from)
28896a671a50SDenis Kenzior 		__field(u16, proto)
28906a671a50SDenis Kenzior 		__field(bool, unencrypted)
28916a671a50SDenis Kenzior 	),
28926a671a50SDenis Kenzior 	TP_fast_assign(
28936a671a50SDenis Kenzior 		NETDEV_ASSIGN;
2894a948f713SDenis Kenzior 		__entry->len = skb->len;
2895a948f713SDenis Kenzior 		MAC_ASSIGN(from, eth_hdr(skb)->h_source);
2896a948f713SDenis Kenzior 		__entry->proto = be16_to_cpu(skb->protocol);
28976a671a50SDenis Kenzior 		__entry->unencrypted = unencrypted;
28986a671a50SDenis Kenzior 	),
28998d74a623SJohannes Berg 	TP_printk(NETDEV_PR_FMT ", len=%d, " MAC_PR_FMT ", proto: 0x%x, unencrypted: %s",
29008d74a623SJohannes Berg 		  NETDEV_PR_ARG, __entry->len, MAC_PR_ARG(from),
29016a671a50SDenis Kenzior 		  __entry->proto, BOOL_TO_STR(__entry->unencrypted))
29026a671a50SDenis Kenzior );
29036a671a50SDenis Kenzior 
29044ee3e063SBeni Lev TRACE_EVENT(cfg80211_cqm_rssi_notify,
29054ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev,
2906bee427b8SAndrzej Zaborowski 		 enum nl80211_cqm_rssi_threshold_event rssi_event,
2907bee427b8SAndrzej Zaborowski 		 s32 rssi_level),
2908bee427b8SAndrzej Zaborowski 	TP_ARGS(netdev, rssi_event, rssi_level),
29094ee3e063SBeni Lev 	TP_STRUCT__entry(
29104ee3e063SBeni Lev 		NETDEV_ENTRY
29114ee3e063SBeni Lev 		__field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
2912bee427b8SAndrzej Zaborowski 		__field(s32, rssi_level)
29134ee3e063SBeni Lev 	),
29144ee3e063SBeni Lev 	TP_fast_assign(
29154ee3e063SBeni Lev 		NETDEV_ASSIGN;
29164ee3e063SBeni Lev 		__entry->rssi_event = rssi_event;
2917bee427b8SAndrzej Zaborowski 		__entry->rssi_level = rssi_level;
29184ee3e063SBeni Lev 	),
2919bee427b8SAndrzej Zaborowski 	TP_printk(NETDEV_PR_FMT ", rssi event: %d, level: %d",
2920bee427b8SAndrzej Zaborowski 		  NETDEV_PR_ARG, __entry->rssi_event, __entry->rssi_level)
29214ee3e063SBeni Lev );
29224ee3e063SBeni Lev 
2923683b6d3bSJohannes Berg TRACE_EVENT(cfg80211_reg_can_beacon,
2924174e0cd2SIlan Peer 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
2925923b352fSArik Nemtsov 		 enum nl80211_iftype iftype, bool check_no_ir),
2926923b352fSArik Nemtsov 	TP_ARGS(wiphy, chandef, iftype, check_no_ir),
29274ee3e063SBeni Lev 	TP_STRUCT__entry(
29284ee3e063SBeni Lev 		WIPHY_ENTRY
2929683b6d3bSJohannes Berg 		CHAN_DEF_ENTRY
2930174e0cd2SIlan Peer 		__field(enum nl80211_iftype, iftype)
2931923b352fSArik Nemtsov 		__field(bool, check_no_ir)
29324ee3e063SBeni Lev 	),
29334ee3e063SBeni Lev 	TP_fast_assign(
29344ee3e063SBeni Lev 		WIPHY_ASSIGN;
2935683b6d3bSJohannes Berg 		CHAN_DEF_ASSIGN(chandef);
2936174e0cd2SIlan Peer 		__entry->iftype = iftype;
2937923b352fSArik Nemtsov 		__entry->check_no_ir = check_no_ir;
29384ee3e063SBeni Lev 	),
2939923b352fSArik Nemtsov 	TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d check_no_ir=%s",
2940923b352fSArik Nemtsov 		  WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype,
2941923b352fSArik Nemtsov 		  BOOL_TO_STR(__entry->check_no_ir))
29424ee3e063SBeni Lev );
29434ee3e063SBeni Lev 
294404f39047SSimon Wunderlich TRACE_EVENT(cfg80211_chandef_dfs_required,
294504f39047SSimon Wunderlich 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
294604f39047SSimon Wunderlich 	TP_ARGS(wiphy, chandef),
294704f39047SSimon Wunderlich 	TP_STRUCT__entry(
294804f39047SSimon Wunderlich 		WIPHY_ENTRY
294904f39047SSimon Wunderlich 		CHAN_DEF_ENTRY
295004f39047SSimon Wunderlich 	),
295104f39047SSimon Wunderlich 	TP_fast_assign(
295204f39047SSimon Wunderlich 		WIPHY_ASSIGN;
295304f39047SSimon Wunderlich 		CHAN_DEF_ASSIGN(chandef);
295404f39047SSimon Wunderlich 	),
295504f39047SSimon Wunderlich 	TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
295604f39047SSimon Wunderlich 		  WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
295704f39047SSimon Wunderlich );
295804f39047SSimon Wunderlich 
29594ee3e063SBeni Lev TRACE_EVENT(cfg80211_ch_switch_notify,
2960683b6d3bSJohannes Berg 	TP_PROTO(struct net_device *netdev,
2961683b6d3bSJohannes Berg 		 struct cfg80211_chan_def *chandef),
2962683b6d3bSJohannes Berg 	TP_ARGS(netdev, chandef),
29634ee3e063SBeni Lev 	TP_STRUCT__entry(
29644ee3e063SBeni Lev 		NETDEV_ENTRY
2965683b6d3bSJohannes Berg 		CHAN_DEF_ENTRY
29664ee3e063SBeni Lev 	),
29674ee3e063SBeni Lev 	TP_fast_assign(
29684ee3e063SBeni Lev 		NETDEV_ASSIGN;
2969683b6d3bSJohannes Berg 		CHAN_DEF_ASSIGN(chandef);
29704ee3e063SBeni Lev 	),
2971ec816087SJohannes Berg 	TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2972683b6d3bSJohannes Berg 		  NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
29734ee3e063SBeni Lev );
29744ee3e063SBeni Lev 
2975f8d7552eSLuciano Coelho TRACE_EVENT(cfg80211_ch_switch_started_notify,
2976f8d7552eSLuciano Coelho 	TP_PROTO(struct net_device *netdev,
2977f8d7552eSLuciano Coelho 		 struct cfg80211_chan_def *chandef),
2978f8d7552eSLuciano Coelho 	TP_ARGS(netdev, chandef),
2979f8d7552eSLuciano Coelho 	TP_STRUCT__entry(
2980f8d7552eSLuciano Coelho 		NETDEV_ENTRY
2981f8d7552eSLuciano Coelho 		CHAN_DEF_ENTRY
2982f8d7552eSLuciano Coelho 	),
2983f8d7552eSLuciano Coelho 	TP_fast_assign(
2984f8d7552eSLuciano Coelho 		NETDEV_ASSIGN;
2985f8d7552eSLuciano Coelho 		CHAN_DEF_ASSIGN(chandef);
2986f8d7552eSLuciano Coelho 	),
2987f8d7552eSLuciano Coelho 	TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2988f8d7552eSLuciano Coelho 		  NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2989f8d7552eSLuciano Coelho );
2990f8d7552eSLuciano Coelho 
299104f39047SSimon Wunderlich TRACE_EVENT(cfg80211_radar_event,
299204f39047SSimon Wunderlich 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
299304f39047SSimon Wunderlich 	TP_ARGS(wiphy, chandef),
299404f39047SSimon Wunderlich 	TP_STRUCT__entry(
299504f39047SSimon Wunderlich 		WIPHY_ENTRY
299604f39047SSimon Wunderlich 		CHAN_DEF_ENTRY
299704f39047SSimon Wunderlich 	),
299804f39047SSimon Wunderlich 	TP_fast_assign(
299904f39047SSimon Wunderlich 		WIPHY_ASSIGN;
300004f39047SSimon Wunderlich 		CHAN_DEF_ASSIGN(chandef);
300104f39047SSimon Wunderlich 	),
300204f39047SSimon Wunderlich 	TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
300304f39047SSimon Wunderlich 		  WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
300404f39047SSimon Wunderlich );
300504f39047SSimon Wunderlich 
300604f39047SSimon Wunderlich TRACE_EVENT(cfg80211_cac_event,
300704f39047SSimon Wunderlich 	TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt),
300804f39047SSimon Wunderlich 	TP_ARGS(netdev, evt),
300904f39047SSimon Wunderlich 	TP_STRUCT__entry(
301004f39047SSimon Wunderlich 		NETDEV_ENTRY
301104f39047SSimon Wunderlich 		__field(enum nl80211_radar_event, evt)
301204f39047SSimon Wunderlich 	),
301304f39047SSimon Wunderlich 	TP_fast_assign(
301404f39047SSimon Wunderlich 		NETDEV_ASSIGN;
301504f39047SSimon Wunderlich 		__entry->evt = evt;
301604f39047SSimon Wunderlich 	),
301704f39047SSimon Wunderlich 	TP_printk(NETDEV_PR_FMT ",  event: %d",
301804f39047SSimon Wunderlich 		  NETDEV_PR_ARG, __entry->evt)
301904f39047SSimon Wunderlich );
302004f39047SSimon Wunderlich 
30214ee3e063SBeni Lev DECLARE_EVENT_CLASS(cfg80211_rx_evt,
30224ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *addr),
30234ee3e063SBeni Lev 	TP_ARGS(netdev, addr),
30244ee3e063SBeni Lev 	TP_STRUCT__entry(
30254ee3e063SBeni Lev 		NETDEV_ENTRY
30264ee3e063SBeni Lev 		MAC_ENTRY(addr)
30274ee3e063SBeni Lev 	),
30284ee3e063SBeni Lev 	TP_fast_assign(
30294ee3e063SBeni Lev 		NETDEV_ASSIGN;
30304ee3e063SBeni Lev 		MAC_ASSIGN(addr, addr);
30314ee3e063SBeni Lev 	),
3032ec816087SJohannes Berg 	TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
30334ee3e063SBeni Lev );
30344ee3e063SBeni Lev 
30354ee3e063SBeni Lev DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
30364ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *addr),
30374ee3e063SBeni Lev 	TP_ARGS(netdev, addr)
30384ee3e063SBeni Lev );
30394ee3e063SBeni Lev 
30404ee3e063SBeni Lev DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
30414ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *addr),
30424ee3e063SBeni Lev 	TP_ARGS(netdev, addr)
30434ee3e063SBeni Lev );
30444ee3e063SBeni Lev 
3045fe94f3a4SAntonio Quartulli TRACE_EVENT(cfg80211_ibss_joined,
3046fe94f3a4SAntonio Quartulli 	TP_PROTO(struct net_device *netdev, const u8 *bssid,
3047fe94f3a4SAntonio Quartulli 		 struct ieee80211_channel *channel),
3048fe94f3a4SAntonio Quartulli 	TP_ARGS(netdev, bssid, channel),
3049fe94f3a4SAntonio Quartulli 	TP_STRUCT__entry(
3050fe94f3a4SAntonio Quartulli 		NETDEV_ENTRY
3051fe94f3a4SAntonio Quartulli 		MAC_ENTRY(bssid)
3052fe94f3a4SAntonio Quartulli 		CHAN_ENTRY
3053fe94f3a4SAntonio Quartulli 	),
3054fe94f3a4SAntonio Quartulli 	TP_fast_assign(
3055fe94f3a4SAntonio Quartulli 		NETDEV_ASSIGN;
3056fe94f3a4SAntonio Quartulli 		MAC_ASSIGN(bssid, bssid);
3057fe94f3a4SAntonio Quartulli 		CHAN_ASSIGN(channel);
3058fe94f3a4SAntonio Quartulli 	),
3059fe94f3a4SAntonio Quartulli 	TP_printk(NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", " CHAN_PR_FMT,
3060fe94f3a4SAntonio Quartulli 		  NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
3061fe94f3a4SAntonio Quartulli );
3062fe94f3a4SAntonio Quartulli 
30634ee3e063SBeni Lev TRACE_EVENT(cfg80211_probe_status,
30644ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
30654ee3e063SBeni Lev 		 bool acked),
30664ee3e063SBeni Lev 	TP_ARGS(netdev, addr, cookie, acked),
30674ee3e063SBeni Lev 	TP_STRUCT__entry(
30684ee3e063SBeni Lev 		NETDEV_ENTRY
30694ee3e063SBeni Lev 		MAC_ENTRY(addr)
30704ee3e063SBeni Lev 		__field(u64, cookie)
30714ee3e063SBeni Lev 		__field(bool, acked)
30724ee3e063SBeni Lev 	),
30734ee3e063SBeni Lev 	TP_fast_assign(
30744ee3e063SBeni Lev 		NETDEV_ASSIGN;
30754ee3e063SBeni Lev 		MAC_ASSIGN(addr, addr);
30764ee3e063SBeni Lev 		__entry->cookie = cookie;
30774ee3e063SBeni Lev 		__entry->acked = acked;
30784ee3e063SBeni Lev 	),
3079ec816087SJohannes Berg 	TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
30804ee3e063SBeni Lev 		  NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
30814ee3e063SBeni Lev 		  BOOL_TO_STR(__entry->acked))
30824ee3e063SBeni Lev );
30834ee3e063SBeni Lev 
30844ee3e063SBeni Lev TRACE_EVENT(cfg80211_cqm_pktloss_notify,
30854ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
30864ee3e063SBeni Lev 	TP_ARGS(netdev, peer, num_packets),
30874ee3e063SBeni Lev 	TP_STRUCT__entry(
30884ee3e063SBeni Lev 		NETDEV_ENTRY
30894ee3e063SBeni Lev 		MAC_ENTRY(peer)
30904ee3e063SBeni Lev 		__field(u32, num_packets)
30914ee3e063SBeni Lev 	),
30924ee3e063SBeni Lev 	TP_fast_assign(
30934ee3e063SBeni Lev 		NETDEV_ASSIGN;
30944ee3e063SBeni Lev 		MAC_ASSIGN(peer, peer);
30954ee3e063SBeni Lev 		__entry->num_packets = num_packets;
30964ee3e063SBeni Lev 	),
30974ee3e063SBeni Lev 	TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u",
30984ee3e063SBeni Lev 		  NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets)
30994ee3e063SBeni Lev );
31004ee3e063SBeni Lev 
31014ee3e063SBeni Lev DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
31024ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *macaddr),
31034ee3e063SBeni Lev 	TP_ARGS(netdev, macaddr)
31044ee3e063SBeni Lev );
31054ee3e063SBeni Lev 
31064ee3e063SBeni Lev TRACE_EVENT(cfg80211_pmksa_candidate_notify,
31074ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
31084ee3e063SBeni Lev 		 bool preauth),
31094ee3e063SBeni Lev 	TP_ARGS(netdev, index, bssid, preauth),
31104ee3e063SBeni Lev 	TP_STRUCT__entry(
31114ee3e063SBeni Lev 		NETDEV_ENTRY
31124ee3e063SBeni Lev 		__field(int, index)
31134ee3e063SBeni Lev 		MAC_ENTRY(bssid)
31144ee3e063SBeni Lev 		__field(bool, preauth)
31154ee3e063SBeni Lev 	),
31164ee3e063SBeni Lev 	TP_fast_assign(
31174ee3e063SBeni Lev 		NETDEV_ASSIGN;
31184ee3e063SBeni Lev 		__entry->index = index;
31194ee3e063SBeni Lev 		MAC_ASSIGN(bssid, bssid);
31204ee3e063SBeni Lev 		__entry->preauth = preauth;
31214ee3e063SBeni Lev 	),
31224ee3e063SBeni Lev 	TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s",
31234ee3e063SBeni Lev 		  NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid),
31244ee3e063SBeni Lev 		  BOOL_TO_STR(__entry->preauth))
31254ee3e063SBeni Lev );
31264ee3e063SBeni Lev 
31274ee3e063SBeni Lev TRACE_EVENT(cfg80211_report_obss_beacon,
31284ee3e063SBeni Lev 	TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
31294ee3e063SBeni Lev 		 int freq, int sig_dbm),
31304ee3e063SBeni Lev 	TP_ARGS(wiphy, frame, len, freq, sig_dbm),
31314ee3e063SBeni Lev 	TP_STRUCT__entry(
31324ee3e063SBeni Lev 		WIPHY_ENTRY
31334ee3e063SBeni Lev 		__field(int, freq)
31344ee3e063SBeni Lev 		__field(int, sig_dbm)
31354ee3e063SBeni Lev 	),
31364ee3e063SBeni Lev 	TP_fast_assign(
31374ee3e063SBeni Lev 		WIPHY_ASSIGN;
31384ee3e063SBeni Lev 		__entry->freq = freq;
31394ee3e063SBeni Lev 		__entry->sig_dbm = sig_dbm;
31404ee3e063SBeni Lev 	),
3141e76fede8SThomas Pedersen 	TP_printk(WIPHY_PR_FMT ", freq: "KHZ_F", sig_dbm: %d",
3142e76fede8SThomas Pedersen 		  WIPHY_PR_ARG, PR_KHZ(__entry->freq), __entry->sig_dbm)
31434ee3e063SBeni Lev );
31444ee3e063SBeni Lev 
31453475b094SJouni Malinen TRACE_EVENT(cfg80211_tdls_oper_request,
31463475b094SJouni Malinen 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
31473475b094SJouni Malinen 		 enum nl80211_tdls_operation oper, u16 reason_code),
31483475b094SJouni Malinen 	TP_ARGS(wiphy, netdev, peer, oper, reason_code),
31493475b094SJouni Malinen 	TP_STRUCT__entry(
31503475b094SJouni Malinen 		WIPHY_ENTRY
31513475b094SJouni Malinen 		NETDEV_ENTRY
31523475b094SJouni Malinen 		MAC_ENTRY(peer)
31533475b094SJouni Malinen 		__field(enum nl80211_tdls_operation, oper)
31543475b094SJouni Malinen 		__field(u16, reason_code)
31553475b094SJouni Malinen 	),
31563475b094SJouni Malinen 	TP_fast_assign(
31573475b094SJouni Malinen 		WIPHY_ASSIGN;
31583475b094SJouni Malinen 		NETDEV_ASSIGN;
31593475b094SJouni Malinen 		MAC_ASSIGN(peer, peer);
31603475b094SJouni Malinen 		__entry->oper = oper;
31613475b094SJouni Malinen 		__entry->reason_code = reason_code;
31623475b094SJouni Malinen 	),
31633475b094SJouni Malinen 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u",
31643475b094SJouni Malinen 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper,
31653475b094SJouni Malinen 		  __entry->reason_code)
31663475b094SJouni Malinen 	);
31673475b094SJouni Malinen 
31684ee3e063SBeni Lev TRACE_EVENT(cfg80211_scan_done,
31691d76250bSAvraham Stern 	TP_PROTO(struct cfg80211_scan_request *request,
31701d76250bSAvraham Stern 		 struct cfg80211_scan_info *info),
31711d76250bSAvraham Stern 	TP_ARGS(request, info),
31724ee3e063SBeni Lev 	TP_STRUCT__entry(
31734ee3e063SBeni Lev 		__field(u32, n_channels)
31744ee3e063SBeni Lev 		__dynamic_array(u8, ie, request ? request->ie_len : 0)
317557fbcce3SJohannes Berg 		__array(u32, rates, NUM_NL80211_BANDS)
31764ee3e063SBeni Lev 		__field(u32, wdev_id)
31774ee3e063SBeni Lev 		MAC_ENTRY(wiphy_mac)
31784ee3e063SBeni Lev 		__field(bool, no_cck)
31794ee3e063SBeni Lev 		__field(bool, aborted)
31801d76250bSAvraham Stern 		__field(u64, scan_start_tsf)
31811d76250bSAvraham Stern 		MAC_ENTRY(tsf_bssid)
31824ee3e063SBeni Lev 	),
31834ee3e063SBeni Lev 	TP_fast_assign(
31844ee3e063SBeni Lev 		if (request) {
31854ee3e063SBeni Lev 			memcpy(__get_dynamic_array(ie), request->ie,
31864ee3e063SBeni Lev 			       request->ie_len);
31874ee3e063SBeni Lev 			memcpy(__entry->rates, request->rates,
318857fbcce3SJohannes Berg 			       NUM_NL80211_BANDS);
31894ee3e063SBeni Lev 			__entry->wdev_id = request->wdev ?
31904ee3e063SBeni Lev 					request->wdev->identifier : 0;
31914ee3e063SBeni Lev 			if (request->wiphy)
31924ee3e063SBeni Lev 				MAC_ASSIGN(wiphy_mac,
31934ee3e063SBeni Lev 					   request->wiphy->perm_addr);
31944ee3e063SBeni Lev 			__entry->no_cck = request->no_cck;
31954ee3e063SBeni Lev 		}
31961d76250bSAvraham Stern 		if (info) {
31971d76250bSAvraham Stern 			__entry->aborted = info->aborted;
31981d76250bSAvraham Stern 			__entry->scan_start_tsf = info->scan_start_tsf;
31991d76250bSAvraham Stern 			MAC_ASSIGN(tsf_bssid, info->tsf_bssid);
32001d76250bSAvraham Stern 		}
32014ee3e063SBeni Lev 	),
32021d76250bSAvraham Stern 	TP_printk("aborted: %s, scan start (TSF): %llu, tsf_bssid: " MAC_PR_FMT,
32031d76250bSAvraham Stern 		  BOOL_TO_STR(__entry->aborted),
32041d76250bSAvraham Stern 		  (unsigned long long)__entry->scan_start_tsf,
32051d76250bSAvraham Stern 		  MAC_PR_ARG(tsf_bssid))
32064ee3e063SBeni Lev );
32074ee3e063SBeni Lev 
3208b34939b9SArend Van Spriel DECLARE_EVENT_CLASS(wiphy_id_evt,
3209b34939b9SArend Van Spriel 	TP_PROTO(struct wiphy *wiphy, u64 id),
3210b34939b9SArend Van Spriel 	TP_ARGS(wiphy, id),
3211b34939b9SArend Van Spriel 	TP_STRUCT__entry(
3212b34939b9SArend Van Spriel 		WIPHY_ENTRY
3213b34939b9SArend Van Spriel 		__field(u64, id)
3214b34939b9SArend Van Spriel 	),
3215b34939b9SArend Van Spriel 	TP_fast_assign(
3216b34939b9SArend Van Spriel 		WIPHY_ASSIGN;
3217b34939b9SArend Van Spriel 		__entry->id = id;
3218b34939b9SArend Van Spriel 	),
3219b34939b9SArend Van Spriel 	TP_printk(WIPHY_PR_FMT ", id: %llu", WIPHY_PR_ARG, __entry->id)
32204ee3e063SBeni Lev );
32214ee3e063SBeni Lev 
3222b34939b9SArend Van Spriel DEFINE_EVENT(wiphy_id_evt, cfg80211_sched_scan_stopped,
3223b34939b9SArend Van Spriel 	TP_PROTO(struct wiphy *wiphy, u64 id),
3224b34939b9SArend Van Spriel 	TP_ARGS(wiphy, id)
3225b34939b9SArend Van Spriel );
3226b34939b9SArend Van Spriel 
3227b34939b9SArend Van Spriel DEFINE_EVENT(wiphy_id_evt, cfg80211_sched_scan_results,
3228b34939b9SArend Van Spriel 	TP_PROTO(struct wiphy *wiphy, u64 id),
3229b34939b9SArend Van Spriel 	TP_ARGS(wiphy, id)
32304ee3e063SBeni Lev );
32314ee3e063SBeni Lev 
32324ee3e063SBeni Lev TRACE_EVENT(cfg80211_get_bss,
32334ee3e063SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
32344ee3e063SBeni Lev 		 const u8 *bssid, const u8 *ssid, size_t ssid_len,
32356eb18137SDedy Lansky 		 enum ieee80211_bss_type bss_type,
32366eb18137SDedy Lansky 		 enum ieee80211_privacy privacy),
32376eb18137SDedy Lansky 	TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, bss_type, privacy),
32384ee3e063SBeni Lev 	TP_STRUCT__entry(
32394ee3e063SBeni Lev 		WIPHY_ENTRY
32404ee3e063SBeni Lev 		CHAN_ENTRY
32414ee3e063SBeni Lev 		MAC_ENTRY(bssid)
32424ee3e063SBeni Lev 		__dynamic_array(u8, ssid, ssid_len)
32436eb18137SDedy Lansky 		__field(enum ieee80211_bss_type, bss_type)
32446eb18137SDedy Lansky 		__field(enum ieee80211_privacy, privacy)
32454ee3e063SBeni Lev 	),
32464ee3e063SBeni Lev 	TP_fast_assign(
32474ee3e063SBeni Lev 		WIPHY_ASSIGN;
32484ee3e063SBeni Lev 		CHAN_ASSIGN(channel);
32494ee3e063SBeni Lev 		MAC_ASSIGN(bssid, bssid);
32504ee3e063SBeni Lev 		memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
32516eb18137SDedy Lansky 		__entry->bss_type = bss_type;
32526eb18137SDedy Lansky 		__entry->privacy = privacy;
32534ee3e063SBeni Lev 	),
32546eb18137SDedy Lansky 	TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT
32556eb18137SDedy Lansky 		  ", buf: %#.2x, bss_type: %d, privacy: %d",
32566eb18137SDedy Lansky 		  WIPHY_PR_ARG, CHAN_PR_ARG, MAC_PR_ARG(bssid),
32576eb18137SDedy Lansky 		  ((u8 *)__get_dynamic_array(ssid))[0], __entry->bss_type,
32586eb18137SDedy Lansky 		  __entry->privacy)
32594ee3e063SBeni Lev );
32604ee3e063SBeni Lev 
32616e19bc4bSDmitry Shmidt TRACE_EVENT(cfg80211_inform_bss_frame,
32626e19bc4bSDmitry Shmidt 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_inform_bss *data,
32636e19bc4bSDmitry Shmidt 		 struct ieee80211_mgmt *mgmt, size_t len),
32646e19bc4bSDmitry Shmidt 	TP_ARGS(wiphy, data, mgmt, len),
32654ee3e063SBeni Lev 	TP_STRUCT__entry(
32664ee3e063SBeni Lev 		WIPHY_ENTRY
32674ee3e063SBeni Lev 		CHAN_ENTRY
3268dcd6eac1SSimon Wunderlich 		__field(enum nl80211_bss_scan_width, scan_width)
32694ee3e063SBeni Lev 		__dynamic_array(u8, mgmt, len)
32704ee3e063SBeni Lev 		__field(s32, signal)
32716e19bc4bSDmitry Shmidt 		__field(u64, ts_boottime)
32721d76250bSAvraham Stern 		__field(u64, parent_tsf)
32731d76250bSAvraham Stern 		MAC_ENTRY(parent_bssid)
32744ee3e063SBeni Lev 	),
32754ee3e063SBeni Lev 	TP_fast_assign(
32764ee3e063SBeni Lev 		WIPHY_ASSIGN;
32776e19bc4bSDmitry Shmidt 		CHAN_ASSIGN(data->chan);
32786e19bc4bSDmitry Shmidt 		__entry->scan_width = data->scan_width;
32794ee3e063SBeni Lev 		if (mgmt)
32804ee3e063SBeni Lev 			memcpy(__get_dynamic_array(mgmt), mgmt, len);
32816e19bc4bSDmitry Shmidt 		__entry->signal = data->signal;
32826e19bc4bSDmitry Shmidt 		__entry->ts_boottime = data->boottime_ns;
32831d76250bSAvraham Stern 		__entry->parent_tsf = data->parent_tsf;
32841d76250bSAvraham Stern 		MAC_ASSIGN(parent_bssid, data->parent_bssid);
32854ee3e063SBeni Lev 	),
32861d76250bSAvraham Stern 	TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT
32871d76250bSAvraham Stern 		  "(scan_width: %d) signal: %d, tsb:%llu, detect_tsf:%llu, tsf_bssid: "
32881d76250bSAvraham Stern 		  MAC_PR_FMT, WIPHY_PR_ARG, CHAN_PR_ARG, __entry->scan_width,
32891d76250bSAvraham Stern 		  __entry->signal, (unsigned long long)__entry->ts_boottime,
32901d76250bSAvraham Stern 		  (unsigned long long)__entry->parent_tsf,
32911d76250bSAvraham Stern 		  MAC_PR_ARG(parent_bssid))
32924ee3e063SBeni Lev );
32934ee3e063SBeni Lev 
32944ee3e063SBeni Lev DECLARE_EVENT_CLASS(cfg80211_bss_evt,
32954ee3e063SBeni Lev 	TP_PROTO(struct cfg80211_bss *pub),
32964ee3e063SBeni Lev 	TP_ARGS(pub),
32974ee3e063SBeni Lev 	TP_STRUCT__entry(
32984ee3e063SBeni Lev 		MAC_ENTRY(bssid)
32994ee3e063SBeni Lev 		CHAN_ENTRY
33004ee3e063SBeni Lev 	),
33014ee3e063SBeni Lev 	TP_fast_assign(
33024ee3e063SBeni Lev 		MAC_ASSIGN(bssid, pub->bssid);
33034ee3e063SBeni Lev 		CHAN_ASSIGN(pub->channel);
33044ee3e063SBeni Lev 	),
3305ec816087SJohannes Berg 	TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG)
33064ee3e063SBeni Lev );
33074ee3e063SBeni Lev 
33084ee3e063SBeni Lev DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
33094ee3e063SBeni Lev 	TP_PROTO(struct cfg80211_bss *pub),
33104ee3e063SBeni Lev 	TP_ARGS(pub)
33114ee3e063SBeni Lev );
33124ee3e063SBeni Lev 
33134ee3e063SBeni Lev TRACE_EVENT(cfg80211_return_uint,
33144ee3e063SBeni Lev 	TP_PROTO(unsigned int ret),
33154ee3e063SBeni Lev 	TP_ARGS(ret),
33164ee3e063SBeni Lev 	TP_STRUCT__entry(
33174ee3e063SBeni Lev 		__field(unsigned int, ret)
33184ee3e063SBeni Lev 	),
33194ee3e063SBeni Lev 	TP_fast_assign(
33204ee3e063SBeni Lev 		__entry->ret = ret;
33214ee3e063SBeni Lev 	),
33224ee3e063SBeni Lev 	TP_printk("ret: %d", __entry->ret)
33234ee3e063SBeni Lev );
33244ee3e063SBeni Lev 
33254ee3e063SBeni Lev TRACE_EVENT(cfg80211_return_u32,
33264ee3e063SBeni Lev 	TP_PROTO(u32 ret),
33274ee3e063SBeni Lev 	TP_ARGS(ret),
33284ee3e063SBeni Lev 	TP_STRUCT__entry(
33294ee3e063SBeni Lev 		__field(u32, ret)
33304ee3e063SBeni Lev 	),
33314ee3e063SBeni Lev 	TP_fast_assign(
33324ee3e063SBeni Lev 		__entry->ret = ret;
33334ee3e063SBeni Lev 	),
33344ee3e063SBeni Lev 	TP_printk("ret: %u", __entry->ret)
33354ee3e063SBeni Lev );
33364ee3e063SBeni Lev 
3337cd8f7cb4SJohannes Berg TRACE_EVENT(cfg80211_report_wowlan_wakeup,
3338cd8f7cb4SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
3339cd8f7cb4SJohannes Berg 		 struct cfg80211_wowlan_wakeup *wakeup),
3340cd8f7cb4SJohannes Berg 	TP_ARGS(wiphy, wdev, wakeup),
3341cd8f7cb4SJohannes Berg 	TP_STRUCT__entry(
3342cd8f7cb4SJohannes Berg 		WIPHY_ENTRY
3343cd8f7cb4SJohannes Berg 		WDEV_ENTRY
3344a92eecbbSJohannes Berg 		__field(bool, non_wireless)
3345cd8f7cb4SJohannes Berg 		__field(bool, disconnect)
3346cd8f7cb4SJohannes Berg 		__field(bool, magic_pkt)
3347cd8f7cb4SJohannes Berg 		__field(bool, gtk_rekey_failure)
3348cd8f7cb4SJohannes Berg 		__field(bool, eap_identity_req)
3349cd8f7cb4SJohannes Berg 		__field(bool, four_way_handshake)
3350cd8f7cb4SJohannes Berg 		__field(bool, rfkill_release)
3351cd8f7cb4SJohannes Berg 		__field(s32, pattern_idx)
3352cd8f7cb4SJohannes Berg 		__field(u32, packet_len)
3353a92eecbbSJohannes Berg 		__dynamic_array(u8, packet,
3354a92eecbbSJohannes Berg 				wakeup ? wakeup->packet_present_len : 0)
3355cd8f7cb4SJohannes Berg 	),
3356cd8f7cb4SJohannes Berg 	TP_fast_assign(
3357cd8f7cb4SJohannes Berg 		WIPHY_ASSIGN;
3358cd8f7cb4SJohannes Berg 		WDEV_ASSIGN;
3359a92eecbbSJohannes Berg 		__entry->non_wireless = !wakeup;
3360a92eecbbSJohannes Berg 		__entry->disconnect = wakeup ? wakeup->disconnect : false;
3361a92eecbbSJohannes Berg 		__entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
3362a92eecbbSJohannes Berg 		__entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
3363a92eecbbSJohannes Berg 		__entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
3364a92eecbbSJohannes Berg 		__entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
3365a92eecbbSJohannes Berg 		__entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
3366a92eecbbSJohannes Berg 		__entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
3367a92eecbbSJohannes Berg 		__entry->packet_len = wakeup ? wakeup->packet_len : false;
3368a92eecbbSJohannes Berg 		if (wakeup && wakeup->packet && wakeup->packet_present_len)
3369cd8f7cb4SJohannes Berg 			memcpy(__get_dynamic_array(packet), wakeup->packet,
3370cd8f7cb4SJohannes Berg 			       wakeup->packet_present_len);
3371cd8f7cb4SJohannes Berg 	),
3372cd8f7cb4SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
3373cd8f7cb4SJohannes Berg );
3374cd8f7cb4SJohannes Berg 
3375355199e0SJouni Malinen TRACE_EVENT(cfg80211_ft_event,
3376355199e0SJouni Malinen 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3377355199e0SJouni Malinen 		 struct cfg80211_ft_event_params *ft_event),
3378355199e0SJouni Malinen 	TP_ARGS(wiphy, netdev, ft_event),
3379355199e0SJouni Malinen 	TP_STRUCT__entry(
3380355199e0SJouni Malinen 		WIPHY_ENTRY
3381355199e0SJouni Malinen 		NETDEV_ENTRY
3382355199e0SJouni Malinen 		__dynamic_array(u8, ies, ft_event->ies_len)
3383355199e0SJouni Malinen 		MAC_ENTRY(target_ap)
3384355199e0SJouni Malinen 		__dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
3385355199e0SJouni Malinen 	),
3386355199e0SJouni Malinen 	TP_fast_assign(
3387355199e0SJouni Malinen 		WIPHY_ASSIGN;
3388355199e0SJouni Malinen 		NETDEV_ASSIGN;
3389355199e0SJouni Malinen 		if (ft_event->ies)
3390355199e0SJouni Malinen 			memcpy(__get_dynamic_array(ies), ft_event->ies,
3391355199e0SJouni Malinen 			       ft_event->ies_len);
3392355199e0SJouni Malinen 		MAC_ASSIGN(target_ap, ft_event->target_ap);
3393355199e0SJouni Malinen 		if (ft_event->ric_ies)
3394355199e0SJouni Malinen 			memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
3395355199e0SJouni Malinen 			       ft_event->ric_ies_len);
3396355199e0SJouni Malinen 	),
3397355199e0SJouni Malinen 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT,
3398355199e0SJouni Malinen 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
3399355199e0SJouni Malinen );
3400355199e0SJouni Malinen 
3401f04c2203SMichal Kazior TRACE_EVENT(cfg80211_stop_iface,
3402f04c2203SMichal Kazior 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
3403f04c2203SMichal Kazior 	TP_ARGS(wiphy, wdev),
3404f04c2203SMichal Kazior 	TP_STRUCT__entry(
3405f04c2203SMichal Kazior 		WIPHY_ENTRY
3406f04c2203SMichal Kazior 		WDEV_ENTRY
3407f04c2203SMichal Kazior 	),
3408f04c2203SMichal Kazior 	TP_fast_assign(
3409f04c2203SMichal Kazior 		WIPHY_ASSIGN;
3410f04c2203SMichal Kazior 		WDEV_ASSIGN;
3411f04c2203SMichal Kazior 	),
3412f04c2203SMichal Kazior 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
3413f04c2203SMichal Kazior 		  WIPHY_PR_ARG, WDEV_PR_ARG)
3414f04c2203SMichal Kazior );
34159bb7e0f2SJohannes Berg 
34169bb7e0f2SJohannes Berg TRACE_EVENT(cfg80211_pmsr_report,
34179bb7e0f2SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
34189bb7e0f2SJohannes Berg 		 u64 cookie, const u8 *addr),
34199bb7e0f2SJohannes Berg 	TP_ARGS(wiphy, wdev, cookie, addr),
34209bb7e0f2SJohannes Berg 	TP_STRUCT__entry(
34219bb7e0f2SJohannes Berg 		WIPHY_ENTRY
34229bb7e0f2SJohannes Berg 		WDEV_ENTRY
34239bb7e0f2SJohannes Berg 		__field(u64, cookie)
34249bb7e0f2SJohannes Berg 		MAC_ENTRY(addr)
34259bb7e0f2SJohannes Berg 	),
34269bb7e0f2SJohannes Berg 	TP_fast_assign(
34279bb7e0f2SJohannes Berg 		WIPHY_ASSIGN;
34289bb7e0f2SJohannes Berg 		WDEV_ASSIGN;
34299bb7e0f2SJohannes Berg 		__entry->cookie = cookie;
34309bb7e0f2SJohannes Berg 		MAC_ASSIGN(addr, addr);
34319bb7e0f2SJohannes Berg 	),
34329bb7e0f2SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie:%lld, " MAC_PR_FMT,
34339bb7e0f2SJohannes Berg 		  WIPHY_PR_ARG, WDEV_PR_ARG,
34349bb7e0f2SJohannes Berg 		  (unsigned long long)__entry->cookie,
34359bb7e0f2SJohannes Berg 		  MAC_PR_ARG(addr))
34369bb7e0f2SJohannes Berg );
34379bb7e0f2SJohannes Berg 
34389bb7e0f2SJohannes Berg TRACE_EVENT(cfg80211_pmsr_complete,
34399bb7e0f2SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
34409bb7e0f2SJohannes Berg 	TP_ARGS(wiphy, wdev, cookie),
34419bb7e0f2SJohannes Berg 	TP_STRUCT__entry(
34429bb7e0f2SJohannes Berg 		WIPHY_ENTRY
34439bb7e0f2SJohannes Berg 		WDEV_ENTRY
34449bb7e0f2SJohannes Berg 		__field(u64, cookie)
34459bb7e0f2SJohannes Berg 	),
34469bb7e0f2SJohannes Berg 	TP_fast_assign(
34479bb7e0f2SJohannes Berg 		WIPHY_ASSIGN;
34489bb7e0f2SJohannes Berg 		WDEV_ASSIGN;
34499bb7e0f2SJohannes Berg 		__entry->cookie = cookie;
34509bb7e0f2SJohannes Berg 	),
34519bb7e0f2SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie:%lld",
34529bb7e0f2SJohannes Berg 		  WIPHY_PR_ARG, WDEV_PR_ARG,
34539bb7e0f2SJohannes Berg 		  (unsigned long long)__entry->cookie)
34549bb7e0f2SJohannes Berg );
3455cb74e977SSunil Dutt 
3456cb74e977SSunil Dutt TRACE_EVENT(rdev_update_owe_info,
3457cb74e977SSunil Dutt 	    TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3458cb74e977SSunil Dutt 		     struct cfg80211_update_owe_info *owe_info),
3459cb74e977SSunil Dutt 	    TP_ARGS(wiphy, netdev, owe_info),
3460cb74e977SSunil Dutt 	    TP_STRUCT__entry(WIPHY_ENTRY
3461cb74e977SSunil Dutt 			     NETDEV_ENTRY
3462cb74e977SSunil Dutt 			     MAC_ENTRY(peer)
3463cb74e977SSunil Dutt 			     __field(u16, status)
3464cb74e977SSunil Dutt 			     __dynamic_array(u8, ie, owe_info->ie_len)),
3465cb74e977SSunil Dutt 	    TP_fast_assign(WIPHY_ASSIGN;
3466cb74e977SSunil Dutt 			   NETDEV_ASSIGN;
3467cb74e977SSunil Dutt 			   MAC_ASSIGN(peer, owe_info->peer);
3468cb74e977SSunil Dutt 			   __entry->status = owe_info->status;
3469cb74e977SSunil Dutt 			   memcpy(__get_dynamic_array(ie),
3470cb74e977SSunil Dutt 				  owe_info->ie, owe_info->ie_len);),
3471cb74e977SSunil Dutt 	    TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT
3472cb74e977SSunil Dutt 		  " status %d", WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
3473cb74e977SSunil Dutt 		  __entry->status)
3474cb74e977SSunil Dutt );
3475cb74e977SSunil Dutt 
3476cb74e977SSunil Dutt TRACE_EVENT(cfg80211_update_owe_info_event,
3477cb74e977SSunil Dutt 	    TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3478cb74e977SSunil Dutt 		     struct cfg80211_update_owe_info *owe_info),
3479cb74e977SSunil Dutt 	    TP_ARGS(wiphy, netdev, owe_info),
3480cb74e977SSunil Dutt 	    TP_STRUCT__entry(WIPHY_ENTRY
3481cb74e977SSunil Dutt 			     NETDEV_ENTRY
3482cb74e977SSunil Dutt 			     MAC_ENTRY(peer)
3483cb74e977SSunil Dutt 			     __dynamic_array(u8, ie, owe_info->ie_len)),
3484cb74e977SSunil Dutt 	    TP_fast_assign(WIPHY_ASSIGN;
3485cb74e977SSunil Dutt 			   NETDEV_ASSIGN;
3486cb74e977SSunil Dutt 			   MAC_ASSIGN(peer, owe_info->peer);
3487cb74e977SSunil Dutt 			   memcpy(__get_dynamic_array(ie), owe_info->ie,
3488cb74e977SSunil Dutt 				  owe_info->ie_len);),
3489cb74e977SSunil Dutt 	    TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
3490cb74e977SSunil Dutt 		      WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
3491cb74e977SSunil Dutt );
3492cb74e977SSunil Dutt 
34935ab92e7fSRajkumar Manoharan TRACE_EVENT(rdev_probe_mesh_link,
34945ab92e7fSRajkumar Manoharan 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
34955ab92e7fSRajkumar Manoharan 		 const u8 *dest, const u8 *buf, size_t len),
34965ab92e7fSRajkumar Manoharan 	TP_ARGS(wiphy, netdev, dest, buf, len),
34975ab92e7fSRajkumar Manoharan 	TP_STRUCT__entry(
34985ab92e7fSRajkumar Manoharan 		WIPHY_ENTRY
34995ab92e7fSRajkumar Manoharan 		NETDEV_ENTRY
35005ab92e7fSRajkumar Manoharan 		MAC_ENTRY(dest)
35015ab92e7fSRajkumar Manoharan 	),
35025ab92e7fSRajkumar Manoharan 	TP_fast_assign(
35035ab92e7fSRajkumar Manoharan 		WIPHY_ASSIGN;
35045ab92e7fSRajkumar Manoharan 		NETDEV_ASSIGN;
35055ab92e7fSRajkumar Manoharan 		MAC_ASSIGN(dest, dest);
35065ab92e7fSRajkumar Manoharan 	),
35075ab92e7fSRajkumar Manoharan 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
35085ab92e7fSRajkumar Manoharan 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dest))
35095ab92e7fSRajkumar Manoharan );
35105ab92e7fSRajkumar Manoharan 
351177f576deSTamizh chelvam TRACE_EVENT(rdev_set_tid_config,
351277f576deSTamizh chelvam 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
35133710a8a6SJohannes Berg 		 struct cfg80211_tid_config *tid_conf),
351477f576deSTamizh chelvam 	TP_ARGS(wiphy, netdev, tid_conf),
351577f576deSTamizh chelvam 	TP_STRUCT__entry(
351677f576deSTamizh chelvam 		WIPHY_ENTRY
351777f576deSTamizh chelvam 		NETDEV_ENTRY
351877f576deSTamizh chelvam 		MAC_ENTRY(peer)
351977f576deSTamizh chelvam 	),
352077f576deSTamizh chelvam 	TP_fast_assign(
352177f576deSTamizh chelvam 		WIPHY_ASSIGN;
352277f576deSTamizh chelvam 		NETDEV_ASSIGN;
352377f576deSTamizh chelvam 		MAC_ASSIGN(peer, tid_conf->peer);
352477f576deSTamizh chelvam 	),
352577f576deSTamizh chelvam 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
352677f576deSTamizh chelvam 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
352777f576deSTamizh chelvam );
352877f576deSTamizh chelvam 
352977f576deSTamizh chelvam TRACE_EVENT(rdev_reset_tid_config,
353077f576deSTamizh chelvam 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
35313710a8a6SJohannes Berg 		 const u8 *peer, u8 tids),
35323710a8a6SJohannes Berg 	TP_ARGS(wiphy, netdev, peer, tids),
353377f576deSTamizh chelvam 	TP_STRUCT__entry(
353477f576deSTamizh chelvam 		WIPHY_ENTRY
353577f576deSTamizh chelvam 		NETDEV_ENTRY
353677f576deSTamizh chelvam 		MAC_ENTRY(peer)
35373710a8a6SJohannes Berg 		__field(u8, tids)
353877f576deSTamizh chelvam 	),
353977f576deSTamizh chelvam 	TP_fast_assign(
354077f576deSTamizh chelvam 		WIPHY_ASSIGN;
354177f576deSTamizh chelvam 		NETDEV_ASSIGN;
354277f576deSTamizh chelvam 		MAC_ASSIGN(peer, peer);
35433710a8a6SJohannes Berg 		__entry->tids = tids;
354477f576deSTamizh chelvam 	),
35453710a8a6SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", tids: 0x%x",
35463710a8a6SJohannes Berg 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tids)
354777f576deSTamizh chelvam );
354814e8a3c4SBeni Lev #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
354914e8a3c4SBeni Lev 
355014e8a3c4SBeni Lev #undef TRACE_INCLUDE_PATH
355114e8a3c4SBeni Lev #define TRACE_INCLUDE_PATH .
355214e8a3c4SBeni Lev #undef TRACE_INCLUDE_FILE
355314e8a3c4SBeni Lev #define TRACE_INCLUDE_FILE trace
355414e8a3c4SBeni Lev #include <trace/define_trace.h>
3555