xref: /openbmc/linux/net/wireless/trace.h (revision 3710a8a6284f58a78ba4fe9c4b6672207636a223)
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) \
1159cf0a0b4SAlexei Avshalom Lazar 		   __field(u32, center_freq)
11614e8a3c4SBeni Lev #define CHAN_ASSIGN(chan)					  \
11714e8a3c4SBeni Lev 	do {							  \
11814e8a3c4SBeni Lev 		if (chan) {					  \
11914e8a3c4SBeni Lev 			__entry->band = chan->band;		  \
12014e8a3c4SBeni Lev 			__entry->center_freq = chan->center_freq; \
12114e8a3c4SBeni Lev 		} else {					  \
12214e8a3c4SBeni Lev 			__entry->band = 0;			  \
12314e8a3c4SBeni Lev 			__entry->center_freq = 0;		  \
12414e8a3c4SBeni Lev 		}						  \
12514e8a3c4SBeni Lev 	} while (0)
126ec816087SJohannes Berg #define CHAN_PR_FMT "band: %d, freq: %u"
12714e8a3c4SBeni Lev #define CHAN_PR_ARG __entry->band, __entry->center_freq
12814e8a3c4SBeni Lev 
12957fbcce3SJohannes Berg #define CHAN_DEF_ENTRY __field(enum nl80211_band, band)		\
1303d9d1d66SJohannes Berg 		       __field(u32, control_freq)			\
1313d9d1d66SJohannes Berg 		       __field(u32, width)				\
1323d9d1d66SJohannes Berg 		       __field(u32, center_freq1)			\
1333d9d1d66SJohannes Berg 		       __field(u32, center_freq2)
134683b6d3bSJohannes Berg #define CHAN_DEF_ASSIGN(chandef)					\
135683b6d3bSJohannes Berg 	do {								\
136683b6d3bSJohannes Berg 		if ((chandef) && (chandef)->chan) {			\
137683b6d3bSJohannes Berg 			__entry->band = (chandef)->chan->band;		\
1383d9d1d66SJohannes Berg 			__entry->control_freq =				\
139683b6d3bSJohannes Berg 				(chandef)->chan->center_freq;		\
1403d9d1d66SJohannes Berg 			__entry->width = (chandef)->width;		\
1413d9d1d66SJohannes Berg 			__entry->center_freq1 = (chandef)->center_freq1;\
1423d9d1d66SJohannes Berg 			__entry->center_freq2 = (chandef)->center_freq2;\
143683b6d3bSJohannes Berg 		} else {						\
144683b6d3bSJohannes Berg 			__entry->band = 0;				\
1453d9d1d66SJohannes Berg 			__entry->control_freq = 0;			\
1463d9d1d66SJohannes Berg 			__entry->width = 0;				\
1473d9d1d66SJohannes Berg 			__entry->center_freq1 = 0;			\
1483d9d1d66SJohannes Berg 			__entry->center_freq2 = 0;			\
149683b6d3bSJohannes Berg 		}							\
150683b6d3bSJohannes Berg 	} while (0)
1513d9d1d66SJohannes Berg #define CHAN_DEF_PR_FMT							\
152ec816087SJohannes Berg 	"band: %d, control freq: %u, width: %d, cf1: %u, cf2: %u"
1533d9d1d66SJohannes Berg #define CHAN_DEF_PR_ARG __entry->band, __entry->control_freq,		\
1543d9d1d66SJohannes Berg 			__entry->width, __entry->center_freq1,		\
1553d9d1d66SJohannes Berg 			__entry->center_freq2
156683b6d3bSJohannes Berg 
15714e8a3c4SBeni Lev #define SINFO_ENTRY __field(int, generation)	    \
15814e8a3c4SBeni Lev 		    __field(u32, connected_time)    \
15914e8a3c4SBeni Lev 		    __field(u32, inactive_time)	    \
16014e8a3c4SBeni Lev 		    __field(u32, rx_bytes)	    \
16114e8a3c4SBeni Lev 		    __field(u32, tx_bytes)	    \
16214e8a3c4SBeni Lev 		    __field(u32, rx_packets)	    \
16314e8a3c4SBeni Lev 		    __field(u32, tx_packets)	    \
16414e8a3c4SBeni Lev 		    __field(u32, tx_retries)	    \
16514e8a3c4SBeni Lev 		    __field(u32, tx_failed)	    \
16614e8a3c4SBeni Lev 		    __field(u32, rx_dropped_misc)   \
16714e8a3c4SBeni Lev 		    __field(u32, beacon_loss_count) \
16814e8a3c4SBeni Lev 		    __field(u16, llid)		    \
16914e8a3c4SBeni Lev 		    __field(u16, plid)		    \
17014e8a3c4SBeni Lev 		    __field(u8, plink_state)
17114e8a3c4SBeni Lev #define SINFO_ASSIGN						       \
17214e8a3c4SBeni Lev 	do {							       \
17314e8a3c4SBeni Lev 		__entry->generation = sinfo->generation;	       \
17414e8a3c4SBeni Lev 		__entry->connected_time = sinfo->connected_time;       \
17514e8a3c4SBeni Lev 		__entry->inactive_time = sinfo->inactive_time;	       \
17614e8a3c4SBeni Lev 		__entry->rx_bytes = sinfo->rx_bytes;		       \
17714e8a3c4SBeni Lev 		__entry->tx_bytes = sinfo->tx_bytes;		       \
17814e8a3c4SBeni Lev 		__entry->rx_packets = sinfo->rx_packets;	       \
17914e8a3c4SBeni Lev 		__entry->tx_packets = sinfo->tx_packets;	       \
18014e8a3c4SBeni Lev 		__entry->tx_retries = sinfo->tx_retries;	       \
18114e8a3c4SBeni Lev 		__entry->tx_failed = sinfo->tx_failed;		       \
18214e8a3c4SBeni Lev 		__entry->rx_dropped_misc = sinfo->rx_dropped_misc;     \
18314e8a3c4SBeni Lev 		__entry->beacon_loss_count = sinfo->beacon_loss_count; \
18414e8a3c4SBeni Lev 		__entry->llid = sinfo->llid;			       \
18514e8a3c4SBeni Lev 		__entry->plid = sinfo->plid;			       \
18614e8a3c4SBeni Lev 		__entry->plink_state = sinfo->plink_state;	       \
18714e8a3c4SBeni Lev 	} while (0)
18814e8a3c4SBeni Lev 
18914e8a3c4SBeni Lev #define BOOL_TO_STR(bo) (bo) ? "true" : "false"
19014e8a3c4SBeni Lev 
191fa9ffc74SKyeyoon Park #define QOS_MAP_ENTRY __field(u8, num_des)			\
192fa9ffc74SKyeyoon Park 		      __array(u8, dscp_exception,		\
193fa9ffc74SKyeyoon Park 			      2 * IEEE80211_QOS_MAP_MAX_EX)	\
194fa9ffc74SKyeyoon Park 		      __array(u8, up, IEEE80211_QOS_MAP_LEN_MIN)
195fa9ffc74SKyeyoon Park #define QOS_MAP_ASSIGN(qos_map)					\
196fa9ffc74SKyeyoon Park 	do {							\
197fa9ffc74SKyeyoon Park 		if ((qos_map)) {				\
198fa9ffc74SKyeyoon Park 			__entry->num_des = (qos_map)->num_des;	\
199fa9ffc74SKyeyoon Park 			memcpy(__entry->dscp_exception,		\
200fa9ffc74SKyeyoon Park 			       &(qos_map)->dscp_exception,	\
201fa9ffc74SKyeyoon Park 			       2 * IEEE80211_QOS_MAP_MAX_EX);	\
202fa9ffc74SKyeyoon Park 			memcpy(__entry->up, &(qos_map)->up,	\
203fa9ffc74SKyeyoon Park 			       IEEE80211_QOS_MAP_LEN_MIN);	\
204fa9ffc74SKyeyoon Park 		} else {					\
205fa9ffc74SKyeyoon Park 			__entry->num_des = 0;			\
206fa9ffc74SKyeyoon Park 			memset(__entry->dscp_exception, 0,	\
207fa9ffc74SKyeyoon Park 			       2 * IEEE80211_QOS_MAP_MAX_EX);	\
208fa9ffc74SKyeyoon Park 			memset(__entry->up, 0,			\
209fa9ffc74SKyeyoon Park 			       IEEE80211_QOS_MAP_LEN_MIN);	\
210fa9ffc74SKyeyoon Park 		}						\
211fa9ffc74SKyeyoon Park 	} while (0)
212fa9ffc74SKyeyoon Park 
21314e8a3c4SBeni Lev /*************************************************************
21414e8a3c4SBeni Lev  *			rdev->ops traces		     *
21514e8a3c4SBeni Lev  *************************************************************/
21614e8a3c4SBeni Lev 
21714e8a3c4SBeni Lev TRACE_EVENT(rdev_suspend,
21814e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_wowlan *wow),
21914e8a3c4SBeni Lev 	TP_ARGS(wiphy, wow),
22014e8a3c4SBeni Lev 	TP_STRUCT__entry(
22114e8a3c4SBeni Lev 		WIPHY_ENTRY
22214e8a3c4SBeni Lev 		__field(bool, any)
22314e8a3c4SBeni Lev 		__field(bool, disconnect)
22414e8a3c4SBeni Lev 		__field(bool, magic_pkt)
22514e8a3c4SBeni Lev 		__field(bool, gtk_rekey_failure)
22614e8a3c4SBeni Lev 		__field(bool, eap_identity_req)
22714e8a3c4SBeni Lev 		__field(bool, four_way_handshake)
22814e8a3c4SBeni Lev 		__field(bool, rfkill_release)
22914e8a3c4SBeni Lev 		__field(bool, valid_wow)
23014e8a3c4SBeni Lev 	),
23114e8a3c4SBeni Lev 	TP_fast_assign(
23214e8a3c4SBeni Lev 		WIPHY_ASSIGN;
23314e8a3c4SBeni Lev 		if (wow) {
23414e8a3c4SBeni Lev 			__entry->any = wow->any;
23514e8a3c4SBeni Lev 			__entry->disconnect = wow->disconnect;
23614e8a3c4SBeni Lev 			__entry->magic_pkt = wow->magic_pkt;
23714e8a3c4SBeni Lev 			__entry->gtk_rekey_failure = wow->gtk_rekey_failure;
23814e8a3c4SBeni Lev 			__entry->eap_identity_req = wow->eap_identity_req;
23914e8a3c4SBeni Lev 			__entry->four_way_handshake = wow->four_way_handshake;
24014e8a3c4SBeni Lev 			__entry->rfkill_release = wow->rfkill_release;
24114e8a3c4SBeni Lev 			__entry->valid_wow = true;
24214e8a3c4SBeni Lev 		} else {
24314e8a3c4SBeni Lev 			__entry->valid_wow = false;
24414e8a3c4SBeni Lev 		}
24514e8a3c4SBeni Lev 	),
24614e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", wow%s - any: %d, disconnect: %d, "
24714e8a3c4SBeni Lev 		  "magic pkt: %d, gtk rekey failure: %d, eap identify req: %d, "
24814e8a3c4SBeni Lev 		  "four way handshake: %d, rfkill release: %d.",
24914e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->valid_wow ? "" : "(Not configured!)",
25014e8a3c4SBeni Lev 		  __entry->any, __entry->disconnect, __entry->magic_pkt,
25114e8a3c4SBeni Lev 		  __entry->gtk_rekey_failure, __entry->eap_identity_req,
25214e8a3c4SBeni Lev 		  __entry->four_way_handshake, __entry->rfkill_release)
25314e8a3c4SBeni Lev );
25414e8a3c4SBeni Lev 
25514e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int,
25614e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret),
25714e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret),
25814e8a3c4SBeni Lev 	TP_STRUCT__entry(
25914e8a3c4SBeni Lev 		WIPHY_ENTRY
26014e8a3c4SBeni Lev 		__field(int, ret)
26114e8a3c4SBeni Lev 	),
26214e8a3c4SBeni Lev 	TP_fast_assign(
26314e8a3c4SBeni Lev 		WIPHY_ASSIGN;
26414e8a3c4SBeni Lev 		__entry->ret = ret;
26514e8a3c4SBeni Lev 	),
26614e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned: %d", WIPHY_PR_ARG, __entry->ret)
26714e8a3c4SBeni Lev );
26814e8a3c4SBeni Lev 
26914e8a3c4SBeni Lev TRACE_EVENT(rdev_scan,
27014e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_scan_request *request),
27114e8a3c4SBeni Lev 	TP_ARGS(wiphy, request),
27214e8a3c4SBeni Lev 	TP_STRUCT__entry(
27314e8a3c4SBeni Lev 		WIPHY_ENTRY
27414e8a3c4SBeni Lev 	),
27514e8a3c4SBeni Lev 	TP_fast_assign(
27614e8a3c4SBeni Lev 		WIPHY_ASSIGN;
27714e8a3c4SBeni Lev 	),
27814e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
27914e8a3c4SBeni Lev );
28014e8a3c4SBeni Lev 
28114e8a3c4SBeni Lev DECLARE_EVENT_CLASS(wiphy_only_evt,
28214e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
28314e8a3c4SBeni Lev 	TP_ARGS(wiphy),
28414e8a3c4SBeni Lev 	TP_STRUCT__entry(
28514e8a3c4SBeni Lev 		WIPHY_ENTRY
28614e8a3c4SBeni Lev 	),
28714e8a3c4SBeni Lev 	TP_fast_assign(
28814e8a3c4SBeni Lev 		WIPHY_ASSIGN;
28914e8a3c4SBeni Lev 	),
29014e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
29114e8a3c4SBeni Lev );
29214e8a3c4SBeni Lev 
29314e8a3c4SBeni Lev DEFINE_EVENT(wiphy_only_evt, rdev_resume,
29414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
29514e8a3c4SBeni Lev 	TP_ARGS(wiphy)
29614e8a3c4SBeni Lev );
29714e8a3c4SBeni Lev 
29814e8a3c4SBeni Lev DEFINE_EVENT(wiphy_only_evt, rdev_return_void,
29914e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
30014e8a3c4SBeni Lev 	TP_ARGS(wiphy)
30114e8a3c4SBeni Lev );
30214e8a3c4SBeni Lev 
30314e8a3c4SBeni Lev DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna,
30414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
30514e8a3c4SBeni Lev 	TP_ARGS(wiphy)
30614e8a3c4SBeni Lev );
30714e8a3c4SBeni Lev 
30814e8a3c4SBeni Lev DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll,
30914e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
31014e8a3c4SBeni Lev 	TP_ARGS(wiphy)
31114e8a3c4SBeni Lev );
31214e8a3c4SBeni Lev 
31314e8a3c4SBeni Lev DECLARE_EVENT_CLASS(wiphy_enabled_evt,
31414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, bool enabled),
31514e8a3c4SBeni Lev 	TP_ARGS(wiphy, enabled),
31614e8a3c4SBeni Lev 	TP_STRUCT__entry(
31714e8a3c4SBeni Lev 		WIPHY_ENTRY
31814e8a3c4SBeni Lev 		__field(bool, enabled)
31914e8a3c4SBeni Lev 	),
32014e8a3c4SBeni Lev 	TP_fast_assign(
32114e8a3c4SBeni Lev 		WIPHY_ASSIGN;
32214e8a3c4SBeni Lev 		__entry->enabled = enabled;
32314e8a3c4SBeni Lev 	),
32414e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", %senabled ",
32514e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->enabled ? "" : "not ")
32614e8a3c4SBeni Lev );
32714e8a3c4SBeni Lev 
32814e8a3c4SBeni Lev DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup,
32914e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, bool enabled),
33014e8a3c4SBeni Lev 	TP_ARGS(wiphy, enabled)
33114e8a3c4SBeni Lev );
33214e8a3c4SBeni Lev 
33314e8a3c4SBeni Lev TRACE_EVENT(rdev_add_virtual_intf,
33414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type),
33514e8a3c4SBeni Lev 	TP_ARGS(wiphy, name, type),
33614e8a3c4SBeni Lev 	TP_STRUCT__entry(
33714e8a3c4SBeni Lev 		WIPHY_ENTRY
33814e8a3c4SBeni Lev 		__string(vir_intf_name, name ? name : "<noname>")
33914e8a3c4SBeni Lev 		__field(enum nl80211_iftype, type)
34014e8a3c4SBeni Lev 	),
34114e8a3c4SBeni Lev 	TP_fast_assign(
34214e8a3c4SBeni Lev 		WIPHY_ASSIGN;
34314e8a3c4SBeni Lev 		__assign_str(vir_intf_name, name ? name : "<noname>");
34414e8a3c4SBeni Lev 		__entry->type = type;
34514e8a3c4SBeni Lev 	),
34614e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d",
34714e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type)
34814e8a3c4SBeni Lev );
34914e8a3c4SBeni Lev 
35014e8a3c4SBeni Lev DECLARE_EVENT_CLASS(wiphy_wdev_evt,
35114e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
35214e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev),
35314e8a3c4SBeni Lev 	TP_STRUCT__entry(
35414e8a3c4SBeni Lev 		WIPHY_ENTRY
35514e8a3c4SBeni Lev 		WDEV_ENTRY
35614e8a3c4SBeni Lev 	),
35714e8a3c4SBeni Lev 	TP_fast_assign(
35814e8a3c4SBeni Lev 		WIPHY_ASSIGN;
35914e8a3c4SBeni Lev 		WDEV_ASSIGN;
36014e8a3c4SBeni Lev 	),
361ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
36214e8a3c4SBeni Lev );
36314e8a3c4SBeni Lev 
3649bb7e0f2SJohannes Berg DECLARE_EVENT_CLASS(wiphy_wdev_cookie_evt,
3659bb7e0f2SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
3669bb7e0f2SJohannes Berg 	TP_ARGS(wiphy, wdev, cookie),
3679bb7e0f2SJohannes Berg 	TP_STRUCT__entry(
3689bb7e0f2SJohannes Berg 		WIPHY_ENTRY
3699bb7e0f2SJohannes Berg 		WDEV_ENTRY
3709bb7e0f2SJohannes Berg 		__field(u64, cookie)
3719bb7e0f2SJohannes Berg 	),
3729bb7e0f2SJohannes Berg 	TP_fast_assign(
3739bb7e0f2SJohannes Berg 		WIPHY_ASSIGN;
3749bb7e0f2SJohannes Berg 		WDEV_ASSIGN;
3759bb7e0f2SJohannes Berg 		__entry->cookie = cookie;
3769bb7e0f2SJohannes Berg 	),
3779bb7e0f2SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %lld",
3789bb7e0f2SJohannes Berg 		  WIPHY_PR_ARG, WDEV_PR_ARG,
3799bb7e0f2SJohannes Berg 		  (unsigned long long)__entry->cookie)
3809bb7e0f2SJohannes Berg );
3819bb7e0f2SJohannes Berg 
38214e8a3c4SBeni Lev DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev,
38314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
38414e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev)
38514e8a3c4SBeni Lev );
38614e8a3c4SBeni Lev 
38714e8a3c4SBeni Lev DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf,
38814e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
38914e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev)
39014e8a3c4SBeni Lev );
39114e8a3c4SBeni Lev 
39214e8a3c4SBeni Lev TRACE_EVENT(rdev_change_virtual_intf,
39314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
39414e8a3c4SBeni Lev 		 enum nl80211_iftype type),
39514e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, type),
39614e8a3c4SBeni Lev 	TP_STRUCT__entry(
39714e8a3c4SBeni Lev 		WIPHY_ENTRY
39814e8a3c4SBeni Lev 		NETDEV_ENTRY
39914e8a3c4SBeni Lev 		__field(enum nl80211_iftype, type)
40014e8a3c4SBeni Lev 	),
40114e8a3c4SBeni Lev 	TP_fast_assign(
40214e8a3c4SBeni Lev 		WIPHY_ASSIGN;
40314e8a3c4SBeni Lev 		NETDEV_ASSIGN;
40414e8a3c4SBeni Lev 		__entry->type = type;
40514e8a3c4SBeni Lev 	),
406ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", type: %d",
40714e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type)
40814e8a3c4SBeni Lev );
40914e8a3c4SBeni Lev 
41014e8a3c4SBeni Lev DECLARE_EVENT_CLASS(key_handle,
41114e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
41214e8a3c4SBeni Lev 		 bool pairwise, const u8 *mac_addr),
41314e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr),
41414e8a3c4SBeni Lev 	TP_STRUCT__entry(
41514e8a3c4SBeni Lev 		WIPHY_ENTRY
41614e8a3c4SBeni Lev 		NETDEV_ENTRY
41714e8a3c4SBeni Lev 		MAC_ENTRY(mac_addr)
41814e8a3c4SBeni Lev 		__field(u8, key_index)
41914e8a3c4SBeni Lev 		__field(bool, pairwise)
42014e8a3c4SBeni Lev 	),
42114e8a3c4SBeni Lev 	TP_fast_assign(
42214e8a3c4SBeni Lev 		WIPHY_ASSIGN;
42314e8a3c4SBeni Lev 		NETDEV_ASSIGN;
42414e8a3c4SBeni Lev 		MAC_ASSIGN(mac_addr, mac_addr);
42514e8a3c4SBeni Lev 		__entry->key_index = key_index;
42614e8a3c4SBeni Lev 		__entry->pairwise = pairwise;
42714e8a3c4SBeni Lev 	),
428ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key_index: %u, pairwise: %s, mac addr: " MAC_PR_FMT,
42914e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
43014e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->pairwise), MAC_PR_ARG(mac_addr))
43114e8a3c4SBeni Lev );
43214e8a3c4SBeni Lev 
43314e8a3c4SBeni Lev DEFINE_EVENT(key_handle, rdev_get_key,
43414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
43514e8a3c4SBeni Lev 		 bool pairwise, const u8 *mac_addr),
43614e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
43714e8a3c4SBeni Lev );
43814e8a3c4SBeni Lev 
43914e8a3c4SBeni Lev DEFINE_EVENT(key_handle, rdev_del_key,
44014e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
44114e8a3c4SBeni Lev 		 bool pairwise, const u8 *mac_addr),
44214e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
44314e8a3c4SBeni Lev );
44414e8a3c4SBeni Lev 
4456cdd3979SAlexander Wetzel TRACE_EVENT(rdev_add_key,
4466cdd3979SAlexander Wetzel 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
4476cdd3979SAlexander Wetzel 		 bool pairwise, const u8 *mac_addr, u8 mode),
4486cdd3979SAlexander Wetzel 	TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr, mode),
4496cdd3979SAlexander Wetzel 	TP_STRUCT__entry(
4506cdd3979SAlexander Wetzel 		WIPHY_ENTRY
4516cdd3979SAlexander Wetzel 		NETDEV_ENTRY
4526cdd3979SAlexander Wetzel 		MAC_ENTRY(mac_addr)
4536cdd3979SAlexander Wetzel 		__field(u8, key_index)
4546cdd3979SAlexander Wetzel 		__field(bool, pairwise)
4556cdd3979SAlexander Wetzel 		__field(u8, mode)
4566cdd3979SAlexander Wetzel 	),
4576cdd3979SAlexander Wetzel 	TP_fast_assign(
4586cdd3979SAlexander Wetzel 		WIPHY_ASSIGN;
4596cdd3979SAlexander Wetzel 		NETDEV_ASSIGN;
4606cdd3979SAlexander Wetzel 		MAC_ASSIGN(mac_addr, mac_addr);
4616cdd3979SAlexander Wetzel 		__entry->key_index = key_index;
4626cdd3979SAlexander Wetzel 		__entry->pairwise = pairwise;
4636cdd3979SAlexander Wetzel 		__entry->mode = mode;
4646cdd3979SAlexander Wetzel 	),
4656cdd3979SAlexander Wetzel 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key_index: %u, "
4666cdd3979SAlexander Wetzel 		  "mode: %u, pairwise: %s, mac addr: " MAC_PR_FMT,
4676cdd3979SAlexander Wetzel 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
4686cdd3979SAlexander Wetzel 		  __entry->mode, BOOL_TO_STR(__entry->pairwise),
4696cdd3979SAlexander Wetzel 		  MAC_PR_ARG(mac_addr))
4706cdd3979SAlexander Wetzel );
4716cdd3979SAlexander Wetzel 
47214e8a3c4SBeni Lev TRACE_EVENT(rdev_set_default_key,
47314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
47414e8a3c4SBeni Lev 		 bool unicast, bool multicast),
47514e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, key_index, unicast, multicast),
47614e8a3c4SBeni Lev 	TP_STRUCT__entry(
47714e8a3c4SBeni Lev 		WIPHY_ENTRY
47814e8a3c4SBeni Lev 		NETDEV_ENTRY
47914e8a3c4SBeni Lev 		__field(u8, key_index)
48014e8a3c4SBeni Lev 		__field(bool, unicast)
48114e8a3c4SBeni Lev 		__field(bool, multicast)
48214e8a3c4SBeni Lev 	),
48314e8a3c4SBeni Lev 	TP_fast_assign(
48414e8a3c4SBeni Lev 		WIPHY_ASSIGN;
48514e8a3c4SBeni Lev 		NETDEV_ASSIGN;
48614e8a3c4SBeni Lev 		__entry->key_index = key_index;
48714e8a3c4SBeni Lev 		__entry->unicast = unicast;
48814e8a3c4SBeni Lev 		__entry->multicast = multicast;
48914e8a3c4SBeni Lev 	),
490ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u, unicast: %s, multicast: %s",
49114e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
49214e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->unicast),
49314e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->multicast))
49414e8a3c4SBeni Lev );
49514e8a3c4SBeni Lev 
49614e8a3c4SBeni Lev TRACE_EVENT(rdev_set_default_mgmt_key,
49714e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
49814e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, key_index),
49914e8a3c4SBeni Lev 	TP_STRUCT__entry(
50014e8a3c4SBeni Lev 		WIPHY_ENTRY
50114e8a3c4SBeni Lev 		NETDEV_ENTRY
50214e8a3c4SBeni Lev 		__field(u8, key_index)
50314e8a3c4SBeni Lev 	),
50414e8a3c4SBeni Lev 	TP_fast_assign(
50514e8a3c4SBeni Lev 		WIPHY_ASSIGN;
50614e8a3c4SBeni Lev 		NETDEV_ASSIGN;
50714e8a3c4SBeni Lev 		__entry->key_index = key_index;
50814e8a3c4SBeni Lev 	),
509ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
51014e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
51114e8a3c4SBeni Lev );
51214e8a3c4SBeni Lev 
51356be393fSJouni Malinen TRACE_EVENT(rdev_set_default_beacon_key,
51456be393fSJouni Malinen 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
51556be393fSJouni Malinen 	TP_ARGS(wiphy, netdev, key_index),
51656be393fSJouni Malinen 	TP_STRUCT__entry(
51756be393fSJouni Malinen 		WIPHY_ENTRY
51856be393fSJouni Malinen 		NETDEV_ENTRY
51956be393fSJouni Malinen 		__field(u8, key_index)
52056be393fSJouni Malinen 	),
52156be393fSJouni Malinen 	TP_fast_assign(
52256be393fSJouni Malinen 		WIPHY_ASSIGN;
52356be393fSJouni Malinen 		NETDEV_ASSIGN;
52456be393fSJouni Malinen 		__entry->key_index = key_index;
52556be393fSJouni Malinen 	),
52656be393fSJouni Malinen 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
52756be393fSJouni Malinen 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
52856be393fSJouni Malinen );
52956be393fSJouni Malinen 
53014e8a3c4SBeni Lev TRACE_EVENT(rdev_start_ap,
53114e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
53214e8a3c4SBeni Lev 		 struct cfg80211_ap_settings *settings),
53314e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, settings),
53414e8a3c4SBeni Lev 	TP_STRUCT__entry(
53514e8a3c4SBeni Lev 		WIPHY_ENTRY
53614e8a3c4SBeni Lev 		NETDEV_ENTRY
537683b6d3bSJohannes Berg 		CHAN_DEF_ENTRY
53814e8a3c4SBeni Lev 		__field(int, beacon_interval)
53914e8a3c4SBeni Lev 		__field(int, dtim_period)
54014e8a3c4SBeni Lev 		__array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
54114e8a3c4SBeni Lev 		__field(enum nl80211_hidden_ssid, hidden_ssid)
54214e8a3c4SBeni Lev 		__field(u32, wpa_ver)
54314e8a3c4SBeni Lev 		__field(bool, privacy)
54414e8a3c4SBeni Lev 		__field(enum nl80211_auth_type, auth_type)
54514e8a3c4SBeni Lev 		__field(int, inactivity_timeout)
54614e8a3c4SBeni Lev 	),
54714e8a3c4SBeni Lev 	TP_fast_assign(
54814e8a3c4SBeni Lev 		WIPHY_ASSIGN;
54914e8a3c4SBeni Lev 		NETDEV_ASSIGN;
550683b6d3bSJohannes Berg 		CHAN_DEF_ASSIGN(&settings->chandef);
55114e8a3c4SBeni Lev 		__entry->beacon_interval = settings->beacon_interval;
55214e8a3c4SBeni Lev 		__entry->dtim_period = settings->dtim_period;
55314e8a3c4SBeni Lev 		__entry->hidden_ssid = settings->hidden_ssid;
55414e8a3c4SBeni Lev 		__entry->wpa_ver = settings->crypto.wpa_versions;
55514e8a3c4SBeni Lev 		__entry->privacy = settings->privacy;
55614e8a3c4SBeni Lev 		__entry->auth_type = settings->auth_type;
55714e8a3c4SBeni Lev 		__entry->inactivity_timeout = settings->inactivity_timeout;
55814e8a3c4SBeni Lev 		memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
55914e8a3c4SBeni Lev 		memcpy(__entry->ssid, settings->ssid, settings->ssid_len);
56014e8a3c4SBeni Lev 	),
561ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", AP settings - ssid: %s, "
562683b6d3bSJohannes Berg 		  CHAN_DEF_PR_FMT ", beacon interval: %d, dtim period: %d, "
56314e8a3c4SBeni Lev 		  "hidden ssid: %d, wpa versions: %u, privacy: %s, "
56414e8a3c4SBeni Lev 		  "auth type: %d, inactivity timeout: %d",
565683b6d3bSJohannes Berg 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_DEF_PR_ARG,
56614e8a3c4SBeni Lev 		  __entry->beacon_interval, __entry->dtim_period,
56714e8a3c4SBeni Lev 		  __entry->hidden_ssid, __entry->wpa_ver,
56814e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->privacy), __entry->auth_type,
56914e8a3c4SBeni Lev 		  __entry->inactivity_timeout)
57014e8a3c4SBeni Lev );
57114e8a3c4SBeni Lev 
57214e8a3c4SBeni Lev TRACE_EVENT(rdev_change_beacon,
57314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
57414e8a3c4SBeni Lev 		 struct cfg80211_beacon_data *info),
57514e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, info),
57614e8a3c4SBeni Lev 	TP_STRUCT__entry(
57714e8a3c4SBeni Lev 		WIPHY_ENTRY
57814e8a3c4SBeni Lev 		NETDEV_ENTRY
57914e8a3c4SBeni Lev 		__dynamic_array(u8, head, info ? info->head_len : 0)
58014e8a3c4SBeni Lev 		__dynamic_array(u8, tail, info ? info->tail_len : 0)
58114e8a3c4SBeni Lev 		__dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0)
58214e8a3c4SBeni Lev 		__dynamic_array(u8, proberesp_ies,
58314e8a3c4SBeni Lev 				info ? info->proberesp_ies_len : 0)
58414e8a3c4SBeni Lev 		__dynamic_array(u8, assocresp_ies,
58514e8a3c4SBeni Lev 				info ? info->assocresp_ies_len : 0)
58614e8a3c4SBeni Lev 		__dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0)
58714e8a3c4SBeni Lev 	),
58814e8a3c4SBeni Lev 	TP_fast_assign(
58914e8a3c4SBeni Lev 		WIPHY_ASSIGN;
59014e8a3c4SBeni Lev 		NETDEV_ASSIGN;
59114e8a3c4SBeni Lev 		if (info) {
59214e8a3c4SBeni Lev 			if (info->head)
59314e8a3c4SBeni Lev 				memcpy(__get_dynamic_array(head), info->head,
59414e8a3c4SBeni Lev 				       info->head_len);
59514e8a3c4SBeni Lev 			if (info->tail)
59614e8a3c4SBeni Lev 				memcpy(__get_dynamic_array(tail), info->tail,
59714e8a3c4SBeni Lev 				       info->tail_len);
59814e8a3c4SBeni Lev 			if (info->beacon_ies)
59914e8a3c4SBeni Lev 				memcpy(__get_dynamic_array(beacon_ies),
60014e8a3c4SBeni Lev 				       info->beacon_ies, info->beacon_ies_len);
60114e8a3c4SBeni Lev 			if (info->proberesp_ies)
60214e8a3c4SBeni Lev 				memcpy(__get_dynamic_array(proberesp_ies),
60314e8a3c4SBeni Lev 				       info->proberesp_ies,
60414e8a3c4SBeni Lev 				       info->proberesp_ies_len);
60514e8a3c4SBeni Lev 			if (info->assocresp_ies)
60614e8a3c4SBeni Lev 				memcpy(__get_dynamic_array(assocresp_ies),
60714e8a3c4SBeni Lev 				       info->assocresp_ies,
60814e8a3c4SBeni Lev 				       info->assocresp_ies_len);
60914e8a3c4SBeni Lev 			if (info->probe_resp)
61014e8a3c4SBeni Lev 				memcpy(__get_dynamic_array(probe_resp),
61114e8a3c4SBeni Lev 				       info->probe_resp, info->probe_resp_len);
61214e8a3c4SBeni Lev 		}
61314e8a3c4SBeni Lev 	),
614ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
61514e8a3c4SBeni Lev );
61614e8a3c4SBeni Lev 
61714e8a3c4SBeni Lev DECLARE_EVENT_CLASS(wiphy_netdev_evt,
61814e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
61914e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev),
62014e8a3c4SBeni Lev 	TP_STRUCT__entry(
62114e8a3c4SBeni Lev 		WIPHY_ENTRY
62214e8a3c4SBeni Lev 		NETDEV_ENTRY
62314e8a3c4SBeni Lev 	),
62414e8a3c4SBeni Lev 	TP_fast_assign(
62514e8a3c4SBeni Lev 		WIPHY_ASSIGN;
62614e8a3c4SBeni Lev 		NETDEV_ASSIGN;
62714e8a3c4SBeni Lev 	),
628ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
62914e8a3c4SBeni Lev );
63014e8a3c4SBeni Lev 
63114e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_stop_ap,
63214e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
63314e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
63414e8a3c4SBeni Lev );
63514e8a3c4SBeni Lev 
63614e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data,
63714e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
63814e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
63914e8a3c4SBeni Lev );
64014e8a3c4SBeni Lev 
64114e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config,
64214e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
64314e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
64414e8a3c4SBeni Lev );
64514e8a3c4SBeni Lev 
64614e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh,
64714e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
64814e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
64914e8a3c4SBeni Lev );
65014e8a3c4SBeni Lev 
65114e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ibss,
65214e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
65314e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
65414e8a3c4SBeni Lev );
65514e8a3c4SBeni Lev 
6566e0bd6c3SRostislav Lisovy DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ocb,
6576e0bd6c3SRostislav Lisovy 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
6586e0bd6c3SRostislav Lisovy 	TP_ARGS(wiphy, netdev)
6596e0bd6c3SRostislav Lisovy );
6606e0bd6c3SRostislav Lisovy 
66114e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa,
66214e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
66314e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
66414e8a3c4SBeni Lev );
66514e8a3c4SBeni Lev 
66626ec17a1SOrr Mazor DEFINE_EVENT(wiphy_netdev_evt, rdev_end_cac,
66726ec17a1SOrr Mazor 	     TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
66826ec17a1SOrr Mazor 	     TP_ARGS(wiphy, netdev)
66926ec17a1SOrr Mazor );
67026ec17a1SOrr Mazor 
67114e8a3c4SBeni Lev DECLARE_EVENT_CLASS(station_add_change,
67214e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
67314e8a3c4SBeni Lev 		 struct station_parameters *params),
67414e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac, params),
67514e8a3c4SBeni Lev 	TP_STRUCT__entry(
67614e8a3c4SBeni Lev 		WIPHY_ENTRY
67714e8a3c4SBeni Lev 		NETDEV_ENTRY
67814e8a3c4SBeni Lev 		MAC_ENTRY(sta_mac)
67914e8a3c4SBeni Lev 		__field(u32, sta_flags_mask)
68014e8a3c4SBeni Lev 		__field(u32, sta_flags_set)
68114e8a3c4SBeni Lev 		__field(u32, sta_modify_mask)
68214e8a3c4SBeni Lev 		__field(int, listen_interval)
6836e045905SJohannes Berg 		__field(u16, capability)
68414e8a3c4SBeni Lev 		__field(u16, aid)
68514e8a3c4SBeni Lev 		__field(u8, plink_action)
68614e8a3c4SBeni Lev 		__field(u8, plink_state)
68714e8a3c4SBeni Lev 		__field(u8, uapsd_queues)
6886e045905SJohannes Berg 		__field(u8, max_sp)
6896e045905SJohannes Berg 		__field(u8, opmode_notif)
6906e045905SJohannes Berg 		__field(bool, opmode_notif_used)
69114e8a3c4SBeni Lev 		__array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap))
6926e045905SJohannes Berg 		__array(u8, vht_capa, (int)sizeof(struct ieee80211_vht_cap))
6935d8325ecSJohannes Berg 		__array(char, vlan, IFNAMSIZ)
6946e045905SJohannes Berg 		__dynamic_array(u8, supported_rates,
6956e045905SJohannes Berg 				params->supported_rates_len)
6966e045905SJohannes Berg 		__dynamic_array(u8, ext_capab, params->ext_capab_len)
6976e045905SJohannes Berg 		__dynamic_array(u8, supported_channels,
6986e045905SJohannes Berg 				params->supported_channels_len)
6996e045905SJohannes Berg 		__dynamic_array(u8, supported_oper_classes,
7006e045905SJohannes Berg 				params->supported_oper_classes_len)
70114e8a3c4SBeni Lev 	),
70214e8a3c4SBeni Lev 	TP_fast_assign(
70314e8a3c4SBeni Lev 		WIPHY_ASSIGN;
70414e8a3c4SBeni Lev 		NETDEV_ASSIGN;
70514e8a3c4SBeni Lev 		MAC_ASSIGN(sta_mac, mac);
70614e8a3c4SBeni Lev 		__entry->sta_flags_mask = params->sta_flags_mask;
70714e8a3c4SBeni Lev 		__entry->sta_flags_set = params->sta_flags_set;
70814e8a3c4SBeni Lev 		__entry->sta_modify_mask = params->sta_modify_mask;
70914e8a3c4SBeni Lev 		__entry->listen_interval = params->listen_interval;
71014e8a3c4SBeni Lev 		__entry->aid = params->aid;
71114e8a3c4SBeni Lev 		__entry->plink_action = params->plink_action;
71214e8a3c4SBeni Lev 		__entry->plink_state = params->plink_state;
71314e8a3c4SBeni Lev 		__entry->uapsd_queues = params->uapsd_queues;
71414e8a3c4SBeni Lev 		memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap));
71514e8a3c4SBeni Lev 		if (params->ht_capa)
71614e8a3c4SBeni Lev 			memcpy(__entry->ht_capa, params->ht_capa,
71714e8a3c4SBeni Lev 			       sizeof(struct ieee80211_ht_cap));
7186e045905SJohannes Berg 		memset(__entry->vht_capa, 0, sizeof(struct ieee80211_vht_cap));
7196e045905SJohannes Berg 		if (params->vht_capa)
7206e045905SJohannes Berg 			memcpy(__entry->vht_capa, params->vht_capa,
7216e045905SJohannes Berg 			       sizeof(struct ieee80211_vht_cap));
7225d8325ecSJohannes Berg 		memset(__entry->vlan, 0, sizeof(__entry->vlan));
7235d8325ecSJohannes Berg 		if (params->vlan)
7245d8325ecSJohannes Berg 			memcpy(__entry->vlan, params->vlan->name, IFNAMSIZ);
7256e045905SJohannes Berg 		if (params->supported_rates && params->supported_rates_len)
7266e045905SJohannes Berg 			memcpy(__get_dynamic_array(supported_rates),
7276e045905SJohannes Berg 			       params->supported_rates,
7286e045905SJohannes Berg 			       params->supported_rates_len);
7296e045905SJohannes Berg 		if (params->ext_capab && params->ext_capab_len)
7306e045905SJohannes Berg 			memcpy(__get_dynamic_array(ext_capab),
7316e045905SJohannes Berg 			       params->ext_capab,
7326e045905SJohannes Berg 			       params->ext_capab_len);
7336e045905SJohannes Berg 		if (params->supported_channels &&
7346e045905SJohannes Berg 		    params->supported_channels_len)
7356e045905SJohannes Berg 			memcpy(__get_dynamic_array(supported_channels),
7366e045905SJohannes Berg 			       params->supported_channels,
7376e045905SJohannes Berg 			       params->supported_channels_len);
7386e045905SJohannes Berg 		if (params->supported_oper_classes &&
7396e045905SJohannes Berg 		    params->supported_oper_classes_len)
7406e045905SJohannes Berg 			memcpy(__get_dynamic_array(supported_oper_classes),
7416e045905SJohannes Berg 			       params->supported_oper_classes,
7426e045905SJohannes Berg 			       params->supported_oper_classes_len);
7436e045905SJohannes Berg 		__entry->max_sp = params->max_sp;
7446e045905SJohannes Berg 		__entry->capability = params->capability;
7456e045905SJohannes Berg 		__entry->opmode_notif = params->opmode_notif;
7466e045905SJohannes Berg 		__entry->opmode_notif_used = params->opmode_notif_used;
74714e8a3c4SBeni Lev 	),
748ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
74914e8a3c4SBeni Lev 		  ", station flags mask: %u, station flags set: %u, "
75014e8a3c4SBeni Lev 		  "station modify mask: %u, listen interval: %d, aid: %u, "
7515d8325ecSJohannes Berg 		  "plink action: %u, plink state: %u, uapsd queues: %u, vlan:%s",
75214e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
75314e8a3c4SBeni Lev 		  __entry->sta_flags_mask, __entry->sta_flags_set,
75414e8a3c4SBeni Lev 		  __entry->sta_modify_mask, __entry->listen_interval,
75514e8a3c4SBeni Lev 		  __entry->aid, __entry->plink_action, __entry->plink_state,
7565d8325ecSJohannes Berg 		  __entry->uapsd_queues, __entry->vlan)
75714e8a3c4SBeni Lev );
75814e8a3c4SBeni Lev 
75914e8a3c4SBeni Lev DEFINE_EVENT(station_add_change, rdev_add_station,
76014e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
76114e8a3c4SBeni Lev 		 struct station_parameters *params),
76214e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac, params)
76314e8a3c4SBeni Lev );
76414e8a3c4SBeni Lev 
76514e8a3c4SBeni Lev DEFINE_EVENT(station_add_change, rdev_change_station,
76614e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
76714e8a3c4SBeni Lev 		 struct station_parameters *params),
76814e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac, params)
76914e8a3c4SBeni Lev );
77014e8a3c4SBeni Lev 
77114e8a3c4SBeni Lev DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
77214e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
77314e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac),
77414e8a3c4SBeni Lev 	TP_STRUCT__entry(
77514e8a3c4SBeni Lev 		WIPHY_ENTRY
77614e8a3c4SBeni Lev 		NETDEV_ENTRY
77714e8a3c4SBeni Lev 		MAC_ENTRY(sta_mac)
77814e8a3c4SBeni Lev 	),
77914e8a3c4SBeni Lev 	TP_fast_assign(
78014e8a3c4SBeni Lev 		WIPHY_ASSIGN;
78114e8a3c4SBeni Lev 		NETDEV_ASSIGN;
78214e8a3c4SBeni Lev 		MAC_ASSIGN(sta_mac, mac);
78314e8a3c4SBeni Lev 	),
784ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
78514e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac))
78614e8a3c4SBeni Lev );
78714e8a3c4SBeni Lev 
78889c771e5SJouni Malinen DECLARE_EVENT_CLASS(station_del,
78989c771e5SJouni Malinen 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
79089c771e5SJouni Malinen 		 struct station_del_parameters *params),
79189c771e5SJouni Malinen 	TP_ARGS(wiphy, netdev, params),
79289c771e5SJouni Malinen 	TP_STRUCT__entry(
79389c771e5SJouni Malinen 		WIPHY_ENTRY
79489c771e5SJouni Malinen 		NETDEV_ENTRY
79589c771e5SJouni Malinen 		MAC_ENTRY(sta_mac)
79698856866SJouni Malinen 		__field(u8, subtype)
79798856866SJouni Malinen 		__field(u16, reason_code)
79889c771e5SJouni Malinen 	),
79989c771e5SJouni Malinen 	TP_fast_assign(
80089c771e5SJouni Malinen 		WIPHY_ASSIGN;
80189c771e5SJouni Malinen 		NETDEV_ASSIGN;
80289c771e5SJouni Malinen 		MAC_ASSIGN(sta_mac, params->mac);
80398856866SJouni Malinen 		__entry->subtype = params->subtype;
80498856866SJouni Malinen 		__entry->reason_code = params->reason_code;
80589c771e5SJouni Malinen 	),
80698856866SJouni Malinen 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
80798856866SJouni Malinen 		  ", subtype: %u, reason_code: %u",
80898856866SJouni Malinen 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
80998856866SJouni Malinen 		  __entry->subtype, __entry->reason_code)
81089c771e5SJouni Malinen );
81189c771e5SJouni Malinen 
81289c771e5SJouni Malinen DEFINE_EVENT(station_del, rdev_del_station,
81389c771e5SJouni Malinen 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
81489c771e5SJouni Malinen 		 struct station_del_parameters *params),
81589c771e5SJouni Malinen 	TP_ARGS(wiphy, netdev, params)
81614e8a3c4SBeni Lev );
81714e8a3c4SBeni Lev 
81814e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station,
81914e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
82014e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac)
82114e8a3c4SBeni Lev );
82214e8a3c4SBeni Lev 
82314e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
82414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
82514e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac)
82614e8a3c4SBeni Lev );
82714e8a3c4SBeni Lev 
82814e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer,
82914e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
83014e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac)
83114e8a3c4SBeni Lev );
83214e8a3c4SBeni Lev 
83314e8a3c4SBeni Lev TRACE_EVENT(rdev_dump_station,
834aaaa10e0SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
83514e8a3c4SBeni Lev 		 u8 *mac),
836aaaa10e0SJohannes Berg 	TP_ARGS(wiphy, netdev, _idx, mac),
83714e8a3c4SBeni Lev 	TP_STRUCT__entry(
83814e8a3c4SBeni Lev 		WIPHY_ENTRY
83914e8a3c4SBeni Lev 		NETDEV_ENTRY
84014e8a3c4SBeni Lev 		MAC_ENTRY(sta_mac)
84114e8a3c4SBeni Lev 		__field(int, idx)
84214e8a3c4SBeni Lev 	),
84314e8a3c4SBeni Lev 	TP_fast_assign(
84414e8a3c4SBeni Lev 		WIPHY_ASSIGN;
84514e8a3c4SBeni Lev 		NETDEV_ASSIGN;
84614e8a3c4SBeni Lev 		MAC_ASSIGN(sta_mac, mac);
847aaaa10e0SJohannes Berg 		__entry->idx = _idx;
84814e8a3c4SBeni Lev 	),
849ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d",
85014e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
85114e8a3c4SBeni Lev 		  __entry->idx)
85214e8a3c4SBeni Lev );
85314e8a3c4SBeni Lev 
85414e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_station_info,
85514e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo),
85614e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret, sinfo),
85714e8a3c4SBeni Lev 	TP_STRUCT__entry(
85814e8a3c4SBeni Lev 		WIPHY_ENTRY
85914e8a3c4SBeni Lev 		__field(int, ret)
86014e8a3c4SBeni Lev 		SINFO_ENTRY
86114e8a3c4SBeni Lev 	),
86214e8a3c4SBeni Lev 	TP_fast_assign(
86314e8a3c4SBeni Lev 		WIPHY_ASSIGN;
86414e8a3c4SBeni Lev 		__entry->ret = ret;
86514e8a3c4SBeni Lev 		SINFO_ASSIGN;
86614e8a3c4SBeni Lev 	),
86714e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned %d" ,
86814e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->ret)
86914e8a3c4SBeni Lev );
87014e8a3c4SBeni Lev 
87114e8a3c4SBeni Lev DECLARE_EVENT_CLASS(mpath_evt,
87214e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
87314e8a3c4SBeni Lev 		 u8 *next_hop),
87414e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, dst, next_hop),
87514e8a3c4SBeni Lev 	TP_STRUCT__entry(
87614e8a3c4SBeni Lev 		WIPHY_ENTRY
87714e8a3c4SBeni Lev 		NETDEV_ENTRY
87814e8a3c4SBeni Lev 		MAC_ENTRY(dst)
87914e8a3c4SBeni Lev 		MAC_ENTRY(next_hop)
88014e8a3c4SBeni Lev 	),
88114e8a3c4SBeni Lev 	TP_fast_assign(
88214e8a3c4SBeni Lev 		WIPHY_ASSIGN;
88314e8a3c4SBeni Lev 		NETDEV_ASSIGN;
88414e8a3c4SBeni Lev 		MAC_ASSIGN(dst, dst);
88514e8a3c4SBeni Lev 		MAC_ASSIGN(next_hop, next_hop);
88614e8a3c4SBeni Lev 	),
887ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT,
88814e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst),
88914e8a3c4SBeni Lev 		  MAC_PR_ARG(next_hop))
89014e8a3c4SBeni Lev );
89114e8a3c4SBeni Lev 
89214e8a3c4SBeni Lev DEFINE_EVENT(mpath_evt, rdev_add_mpath,
89314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
89414e8a3c4SBeni Lev 		 u8 *next_hop),
89514e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, dst, next_hop)
89614e8a3c4SBeni Lev );
89714e8a3c4SBeni Lev 
89814e8a3c4SBeni Lev DEFINE_EVENT(mpath_evt, rdev_change_mpath,
89914e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
90014e8a3c4SBeni Lev 		 u8 *next_hop),
90114e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, dst, next_hop)
90214e8a3c4SBeni Lev );
90314e8a3c4SBeni Lev 
90414e8a3c4SBeni Lev DEFINE_EVENT(mpath_evt, rdev_get_mpath,
90514e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
90614e8a3c4SBeni Lev 		 u8 *next_hop),
90714e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, dst, next_hop)
90814e8a3c4SBeni Lev );
90914e8a3c4SBeni Lev 
91014e8a3c4SBeni Lev TRACE_EVENT(rdev_dump_mpath,
911aaaa10e0SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
91214e8a3c4SBeni Lev 		 u8 *dst, u8 *next_hop),
913aaaa10e0SJohannes Berg 	TP_ARGS(wiphy, netdev, _idx, dst, next_hop),
91414e8a3c4SBeni Lev 	TP_STRUCT__entry(
91514e8a3c4SBeni Lev 		WIPHY_ENTRY
91614e8a3c4SBeni Lev 		NETDEV_ENTRY
91714e8a3c4SBeni Lev 		MAC_ENTRY(dst)
91814e8a3c4SBeni Lev 		MAC_ENTRY(next_hop)
91914e8a3c4SBeni Lev 		__field(int, idx)
92014e8a3c4SBeni Lev 	),
92114e8a3c4SBeni Lev 	TP_fast_assign(
92214e8a3c4SBeni Lev 		WIPHY_ASSIGN;
92314e8a3c4SBeni Lev 		NETDEV_ASSIGN;
92414e8a3c4SBeni Lev 		MAC_ASSIGN(dst, dst);
92514e8a3c4SBeni Lev 		MAC_ASSIGN(next_hop, next_hop);
926aaaa10e0SJohannes Berg 		__entry->idx = _idx;
92714e8a3c4SBeni Lev 	),
928ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
92914e8a3c4SBeni Lev 		  MAC_PR_FMT ", next hop: " MAC_PR_FMT,
93014e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
93114e8a3c4SBeni Lev 		  MAC_PR_ARG(next_hop))
93214e8a3c4SBeni Lev );
93314e8a3c4SBeni Lev 
93466be7d2bSHenning Rogge TRACE_EVENT(rdev_get_mpp,
93566be7d2bSHenning Rogge 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
93666be7d2bSHenning Rogge 		 u8 *dst, u8 *mpp),
93766be7d2bSHenning Rogge 	TP_ARGS(wiphy, netdev, dst, mpp),
93866be7d2bSHenning Rogge 	TP_STRUCT__entry(
93966be7d2bSHenning Rogge 		WIPHY_ENTRY
94066be7d2bSHenning Rogge 		NETDEV_ENTRY
94166be7d2bSHenning Rogge 		MAC_ENTRY(dst)
94266be7d2bSHenning Rogge 		MAC_ENTRY(mpp)
94366be7d2bSHenning Rogge 	),
94466be7d2bSHenning Rogge 	TP_fast_assign(
94566be7d2bSHenning Rogge 		WIPHY_ASSIGN;
94666be7d2bSHenning Rogge 		NETDEV_ASSIGN;
94766be7d2bSHenning Rogge 		MAC_ASSIGN(dst, dst);
94866be7d2bSHenning Rogge 		MAC_ASSIGN(mpp, mpp);
94966be7d2bSHenning Rogge 	),
95066be7d2bSHenning Rogge 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT
95166be7d2bSHenning Rogge 		  ", mpp: " MAC_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG,
95266be7d2bSHenning Rogge 		  MAC_PR_ARG(dst), MAC_PR_ARG(mpp))
95366be7d2bSHenning Rogge );
95466be7d2bSHenning Rogge 
95566be7d2bSHenning Rogge TRACE_EVENT(rdev_dump_mpp,
956aaaa10e0SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
95766be7d2bSHenning Rogge 		 u8 *dst, u8 *mpp),
958aaaa10e0SJohannes Berg 	TP_ARGS(wiphy, netdev, _idx, mpp, dst),
95966be7d2bSHenning Rogge 	TP_STRUCT__entry(
96066be7d2bSHenning Rogge 		WIPHY_ENTRY
96166be7d2bSHenning Rogge 		NETDEV_ENTRY
96266be7d2bSHenning Rogge 		MAC_ENTRY(dst)
96366be7d2bSHenning Rogge 		MAC_ENTRY(mpp)
96466be7d2bSHenning Rogge 		__field(int, idx)
96566be7d2bSHenning Rogge 	),
96666be7d2bSHenning Rogge 	TP_fast_assign(
96766be7d2bSHenning Rogge 		WIPHY_ASSIGN;
96866be7d2bSHenning Rogge 		NETDEV_ASSIGN;
96966be7d2bSHenning Rogge 		MAC_ASSIGN(dst, dst);
97066be7d2bSHenning Rogge 		MAC_ASSIGN(mpp, mpp);
971aaaa10e0SJohannes Berg 		__entry->idx = _idx;
97266be7d2bSHenning Rogge 	),
97366be7d2bSHenning Rogge 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
97466be7d2bSHenning Rogge 		  MAC_PR_FMT ", mpp: " MAC_PR_FMT,
97566be7d2bSHenning Rogge 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
97666be7d2bSHenning Rogge 		  MAC_PR_ARG(mpp))
97766be7d2bSHenning Rogge );
97866be7d2bSHenning Rogge 
97914e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_mpath_info,
98014e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo),
98114e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret, pinfo),
98214e8a3c4SBeni Lev 	TP_STRUCT__entry(
98314e8a3c4SBeni Lev 		WIPHY_ENTRY
98414e8a3c4SBeni Lev 		__field(int, ret)
98514e8a3c4SBeni Lev 		__field(int, generation)
98614e8a3c4SBeni Lev 		__field(u32, filled)
98714e8a3c4SBeni Lev 		__field(u32, frame_qlen)
98814e8a3c4SBeni Lev 		__field(u32, sn)
98914e8a3c4SBeni Lev 		__field(u32, metric)
99014e8a3c4SBeni Lev 		__field(u32, exptime)
99114e8a3c4SBeni Lev 		__field(u32, discovery_timeout)
99214e8a3c4SBeni Lev 		__field(u8, discovery_retries)
99314e8a3c4SBeni Lev 		__field(u8, flags)
99414e8a3c4SBeni Lev 	),
99514e8a3c4SBeni Lev 	TP_fast_assign(
99614e8a3c4SBeni Lev 		WIPHY_ASSIGN;
99714e8a3c4SBeni Lev 		__entry->ret = ret;
99814e8a3c4SBeni Lev 		__entry->generation = pinfo->generation;
99914e8a3c4SBeni Lev 		__entry->filled = pinfo->filled;
100014e8a3c4SBeni Lev 		__entry->frame_qlen = pinfo->frame_qlen;
100114e8a3c4SBeni Lev 		__entry->sn = pinfo->sn;
100214e8a3c4SBeni Lev 		__entry->metric = pinfo->metric;
100314e8a3c4SBeni Lev 		__entry->exptime = pinfo->exptime;
100414e8a3c4SBeni Lev 		__entry->discovery_timeout = pinfo->discovery_timeout;
100514e8a3c4SBeni Lev 		__entry->discovery_retries = pinfo->discovery_retries;
100614e8a3c4SBeni Lev 		__entry->flags = pinfo->flags;
100714e8a3c4SBeni Lev 	),
100814e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, "
100914e8a3c4SBeni Lev 		  "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
101014e8a3c4SBeni Lev 		  " discovery timeout: %u, discovery retries: %u, flags: %u",
101114e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->ret, __entry->generation,
101214e8a3c4SBeni Lev 		  __entry->filled, __entry->frame_qlen, __entry->sn,
101314e8a3c4SBeni Lev 		  __entry->metric, __entry->exptime, __entry->discovery_timeout,
101414e8a3c4SBeni Lev 		  __entry->discovery_retries, __entry->flags)
101514e8a3c4SBeni Lev );
101614e8a3c4SBeni Lev 
101714e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_mesh_config,
101814e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf),
101914e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret, conf),
102014e8a3c4SBeni Lev 	TP_STRUCT__entry(
102114e8a3c4SBeni Lev 		WIPHY_ENTRY
102214e8a3c4SBeni Lev 		MESH_CFG_ENTRY
102314e8a3c4SBeni Lev 		__field(int, ret)
102414e8a3c4SBeni Lev 	),
102514e8a3c4SBeni Lev 	TP_fast_assign(
102614e8a3c4SBeni Lev 		WIPHY_ASSIGN;
102714e8a3c4SBeni Lev 		MESH_CFG_ASSIGN;
102814e8a3c4SBeni Lev 		__entry->ret = ret;
102914e8a3c4SBeni Lev 	),
103014e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned: %d",
103114e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->ret)
103214e8a3c4SBeni Lev );
103314e8a3c4SBeni Lev 
103414e8a3c4SBeni Lev TRACE_EVENT(rdev_update_mesh_config,
103514e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
103614e8a3c4SBeni Lev 		 const struct mesh_config *conf),
103714e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mask, conf),
103814e8a3c4SBeni Lev 	TP_STRUCT__entry(
103914e8a3c4SBeni Lev 		WIPHY_ENTRY
104014e8a3c4SBeni Lev 		NETDEV_ENTRY
104114e8a3c4SBeni Lev 		MESH_CFG_ENTRY
104214e8a3c4SBeni Lev 		__field(u32, mask)
104314e8a3c4SBeni Lev 	),
104414e8a3c4SBeni Lev 	TP_fast_assign(
104514e8a3c4SBeni Lev 		WIPHY_ASSIGN;
104614e8a3c4SBeni Lev 		NETDEV_ASSIGN;
104714e8a3c4SBeni Lev 		MESH_CFG_ASSIGN;
104814e8a3c4SBeni Lev 		__entry->mask = mask;
104914e8a3c4SBeni Lev 	),
1050ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u",
105114e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
105214e8a3c4SBeni Lev );
105314e8a3c4SBeni Lev 
105414e8a3c4SBeni Lev TRACE_EVENT(rdev_join_mesh,
105514e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
105614e8a3c4SBeni Lev 		 const struct mesh_config *conf,
105714e8a3c4SBeni Lev 		 const struct mesh_setup *setup),
105814e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, conf, setup),
105914e8a3c4SBeni Lev 	TP_STRUCT__entry(
106014e8a3c4SBeni Lev 		WIPHY_ENTRY
106114e8a3c4SBeni Lev 		NETDEV_ENTRY
106214e8a3c4SBeni Lev 		MESH_CFG_ENTRY
106314e8a3c4SBeni Lev 	),
106414e8a3c4SBeni Lev 	TP_fast_assign(
106514e8a3c4SBeni Lev 		WIPHY_ASSIGN;
106614e8a3c4SBeni Lev 		NETDEV_ASSIGN;
106714e8a3c4SBeni Lev 		MESH_CFG_ASSIGN;
106814e8a3c4SBeni Lev 	),
1069ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
107014e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG)
107114e8a3c4SBeni Lev );
107214e8a3c4SBeni Lev 
107314e8a3c4SBeni Lev TRACE_EVENT(rdev_change_bss,
107414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
107514e8a3c4SBeni Lev 		 struct bss_parameters *params),
107614e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, params),
107714e8a3c4SBeni Lev 	TP_STRUCT__entry(
107814e8a3c4SBeni Lev 		WIPHY_ENTRY
107914e8a3c4SBeni Lev 		NETDEV_ENTRY
108014e8a3c4SBeni Lev 		__field(int, use_cts_prot)
108114e8a3c4SBeni Lev 		__field(int, use_short_preamble)
108214e8a3c4SBeni Lev 		__field(int, use_short_slot_time)
108314e8a3c4SBeni Lev 		__field(int, ap_isolate)
108414e8a3c4SBeni Lev 		__field(int, ht_opmode)
108514e8a3c4SBeni Lev 	),
108614e8a3c4SBeni Lev 	TP_fast_assign(
108714e8a3c4SBeni Lev 		WIPHY_ASSIGN;
108814e8a3c4SBeni Lev 		NETDEV_ASSIGN;
108914e8a3c4SBeni Lev 		__entry->use_cts_prot = params->use_cts_prot;
109014e8a3c4SBeni Lev 		__entry->use_short_preamble = params->use_short_preamble;
109114e8a3c4SBeni Lev 		__entry->use_short_slot_time = params->use_short_slot_time;
109214e8a3c4SBeni Lev 		__entry->ap_isolate = params->ap_isolate;
109314e8a3c4SBeni Lev 		__entry->ht_opmode = params->ht_opmode;
109414e8a3c4SBeni Lev 	),
1095ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, "
109614e8a3c4SBeni Lev 		  "use short preamble: %d, use short slot time: %d, "
109714e8a3c4SBeni Lev 		  "ap isolate: %d, ht opmode: %d",
109814e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot,
109914e8a3c4SBeni Lev 		  __entry->use_short_preamble, __entry->use_short_slot_time,
110014e8a3c4SBeni Lev 		  __entry->ap_isolate, __entry->ht_opmode)
110114e8a3c4SBeni Lev );
110214e8a3c4SBeni Lev 
110314e8a3c4SBeni Lev TRACE_EVENT(rdev_set_txq_params,
110414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
110514e8a3c4SBeni Lev 		 struct ieee80211_txq_params *params),
110614e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, params),
110714e8a3c4SBeni Lev 	TP_STRUCT__entry(
110814e8a3c4SBeni Lev 		WIPHY_ENTRY
110914e8a3c4SBeni Lev 		NETDEV_ENTRY
111014e8a3c4SBeni Lev 		__field(enum nl80211_ac, ac)
111114e8a3c4SBeni Lev 		__field(u16, txop)
111214e8a3c4SBeni Lev 		__field(u16, cwmin)
111314e8a3c4SBeni Lev 		__field(u16, cwmax)
111414e8a3c4SBeni Lev 		__field(u8, aifs)
111514e8a3c4SBeni Lev 	),
111614e8a3c4SBeni Lev 	TP_fast_assign(
111714e8a3c4SBeni Lev 		WIPHY_ASSIGN;
111814e8a3c4SBeni Lev 		NETDEV_ASSIGN;
111914e8a3c4SBeni Lev 		__entry->ac = params->ac;
112014e8a3c4SBeni Lev 		__entry->txop = params->txop;
112114e8a3c4SBeni Lev 		__entry->cwmin = params->cwmin;
112214e8a3c4SBeni Lev 		__entry->cwmax = params->cwmax;
112314e8a3c4SBeni Lev 		__entry->aifs = params->aifs;
112414e8a3c4SBeni Lev 	),
1125ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u",
112614e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop,
112714e8a3c4SBeni Lev 		  __entry->cwmin, __entry->cwmax, __entry->aifs)
112814e8a3c4SBeni Lev );
112914e8a3c4SBeni Lev 
113014e8a3c4SBeni Lev TRACE_EVENT(rdev_libertas_set_mesh_channel,
113114e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
113214e8a3c4SBeni Lev 		 struct ieee80211_channel *chan),
113314e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, chan),
113414e8a3c4SBeni Lev 	TP_STRUCT__entry(
113514e8a3c4SBeni Lev 		WIPHY_ENTRY
113614e8a3c4SBeni Lev 		NETDEV_ENTRY
113714e8a3c4SBeni Lev 		CHAN_ENTRY
113814e8a3c4SBeni Lev 	),
113914e8a3c4SBeni Lev 	TP_fast_assign(
114014e8a3c4SBeni Lev 		WIPHY_ASSIGN;
114114e8a3c4SBeni Lev 		NETDEV_ASSIGN;
114214e8a3c4SBeni Lev 		CHAN_ASSIGN(chan);
114314e8a3c4SBeni Lev 	),
1144ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG,
114514e8a3c4SBeni Lev 		  NETDEV_PR_ARG, CHAN_PR_ARG)
114614e8a3c4SBeni Lev );
114714e8a3c4SBeni Lev 
114814e8a3c4SBeni Lev TRACE_EVENT(rdev_set_monitor_channel,
1149683b6d3bSJohannes Berg 	TP_PROTO(struct wiphy *wiphy,
1150683b6d3bSJohannes Berg 		 struct cfg80211_chan_def *chandef),
1151683b6d3bSJohannes Berg 	TP_ARGS(wiphy, chandef),
115214e8a3c4SBeni Lev 	TP_STRUCT__entry(
115314e8a3c4SBeni Lev 		WIPHY_ENTRY
1154683b6d3bSJohannes Berg 		CHAN_DEF_ENTRY
115514e8a3c4SBeni Lev 	),
115614e8a3c4SBeni Lev 	TP_fast_assign(
115714e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1158683b6d3bSJohannes Berg 		CHAN_DEF_ASSIGN(chandef);
115914e8a3c4SBeni Lev 	),
1160ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
1161683b6d3bSJohannes Berg 		  WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
116214e8a3c4SBeni Lev );
116314e8a3c4SBeni Lev 
116414e8a3c4SBeni Lev TRACE_EVENT(rdev_auth,
116514e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
116614e8a3c4SBeni Lev 		 struct cfg80211_auth_request *req),
116714e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, req),
116814e8a3c4SBeni Lev 	TP_STRUCT__entry(
116914e8a3c4SBeni Lev 		WIPHY_ENTRY
117014e8a3c4SBeni Lev 		NETDEV_ENTRY
117114e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
117214e8a3c4SBeni Lev 		__field(enum nl80211_auth_type, auth_type)
117314e8a3c4SBeni Lev 	),
117414e8a3c4SBeni Lev 	TP_fast_assign(
117514e8a3c4SBeni Lev 		WIPHY_ASSIGN;
117614e8a3c4SBeni Lev 		NETDEV_ASSIGN;
117714e8a3c4SBeni Lev 		if (req->bss)
117814e8a3c4SBeni Lev 			MAC_ASSIGN(bssid, req->bss->bssid);
117914e8a3c4SBeni Lev 		else
1180d2beae10SJoe Perches 			eth_zero_addr(__entry->bssid);
118114e8a3c4SBeni Lev 		__entry->auth_type = req->auth_type;
118214e8a3c4SBeni Lev 	),
1183ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT,
118414e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type,
118514e8a3c4SBeni Lev 		  MAC_PR_ARG(bssid))
118614e8a3c4SBeni Lev );
118714e8a3c4SBeni Lev 
118814e8a3c4SBeni Lev TRACE_EVENT(rdev_assoc,
118914e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
119014e8a3c4SBeni Lev 		 struct cfg80211_assoc_request *req),
119114e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, req),
119214e8a3c4SBeni Lev 	TP_STRUCT__entry(
119314e8a3c4SBeni Lev 		WIPHY_ENTRY
119414e8a3c4SBeni Lev 		NETDEV_ENTRY
119514e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
119614e8a3c4SBeni Lev 		MAC_ENTRY(prev_bssid)
119714e8a3c4SBeni Lev 		__field(bool, use_mfp)
119814e8a3c4SBeni Lev 		__field(u32, flags)
119914e8a3c4SBeni Lev 	),
120014e8a3c4SBeni Lev 	TP_fast_assign(
120114e8a3c4SBeni Lev 		WIPHY_ASSIGN;
120214e8a3c4SBeni Lev 		NETDEV_ASSIGN;
120314e8a3c4SBeni Lev 		if (req->bss)
120414e8a3c4SBeni Lev 			MAC_ASSIGN(bssid, req->bss->bssid);
120514e8a3c4SBeni Lev 		else
1206d2beae10SJoe Perches 			eth_zero_addr(__entry->bssid);
120714e8a3c4SBeni Lev 		MAC_ASSIGN(prev_bssid, req->prev_bssid);
120814e8a3c4SBeni Lev 		__entry->use_mfp = req->use_mfp;
120914e8a3c4SBeni Lev 		__entry->flags = req->flags;
121014e8a3c4SBeni Lev 	),
1211ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
121214e8a3c4SBeni Lev 		  ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u",
121314e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
121414e8a3c4SBeni Lev 		  MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp),
121514e8a3c4SBeni Lev 		  __entry->flags)
121614e8a3c4SBeni Lev );
121714e8a3c4SBeni Lev 
121814e8a3c4SBeni Lev TRACE_EVENT(rdev_deauth,
121914e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
122014e8a3c4SBeni Lev 		 struct cfg80211_deauth_request *req),
122114e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, req),
122214e8a3c4SBeni Lev 	TP_STRUCT__entry(
122314e8a3c4SBeni Lev 		WIPHY_ENTRY
122414e8a3c4SBeni Lev 		NETDEV_ENTRY
122514e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
122614e8a3c4SBeni Lev 		__field(u16, reason_code)
122714e8a3c4SBeni Lev 	),
122814e8a3c4SBeni Lev 	TP_fast_assign(
122914e8a3c4SBeni Lev 		WIPHY_ASSIGN;
123014e8a3c4SBeni Lev 		NETDEV_ASSIGN;
123114e8a3c4SBeni Lev 		MAC_ASSIGN(bssid, req->bssid);
123214e8a3c4SBeni Lev 		__entry->reason_code = req->reason_code;
123314e8a3c4SBeni Lev 	),
1234ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u",
123514e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
123614e8a3c4SBeni Lev 		  __entry->reason_code)
123714e8a3c4SBeni Lev );
123814e8a3c4SBeni Lev 
123914e8a3c4SBeni Lev TRACE_EVENT(rdev_disassoc,
124014e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
124114e8a3c4SBeni Lev 		 struct cfg80211_disassoc_request *req),
124214e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, req),
124314e8a3c4SBeni Lev 	TP_STRUCT__entry(
124414e8a3c4SBeni Lev 		WIPHY_ENTRY
124514e8a3c4SBeni Lev 		NETDEV_ENTRY
124614e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
124714e8a3c4SBeni Lev 		__field(u16, reason_code)
124814e8a3c4SBeni Lev 		__field(bool, local_state_change)
124914e8a3c4SBeni Lev 	),
125014e8a3c4SBeni Lev 	TP_fast_assign(
125114e8a3c4SBeni Lev 		WIPHY_ASSIGN;
125214e8a3c4SBeni Lev 		NETDEV_ASSIGN;
125314e8a3c4SBeni Lev 		if (req->bss)
125414e8a3c4SBeni Lev 			MAC_ASSIGN(bssid, req->bss->bssid);
125514e8a3c4SBeni Lev 		else
1256d2beae10SJoe Perches 			eth_zero_addr(__entry->bssid);
125714e8a3c4SBeni Lev 		__entry->reason_code = req->reason_code;
125814e8a3c4SBeni Lev 		__entry->local_state_change = req->local_state_change;
125914e8a3c4SBeni Lev 	),
1260ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
126114e8a3c4SBeni Lev 		  ", reason: %u, local state change: %s",
126214e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
126314e8a3c4SBeni Lev 		  __entry->reason_code,
126414e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->local_state_change))
126514e8a3c4SBeni Lev );
126614e8a3c4SBeni Lev 
126714e8a3c4SBeni Lev TRACE_EVENT(rdev_mgmt_tx_cancel_wait,
126814e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy,
126914e8a3c4SBeni Lev 		 struct wireless_dev *wdev, u64 cookie),
127014e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev, cookie),
127114e8a3c4SBeni Lev 	TP_STRUCT__entry(
127214e8a3c4SBeni Lev 		WIPHY_ENTRY
127314e8a3c4SBeni Lev 		WDEV_ENTRY
127414e8a3c4SBeni Lev 		__field(u64, cookie)
127514e8a3c4SBeni Lev 	),
127614e8a3c4SBeni Lev 	TP_fast_assign(
127714e8a3c4SBeni Lev 		WIPHY_ASSIGN;
127814e8a3c4SBeni Lev 		WDEV_ASSIGN;
127914e8a3c4SBeni Lev 		__entry->cookie = cookie;
128014e8a3c4SBeni Lev 	),
1281ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ",
128214e8a3c4SBeni Lev 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
128314e8a3c4SBeni Lev );
128414e8a3c4SBeni Lev 
128514e8a3c4SBeni Lev TRACE_EVENT(rdev_set_power_mgmt,
128614e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
128714e8a3c4SBeni Lev 		 bool enabled, int timeout),
128814e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, enabled, timeout),
128914e8a3c4SBeni Lev 	TP_STRUCT__entry(
129014e8a3c4SBeni Lev 		WIPHY_ENTRY
129114e8a3c4SBeni Lev 		NETDEV_ENTRY
129214e8a3c4SBeni Lev 		__field(bool, enabled)
129314e8a3c4SBeni Lev 		__field(int, timeout)
129414e8a3c4SBeni Lev 	),
129514e8a3c4SBeni Lev 	TP_fast_assign(
129614e8a3c4SBeni Lev 		WIPHY_ASSIGN;
129714e8a3c4SBeni Lev 		NETDEV_ASSIGN;
129814e8a3c4SBeni Lev 		__entry->enabled = enabled;
129914e8a3c4SBeni Lev 		__entry->timeout = timeout;
130014e8a3c4SBeni Lev 	),
1301ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ",
130214e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG,
130314e8a3c4SBeni Lev 		  __entry->enabled ? "" : "not ", __entry->timeout)
130414e8a3c4SBeni Lev );
130514e8a3c4SBeni Lev 
130614e8a3c4SBeni Lev TRACE_EVENT(rdev_connect,
130714e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
130814e8a3c4SBeni Lev 		 struct cfg80211_connect_params *sme),
130914e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, sme),
131014e8a3c4SBeni Lev 	TP_STRUCT__entry(
131114e8a3c4SBeni Lev 		WIPHY_ENTRY
131214e8a3c4SBeni Lev 		NETDEV_ENTRY
131314e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
131414e8a3c4SBeni Lev 		__array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
131514e8a3c4SBeni Lev 		__field(enum nl80211_auth_type, auth_type)
131614e8a3c4SBeni Lev 		__field(bool, privacy)
131714e8a3c4SBeni Lev 		__field(u32, wpa_versions)
131814e8a3c4SBeni Lev 		__field(u32, flags)
1319ba6fbacfSJouni Malinen 		MAC_ENTRY(prev_bssid)
132014e8a3c4SBeni Lev 	),
132114e8a3c4SBeni Lev 	TP_fast_assign(
132214e8a3c4SBeni Lev 		WIPHY_ASSIGN;
132314e8a3c4SBeni Lev 		NETDEV_ASSIGN;
132414e8a3c4SBeni Lev 		MAC_ASSIGN(bssid, sme->bssid);
132514e8a3c4SBeni Lev 		memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
132614e8a3c4SBeni Lev 		memcpy(__entry->ssid, sme->ssid, sme->ssid_len);
132714e8a3c4SBeni Lev 		__entry->auth_type = sme->auth_type;
132814e8a3c4SBeni Lev 		__entry->privacy = sme->privacy;
132914e8a3c4SBeni Lev 		__entry->wpa_versions = sme->crypto.wpa_versions;
133014e8a3c4SBeni Lev 		__entry->flags = sme->flags;
1331ba6fbacfSJouni Malinen 		MAC_ASSIGN(prev_bssid, sme->prev_bssid);
133214e8a3c4SBeni Lev 	),
1333ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
133414e8a3c4SBeni Lev 		  ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
1335ba6fbacfSJouni Malinen 		  "flags: %u, previous bssid: " MAC_PR_FMT,
133614e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid,
133714e8a3c4SBeni Lev 		  __entry->auth_type, BOOL_TO_STR(__entry->privacy),
1338ba6fbacfSJouni Malinen 		  __entry->wpa_versions, __entry->flags, MAC_PR_ARG(prev_bssid))
133914e8a3c4SBeni Lev );
134014e8a3c4SBeni Lev 
1341088e8df8Svamsi krishna TRACE_EVENT(rdev_update_connect_params,
1342088e8df8Svamsi krishna 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1343088e8df8Svamsi krishna 		 struct cfg80211_connect_params *sme, u32 changed),
1344088e8df8Svamsi krishna 	TP_ARGS(wiphy, netdev, sme, changed),
1345088e8df8Svamsi krishna 	TP_STRUCT__entry(
1346088e8df8Svamsi krishna 		WIPHY_ENTRY
1347088e8df8Svamsi krishna 		NETDEV_ENTRY
1348088e8df8Svamsi krishna 		__field(u32, changed)
1349088e8df8Svamsi krishna 	),
1350088e8df8Svamsi krishna 	TP_fast_assign(
1351088e8df8Svamsi krishna 		WIPHY_ASSIGN;
1352088e8df8Svamsi krishna 		NETDEV_ASSIGN;
1353088e8df8Svamsi krishna 		__entry->changed = changed;
1354088e8df8Svamsi krishna 	),
1355088e8df8Svamsi krishna 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", parameters changed: %u",
1356088e8df8Svamsi krishna 		  WIPHY_PR_ARG, NETDEV_PR_ARG,  __entry->changed)
1357088e8df8Svamsi krishna );
1358088e8df8Svamsi krishna 
135914e8a3c4SBeni Lev TRACE_EVENT(rdev_set_cqm_rssi_config,
136014e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy,
136114e8a3c4SBeni Lev 		 struct net_device *netdev, s32 rssi_thold,
136214e8a3c4SBeni Lev 		 u32 rssi_hyst),
136314e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
136414e8a3c4SBeni Lev 	TP_STRUCT__entry(
136514e8a3c4SBeni Lev 		WIPHY_ENTRY
136614e8a3c4SBeni Lev 		NETDEV_ENTRY
136714e8a3c4SBeni Lev 		__field(s32, rssi_thold)
136814e8a3c4SBeni Lev 		__field(u32, rssi_hyst)
136914e8a3c4SBeni Lev 	),
137014e8a3c4SBeni Lev 	TP_fast_assign(
137114e8a3c4SBeni Lev 		WIPHY_ASSIGN;
137214e8a3c4SBeni Lev 		NETDEV_ASSIGN;
137314e8a3c4SBeni Lev 		__entry->rssi_thold = rssi_thold;
137414e8a3c4SBeni Lev 		__entry->rssi_hyst = rssi_hyst;
137514e8a3c4SBeni Lev 	),
1376ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
137714e8a3c4SBeni Lev 		  ", rssi_thold: %d, rssi_hyst: %u ",
137814e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG,
137914e8a3c4SBeni Lev 		 __entry->rssi_thold, __entry->rssi_hyst)
138014e8a3c4SBeni Lev );
138114e8a3c4SBeni Lev 
13824a4b8169SAndrew Zaborowski TRACE_EVENT(rdev_set_cqm_rssi_range_config,
13834a4b8169SAndrew Zaborowski 	TP_PROTO(struct wiphy *wiphy,
13844a4b8169SAndrew Zaborowski 		 struct net_device *netdev, s32 low, s32 high),
13854a4b8169SAndrew Zaborowski 	TP_ARGS(wiphy, netdev, low, high),
13864a4b8169SAndrew Zaborowski 	TP_STRUCT__entry(
13874a4b8169SAndrew Zaborowski 		WIPHY_ENTRY
13884a4b8169SAndrew Zaborowski 		NETDEV_ENTRY
13894a4b8169SAndrew Zaborowski 		__field(s32, rssi_low)
13904a4b8169SAndrew Zaborowski 		__field(s32, rssi_high)
13914a4b8169SAndrew Zaborowski 	),
13924a4b8169SAndrew Zaborowski 	TP_fast_assign(
13934a4b8169SAndrew Zaborowski 		WIPHY_ASSIGN;
13944a4b8169SAndrew Zaborowski 		NETDEV_ASSIGN;
13954a4b8169SAndrew Zaborowski 		__entry->rssi_low = low;
13964a4b8169SAndrew Zaborowski 		__entry->rssi_high = high;
13974a4b8169SAndrew Zaborowski 	),
13984a4b8169SAndrew Zaborowski 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
13994a4b8169SAndrew Zaborowski 		  ", range: %d - %d ",
14004a4b8169SAndrew Zaborowski 		  WIPHY_PR_ARG, NETDEV_PR_ARG,
14014a4b8169SAndrew Zaborowski 		  __entry->rssi_low, __entry->rssi_high)
14024a4b8169SAndrew Zaborowski );
14034a4b8169SAndrew Zaborowski 
140414e8a3c4SBeni Lev TRACE_EVENT(rdev_set_cqm_txe_config,
140514e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
140614e8a3c4SBeni Lev 		 u32 pkts, u32 intvl),
140714e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, rate, pkts, intvl),
140814e8a3c4SBeni Lev 	TP_STRUCT__entry(
140914e8a3c4SBeni Lev 		WIPHY_ENTRY
141014e8a3c4SBeni Lev 		NETDEV_ENTRY
141114e8a3c4SBeni Lev 		__field(u32, rate)
141214e8a3c4SBeni Lev 		__field(u32, pkts)
141314e8a3c4SBeni Lev 		__field(u32, intvl)
141414e8a3c4SBeni Lev 	),
141514e8a3c4SBeni Lev 	TP_fast_assign(
141614e8a3c4SBeni Lev 		WIPHY_ASSIGN;
141714e8a3c4SBeni Lev 		NETDEV_ASSIGN;
141814e8a3c4SBeni Lev 		__entry->rate = rate;
141914e8a3c4SBeni Lev 		__entry->pkts = pkts;
142014e8a3c4SBeni Lev 		__entry->intvl = intvl;
142114e8a3c4SBeni Lev 	),
1422ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
142314e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
142414e8a3c4SBeni Lev 		  __entry->intvl)
142514e8a3c4SBeni Lev );
142614e8a3c4SBeni Lev 
142714e8a3c4SBeni Lev TRACE_EVENT(rdev_disconnect,
142814e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
142914e8a3c4SBeni Lev 		 u16 reason_code),
143014e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, reason_code),
143114e8a3c4SBeni Lev 	TP_STRUCT__entry(
143214e8a3c4SBeni Lev 		WIPHY_ENTRY
143314e8a3c4SBeni Lev 		NETDEV_ENTRY
143414e8a3c4SBeni Lev 		__field(u16, reason_code)
143514e8a3c4SBeni Lev 	),
143614e8a3c4SBeni Lev 	TP_fast_assign(
143714e8a3c4SBeni Lev 		WIPHY_ASSIGN;
143814e8a3c4SBeni Lev 		NETDEV_ASSIGN;
143914e8a3c4SBeni Lev 		__entry->reason_code = reason_code;
144014e8a3c4SBeni Lev 	),
1441ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
144214e8a3c4SBeni Lev 		  NETDEV_PR_ARG, __entry->reason_code)
144314e8a3c4SBeni Lev );
144414e8a3c4SBeni Lev 
144514e8a3c4SBeni Lev TRACE_EVENT(rdev_join_ibss,
144614e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
144714e8a3c4SBeni Lev 		 struct cfg80211_ibss_params *params),
144814e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, params),
144914e8a3c4SBeni Lev 	TP_STRUCT__entry(
145014e8a3c4SBeni Lev 		WIPHY_ENTRY
145114e8a3c4SBeni Lev 		NETDEV_ENTRY
145214e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
145314e8a3c4SBeni Lev 		__array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
145414e8a3c4SBeni Lev 	),
145514e8a3c4SBeni Lev 	TP_fast_assign(
145614e8a3c4SBeni Lev 		WIPHY_ASSIGN;
145714e8a3c4SBeni Lev 		NETDEV_ASSIGN;
145814e8a3c4SBeni Lev 		MAC_ASSIGN(bssid, params->bssid);
145914e8a3c4SBeni Lev 		memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
146014e8a3c4SBeni Lev 		memcpy(__entry->ssid, params->ssid, params->ssid_len);
146114e8a3c4SBeni Lev 	),
1462ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s",
146314e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid)
146414e8a3c4SBeni Lev );
146514e8a3c4SBeni Lev 
14666e0bd6c3SRostislav Lisovy TRACE_EVENT(rdev_join_ocb,
14676e0bd6c3SRostislav Lisovy 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
14686e0bd6c3SRostislav Lisovy 		 const struct ocb_setup *setup),
14696e0bd6c3SRostislav Lisovy 	TP_ARGS(wiphy, netdev, setup),
14706e0bd6c3SRostislav Lisovy 	TP_STRUCT__entry(
14716e0bd6c3SRostislav Lisovy 		WIPHY_ENTRY
14726e0bd6c3SRostislav Lisovy 		NETDEV_ENTRY
14736e0bd6c3SRostislav Lisovy 	),
14746e0bd6c3SRostislav Lisovy 	TP_fast_assign(
14756e0bd6c3SRostislav Lisovy 		WIPHY_ASSIGN;
14766e0bd6c3SRostislav Lisovy 		NETDEV_ASSIGN;
14776e0bd6c3SRostislav Lisovy 	),
14786e0bd6c3SRostislav Lisovy 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
14796e0bd6c3SRostislav Lisovy 		  WIPHY_PR_ARG, NETDEV_PR_ARG)
14806e0bd6c3SRostislav Lisovy );
14816e0bd6c3SRostislav Lisovy 
148214e8a3c4SBeni Lev TRACE_EVENT(rdev_set_wiphy_params,
148314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, u32 changed),
148414e8a3c4SBeni Lev 	TP_ARGS(wiphy, changed),
148514e8a3c4SBeni Lev 	TP_STRUCT__entry(
148614e8a3c4SBeni Lev 		WIPHY_ENTRY
148714e8a3c4SBeni Lev 		__field(u32, changed)
148814e8a3c4SBeni Lev 	),
148914e8a3c4SBeni Lev 	TP_fast_assign(
149014e8a3c4SBeni Lev 		WIPHY_ASSIGN;
149114e8a3c4SBeni Lev 		__entry->changed = changed;
149214e8a3c4SBeni Lev 	),
149314e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", changed: %u",
149414e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->changed)
149514e8a3c4SBeni Lev );
149614e8a3c4SBeni Lev 
1497c8442118SJohannes Berg DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power,
1498c8442118SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1499c8442118SJohannes Berg 	TP_ARGS(wiphy, wdev)
1500c8442118SJohannes Berg );
1501c8442118SJohannes Berg 
150214e8a3c4SBeni Lev TRACE_EVENT(rdev_set_tx_power,
1503c8442118SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1504c8442118SJohannes Berg 		 enum nl80211_tx_power_setting type, int mbm),
1505c8442118SJohannes Berg 	TP_ARGS(wiphy, wdev, type, mbm),
150614e8a3c4SBeni Lev 	TP_STRUCT__entry(
150714e8a3c4SBeni Lev 		WIPHY_ENTRY
1508c8442118SJohannes Berg 		WDEV_ENTRY
150914e8a3c4SBeni Lev 		__field(enum nl80211_tx_power_setting, type)
151014e8a3c4SBeni Lev 		__field(int, mbm)
151114e8a3c4SBeni Lev 	),
151214e8a3c4SBeni Lev 	TP_fast_assign(
151314e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1514c8442118SJohannes Berg 		WDEV_ASSIGN;
151514e8a3c4SBeni Lev 		__entry->type = type;
151614e8a3c4SBeni Lev 		__entry->mbm = mbm;
151714e8a3c4SBeni Lev 	),
1518ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
1519c8442118SJohannes Berg 		  WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
152014e8a3c4SBeni Lev );
152114e8a3c4SBeni Lev 
152214e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_int,
152314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
152414e8a3c4SBeni Lev 	TP_ARGS(wiphy, func_ret, func_fill),
152514e8a3c4SBeni Lev 	TP_STRUCT__entry(
152614e8a3c4SBeni Lev 		WIPHY_ENTRY
152714e8a3c4SBeni Lev 		__field(int, func_ret)
152814e8a3c4SBeni Lev 		__field(int, func_fill)
152914e8a3c4SBeni Lev 	),
153014e8a3c4SBeni Lev 	TP_fast_assign(
153114e8a3c4SBeni Lev 		WIPHY_ASSIGN;
153214e8a3c4SBeni Lev 		__entry->func_ret = func_ret;
153314e8a3c4SBeni Lev 		__entry->func_fill = func_fill;
153414e8a3c4SBeni Lev 	),
153514e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
153614e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
153714e8a3c4SBeni Lev );
153814e8a3c4SBeni Lev 
153914e8a3c4SBeni Lev #ifdef CONFIG_NL80211_TESTMODE
154014e8a3c4SBeni Lev TRACE_EVENT(rdev_testmode_cmd,
1541fc73f11fSDavid Spinadel 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1542fc73f11fSDavid Spinadel 	TP_ARGS(wiphy, wdev),
154314e8a3c4SBeni Lev 	TP_STRUCT__entry(
154414e8a3c4SBeni Lev 		WIPHY_ENTRY
1545fc73f11fSDavid Spinadel 		WDEV_ENTRY
154614e8a3c4SBeni Lev 	),
154714e8a3c4SBeni Lev 	TP_fast_assign(
154814e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1549fc73f11fSDavid Spinadel 		WDEV_ASSIGN;
155014e8a3c4SBeni Lev 	),
1551fc73f11fSDavid Spinadel 	TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
155214e8a3c4SBeni Lev );
155314e8a3c4SBeni Lev 
155414e8a3c4SBeni Lev TRACE_EVENT(rdev_testmode_dump,
155514e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
155614e8a3c4SBeni Lev 	TP_ARGS(wiphy),
155714e8a3c4SBeni Lev 	TP_STRUCT__entry(
155814e8a3c4SBeni Lev 		WIPHY_ENTRY
155914e8a3c4SBeni Lev 	),
156014e8a3c4SBeni Lev 	TP_fast_assign(
156114e8a3c4SBeni Lev 		WIPHY_ASSIGN;
156214e8a3c4SBeni Lev 	),
156314e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
156414e8a3c4SBeni Lev );
156514e8a3c4SBeni Lev #endif /* CONFIG_NL80211_TESTMODE */
156614e8a3c4SBeni Lev 
156714e8a3c4SBeni Lev TRACE_EVENT(rdev_set_bitrate_mask,
156814e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
156914e8a3c4SBeni Lev 		 const u8 *peer, const struct cfg80211_bitrate_mask *mask),
157014e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, peer, mask),
157114e8a3c4SBeni Lev 	TP_STRUCT__entry(
157214e8a3c4SBeni Lev 		WIPHY_ENTRY
157314e8a3c4SBeni Lev 		NETDEV_ENTRY
157414e8a3c4SBeni Lev 		MAC_ENTRY(peer)
157514e8a3c4SBeni Lev 	),
157614e8a3c4SBeni Lev 	TP_fast_assign(
157714e8a3c4SBeni Lev 		WIPHY_ASSIGN;
157814e8a3c4SBeni Lev 		NETDEV_ASSIGN;
157914e8a3c4SBeni Lev 		MAC_ASSIGN(peer, peer);
158014e8a3c4SBeni Lev 	),
1581ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
158214e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
158314e8a3c4SBeni Lev );
158414e8a3c4SBeni Lev 
158514e8a3c4SBeni Lev TRACE_EVENT(rdev_mgmt_frame_register,
158614e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
158714e8a3c4SBeni Lev 		 u16 frame_type, bool reg),
158814e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev, frame_type, reg),
158914e8a3c4SBeni Lev 	TP_STRUCT__entry(
159014e8a3c4SBeni Lev 		WIPHY_ENTRY
159114e8a3c4SBeni Lev 		WDEV_ENTRY
159214e8a3c4SBeni Lev 		__field(u16, frame_type)
159314e8a3c4SBeni Lev 		__field(bool, reg)
159414e8a3c4SBeni Lev 	),
159514e8a3c4SBeni Lev 	TP_fast_assign(
159614e8a3c4SBeni Lev 		WIPHY_ASSIGN;
159714e8a3c4SBeni Lev 		WDEV_ASSIGN;
159814e8a3c4SBeni Lev 		__entry->frame_type = frame_type;
159914e8a3c4SBeni Lev 		__entry->reg = reg;
160014e8a3c4SBeni Lev 	),
1601ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", frame_type: 0x%.2x, reg: %s ",
160214e8a3c4SBeni Lev 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->frame_type,
160314e8a3c4SBeni Lev 		  __entry->reg ? "true" : "false")
160414e8a3c4SBeni Lev );
160514e8a3c4SBeni Lev 
160614e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_tx_rx,
160714e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
160814e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret, tx, rx),
160914e8a3c4SBeni Lev 	TP_STRUCT__entry(
161014e8a3c4SBeni Lev 		WIPHY_ENTRY
161114e8a3c4SBeni Lev 		__field(int, ret)
161214e8a3c4SBeni Lev 		__field(u32, tx)
161314e8a3c4SBeni Lev 		__field(u32, rx)
161414e8a3c4SBeni Lev 	),
161514e8a3c4SBeni Lev 	TP_fast_assign(
161614e8a3c4SBeni Lev 		WIPHY_ASSIGN;
161714e8a3c4SBeni Lev 		__entry->ret = ret;
161814e8a3c4SBeni Lev 		__entry->tx = tx;
161914e8a3c4SBeni Lev 		__entry->rx = rx;
162014e8a3c4SBeni Lev 	),
162114e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
162214e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
162314e8a3c4SBeni Lev );
162414e8a3c4SBeni Lev 
162514e8a3c4SBeni Lev TRACE_EVENT(rdev_return_void_tx_rx,
162614e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
162714e8a3c4SBeni Lev 		 u32 rx, u32 rx_max),
162814e8a3c4SBeni Lev 	TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
162914e8a3c4SBeni Lev 	TP_STRUCT__entry(
163014e8a3c4SBeni Lev 		WIPHY_ENTRY
163114e8a3c4SBeni Lev 		__field(u32, tx)
163214e8a3c4SBeni Lev 		__field(u32, tx_max)
163314e8a3c4SBeni Lev 		__field(u32, rx)
163414e8a3c4SBeni Lev 		__field(u32, rx_max)
163514e8a3c4SBeni Lev 	),
163614e8a3c4SBeni Lev 	TP_fast_assign(
163714e8a3c4SBeni Lev 		WIPHY_ASSIGN;
163814e8a3c4SBeni Lev 		__entry->tx = tx;
163914e8a3c4SBeni Lev 		__entry->tx_max = tx_max;
164014e8a3c4SBeni Lev 		__entry->rx = rx;
164114e8a3c4SBeni Lev 		__entry->rx_max = rx_max;
164214e8a3c4SBeni Lev 	),
164314e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
164414e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
164514e8a3c4SBeni Lev 		  __entry->rx_max)
164614e8a3c4SBeni Lev );
164714e8a3c4SBeni Lev 
164814e8a3c4SBeni Lev DECLARE_EVENT_CLASS(tx_rx_evt,
164914e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
165014e8a3c4SBeni Lev 	TP_ARGS(wiphy, rx, tx),
165114e8a3c4SBeni Lev 	TP_STRUCT__entry(
165214e8a3c4SBeni Lev 		WIPHY_ENTRY
165314e8a3c4SBeni Lev 		__field(u32, tx)
165414e8a3c4SBeni Lev 		__field(u32, rx)
165514e8a3c4SBeni Lev 	),
165614e8a3c4SBeni Lev 	TP_fast_assign(
165714e8a3c4SBeni Lev 		WIPHY_ASSIGN;
165814e8a3c4SBeni Lev 		__entry->tx = tx;
165914e8a3c4SBeni Lev 		__entry->rx = rx;
166014e8a3c4SBeni Lev 	),
166114e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
166214e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->tx, __entry->rx)
166314e8a3c4SBeni Lev );
166414e8a3c4SBeni Lev 
166514e8a3c4SBeni Lev DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
166614e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
166714e8a3c4SBeni Lev 	TP_ARGS(wiphy, rx, tx)
166814e8a3c4SBeni Lev );
166914e8a3c4SBeni Lev 
1670ca986ad9SArend Van Spriel DECLARE_EVENT_CLASS(wiphy_netdev_id_evt,
1671ca986ad9SArend Van Spriel 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1672ca986ad9SArend Van Spriel 	TP_ARGS(wiphy, netdev, id),
167314e8a3c4SBeni Lev 	TP_STRUCT__entry(
167414e8a3c4SBeni Lev 		WIPHY_ENTRY
167514e8a3c4SBeni Lev 		NETDEV_ENTRY
1676ca986ad9SArend Van Spriel 		__field(u64, id)
167714e8a3c4SBeni Lev 	),
167814e8a3c4SBeni Lev 	TP_fast_assign(
167914e8a3c4SBeni Lev 		WIPHY_ASSIGN;
168014e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1681ca986ad9SArend Van Spriel 		__entry->id = id;
168214e8a3c4SBeni Lev 	),
1683ca986ad9SArend Van Spriel 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", id: %llu",
1684ca986ad9SArend Van Spriel 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->id)
1685ca986ad9SArend Van Spriel );
1686ca986ad9SArend Van Spriel 
1687ca986ad9SArend Van Spriel DEFINE_EVENT(wiphy_netdev_id_evt, rdev_sched_scan_start,
1688ca986ad9SArend Van Spriel 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1689ca986ad9SArend Van Spriel 	TP_ARGS(wiphy, netdev, id)
169014e8a3c4SBeni Lev );
169114e8a3c4SBeni Lev 
16923a3ecf1dSArend Van Spriel DEFINE_EVENT(wiphy_netdev_id_evt, rdev_sched_scan_stop,
16933a3ecf1dSArend Van Spriel 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
16943a3ecf1dSArend Van Spriel 	TP_ARGS(wiphy, netdev, id)
16953a3ecf1dSArend Van Spriel );
16963a3ecf1dSArend Van Spriel 
169714e8a3c4SBeni Lev TRACE_EVENT(rdev_tdls_mgmt,
169814e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
169914e8a3c4SBeni Lev 		 u8 *peer, u8 action_code, u8 dialog_token,
1700df942e7bSSunil Dutt Undekari 		 u16 status_code, u32 peer_capability,
170131fa97c5SArik Nemtsov 		 bool initiator, const u8 *buf, size_t len),
170214e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
170331fa97c5SArik Nemtsov 		peer_capability, initiator, buf, len),
170414e8a3c4SBeni Lev 	TP_STRUCT__entry(
170514e8a3c4SBeni Lev 		WIPHY_ENTRY
170614e8a3c4SBeni Lev 		NETDEV_ENTRY
170714e8a3c4SBeni Lev 		MAC_ENTRY(peer)
170814e8a3c4SBeni Lev 		__field(u8, action_code)
170914e8a3c4SBeni Lev 		__field(u8, dialog_token)
171014e8a3c4SBeni Lev 		__field(u16, status_code)
1711df942e7bSSunil Dutt Undekari 		__field(u32, peer_capability)
171231fa97c5SArik Nemtsov 		__field(bool, initiator)
171314e8a3c4SBeni Lev 		__dynamic_array(u8, buf, len)
171414e8a3c4SBeni Lev 	),
171514e8a3c4SBeni Lev 	TP_fast_assign(
171614e8a3c4SBeni Lev 		WIPHY_ASSIGN;
171714e8a3c4SBeni Lev 		NETDEV_ASSIGN;
171814e8a3c4SBeni Lev 		MAC_ASSIGN(peer, peer);
171914e8a3c4SBeni Lev 		__entry->action_code = action_code;
172014e8a3c4SBeni Lev 		__entry->dialog_token = dialog_token;
172114e8a3c4SBeni Lev 		__entry->status_code = status_code;
1722df942e7bSSunil Dutt Undekari 		__entry->peer_capability = peer_capability;
172331fa97c5SArik Nemtsov 		__entry->initiator = initiator;
172414e8a3c4SBeni Lev 		memcpy(__get_dynamic_array(buf), buf, len);
172514e8a3c4SBeni Lev 	),
1726ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, "
172731fa97c5SArik Nemtsov 		  "dialog_token: %u, status_code: %u, peer_capability: %u "
172831fa97c5SArik Nemtsov 		  "initiator: %s buf: %#.2x ",
172914e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
173014e8a3c4SBeni Lev 		  __entry->action_code, __entry->dialog_token,
1731df942e7bSSunil Dutt Undekari 		  __entry->status_code, __entry->peer_capability,
173231fa97c5SArik Nemtsov 		  BOOL_TO_STR(__entry->initiator),
1733df942e7bSSunil Dutt Undekari 		  ((u8 *)__get_dynamic_array(buf))[0])
173414e8a3c4SBeni Lev );
173514e8a3c4SBeni Lev 
173614e8a3c4SBeni Lev TRACE_EVENT(rdev_dump_survey,
1737aaaa10e0SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx),
1738aaaa10e0SJohannes Berg 	TP_ARGS(wiphy, netdev, _idx),
173914e8a3c4SBeni Lev 	TP_STRUCT__entry(
174014e8a3c4SBeni Lev 		WIPHY_ENTRY
174114e8a3c4SBeni Lev 		NETDEV_ENTRY
174214e8a3c4SBeni Lev 		__field(int, idx)
174314e8a3c4SBeni Lev 	),
174414e8a3c4SBeni Lev 	TP_fast_assign(
174514e8a3c4SBeni Lev 		WIPHY_ASSIGN;
174614e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1747aaaa10e0SJohannes Berg 		__entry->idx = _idx;
174814e8a3c4SBeni Lev 	),
1749ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
175014e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
175114e8a3c4SBeni Lev );
175214e8a3c4SBeni Lev 
175314e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_survey_info,
175414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
175514e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret, info),
175614e8a3c4SBeni Lev 	TP_STRUCT__entry(
175714e8a3c4SBeni Lev 		WIPHY_ENTRY
175814e8a3c4SBeni Lev 		CHAN_ENTRY
175914e8a3c4SBeni Lev 		__field(int, ret)
17604ed20bebSJohannes Berg 		__field(u64, time)
17614ed20bebSJohannes Berg 		__field(u64, time_busy)
17624ed20bebSJohannes Berg 		__field(u64, time_ext_busy)
17634ed20bebSJohannes Berg 		__field(u64, time_rx)
17644ed20bebSJohannes Berg 		__field(u64, time_tx)
1765052536abSJohannes Berg 		__field(u64, time_scan)
176614e8a3c4SBeni Lev 		__field(u32, filled)
176714e8a3c4SBeni Lev 		__field(s8, noise)
176814e8a3c4SBeni Lev 	),
176914e8a3c4SBeni Lev 	TP_fast_assign(
177014e8a3c4SBeni Lev 		WIPHY_ASSIGN;
177114e8a3c4SBeni Lev 		CHAN_ASSIGN(info->channel);
177214e8a3c4SBeni Lev 		__entry->ret = ret;
17734ed20bebSJohannes Berg 		__entry->time = info->time;
17744ed20bebSJohannes Berg 		__entry->time_busy = info->time_busy;
17754ed20bebSJohannes Berg 		__entry->time_ext_busy = info->time_ext_busy;
17764ed20bebSJohannes Berg 		__entry->time_rx = info->time_rx;
17774ed20bebSJohannes Berg 		__entry->time_tx = info->time_tx;
1778052536abSJohannes Berg 		__entry->time_scan = info->time_scan;
177914e8a3c4SBeni Lev 		__entry->filled = info->filled;
178014e8a3c4SBeni Lev 		__entry->noise = info->noise;
178114e8a3c4SBeni Lev 	),
178214e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
178314e8a3c4SBeni Lev 		  ", channel time: %llu, channel time busy: %llu, "
178414e8a3c4SBeni Lev 		  "channel time extension busy: %llu, channel time rx: %llu, "
1785052536abSJohannes Berg 		  "channel time tx: %llu, scan time: %llu, filled: %u, noise: %d",
178614e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
17874ed20bebSJohannes Berg 		  __entry->time, __entry->time_busy,
17884ed20bebSJohannes Berg 		  __entry->time_ext_busy, __entry->time_rx,
1789052536abSJohannes Berg 		  __entry->time_tx, __entry->time_scan,
1790052536abSJohannes Berg 		  __entry->filled, __entry->noise)
179114e8a3c4SBeni Lev );
179214e8a3c4SBeni Lev 
179314e8a3c4SBeni Lev TRACE_EVENT(rdev_tdls_oper,
179414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
179514e8a3c4SBeni Lev 		 u8 *peer, enum nl80211_tdls_operation oper),
179614e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, peer, oper),
179714e8a3c4SBeni Lev 	TP_STRUCT__entry(
179814e8a3c4SBeni Lev 		WIPHY_ENTRY
179914e8a3c4SBeni Lev 		NETDEV_ENTRY
180014e8a3c4SBeni Lev 		MAC_ENTRY(peer)
180114e8a3c4SBeni Lev 		__field(enum nl80211_tdls_operation, oper)
180214e8a3c4SBeni Lev 	),
180314e8a3c4SBeni Lev 	TP_fast_assign(
180414e8a3c4SBeni Lev 		WIPHY_ASSIGN;
180514e8a3c4SBeni Lev 		NETDEV_ASSIGN;
180614e8a3c4SBeni Lev 		MAC_ASSIGN(peer, peer);
180714e8a3c4SBeni Lev 		__entry->oper = oper;
180814e8a3c4SBeni Lev 	),
1809ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d",
181014e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
181114e8a3c4SBeni Lev );
181214e8a3c4SBeni Lev 
181314e8a3c4SBeni Lev DECLARE_EVENT_CLASS(rdev_pmksa,
181414e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
181514e8a3c4SBeni Lev 		 struct cfg80211_pmksa *pmksa),
181614e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, pmksa),
181714e8a3c4SBeni Lev 	TP_STRUCT__entry(
181814e8a3c4SBeni Lev 		WIPHY_ENTRY
181914e8a3c4SBeni Lev 		NETDEV_ENTRY
182014e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
182114e8a3c4SBeni Lev 	),
182214e8a3c4SBeni Lev 	TP_fast_assign(
182314e8a3c4SBeni Lev 		WIPHY_ASSIGN;
182414e8a3c4SBeni Lev 		NETDEV_ASSIGN;
182514e8a3c4SBeni Lev 		MAC_ASSIGN(bssid, pmksa->bssid);
182614e8a3c4SBeni Lev 	),
1827ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
182814e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
182914e8a3c4SBeni Lev );
183014e8a3c4SBeni Lev 
183114e8a3c4SBeni Lev TRACE_EVENT(rdev_probe_client,
183214e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
183314e8a3c4SBeni Lev 		 const u8 *peer),
183414e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, peer),
183514e8a3c4SBeni Lev 	TP_STRUCT__entry(
183614e8a3c4SBeni Lev 		WIPHY_ENTRY
183714e8a3c4SBeni Lev 		NETDEV_ENTRY
183814e8a3c4SBeni Lev 		MAC_ENTRY(peer)
183914e8a3c4SBeni Lev 	),
184014e8a3c4SBeni Lev 	TP_fast_assign(
184114e8a3c4SBeni Lev 		WIPHY_ASSIGN;
184214e8a3c4SBeni Lev 		NETDEV_ASSIGN;
184314e8a3c4SBeni Lev 		MAC_ASSIGN(peer, peer);
184414e8a3c4SBeni Lev 	),
1845ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
184614e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
184714e8a3c4SBeni Lev );
184814e8a3c4SBeni Lev 
184914e8a3c4SBeni Lev DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
185014e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
185114e8a3c4SBeni Lev 		 struct cfg80211_pmksa *pmksa),
185214e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, pmksa)
185314e8a3c4SBeni Lev );
185414e8a3c4SBeni Lev 
185514e8a3c4SBeni Lev DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
185614e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
185714e8a3c4SBeni Lev 		 struct cfg80211_pmksa *pmksa),
185814e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, pmksa)
185914e8a3c4SBeni Lev );
186014e8a3c4SBeni Lev 
186114e8a3c4SBeni Lev TRACE_EVENT(rdev_remain_on_channel,
186214e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
186314e8a3c4SBeni Lev 		 struct ieee80211_channel *chan,
186442d97a59SJohannes Berg 		 unsigned int duration),
186542d97a59SJohannes Berg 	TP_ARGS(wiphy, wdev, chan, duration),
186614e8a3c4SBeni Lev 	TP_STRUCT__entry(
186714e8a3c4SBeni Lev 		WIPHY_ENTRY
186814e8a3c4SBeni Lev 		WDEV_ENTRY
186914e8a3c4SBeni Lev 		CHAN_ENTRY
187014e8a3c4SBeni Lev 		__field(unsigned int, duration)
187114e8a3c4SBeni Lev 	),
187214e8a3c4SBeni Lev 	TP_fast_assign(
187314e8a3c4SBeni Lev 		WIPHY_ASSIGN;
187414e8a3c4SBeni Lev 		WDEV_ASSIGN;
187514e8a3c4SBeni Lev 		CHAN_ASSIGN(chan);
187614e8a3c4SBeni Lev 		__entry->duration = duration;
187714e8a3c4SBeni Lev 	),
1878ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
187942d97a59SJohannes Berg 		  WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
188014e8a3c4SBeni Lev );
188114e8a3c4SBeni Lev 
188214e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_cookie,
188314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
188414e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret, cookie),
188514e8a3c4SBeni Lev 	TP_STRUCT__entry(
188614e8a3c4SBeni Lev 		WIPHY_ENTRY
188714e8a3c4SBeni Lev 		__field(int, ret)
188814e8a3c4SBeni Lev 		__field(u64, cookie)
188914e8a3c4SBeni Lev 	),
189014e8a3c4SBeni Lev 	TP_fast_assign(
189114e8a3c4SBeni Lev 		WIPHY_ASSIGN;
189214e8a3c4SBeni Lev 		__entry->ret = ret;
189314e8a3c4SBeni Lev 		__entry->cookie = cookie;
189414e8a3c4SBeni Lev 	),
189514e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
189614e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->ret, __entry->cookie)
189714e8a3c4SBeni Lev );
189814e8a3c4SBeni Lev 
189914e8a3c4SBeni Lev TRACE_EVENT(rdev_cancel_remain_on_channel,
190014e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
190114e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev, cookie),
190214e8a3c4SBeni Lev 	TP_STRUCT__entry(
190314e8a3c4SBeni Lev 		WIPHY_ENTRY
190414e8a3c4SBeni Lev 		WDEV_ENTRY
190514e8a3c4SBeni Lev 		__field(u64, cookie)
190614e8a3c4SBeni Lev 	),
190714e8a3c4SBeni Lev 	TP_fast_assign(
190814e8a3c4SBeni Lev 		WIPHY_ASSIGN;
190914e8a3c4SBeni Lev 		WDEV_ASSIGN;
191014e8a3c4SBeni Lev 		__entry->cookie = cookie;
191114e8a3c4SBeni Lev 	),
1912ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
191314e8a3c4SBeni Lev 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
191414e8a3c4SBeni Lev );
191514e8a3c4SBeni Lev 
191614e8a3c4SBeni Lev TRACE_EVENT(rdev_mgmt_tx,
191714e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1918b176e629SAndrei Otcheretianski 		 struct cfg80211_mgmt_tx_params *params),
1919b176e629SAndrei Otcheretianski 	TP_ARGS(wiphy, wdev, params),
192014e8a3c4SBeni Lev 	TP_STRUCT__entry(
192114e8a3c4SBeni Lev 		WIPHY_ENTRY
192214e8a3c4SBeni Lev 		WDEV_ENTRY
192314e8a3c4SBeni Lev 		CHAN_ENTRY
192414e8a3c4SBeni Lev 		__field(bool, offchan)
192514e8a3c4SBeni Lev 		__field(unsigned int, wait)
192614e8a3c4SBeni Lev 		__field(bool, no_cck)
192714e8a3c4SBeni Lev 		__field(bool, dont_wait_for_ack)
192814e8a3c4SBeni Lev 	),
192914e8a3c4SBeni Lev 	TP_fast_assign(
193014e8a3c4SBeni Lev 		WIPHY_ASSIGN;
193114e8a3c4SBeni Lev 		WDEV_ASSIGN;
1932b176e629SAndrei Otcheretianski 		CHAN_ASSIGN(params->chan);
1933b176e629SAndrei Otcheretianski 		__entry->offchan = params->offchan;
1934b176e629SAndrei Otcheretianski 		__entry->wait = params->wait;
1935b176e629SAndrei Otcheretianski 		__entry->no_cck = params->no_cck;
1936b176e629SAndrei Otcheretianski 		__entry->dont_wait_for_ack = params->dont_wait_for_ack;
193714e8a3c4SBeni Lev 	),
1938ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
193942d97a59SJohannes Berg 		  " wait: %u, no cck: %s, dont wait for ack: %s",
194014e8a3c4SBeni Lev 		  WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
194142d97a59SJohannes Berg 		  BOOL_TO_STR(__entry->offchan), __entry->wait,
194214e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->no_cck),
194314e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->dont_wait_for_ack))
194414e8a3c4SBeni Lev );
194514e8a3c4SBeni Lev 
19462576a9acSDenis Kenzior TRACE_EVENT(rdev_tx_control_port,
19472576a9acSDenis Kenzior 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
19488d74a623SJohannes Berg 		 const u8 *buf, size_t len, const u8 *dest, __be16 proto,
19492576a9acSDenis Kenzior 		 bool unencrypted),
19508d74a623SJohannes Berg 	TP_ARGS(wiphy, netdev, buf, len, dest, proto, unencrypted),
19512576a9acSDenis Kenzior 	TP_STRUCT__entry(
19522576a9acSDenis Kenzior 		WIPHY_ENTRY
19532576a9acSDenis Kenzior 		NETDEV_ENTRY
19542576a9acSDenis Kenzior 		MAC_ENTRY(dest)
19558d74a623SJohannes Berg 		__field(__be16, proto)
19562576a9acSDenis Kenzior 		__field(bool, unencrypted)
19572576a9acSDenis Kenzior 	),
19582576a9acSDenis Kenzior 	TP_fast_assign(
19592576a9acSDenis Kenzior 		WIPHY_ASSIGN;
19602576a9acSDenis Kenzior 		NETDEV_ASSIGN;
19612576a9acSDenis Kenzior 		MAC_ASSIGN(dest, dest);
19628d74a623SJohannes Berg 		__entry->proto = proto;
19632576a9acSDenis Kenzior 		__entry->unencrypted = unencrypted;
19642576a9acSDenis Kenzior 	),
19658d74a623SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ","
19668d74a623SJohannes Berg 		  " proto: 0x%x, unencrypted: %s",
19678d74a623SJohannes Berg 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dest),
19688d74a623SJohannes Berg 		  be16_to_cpu(__entry->proto),
19692576a9acSDenis Kenzior 		  BOOL_TO_STR(__entry->unencrypted))
19702576a9acSDenis Kenzior );
19712576a9acSDenis Kenzior 
197214e8a3c4SBeni Lev TRACE_EVENT(rdev_set_noack_map,
197314e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
197414e8a3c4SBeni Lev 		 u16 noack_map),
197514e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, noack_map),
197614e8a3c4SBeni Lev 	TP_STRUCT__entry(
197714e8a3c4SBeni Lev 		WIPHY_ENTRY
197814e8a3c4SBeni Lev 		NETDEV_ENTRY
197914e8a3c4SBeni Lev 		__field(u16, noack_map)
198014e8a3c4SBeni Lev 	),
198114e8a3c4SBeni Lev 	TP_fast_assign(
198214e8a3c4SBeni Lev 		WIPHY_ASSIGN;
198314e8a3c4SBeni Lev 		NETDEV_ASSIGN;
198414e8a3c4SBeni Lev 		__entry->noack_map = noack_map;
198514e8a3c4SBeni Lev 	),
1986ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
198714e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
198814e8a3c4SBeni Lev );
198914e8a3c4SBeni Lev 
199014e8a3c4SBeni Lev DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel,
199114e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
199214e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev)
199314e8a3c4SBeni Lev );
199414e8a3c4SBeni Lev 
1995683b6d3bSJohannes Berg TRACE_EVENT(rdev_return_chandef,
1996683b6d3bSJohannes Berg 	TP_PROTO(struct wiphy *wiphy, int ret,
1997683b6d3bSJohannes Berg 		 struct cfg80211_chan_def *chandef),
1998683b6d3bSJohannes Berg 	TP_ARGS(wiphy, ret, chandef),
199914e8a3c4SBeni Lev 	TP_STRUCT__entry(
200014e8a3c4SBeni Lev 		WIPHY_ENTRY
2001683b6d3bSJohannes Berg 		__field(int, ret)
2002683b6d3bSJohannes Berg 		CHAN_DEF_ENTRY
200314e8a3c4SBeni Lev 	),
200414e8a3c4SBeni Lev 	TP_fast_assign(
200514e8a3c4SBeni Lev 		WIPHY_ASSIGN;
2006683b6d3bSJohannes Berg 		if (ret == 0)
2007683b6d3bSJohannes Berg 			CHAN_DEF_ASSIGN(chandef);
2008683b6d3bSJohannes Berg 		else
2009683b6d3bSJohannes Berg 			CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
2010683b6d3bSJohannes Berg 		__entry->ret = ret;
201114e8a3c4SBeni Lev 	),
2012ec816087SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
2013683b6d3bSJohannes Berg 		  WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
201414e8a3c4SBeni Lev );
201514e8a3c4SBeni Lev 
2016eeb126e9SJohannes Berg DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
2017eeb126e9SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2018eeb126e9SJohannes Berg 	TP_ARGS(wiphy, wdev)
2019eeb126e9SJohannes Berg );
2020eeb126e9SJohannes Berg 
2021eeb126e9SJohannes Berg DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
2022eeb126e9SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2023eeb126e9SJohannes Berg 	TP_ARGS(wiphy, wdev)
2024eeb126e9SJohannes Berg );
2025eeb126e9SJohannes Berg 
2026cb3b7d87SAyala Beker TRACE_EVENT(rdev_start_nan,
2027cb3b7d87SAyala Beker 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2028cb3b7d87SAyala Beker 		 struct cfg80211_nan_conf *conf),
2029cb3b7d87SAyala Beker 	TP_ARGS(wiphy, wdev, conf),
2030cb3b7d87SAyala Beker 	TP_STRUCT__entry(
2031cb3b7d87SAyala Beker 		WIPHY_ENTRY
2032cb3b7d87SAyala Beker 		WDEV_ENTRY
2033cb3b7d87SAyala Beker 		__field(u8, master_pref)
203404ae87a5SPeter Zijlstra 		__field(u8, bands)
2035cb3b7d87SAyala Beker 	),
2036cb3b7d87SAyala Beker 	TP_fast_assign(
2037cb3b7d87SAyala Beker 		WIPHY_ASSIGN;
2038cb3b7d87SAyala Beker 		WDEV_ASSIGN;
2039cb3b7d87SAyala Beker 		__entry->master_pref = conf->master_pref;
20408585989dSLuca Coelho 		__entry->bands = conf->bands;
2041cb3b7d87SAyala Beker 	),
2042cb3b7d87SAyala Beker 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
20438585989dSLuca Coelho 		  ", master preference: %u, bands: 0x%0x",
2044cb3b7d87SAyala Beker 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
20458585989dSLuca Coelho 		  __entry->bands)
2046cb3b7d87SAyala Beker );
2047cb3b7d87SAyala Beker 
2048a5a9dcf2SAyala Beker TRACE_EVENT(rdev_nan_change_conf,
2049a5a9dcf2SAyala Beker 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2050a5a9dcf2SAyala Beker 		 struct cfg80211_nan_conf *conf, u32 changes),
2051a5a9dcf2SAyala Beker 	TP_ARGS(wiphy, wdev, conf, changes),
2052a5a9dcf2SAyala Beker 	TP_STRUCT__entry(
2053a5a9dcf2SAyala Beker 		WIPHY_ENTRY
2054a5a9dcf2SAyala Beker 		WDEV_ENTRY
2055a5a9dcf2SAyala Beker 		__field(u8, master_pref)
205604ae87a5SPeter Zijlstra 		__field(u8, bands)
205704ae87a5SPeter Zijlstra 		__field(u32, changes)
2058a5a9dcf2SAyala Beker 	),
2059a5a9dcf2SAyala Beker 	TP_fast_assign(
2060a5a9dcf2SAyala Beker 		WIPHY_ASSIGN;
2061a5a9dcf2SAyala Beker 		WDEV_ASSIGN;
2062a5a9dcf2SAyala Beker 		__entry->master_pref = conf->master_pref;
20638585989dSLuca Coelho 		__entry->bands = conf->bands;
2064a5a9dcf2SAyala Beker 		__entry->changes = changes;
2065a5a9dcf2SAyala Beker 	),
2066a5a9dcf2SAyala Beker 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
20678585989dSLuca Coelho 		  ", master preference: %u, bands: 0x%0x, changes: %x",
2068a5a9dcf2SAyala Beker 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
20698585989dSLuca Coelho 		  __entry->bands, __entry->changes)
2070a5a9dcf2SAyala Beker );
2071a5a9dcf2SAyala Beker 
2072cb3b7d87SAyala Beker DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_nan,
2073cb3b7d87SAyala Beker 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2074cb3b7d87SAyala Beker 	TP_ARGS(wiphy, wdev)
2075cb3b7d87SAyala Beker );
2076cb3b7d87SAyala Beker 
2077a442b761SAyala Beker TRACE_EVENT(rdev_add_nan_func,
2078a442b761SAyala Beker 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2079a442b761SAyala Beker 		 const struct cfg80211_nan_func *func),
2080a442b761SAyala Beker 	TP_ARGS(wiphy, wdev, func),
2081a442b761SAyala Beker 	TP_STRUCT__entry(
2082a442b761SAyala Beker 		WIPHY_ENTRY
2083a442b761SAyala Beker 		WDEV_ENTRY
2084a442b761SAyala Beker 		__field(u8, func_type)
2085a442b761SAyala Beker 		__field(u64, cookie)
2086a442b761SAyala Beker 	),
2087a442b761SAyala Beker 	TP_fast_assign(
2088a442b761SAyala Beker 		WIPHY_ASSIGN;
2089a442b761SAyala Beker 		WDEV_ASSIGN;
2090a442b761SAyala Beker 		__entry->func_type = func->type;
2091a442b761SAyala Beker 		__entry->cookie = func->cookie
2092a442b761SAyala Beker 	),
2093a442b761SAyala Beker 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type=%u, cookie=%llu",
2094a442b761SAyala Beker 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->func_type,
2095a442b761SAyala Beker 		  __entry->cookie)
2096a442b761SAyala Beker );
2097a442b761SAyala Beker 
2098a442b761SAyala Beker TRACE_EVENT(rdev_del_nan_func,
2099a442b761SAyala Beker 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2100a442b761SAyala Beker 		 u64 cookie),
2101a442b761SAyala Beker 	TP_ARGS(wiphy, wdev, cookie),
2102a442b761SAyala Beker 	TP_STRUCT__entry(
2103a442b761SAyala Beker 		WIPHY_ENTRY
2104a442b761SAyala Beker 		WDEV_ENTRY
2105a442b761SAyala Beker 		__field(u64, cookie)
2106a442b761SAyala Beker 	),
2107a442b761SAyala Beker 	TP_fast_assign(
2108a442b761SAyala Beker 		WIPHY_ASSIGN;
2109a442b761SAyala Beker 		WDEV_ASSIGN;
2110a442b761SAyala Beker 		__entry->cookie = cookie;
2111a442b761SAyala Beker 	),
2112a442b761SAyala Beker 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie=%llu",
2113a442b761SAyala Beker 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
2114a442b761SAyala Beker );
2115a442b761SAyala Beker 
211677765eafSVasanthakumar Thiagarajan TRACE_EVENT(rdev_set_mac_acl,
211777765eafSVasanthakumar Thiagarajan 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
211877765eafSVasanthakumar Thiagarajan 		 struct cfg80211_acl_data *params),
211977765eafSVasanthakumar Thiagarajan 	TP_ARGS(wiphy, netdev, params),
212077765eafSVasanthakumar Thiagarajan 	TP_STRUCT__entry(
212177765eafSVasanthakumar Thiagarajan 		WIPHY_ENTRY
212277765eafSVasanthakumar Thiagarajan 		NETDEV_ENTRY
212377765eafSVasanthakumar Thiagarajan 		__field(u32, acl_policy)
212477765eafSVasanthakumar Thiagarajan 	),
212577765eafSVasanthakumar Thiagarajan 	TP_fast_assign(
212677765eafSVasanthakumar Thiagarajan 		WIPHY_ASSIGN;
2127021fcdc1SVladimir Kondratiev 		NETDEV_ASSIGN;
212877765eafSVasanthakumar Thiagarajan 		__entry->acl_policy = params->acl_policy;
212977765eafSVasanthakumar Thiagarajan 	),
213077765eafSVasanthakumar Thiagarajan 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
213177765eafSVasanthakumar Thiagarajan 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
213277765eafSVasanthakumar Thiagarajan );
213377765eafSVasanthakumar Thiagarajan 
2134355199e0SJouni Malinen TRACE_EVENT(rdev_update_ft_ies,
2135355199e0SJouni Malinen 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2136355199e0SJouni Malinen 		 struct cfg80211_update_ft_ies_params *ftie),
2137355199e0SJouni Malinen 	TP_ARGS(wiphy, netdev, ftie),
2138355199e0SJouni Malinen 	TP_STRUCT__entry(
2139355199e0SJouni Malinen 		WIPHY_ENTRY
2140355199e0SJouni Malinen 		NETDEV_ENTRY
2141355199e0SJouni Malinen 		__field(u16, md)
2142355199e0SJouni Malinen 		__dynamic_array(u8, ie, ftie->ie_len)
2143355199e0SJouni Malinen 	),
2144355199e0SJouni Malinen 	TP_fast_assign(
2145355199e0SJouni Malinen 		WIPHY_ASSIGN;
2146355199e0SJouni Malinen 		NETDEV_ASSIGN;
2147355199e0SJouni Malinen 		__entry->md = ftie->md;
2148355199e0SJouni Malinen 		memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
2149355199e0SJouni Malinen 	),
2150355199e0SJouni Malinen 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
2151355199e0SJouni Malinen 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
2152355199e0SJouni Malinen );
2153355199e0SJouni Malinen 
21545de17984SArend van Spriel TRACE_EVENT(rdev_crit_proto_start,
21555de17984SArend van Spriel 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
21565de17984SArend van Spriel 		 enum nl80211_crit_proto_id protocol, u16 duration),
21575de17984SArend van Spriel 	TP_ARGS(wiphy, wdev, protocol, duration),
21585de17984SArend van Spriel 	TP_STRUCT__entry(
21595de17984SArend van Spriel 		WIPHY_ENTRY
21605de17984SArend van Spriel 		WDEV_ENTRY
21615de17984SArend van Spriel 		__field(u16, proto)
21625de17984SArend van Spriel 		__field(u16, duration)
21635de17984SArend van Spriel 	),
21645de17984SArend van Spriel 	TP_fast_assign(
21655de17984SArend van Spriel 		WIPHY_ASSIGN;
21665de17984SArend van Spriel 		WDEV_ASSIGN;
21675de17984SArend van Spriel 		__entry->proto = protocol;
21685de17984SArend van Spriel 		__entry->duration = duration;
21695de17984SArend van Spriel 	),
21705de17984SArend van Spriel 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
21715de17984SArend van Spriel 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
21725de17984SArend van Spriel );
21735de17984SArend van Spriel 
21745de17984SArend van Spriel TRACE_EVENT(rdev_crit_proto_stop,
21755de17984SArend van Spriel 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
21765de17984SArend van Spriel 	TP_ARGS(wiphy, wdev),
21775de17984SArend van Spriel 	TP_STRUCT__entry(
21785de17984SArend van Spriel 		WIPHY_ENTRY
21795de17984SArend van Spriel 		WDEV_ENTRY
21805de17984SArend van Spriel 	),
21815de17984SArend van Spriel 	TP_fast_assign(
21825de17984SArend van Spriel 		WIPHY_ASSIGN;
21835de17984SArend van Spriel 		WDEV_ASSIGN;
21845de17984SArend van Spriel 	),
21855de17984SArend van Spriel 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
21865de17984SArend van Spriel 		  WIPHY_PR_ARG, WDEV_PR_ARG)
21875de17984SArend van Spriel );
21885de17984SArend van Spriel 
218916ef1fe2SSimon Wunderlich TRACE_EVENT(rdev_channel_switch,
219016ef1fe2SSimon Wunderlich 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
219116ef1fe2SSimon Wunderlich 		 struct cfg80211_csa_settings *params),
219216ef1fe2SSimon Wunderlich 	TP_ARGS(wiphy, netdev, params),
219316ef1fe2SSimon Wunderlich 	TP_STRUCT__entry(
219416ef1fe2SSimon Wunderlich 		WIPHY_ENTRY
219516ef1fe2SSimon Wunderlich 		NETDEV_ENTRY
219616ef1fe2SSimon Wunderlich 		CHAN_DEF_ENTRY
219716ef1fe2SSimon Wunderlich 		__field(bool, radar_required)
219816ef1fe2SSimon Wunderlich 		__field(bool, block_tx)
219916ef1fe2SSimon Wunderlich 		__field(u8, count)
22009a774c78SAndrei Otcheretianski 		__dynamic_array(u16, bcn_ofs, params->n_counter_offsets_beacon)
22019a774c78SAndrei Otcheretianski 		__dynamic_array(u16, pres_ofs, params->n_counter_offsets_presp)
220216ef1fe2SSimon Wunderlich 	),
220316ef1fe2SSimon Wunderlich 	TP_fast_assign(
220416ef1fe2SSimon Wunderlich 		WIPHY_ASSIGN;
220516ef1fe2SSimon Wunderlich 		NETDEV_ASSIGN;
220616ef1fe2SSimon Wunderlich 		CHAN_DEF_ASSIGN(&params->chandef);
220716ef1fe2SSimon Wunderlich 		__entry->radar_required = params->radar_required;
220816ef1fe2SSimon Wunderlich 		__entry->block_tx = params->block_tx;
220916ef1fe2SSimon Wunderlich 		__entry->count = params->count;
22109a774c78SAndrei Otcheretianski 		memcpy(__get_dynamic_array(bcn_ofs),
22119a774c78SAndrei Otcheretianski 		       params->counter_offsets_beacon,
22129a774c78SAndrei Otcheretianski 		       params->n_counter_offsets_beacon * sizeof(u16));
22139a774c78SAndrei Otcheretianski 
22149a774c78SAndrei Otcheretianski 		/* probe response offsets are optional */
22159a774c78SAndrei Otcheretianski 		if (params->n_counter_offsets_presp)
22169a774c78SAndrei Otcheretianski 			memcpy(__get_dynamic_array(pres_ofs),
22179a774c78SAndrei Otcheretianski 			       params->counter_offsets_presp,
22189a774c78SAndrei Otcheretianski 			       params->n_counter_offsets_presp * sizeof(u16));
221916ef1fe2SSimon Wunderlich 	),
222016ef1fe2SSimon Wunderlich 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
22219a774c78SAndrei Otcheretianski 		  ", block_tx: %d, count: %u, radar_required: %d",
222216ef1fe2SSimon Wunderlich 		  WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
22239a774c78SAndrei Otcheretianski 		  __entry->block_tx, __entry->count, __entry->radar_required)
222416ef1fe2SSimon Wunderlich );
222516ef1fe2SSimon Wunderlich 
2226fa9ffc74SKyeyoon Park TRACE_EVENT(rdev_set_qos_map,
2227fa9ffc74SKyeyoon Park 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2228fa9ffc74SKyeyoon Park 		 struct cfg80211_qos_map *qos_map),
2229fa9ffc74SKyeyoon Park 	TP_ARGS(wiphy, netdev, qos_map),
2230fa9ffc74SKyeyoon Park 	TP_STRUCT__entry(
2231fa9ffc74SKyeyoon Park 		WIPHY_ENTRY
2232fa9ffc74SKyeyoon Park 		NETDEV_ENTRY
2233fa9ffc74SKyeyoon Park 		QOS_MAP_ENTRY
2234fa9ffc74SKyeyoon Park 	),
2235fa9ffc74SKyeyoon Park 	TP_fast_assign(
2236fa9ffc74SKyeyoon Park 		WIPHY_ASSIGN;
2237fa9ffc74SKyeyoon Park 		NETDEV_ASSIGN;
2238fa9ffc74SKyeyoon Park 		QOS_MAP_ASSIGN(qos_map);
2239fa9ffc74SKyeyoon Park 	),
2240fa9ffc74SKyeyoon Park 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u",
2241fa9ffc74SKyeyoon Park 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des)
2242fa9ffc74SKyeyoon Park );
2243fa9ffc74SKyeyoon Park 
2244e16821bcSJouni Malinen TRACE_EVENT(rdev_set_ap_chanwidth,
2245e16821bcSJouni Malinen 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2246e16821bcSJouni Malinen 		 struct cfg80211_chan_def *chandef),
2247e16821bcSJouni Malinen 	TP_ARGS(wiphy, netdev, chandef),
2248e16821bcSJouni Malinen 	TP_STRUCT__entry(
2249e16821bcSJouni Malinen 		WIPHY_ENTRY
2250e16821bcSJouni Malinen 		NETDEV_ENTRY
2251e16821bcSJouni Malinen 		CHAN_DEF_ENTRY
2252e16821bcSJouni Malinen 	),
2253e16821bcSJouni Malinen 	TP_fast_assign(
2254e16821bcSJouni Malinen 		WIPHY_ASSIGN;
2255e16821bcSJouni Malinen 		NETDEV_ASSIGN;
2256e16821bcSJouni Malinen 		CHAN_DEF_ASSIGN(chandef);
2257e16821bcSJouni Malinen 	),
2258e16821bcSJouni Malinen 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2259e16821bcSJouni Malinen 		  WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2260e16821bcSJouni Malinen );
2261e16821bcSJouni Malinen 
2262960d01acSJohannes Berg TRACE_EVENT(rdev_add_tx_ts,
2263960d01acSJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2264960d01acSJohannes Berg 		 u8 tsid, const u8 *peer, u8 user_prio, u16 admitted_time),
2265960d01acSJohannes Berg 	TP_ARGS(wiphy, netdev, tsid, peer, user_prio, admitted_time),
2266960d01acSJohannes Berg 	TP_STRUCT__entry(
2267960d01acSJohannes Berg 		WIPHY_ENTRY
2268960d01acSJohannes Berg 		NETDEV_ENTRY
2269960d01acSJohannes Berg 		MAC_ENTRY(peer)
2270960d01acSJohannes Berg 		__field(u8, tsid)
2271960d01acSJohannes Berg 		__field(u8, user_prio)
2272960d01acSJohannes Berg 		__field(u16, admitted_time)
2273960d01acSJohannes Berg 	),
2274960d01acSJohannes Berg 	TP_fast_assign(
2275960d01acSJohannes Berg 		WIPHY_ASSIGN;
2276960d01acSJohannes Berg 		NETDEV_ASSIGN;
2277960d01acSJohannes Berg 		MAC_ASSIGN(peer, peer);
2278960d01acSJohannes Berg 		__entry->tsid = tsid;
2279960d01acSJohannes Berg 		__entry->user_prio = user_prio;
2280960d01acSJohannes Berg 		__entry->admitted_time = admitted_time;
2281960d01acSJohannes Berg 	),
2282960d01acSJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d, UP %d, time %d",
2283960d01acSJohannes Berg 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
2284960d01acSJohannes Berg 		  __entry->tsid, __entry->user_prio, __entry->admitted_time)
2285960d01acSJohannes Berg );
2286960d01acSJohannes Berg 
2287960d01acSJohannes Berg TRACE_EVENT(rdev_del_tx_ts,
2288960d01acSJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2289960d01acSJohannes Berg 		 u8 tsid, const u8 *peer),
2290960d01acSJohannes Berg 	TP_ARGS(wiphy, netdev, tsid, peer),
2291960d01acSJohannes Berg 	TP_STRUCT__entry(
2292960d01acSJohannes Berg 		WIPHY_ENTRY
2293960d01acSJohannes Berg 		NETDEV_ENTRY
2294960d01acSJohannes Berg 		MAC_ENTRY(peer)
2295960d01acSJohannes Berg 		__field(u8, tsid)
2296960d01acSJohannes Berg 	),
2297960d01acSJohannes Berg 	TP_fast_assign(
2298960d01acSJohannes Berg 		WIPHY_ASSIGN;
2299960d01acSJohannes Berg 		NETDEV_ASSIGN;
2300960d01acSJohannes Berg 		MAC_ASSIGN(peer, peer);
2301960d01acSJohannes Berg 		__entry->tsid = tsid;
2302960d01acSJohannes Berg 	),
2303960d01acSJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d",
2304960d01acSJohannes Berg 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tsid)
2305960d01acSJohannes Berg );
2306960d01acSJohannes Berg 
23071057d35eSArik Nemtsov TRACE_EVENT(rdev_tdls_channel_switch,
23081057d35eSArik Nemtsov 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
23091057d35eSArik Nemtsov 		 const u8 *addr, u8 oper_class,
23101057d35eSArik Nemtsov 		 struct cfg80211_chan_def *chandef),
23111057d35eSArik Nemtsov 	TP_ARGS(wiphy, netdev, addr, oper_class, chandef),
23121057d35eSArik Nemtsov 	TP_STRUCT__entry(
23131057d35eSArik Nemtsov 		WIPHY_ENTRY
23141057d35eSArik Nemtsov 		NETDEV_ENTRY
23151057d35eSArik Nemtsov 		MAC_ENTRY(addr)
23161057d35eSArik Nemtsov 		__field(u8, oper_class)
23171057d35eSArik Nemtsov 		CHAN_DEF_ENTRY
23181057d35eSArik Nemtsov 	),
23191057d35eSArik Nemtsov 	TP_fast_assign(
23201057d35eSArik Nemtsov 		WIPHY_ASSIGN;
23211057d35eSArik Nemtsov 		NETDEV_ASSIGN;
23221057d35eSArik Nemtsov 		MAC_ASSIGN(addr, addr);
23231057d35eSArik Nemtsov 		CHAN_DEF_ASSIGN(chandef);
23241057d35eSArik Nemtsov 	),
23251057d35eSArik Nemtsov 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT
23261057d35eSArik Nemtsov 		  " oper class %d, " CHAN_DEF_PR_FMT,
23271057d35eSArik Nemtsov 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr),
23281057d35eSArik Nemtsov 		  __entry->oper_class, CHAN_DEF_PR_ARG)
23291057d35eSArik Nemtsov );
23301057d35eSArik Nemtsov 
23311057d35eSArik Nemtsov TRACE_EVENT(rdev_tdls_cancel_channel_switch,
23321057d35eSArik Nemtsov 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
23331057d35eSArik Nemtsov 		 const u8 *addr),
23341057d35eSArik Nemtsov 	TP_ARGS(wiphy, netdev, addr),
23351057d35eSArik Nemtsov 	TP_STRUCT__entry(
23361057d35eSArik Nemtsov 		WIPHY_ENTRY
23371057d35eSArik Nemtsov 		NETDEV_ENTRY
23381057d35eSArik Nemtsov 		MAC_ENTRY(addr)
23391057d35eSArik Nemtsov 	),
23401057d35eSArik Nemtsov 	TP_fast_assign(
23411057d35eSArik Nemtsov 		WIPHY_ASSIGN;
23421057d35eSArik Nemtsov 		NETDEV_ASSIGN;
23431057d35eSArik Nemtsov 		MAC_ASSIGN(addr, addr);
23441057d35eSArik Nemtsov 	),
23451057d35eSArik Nemtsov 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
23461057d35eSArik Nemtsov 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr))
23471057d35eSArik Nemtsov );
23481057d35eSArik Nemtsov 
23493a00df57SAvraham Stern TRACE_EVENT(rdev_set_pmk,
23503a00df57SAvraham Stern 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
23513a00df57SAvraham Stern 		 struct cfg80211_pmk_conf *pmk_conf),
23523a00df57SAvraham Stern 
23533a00df57SAvraham Stern 	TP_ARGS(wiphy, netdev, pmk_conf),
23543a00df57SAvraham Stern 
23553a00df57SAvraham Stern 	TP_STRUCT__entry(
23563a00df57SAvraham Stern 		WIPHY_ENTRY
23573a00df57SAvraham Stern 		NETDEV_ENTRY
23583a00df57SAvraham Stern 		MAC_ENTRY(aa)
23593a00df57SAvraham Stern 		__field(u8, pmk_len)
23603a00df57SAvraham Stern 		__field(u8, pmk_r0_name_len)
23613a00df57SAvraham Stern 		__dynamic_array(u8, pmk, pmk_conf->pmk_len)
23623a00df57SAvraham Stern 		__dynamic_array(u8, pmk_r0_name, WLAN_PMK_NAME_LEN)
23633a00df57SAvraham Stern 	),
23643a00df57SAvraham Stern 
23653a00df57SAvraham Stern 	TP_fast_assign(
23663a00df57SAvraham Stern 		WIPHY_ASSIGN;
23673a00df57SAvraham Stern 		NETDEV_ASSIGN;
23683a00df57SAvraham Stern 		MAC_ASSIGN(aa, pmk_conf->aa);
23693a00df57SAvraham Stern 		__entry->pmk_len = pmk_conf->pmk_len;
23703a00df57SAvraham Stern 		__entry->pmk_r0_name_len =
23713a00df57SAvraham Stern 		pmk_conf->pmk_r0_name ? WLAN_PMK_NAME_LEN : 0;
23723a00df57SAvraham Stern 		memcpy(__get_dynamic_array(pmk), pmk_conf->pmk,
23733a00df57SAvraham Stern 		       pmk_conf->pmk_len);
23743a00df57SAvraham Stern 		memcpy(__get_dynamic_array(pmk_r0_name), pmk_conf->pmk_r0_name,
23753a00df57SAvraham Stern 		       pmk_conf->pmk_r0_name ? WLAN_PMK_NAME_LEN : 0);
23763a00df57SAvraham Stern 	),
23773a00df57SAvraham Stern 
23783a00df57SAvraham Stern 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT
23793a00df57SAvraham Stern 		  "pmk_len=%u, pmk: %s pmk_r0_name: %s", WIPHY_PR_ARG,
23803a00df57SAvraham Stern 		  NETDEV_PR_ARG, MAC_PR_ARG(aa), __entry->pmk_len,
23813a00df57SAvraham Stern 		  __print_array(__get_dynamic_array(pmk),
23823a00df57SAvraham Stern 				__get_dynamic_array_len(pmk), 1),
23833a00df57SAvraham Stern 		  __entry->pmk_r0_name_len ?
23843a00df57SAvraham Stern 		  __print_array(__get_dynamic_array(pmk_r0_name),
23853a00df57SAvraham Stern 				__get_dynamic_array_len(pmk_r0_name), 1) : "")
23863a00df57SAvraham Stern );
23873a00df57SAvraham Stern 
23883a00df57SAvraham Stern TRACE_EVENT(rdev_del_pmk,
23893a00df57SAvraham Stern 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *aa),
23903a00df57SAvraham Stern 
23913a00df57SAvraham Stern 	TP_ARGS(wiphy, netdev, aa),
23923a00df57SAvraham Stern 
23933a00df57SAvraham Stern 	TP_STRUCT__entry(
23943a00df57SAvraham Stern 		WIPHY_ENTRY
23953a00df57SAvraham Stern 		NETDEV_ENTRY
23963a00df57SAvraham Stern 		MAC_ENTRY(aa)
23973a00df57SAvraham Stern 	),
23983a00df57SAvraham Stern 
23993a00df57SAvraham Stern 	TP_fast_assign(
24003a00df57SAvraham Stern 		WIPHY_ASSIGN;
24013a00df57SAvraham Stern 		NETDEV_ASSIGN;
24023a00df57SAvraham Stern 		MAC_ASSIGN(aa, aa);
24033a00df57SAvraham Stern 	),
24043a00df57SAvraham Stern 
24053a00df57SAvraham Stern 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
24063a00df57SAvraham Stern 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(aa))
24073a00df57SAvraham Stern );
24083a00df57SAvraham Stern 
240940cbfa90SSrinivas Dasari TRACE_EVENT(rdev_external_auth,
241040cbfa90SSrinivas Dasari 	    TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
241140cbfa90SSrinivas Dasari 		     struct cfg80211_external_auth_params *params),
241240cbfa90SSrinivas Dasari 	    TP_ARGS(wiphy, netdev, params),
241340cbfa90SSrinivas Dasari 	    TP_STRUCT__entry(WIPHY_ENTRY
241440cbfa90SSrinivas Dasari 			     NETDEV_ENTRY
241540cbfa90SSrinivas Dasari 			     MAC_ENTRY(bssid)
241640cbfa90SSrinivas Dasari 			     __array(u8, ssid, IEEE80211_MAX_SSID_LEN + 1)
241740cbfa90SSrinivas Dasari 			     __field(u16, status)
241840cbfa90SSrinivas Dasari 	    ),
241940cbfa90SSrinivas Dasari 	    TP_fast_assign(WIPHY_ASSIGN;
242040cbfa90SSrinivas Dasari 			   NETDEV_ASSIGN;
242140cbfa90SSrinivas Dasari 			   MAC_ASSIGN(bssid, params->bssid);
242240cbfa90SSrinivas Dasari 			   memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
242340cbfa90SSrinivas Dasari 			   memcpy(__entry->ssid, params->ssid.ssid,
242440cbfa90SSrinivas Dasari 				  params->ssid.ssid_len);
242540cbfa90SSrinivas Dasari 			   __entry->status = params->status;
242640cbfa90SSrinivas Dasari 	    ),
242740cbfa90SSrinivas Dasari 	    TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
242840cbfa90SSrinivas Dasari 		      ", ssid: %s, status: %u", WIPHY_PR_ARG, NETDEV_PR_ARG,
242940cbfa90SSrinivas Dasari 		      __entry->bssid, __entry->ssid, __entry->status)
243040cbfa90SSrinivas Dasari );
243140cbfa90SSrinivas Dasari 
24325207ca55SJohannes Berg TRACE_EVENT(rdev_start_radar_detection,
24335207ca55SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
24345207ca55SJohannes Berg 		 struct cfg80211_chan_def *chandef,
24355207ca55SJohannes Berg 		 u32 cac_time_ms),
24365207ca55SJohannes Berg 	TP_ARGS(wiphy, netdev, chandef, cac_time_ms),
24375207ca55SJohannes Berg 	TP_STRUCT__entry(
24385207ca55SJohannes Berg 		WIPHY_ENTRY
24395207ca55SJohannes Berg 		NETDEV_ENTRY
24405207ca55SJohannes Berg 		CHAN_DEF_ENTRY
24415207ca55SJohannes Berg 		__field(u32, cac_time_ms)
24425207ca55SJohannes Berg 	),
24435207ca55SJohannes Berg 	TP_fast_assign(
24445207ca55SJohannes Berg 		WIPHY_ASSIGN;
24455207ca55SJohannes Berg 		NETDEV_ASSIGN;
24465207ca55SJohannes Berg 		CHAN_DEF_ASSIGN(chandef);
24475207ca55SJohannes Berg 		__entry->cac_time_ms = cac_time_ms;
24485207ca55SJohannes Berg 	),
24495207ca55SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
24505207ca55SJohannes Berg 		  ", cac_time_ms=%u",
24515207ca55SJohannes Berg 		  WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
24525207ca55SJohannes Berg 		  __entry->cac_time_ms)
24535207ca55SJohannes Berg );
24545207ca55SJohannes Berg 
24555207ca55SJohannes Berg TRACE_EVENT(rdev_set_mcast_rate,
24565207ca55SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
24575207ca55SJohannes Berg 		 int *mcast_rate),
24585207ca55SJohannes Berg 	TP_ARGS(wiphy, netdev, mcast_rate),
24595207ca55SJohannes Berg 	TP_STRUCT__entry(
24605207ca55SJohannes Berg 		WIPHY_ENTRY
24615207ca55SJohannes Berg 		NETDEV_ENTRY
24625207ca55SJohannes Berg 		__array(int, mcast_rate, NUM_NL80211_BANDS)
24635207ca55SJohannes Berg 	),
24645207ca55SJohannes Berg 	TP_fast_assign(
24655207ca55SJohannes Berg 		WIPHY_ASSIGN;
24665207ca55SJohannes Berg 		NETDEV_ASSIGN;
24675207ca55SJohannes Berg 		memcpy(__entry->mcast_rate, mcast_rate,
24685207ca55SJohannes Berg 		       sizeof(int) * NUM_NL80211_BANDS);
24695207ca55SJohannes Berg 	),
24705207ca55SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", "
2471e548a1c3SArend van Spriel 		  "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 6GHz=0x%x, 60GHz=0x%x]",
24725207ca55SJohannes Berg 		  WIPHY_PR_ARG, NETDEV_PR_ARG,
24735207ca55SJohannes Berg 		  __entry->mcast_rate[NL80211_BAND_2GHZ],
24745207ca55SJohannes Berg 		  __entry->mcast_rate[NL80211_BAND_5GHZ],
2475e548a1c3SArend van Spriel 		  __entry->mcast_rate[NL80211_BAND_6GHZ],
24765207ca55SJohannes Berg 		  __entry->mcast_rate[NL80211_BAND_60GHZ])
24775207ca55SJohannes Berg );
24785207ca55SJohannes Berg 
24795207ca55SJohannes Berg TRACE_EVENT(rdev_set_coalesce,
24805207ca55SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_coalesce *coalesce),
24815207ca55SJohannes Berg 	TP_ARGS(wiphy, coalesce),
24825207ca55SJohannes Berg 	TP_STRUCT__entry(
24835207ca55SJohannes Berg 		WIPHY_ENTRY
24845207ca55SJohannes Berg 		__field(int, n_rules)
24855207ca55SJohannes Berg 	),
24865207ca55SJohannes Berg 	TP_fast_assign(
24875207ca55SJohannes Berg 		WIPHY_ASSIGN;
24885207ca55SJohannes Berg 		__entry->n_rules = coalesce ? coalesce->n_rules : 0;
24895207ca55SJohannes Berg 	),
24905207ca55SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", n_rules=%d",
24915207ca55SJohannes Berg 		  WIPHY_PR_ARG, __entry->n_rules)
24925207ca55SJohannes Berg );
24935207ca55SJohannes Berg 
24945207ca55SJohannes Berg DEFINE_EVENT(wiphy_wdev_evt, rdev_abort_scan,
24955207ca55SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
24965207ca55SJohannes Berg 	TP_ARGS(wiphy, wdev)
24975207ca55SJohannes Berg );
24985207ca55SJohannes Berg 
24995207ca55SJohannes Berg TRACE_EVENT(rdev_set_multicast_to_unicast,
25005207ca55SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
25015207ca55SJohannes Berg 		 const bool enabled),
25025207ca55SJohannes Berg 	TP_ARGS(wiphy, netdev, enabled),
25035207ca55SJohannes Berg 	TP_STRUCT__entry(
25045207ca55SJohannes Berg 		WIPHY_ENTRY
25055207ca55SJohannes Berg 		NETDEV_ENTRY
25065207ca55SJohannes Berg 		__field(bool, enabled)
25075207ca55SJohannes Berg 	),
25085207ca55SJohannes Berg 	TP_fast_assign(
25095207ca55SJohannes Berg 		WIPHY_ASSIGN;
25105207ca55SJohannes Berg 		NETDEV_ASSIGN;
25115207ca55SJohannes Berg 		__entry->enabled = enabled;
25125207ca55SJohannes Berg 	),
25135207ca55SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", unicast: %s",
25145207ca55SJohannes Berg 		  WIPHY_PR_ARG, NETDEV_PR_ARG,
25155207ca55SJohannes Berg 		  BOOL_TO_STR(__entry->enabled))
25165207ca55SJohannes Berg );
25175207ca55SJohannes Berg 
25185207ca55SJohannes Berg DEFINE_EVENT(wiphy_wdev_evt, rdev_get_txq_stats,
25195207ca55SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
25205207ca55SJohannes Berg 	TP_ARGS(wiphy, wdev)
25215207ca55SJohannes Berg );
25225207ca55SJohannes Berg 
25235207ca55SJohannes Berg TRACE_EVENT(rdev_get_ftm_responder_stats,
25245207ca55SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
25255207ca55SJohannes Berg 		 struct cfg80211_ftm_responder_stats *ftm_stats),
25265207ca55SJohannes Berg 
25275207ca55SJohannes Berg 	TP_ARGS(wiphy, netdev, ftm_stats),
25285207ca55SJohannes Berg 
25295207ca55SJohannes Berg 	TP_STRUCT__entry(
25305207ca55SJohannes Berg 		WIPHY_ENTRY
25315207ca55SJohannes Berg 		NETDEV_ENTRY
25325207ca55SJohannes Berg 		__field(u64, timestamp)
25335207ca55SJohannes Berg 		__field(u32, success_num)
25345207ca55SJohannes Berg 		__field(u32, partial_num)
25355207ca55SJohannes Berg 		__field(u32, failed_num)
25365207ca55SJohannes Berg 		__field(u32, asap_num)
25375207ca55SJohannes Berg 		__field(u32, non_asap_num)
25385207ca55SJohannes Berg 		__field(u64, duration)
25395207ca55SJohannes Berg 		__field(u32, unknown_triggers)
25405207ca55SJohannes Berg 		__field(u32, reschedule)
25415207ca55SJohannes Berg 		__field(u32, out_of_window)
25425207ca55SJohannes Berg 	),
25435207ca55SJohannes Berg 
25445207ca55SJohannes Berg 	TP_fast_assign(
25455207ca55SJohannes Berg 		WIPHY_ASSIGN;
25465207ca55SJohannes Berg 		NETDEV_ASSIGN;
25475207ca55SJohannes Berg 		__entry->success_num = ftm_stats->success_num;
25485207ca55SJohannes Berg 		__entry->partial_num = ftm_stats->partial_num;
25495207ca55SJohannes Berg 		__entry->failed_num = ftm_stats->failed_num;
25505207ca55SJohannes Berg 		__entry->asap_num = ftm_stats->asap_num;
25515207ca55SJohannes Berg 		__entry->non_asap_num = ftm_stats->non_asap_num;
25525207ca55SJohannes Berg 		__entry->duration = ftm_stats->total_duration_ms;
25535207ca55SJohannes Berg 		__entry->unknown_triggers = ftm_stats->unknown_triggers_num;
25545207ca55SJohannes Berg 		__entry->reschedule = ftm_stats->reschedule_requests_num;
25555207ca55SJohannes Berg 		__entry->out_of_window = ftm_stats->out_of_window_triggers_num;
25565207ca55SJohannes Berg 	),
25575207ca55SJohannes Berg 
25585207ca55SJohannes Berg 	TP_printk(WIPHY_PR_FMT "Ftm responder stats: success %u, partial %u, "
25595207ca55SJohannes Berg 		"failed %u, asap %u, non asap %u, total duration %llu, unknown "
25605207ca55SJohannes Berg 		"triggers %u, rescheduled %u, out of window %u", WIPHY_PR_ARG,
25615207ca55SJohannes Berg 		__entry->success_num, __entry->partial_num, __entry->failed_num,
25625207ca55SJohannes Berg 		__entry->asap_num, __entry->non_asap_num, __entry->duration,
25635207ca55SJohannes Berg 		__entry->unknown_triggers, __entry->reschedule,
25645207ca55SJohannes Berg 		__entry->out_of_window)
25655207ca55SJohannes Berg );
25665207ca55SJohannes Berg 
25679bb7e0f2SJohannes Berg DEFINE_EVENT(wiphy_wdev_cookie_evt, rdev_start_pmsr,
25689bb7e0f2SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
25699bb7e0f2SJohannes Berg 	TP_ARGS(wiphy, wdev, cookie)
25709bb7e0f2SJohannes Berg );
25719bb7e0f2SJohannes Berg 
25729bb7e0f2SJohannes Berg DEFINE_EVENT(wiphy_wdev_cookie_evt, rdev_abort_pmsr,
25739bb7e0f2SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
25749bb7e0f2SJohannes Berg 	TP_ARGS(wiphy, wdev, cookie)
25759bb7e0f2SJohannes Berg );
25769bb7e0f2SJohannes Berg 
25774ee3e063SBeni Lev /*************************************************************
25784ee3e063SBeni Lev  *	     cfg80211 exported functions traces		     *
25794ee3e063SBeni Lev  *************************************************************/
25804ee3e063SBeni Lev 
25814ee3e063SBeni Lev TRACE_EVENT(cfg80211_return_bool,
25824ee3e063SBeni Lev 	TP_PROTO(bool ret),
25834ee3e063SBeni Lev 	TP_ARGS(ret),
25844ee3e063SBeni Lev 	TP_STRUCT__entry(
25854ee3e063SBeni Lev 		__field(bool, ret)
25864ee3e063SBeni Lev 	),
25874ee3e063SBeni Lev 	TP_fast_assign(
25884ee3e063SBeni Lev 		__entry->ret = ret;
25894ee3e063SBeni Lev 	),
25904ee3e063SBeni Lev 	TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
25914ee3e063SBeni Lev );
25924ee3e063SBeni Lev 
25934ee3e063SBeni Lev DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
25944ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *macaddr),
25954ee3e063SBeni Lev 	TP_ARGS(netdev, macaddr),
25964ee3e063SBeni Lev 	TP_STRUCT__entry(
25974ee3e063SBeni Lev 		NETDEV_ENTRY
25984ee3e063SBeni Lev 		MAC_ENTRY(macaddr)
25994ee3e063SBeni Lev 	),
26004ee3e063SBeni Lev 	TP_fast_assign(
26014ee3e063SBeni Lev 		NETDEV_ASSIGN;
26024ee3e063SBeni Lev 		MAC_ASSIGN(macaddr, macaddr);
26034ee3e063SBeni Lev 	),
26044ee3e063SBeni Lev 	TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
26054ee3e063SBeni Lev 		  NETDEV_PR_ARG, MAC_PR_ARG(macaddr))
26064ee3e063SBeni Lev );
26074ee3e063SBeni Lev 
26084ee3e063SBeni Lev DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
26094ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *macaddr),
26104ee3e063SBeni Lev 	TP_ARGS(netdev, macaddr)
26114ee3e063SBeni Lev );
26124ee3e063SBeni Lev 
26134ee3e063SBeni Lev DECLARE_EVENT_CLASS(netdev_evt_only,
26144ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev),
26154ee3e063SBeni Lev 	TP_ARGS(netdev),
26164ee3e063SBeni Lev 	TP_STRUCT__entry(
26174ee3e063SBeni Lev 		NETDEV_ENTRY
26184ee3e063SBeni Lev 	),
26194ee3e063SBeni Lev 	TP_fast_assign(
26204ee3e063SBeni Lev 		NETDEV_ASSIGN;
26214ee3e063SBeni Lev 	),
26224ee3e063SBeni Lev 	TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
26234ee3e063SBeni Lev );
26244ee3e063SBeni Lev 
26254ee3e063SBeni Lev DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
26264ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev),
26274ee3e063SBeni Lev 	TP_ARGS(netdev)
26284ee3e063SBeni Lev );
26294ee3e063SBeni Lev 
26304ee3e063SBeni Lev TRACE_EVENT(cfg80211_send_rx_assoc,
26314ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss),
26324ee3e063SBeni Lev 	TP_ARGS(netdev, bss),
26334ee3e063SBeni Lev 	TP_STRUCT__entry(
26344ee3e063SBeni Lev 		NETDEV_ENTRY
26354ee3e063SBeni Lev 		MAC_ENTRY(bssid)
26364ee3e063SBeni Lev 		CHAN_ENTRY
26374ee3e063SBeni Lev 	),
26384ee3e063SBeni Lev 	TP_fast_assign(
26394ee3e063SBeni Lev 		NETDEV_ASSIGN;
26404ee3e063SBeni Lev 		MAC_ASSIGN(bssid, bss->bssid);
26414ee3e063SBeni Lev 		CHAN_ASSIGN(bss->channel);
26424ee3e063SBeni Lev 	),
2643ec816087SJohannes Berg 	TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT,
26444ee3e063SBeni Lev 		  NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
26454ee3e063SBeni Lev );
26464ee3e063SBeni Lev 
26476ff57cf8SJohannes Berg DECLARE_EVENT_CLASS(netdev_frame_event,
26486ff57cf8SJohannes Berg 	TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
26496ff57cf8SJohannes Berg 	TP_ARGS(netdev, buf, len),
26506ff57cf8SJohannes Berg 	TP_STRUCT__entry(
26516ff57cf8SJohannes Berg 		NETDEV_ENTRY
26526ff57cf8SJohannes Berg 		__dynamic_array(u8, frame, len)
26536ff57cf8SJohannes Berg 	),
26546ff57cf8SJohannes Berg 	TP_fast_assign(
26556ff57cf8SJohannes Berg 		NETDEV_ASSIGN;
26566ff57cf8SJohannes Berg 		memcpy(__get_dynamic_array(frame), buf, len);
26576ff57cf8SJohannes Berg 	),
26586ff57cf8SJohannes Berg 	TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
26596ff57cf8SJohannes Berg 		  NETDEV_PR_ARG,
26606ff57cf8SJohannes Berg 		  le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
26614ee3e063SBeni Lev );
26624ee3e063SBeni Lev 
26636ff57cf8SJohannes Berg DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
26646ff57cf8SJohannes Berg 	TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
26656ff57cf8SJohannes Berg 	TP_ARGS(netdev, buf, len)
26664ee3e063SBeni Lev );
26674ee3e063SBeni Lev 
26686ff57cf8SJohannes Berg DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
26696ff57cf8SJohannes Berg 	TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
26706ff57cf8SJohannes Berg 	TP_ARGS(netdev, buf, len)
26714ee3e063SBeni Lev );
26724ee3e063SBeni Lev 
26736ff57cf8SJohannes Berg TRACE_EVENT(cfg80211_tx_mlme_mgmt,
26746ff57cf8SJohannes Berg 	TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
26756ff57cf8SJohannes Berg 	TP_ARGS(netdev, buf, len),
26766ff57cf8SJohannes Berg 	TP_STRUCT__entry(
26776ff57cf8SJohannes Berg 		NETDEV_ENTRY
26786ff57cf8SJohannes Berg 		__dynamic_array(u8, frame, len)
26796ff57cf8SJohannes Berg 	),
26806ff57cf8SJohannes Berg 	TP_fast_assign(
26816ff57cf8SJohannes Berg 		NETDEV_ASSIGN;
26826ff57cf8SJohannes Berg 		memcpy(__get_dynamic_array(frame), buf, len);
26836ff57cf8SJohannes Berg 	),
26846ff57cf8SJohannes Berg 	TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
26856ff57cf8SJohannes Berg 		  NETDEV_PR_ARG,
26866ff57cf8SJohannes Berg 		  le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
26874ee3e063SBeni Lev );
26884ee3e063SBeni Lev 
26894ee3e063SBeni Lev DECLARE_EVENT_CLASS(netdev_mac_evt,
26904ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *mac),
26914ee3e063SBeni Lev 	TP_ARGS(netdev, mac),
26924ee3e063SBeni Lev 	TP_STRUCT__entry(
26934ee3e063SBeni Lev 		NETDEV_ENTRY
26944ee3e063SBeni Lev 		MAC_ENTRY(mac)
26954ee3e063SBeni Lev 	),
26964ee3e063SBeni Lev 	TP_fast_assign(
26974ee3e063SBeni Lev 		NETDEV_ASSIGN;
26984ee3e063SBeni Lev 		MAC_ASSIGN(mac, mac)
26994ee3e063SBeni Lev 	),
27004ee3e063SBeni Lev 	TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
27014ee3e063SBeni Lev 		  NETDEV_PR_ARG, MAC_PR_ARG(mac))
27024ee3e063SBeni Lev );
27034ee3e063SBeni Lev 
27044ee3e063SBeni Lev DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
27054ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *mac),
27064ee3e063SBeni Lev 	TP_ARGS(netdev, mac)
27074ee3e063SBeni Lev );
27084ee3e063SBeni Lev 
27094ee3e063SBeni Lev DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout,
27104ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *mac),
27114ee3e063SBeni Lev 	TP_ARGS(netdev, mac)
27124ee3e063SBeni Lev );
27134ee3e063SBeni Lev 
27144ee3e063SBeni Lev TRACE_EVENT(cfg80211_michael_mic_failure,
27154ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *addr,
27164ee3e063SBeni Lev 		 enum nl80211_key_type key_type, int key_id, const u8 *tsc),
27174ee3e063SBeni Lev 	TP_ARGS(netdev, addr, key_type, key_id, tsc),
27184ee3e063SBeni Lev 	TP_STRUCT__entry(
27194ee3e063SBeni Lev 		NETDEV_ENTRY
27204ee3e063SBeni Lev 		MAC_ENTRY(addr)
27214ee3e063SBeni Lev 		__field(enum nl80211_key_type, key_type)
27224ee3e063SBeni Lev 		__field(int, key_id)
27234ee3e063SBeni Lev 		__array(u8, tsc, 6)
27244ee3e063SBeni Lev 	),
27254ee3e063SBeni Lev 	TP_fast_assign(
27264ee3e063SBeni Lev 		NETDEV_ASSIGN;
27274ee3e063SBeni Lev 		MAC_ASSIGN(addr, addr);
27284ee3e063SBeni Lev 		__entry->key_type = key_type;
27294ee3e063SBeni Lev 		__entry->key_id = key_id;
27308c26d458SEliad Peller 		if (tsc)
27314ee3e063SBeni Lev 			memcpy(__entry->tsc, tsc, 6);
27324ee3e063SBeni Lev 	),
2733ec816087SJohannes Berg 	TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
27344ee3e063SBeni Lev 		  NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,
27354ee3e063SBeni Lev 		  __entry->key_id, __entry->tsc)
27364ee3e063SBeni Lev );
27374ee3e063SBeni Lev 
27384ee3e063SBeni Lev TRACE_EVENT(cfg80211_ready_on_channel,
27394ee3e063SBeni Lev 	TP_PROTO(struct wireless_dev *wdev, u64 cookie,
27404ee3e063SBeni Lev 		 struct ieee80211_channel *chan,
274142d97a59SJohannes Berg 		 unsigned int duration),
274242d97a59SJohannes Berg 	TP_ARGS(wdev, cookie, chan, duration),
27434ee3e063SBeni Lev 	TP_STRUCT__entry(
27444ee3e063SBeni Lev 		WDEV_ENTRY
27454ee3e063SBeni Lev 		__field(u64, cookie)
27464ee3e063SBeni Lev 		CHAN_ENTRY
27474ee3e063SBeni Lev 		__field(unsigned int, duration)
27484ee3e063SBeni Lev 	),
27494ee3e063SBeni Lev 	TP_fast_assign(
27504ee3e063SBeni Lev 		WDEV_ASSIGN;
27514ee3e063SBeni Lev 		__entry->cookie = cookie;
27524ee3e063SBeni Lev 		CHAN_ASSIGN(chan);
27534ee3e063SBeni Lev 		__entry->duration = duration;
27544ee3e063SBeni Lev 	),
275542d97a59SJohannes Berg 	TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
27564ee3e063SBeni Lev 		  WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
275742d97a59SJohannes Berg 		  __entry->duration)
27584ee3e063SBeni Lev );
27594ee3e063SBeni Lev 
27604ee3e063SBeni Lev TRACE_EVENT(cfg80211_ready_on_channel_expired,
27614ee3e063SBeni Lev 	TP_PROTO(struct wireless_dev *wdev, u64 cookie,
276242d97a59SJohannes Berg 		 struct ieee80211_channel *chan),
276342d97a59SJohannes Berg 	TP_ARGS(wdev, cookie, chan),
27644ee3e063SBeni Lev 	TP_STRUCT__entry(
27654ee3e063SBeni Lev 		WDEV_ENTRY
27664ee3e063SBeni Lev 		__field(u64, cookie)
27674ee3e063SBeni Lev 		CHAN_ENTRY
27684ee3e063SBeni Lev 	),
27694ee3e063SBeni Lev 	TP_fast_assign(
27704ee3e063SBeni Lev 		WDEV_ASSIGN;
27714ee3e063SBeni Lev 		__entry->cookie = cookie;
27724ee3e063SBeni Lev 		CHAN_ASSIGN(chan);
27734ee3e063SBeni Lev 	),
277442d97a59SJohannes Berg 	TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
277542d97a59SJohannes Berg 		  WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
27764ee3e063SBeni Lev );
27774ee3e063SBeni Lev 
27781c38c7f2SJames Prestwood TRACE_EVENT(cfg80211_tx_mgmt_expired,
27791c38c7f2SJames Prestwood 	TP_PROTO(struct wireless_dev *wdev, u64 cookie,
27801c38c7f2SJames Prestwood 		 struct ieee80211_channel *chan),
27811c38c7f2SJames Prestwood 	TP_ARGS(wdev, cookie, chan),
27821c38c7f2SJames Prestwood 	TP_STRUCT__entry(
27831c38c7f2SJames Prestwood 		WDEV_ENTRY
27841c38c7f2SJames Prestwood 		__field(u64, cookie)
27851c38c7f2SJames Prestwood 		CHAN_ENTRY
27861c38c7f2SJames Prestwood 	),
27871c38c7f2SJames Prestwood 	TP_fast_assign(
27881c38c7f2SJames Prestwood 		WDEV_ASSIGN;
27891c38c7f2SJames Prestwood 		__entry->cookie = cookie;
27901c38c7f2SJames Prestwood 		CHAN_ASSIGN(chan);
27911c38c7f2SJames Prestwood 	),
27921c38c7f2SJames Prestwood 	TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
27931c38c7f2SJames Prestwood 		  WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
27941c38c7f2SJames Prestwood );
27951c38c7f2SJames Prestwood 
27964ee3e063SBeni Lev TRACE_EVENT(cfg80211_new_sta,
27974ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
27984ee3e063SBeni Lev 		 struct station_info *sinfo),
27994ee3e063SBeni Lev 	TP_ARGS(netdev, mac_addr, sinfo),
28004ee3e063SBeni Lev 	TP_STRUCT__entry(
28014ee3e063SBeni Lev 		NETDEV_ENTRY
28024ee3e063SBeni Lev 		MAC_ENTRY(mac_addr)
28034ee3e063SBeni Lev 		SINFO_ENTRY
28044ee3e063SBeni Lev 	),
28054ee3e063SBeni Lev 	TP_fast_assign(
28064ee3e063SBeni Lev 		NETDEV_ASSIGN;
28074ee3e063SBeni Lev 		MAC_ASSIGN(mac_addr, mac_addr);
28084ee3e063SBeni Lev 		SINFO_ASSIGN;
28094ee3e063SBeni Lev 	),
2810ec816087SJohannes Berg 	TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT,
28114ee3e063SBeni Lev 		  NETDEV_PR_ARG, MAC_PR_ARG(mac_addr))
28124ee3e063SBeni Lev );
28134ee3e063SBeni Lev 
28144ee3e063SBeni Lev DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
28154ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *macaddr),
28164ee3e063SBeni Lev 	TP_ARGS(netdev, macaddr)
28174ee3e063SBeni Lev );
28184ee3e063SBeni Lev 
28194ee3e063SBeni Lev TRACE_EVENT(cfg80211_rx_mgmt,
28206c2fb1e6SSergey Matyukevich 	TP_PROTO(struct wireless_dev *wdev, int freq, int sig_dbm),
28216c2fb1e6SSergey Matyukevich 	TP_ARGS(wdev, freq, sig_dbm),
28224ee3e063SBeni Lev 	TP_STRUCT__entry(
28234ee3e063SBeni Lev 		WDEV_ENTRY
28244ee3e063SBeni Lev 		__field(int, freq)
28256c2fb1e6SSergey Matyukevich 		__field(int, sig_dbm)
28264ee3e063SBeni Lev 	),
28274ee3e063SBeni Lev 	TP_fast_assign(
28284ee3e063SBeni Lev 		WDEV_ASSIGN;
28294ee3e063SBeni Lev 		__entry->freq = freq;
28306c2fb1e6SSergey Matyukevich 		__entry->sig_dbm = sig_dbm;
28314ee3e063SBeni Lev 	),
28326c2fb1e6SSergey Matyukevich 	TP_printk(WDEV_PR_FMT ", freq: %d, sig dbm: %d",
28336c2fb1e6SSergey Matyukevich 		  WDEV_PR_ARG, __entry->freq, __entry->sig_dbm)
28344ee3e063SBeni Lev );
28354ee3e063SBeni Lev 
28364ee3e063SBeni Lev TRACE_EVENT(cfg80211_mgmt_tx_status,
28374ee3e063SBeni Lev 	TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
28384ee3e063SBeni Lev 	TP_ARGS(wdev, cookie, ack),
28394ee3e063SBeni Lev 	TP_STRUCT__entry(
28404ee3e063SBeni Lev 		WDEV_ENTRY
28414ee3e063SBeni Lev 		__field(u64, cookie)
28424ee3e063SBeni Lev 		__field(bool, ack)
28434ee3e063SBeni Lev 	),
28444ee3e063SBeni Lev 	TP_fast_assign(
28454ee3e063SBeni Lev 		WDEV_ASSIGN;
28464ee3e063SBeni Lev 		__entry->cookie = cookie;
28474ee3e063SBeni Lev 		__entry->ack = ack;
28484ee3e063SBeni Lev 	),
28494ee3e063SBeni Lev 	TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
28504ee3e063SBeni Lev 		  WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
28514ee3e063SBeni Lev );
28524ee3e063SBeni Lev 
28536a671a50SDenis Kenzior TRACE_EVENT(cfg80211_rx_control_port,
2854a948f713SDenis Kenzior 	TP_PROTO(struct net_device *netdev, struct sk_buff *skb,
2855a948f713SDenis Kenzior 		 bool unencrypted),
2856a948f713SDenis Kenzior 	TP_ARGS(netdev, skb, unencrypted),
28576a671a50SDenis Kenzior 	TP_STRUCT__entry(
28586a671a50SDenis Kenzior 		NETDEV_ENTRY
2859a948f713SDenis Kenzior 		__field(int, len)
2860a948f713SDenis Kenzior 		MAC_ENTRY(from)
28616a671a50SDenis Kenzior 		__field(u16, proto)
28626a671a50SDenis Kenzior 		__field(bool, unencrypted)
28636a671a50SDenis Kenzior 	),
28646a671a50SDenis Kenzior 	TP_fast_assign(
28656a671a50SDenis Kenzior 		NETDEV_ASSIGN;
2866a948f713SDenis Kenzior 		__entry->len = skb->len;
2867a948f713SDenis Kenzior 		MAC_ASSIGN(from, eth_hdr(skb)->h_source);
2868a948f713SDenis Kenzior 		__entry->proto = be16_to_cpu(skb->protocol);
28696a671a50SDenis Kenzior 		__entry->unencrypted = unencrypted;
28706a671a50SDenis Kenzior 	),
28718d74a623SJohannes Berg 	TP_printk(NETDEV_PR_FMT ", len=%d, " MAC_PR_FMT ", proto: 0x%x, unencrypted: %s",
28728d74a623SJohannes Berg 		  NETDEV_PR_ARG, __entry->len, MAC_PR_ARG(from),
28736a671a50SDenis Kenzior 		  __entry->proto, BOOL_TO_STR(__entry->unencrypted))
28746a671a50SDenis Kenzior );
28756a671a50SDenis Kenzior 
28764ee3e063SBeni Lev TRACE_EVENT(cfg80211_cqm_rssi_notify,
28774ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev,
2878bee427b8SAndrzej Zaborowski 		 enum nl80211_cqm_rssi_threshold_event rssi_event,
2879bee427b8SAndrzej Zaborowski 		 s32 rssi_level),
2880bee427b8SAndrzej Zaborowski 	TP_ARGS(netdev, rssi_event, rssi_level),
28814ee3e063SBeni Lev 	TP_STRUCT__entry(
28824ee3e063SBeni Lev 		NETDEV_ENTRY
28834ee3e063SBeni Lev 		__field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
2884bee427b8SAndrzej Zaborowski 		__field(s32, rssi_level)
28854ee3e063SBeni Lev 	),
28864ee3e063SBeni Lev 	TP_fast_assign(
28874ee3e063SBeni Lev 		NETDEV_ASSIGN;
28884ee3e063SBeni Lev 		__entry->rssi_event = rssi_event;
2889bee427b8SAndrzej Zaborowski 		__entry->rssi_level = rssi_level;
28904ee3e063SBeni Lev 	),
2891bee427b8SAndrzej Zaborowski 	TP_printk(NETDEV_PR_FMT ", rssi event: %d, level: %d",
2892bee427b8SAndrzej Zaborowski 		  NETDEV_PR_ARG, __entry->rssi_event, __entry->rssi_level)
28934ee3e063SBeni Lev );
28944ee3e063SBeni Lev 
2895683b6d3bSJohannes Berg TRACE_EVENT(cfg80211_reg_can_beacon,
2896174e0cd2SIlan Peer 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
2897923b352fSArik Nemtsov 		 enum nl80211_iftype iftype, bool check_no_ir),
2898923b352fSArik Nemtsov 	TP_ARGS(wiphy, chandef, iftype, check_no_ir),
28994ee3e063SBeni Lev 	TP_STRUCT__entry(
29004ee3e063SBeni Lev 		WIPHY_ENTRY
2901683b6d3bSJohannes Berg 		CHAN_DEF_ENTRY
2902174e0cd2SIlan Peer 		__field(enum nl80211_iftype, iftype)
2903923b352fSArik Nemtsov 		__field(bool, check_no_ir)
29044ee3e063SBeni Lev 	),
29054ee3e063SBeni Lev 	TP_fast_assign(
29064ee3e063SBeni Lev 		WIPHY_ASSIGN;
2907683b6d3bSJohannes Berg 		CHAN_DEF_ASSIGN(chandef);
2908174e0cd2SIlan Peer 		__entry->iftype = iftype;
2909923b352fSArik Nemtsov 		__entry->check_no_ir = check_no_ir;
29104ee3e063SBeni Lev 	),
2911923b352fSArik Nemtsov 	TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d check_no_ir=%s",
2912923b352fSArik Nemtsov 		  WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype,
2913923b352fSArik Nemtsov 		  BOOL_TO_STR(__entry->check_no_ir))
29144ee3e063SBeni Lev );
29154ee3e063SBeni Lev 
291604f39047SSimon Wunderlich TRACE_EVENT(cfg80211_chandef_dfs_required,
291704f39047SSimon Wunderlich 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
291804f39047SSimon Wunderlich 	TP_ARGS(wiphy, chandef),
291904f39047SSimon Wunderlich 	TP_STRUCT__entry(
292004f39047SSimon Wunderlich 		WIPHY_ENTRY
292104f39047SSimon Wunderlich 		CHAN_DEF_ENTRY
292204f39047SSimon Wunderlich 	),
292304f39047SSimon Wunderlich 	TP_fast_assign(
292404f39047SSimon Wunderlich 		WIPHY_ASSIGN;
292504f39047SSimon Wunderlich 		CHAN_DEF_ASSIGN(chandef);
292604f39047SSimon Wunderlich 	),
292704f39047SSimon Wunderlich 	TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
292804f39047SSimon Wunderlich 		  WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
292904f39047SSimon Wunderlich );
293004f39047SSimon Wunderlich 
29314ee3e063SBeni Lev TRACE_EVENT(cfg80211_ch_switch_notify,
2932683b6d3bSJohannes Berg 	TP_PROTO(struct net_device *netdev,
2933683b6d3bSJohannes Berg 		 struct cfg80211_chan_def *chandef),
2934683b6d3bSJohannes Berg 	TP_ARGS(netdev, chandef),
29354ee3e063SBeni Lev 	TP_STRUCT__entry(
29364ee3e063SBeni Lev 		NETDEV_ENTRY
2937683b6d3bSJohannes Berg 		CHAN_DEF_ENTRY
29384ee3e063SBeni Lev 	),
29394ee3e063SBeni Lev 	TP_fast_assign(
29404ee3e063SBeni Lev 		NETDEV_ASSIGN;
2941683b6d3bSJohannes Berg 		CHAN_DEF_ASSIGN(chandef);
29424ee3e063SBeni Lev 	),
2943ec816087SJohannes Berg 	TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2944683b6d3bSJohannes Berg 		  NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
29454ee3e063SBeni Lev );
29464ee3e063SBeni Lev 
2947f8d7552eSLuciano Coelho TRACE_EVENT(cfg80211_ch_switch_started_notify,
2948f8d7552eSLuciano Coelho 	TP_PROTO(struct net_device *netdev,
2949f8d7552eSLuciano Coelho 		 struct cfg80211_chan_def *chandef),
2950f8d7552eSLuciano Coelho 	TP_ARGS(netdev, chandef),
2951f8d7552eSLuciano Coelho 	TP_STRUCT__entry(
2952f8d7552eSLuciano Coelho 		NETDEV_ENTRY
2953f8d7552eSLuciano Coelho 		CHAN_DEF_ENTRY
2954f8d7552eSLuciano Coelho 	),
2955f8d7552eSLuciano Coelho 	TP_fast_assign(
2956f8d7552eSLuciano Coelho 		NETDEV_ASSIGN;
2957f8d7552eSLuciano Coelho 		CHAN_DEF_ASSIGN(chandef);
2958f8d7552eSLuciano Coelho 	),
2959f8d7552eSLuciano Coelho 	TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2960f8d7552eSLuciano Coelho 		  NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2961f8d7552eSLuciano Coelho );
2962f8d7552eSLuciano Coelho 
296304f39047SSimon Wunderlich TRACE_EVENT(cfg80211_radar_event,
296404f39047SSimon Wunderlich 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
296504f39047SSimon Wunderlich 	TP_ARGS(wiphy, chandef),
296604f39047SSimon Wunderlich 	TP_STRUCT__entry(
296704f39047SSimon Wunderlich 		WIPHY_ENTRY
296804f39047SSimon Wunderlich 		CHAN_DEF_ENTRY
296904f39047SSimon Wunderlich 	),
297004f39047SSimon Wunderlich 	TP_fast_assign(
297104f39047SSimon Wunderlich 		WIPHY_ASSIGN;
297204f39047SSimon Wunderlich 		CHAN_DEF_ASSIGN(chandef);
297304f39047SSimon Wunderlich 	),
297404f39047SSimon Wunderlich 	TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
297504f39047SSimon Wunderlich 		  WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
297604f39047SSimon Wunderlich );
297704f39047SSimon Wunderlich 
297804f39047SSimon Wunderlich TRACE_EVENT(cfg80211_cac_event,
297904f39047SSimon Wunderlich 	TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt),
298004f39047SSimon Wunderlich 	TP_ARGS(netdev, evt),
298104f39047SSimon Wunderlich 	TP_STRUCT__entry(
298204f39047SSimon Wunderlich 		NETDEV_ENTRY
298304f39047SSimon Wunderlich 		__field(enum nl80211_radar_event, evt)
298404f39047SSimon Wunderlich 	),
298504f39047SSimon Wunderlich 	TP_fast_assign(
298604f39047SSimon Wunderlich 		NETDEV_ASSIGN;
298704f39047SSimon Wunderlich 		__entry->evt = evt;
298804f39047SSimon Wunderlich 	),
298904f39047SSimon Wunderlich 	TP_printk(NETDEV_PR_FMT ",  event: %d",
299004f39047SSimon Wunderlich 		  NETDEV_PR_ARG, __entry->evt)
299104f39047SSimon Wunderlich );
299204f39047SSimon Wunderlich 
29934ee3e063SBeni Lev DECLARE_EVENT_CLASS(cfg80211_rx_evt,
29944ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *addr),
29954ee3e063SBeni Lev 	TP_ARGS(netdev, addr),
29964ee3e063SBeni Lev 	TP_STRUCT__entry(
29974ee3e063SBeni Lev 		NETDEV_ENTRY
29984ee3e063SBeni Lev 		MAC_ENTRY(addr)
29994ee3e063SBeni Lev 	),
30004ee3e063SBeni Lev 	TP_fast_assign(
30014ee3e063SBeni Lev 		NETDEV_ASSIGN;
30024ee3e063SBeni Lev 		MAC_ASSIGN(addr, addr);
30034ee3e063SBeni Lev 	),
3004ec816087SJohannes Berg 	TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
30054ee3e063SBeni Lev );
30064ee3e063SBeni Lev 
30074ee3e063SBeni Lev DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
30084ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *addr),
30094ee3e063SBeni Lev 	TP_ARGS(netdev, addr)
30104ee3e063SBeni Lev );
30114ee3e063SBeni Lev 
30124ee3e063SBeni Lev DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
30134ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *addr),
30144ee3e063SBeni Lev 	TP_ARGS(netdev, addr)
30154ee3e063SBeni Lev );
30164ee3e063SBeni Lev 
3017fe94f3a4SAntonio Quartulli TRACE_EVENT(cfg80211_ibss_joined,
3018fe94f3a4SAntonio Quartulli 	TP_PROTO(struct net_device *netdev, const u8 *bssid,
3019fe94f3a4SAntonio Quartulli 		 struct ieee80211_channel *channel),
3020fe94f3a4SAntonio Quartulli 	TP_ARGS(netdev, bssid, channel),
3021fe94f3a4SAntonio Quartulli 	TP_STRUCT__entry(
3022fe94f3a4SAntonio Quartulli 		NETDEV_ENTRY
3023fe94f3a4SAntonio Quartulli 		MAC_ENTRY(bssid)
3024fe94f3a4SAntonio Quartulli 		CHAN_ENTRY
3025fe94f3a4SAntonio Quartulli 	),
3026fe94f3a4SAntonio Quartulli 	TP_fast_assign(
3027fe94f3a4SAntonio Quartulli 		NETDEV_ASSIGN;
3028fe94f3a4SAntonio Quartulli 		MAC_ASSIGN(bssid, bssid);
3029fe94f3a4SAntonio Quartulli 		CHAN_ASSIGN(channel);
3030fe94f3a4SAntonio Quartulli 	),
3031fe94f3a4SAntonio Quartulli 	TP_printk(NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", " CHAN_PR_FMT,
3032fe94f3a4SAntonio Quartulli 		  NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
3033fe94f3a4SAntonio Quartulli );
3034fe94f3a4SAntonio Quartulli 
30354ee3e063SBeni Lev TRACE_EVENT(cfg80211_probe_status,
30364ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
30374ee3e063SBeni Lev 		 bool acked),
30384ee3e063SBeni Lev 	TP_ARGS(netdev, addr, cookie, acked),
30394ee3e063SBeni Lev 	TP_STRUCT__entry(
30404ee3e063SBeni Lev 		NETDEV_ENTRY
30414ee3e063SBeni Lev 		MAC_ENTRY(addr)
30424ee3e063SBeni Lev 		__field(u64, cookie)
30434ee3e063SBeni Lev 		__field(bool, acked)
30444ee3e063SBeni Lev 	),
30454ee3e063SBeni Lev 	TP_fast_assign(
30464ee3e063SBeni Lev 		NETDEV_ASSIGN;
30474ee3e063SBeni Lev 		MAC_ASSIGN(addr, addr);
30484ee3e063SBeni Lev 		__entry->cookie = cookie;
30494ee3e063SBeni Lev 		__entry->acked = acked;
30504ee3e063SBeni Lev 	),
3051ec816087SJohannes Berg 	TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
30524ee3e063SBeni Lev 		  NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
30534ee3e063SBeni Lev 		  BOOL_TO_STR(__entry->acked))
30544ee3e063SBeni Lev );
30554ee3e063SBeni Lev 
30564ee3e063SBeni Lev TRACE_EVENT(cfg80211_cqm_pktloss_notify,
30574ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
30584ee3e063SBeni Lev 	TP_ARGS(netdev, peer, num_packets),
30594ee3e063SBeni Lev 	TP_STRUCT__entry(
30604ee3e063SBeni Lev 		NETDEV_ENTRY
30614ee3e063SBeni Lev 		MAC_ENTRY(peer)
30624ee3e063SBeni Lev 		__field(u32, num_packets)
30634ee3e063SBeni Lev 	),
30644ee3e063SBeni Lev 	TP_fast_assign(
30654ee3e063SBeni Lev 		NETDEV_ASSIGN;
30664ee3e063SBeni Lev 		MAC_ASSIGN(peer, peer);
30674ee3e063SBeni Lev 		__entry->num_packets = num_packets;
30684ee3e063SBeni Lev 	),
30694ee3e063SBeni Lev 	TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u",
30704ee3e063SBeni Lev 		  NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets)
30714ee3e063SBeni Lev );
30724ee3e063SBeni Lev 
30734ee3e063SBeni Lev DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
30744ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, const u8 *macaddr),
30754ee3e063SBeni Lev 	TP_ARGS(netdev, macaddr)
30764ee3e063SBeni Lev );
30774ee3e063SBeni Lev 
30784ee3e063SBeni Lev TRACE_EVENT(cfg80211_pmksa_candidate_notify,
30794ee3e063SBeni Lev 	TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
30804ee3e063SBeni Lev 		 bool preauth),
30814ee3e063SBeni Lev 	TP_ARGS(netdev, index, bssid, preauth),
30824ee3e063SBeni Lev 	TP_STRUCT__entry(
30834ee3e063SBeni Lev 		NETDEV_ENTRY
30844ee3e063SBeni Lev 		__field(int, index)
30854ee3e063SBeni Lev 		MAC_ENTRY(bssid)
30864ee3e063SBeni Lev 		__field(bool, preauth)
30874ee3e063SBeni Lev 	),
30884ee3e063SBeni Lev 	TP_fast_assign(
30894ee3e063SBeni Lev 		NETDEV_ASSIGN;
30904ee3e063SBeni Lev 		__entry->index = index;
30914ee3e063SBeni Lev 		MAC_ASSIGN(bssid, bssid);
30924ee3e063SBeni Lev 		__entry->preauth = preauth;
30934ee3e063SBeni Lev 	),
30944ee3e063SBeni Lev 	TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s",
30954ee3e063SBeni Lev 		  NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid),
30964ee3e063SBeni Lev 		  BOOL_TO_STR(__entry->preauth))
30974ee3e063SBeni Lev );
30984ee3e063SBeni Lev 
30994ee3e063SBeni Lev TRACE_EVENT(cfg80211_report_obss_beacon,
31004ee3e063SBeni Lev 	TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
31014ee3e063SBeni Lev 		 int freq, int sig_dbm),
31024ee3e063SBeni Lev 	TP_ARGS(wiphy, frame, len, freq, sig_dbm),
31034ee3e063SBeni Lev 	TP_STRUCT__entry(
31044ee3e063SBeni Lev 		WIPHY_ENTRY
31054ee3e063SBeni Lev 		__field(int, freq)
31064ee3e063SBeni Lev 		__field(int, sig_dbm)
31074ee3e063SBeni Lev 	),
31084ee3e063SBeni Lev 	TP_fast_assign(
31094ee3e063SBeni Lev 		WIPHY_ASSIGN;
31104ee3e063SBeni Lev 		__entry->freq = freq;
31114ee3e063SBeni Lev 		__entry->sig_dbm = sig_dbm;
31124ee3e063SBeni Lev 	),
31134ee3e063SBeni Lev 	TP_printk(WIPHY_PR_FMT ", freq: %d, sig_dbm: %d",
31144ee3e063SBeni Lev 		  WIPHY_PR_ARG, __entry->freq, __entry->sig_dbm)
31154ee3e063SBeni Lev );
31164ee3e063SBeni Lev 
31173475b094SJouni Malinen TRACE_EVENT(cfg80211_tdls_oper_request,
31183475b094SJouni Malinen 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
31193475b094SJouni Malinen 		 enum nl80211_tdls_operation oper, u16 reason_code),
31203475b094SJouni Malinen 	TP_ARGS(wiphy, netdev, peer, oper, reason_code),
31213475b094SJouni Malinen 	TP_STRUCT__entry(
31223475b094SJouni Malinen 		WIPHY_ENTRY
31233475b094SJouni Malinen 		NETDEV_ENTRY
31243475b094SJouni Malinen 		MAC_ENTRY(peer)
31253475b094SJouni Malinen 		__field(enum nl80211_tdls_operation, oper)
31263475b094SJouni Malinen 		__field(u16, reason_code)
31273475b094SJouni Malinen 	),
31283475b094SJouni Malinen 	TP_fast_assign(
31293475b094SJouni Malinen 		WIPHY_ASSIGN;
31303475b094SJouni Malinen 		NETDEV_ASSIGN;
31313475b094SJouni Malinen 		MAC_ASSIGN(peer, peer);
31323475b094SJouni Malinen 		__entry->oper = oper;
31333475b094SJouni Malinen 		__entry->reason_code = reason_code;
31343475b094SJouni Malinen 	),
31353475b094SJouni Malinen 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u",
31363475b094SJouni Malinen 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper,
31373475b094SJouni Malinen 		  __entry->reason_code)
31383475b094SJouni Malinen 	);
31393475b094SJouni Malinen 
31404ee3e063SBeni Lev TRACE_EVENT(cfg80211_scan_done,
31411d76250bSAvraham Stern 	TP_PROTO(struct cfg80211_scan_request *request,
31421d76250bSAvraham Stern 		 struct cfg80211_scan_info *info),
31431d76250bSAvraham Stern 	TP_ARGS(request, info),
31444ee3e063SBeni Lev 	TP_STRUCT__entry(
31454ee3e063SBeni Lev 		__field(u32, n_channels)
31464ee3e063SBeni Lev 		__dynamic_array(u8, ie, request ? request->ie_len : 0)
314757fbcce3SJohannes Berg 		__array(u32, rates, NUM_NL80211_BANDS)
31484ee3e063SBeni Lev 		__field(u32, wdev_id)
31494ee3e063SBeni Lev 		MAC_ENTRY(wiphy_mac)
31504ee3e063SBeni Lev 		__field(bool, no_cck)
31514ee3e063SBeni Lev 		__field(bool, aborted)
31521d76250bSAvraham Stern 		__field(u64, scan_start_tsf)
31531d76250bSAvraham Stern 		MAC_ENTRY(tsf_bssid)
31544ee3e063SBeni Lev 	),
31554ee3e063SBeni Lev 	TP_fast_assign(
31564ee3e063SBeni Lev 		if (request) {
31574ee3e063SBeni Lev 			memcpy(__get_dynamic_array(ie), request->ie,
31584ee3e063SBeni Lev 			       request->ie_len);
31594ee3e063SBeni Lev 			memcpy(__entry->rates, request->rates,
316057fbcce3SJohannes Berg 			       NUM_NL80211_BANDS);
31614ee3e063SBeni Lev 			__entry->wdev_id = request->wdev ?
31624ee3e063SBeni Lev 					request->wdev->identifier : 0;
31634ee3e063SBeni Lev 			if (request->wiphy)
31644ee3e063SBeni Lev 				MAC_ASSIGN(wiphy_mac,
31654ee3e063SBeni Lev 					   request->wiphy->perm_addr);
31664ee3e063SBeni Lev 			__entry->no_cck = request->no_cck;
31674ee3e063SBeni Lev 		}
31681d76250bSAvraham Stern 		if (info) {
31691d76250bSAvraham Stern 			__entry->aborted = info->aborted;
31701d76250bSAvraham Stern 			__entry->scan_start_tsf = info->scan_start_tsf;
31711d76250bSAvraham Stern 			MAC_ASSIGN(tsf_bssid, info->tsf_bssid);
31721d76250bSAvraham Stern 		}
31734ee3e063SBeni Lev 	),
31741d76250bSAvraham Stern 	TP_printk("aborted: %s, scan start (TSF): %llu, tsf_bssid: " MAC_PR_FMT,
31751d76250bSAvraham Stern 		  BOOL_TO_STR(__entry->aborted),
31761d76250bSAvraham Stern 		  (unsigned long long)__entry->scan_start_tsf,
31771d76250bSAvraham Stern 		  MAC_PR_ARG(tsf_bssid))
31784ee3e063SBeni Lev );
31794ee3e063SBeni Lev 
3180b34939b9SArend Van Spriel DECLARE_EVENT_CLASS(wiphy_id_evt,
3181b34939b9SArend Van Spriel 	TP_PROTO(struct wiphy *wiphy, u64 id),
3182b34939b9SArend Van Spriel 	TP_ARGS(wiphy, id),
3183b34939b9SArend Van Spriel 	TP_STRUCT__entry(
3184b34939b9SArend Van Spriel 		WIPHY_ENTRY
3185b34939b9SArend Van Spriel 		__field(u64, id)
3186b34939b9SArend Van Spriel 	),
3187b34939b9SArend Van Spriel 	TP_fast_assign(
3188b34939b9SArend Van Spriel 		WIPHY_ASSIGN;
3189b34939b9SArend Van Spriel 		__entry->id = id;
3190b34939b9SArend Van Spriel 	),
3191b34939b9SArend Van Spriel 	TP_printk(WIPHY_PR_FMT ", id: %llu", WIPHY_PR_ARG, __entry->id)
31924ee3e063SBeni Lev );
31934ee3e063SBeni Lev 
3194b34939b9SArend Van Spriel DEFINE_EVENT(wiphy_id_evt, cfg80211_sched_scan_stopped,
3195b34939b9SArend Van Spriel 	TP_PROTO(struct wiphy *wiphy, u64 id),
3196b34939b9SArend Van Spriel 	TP_ARGS(wiphy, id)
3197b34939b9SArend Van Spriel );
3198b34939b9SArend Van Spriel 
3199b34939b9SArend Van Spriel DEFINE_EVENT(wiphy_id_evt, cfg80211_sched_scan_results,
3200b34939b9SArend Van Spriel 	TP_PROTO(struct wiphy *wiphy, u64 id),
3201b34939b9SArend Van Spriel 	TP_ARGS(wiphy, id)
32024ee3e063SBeni Lev );
32034ee3e063SBeni Lev 
32044ee3e063SBeni Lev TRACE_EVENT(cfg80211_get_bss,
32054ee3e063SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
32064ee3e063SBeni Lev 		 const u8 *bssid, const u8 *ssid, size_t ssid_len,
32076eb18137SDedy Lansky 		 enum ieee80211_bss_type bss_type,
32086eb18137SDedy Lansky 		 enum ieee80211_privacy privacy),
32096eb18137SDedy Lansky 	TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, bss_type, privacy),
32104ee3e063SBeni Lev 	TP_STRUCT__entry(
32114ee3e063SBeni Lev 		WIPHY_ENTRY
32124ee3e063SBeni Lev 		CHAN_ENTRY
32134ee3e063SBeni Lev 		MAC_ENTRY(bssid)
32144ee3e063SBeni Lev 		__dynamic_array(u8, ssid, ssid_len)
32156eb18137SDedy Lansky 		__field(enum ieee80211_bss_type, bss_type)
32166eb18137SDedy Lansky 		__field(enum ieee80211_privacy, privacy)
32174ee3e063SBeni Lev 	),
32184ee3e063SBeni Lev 	TP_fast_assign(
32194ee3e063SBeni Lev 		WIPHY_ASSIGN;
32204ee3e063SBeni Lev 		CHAN_ASSIGN(channel);
32214ee3e063SBeni Lev 		MAC_ASSIGN(bssid, bssid);
32224ee3e063SBeni Lev 		memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
32236eb18137SDedy Lansky 		__entry->bss_type = bss_type;
32246eb18137SDedy Lansky 		__entry->privacy = privacy;
32254ee3e063SBeni Lev 	),
32266eb18137SDedy Lansky 	TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT
32276eb18137SDedy Lansky 		  ", buf: %#.2x, bss_type: %d, privacy: %d",
32286eb18137SDedy Lansky 		  WIPHY_PR_ARG, CHAN_PR_ARG, MAC_PR_ARG(bssid),
32296eb18137SDedy Lansky 		  ((u8 *)__get_dynamic_array(ssid))[0], __entry->bss_type,
32306eb18137SDedy Lansky 		  __entry->privacy)
32314ee3e063SBeni Lev );
32324ee3e063SBeni Lev 
32336e19bc4bSDmitry Shmidt TRACE_EVENT(cfg80211_inform_bss_frame,
32346e19bc4bSDmitry Shmidt 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_inform_bss *data,
32356e19bc4bSDmitry Shmidt 		 struct ieee80211_mgmt *mgmt, size_t len),
32366e19bc4bSDmitry Shmidt 	TP_ARGS(wiphy, data, mgmt, len),
32374ee3e063SBeni Lev 	TP_STRUCT__entry(
32384ee3e063SBeni Lev 		WIPHY_ENTRY
32394ee3e063SBeni Lev 		CHAN_ENTRY
3240dcd6eac1SSimon Wunderlich 		__field(enum nl80211_bss_scan_width, scan_width)
32414ee3e063SBeni Lev 		__dynamic_array(u8, mgmt, len)
32424ee3e063SBeni Lev 		__field(s32, signal)
32436e19bc4bSDmitry Shmidt 		__field(u64, ts_boottime)
32441d76250bSAvraham Stern 		__field(u64, parent_tsf)
32451d76250bSAvraham Stern 		MAC_ENTRY(parent_bssid)
32464ee3e063SBeni Lev 	),
32474ee3e063SBeni Lev 	TP_fast_assign(
32484ee3e063SBeni Lev 		WIPHY_ASSIGN;
32496e19bc4bSDmitry Shmidt 		CHAN_ASSIGN(data->chan);
32506e19bc4bSDmitry Shmidt 		__entry->scan_width = data->scan_width;
32514ee3e063SBeni Lev 		if (mgmt)
32524ee3e063SBeni Lev 			memcpy(__get_dynamic_array(mgmt), mgmt, len);
32536e19bc4bSDmitry Shmidt 		__entry->signal = data->signal;
32546e19bc4bSDmitry Shmidt 		__entry->ts_boottime = data->boottime_ns;
32551d76250bSAvraham Stern 		__entry->parent_tsf = data->parent_tsf;
32561d76250bSAvraham Stern 		MAC_ASSIGN(parent_bssid, data->parent_bssid);
32574ee3e063SBeni Lev 	),
32581d76250bSAvraham Stern 	TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT
32591d76250bSAvraham Stern 		  "(scan_width: %d) signal: %d, tsb:%llu, detect_tsf:%llu, tsf_bssid: "
32601d76250bSAvraham Stern 		  MAC_PR_FMT, WIPHY_PR_ARG, CHAN_PR_ARG, __entry->scan_width,
32611d76250bSAvraham Stern 		  __entry->signal, (unsigned long long)__entry->ts_boottime,
32621d76250bSAvraham Stern 		  (unsigned long long)__entry->parent_tsf,
32631d76250bSAvraham Stern 		  MAC_PR_ARG(parent_bssid))
32644ee3e063SBeni Lev );
32654ee3e063SBeni Lev 
32664ee3e063SBeni Lev DECLARE_EVENT_CLASS(cfg80211_bss_evt,
32674ee3e063SBeni Lev 	TP_PROTO(struct cfg80211_bss *pub),
32684ee3e063SBeni Lev 	TP_ARGS(pub),
32694ee3e063SBeni Lev 	TP_STRUCT__entry(
32704ee3e063SBeni Lev 		MAC_ENTRY(bssid)
32714ee3e063SBeni Lev 		CHAN_ENTRY
32724ee3e063SBeni Lev 	),
32734ee3e063SBeni Lev 	TP_fast_assign(
32744ee3e063SBeni Lev 		MAC_ASSIGN(bssid, pub->bssid);
32754ee3e063SBeni Lev 		CHAN_ASSIGN(pub->channel);
32764ee3e063SBeni Lev 	),
3277ec816087SJohannes Berg 	TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG)
32784ee3e063SBeni Lev );
32794ee3e063SBeni Lev 
32804ee3e063SBeni Lev DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
32814ee3e063SBeni Lev 	TP_PROTO(struct cfg80211_bss *pub),
32824ee3e063SBeni Lev 	TP_ARGS(pub)
32834ee3e063SBeni Lev );
32844ee3e063SBeni Lev 
32854ee3e063SBeni Lev TRACE_EVENT(cfg80211_return_uint,
32864ee3e063SBeni Lev 	TP_PROTO(unsigned int ret),
32874ee3e063SBeni Lev 	TP_ARGS(ret),
32884ee3e063SBeni Lev 	TP_STRUCT__entry(
32894ee3e063SBeni Lev 		__field(unsigned int, ret)
32904ee3e063SBeni Lev 	),
32914ee3e063SBeni Lev 	TP_fast_assign(
32924ee3e063SBeni Lev 		__entry->ret = ret;
32934ee3e063SBeni Lev 	),
32944ee3e063SBeni Lev 	TP_printk("ret: %d", __entry->ret)
32954ee3e063SBeni Lev );
32964ee3e063SBeni Lev 
32974ee3e063SBeni Lev TRACE_EVENT(cfg80211_return_u32,
32984ee3e063SBeni Lev 	TP_PROTO(u32 ret),
32994ee3e063SBeni Lev 	TP_ARGS(ret),
33004ee3e063SBeni Lev 	TP_STRUCT__entry(
33014ee3e063SBeni Lev 		__field(u32, ret)
33024ee3e063SBeni Lev 	),
33034ee3e063SBeni Lev 	TP_fast_assign(
33044ee3e063SBeni Lev 		__entry->ret = ret;
33054ee3e063SBeni Lev 	),
33064ee3e063SBeni Lev 	TP_printk("ret: %u", __entry->ret)
33074ee3e063SBeni Lev );
33084ee3e063SBeni Lev 
3309cd8f7cb4SJohannes Berg TRACE_EVENT(cfg80211_report_wowlan_wakeup,
3310cd8f7cb4SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
3311cd8f7cb4SJohannes Berg 		 struct cfg80211_wowlan_wakeup *wakeup),
3312cd8f7cb4SJohannes Berg 	TP_ARGS(wiphy, wdev, wakeup),
3313cd8f7cb4SJohannes Berg 	TP_STRUCT__entry(
3314cd8f7cb4SJohannes Berg 		WIPHY_ENTRY
3315cd8f7cb4SJohannes Berg 		WDEV_ENTRY
3316a92eecbbSJohannes Berg 		__field(bool, non_wireless)
3317cd8f7cb4SJohannes Berg 		__field(bool, disconnect)
3318cd8f7cb4SJohannes Berg 		__field(bool, magic_pkt)
3319cd8f7cb4SJohannes Berg 		__field(bool, gtk_rekey_failure)
3320cd8f7cb4SJohannes Berg 		__field(bool, eap_identity_req)
3321cd8f7cb4SJohannes Berg 		__field(bool, four_way_handshake)
3322cd8f7cb4SJohannes Berg 		__field(bool, rfkill_release)
3323cd8f7cb4SJohannes Berg 		__field(s32, pattern_idx)
3324cd8f7cb4SJohannes Berg 		__field(u32, packet_len)
3325a92eecbbSJohannes Berg 		__dynamic_array(u8, packet,
3326a92eecbbSJohannes Berg 				wakeup ? wakeup->packet_present_len : 0)
3327cd8f7cb4SJohannes Berg 	),
3328cd8f7cb4SJohannes Berg 	TP_fast_assign(
3329cd8f7cb4SJohannes Berg 		WIPHY_ASSIGN;
3330cd8f7cb4SJohannes Berg 		WDEV_ASSIGN;
3331a92eecbbSJohannes Berg 		__entry->non_wireless = !wakeup;
3332a92eecbbSJohannes Berg 		__entry->disconnect = wakeup ? wakeup->disconnect : false;
3333a92eecbbSJohannes Berg 		__entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
3334a92eecbbSJohannes Berg 		__entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
3335a92eecbbSJohannes Berg 		__entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
3336a92eecbbSJohannes Berg 		__entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
3337a92eecbbSJohannes Berg 		__entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
3338a92eecbbSJohannes Berg 		__entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
3339a92eecbbSJohannes Berg 		__entry->packet_len = wakeup ? wakeup->packet_len : false;
3340a92eecbbSJohannes Berg 		if (wakeup && wakeup->packet && wakeup->packet_present_len)
3341cd8f7cb4SJohannes Berg 			memcpy(__get_dynamic_array(packet), wakeup->packet,
3342cd8f7cb4SJohannes Berg 			       wakeup->packet_present_len);
3343cd8f7cb4SJohannes Berg 	),
3344cd8f7cb4SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
3345cd8f7cb4SJohannes Berg );
3346cd8f7cb4SJohannes Berg 
3347355199e0SJouni Malinen TRACE_EVENT(cfg80211_ft_event,
3348355199e0SJouni Malinen 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3349355199e0SJouni Malinen 		 struct cfg80211_ft_event_params *ft_event),
3350355199e0SJouni Malinen 	TP_ARGS(wiphy, netdev, ft_event),
3351355199e0SJouni Malinen 	TP_STRUCT__entry(
3352355199e0SJouni Malinen 		WIPHY_ENTRY
3353355199e0SJouni Malinen 		NETDEV_ENTRY
3354355199e0SJouni Malinen 		__dynamic_array(u8, ies, ft_event->ies_len)
3355355199e0SJouni Malinen 		MAC_ENTRY(target_ap)
3356355199e0SJouni Malinen 		__dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
3357355199e0SJouni Malinen 	),
3358355199e0SJouni Malinen 	TP_fast_assign(
3359355199e0SJouni Malinen 		WIPHY_ASSIGN;
3360355199e0SJouni Malinen 		NETDEV_ASSIGN;
3361355199e0SJouni Malinen 		if (ft_event->ies)
3362355199e0SJouni Malinen 			memcpy(__get_dynamic_array(ies), ft_event->ies,
3363355199e0SJouni Malinen 			       ft_event->ies_len);
3364355199e0SJouni Malinen 		MAC_ASSIGN(target_ap, ft_event->target_ap);
3365355199e0SJouni Malinen 		if (ft_event->ric_ies)
3366355199e0SJouni Malinen 			memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
3367355199e0SJouni Malinen 			       ft_event->ric_ies_len);
3368355199e0SJouni Malinen 	),
3369355199e0SJouni Malinen 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT,
3370355199e0SJouni Malinen 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
3371355199e0SJouni Malinen );
3372355199e0SJouni Malinen 
3373f04c2203SMichal Kazior TRACE_EVENT(cfg80211_stop_iface,
3374f04c2203SMichal Kazior 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
3375f04c2203SMichal Kazior 	TP_ARGS(wiphy, wdev),
3376f04c2203SMichal Kazior 	TP_STRUCT__entry(
3377f04c2203SMichal Kazior 		WIPHY_ENTRY
3378f04c2203SMichal Kazior 		WDEV_ENTRY
3379f04c2203SMichal Kazior 	),
3380f04c2203SMichal Kazior 	TP_fast_assign(
3381f04c2203SMichal Kazior 		WIPHY_ASSIGN;
3382f04c2203SMichal Kazior 		WDEV_ASSIGN;
3383f04c2203SMichal Kazior 	),
3384f04c2203SMichal Kazior 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
3385f04c2203SMichal Kazior 		  WIPHY_PR_ARG, WDEV_PR_ARG)
3386f04c2203SMichal Kazior );
33879bb7e0f2SJohannes Berg 
33889bb7e0f2SJohannes Berg TRACE_EVENT(cfg80211_pmsr_report,
33899bb7e0f2SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
33909bb7e0f2SJohannes Berg 		 u64 cookie, const u8 *addr),
33919bb7e0f2SJohannes Berg 	TP_ARGS(wiphy, wdev, cookie, addr),
33929bb7e0f2SJohannes Berg 	TP_STRUCT__entry(
33939bb7e0f2SJohannes Berg 		WIPHY_ENTRY
33949bb7e0f2SJohannes Berg 		WDEV_ENTRY
33959bb7e0f2SJohannes Berg 		__field(u64, cookie)
33969bb7e0f2SJohannes Berg 		MAC_ENTRY(addr)
33979bb7e0f2SJohannes Berg 	),
33989bb7e0f2SJohannes Berg 	TP_fast_assign(
33999bb7e0f2SJohannes Berg 		WIPHY_ASSIGN;
34009bb7e0f2SJohannes Berg 		WDEV_ASSIGN;
34019bb7e0f2SJohannes Berg 		__entry->cookie = cookie;
34029bb7e0f2SJohannes Berg 		MAC_ASSIGN(addr, addr);
34039bb7e0f2SJohannes Berg 	),
34049bb7e0f2SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie:%lld, " MAC_PR_FMT,
34059bb7e0f2SJohannes Berg 		  WIPHY_PR_ARG, WDEV_PR_ARG,
34069bb7e0f2SJohannes Berg 		  (unsigned long long)__entry->cookie,
34079bb7e0f2SJohannes Berg 		  MAC_PR_ARG(addr))
34089bb7e0f2SJohannes Berg );
34099bb7e0f2SJohannes Berg 
34109bb7e0f2SJohannes Berg TRACE_EVENT(cfg80211_pmsr_complete,
34119bb7e0f2SJohannes Berg 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
34129bb7e0f2SJohannes Berg 	TP_ARGS(wiphy, wdev, cookie),
34139bb7e0f2SJohannes Berg 	TP_STRUCT__entry(
34149bb7e0f2SJohannes Berg 		WIPHY_ENTRY
34159bb7e0f2SJohannes Berg 		WDEV_ENTRY
34169bb7e0f2SJohannes Berg 		__field(u64, cookie)
34179bb7e0f2SJohannes Berg 	),
34189bb7e0f2SJohannes Berg 	TP_fast_assign(
34199bb7e0f2SJohannes Berg 		WIPHY_ASSIGN;
34209bb7e0f2SJohannes Berg 		WDEV_ASSIGN;
34219bb7e0f2SJohannes Berg 		__entry->cookie = cookie;
34229bb7e0f2SJohannes Berg 	),
34239bb7e0f2SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie:%lld",
34249bb7e0f2SJohannes Berg 		  WIPHY_PR_ARG, WDEV_PR_ARG,
34259bb7e0f2SJohannes Berg 		  (unsigned long long)__entry->cookie)
34269bb7e0f2SJohannes Berg );
3427cb74e977SSunil Dutt 
3428cb74e977SSunil Dutt TRACE_EVENT(rdev_update_owe_info,
3429cb74e977SSunil Dutt 	    TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3430cb74e977SSunil Dutt 		     struct cfg80211_update_owe_info *owe_info),
3431cb74e977SSunil Dutt 	    TP_ARGS(wiphy, netdev, owe_info),
3432cb74e977SSunil Dutt 	    TP_STRUCT__entry(WIPHY_ENTRY
3433cb74e977SSunil Dutt 			     NETDEV_ENTRY
3434cb74e977SSunil Dutt 			     MAC_ENTRY(peer)
3435cb74e977SSunil Dutt 			     __field(u16, status)
3436cb74e977SSunil Dutt 			     __dynamic_array(u8, ie, owe_info->ie_len)),
3437cb74e977SSunil Dutt 	    TP_fast_assign(WIPHY_ASSIGN;
3438cb74e977SSunil Dutt 			   NETDEV_ASSIGN;
3439cb74e977SSunil Dutt 			   MAC_ASSIGN(peer, owe_info->peer);
3440cb74e977SSunil Dutt 			   __entry->status = owe_info->status;
3441cb74e977SSunil Dutt 			   memcpy(__get_dynamic_array(ie),
3442cb74e977SSunil Dutt 				  owe_info->ie, owe_info->ie_len);),
3443cb74e977SSunil Dutt 	    TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT
3444cb74e977SSunil Dutt 		  " status %d", WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
3445cb74e977SSunil Dutt 		  __entry->status)
3446cb74e977SSunil Dutt );
3447cb74e977SSunil Dutt 
3448cb74e977SSunil Dutt TRACE_EVENT(cfg80211_update_owe_info_event,
3449cb74e977SSunil Dutt 	    TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3450cb74e977SSunil Dutt 		     struct cfg80211_update_owe_info *owe_info),
3451cb74e977SSunil Dutt 	    TP_ARGS(wiphy, netdev, owe_info),
3452cb74e977SSunil Dutt 	    TP_STRUCT__entry(WIPHY_ENTRY
3453cb74e977SSunil Dutt 			     NETDEV_ENTRY
3454cb74e977SSunil Dutt 			     MAC_ENTRY(peer)
3455cb74e977SSunil Dutt 			     __dynamic_array(u8, ie, owe_info->ie_len)),
3456cb74e977SSunil Dutt 	    TP_fast_assign(WIPHY_ASSIGN;
3457cb74e977SSunil Dutt 			   NETDEV_ASSIGN;
3458cb74e977SSunil Dutt 			   MAC_ASSIGN(peer, owe_info->peer);
3459cb74e977SSunil Dutt 			   memcpy(__get_dynamic_array(ie), owe_info->ie,
3460cb74e977SSunil Dutt 				  owe_info->ie_len);),
3461cb74e977SSunil Dutt 	    TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
3462cb74e977SSunil Dutt 		      WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
3463cb74e977SSunil Dutt );
3464cb74e977SSunil Dutt 
34655ab92e7fSRajkumar Manoharan TRACE_EVENT(rdev_probe_mesh_link,
34665ab92e7fSRajkumar Manoharan 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
34675ab92e7fSRajkumar Manoharan 		 const u8 *dest, const u8 *buf, size_t len),
34685ab92e7fSRajkumar Manoharan 	TP_ARGS(wiphy, netdev, dest, buf, len),
34695ab92e7fSRajkumar Manoharan 	TP_STRUCT__entry(
34705ab92e7fSRajkumar Manoharan 		WIPHY_ENTRY
34715ab92e7fSRajkumar Manoharan 		NETDEV_ENTRY
34725ab92e7fSRajkumar Manoharan 		MAC_ENTRY(dest)
34735ab92e7fSRajkumar Manoharan 	),
34745ab92e7fSRajkumar Manoharan 	TP_fast_assign(
34755ab92e7fSRajkumar Manoharan 		WIPHY_ASSIGN;
34765ab92e7fSRajkumar Manoharan 		NETDEV_ASSIGN;
34775ab92e7fSRajkumar Manoharan 		MAC_ASSIGN(dest, dest);
34785ab92e7fSRajkumar Manoharan 	),
34795ab92e7fSRajkumar Manoharan 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
34805ab92e7fSRajkumar Manoharan 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dest))
34815ab92e7fSRajkumar Manoharan );
34825ab92e7fSRajkumar Manoharan 
348377f576deSTamizh chelvam TRACE_EVENT(rdev_set_tid_config,
348477f576deSTamizh chelvam 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3485*3710a8a6SJohannes Berg 		 struct cfg80211_tid_config *tid_conf),
348677f576deSTamizh chelvam 	TP_ARGS(wiphy, netdev, tid_conf),
348777f576deSTamizh chelvam 	TP_STRUCT__entry(
348877f576deSTamizh chelvam 		WIPHY_ENTRY
348977f576deSTamizh chelvam 		NETDEV_ENTRY
349077f576deSTamizh chelvam 		MAC_ENTRY(peer)
349177f576deSTamizh chelvam 	),
349277f576deSTamizh chelvam 	TP_fast_assign(
349377f576deSTamizh chelvam 		WIPHY_ASSIGN;
349477f576deSTamizh chelvam 		NETDEV_ASSIGN;
349577f576deSTamizh chelvam 		MAC_ASSIGN(peer, tid_conf->peer);
349677f576deSTamizh chelvam 	),
349777f576deSTamizh chelvam 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
349877f576deSTamizh chelvam 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
349977f576deSTamizh chelvam );
350077f576deSTamizh chelvam 
350177f576deSTamizh chelvam TRACE_EVENT(rdev_reset_tid_config,
350277f576deSTamizh chelvam 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3503*3710a8a6SJohannes Berg 		 const u8 *peer, u8 tids),
3504*3710a8a6SJohannes Berg 	TP_ARGS(wiphy, netdev, peer, tids),
350577f576deSTamizh chelvam 	TP_STRUCT__entry(
350677f576deSTamizh chelvam 		WIPHY_ENTRY
350777f576deSTamizh chelvam 		NETDEV_ENTRY
350877f576deSTamizh chelvam 		MAC_ENTRY(peer)
3509*3710a8a6SJohannes Berg 		__field(u8, tids)
351077f576deSTamizh chelvam 	),
351177f576deSTamizh chelvam 	TP_fast_assign(
351277f576deSTamizh chelvam 		WIPHY_ASSIGN;
351377f576deSTamizh chelvam 		NETDEV_ASSIGN;
351477f576deSTamizh chelvam 		MAC_ASSIGN(peer, peer);
3515*3710a8a6SJohannes Berg 		__entry->tids = tids;
351677f576deSTamizh chelvam 	),
3517*3710a8a6SJohannes Berg 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", tids: 0x%x",
3518*3710a8a6SJohannes Berg 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tids)
351977f576deSTamizh chelvam );
352014e8a3c4SBeni Lev #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
352114e8a3c4SBeni Lev 
352214e8a3c4SBeni Lev #undef TRACE_INCLUDE_PATH
352314e8a3c4SBeni Lev #define TRACE_INCLUDE_PATH .
352414e8a3c4SBeni Lev #undef TRACE_INCLUDE_FILE
352514e8a3c4SBeni Lev #define TRACE_INCLUDE_FILE trace
352614e8a3c4SBeni Lev #include <trace/define_trace.h>
3527