xref: /openbmc/linux/net/wireless/trace.h (revision 14e8a3c47e808772a5ba8118ef1f9a8d604dbbe5)
1*14e8a3c4SBeni Lev #undef TRACE_SYSTEM
2*14e8a3c4SBeni Lev #define TRACE_SYSTEM cfg80211
3*14e8a3c4SBeni Lev 
4*14e8a3c4SBeni Lev #if !defined(__RDEV_OPS_TRACE) || defined(TRACE_HEADER_MULTI_READ)
5*14e8a3c4SBeni Lev #define __RDEV_OPS_TRACE
6*14e8a3c4SBeni Lev 
7*14e8a3c4SBeni Lev #include <linux/tracepoint.h>
8*14e8a3c4SBeni Lev 
9*14e8a3c4SBeni Lev #include <linux/rtnetlink.h>
10*14e8a3c4SBeni Lev #include <net/cfg80211.h>
11*14e8a3c4SBeni Lev #include "core.h"
12*14e8a3c4SBeni Lev 
13*14e8a3c4SBeni Lev #define MAC_ENTRY(entry_mac) __array(u8, entry_mac, ETH_ALEN)
14*14e8a3c4SBeni Lev #define MAC_ASSIGN(entry_mac, given_mac) do {			     \
15*14e8a3c4SBeni Lev 	if (given_mac)						     \
16*14e8a3c4SBeni Lev 		memcpy(__entry->entry_mac, given_mac, ETH_ALEN);     \
17*14e8a3c4SBeni Lev 	else							     \
18*14e8a3c4SBeni Lev 		memset(__entry->entry_mac, 0, ETH_ALEN);	     \
19*14e8a3c4SBeni Lev 	} while (0)
20*14e8a3c4SBeni Lev #define MAC_PR_FMT "%pM"
21*14e8a3c4SBeni Lev #define MAC_PR_ARG(entry_mac) (__entry->entry_mac)
22*14e8a3c4SBeni Lev 
23*14e8a3c4SBeni Lev #define WIPHY_ENTRY MAC_ENTRY(wiphy_mac)
24*14e8a3c4SBeni Lev #define WIPHY_ASSIGN MAC_ASSIGN(wiphy_mac, wiphy->perm_addr)
25*14e8a3c4SBeni Lev #define WIPHY_PR_FMT "wiphy " MAC_PR_FMT
26*14e8a3c4SBeni Lev #define WIPHY_PR_ARG MAC_PR_ARG(wiphy_mac)
27*14e8a3c4SBeni Lev 
28*14e8a3c4SBeni Lev #define WDEV_ENTRY __field(u32, id)
29*14e8a3c4SBeni Lev #define WDEV_ASSIGN (__entry->id) = (wdev->identifier)
30*14e8a3c4SBeni Lev #define WDEV_PR_FMT ", wdev id: %u"
31*14e8a3c4SBeni Lev #define WDEV_PR_ARG (__entry->id)
32*14e8a3c4SBeni Lev 
33*14e8a3c4SBeni Lev #define NETDEV_ENTRY __array(char, name, IFNAMSIZ) \
34*14e8a3c4SBeni Lev 		     MAC_ENTRY(netdev_addr)	   \
35*14e8a3c4SBeni Lev 		     __field(int, ifindex)
36*14e8a3c4SBeni Lev #define NETDEV_ASSIGN					       \
37*14e8a3c4SBeni Lev 	do {						       \
38*14e8a3c4SBeni Lev 		memcpy(__entry->name, netdev->name, IFNAMSIZ); \
39*14e8a3c4SBeni Lev 		MAC_ASSIGN(netdev_addr, netdev->dev_addr);     \
40*14e8a3c4SBeni Lev 		(__entry->ifindex) = (netdev->ifindex);	       \
41*14e8a3c4SBeni Lev 	} while (0)
42*14e8a3c4SBeni Lev #define NETDEV_PR_FMT ", netdev - name: %s, addr: " MAC_PR_FMT \
43*14e8a3c4SBeni Lev 		      ", intf index: %d"
44*14e8a3c4SBeni Lev #define NETDEV_PR_ARG (__entry->name), MAC_PR_ARG(netdev_addr), \
45*14e8a3c4SBeni Lev 		      (__entry->ifindex)
46*14e8a3c4SBeni Lev 
47*14e8a3c4SBeni Lev #define MESH_CFG_ENTRY __field(u16, dot11MeshRetryTimeout)		   \
48*14e8a3c4SBeni Lev 		       __field(u16, dot11MeshConfirmTimeout)		   \
49*14e8a3c4SBeni Lev 		       __field(u16, dot11MeshHoldingTimeout)		   \
50*14e8a3c4SBeni Lev 		       __field(u16, dot11MeshMaxPeerLinks)		   \
51*14e8a3c4SBeni Lev 		       __field(u8, dot11MeshMaxRetries)			   \
52*14e8a3c4SBeni Lev 		       __field(u8, dot11MeshTTL)			   \
53*14e8a3c4SBeni Lev 		       __field(u8, element_ttl)				   \
54*14e8a3c4SBeni Lev 		       __field(bool, auto_open_plinks)			   \
55*14e8a3c4SBeni Lev 		       __field(u32, dot11MeshNbrOffsetMaxNeighbor)	   \
56*14e8a3c4SBeni Lev 		       __field(u8, dot11MeshHWMPmaxPREQretries)		   \
57*14e8a3c4SBeni Lev 		       __field(u32, path_refresh_time)			   \
58*14e8a3c4SBeni Lev 		       __field(u32, dot11MeshHWMPactivePathTimeout)	   \
59*14e8a3c4SBeni Lev 		       __field(u16, min_discovery_timeout)		   \
60*14e8a3c4SBeni Lev 		       __field(u16, dot11MeshHWMPpreqMinInterval)	   \
61*14e8a3c4SBeni Lev 		       __field(u16, dot11MeshHWMPperrMinInterval)	   \
62*14e8a3c4SBeni Lev 		       __field(u16, dot11MeshHWMPnetDiameterTraversalTime) \
63*14e8a3c4SBeni Lev 		       __field(u8, dot11MeshHWMPRootMode)		   \
64*14e8a3c4SBeni Lev 		       __field(u16, dot11MeshHWMPRannInterval)		   \
65*14e8a3c4SBeni Lev 		       __field(bool, dot11MeshGateAnnouncementProtocol)	   \
66*14e8a3c4SBeni Lev 		       __field(bool, dot11MeshForwarding)		   \
67*14e8a3c4SBeni Lev 		       __field(s32, rssi_threshold)			   \
68*14e8a3c4SBeni Lev 		       __field(u16, ht_opmode)				   \
69*14e8a3c4SBeni Lev 		       __field(u32, dot11MeshHWMPactivePathToRootTimeout)  \
70*14e8a3c4SBeni Lev 		       __field(u16, dot11MeshHWMProotInterval)		   \
71*14e8a3c4SBeni Lev 		       __field(u16, dot11MeshHWMPconfirmationInterval)
72*14e8a3c4SBeni Lev #define MESH_CFG_ASSIGN							      \
73*14e8a3c4SBeni Lev 	do {								      \
74*14e8a3c4SBeni Lev 		__entry->dot11MeshRetryTimeout = conf->dot11MeshRetryTimeout; \
75*14e8a3c4SBeni Lev 		__entry->dot11MeshConfirmTimeout =			      \
76*14e8a3c4SBeni Lev 				conf->dot11MeshConfirmTimeout;		      \
77*14e8a3c4SBeni Lev 		__entry->dot11MeshHoldingTimeout =			      \
78*14e8a3c4SBeni Lev 				conf->dot11MeshHoldingTimeout;		      \
79*14e8a3c4SBeni Lev 		__entry->dot11MeshMaxPeerLinks = conf->dot11MeshMaxPeerLinks; \
80*14e8a3c4SBeni Lev 		__entry->dot11MeshMaxRetries = conf->dot11MeshMaxRetries;     \
81*14e8a3c4SBeni Lev 		__entry->dot11MeshTTL = conf->dot11MeshTTL;		      \
82*14e8a3c4SBeni Lev 		__entry->element_ttl = conf->element_ttl;		      \
83*14e8a3c4SBeni Lev 		__entry->auto_open_plinks = conf->auto_open_plinks;	      \
84*14e8a3c4SBeni Lev 		__entry->dot11MeshNbrOffsetMaxNeighbor =		      \
85*14e8a3c4SBeni Lev 				conf->dot11MeshNbrOffsetMaxNeighbor;	      \
86*14e8a3c4SBeni Lev 		__entry->dot11MeshHWMPmaxPREQretries =			      \
87*14e8a3c4SBeni Lev 				conf->dot11MeshHWMPmaxPREQretries;	      \
88*14e8a3c4SBeni Lev 		__entry->path_refresh_time = conf->path_refresh_time;	      \
89*14e8a3c4SBeni Lev 		__entry->dot11MeshHWMPactivePathTimeout =		      \
90*14e8a3c4SBeni Lev 				conf->dot11MeshHWMPactivePathTimeout;	      \
91*14e8a3c4SBeni Lev 		__entry->min_discovery_timeout = conf->min_discovery_timeout; \
92*14e8a3c4SBeni Lev 		__entry->dot11MeshHWMPpreqMinInterval =			      \
93*14e8a3c4SBeni Lev 				conf->dot11MeshHWMPpreqMinInterval;	      \
94*14e8a3c4SBeni Lev 		__entry->dot11MeshHWMPperrMinInterval =			      \
95*14e8a3c4SBeni Lev 				conf->dot11MeshHWMPperrMinInterval;	      \
96*14e8a3c4SBeni Lev 		__entry->dot11MeshHWMPnetDiameterTraversalTime =	      \
97*14e8a3c4SBeni Lev 				conf->dot11MeshHWMPnetDiameterTraversalTime;  \
98*14e8a3c4SBeni Lev 		__entry->dot11MeshHWMPRootMode = conf->dot11MeshHWMPRootMode; \
99*14e8a3c4SBeni Lev 		__entry->dot11MeshHWMPRannInterval =			      \
100*14e8a3c4SBeni Lev 				conf->dot11MeshHWMPRannInterval;	      \
101*14e8a3c4SBeni Lev 		__entry->dot11MeshGateAnnouncementProtocol =		      \
102*14e8a3c4SBeni Lev 				conf->dot11MeshGateAnnouncementProtocol;      \
103*14e8a3c4SBeni Lev 		__entry->dot11MeshForwarding = conf->dot11MeshForwarding;     \
104*14e8a3c4SBeni Lev 		__entry->rssi_threshold = conf->rssi_threshold;		      \
105*14e8a3c4SBeni Lev 		__entry->ht_opmode = conf->ht_opmode;			      \
106*14e8a3c4SBeni Lev 		__entry->dot11MeshHWMPactivePathToRootTimeout =		      \
107*14e8a3c4SBeni Lev 				conf->dot11MeshHWMPactivePathToRootTimeout;   \
108*14e8a3c4SBeni Lev 		__entry->dot11MeshHWMProotInterval =			      \
109*14e8a3c4SBeni Lev 				conf->dot11MeshHWMProotInterval;	      \
110*14e8a3c4SBeni Lev 		__entry->dot11MeshHWMPconfirmationInterval =		      \
111*14e8a3c4SBeni Lev 				conf->dot11MeshHWMPconfirmationInterval;      \
112*14e8a3c4SBeni Lev 	} while (0)
113*14e8a3c4SBeni Lev 
114*14e8a3c4SBeni Lev #define CHAN_ENTRY __field(enum ieee80211_band, band) \
115*14e8a3c4SBeni Lev 		   __field(u16, center_freq)
116*14e8a3c4SBeni Lev #define CHAN_ASSIGN(chan)					  \
117*14e8a3c4SBeni Lev 	do {							  \
118*14e8a3c4SBeni Lev 		if (chan) {					  \
119*14e8a3c4SBeni Lev 			__entry->band = chan->band;		  \
120*14e8a3c4SBeni Lev 			__entry->center_freq = chan->center_freq; \
121*14e8a3c4SBeni Lev 		} else {					  \
122*14e8a3c4SBeni Lev 			__entry->band = 0;			  \
123*14e8a3c4SBeni Lev 			__entry->center_freq = 0;		  \
124*14e8a3c4SBeni Lev 		}						  \
125*14e8a3c4SBeni Lev 	} while (0)
126*14e8a3c4SBeni Lev #define CHAN_PR_FMT ", band: %d, freq: %u"
127*14e8a3c4SBeni Lev #define CHAN_PR_ARG __entry->band, __entry->center_freq
128*14e8a3c4SBeni Lev 
129*14e8a3c4SBeni Lev #define SINFO_ENTRY __field(int, generation)	    \
130*14e8a3c4SBeni Lev 		    __field(u32, connected_time)    \
131*14e8a3c4SBeni Lev 		    __field(u32, inactive_time)	    \
132*14e8a3c4SBeni Lev 		    __field(u32, rx_bytes)	    \
133*14e8a3c4SBeni Lev 		    __field(u32, tx_bytes)	    \
134*14e8a3c4SBeni Lev 		    __field(u32, rx_packets)	    \
135*14e8a3c4SBeni Lev 		    __field(u32, tx_packets)	    \
136*14e8a3c4SBeni Lev 		    __field(u32, tx_retries)	    \
137*14e8a3c4SBeni Lev 		    __field(u32, tx_failed)	    \
138*14e8a3c4SBeni Lev 		    __field(u32, rx_dropped_misc)   \
139*14e8a3c4SBeni Lev 		    __field(u32, beacon_loss_count) \
140*14e8a3c4SBeni Lev 		    __field(u16, llid)		    \
141*14e8a3c4SBeni Lev 		    __field(u16, plid)		    \
142*14e8a3c4SBeni Lev 		    __field(u8, plink_state)
143*14e8a3c4SBeni Lev #define SINFO_ASSIGN						       \
144*14e8a3c4SBeni Lev 	do {							       \
145*14e8a3c4SBeni Lev 		__entry->generation = sinfo->generation;	       \
146*14e8a3c4SBeni Lev 		__entry->connected_time = sinfo->connected_time;       \
147*14e8a3c4SBeni Lev 		__entry->inactive_time = sinfo->inactive_time;	       \
148*14e8a3c4SBeni Lev 		__entry->rx_bytes = sinfo->rx_bytes;		       \
149*14e8a3c4SBeni Lev 		__entry->tx_bytes = sinfo->tx_bytes;		       \
150*14e8a3c4SBeni Lev 		__entry->rx_packets = sinfo->rx_packets;	       \
151*14e8a3c4SBeni Lev 		__entry->tx_packets = sinfo->tx_packets;	       \
152*14e8a3c4SBeni Lev 		__entry->tx_retries = sinfo->tx_retries;	       \
153*14e8a3c4SBeni Lev 		__entry->tx_failed = sinfo->tx_failed;		       \
154*14e8a3c4SBeni Lev 		__entry->rx_dropped_misc = sinfo->rx_dropped_misc;     \
155*14e8a3c4SBeni Lev 		__entry->beacon_loss_count = sinfo->beacon_loss_count; \
156*14e8a3c4SBeni Lev 		__entry->llid = sinfo->llid;			       \
157*14e8a3c4SBeni Lev 		__entry->plid = sinfo->plid;			       \
158*14e8a3c4SBeni Lev 		__entry->plink_state = sinfo->plink_state;	       \
159*14e8a3c4SBeni Lev 	} while (0)
160*14e8a3c4SBeni Lev 
161*14e8a3c4SBeni Lev #define BOOL_TO_STR(bo) (bo) ? "true" : "false"
162*14e8a3c4SBeni Lev 
163*14e8a3c4SBeni Lev /*************************************************************
164*14e8a3c4SBeni Lev  *			rdev->ops traces		     *
165*14e8a3c4SBeni Lev  *************************************************************/
166*14e8a3c4SBeni Lev 
167*14e8a3c4SBeni Lev TRACE_EVENT(rdev_suspend,
168*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_wowlan *wow),
169*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, wow),
170*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
171*14e8a3c4SBeni Lev 		WIPHY_ENTRY
172*14e8a3c4SBeni Lev 		__field(bool, any)
173*14e8a3c4SBeni Lev 		__field(bool, disconnect)
174*14e8a3c4SBeni Lev 		__field(bool, magic_pkt)
175*14e8a3c4SBeni Lev 		__field(bool, gtk_rekey_failure)
176*14e8a3c4SBeni Lev 		__field(bool, eap_identity_req)
177*14e8a3c4SBeni Lev 		__field(bool, four_way_handshake)
178*14e8a3c4SBeni Lev 		__field(bool, rfkill_release)
179*14e8a3c4SBeni Lev 		__field(bool, valid_wow)
180*14e8a3c4SBeni Lev 	),
181*14e8a3c4SBeni Lev 	TP_fast_assign(
182*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
183*14e8a3c4SBeni Lev 		if (wow) {
184*14e8a3c4SBeni Lev 			__entry->any = wow->any;
185*14e8a3c4SBeni Lev 			__entry->disconnect = wow->disconnect;
186*14e8a3c4SBeni Lev 			__entry->magic_pkt = wow->magic_pkt;
187*14e8a3c4SBeni Lev 			__entry->gtk_rekey_failure = wow->gtk_rekey_failure;
188*14e8a3c4SBeni Lev 			__entry->eap_identity_req = wow->eap_identity_req;
189*14e8a3c4SBeni Lev 			__entry->four_way_handshake = wow->four_way_handshake;
190*14e8a3c4SBeni Lev 			__entry->rfkill_release = wow->rfkill_release;
191*14e8a3c4SBeni Lev 			__entry->valid_wow = true;
192*14e8a3c4SBeni Lev 		} else {
193*14e8a3c4SBeni Lev 			__entry->valid_wow = false;
194*14e8a3c4SBeni Lev 		}
195*14e8a3c4SBeni Lev 	),
196*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", wow%s - any: %d, disconnect: %d, "
197*14e8a3c4SBeni Lev 		  "magic pkt: %d, gtk rekey failure: %d, eap identify req: %d, "
198*14e8a3c4SBeni Lev 		  "four way handshake: %d, rfkill release: %d.",
199*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->valid_wow ? "" : "(Not configured!)",
200*14e8a3c4SBeni Lev 		  __entry->any, __entry->disconnect, __entry->magic_pkt,
201*14e8a3c4SBeni Lev 		  __entry->gtk_rekey_failure, __entry->eap_identity_req,
202*14e8a3c4SBeni Lev 		  __entry->four_way_handshake, __entry->rfkill_release)
203*14e8a3c4SBeni Lev );
204*14e8a3c4SBeni Lev 
205*14e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int,
206*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret),
207*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret),
208*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
209*14e8a3c4SBeni Lev 		WIPHY_ENTRY
210*14e8a3c4SBeni Lev 		__field(int, ret)
211*14e8a3c4SBeni Lev 	),
212*14e8a3c4SBeni Lev 	TP_fast_assign(
213*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
214*14e8a3c4SBeni Lev 		__entry->ret = ret;
215*14e8a3c4SBeni Lev 	),
216*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned: %d", WIPHY_PR_ARG, __entry->ret)
217*14e8a3c4SBeni Lev );
218*14e8a3c4SBeni Lev 
219*14e8a3c4SBeni Lev TRACE_EVENT(rdev_scan,
220*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_scan_request *request),
221*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, request),
222*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
223*14e8a3c4SBeni Lev 		WIPHY_ENTRY
224*14e8a3c4SBeni Lev 	),
225*14e8a3c4SBeni Lev 	TP_fast_assign(
226*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
227*14e8a3c4SBeni Lev 	),
228*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
229*14e8a3c4SBeni Lev );
230*14e8a3c4SBeni Lev 
231*14e8a3c4SBeni Lev DECLARE_EVENT_CLASS(wiphy_only_evt,
232*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
233*14e8a3c4SBeni Lev 	TP_ARGS(wiphy),
234*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
235*14e8a3c4SBeni Lev 		WIPHY_ENTRY
236*14e8a3c4SBeni Lev 	),
237*14e8a3c4SBeni Lev 	TP_fast_assign(
238*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
239*14e8a3c4SBeni Lev 	),
240*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
241*14e8a3c4SBeni Lev );
242*14e8a3c4SBeni Lev 
243*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_only_evt, rdev_resume,
244*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
245*14e8a3c4SBeni Lev 	TP_ARGS(wiphy)
246*14e8a3c4SBeni Lev );
247*14e8a3c4SBeni Lev 
248*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_only_evt, rdev_return_void,
249*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
250*14e8a3c4SBeni Lev 	TP_ARGS(wiphy)
251*14e8a3c4SBeni Lev );
252*14e8a3c4SBeni Lev 
253*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_only_evt, rdev_get_ringparam,
254*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
255*14e8a3c4SBeni Lev 	TP_ARGS(wiphy)
256*14e8a3c4SBeni Lev );
257*14e8a3c4SBeni Lev 
258*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna,
259*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
260*14e8a3c4SBeni Lev 	TP_ARGS(wiphy)
261*14e8a3c4SBeni Lev );
262*14e8a3c4SBeni Lev 
263*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_only_evt, rdev_get_tx_power,
264*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
265*14e8a3c4SBeni Lev 	TP_ARGS(wiphy)
266*14e8a3c4SBeni Lev );
267*14e8a3c4SBeni Lev 
268*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll,
269*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
270*14e8a3c4SBeni Lev 	TP_ARGS(wiphy)
271*14e8a3c4SBeni Lev );
272*14e8a3c4SBeni Lev 
273*14e8a3c4SBeni Lev DECLARE_EVENT_CLASS(wiphy_enabled_evt,
274*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, bool enabled),
275*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, enabled),
276*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
277*14e8a3c4SBeni Lev 		WIPHY_ENTRY
278*14e8a3c4SBeni Lev 		__field(bool, enabled)
279*14e8a3c4SBeni Lev 	),
280*14e8a3c4SBeni Lev 	TP_fast_assign(
281*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
282*14e8a3c4SBeni Lev 		__entry->enabled = enabled;
283*14e8a3c4SBeni Lev 	),
284*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", %senabled ",
285*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->enabled ? "" : "not ")
286*14e8a3c4SBeni Lev );
287*14e8a3c4SBeni Lev 
288*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup,
289*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, bool enabled),
290*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, enabled)
291*14e8a3c4SBeni Lev );
292*14e8a3c4SBeni Lev 
293*14e8a3c4SBeni Lev TRACE_EVENT(rdev_add_virtual_intf,
294*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type),
295*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, name, type),
296*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
297*14e8a3c4SBeni Lev 		WIPHY_ENTRY
298*14e8a3c4SBeni Lev 		__string(vir_intf_name, name ? name : "<noname>")
299*14e8a3c4SBeni Lev 		__field(enum nl80211_iftype, type)
300*14e8a3c4SBeni Lev 	),
301*14e8a3c4SBeni Lev 	TP_fast_assign(
302*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
303*14e8a3c4SBeni Lev 		__assign_str(vir_intf_name, name ? name : "<noname>");
304*14e8a3c4SBeni Lev 		__entry->type = type;
305*14e8a3c4SBeni Lev 	),
306*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d",
307*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type)
308*14e8a3c4SBeni Lev );
309*14e8a3c4SBeni Lev 
310*14e8a3c4SBeni Lev DECLARE_EVENT_CLASS(wiphy_wdev_evt,
311*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
312*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev),
313*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
314*14e8a3c4SBeni Lev 		WIPHY_ENTRY
315*14e8a3c4SBeni Lev 		WDEV_ENTRY
316*14e8a3c4SBeni Lev 	),
317*14e8a3c4SBeni Lev 	TP_fast_assign(
318*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
319*14e8a3c4SBeni Lev 		WDEV_ASSIGN;
320*14e8a3c4SBeni Lev 	),
321*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
322*14e8a3c4SBeni Lev );
323*14e8a3c4SBeni Lev 
324*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev,
325*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
326*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev)
327*14e8a3c4SBeni Lev );
328*14e8a3c4SBeni Lev 
329*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf,
330*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
331*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev)
332*14e8a3c4SBeni Lev );
333*14e8a3c4SBeni Lev 
334*14e8a3c4SBeni Lev TRACE_EVENT(rdev_change_virtual_intf,
335*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
336*14e8a3c4SBeni Lev 		 enum nl80211_iftype type),
337*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, type),
338*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
339*14e8a3c4SBeni Lev 		WIPHY_ENTRY
340*14e8a3c4SBeni Lev 		NETDEV_ENTRY
341*14e8a3c4SBeni Lev 		__field(enum nl80211_iftype, type)
342*14e8a3c4SBeni Lev 	),
343*14e8a3c4SBeni Lev 	TP_fast_assign(
344*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
345*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
346*14e8a3c4SBeni Lev 		__entry->type = type;
347*14e8a3c4SBeni Lev 	),
348*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", type: %d",
349*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type)
350*14e8a3c4SBeni Lev );
351*14e8a3c4SBeni Lev 
352*14e8a3c4SBeni Lev DECLARE_EVENT_CLASS(key_handle,
353*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
354*14e8a3c4SBeni Lev 		 bool pairwise, const u8 *mac_addr),
355*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr),
356*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
357*14e8a3c4SBeni Lev 		WIPHY_ENTRY
358*14e8a3c4SBeni Lev 		NETDEV_ENTRY
359*14e8a3c4SBeni Lev 		MAC_ENTRY(mac_addr)
360*14e8a3c4SBeni Lev 		__field(u8, key_index)
361*14e8a3c4SBeni Lev 		__field(bool, pairwise)
362*14e8a3c4SBeni Lev 	),
363*14e8a3c4SBeni Lev 	TP_fast_assign(
364*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
365*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
366*14e8a3c4SBeni Lev 		MAC_ASSIGN(mac_addr, mac_addr);
367*14e8a3c4SBeni Lev 		__entry->key_index = key_index;
368*14e8a3c4SBeni Lev 		__entry->pairwise = pairwise;
369*14e8a3c4SBeni Lev 	),
370*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", key_index: %u, pairwise: %s, mac addr: " MAC_PR_FMT,
371*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
372*14e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->pairwise), MAC_PR_ARG(mac_addr))
373*14e8a3c4SBeni Lev );
374*14e8a3c4SBeni Lev 
375*14e8a3c4SBeni Lev DEFINE_EVENT(key_handle, rdev_add_key,
376*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
377*14e8a3c4SBeni Lev 		 bool pairwise, const u8 *mac_addr),
378*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
379*14e8a3c4SBeni Lev );
380*14e8a3c4SBeni Lev 
381*14e8a3c4SBeni Lev DEFINE_EVENT(key_handle, rdev_get_key,
382*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
383*14e8a3c4SBeni Lev 		 bool pairwise, const u8 *mac_addr),
384*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
385*14e8a3c4SBeni Lev );
386*14e8a3c4SBeni Lev 
387*14e8a3c4SBeni Lev DEFINE_EVENT(key_handle, rdev_del_key,
388*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
389*14e8a3c4SBeni Lev 		 bool pairwise, const u8 *mac_addr),
390*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
391*14e8a3c4SBeni Lev );
392*14e8a3c4SBeni Lev 
393*14e8a3c4SBeni Lev TRACE_EVENT(rdev_set_default_key,
394*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
395*14e8a3c4SBeni Lev 		 bool unicast, bool multicast),
396*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, key_index, unicast, multicast),
397*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
398*14e8a3c4SBeni Lev 		WIPHY_ENTRY
399*14e8a3c4SBeni Lev 		NETDEV_ENTRY
400*14e8a3c4SBeni Lev 		__field(u8, key_index)
401*14e8a3c4SBeni Lev 		__field(bool, unicast)
402*14e8a3c4SBeni Lev 		__field(bool, multicast)
403*14e8a3c4SBeni Lev 	),
404*14e8a3c4SBeni Lev 	TP_fast_assign(
405*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
406*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
407*14e8a3c4SBeni Lev 		__entry->key_index = key_index;
408*14e8a3c4SBeni Lev 		__entry->unicast = unicast;
409*14e8a3c4SBeni Lev 		__entry->multicast = multicast;
410*14e8a3c4SBeni Lev 	),
411*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", key index: %u, unicast: %s, multicast: %s",
412*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
413*14e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->unicast),
414*14e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->multicast))
415*14e8a3c4SBeni Lev );
416*14e8a3c4SBeni Lev 
417*14e8a3c4SBeni Lev TRACE_EVENT(rdev_set_default_mgmt_key,
418*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
419*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, key_index),
420*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
421*14e8a3c4SBeni Lev 		WIPHY_ENTRY
422*14e8a3c4SBeni Lev 		NETDEV_ENTRY
423*14e8a3c4SBeni Lev 		__field(u8, key_index)
424*14e8a3c4SBeni Lev 	),
425*14e8a3c4SBeni Lev 	TP_fast_assign(
426*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
427*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
428*14e8a3c4SBeni Lev 		__entry->key_index = key_index;
429*14e8a3c4SBeni Lev 	),
430*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", key index: %u",
431*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
432*14e8a3c4SBeni Lev );
433*14e8a3c4SBeni Lev 
434*14e8a3c4SBeni Lev TRACE_EVENT(rdev_start_ap,
435*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
436*14e8a3c4SBeni Lev 		 struct cfg80211_ap_settings *settings),
437*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, settings),
438*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
439*14e8a3c4SBeni Lev 		WIPHY_ENTRY
440*14e8a3c4SBeni Lev 		NETDEV_ENTRY
441*14e8a3c4SBeni Lev 		CHAN_ENTRY
442*14e8a3c4SBeni Lev 		__field(int, beacon_interval)
443*14e8a3c4SBeni Lev 		__field(int, dtim_period)
444*14e8a3c4SBeni Lev 		__array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
445*14e8a3c4SBeni Lev 		__field(enum nl80211_hidden_ssid, hidden_ssid)
446*14e8a3c4SBeni Lev 		__field(u32, wpa_ver)
447*14e8a3c4SBeni Lev 		__field(bool, privacy)
448*14e8a3c4SBeni Lev 		__field(enum nl80211_auth_type, auth_type)
449*14e8a3c4SBeni Lev 		__field(int, inactivity_timeout)
450*14e8a3c4SBeni Lev 	),
451*14e8a3c4SBeni Lev 	TP_fast_assign(
452*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
453*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
454*14e8a3c4SBeni Lev 		CHAN_ASSIGN(settings->channel);
455*14e8a3c4SBeni Lev 		__entry->beacon_interval = settings->beacon_interval;
456*14e8a3c4SBeni Lev 		__entry->dtim_period = settings->dtim_period;
457*14e8a3c4SBeni Lev 		__entry->hidden_ssid = settings->hidden_ssid;
458*14e8a3c4SBeni Lev 		__entry->wpa_ver = settings->crypto.wpa_versions;
459*14e8a3c4SBeni Lev 		__entry->privacy = settings->privacy;
460*14e8a3c4SBeni Lev 		__entry->auth_type = settings->auth_type;
461*14e8a3c4SBeni Lev 		__entry->inactivity_timeout = settings->inactivity_timeout;
462*14e8a3c4SBeni Lev 		memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
463*14e8a3c4SBeni Lev 		memcpy(__entry->ssid, settings->ssid, settings->ssid_len);
464*14e8a3c4SBeni Lev 	),
465*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", AP settings - ssid: %s, "
466*14e8a3c4SBeni Lev 		  CHAN_PR_FMT ", beacon interval: %d, dtim period: %d, "
467*14e8a3c4SBeni Lev 		  "hidden ssid: %d, wpa versions: %u, privacy: %s, "
468*14e8a3c4SBeni Lev 		  "auth type: %d, inactivity timeout: %d",
469*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_PR_ARG,
470*14e8a3c4SBeni Lev 		  __entry->beacon_interval, __entry->dtim_period,
471*14e8a3c4SBeni Lev 		  __entry->hidden_ssid, __entry->wpa_ver,
472*14e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->privacy), __entry->auth_type,
473*14e8a3c4SBeni Lev 		  __entry->inactivity_timeout)
474*14e8a3c4SBeni Lev );
475*14e8a3c4SBeni Lev 
476*14e8a3c4SBeni Lev TRACE_EVENT(rdev_change_beacon,
477*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
478*14e8a3c4SBeni Lev 		 struct cfg80211_beacon_data *info),
479*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, info),
480*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
481*14e8a3c4SBeni Lev 		WIPHY_ENTRY
482*14e8a3c4SBeni Lev 		NETDEV_ENTRY
483*14e8a3c4SBeni Lev 		__dynamic_array(u8, head, info ? info->head_len : 0)
484*14e8a3c4SBeni Lev 		__dynamic_array(u8, tail, info ? info->tail_len : 0)
485*14e8a3c4SBeni Lev 		__dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0)
486*14e8a3c4SBeni Lev 		__dynamic_array(u8, proberesp_ies,
487*14e8a3c4SBeni Lev 				info ? info->proberesp_ies_len : 0)
488*14e8a3c4SBeni Lev 		__dynamic_array(u8, assocresp_ies,
489*14e8a3c4SBeni Lev 				info ? info->assocresp_ies_len : 0)
490*14e8a3c4SBeni Lev 		__dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0)
491*14e8a3c4SBeni Lev 	),
492*14e8a3c4SBeni Lev 	TP_fast_assign(
493*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
494*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
495*14e8a3c4SBeni Lev 		if (info) {
496*14e8a3c4SBeni Lev 			if (info->head)
497*14e8a3c4SBeni Lev 				memcpy(__get_dynamic_array(head), info->head,
498*14e8a3c4SBeni Lev 				       info->head_len);
499*14e8a3c4SBeni Lev 			if (info->tail)
500*14e8a3c4SBeni Lev 				memcpy(__get_dynamic_array(tail), info->tail,
501*14e8a3c4SBeni Lev 				       info->tail_len);
502*14e8a3c4SBeni Lev 			if (info->beacon_ies)
503*14e8a3c4SBeni Lev 				memcpy(__get_dynamic_array(beacon_ies),
504*14e8a3c4SBeni Lev 				       info->beacon_ies, info->beacon_ies_len);
505*14e8a3c4SBeni Lev 			if (info->proberesp_ies)
506*14e8a3c4SBeni Lev 				memcpy(__get_dynamic_array(proberesp_ies),
507*14e8a3c4SBeni Lev 				       info->proberesp_ies,
508*14e8a3c4SBeni Lev 				       info->proberesp_ies_len);
509*14e8a3c4SBeni Lev 			if (info->assocresp_ies)
510*14e8a3c4SBeni Lev 				memcpy(__get_dynamic_array(assocresp_ies),
511*14e8a3c4SBeni Lev 				       info->assocresp_ies,
512*14e8a3c4SBeni Lev 				       info->assocresp_ies_len);
513*14e8a3c4SBeni Lev 			if (info->probe_resp)
514*14e8a3c4SBeni Lev 				memcpy(__get_dynamic_array(probe_resp),
515*14e8a3c4SBeni Lev 				       info->probe_resp, info->probe_resp_len);
516*14e8a3c4SBeni Lev 		}
517*14e8a3c4SBeni Lev 	),
518*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
519*14e8a3c4SBeni Lev );
520*14e8a3c4SBeni Lev 
521*14e8a3c4SBeni Lev DECLARE_EVENT_CLASS(wiphy_netdev_evt,
522*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
523*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev),
524*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
525*14e8a3c4SBeni Lev 		WIPHY_ENTRY
526*14e8a3c4SBeni Lev 		NETDEV_ENTRY
527*14e8a3c4SBeni Lev 	),
528*14e8a3c4SBeni Lev 	TP_fast_assign(
529*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
530*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
531*14e8a3c4SBeni Lev 	),
532*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
533*14e8a3c4SBeni Lev );
534*14e8a3c4SBeni Lev 
535*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_stop_ap,
536*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
537*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
538*14e8a3c4SBeni Lev );
539*14e8a3c4SBeni Lev 
540*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_get_et_stats,
541*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
542*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
543*14e8a3c4SBeni Lev );
544*14e8a3c4SBeni Lev 
545*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_sched_scan_stop,
546*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
547*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
548*14e8a3c4SBeni Lev );
549*14e8a3c4SBeni Lev 
550*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data,
551*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
552*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
553*14e8a3c4SBeni Lev );
554*14e8a3c4SBeni Lev 
555*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config,
556*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
557*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
558*14e8a3c4SBeni Lev );
559*14e8a3c4SBeni Lev 
560*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh,
561*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
562*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
563*14e8a3c4SBeni Lev );
564*14e8a3c4SBeni Lev 
565*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ibss,
566*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
567*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
568*14e8a3c4SBeni Lev );
569*14e8a3c4SBeni Lev 
570*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa,
571*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
572*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev)
573*14e8a3c4SBeni Lev );
574*14e8a3c4SBeni Lev 
575*14e8a3c4SBeni Lev DECLARE_EVENT_CLASS(station_add_change,
576*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
577*14e8a3c4SBeni Lev 		 struct station_parameters *params),
578*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac, params),
579*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
580*14e8a3c4SBeni Lev 		WIPHY_ENTRY
581*14e8a3c4SBeni Lev 		NETDEV_ENTRY
582*14e8a3c4SBeni Lev 		MAC_ENTRY(sta_mac)
583*14e8a3c4SBeni Lev 		__field(u32, sta_flags_mask)
584*14e8a3c4SBeni Lev 		__field(u32, sta_flags_set)
585*14e8a3c4SBeni Lev 		__field(u32, sta_modify_mask)
586*14e8a3c4SBeni Lev 		__field(int, listen_interval)
587*14e8a3c4SBeni Lev 		__field(u16, aid)
588*14e8a3c4SBeni Lev 		__field(u8, plink_action)
589*14e8a3c4SBeni Lev 		__field(u8, plink_state)
590*14e8a3c4SBeni Lev 		__field(u8, uapsd_queues)
591*14e8a3c4SBeni Lev 		__array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap))
592*14e8a3c4SBeni Lev 	),
593*14e8a3c4SBeni Lev 	TP_fast_assign(
594*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
595*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
596*14e8a3c4SBeni Lev 		MAC_ASSIGN(sta_mac, mac);
597*14e8a3c4SBeni Lev 		__entry->sta_flags_mask = params->sta_flags_mask;
598*14e8a3c4SBeni Lev 		__entry->sta_flags_set = params->sta_flags_set;
599*14e8a3c4SBeni Lev 		__entry->sta_modify_mask = params->sta_modify_mask;
600*14e8a3c4SBeni Lev 		__entry->listen_interval = params->listen_interval;
601*14e8a3c4SBeni Lev 		__entry->aid = params->aid;
602*14e8a3c4SBeni Lev 		__entry->plink_action = params->plink_action;
603*14e8a3c4SBeni Lev 		__entry->plink_state = params->plink_state;
604*14e8a3c4SBeni Lev 		__entry->uapsd_queues = params->uapsd_queues;
605*14e8a3c4SBeni Lev 		memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap));
606*14e8a3c4SBeni Lev 		if (params->ht_capa)
607*14e8a3c4SBeni Lev 			memcpy(__entry->ht_capa, params->ht_capa,
608*14e8a3c4SBeni Lev 			       sizeof(struct ieee80211_ht_cap));
609*14e8a3c4SBeni Lev 	),
610*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
611*14e8a3c4SBeni Lev 		  ", station flags mask: %u, station flags set: %u, "
612*14e8a3c4SBeni Lev 		  "station modify mask: %u, listen interval: %d, aid: %u, "
613*14e8a3c4SBeni Lev 		  "plink action: %u, plink state: %u, uapsd queues: %u",
614*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
615*14e8a3c4SBeni Lev 		  __entry->sta_flags_mask, __entry->sta_flags_set,
616*14e8a3c4SBeni Lev 		  __entry->sta_modify_mask, __entry->listen_interval,
617*14e8a3c4SBeni Lev 		  __entry->aid, __entry->plink_action, __entry->plink_state,
618*14e8a3c4SBeni Lev 		  __entry->uapsd_queues)
619*14e8a3c4SBeni Lev );
620*14e8a3c4SBeni Lev 
621*14e8a3c4SBeni Lev DEFINE_EVENT(station_add_change, rdev_add_station,
622*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
623*14e8a3c4SBeni Lev 		 struct station_parameters *params),
624*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac, params)
625*14e8a3c4SBeni Lev );
626*14e8a3c4SBeni Lev 
627*14e8a3c4SBeni Lev DEFINE_EVENT(station_add_change, rdev_change_station,
628*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
629*14e8a3c4SBeni Lev 		 struct station_parameters *params),
630*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac, params)
631*14e8a3c4SBeni Lev );
632*14e8a3c4SBeni Lev 
633*14e8a3c4SBeni Lev DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
634*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
635*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac),
636*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
637*14e8a3c4SBeni Lev 		WIPHY_ENTRY
638*14e8a3c4SBeni Lev 		NETDEV_ENTRY
639*14e8a3c4SBeni Lev 		MAC_ENTRY(sta_mac)
640*14e8a3c4SBeni Lev 	),
641*14e8a3c4SBeni Lev 	TP_fast_assign(
642*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
643*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
644*14e8a3c4SBeni Lev 		MAC_ASSIGN(sta_mac, mac);
645*14e8a3c4SBeni Lev 	),
646*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
647*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac))
648*14e8a3c4SBeni Lev );
649*14e8a3c4SBeni Lev 
650*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_station,
651*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
652*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac)
653*14e8a3c4SBeni Lev );
654*14e8a3c4SBeni Lev 
655*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station,
656*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
657*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac)
658*14e8a3c4SBeni Lev );
659*14e8a3c4SBeni Lev 
660*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
661*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
662*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac)
663*14e8a3c4SBeni Lev );
664*14e8a3c4SBeni Lev 
665*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer,
666*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
667*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mac)
668*14e8a3c4SBeni Lev );
669*14e8a3c4SBeni Lev 
670*14e8a3c4SBeni Lev TRACE_EVENT(rdev_dump_station,
671*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
672*14e8a3c4SBeni Lev 		 u8 *mac),
673*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, idx, mac),
674*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
675*14e8a3c4SBeni Lev 		WIPHY_ENTRY
676*14e8a3c4SBeni Lev 		NETDEV_ENTRY
677*14e8a3c4SBeni Lev 		MAC_ENTRY(sta_mac)
678*14e8a3c4SBeni Lev 		__field(int, idx)
679*14e8a3c4SBeni Lev 	),
680*14e8a3c4SBeni Lev 	TP_fast_assign(
681*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
682*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
683*14e8a3c4SBeni Lev 		MAC_ASSIGN(sta_mac, mac);
684*14e8a3c4SBeni Lev 		__entry->idx = idx;
685*14e8a3c4SBeni Lev 	),
686*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d",
687*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
688*14e8a3c4SBeni Lev 		  __entry->idx)
689*14e8a3c4SBeni Lev );
690*14e8a3c4SBeni Lev 
691*14e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_station_info,
692*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo),
693*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret, sinfo),
694*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
695*14e8a3c4SBeni Lev 		WIPHY_ENTRY
696*14e8a3c4SBeni Lev 		__field(int, ret)
697*14e8a3c4SBeni Lev 		SINFO_ENTRY
698*14e8a3c4SBeni Lev 	),
699*14e8a3c4SBeni Lev 	TP_fast_assign(
700*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
701*14e8a3c4SBeni Lev 		__entry->ret = ret;
702*14e8a3c4SBeni Lev 		SINFO_ASSIGN;
703*14e8a3c4SBeni Lev 	),
704*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned %d" ,
705*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->ret)
706*14e8a3c4SBeni Lev );
707*14e8a3c4SBeni Lev 
708*14e8a3c4SBeni Lev DECLARE_EVENT_CLASS(mpath_evt,
709*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
710*14e8a3c4SBeni Lev 		 u8 *next_hop),
711*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, dst, next_hop),
712*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
713*14e8a3c4SBeni Lev 		WIPHY_ENTRY
714*14e8a3c4SBeni Lev 		NETDEV_ENTRY
715*14e8a3c4SBeni Lev 		MAC_ENTRY(dst)
716*14e8a3c4SBeni Lev 		MAC_ENTRY(next_hop)
717*14e8a3c4SBeni Lev 	),
718*14e8a3c4SBeni Lev 	TP_fast_assign(
719*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
720*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
721*14e8a3c4SBeni Lev 		MAC_ASSIGN(dst, dst);
722*14e8a3c4SBeni Lev 		MAC_ASSIGN(next_hop, next_hop);
723*14e8a3c4SBeni Lev 	),
724*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT,
725*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst),
726*14e8a3c4SBeni Lev 		  MAC_PR_ARG(next_hop))
727*14e8a3c4SBeni Lev );
728*14e8a3c4SBeni Lev 
729*14e8a3c4SBeni Lev DEFINE_EVENT(mpath_evt, rdev_add_mpath,
730*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
731*14e8a3c4SBeni Lev 		 u8 *next_hop),
732*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, dst, next_hop)
733*14e8a3c4SBeni Lev );
734*14e8a3c4SBeni Lev 
735*14e8a3c4SBeni Lev DEFINE_EVENT(mpath_evt, rdev_change_mpath,
736*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
737*14e8a3c4SBeni Lev 		 u8 *next_hop),
738*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, dst, next_hop)
739*14e8a3c4SBeni Lev );
740*14e8a3c4SBeni Lev 
741*14e8a3c4SBeni Lev DEFINE_EVENT(mpath_evt, rdev_get_mpath,
742*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
743*14e8a3c4SBeni Lev 		 u8 *next_hop),
744*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, dst, next_hop)
745*14e8a3c4SBeni Lev );
746*14e8a3c4SBeni Lev 
747*14e8a3c4SBeni Lev TRACE_EVENT(rdev_dump_mpath,
748*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
749*14e8a3c4SBeni Lev 		 u8 *dst, u8 *next_hop),
750*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, idx, dst, next_hop),
751*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
752*14e8a3c4SBeni Lev 		WIPHY_ENTRY
753*14e8a3c4SBeni Lev 		NETDEV_ENTRY
754*14e8a3c4SBeni Lev 		MAC_ENTRY(dst)
755*14e8a3c4SBeni Lev 		MAC_ENTRY(next_hop)
756*14e8a3c4SBeni Lev 		__field(int, idx)
757*14e8a3c4SBeni Lev 	),
758*14e8a3c4SBeni Lev 	TP_fast_assign(
759*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
760*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
761*14e8a3c4SBeni Lev 		MAC_ASSIGN(dst, dst);
762*14e8a3c4SBeni Lev 		MAC_ASSIGN(next_hop, next_hop);
763*14e8a3c4SBeni Lev 		__entry->idx = idx;
764*14e8a3c4SBeni Lev 	),
765*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", index: %d, destination: "
766*14e8a3c4SBeni Lev 		  MAC_PR_FMT ", next hop: " MAC_PR_FMT,
767*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
768*14e8a3c4SBeni Lev 		  MAC_PR_ARG(next_hop))
769*14e8a3c4SBeni Lev );
770*14e8a3c4SBeni Lev 
771*14e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_mpath_info,
772*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo),
773*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret, pinfo),
774*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
775*14e8a3c4SBeni Lev 		WIPHY_ENTRY
776*14e8a3c4SBeni Lev 		__field(int, ret)
777*14e8a3c4SBeni Lev 		__field(int, generation)
778*14e8a3c4SBeni Lev 		__field(u32, filled)
779*14e8a3c4SBeni Lev 		__field(u32, frame_qlen)
780*14e8a3c4SBeni Lev 		__field(u32, sn)
781*14e8a3c4SBeni Lev 		__field(u32, metric)
782*14e8a3c4SBeni Lev 		__field(u32, exptime)
783*14e8a3c4SBeni Lev 		__field(u32, discovery_timeout)
784*14e8a3c4SBeni Lev 		__field(u8, discovery_retries)
785*14e8a3c4SBeni Lev 		__field(u8, flags)
786*14e8a3c4SBeni Lev 	),
787*14e8a3c4SBeni Lev 	TP_fast_assign(
788*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
789*14e8a3c4SBeni Lev 		__entry->ret = ret;
790*14e8a3c4SBeni Lev 		__entry->generation = pinfo->generation;
791*14e8a3c4SBeni Lev 		__entry->filled = pinfo->filled;
792*14e8a3c4SBeni Lev 		__entry->frame_qlen = pinfo->frame_qlen;
793*14e8a3c4SBeni Lev 		__entry->sn = pinfo->sn;
794*14e8a3c4SBeni Lev 		__entry->metric = pinfo->metric;
795*14e8a3c4SBeni Lev 		__entry->exptime = pinfo->exptime;
796*14e8a3c4SBeni Lev 		__entry->discovery_timeout = pinfo->discovery_timeout;
797*14e8a3c4SBeni Lev 		__entry->discovery_retries = pinfo->discovery_retries;
798*14e8a3c4SBeni Lev 		__entry->flags = pinfo->flags;
799*14e8a3c4SBeni Lev 	),
800*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, "
801*14e8a3c4SBeni Lev 		  "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
802*14e8a3c4SBeni Lev 		  " discovery timeout: %u, discovery retries: %u, flags: %u",
803*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->ret, __entry->generation,
804*14e8a3c4SBeni Lev 		  __entry->filled, __entry->frame_qlen, __entry->sn,
805*14e8a3c4SBeni Lev 		  __entry->metric, __entry->exptime, __entry->discovery_timeout,
806*14e8a3c4SBeni Lev 		  __entry->discovery_retries, __entry->flags)
807*14e8a3c4SBeni Lev );
808*14e8a3c4SBeni Lev 
809*14e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_mesh_config,
810*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf),
811*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret, conf),
812*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
813*14e8a3c4SBeni Lev 		WIPHY_ENTRY
814*14e8a3c4SBeni Lev 		MESH_CFG_ENTRY
815*14e8a3c4SBeni Lev 		__field(int, ret)
816*14e8a3c4SBeni Lev 	),
817*14e8a3c4SBeni Lev 	TP_fast_assign(
818*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
819*14e8a3c4SBeni Lev 		MESH_CFG_ASSIGN;
820*14e8a3c4SBeni Lev 		__entry->ret = ret;
821*14e8a3c4SBeni Lev 	),
822*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned: %d",
823*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->ret)
824*14e8a3c4SBeni Lev );
825*14e8a3c4SBeni Lev 
826*14e8a3c4SBeni Lev TRACE_EVENT(rdev_update_mesh_config,
827*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
828*14e8a3c4SBeni Lev 		 const struct mesh_config *conf),
829*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, mask, conf),
830*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
831*14e8a3c4SBeni Lev 		WIPHY_ENTRY
832*14e8a3c4SBeni Lev 		NETDEV_ENTRY
833*14e8a3c4SBeni Lev 		MESH_CFG_ENTRY
834*14e8a3c4SBeni Lev 		__field(u32, mask)
835*14e8a3c4SBeni Lev 	),
836*14e8a3c4SBeni Lev 	TP_fast_assign(
837*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
838*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
839*14e8a3c4SBeni Lev 		MESH_CFG_ASSIGN;
840*14e8a3c4SBeni Lev 		__entry->mask = mask;
841*14e8a3c4SBeni Lev 	),
842*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", mask: %u",
843*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
844*14e8a3c4SBeni Lev );
845*14e8a3c4SBeni Lev 
846*14e8a3c4SBeni Lev TRACE_EVENT(rdev_join_mesh,
847*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
848*14e8a3c4SBeni Lev 		 const struct mesh_config *conf,
849*14e8a3c4SBeni Lev 		 const struct mesh_setup *setup),
850*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, conf, setup),
851*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
852*14e8a3c4SBeni Lev 		WIPHY_ENTRY
853*14e8a3c4SBeni Lev 		NETDEV_ENTRY
854*14e8a3c4SBeni Lev 		MESH_CFG_ENTRY
855*14e8a3c4SBeni Lev 	),
856*14e8a3c4SBeni Lev 	TP_fast_assign(
857*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
858*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
859*14e8a3c4SBeni Lev 		MESH_CFG_ASSIGN;
860*14e8a3c4SBeni Lev 	),
861*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT,
862*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG)
863*14e8a3c4SBeni Lev );
864*14e8a3c4SBeni Lev 
865*14e8a3c4SBeni Lev TRACE_EVENT(rdev_change_bss,
866*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
867*14e8a3c4SBeni Lev 		 struct bss_parameters *params),
868*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, params),
869*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
870*14e8a3c4SBeni Lev 		WIPHY_ENTRY
871*14e8a3c4SBeni Lev 		NETDEV_ENTRY
872*14e8a3c4SBeni Lev 		__field(int, use_cts_prot)
873*14e8a3c4SBeni Lev 		__field(int, use_short_preamble)
874*14e8a3c4SBeni Lev 		__field(int, use_short_slot_time)
875*14e8a3c4SBeni Lev 		__field(int, ap_isolate)
876*14e8a3c4SBeni Lev 		__field(int, ht_opmode)
877*14e8a3c4SBeni Lev 	),
878*14e8a3c4SBeni Lev 	TP_fast_assign(
879*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
880*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
881*14e8a3c4SBeni Lev 		__entry->use_cts_prot = params->use_cts_prot;
882*14e8a3c4SBeni Lev 		__entry->use_short_preamble = params->use_short_preamble;
883*14e8a3c4SBeni Lev 		__entry->use_short_slot_time = params->use_short_slot_time;
884*14e8a3c4SBeni Lev 		__entry->ap_isolate = params->ap_isolate;
885*14e8a3c4SBeni Lev 		__entry->ht_opmode = params->ht_opmode;
886*14e8a3c4SBeni Lev 	),
887*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", use cts prot: %d, "
888*14e8a3c4SBeni Lev 		  "use short preamble: %d, use short slot time: %d, "
889*14e8a3c4SBeni Lev 		  "ap isolate: %d, ht opmode: %d",
890*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot,
891*14e8a3c4SBeni Lev 		  __entry->use_short_preamble, __entry->use_short_slot_time,
892*14e8a3c4SBeni Lev 		  __entry->ap_isolate, __entry->ht_opmode)
893*14e8a3c4SBeni Lev );
894*14e8a3c4SBeni Lev 
895*14e8a3c4SBeni Lev TRACE_EVENT(rdev_set_txq_params,
896*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
897*14e8a3c4SBeni Lev 		 struct ieee80211_txq_params *params),
898*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, params),
899*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
900*14e8a3c4SBeni Lev 		WIPHY_ENTRY
901*14e8a3c4SBeni Lev 		NETDEV_ENTRY
902*14e8a3c4SBeni Lev 		__field(enum nl80211_ac, ac)
903*14e8a3c4SBeni Lev 		__field(u16, txop)
904*14e8a3c4SBeni Lev 		__field(u16, cwmin)
905*14e8a3c4SBeni Lev 		__field(u16, cwmax)
906*14e8a3c4SBeni Lev 		__field(u8, aifs)
907*14e8a3c4SBeni Lev 	),
908*14e8a3c4SBeni Lev 	TP_fast_assign(
909*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
910*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
911*14e8a3c4SBeni Lev 		__entry->ac = params->ac;
912*14e8a3c4SBeni Lev 		__entry->txop = params->txop;
913*14e8a3c4SBeni Lev 		__entry->cwmin = params->cwmin;
914*14e8a3c4SBeni Lev 		__entry->cwmax = params->cwmax;
915*14e8a3c4SBeni Lev 		__entry->aifs = params->aifs;
916*14e8a3c4SBeni Lev 	),
917*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u",
918*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop,
919*14e8a3c4SBeni Lev 		  __entry->cwmin, __entry->cwmax, __entry->aifs)
920*14e8a3c4SBeni Lev );
921*14e8a3c4SBeni Lev 
922*14e8a3c4SBeni Lev TRACE_EVENT(rdev_libertas_set_mesh_channel,
923*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
924*14e8a3c4SBeni Lev 		 struct ieee80211_channel *chan),
925*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, chan),
926*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
927*14e8a3c4SBeni Lev 		WIPHY_ENTRY
928*14e8a3c4SBeni Lev 		NETDEV_ENTRY
929*14e8a3c4SBeni Lev 		CHAN_ENTRY
930*14e8a3c4SBeni Lev 	),
931*14e8a3c4SBeni Lev 	TP_fast_assign(
932*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
933*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
934*14e8a3c4SBeni Lev 		CHAN_ASSIGN(chan);
935*14e8a3c4SBeni Lev 	),
936*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT CHAN_PR_FMT, WIPHY_PR_ARG,
937*14e8a3c4SBeni Lev 		  NETDEV_PR_ARG, CHAN_PR_ARG)
938*14e8a3c4SBeni Lev );
939*14e8a3c4SBeni Lev 
940*14e8a3c4SBeni Lev TRACE_EVENT(rdev_set_monitor_channel,
941*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *chan,
942*14e8a3c4SBeni Lev 		 enum nl80211_channel_type chan_type),
943*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, chan, chan_type),
944*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
945*14e8a3c4SBeni Lev 		WIPHY_ENTRY
946*14e8a3c4SBeni Lev 		CHAN_ENTRY
947*14e8a3c4SBeni Lev 		__field(enum nl80211_channel_type, chan_type)
948*14e8a3c4SBeni Lev 	),
949*14e8a3c4SBeni Lev 	TP_fast_assign(
950*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
951*14e8a3c4SBeni Lev 		CHAN_ASSIGN(chan);
952*14e8a3c4SBeni Lev 		__entry->chan_type = chan_type;
953*14e8a3c4SBeni Lev 	),
954*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT CHAN_PR_FMT ", channel type : %d",
955*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, CHAN_PR_ARG, __entry->chan_type)
956*14e8a3c4SBeni Lev );
957*14e8a3c4SBeni Lev 
958*14e8a3c4SBeni Lev TRACE_EVENT(rdev_auth,
959*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
960*14e8a3c4SBeni Lev 		 struct cfg80211_auth_request *req),
961*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, req),
962*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
963*14e8a3c4SBeni Lev 		WIPHY_ENTRY
964*14e8a3c4SBeni Lev 		NETDEV_ENTRY
965*14e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
966*14e8a3c4SBeni Lev 		__field(enum nl80211_auth_type, auth_type)
967*14e8a3c4SBeni Lev 	),
968*14e8a3c4SBeni Lev 	TP_fast_assign(
969*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
970*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
971*14e8a3c4SBeni Lev 		if (req->bss)
972*14e8a3c4SBeni Lev 			MAC_ASSIGN(bssid, req->bss->bssid);
973*14e8a3c4SBeni Lev 		else
974*14e8a3c4SBeni Lev 			memset(__entry->bssid, 0, ETH_ALEN);
975*14e8a3c4SBeni Lev 		__entry->auth_type = req->auth_type;
976*14e8a3c4SBeni Lev 	),
977*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT,
978*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type,
979*14e8a3c4SBeni Lev 		  MAC_PR_ARG(bssid))
980*14e8a3c4SBeni Lev );
981*14e8a3c4SBeni Lev 
982*14e8a3c4SBeni Lev TRACE_EVENT(rdev_assoc,
983*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
984*14e8a3c4SBeni Lev 		 struct cfg80211_assoc_request *req),
985*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, req),
986*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
987*14e8a3c4SBeni Lev 		WIPHY_ENTRY
988*14e8a3c4SBeni Lev 		NETDEV_ENTRY
989*14e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
990*14e8a3c4SBeni Lev 		MAC_ENTRY(prev_bssid)
991*14e8a3c4SBeni Lev 		__field(bool, use_mfp)
992*14e8a3c4SBeni Lev 		__field(u32, flags)
993*14e8a3c4SBeni Lev 	),
994*14e8a3c4SBeni Lev 	TP_fast_assign(
995*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
996*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
997*14e8a3c4SBeni Lev 		if (req->bss)
998*14e8a3c4SBeni Lev 			MAC_ASSIGN(bssid, req->bss->bssid);
999*14e8a3c4SBeni Lev 		else
1000*14e8a3c4SBeni Lev 			memset(__entry->bssid, 0, ETH_ALEN);
1001*14e8a3c4SBeni Lev 		MAC_ASSIGN(prev_bssid, req->prev_bssid);
1002*14e8a3c4SBeni Lev 		__entry->use_mfp = req->use_mfp;
1003*14e8a3c4SBeni Lev 		__entry->flags = req->flags;
1004*14e8a3c4SBeni Lev 	),
1005*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
1006*14e8a3c4SBeni Lev 		  ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u",
1007*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1008*14e8a3c4SBeni Lev 		  MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp),
1009*14e8a3c4SBeni Lev 		  __entry->flags)
1010*14e8a3c4SBeni Lev );
1011*14e8a3c4SBeni Lev 
1012*14e8a3c4SBeni Lev TRACE_EVENT(rdev_deauth,
1013*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1014*14e8a3c4SBeni Lev 		 struct cfg80211_deauth_request *req),
1015*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, req),
1016*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1017*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1018*14e8a3c4SBeni Lev 		NETDEV_ENTRY
1019*14e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
1020*14e8a3c4SBeni Lev 		__field(u16, reason_code)
1021*14e8a3c4SBeni Lev 	),
1022*14e8a3c4SBeni Lev 	TP_fast_assign(
1023*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1024*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1025*14e8a3c4SBeni Lev 		MAC_ASSIGN(bssid, req->bssid);
1026*14e8a3c4SBeni Lev 		__entry->reason_code = req->reason_code;
1027*14e8a3c4SBeni Lev 	),
1028*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u",
1029*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1030*14e8a3c4SBeni Lev 		  __entry->reason_code)
1031*14e8a3c4SBeni Lev );
1032*14e8a3c4SBeni Lev 
1033*14e8a3c4SBeni Lev TRACE_EVENT(rdev_disassoc,
1034*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1035*14e8a3c4SBeni Lev 		 struct cfg80211_disassoc_request *req),
1036*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, req),
1037*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1038*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1039*14e8a3c4SBeni Lev 		NETDEV_ENTRY
1040*14e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
1041*14e8a3c4SBeni Lev 		__field(u16, reason_code)
1042*14e8a3c4SBeni Lev 		__field(bool, local_state_change)
1043*14e8a3c4SBeni Lev 	),
1044*14e8a3c4SBeni Lev 	TP_fast_assign(
1045*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1046*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1047*14e8a3c4SBeni Lev 		if (req->bss)
1048*14e8a3c4SBeni Lev 			MAC_ASSIGN(bssid, req->bss->bssid);
1049*14e8a3c4SBeni Lev 		else
1050*14e8a3c4SBeni Lev 			memset(__entry->bssid, 0, ETH_ALEN);
1051*14e8a3c4SBeni Lev 		__entry->reason_code = req->reason_code;
1052*14e8a3c4SBeni Lev 		__entry->local_state_change = req->local_state_change;
1053*14e8a3c4SBeni Lev 	),
1054*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
1055*14e8a3c4SBeni Lev 		  ", reason: %u, local state change: %s",
1056*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1057*14e8a3c4SBeni Lev 		  __entry->reason_code,
1058*14e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->local_state_change))
1059*14e8a3c4SBeni Lev );
1060*14e8a3c4SBeni Lev 
1061*14e8a3c4SBeni Lev TRACE_EVENT(rdev_mgmt_tx_cancel_wait,
1062*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy,
1063*14e8a3c4SBeni Lev 		 struct wireless_dev *wdev, u64 cookie),
1064*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev, cookie),
1065*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1066*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1067*14e8a3c4SBeni Lev 		WDEV_ENTRY
1068*14e8a3c4SBeni Lev 		__field(u64, cookie)
1069*14e8a3c4SBeni Lev 	),
1070*14e8a3c4SBeni Lev 	TP_fast_assign(
1071*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1072*14e8a3c4SBeni Lev 		WDEV_ASSIGN;
1073*14e8a3c4SBeni Lev 		__entry->cookie = cookie;
1074*14e8a3c4SBeni Lev 	),
1075*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT WDEV_PR_FMT ", cookie: %llu ",
1076*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1077*14e8a3c4SBeni Lev );
1078*14e8a3c4SBeni Lev 
1079*14e8a3c4SBeni Lev TRACE_EVENT(rdev_set_power_mgmt,
1080*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1081*14e8a3c4SBeni Lev 		 bool enabled, int timeout),
1082*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, enabled, timeout),
1083*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1084*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1085*14e8a3c4SBeni Lev 		NETDEV_ENTRY
1086*14e8a3c4SBeni Lev 		__field(bool, enabled)
1087*14e8a3c4SBeni Lev 		__field(int, timeout)
1088*14e8a3c4SBeni Lev 	),
1089*14e8a3c4SBeni Lev 	TP_fast_assign(
1090*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1091*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1092*14e8a3c4SBeni Lev 		__entry->enabled = enabled;
1093*14e8a3c4SBeni Lev 		__entry->timeout = timeout;
1094*14e8a3c4SBeni Lev 	),
1095*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", %senabled, timeout: %d ",
1096*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG,
1097*14e8a3c4SBeni Lev 		  __entry->enabled ? "" : "not ", __entry->timeout)
1098*14e8a3c4SBeni Lev );
1099*14e8a3c4SBeni Lev 
1100*14e8a3c4SBeni Lev TRACE_EVENT(rdev_connect,
1101*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1102*14e8a3c4SBeni Lev 		 struct cfg80211_connect_params *sme),
1103*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, sme),
1104*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1105*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1106*14e8a3c4SBeni Lev 		NETDEV_ENTRY
1107*14e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
1108*14e8a3c4SBeni Lev 		__array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1109*14e8a3c4SBeni Lev 		__field(enum nl80211_auth_type, auth_type)
1110*14e8a3c4SBeni Lev 		__field(bool, privacy)
1111*14e8a3c4SBeni Lev 		__field(u32, wpa_versions)
1112*14e8a3c4SBeni Lev 		__field(u32, flags)
1113*14e8a3c4SBeni Lev 	),
1114*14e8a3c4SBeni Lev 	TP_fast_assign(
1115*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1116*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1117*14e8a3c4SBeni Lev 		MAC_ASSIGN(bssid, sme->bssid);
1118*14e8a3c4SBeni Lev 		memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1119*14e8a3c4SBeni Lev 		memcpy(__entry->ssid, sme->ssid, sme->ssid_len);
1120*14e8a3c4SBeni Lev 		__entry->auth_type = sme->auth_type;
1121*14e8a3c4SBeni Lev 		__entry->privacy = sme->privacy;
1122*14e8a3c4SBeni Lev 		__entry->wpa_versions = sme->crypto.wpa_versions;
1123*14e8a3c4SBeni Lev 		__entry->flags = sme->flags;
1124*14e8a3c4SBeni Lev 	),
1125*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
1126*14e8a3c4SBeni Lev 		  ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
1127*14e8a3c4SBeni Lev 		  "flags: %u",
1128*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid,
1129*14e8a3c4SBeni Lev 		  __entry->auth_type, BOOL_TO_STR(__entry->privacy),
1130*14e8a3c4SBeni Lev 		  __entry->wpa_versions, __entry->flags)
1131*14e8a3c4SBeni Lev );
1132*14e8a3c4SBeni Lev 
1133*14e8a3c4SBeni Lev TRACE_EVENT(rdev_set_cqm_rssi_config,
1134*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy,
1135*14e8a3c4SBeni Lev 		 struct net_device *netdev, s32 rssi_thold,
1136*14e8a3c4SBeni Lev 		 u32 rssi_hyst),
1137*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
1138*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1139*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1140*14e8a3c4SBeni Lev 		NETDEV_ENTRY
1141*14e8a3c4SBeni Lev 		__field(s32, rssi_thold)
1142*14e8a3c4SBeni Lev 		__field(u32, rssi_hyst)
1143*14e8a3c4SBeni Lev 	),
1144*14e8a3c4SBeni Lev 	TP_fast_assign(
1145*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1146*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1147*14e8a3c4SBeni Lev 		__entry->rssi_thold = rssi_thold;
1148*14e8a3c4SBeni Lev 		__entry->rssi_hyst = rssi_hyst;
1149*14e8a3c4SBeni Lev 	),
1150*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT
1151*14e8a3c4SBeni Lev 		  ", rssi_thold: %d, rssi_hyst: %u ",
1152*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG,
1153*14e8a3c4SBeni Lev 		 __entry->rssi_thold, __entry->rssi_hyst)
1154*14e8a3c4SBeni Lev );
1155*14e8a3c4SBeni Lev 
1156*14e8a3c4SBeni Lev TRACE_EVENT(rdev_set_cqm_txe_config,
1157*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
1158*14e8a3c4SBeni Lev 		 u32 pkts, u32 intvl),
1159*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, rate, pkts, intvl),
1160*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1161*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1162*14e8a3c4SBeni Lev 		NETDEV_ENTRY
1163*14e8a3c4SBeni Lev 		__field(u32, rate)
1164*14e8a3c4SBeni Lev 		__field(u32, pkts)
1165*14e8a3c4SBeni Lev 		__field(u32, intvl)
1166*14e8a3c4SBeni Lev 	),
1167*14e8a3c4SBeni Lev 	TP_fast_assign(
1168*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1169*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1170*14e8a3c4SBeni Lev 		__entry->rate = rate;
1171*14e8a3c4SBeni Lev 		__entry->pkts = pkts;
1172*14e8a3c4SBeni Lev 		__entry->intvl = intvl;
1173*14e8a3c4SBeni Lev 	),
1174*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
1175*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
1176*14e8a3c4SBeni Lev 		  __entry->intvl)
1177*14e8a3c4SBeni Lev );
1178*14e8a3c4SBeni Lev 
1179*14e8a3c4SBeni Lev TRACE_EVENT(rdev_disconnect,
1180*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1181*14e8a3c4SBeni Lev 		 u16 reason_code),
1182*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, reason_code),
1183*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1184*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1185*14e8a3c4SBeni Lev 		NETDEV_ENTRY
1186*14e8a3c4SBeni Lev 		__field(u16, reason_code)
1187*14e8a3c4SBeni Lev 	),
1188*14e8a3c4SBeni Lev 	TP_fast_assign(
1189*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1190*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1191*14e8a3c4SBeni Lev 		__entry->reason_code = reason_code;
1192*14e8a3c4SBeni Lev 	),
1193*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
1194*14e8a3c4SBeni Lev 		  NETDEV_PR_ARG, __entry->reason_code)
1195*14e8a3c4SBeni Lev );
1196*14e8a3c4SBeni Lev 
1197*14e8a3c4SBeni Lev TRACE_EVENT(rdev_join_ibss,
1198*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1199*14e8a3c4SBeni Lev 		 struct cfg80211_ibss_params *params),
1200*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, params),
1201*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1202*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1203*14e8a3c4SBeni Lev 		NETDEV_ENTRY
1204*14e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
1205*14e8a3c4SBeni Lev 		__array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1206*14e8a3c4SBeni Lev 	),
1207*14e8a3c4SBeni Lev 	TP_fast_assign(
1208*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1209*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1210*14e8a3c4SBeni Lev 		MAC_ASSIGN(bssid, params->bssid);
1211*14e8a3c4SBeni Lev 		memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1212*14e8a3c4SBeni Lev 		memcpy(__entry->ssid, params->ssid, params->ssid_len);
1213*14e8a3c4SBeni Lev 	),
1214*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s",
1215*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid)
1216*14e8a3c4SBeni Lev );
1217*14e8a3c4SBeni Lev 
1218*14e8a3c4SBeni Lev TRACE_EVENT(rdev_set_wiphy_params,
1219*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, u32 changed),
1220*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, changed),
1221*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1222*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1223*14e8a3c4SBeni Lev 		__field(u32, changed)
1224*14e8a3c4SBeni Lev 	),
1225*14e8a3c4SBeni Lev 	TP_fast_assign(
1226*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1227*14e8a3c4SBeni Lev 		__entry->changed = changed;
1228*14e8a3c4SBeni Lev 	),
1229*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", changed: %u",
1230*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->changed)
1231*14e8a3c4SBeni Lev );
1232*14e8a3c4SBeni Lev 
1233*14e8a3c4SBeni Lev TRACE_EVENT(rdev_set_tx_power,
1234*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, enum nl80211_tx_power_setting type,
1235*14e8a3c4SBeni Lev 		 int mbm),
1236*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, type, mbm),
1237*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1238*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1239*14e8a3c4SBeni Lev 		__field(enum nl80211_tx_power_setting, type)
1240*14e8a3c4SBeni Lev 		__field(int, mbm)
1241*14e8a3c4SBeni Lev 	),
1242*14e8a3c4SBeni Lev 	TP_fast_assign(
1243*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1244*14e8a3c4SBeni Lev 		__entry->type = type;
1245*14e8a3c4SBeni Lev 		__entry->mbm = mbm;
1246*14e8a3c4SBeni Lev 	),
1247*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", type: %d, mbm: %d",
1248*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->type, __entry->mbm)
1249*14e8a3c4SBeni Lev );
1250*14e8a3c4SBeni Lev 
1251*14e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_int,
1252*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
1253*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, func_ret, func_fill),
1254*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1255*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1256*14e8a3c4SBeni Lev 		__field(int, func_ret)
1257*14e8a3c4SBeni Lev 		__field(int, func_fill)
1258*14e8a3c4SBeni Lev 	),
1259*14e8a3c4SBeni Lev 	TP_fast_assign(
1260*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1261*14e8a3c4SBeni Lev 		__entry->func_ret = func_ret;
1262*14e8a3c4SBeni Lev 		__entry->func_fill = func_fill;
1263*14e8a3c4SBeni Lev 	),
1264*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
1265*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
1266*14e8a3c4SBeni Lev );
1267*14e8a3c4SBeni Lev 
1268*14e8a3c4SBeni Lev #ifdef CONFIG_NL80211_TESTMODE
1269*14e8a3c4SBeni Lev TRACE_EVENT(rdev_testmode_cmd,
1270*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
1271*14e8a3c4SBeni Lev 	TP_ARGS(wiphy),
1272*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1273*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1274*14e8a3c4SBeni Lev 	),
1275*14e8a3c4SBeni Lev 	TP_fast_assign(
1276*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1277*14e8a3c4SBeni Lev 	),
1278*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
1279*14e8a3c4SBeni Lev );
1280*14e8a3c4SBeni Lev 
1281*14e8a3c4SBeni Lev TRACE_EVENT(rdev_testmode_dump,
1282*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy),
1283*14e8a3c4SBeni Lev 	TP_ARGS(wiphy),
1284*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1285*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1286*14e8a3c4SBeni Lev 	),
1287*14e8a3c4SBeni Lev 	TP_fast_assign(
1288*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1289*14e8a3c4SBeni Lev 	),
1290*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
1291*14e8a3c4SBeni Lev );
1292*14e8a3c4SBeni Lev #endif /* CONFIG_NL80211_TESTMODE */
1293*14e8a3c4SBeni Lev 
1294*14e8a3c4SBeni Lev TRACE_EVENT(rdev_set_bitrate_mask,
1295*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1296*14e8a3c4SBeni Lev 		 const u8 *peer, const struct cfg80211_bitrate_mask *mask),
1297*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, peer, mask),
1298*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1299*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1300*14e8a3c4SBeni Lev 		NETDEV_ENTRY
1301*14e8a3c4SBeni Lev 		MAC_ENTRY(peer)
1302*14e8a3c4SBeni Lev 	),
1303*14e8a3c4SBeni Lev 	TP_fast_assign(
1304*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1305*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1306*14e8a3c4SBeni Lev 		MAC_ASSIGN(peer, peer);
1307*14e8a3c4SBeni Lev 	),
1308*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
1309*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1310*14e8a3c4SBeni Lev );
1311*14e8a3c4SBeni Lev 
1312*14e8a3c4SBeni Lev TRACE_EVENT(rdev_mgmt_frame_register,
1313*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1314*14e8a3c4SBeni Lev 		 u16 frame_type, bool reg),
1315*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev, frame_type, reg),
1316*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1317*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1318*14e8a3c4SBeni Lev 		WDEV_ENTRY
1319*14e8a3c4SBeni Lev 		__field(u16, frame_type)
1320*14e8a3c4SBeni Lev 		__field(bool, reg)
1321*14e8a3c4SBeni Lev 	),
1322*14e8a3c4SBeni Lev 	TP_fast_assign(
1323*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1324*14e8a3c4SBeni Lev 		WDEV_ASSIGN;
1325*14e8a3c4SBeni Lev 		__entry->frame_type = frame_type;
1326*14e8a3c4SBeni Lev 		__entry->reg = reg;
1327*14e8a3c4SBeni Lev 	),
1328*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT WDEV_PR_FMT ", frame_type: %u, reg: %s ",
1329*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->frame_type,
1330*14e8a3c4SBeni Lev 		  __entry->reg ? "true" : "false")
1331*14e8a3c4SBeni Lev );
1332*14e8a3c4SBeni Lev 
1333*14e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_tx_rx,
1334*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
1335*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret, tx, rx),
1336*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1337*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1338*14e8a3c4SBeni Lev 		__field(int, ret)
1339*14e8a3c4SBeni Lev 		__field(u32, tx)
1340*14e8a3c4SBeni Lev 		__field(u32, rx)
1341*14e8a3c4SBeni Lev 	),
1342*14e8a3c4SBeni Lev 	TP_fast_assign(
1343*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1344*14e8a3c4SBeni Lev 		__entry->ret = ret;
1345*14e8a3c4SBeni Lev 		__entry->tx = tx;
1346*14e8a3c4SBeni Lev 		__entry->rx = rx;
1347*14e8a3c4SBeni Lev 	),
1348*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
1349*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
1350*14e8a3c4SBeni Lev );
1351*14e8a3c4SBeni Lev 
1352*14e8a3c4SBeni Lev TRACE_EVENT(rdev_return_void_tx_rx,
1353*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
1354*14e8a3c4SBeni Lev 		 u32 rx, u32 rx_max),
1355*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
1356*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1357*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1358*14e8a3c4SBeni Lev 		__field(u32, tx)
1359*14e8a3c4SBeni Lev 		__field(u32, tx_max)
1360*14e8a3c4SBeni Lev 		__field(u32, rx)
1361*14e8a3c4SBeni Lev 		__field(u32, rx_max)
1362*14e8a3c4SBeni Lev 	),
1363*14e8a3c4SBeni Lev 	TP_fast_assign(
1364*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1365*14e8a3c4SBeni Lev 		__entry->tx = tx;
1366*14e8a3c4SBeni Lev 		__entry->tx_max = tx_max;
1367*14e8a3c4SBeni Lev 		__entry->rx = rx;
1368*14e8a3c4SBeni Lev 		__entry->rx_max = rx_max;
1369*14e8a3c4SBeni Lev 	),
1370*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
1371*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
1372*14e8a3c4SBeni Lev 		  __entry->rx_max)
1373*14e8a3c4SBeni Lev );
1374*14e8a3c4SBeni Lev 
1375*14e8a3c4SBeni Lev DECLARE_EVENT_CLASS(tx_rx_evt,
1376*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1377*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, rx, tx),
1378*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1379*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1380*14e8a3c4SBeni Lev 		__field(u32, tx)
1381*14e8a3c4SBeni Lev 		__field(u32, rx)
1382*14e8a3c4SBeni Lev 	),
1383*14e8a3c4SBeni Lev 	TP_fast_assign(
1384*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1385*14e8a3c4SBeni Lev 		__entry->tx = tx;
1386*14e8a3c4SBeni Lev 		__entry->rx = rx;
1387*14e8a3c4SBeni Lev 	),
1388*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
1389*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->tx, __entry->rx)
1390*14e8a3c4SBeni Lev );
1391*14e8a3c4SBeni Lev 
1392*14e8a3c4SBeni Lev DEFINE_EVENT(tx_rx_evt, rdev_set_ringparam,
1393*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1394*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, rx, tx)
1395*14e8a3c4SBeni Lev );
1396*14e8a3c4SBeni Lev 
1397*14e8a3c4SBeni Lev DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
1398*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1399*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, rx, tx)
1400*14e8a3c4SBeni Lev );
1401*14e8a3c4SBeni Lev 
1402*14e8a3c4SBeni Lev TRACE_EVENT(rdev_sched_scan_start,
1403*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1404*14e8a3c4SBeni Lev 		 struct cfg80211_sched_scan_request *request),
1405*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, request),
1406*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1407*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1408*14e8a3c4SBeni Lev 		NETDEV_ENTRY
1409*14e8a3c4SBeni Lev 	),
1410*14e8a3c4SBeni Lev 	TP_fast_assign(
1411*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1412*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1413*14e8a3c4SBeni Lev 	),
1414*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT,
1415*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG)
1416*14e8a3c4SBeni Lev );
1417*14e8a3c4SBeni Lev 
1418*14e8a3c4SBeni Lev TRACE_EVENT(rdev_tdls_mgmt,
1419*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1420*14e8a3c4SBeni Lev 		 u8 *peer, u8 action_code, u8 dialog_token,
1421*14e8a3c4SBeni Lev 		 u16 status_code, const u8 *buf, size_t len),
1422*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
1423*14e8a3c4SBeni Lev 		buf, len),
1424*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1425*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1426*14e8a3c4SBeni Lev 		NETDEV_ENTRY
1427*14e8a3c4SBeni Lev 		MAC_ENTRY(peer)
1428*14e8a3c4SBeni Lev 		__field(u8, action_code)
1429*14e8a3c4SBeni Lev 		__field(u8, dialog_token)
1430*14e8a3c4SBeni Lev 		__field(u16, status_code)
1431*14e8a3c4SBeni Lev 		__dynamic_array(u8, buf, len)
1432*14e8a3c4SBeni Lev 	),
1433*14e8a3c4SBeni Lev 	TP_fast_assign(
1434*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1435*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1436*14e8a3c4SBeni Lev 		MAC_ASSIGN(peer, peer);
1437*14e8a3c4SBeni Lev 		__entry->action_code = action_code;
1438*14e8a3c4SBeni Lev 		__entry->dialog_token = dialog_token;
1439*14e8a3c4SBeni Lev 		__entry->status_code = status_code;
1440*14e8a3c4SBeni Lev 		memcpy(__get_dynamic_array(buf), buf, len);
1441*14e8a3c4SBeni Lev 	),
1442*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT MAC_PR_FMT ", action_code: %u, "
1443*14e8a3c4SBeni Lev 		  "dialog_token: %u, status_code: %u, buf: %#.2x ",
1444*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
1445*14e8a3c4SBeni Lev 		  __entry->action_code, __entry->dialog_token,
1446*14e8a3c4SBeni Lev 		  __entry->status_code, ((u8 *)__get_dynamic_array(buf))[0])
1447*14e8a3c4SBeni Lev );
1448*14e8a3c4SBeni Lev 
1449*14e8a3c4SBeni Lev TRACE_EVENT(rdev_dump_survey,
1450*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx),
1451*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, idx),
1452*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1453*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1454*14e8a3c4SBeni Lev 		NETDEV_ENTRY
1455*14e8a3c4SBeni Lev 		__field(int, idx)
1456*14e8a3c4SBeni Lev 	),
1457*14e8a3c4SBeni Lev 	TP_fast_assign(
1458*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1459*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1460*14e8a3c4SBeni Lev 		__entry->idx = idx;
1461*14e8a3c4SBeni Lev 	),
1462*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", index: %d",
1463*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
1464*14e8a3c4SBeni Lev );
1465*14e8a3c4SBeni Lev 
1466*14e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_survey_info,
1467*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
1468*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret, info),
1469*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1470*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1471*14e8a3c4SBeni Lev 		CHAN_ENTRY
1472*14e8a3c4SBeni Lev 		__field(int, ret)
1473*14e8a3c4SBeni Lev 		__field(u64, channel_time)
1474*14e8a3c4SBeni Lev 		__field(u64, channel_time_busy)
1475*14e8a3c4SBeni Lev 		__field(u64, channel_time_ext_busy)
1476*14e8a3c4SBeni Lev 		__field(u64, channel_time_rx)
1477*14e8a3c4SBeni Lev 		__field(u64, channel_time_tx)
1478*14e8a3c4SBeni Lev 		__field(u32, filled)
1479*14e8a3c4SBeni Lev 		__field(s8, noise)
1480*14e8a3c4SBeni Lev 	),
1481*14e8a3c4SBeni Lev 	TP_fast_assign(
1482*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1483*14e8a3c4SBeni Lev 		CHAN_ASSIGN(info->channel);
1484*14e8a3c4SBeni Lev 		__entry->ret = ret;
1485*14e8a3c4SBeni Lev 		__entry->channel_time = info->channel_time;
1486*14e8a3c4SBeni Lev 		__entry->channel_time_busy = info->channel_time_busy;
1487*14e8a3c4SBeni Lev 		__entry->channel_time_ext_busy = info->channel_time_ext_busy;
1488*14e8a3c4SBeni Lev 		__entry->channel_time_rx = info->channel_time_rx;
1489*14e8a3c4SBeni Lev 		__entry->channel_time_tx = info->channel_time_tx;
1490*14e8a3c4SBeni Lev 		__entry->filled = info->filled;
1491*14e8a3c4SBeni Lev 		__entry->noise = info->noise;
1492*14e8a3c4SBeni Lev 	),
1493*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
1494*14e8a3c4SBeni Lev 		  ", channel time: %llu, channel time busy: %llu, "
1495*14e8a3c4SBeni Lev 		  "channel time extension busy: %llu, channel time rx: %llu, "
1496*14e8a3c4SBeni Lev 		  "channel time tx: %llu, filled: %u, noise: %d",
1497*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
1498*14e8a3c4SBeni Lev 		  __entry->channel_time, __entry->channel_time_busy,
1499*14e8a3c4SBeni Lev 		  __entry->channel_time_ext_busy, __entry->channel_time_rx,
1500*14e8a3c4SBeni Lev 		  __entry->channel_time_tx, __entry->filled, __entry->noise)
1501*14e8a3c4SBeni Lev );
1502*14e8a3c4SBeni Lev 
1503*14e8a3c4SBeni Lev TRACE_EVENT(rdev_tdls_oper,
1504*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1505*14e8a3c4SBeni Lev 		 u8 *peer, enum nl80211_tdls_operation oper),
1506*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, peer, oper),
1507*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1508*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1509*14e8a3c4SBeni Lev 		NETDEV_ENTRY
1510*14e8a3c4SBeni Lev 		MAC_ENTRY(peer)
1511*14e8a3c4SBeni Lev 		__field(enum nl80211_tdls_operation, oper)
1512*14e8a3c4SBeni Lev 	),
1513*14e8a3c4SBeni Lev 	TP_fast_assign(
1514*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1515*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1516*14e8a3c4SBeni Lev 		MAC_ASSIGN(peer, peer);
1517*14e8a3c4SBeni Lev 		__entry->oper = oper;
1518*14e8a3c4SBeni Lev 	),
1519*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT MAC_PR_FMT ", oper: %d",
1520*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
1521*14e8a3c4SBeni Lev );
1522*14e8a3c4SBeni Lev 
1523*14e8a3c4SBeni Lev DECLARE_EVENT_CLASS(rdev_pmksa,
1524*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1525*14e8a3c4SBeni Lev 		 struct cfg80211_pmksa *pmksa),
1526*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, pmksa),
1527*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1528*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1529*14e8a3c4SBeni Lev 		NETDEV_ENTRY
1530*14e8a3c4SBeni Lev 		MAC_ENTRY(bssid)
1531*14e8a3c4SBeni Lev 	),
1532*14e8a3c4SBeni Lev 	TP_fast_assign(
1533*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1534*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1535*14e8a3c4SBeni Lev 		MAC_ASSIGN(bssid, pmksa->bssid);
1536*14e8a3c4SBeni Lev 	),
1537*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
1538*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
1539*14e8a3c4SBeni Lev );
1540*14e8a3c4SBeni Lev 
1541*14e8a3c4SBeni Lev TRACE_EVENT(rdev_probe_client,
1542*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1543*14e8a3c4SBeni Lev 		 const u8 *peer),
1544*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, peer),
1545*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1546*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1547*14e8a3c4SBeni Lev 		NETDEV_ENTRY
1548*14e8a3c4SBeni Lev 		MAC_ENTRY(peer)
1549*14e8a3c4SBeni Lev 	),
1550*14e8a3c4SBeni Lev 	TP_fast_assign(
1551*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1552*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1553*14e8a3c4SBeni Lev 		MAC_ASSIGN(peer, peer);
1554*14e8a3c4SBeni Lev 	),
1555*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT MAC_PR_FMT,
1556*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1557*14e8a3c4SBeni Lev );
1558*14e8a3c4SBeni Lev 
1559*14e8a3c4SBeni Lev DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
1560*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1561*14e8a3c4SBeni Lev 		 struct cfg80211_pmksa *pmksa),
1562*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, pmksa)
1563*14e8a3c4SBeni Lev );
1564*14e8a3c4SBeni Lev 
1565*14e8a3c4SBeni Lev DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
1566*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1567*14e8a3c4SBeni Lev 		 struct cfg80211_pmksa *pmksa),
1568*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, pmksa)
1569*14e8a3c4SBeni Lev );
1570*14e8a3c4SBeni Lev 
1571*14e8a3c4SBeni Lev TRACE_EVENT(rdev_remain_on_channel,
1572*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1573*14e8a3c4SBeni Lev 		 struct ieee80211_channel *chan,
1574*14e8a3c4SBeni Lev 		 enum nl80211_channel_type channel_type, unsigned int duration),
1575*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev, chan, channel_type, duration),
1576*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1577*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1578*14e8a3c4SBeni Lev 		WDEV_ENTRY
1579*14e8a3c4SBeni Lev 		CHAN_ENTRY
1580*14e8a3c4SBeni Lev 		__field(enum nl80211_channel_type, channel_type)
1581*14e8a3c4SBeni Lev 		__field(unsigned int, duration)
1582*14e8a3c4SBeni Lev 	),
1583*14e8a3c4SBeni Lev 	TP_fast_assign(
1584*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1585*14e8a3c4SBeni Lev 		WDEV_ASSIGN;
1586*14e8a3c4SBeni Lev 		CHAN_ASSIGN(chan);
1587*14e8a3c4SBeni Lev 		__entry->channel_type = channel_type;
1588*14e8a3c4SBeni Lev 		__entry->duration = duration;
1589*14e8a3c4SBeni Lev 	),
1590*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT WDEV_PR_FMT CHAN_PR_FMT ", channel type: %d, duration: %u",
1591*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->channel_type,
1592*14e8a3c4SBeni Lev 		  __entry->duration)
1593*14e8a3c4SBeni Lev );
1594*14e8a3c4SBeni Lev 
1595*14e8a3c4SBeni Lev TRACE_EVENT(rdev_return_int_cookie,
1596*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
1597*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, ret, cookie),
1598*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1599*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1600*14e8a3c4SBeni Lev 		__field(int, ret)
1601*14e8a3c4SBeni Lev 		__field(u64, cookie)
1602*14e8a3c4SBeni Lev 	),
1603*14e8a3c4SBeni Lev 	TP_fast_assign(
1604*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1605*14e8a3c4SBeni Lev 		__entry->ret = ret;
1606*14e8a3c4SBeni Lev 		__entry->cookie = cookie;
1607*14e8a3c4SBeni Lev 	),
1608*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
1609*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, __entry->ret, __entry->cookie)
1610*14e8a3c4SBeni Lev );
1611*14e8a3c4SBeni Lev 
1612*14e8a3c4SBeni Lev TRACE_EVENT(rdev_cancel_remain_on_channel,
1613*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
1614*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev, cookie),
1615*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1616*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1617*14e8a3c4SBeni Lev 		WDEV_ENTRY
1618*14e8a3c4SBeni Lev 		__field(u64, cookie)
1619*14e8a3c4SBeni Lev 	),
1620*14e8a3c4SBeni Lev 	TP_fast_assign(
1621*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1622*14e8a3c4SBeni Lev 		WDEV_ASSIGN;
1623*14e8a3c4SBeni Lev 		__entry->cookie = cookie;
1624*14e8a3c4SBeni Lev 	),
1625*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT WDEV_PR_FMT ", cookie: %llu",
1626*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1627*14e8a3c4SBeni Lev );
1628*14e8a3c4SBeni Lev 
1629*14e8a3c4SBeni Lev TRACE_EVENT(rdev_mgmt_tx,
1630*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1631*14e8a3c4SBeni Lev 		 struct ieee80211_channel *chan, bool offchan,
1632*14e8a3c4SBeni Lev 		 enum nl80211_channel_type channel_type,
1633*14e8a3c4SBeni Lev 		 bool channel_type_valid, unsigned int wait, bool no_cck,
1634*14e8a3c4SBeni Lev 		 bool dont_wait_for_ack),
1635*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev, chan, offchan, channel_type, channel_type_valid,
1636*14e8a3c4SBeni Lev 		wait, no_cck, dont_wait_for_ack),
1637*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1638*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1639*14e8a3c4SBeni Lev 		WDEV_ENTRY
1640*14e8a3c4SBeni Lev 		CHAN_ENTRY
1641*14e8a3c4SBeni Lev 		__field(bool, offchan)
1642*14e8a3c4SBeni Lev 		__field(enum nl80211_channel_type, channel_type)
1643*14e8a3c4SBeni Lev 		__field(bool, channel_type_valid)
1644*14e8a3c4SBeni Lev 		__field(unsigned int, wait)
1645*14e8a3c4SBeni Lev 		__field(bool, no_cck)
1646*14e8a3c4SBeni Lev 		__field(bool, dont_wait_for_ack)
1647*14e8a3c4SBeni Lev 	),
1648*14e8a3c4SBeni Lev 	TP_fast_assign(
1649*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1650*14e8a3c4SBeni Lev 		WDEV_ASSIGN;
1651*14e8a3c4SBeni Lev 		CHAN_ASSIGN(chan);
1652*14e8a3c4SBeni Lev 		__entry->offchan = offchan;
1653*14e8a3c4SBeni Lev 		__entry->channel_type = channel_type;
1654*14e8a3c4SBeni Lev 		__entry->channel_type_valid = channel_type_valid;
1655*14e8a3c4SBeni Lev 		__entry->wait = wait;
1656*14e8a3c4SBeni Lev 		__entry->no_cck = no_cck;
1657*14e8a3c4SBeni Lev 		__entry->dont_wait_for_ack = dont_wait_for_ack;
1658*14e8a3c4SBeni Lev 	),
1659*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT WDEV_PR_FMT CHAN_PR_FMT ", offchan: %s, "
1660*14e8a3c4SBeni Lev 		  "channel type: %d, channel type valid: %s, wait: %u, "
1661*14e8a3c4SBeni Lev 		  "no cck: %s, dont wait for ack: %s",
1662*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
1663*14e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->offchan), __entry->channel_type,
1664*14e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->channel_type_valid), __entry->wait,
1665*14e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->no_cck),
1666*14e8a3c4SBeni Lev 		  BOOL_TO_STR(__entry->dont_wait_for_ack))
1667*14e8a3c4SBeni Lev );
1668*14e8a3c4SBeni Lev 
1669*14e8a3c4SBeni Lev TRACE_EVENT(rdev_set_noack_map,
1670*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1671*14e8a3c4SBeni Lev 		 u16 noack_map),
1672*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, noack_map),
1673*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1674*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1675*14e8a3c4SBeni Lev 		NETDEV_ENTRY
1676*14e8a3c4SBeni Lev 		__field(u16, noack_map)
1677*14e8a3c4SBeni Lev 	),
1678*14e8a3c4SBeni Lev 	TP_fast_assign(
1679*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1680*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1681*14e8a3c4SBeni Lev 		__entry->noack_map = noack_map;
1682*14e8a3c4SBeni Lev 	),
1683*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", noack_map: %u",
1684*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
1685*14e8a3c4SBeni Lev );
1686*14e8a3c4SBeni Lev 
1687*14e8a3c4SBeni Lev TRACE_EVENT(rdev_get_et_sset_count,
1688*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int sset),
1689*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, sset),
1690*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1691*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1692*14e8a3c4SBeni Lev 		NETDEV_ENTRY
1693*14e8a3c4SBeni Lev 		__field(int, sset)
1694*14e8a3c4SBeni Lev 	),
1695*14e8a3c4SBeni Lev 	TP_fast_assign(
1696*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1697*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1698*14e8a3c4SBeni Lev 		__entry->sset = sset;
1699*14e8a3c4SBeni Lev 	),
1700*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", sset: %d",
1701*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sset)
1702*14e8a3c4SBeni Lev );
1703*14e8a3c4SBeni Lev 
1704*14e8a3c4SBeni Lev TRACE_EVENT(rdev_get_et_strings,
1705*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 sset),
1706*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, netdev, sset),
1707*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1708*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1709*14e8a3c4SBeni Lev 		NETDEV_ENTRY
1710*14e8a3c4SBeni Lev 		__field(u32, sset)
1711*14e8a3c4SBeni Lev 	),
1712*14e8a3c4SBeni Lev 	TP_fast_assign(
1713*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1714*14e8a3c4SBeni Lev 		NETDEV_ASSIGN;
1715*14e8a3c4SBeni Lev 		__entry->sset = sset;
1716*14e8a3c4SBeni Lev 	),
1717*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", sset: %u",
1718*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sset)
1719*14e8a3c4SBeni Lev );
1720*14e8a3c4SBeni Lev 
1721*14e8a3c4SBeni Lev DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel,
1722*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1723*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, wdev)
1724*14e8a3c4SBeni Lev );
1725*14e8a3c4SBeni Lev 
1726*14e8a3c4SBeni Lev TRACE_EVENT(rdev_return_channel,
1727*14e8a3c4SBeni Lev 	TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *chan,
1728*14e8a3c4SBeni Lev 		 enum nl80211_channel_type type),
1729*14e8a3c4SBeni Lev 	TP_ARGS(wiphy, chan, type),
1730*14e8a3c4SBeni Lev 	TP_STRUCT__entry(
1731*14e8a3c4SBeni Lev 		WIPHY_ENTRY
1732*14e8a3c4SBeni Lev 		CHAN_ENTRY
1733*14e8a3c4SBeni Lev 		__field(enum nl80211_channel_type, type)
1734*14e8a3c4SBeni Lev 	),
1735*14e8a3c4SBeni Lev 	TP_fast_assign(
1736*14e8a3c4SBeni Lev 		WIPHY_ASSIGN;
1737*14e8a3c4SBeni Lev 		CHAN_ASSIGN(chan);
1738*14e8a3c4SBeni Lev 		__entry->type = type;
1739*14e8a3c4SBeni Lev 	),
1740*14e8a3c4SBeni Lev 	TP_printk(WIPHY_PR_FMT CHAN_PR_FMT ", channel type: %d",
1741*14e8a3c4SBeni Lev 		  WIPHY_PR_ARG, CHAN_PR_ARG, __entry->type)
1742*14e8a3c4SBeni Lev );
1743*14e8a3c4SBeni Lev 
1744*14e8a3c4SBeni Lev #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
1745*14e8a3c4SBeni Lev 
1746*14e8a3c4SBeni Lev #undef TRACE_INCLUDE_PATH
1747*14e8a3c4SBeni Lev #define TRACE_INCLUDE_PATH .
1748*14e8a3c4SBeni Lev #undef TRACE_INCLUDE_FILE
1749*14e8a3c4SBeni Lev #define TRACE_INCLUDE_FILE trace
1750*14e8a3c4SBeni Lev #include <trace/define_trace.h>
1751