xref: /linux/net/mac80211/trace.h (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2f59374ebSSara Sharon /*
3f59374ebSSara Sharon  * Portions of this file
4fafd2bceSSara Sharon  * Copyright(c) 2016-2017 Intel Deutschland GmbH
5f455f5adSJohannes Berg  * Copyright (C) 2018 - 2024 Intel Corporation
6f59374ebSSara Sharon  */
7f59374ebSSara Sharon 
8011ad0e9SJohannes Berg #if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
9011ad0e9SJohannes Berg #define __MAC80211_DRIVER_TRACE
10011ad0e9SJohannes Berg 
11011ad0e9SJohannes Berg #include <linux/tracepoint.h>
12011ad0e9SJohannes Berg #include <net/mac80211.h>
13011ad0e9SJohannes Berg #include "ieee80211_i.h"
14011ad0e9SJohannes Berg 
15011ad0e9SJohannes Berg #undef TRACE_SYSTEM
16011ad0e9SJohannes Berg #define TRACE_SYSTEM mac80211
17011ad0e9SJohannes Berg 
18011ad0e9SJohannes Berg #define MAXNAME		32
19011ad0e9SJohannes Berg #define LOCAL_ENTRY	__array(char, wiphy_name, 32)
20f3c21ed9SAzeem Shaikh #define LOCAL_ASSIGN	strscpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME)
21011ad0e9SJohannes Berg #define LOCAL_PR_FMT	"%s"
22011ad0e9SJohannes Berg #define LOCAL_PR_ARG	__entry->wiphy_name
23011ad0e9SJohannes Berg 
24011ad0e9SJohannes Berg #define STA_ENTRY	__array(char, sta_addr, ETH_ALEN)
2547d76e31SMiaohe Lin #define STA_ASSIGN	(sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : \
2647d76e31SMiaohe Lin 				eth_zero_addr(__entry->sta_addr))
278a4d32f3SArik Nemtsov #define STA_NAMED_ASSIGN(s)	memcpy(__entry->sta_addr, (s)->addr, ETH_ALEN)
28011ad0e9SJohannes Berg #define STA_PR_FMT	" sta:%pM"
29011ad0e9SJohannes Berg #define STA_PR_ARG	__entry->sta_addr
30011ad0e9SJohannes Berg 
31011ad0e9SJohannes Berg #define VIF_ENTRY	__field(enum nl80211_iftype, vif_type) __field(void *, sdata)	\
32011ad0e9SJohannes Berg 			__field(bool, p2p)						\
33f9ac71bfSEliad Peller 			__string(vif_name, sdata->name)
34011ad0e9SJohannes Berg #define VIF_ASSIGN	__entry->vif_type = sdata->vif.type; __entry->sdata = sdata;	\
35011ad0e9SJohannes Berg 			__entry->p2p = sdata->vif.p2p;					\
362c92ca84SSteven Rostedt (Google) 			__assign_str(vif_name)
37011ad0e9SJohannes Berg #define VIF_PR_FMT	" vif:%s(%d%s)"
38011ad0e9SJohannes Berg #define VIF_PR_ARG	__get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
39011ad0e9SJohannes Berg 
405a32aff3SJohannes Berg #define CHANDEF_ENTRY	__field(u32, control_freq)					\
41b6011960SThomas Pedersen 			__field(u32, freq_offset)					\
424bf88530SJohannes Berg 			__field(u32, chan_width)					\
434bf88530SJohannes Berg 			__field(u32, center_freq1)					\
44b6011960SThomas Pedersen 			__field(u32, freq1_offset)					\
455a32aff3SJohannes Berg 			__field(u32, center_freq2)
465a32aff3SJohannes Berg #define CHANDEF_ASSIGN(c)							\
47254d3dfeSArik Nemtsov 			__entry->control_freq = (c) ? ((c)->chan ? (c)->chan->center_freq : 0) : 0;	\
48b6011960SThomas Pedersen 			__entry->freq_offset = (c) ? ((c)->chan ? (c)->chan->freq_offset : 0) : 0;	\
49254d3dfeSArik Nemtsov 			__entry->chan_width = (c) ? (c)->width : 0;			\
50254d3dfeSArik Nemtsov 			__entry->center_freq1 = (c) ? (c)->center_freq1 : 0;		\
51b6011960SThomas Pedersen 			__entry->freq1_offset = (c) ? (c)->freq1_offset : 0;		\
52254d3dfeSArik Nemtsov 			__entry->center_freq2 = (c) ? (c)->center_freq2 : 0;
53761748f0SJohannes Berg #define CHANDEF_PR_FMT	" chandef(%d.%03d MHz,width:%d,center: %d.%03d/%d MHz)"
54b6011960SThomas Pedersen #define CHANDEF_PR_ARG	__entry->control_freq, __entry->freq_offset, __entry->chan_width, \
55b6011960SThomas Pedersen 			__entry->center_freq1, __entry->freq1_offset, __entry->center_freq2
565a32aff3SJohannes Berg 
5721f659bfSEliad Peller #define MIN_CHANDEF_ENTRY								\
5821f659bfSEliad Peller 			__field(u32, min_control_freq)					\
59b6011960SThomas Pedersen 			__field(u32, min_freq_offset)					\
6021f659bfSEliad Peller 			__field(u32, min_chan_width)					\
6121f659bfSEliad Peller 			__field(u32, min_center_freq1)					\
62b6011960SThomas Pedersen 			__field(u32, min_freq1_offset)					\
6321f659bfSEliad Peller 			__field(u32, min_center_freq2)
6421f659bfSEliad Peller 
6521f659bfSEliad Peller #define MIN_CHANDEF_ASSIGN(c)								\
6621f659bfSEliad Peller 			__entry->min_control_freq = (c)->chan ? (c)->chan->center_freq : 0;	\
67b6011960SThomas Pedersen 			__entry->min_freq_offset = (c)->chan ? (c)->chan->freq_offset : 0;	\
6821f659bfSEliad Peller 			__entry->min_chan_width = (c)->width;				\
6921f659bfSEliad Peller 			__entry->min_center_freq1 = (c)->center_freq1;			\
70248e4776SJohannes Berg 			__entry->min_freq1_offset = (c)->freq1_offset;			\
7121f659bfSEliad Peller 			__entry->min_center_freq2 = (c)->center_freq2;
72761748f0SJohannes Berg #define MIN_CHANDEF_PR_FMT	" mindef(%d.%03d MHz,width:%d,center: %d.%03d/%d MHz)"
73b6011960SThomas Pedersen #define MIN_CHANDEF_PR_ARG	__entry->min_control_freq, __entry->min_freq_offset,	\
74b6011960SThomas Pedersen 			__entry->min_chan_width,					\
75b6011960SThomas Pedersen 			__entry->min_center_freq1, __entry->min_freq1_offset,		\
76b6011960SThomas Pedersen 			__entry->min_center_freq2
7721f659bfSEliad Peller 
78761748f0SJohannes Berg #define AP_CHANDEF_ENTRY								\
79761748f0SJohannes Berg 			__field(u32, ap_control_freq)					\
80761748f0SJohannes Berg 			__field(u32, ap_freq_offset)					\
81761748f0SJohannes Berg 			__field(u32, ap_chan_width)					\
82761748f0SJohannes Berg 			__field(u32, ap_center_freq1)					\
83761748f0SJohannes Berg 			__field(u32, ap_freq1_offset)					\
84761748f0SJohannes Berg 			__field(u32, ap_center_freq2)
85761748f0SJohannes Berg 
86761748f0SJohannes Berg #define AP_CHANDEF_ASSIGN(c)								\
87761748f0SJohannes Berg 			__entry->ap_control_freq = (c)->chan ? (c)->chan->center_freq : 0;\
88761748f0SJohannes Berg 			__entry->ap_freq_offset = (c)->chan ? (c)->chan->freq_offset : 0;\
89761748f0SJohannes Berg 			__entry->ap_chan_width = (c)->chan ? (c)->width : 0;		\
90761748f0SJohannes Berg 			__entry->ap_center_freq1 = (c)->chan ? (c)->center_freq1 : 0;	\
91761748f0SJohannes Berg 			__entry->ap_freq1_offset = (c)->chan ? (c)->freq1_offset : 0;	\
92761748f0SJohannes Berg 			__entry->ap_center_freq2 = (c)->chan ? (c)->center_freq2 : 0;
93761748f0SJohannes Berg #define AP_CHANDEF_PR_FMT	" ap(%d.%03d MHz,width:%d,center: %d.%03d/%d MHz)"
94761748f0SJohannes Berg #define AP_CHANDEF_PR_ARG	__entry->ap_control_freq, __entry->ap_freq_offset,	\
95761748f0SJohannes Berg 			__entry->ap_chan_width,						\
96761748f0SJohannes Berg 			__entry->ap_center_freq1, __entry->ap_freq1_offset,		\
97761748f0SJohannes Berg 			__entry->ap_center_freq2
98761748f0SJohannes Berg 
995a32aff3SJohannes Berg #define CHANCTX_ENTRY	CHANDEF_ENTRY							\
10021f659bfSEliad Peller 			MIN_CHANDEF_ENTRY						\
101761748f0SJohannes Berg 			AP_CHANDEF_ENTRY						\
10204ecd257SJohannes Berg 			__field(u8, rx_chains_static)					\
10304ecd257SJohannes Berg 			__field(u8, rx_chains_dynamic)
1045a32aff3SJohannes Berg #define CHANCTX_ASSIGN	CHANDEF_ASSIGN(&ctx->conf.def)					\
10521f659bfSEliad Peller 			MIN_CHANDEF_ASSIGN(&ctx->conf.min_def)				\
106761748f0SJohannes Berg 			AP_CHANDEF_ASSIGN(&ctx->conf.ap)				\
10704ecd257SJohannes Berg 			__entry->rx_chains_static = ctx->conf.rx_chains_static;		\
10804ecd257SJohannes Berg 			__entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic
109761748f0SJohannes Berg #define CHANCTX_PR_FMT	CHANDEF_PR_FMT MIN_CHANDEF_PR_FMT AP_CHANDEF_PR_FMT " chains:%d/%d"
110761748f0SJohannes Berg #define CHANCTX_PR_ARG	CHANDEF_PR_ARG,	MIN_CHANDEF_PR_ARG, AP_CHANDEF_PR_ARG,		\
11104ecd257SJohannes Berg 			__entry->rx_chains_static, __entry->rx_chains_dynamic
112c3645eacSMichal Kazior 
1139352c19fSJohannes Berg #define KEY_ENTRY	__field(u32, cipher)						\
1149352c19fSJohannes Berg 			__field(u8, hw_key_idx)						\
1159352c19fSJohannes Berg 			__field(u8, flags)						\
1169352c19fSJohannes Berg 			__field(s8, keyidx)
1179352c19fSJohannes Berg #define KEY_ASSIGN(k)	__entry->cipher = (k)->cipher;					\
1189352c19fSJohannes Berg 			__entry->flags = (k)->flags;					\
1199352c19fSJohannes Berg 			__entry->keyidx = (k)->keyidx;					\
1209352c19fSJohannes Berg 			__entry->hw_key_idx = (k)->hw_key_idx;
1219352c19fSJohannes Berg #define KEY_PR_FMT	" cipher:0x%x, flags=%#x, keyidx=%d, hw_key_idx=%d"
1229352c19fSJohannes Berg #define KEY_PR_ARG	__entry->cipher, __entry->flags, __entry->keyidx, __entry->hw_key_idx
1239352c19fSJohannes Berg 
12450ea05efSSara Sharon #define AMPDU_ACTION_ENTRY	__field(enum ieee80211_ampdu_mlme_action,		\
12550ea05efSSara Sharon 					ieee80211_ampdu_mlme_action)			\
12650ea05efSSara Sharon 				STA_ENTRY						\
12750ea05efSSara Sharon 				__field(u16, tid)					\
12850ea05efSSara Sharon 				__field(u16, ssn)					\
12941cbb0f5SLuca Coelho 				__field(u16, buf_size)					\
13050ea05efSSara Sharon 				__field(bool, amsdu)					\
1316dad28aeSEmmanuel Grumbach 				__field(u16, timeout)					\
1326dad28aeSEmmanuel Grumbach 				__field(u16, action)
13350ea05efSSara Sharon #define AMPDU_ACTION_ASSIGN	STA_NAMED_ASSIGN(params->sta);				\
13450ea05efSSara Sharon 				__entry->tid = params->tid;				\
13550ea05efSSara Sharon 				__entry->ssn = params->ssn;				\
13650ea05efSSara Sharon 				__entry->buf_size = params->buf_size;			\
13750ea05efSSara Sharon 				__entry->amsdu = params->amsdu;				\
1386dad28aeSEmmanuel Grumbach 				__entry->timeout = params->timeout;			\
1396dad28aeSEmmanuel Grumbach 				__entry->action = params->action;
1406dad28aeSEmmanuel Grumbach #define AMPDU_ACTION_PR_FMT	STA_PR_FMT " tid %d, ssn %d, buf_size %u, amsdu %d, timeout %d action %d"
14150ea05efSSara Sharon #define AMPDU_ACTION_PR_ARG	STA_PR_ARG, __entry->tid, __entry->ssn,			\
1426dad28aeSEmmanuel Grumbach 				__entry->buf_size, __entry->amsdu, __entry->timeout,	\
1436dad28aeSEmmanuel Grumbach 				__entry->action
144c3645eacSMichal Kazior 
145011ad0e9SJohannes Berg /*
146011ad0e9SJohannes Berg  * Tracing for driver callbacks.
147011ad0e9SJohannes Berg  */
148011ad0e9SJohannes Berg 
149011ad0e9SJohannes Berg DECLARE_EVENT_CLASS(local_only_evt,
150011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local),
151011ad0e9SJohannes Berg 	TP_ARGS(local),
152011ad0e9SJohannes Berg 	TP_STRUCT__entry(
153011ad0e9SJohannes Berg 		LOCAL_ENTRY
154011ad0e9SJohannes Berg 	),
155011ad0e9SJohannes Berg 	TP_fast_assign(
156011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
157011ad0e9SJohannes Berg 	),
158011ad0e9SJohannes Berg 	TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
159011ad0e9SJohannes Berg );
160011ad0e9SJohannes Berg 
161011ad0e9SJohannes Berg DECLARE_EVENT_CLASS(local_sdata_addr_evt,
162011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
163011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata),
164011ad0e9SJohannes Berg 	TP_ARGS(local, sdata),
165011ad0e9SJohannes Berg 
166011ad0e9SJohannes Berg 	TP_STRUCT__entry(
167011ad0e9SJohannes Berg 		LOCAL_ENTRY
168011ad0e9SJohannes Berg 		VIF_ENTRY
169d458cdf7SJoe Perches 		__array(char, addr, ETH_ALEN)
170011ad0e9SJohannes Berg 	),
171011ad0e9SJohannes Berg 
172011ad0e9SJohannes Berg 	TP_fast_assign(
173011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
174011ad0e9SJohannes Berg 		VIF_ASSIGN;
175d458cdf7SJoe Perches 		memcpy(__entry->addr, sdata->vif.addr, ETH_ALEN);
176011ad0e9SJohannes Berg 	),
177011ad0e9SJohannes Berg 
178011ad0e9SJohannes Berg 	TP_printk(
179011ad0e9SJohannes Berg 		LOCAL_PR_FMT  VIF_PR_FMT " addr:%pM",
180011ad0e9SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
181011ad0e9SJohannes Berg 	)
182011ad0e9SJohannes Berg );
183011ad0e9SJohannes Berg 
184011ad0e9SJohannes Berg DECLARE_EVENT_CLASS(local_u32_evt,
185011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local, u32 value),
186011ad0e9SJohannes Berg 	TP_ARGS(local, value),
187011ad0e9SJohannes Berg 
188011ad0e9SJohannes Berg 	TP_STRUCT__entry(
189011ad0e9SJohannes Berg 		LOCAL_ENTRY
190011ad0e9SJohannes Berg 		__field(u32, value)
191011ad0e9SJohannes Berg 	),
192011ad0e9SJohannes Berg 
193011ad0e9SJohannes Berg 	TP_fast_assign(
194011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
195011ad0e9SJohannes Berg 		__entry->value = value;
196011ad0e9SJohannes Berg 	),
197011ad0e9SJohannes Berg 
198011ad0e9SJohannes Berg 	TP_printk(
199011ad0e9SJohannes Berg 		LOCAL_PR_FMT " value:%d",
200011ad0e9SJohannes Berg 		LOCAL_PR_ARG, __entry->value
201011ad0e9SJohannes Berg 	)
202011ad0e9SJohannes Berg );
203011ad0e9SJohannes Berg 
204011ad0e9SJohannes Berg DECLARE_EVENT_CLASS(local_sdata_evt,
205011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
206011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata),
207011ad0e9SJohannes Berg 	TP_ARGS(local, sdata),
208011ad0e9SJohannes Berg 
209011ad0e9SJohannes Berg 	TP_STRUCT__entry(
210011ad0e9SJohannes Berg 		LOCAL_ENTRY
211011ad0e9SJohannes Berg 		VIF_ENTRY
212011ad0e9SJohannes Berg 	),
213011ad0e9SJohannes Berg 
214011ad0e9SJohannes Berg 	TP_fast_assign(
215011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
216011ad0e9SJohannes Berg 		VIF_ASSIGN;
217011ad0e9SJohannes Berg 	),
218011ad0e9SJohannes Berg 
219011ad0e9SJohannes Berg 	TP_printk(
220011ad0e9SJohannes Berg 		LOCAL_PR_FMT VIF_PR_FMT,
221011ad0e9SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG
222011ad0e9SJohannes Berg 	)
223011ad0e9SJohannes Berg );
224011ad0e9SJohannes Berg 
225011ad0e9SJohannes Berg DEFINE_EVENT(local_only_evt, drv_return_void,
226011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local),
227011ad0e9SJohannes Berg 	TP_ARGS(local)
228011ad0e9SJohannes Berg );
229011ad0e9SJohannes Berg 
230011ad0e9SJohannes Berg TRACE_EVENT(drv_return_int,
231011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local, int ret),
232011ad0e9SJohannes Berg 	TP_ARGS(local, ret),
233011ad0e9SJohannes Berg 	TP_STRUCT__entry(
234011ad0e9SJohannes Berg 		LOCAL_ENTRY
235011ad0e9SJohannes Berg 		__field(int, ret)
236011ad0e9SJohannes Berg 	),
237011ad0e9SJohannes Berg 	TP_fast_assign(
238011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
239011ad0e9SJohannes Berg 		__entry->ret = ret;
240011ad0e9SJohannes Berg 	),
241011ad0e9SJohannes Berg 	TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
242011ad0e9SJohannes Berg );
243011ad0e9SJohannes Berg 
244011ad0e9SJohannes Berg TRACE_EVENT(drv_return_bool,
245011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local, bool ret),
246011ad0e9SJohannes Berg 	TP_ARGS(local, ret),
247011ad0e9SJohannes Berg 	TP_STRUCT__entry(
248011ad0e9SJohannes Berg 		LOCAL_ENTRY
249011ad0e9SJohannes Berg 		__field(bool, ret)
250011ad0e9SJohannes Berg 	),
251011ad0e9SJohannes Berg 	TP_fast_assign(
252011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
253011ad0e9SJohannes Berg 		__entry->ret = ret;
254011ad0e9SJohannes Berg 	),
255011ad0e9SJohannes Berg 	TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
256011ad0e9SJohannes Berg 		  "true" : "false")
257011ad0e9SJohannes Berg );
258011ad0e9SJohannes Berg 
259cca674d4SAntonio Quartulli TRACE_EVENT(drv_return_u32,
260cca674d4SAntonio Quartulli 	TP_PROTO(struct ieee80211_local *local, u32 ret),
261cca674d4SAntonio Quartulli 	TP_ARGS(local, ret),
262cca674d4SAntonio Quartulli 	TP_STRUCT__entry(
263cca674d4SAntonio Quartulli 		LOCAL_ENTRY
264cca674d4SAntonio Quartulli 		__field(u32, ret)
265cca674d4SAntonio Quartulli 	),
266cca674d4SAntonio Quartulli 	TP_fast_assign(
267cca674d4SAntonio Quartulli 		LOCAL_ASSIGN;
268cca674d4SAntonio Quartulli 		__entry->ret = ret;
269cca674d4SAntonio Quartulli 	),
270cca674d4SAntonio Quartulli 	TP_printk(LOCAL_PR_FMT " - %u", LOCAL_PR_ARG, __entry->ret)
271cca674d4SAntonio Quartulli );
272cca674d4SAntonio Quartulli 
273011ad0e9SJohannes Berg TRACE_EVENT(drv_return_u64,
274011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local, u64 ret),
275011ad0e9SJohannes Berg 	TP_ARGS(local, ret),
276011ad0e9SJohannes Berg 	TP_STRUCT__entry(
277011ad0e9SJohannes Berg 		LOCAL_ENTRY
278011ad0e9SJohannes Berg 		__field(u64, ret)
279011ad0e9SJohannes Berg 	),
280011ad0e9SJohannes Berg 	TP_fast_assign(
281011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
282011ad0e9SJohannes Berg 		__entry->ret = ret;
283011ad0e9SJohannes Berg 	),
284011ad0e9SJohannes Berg 	TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
285011ad0e9SJohannes Berg );
286011ad0e9SJohannes Berg 
287011ad0e9SJohannes Berg DEFINE_EVENT(local_only_evt, drv_start,
288011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local),
289011ad0e9SJohannes Berg 	TP_ARGS(local)
290011ad0e9SJohannes Berg );
291011ad0e9SJohannes Berg 
292011ad0e9SJohannes Berg DEFINE_EVENT(local_u32_evt, drv_get_et_strings,
293011ad0e9SJohannes Berg 	     TP_PROTO(struct ieee80211_local *local, u32 sset),
294011ad0e9SJohannes Berg 	     TP_ARGS(local, sset)
295011ad0e9SJohannes Berg );
296011ad0e9SJohannes Berg 
297011ad0e9SJohannes Berg DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count,
298011ad0e9SJohannes Berg 	     TP_PROTO(struct ieee80211_local *local, u32 sset),
299011ad0e9SJohannes Berg 	     TP_ARGS(local, sset)
300011ad0e9SJohannes Berg );
301011ad0e9SJohannes Berg 
302011ad0e9SJohannes Berg DEFINE_EVENT(local_only_evt, drv_get_et_stats,
303011ad0e9SJohannes Berg 	     TP_PROTO(struct ieee80211_local *local),
304011ad0e9SJohannes Berg 	     TP_ARGS(local)
305011ad0e9SJohannes Berg );
306011ad0e9SJohannes Berg 
307011ad0e9SJohannes Berg DEFINE_EVENT(local_only_evt, drv_suspend,
308011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local),
309011ad0e9SJohannes Berg 	TP_ARGS(local)
310011ad0e9SJohannes Berg );
311011ad0e9SJohannes Berg 
312011ad0e9SJohannes Berg DEFINE_EVENT(local_only_evt, drv_resume,
313011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local),
314011ad0e9SJohannes Berg 	TP_ARGS(local)
315011ad0e9SJohannes Berg );
316011ad0e9SJohannes Berg 
317011ad0e9SJohannes Berg TRACE_EVENT(drv_set_wakeup,
318011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local, bool enabled),
319011ad0e9SJohannes Berg 	TP_ARGS(local, enabled),
320011ad0e9SJohannes Berg 	TP_STRUCT__entry(
321011ad0e9SJohannes Berg 		LOCAL_ENTRY
322011ad0e9SJohannes Berg 		__field(bool, enabled)
323011ad0e9SJohannes Berg 	),
324011ad0e9SJohannes Berg 	TP_fast_assign(
325011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
326011ad0e9SJohannes Berg 		__entry->enabled = enabled;
327011ad0e9SJohannes Berg 	),
328011ad0e9SJohannes Berg 	TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
329011ad0e9SJohannes Berg );
330011ad0e9SJohannes Berg 
331*1decf05dSEmmanuel Grumbach TRACE_EVENT(drv_stop,
332*1decf05dSEmmanuel Grumbach 	TP_PROTO(struct ieee80211_local *local, bool suspend),
333*1decf05dSEmmanuel Grumbach 	TP_ARGS(local, suspend),
334*1decf05dSEmmanuel Grumbach 	TP_STRUCT__entry(
335*1decf05dSEmmanuel Grumbach 		LOCAL_ENTRY
336*1decf05dSEmmanuel Grumbach 		__field(bool, suspend)
337*1decf05dSEmmanuel Grumbach 	),
338*1decf05dSEmmanuel Grumbach 	TP_fast_assign(
339*1decf05dSEmmanuel Grumbach 		LOCAL_ASSIGN;
340*1decf05dSEmmanuel Grumbach 		__entry->suspend = suspend;
341*1decf05dSEmmanuel Grumbach 	),
342*1decf05dSEmmanuel Grumbach 	TP_printk(LOCAL_PR_FMT " suspend:%d", LOCAL_PR_ARG, __entry->suspend)
343011ad0e9SJohannes Berg );
344011ad0e9SJohannes Berg 
345011ad0e9SJohannes Berg DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
346011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
347011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata),
348011ad0e9SJohannes Berg 	TP_ARGS(local, sdata)
349011ad0e9SJohannes Berg );
350011ad0e9SJohannes Berg 
351011ad0e9SJohannes Berg TRACE_EVENT(drv_change_interface,
352011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
353011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
354011ad0e9SJohannes Berg 		 enum nl80211_iftype type, bool p2p),
355011ad0e9SJohannes Berg 
356011ad0e9SJohannes Berg 	TP_ARGS(local, sdata, type, p2p),
357011ad0e9SJohannes Berg 
358011ad0e9SJohannes Berg 	TP_STRUCT__entry(
359011ad0e9SJohannes Berg 		LOCAL_ENTRY
360011ad0e9SJohannes Berg 		VIF_ENTRY
361011ad0e9SJohannes Berg 		__field(u32, new_type)
362011ad0e9SJohannes Berg 		__field(bool, new_p2p)
363011ad0e9SJohannes Berg 	),
364011ad0e9SJohannes Berg 
365011ad0e9SJohannes Berg 	TP_fast_assign(
366011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
367011ad0e9SJohannes Berg 		VIF_ASSIGN;
368011ad0e9SJohannes Berg 		__entry->new_type = type;
369011ad0e9SJohannes Berg 		__entry->new_p2p = p2p;
370011ad0e9SJohannes Berg 	),
371011ad0e9SJohannes Berg 
372011ad0e9SJohannes Berg 	TP_printk(
373011ad0e9SJohannes Berg 		LOCAL_PR_FMT  VIF_PR_FMT " new type:%d%s",
374011ad0e9SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
375011ad0e9SJohannes Berg 		__entry->new_p2p ? "/p2p" : ""
376011ad0e9SJohannes Berg 	)
377011ad0e9SJohannes Berg );
378011ad0e9SJohannes Berg 
379011ad0e9SJohannes Berg DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
380011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
381011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata),
382011ad0e9SJohannes Berg 	TP_ARGS(local, sdata)
383011ad0e9SJohannes Berg );
384011ad0e9SJohannes Berg 
385011ad0e9SJohannes Berg TRACE_EVENT(drv_config,
386011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
387011ad0e9SJohannes Berg 		 u32 changed),
388011ad0e9SJohannes Berg 
389011ad0e9SJohannes Berg 	TP_ARGS(local, changed),
390011ad0e9SJohannes Berg 
391011ad0e9SJohannes Berg 	TP_STRUCT__entry(
392011ad0e9SJohannes Berg 		LOCAL_ENTRY
393011ad0e9SJohannes Berg 		__field(u32, changed)
394011ad0e9SJohannes Berg 		__field(u32, flags)
395011ad0e9SJohannes Berg 		__field(int, power_level)
396011ad0e9SJohannes Berg 		__field(int, dynamic_ps_timeout)
397011ad0e9SJohannes Berg 		__field(u16, listen_interval)
398011ad0e9SJohannes Berg 		__field(u8, long_frame_max_tx_count)
399011ad0e9SJohannes Berg 		__field(u8, short_frame_max_tx_count)
400675a0b04SKarl Beldan 		CHANDEF_ENTRY
401011ad0e9SJohannes Berg 		__field(int, smps)
402011ad0e9SJohannes Berg 	),
403011ad0e9SJohannes Berg 
404011ad0e9SJohannes Berg 	TP_fast_assign(
405011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
406011ad0e9SJohannes Berg 		__entry->changed = changed;
407011ad0e9SJohannes Berg 		__entry->flags = local->hw.conf.flags;
408011ad0e9SJohannes Berg 		__entry->power_level = local->hw.conf.power_level;
409011ad0e9SJohannes Berg 		__entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
410011ad0e9SJohannes Berg 		__entry->listen_interval = local->hw.conf.listen_interval;
4113d01be72SJohannes Berg 		__entry->long_frame_max_tx_count =
4123d01be72SJohannes Berg 			local->hw.conf.long_frame_max_tx_count;
4133d01be72SJohannes Berg 		__entry->short_frame_max_tx_count =
4143d01be72SJohannes Berg 			local->hw.conf.short_frame_max_tx_count;
415675a0b04SKarl Beldan 		CHANDEF_ASSIGN(&local->hw.conf.chandef)
416011ad0e9SJohannes Berg 		__entry->smps = local->hw.conf.smps_mode;
417011ad0e9SJohannes Berg 	),
418011ad0e9SJohannes Berg 
419011ad0e9SJohannes Berg 	TP_printk(
420675a0b04SKarl Beldan 		LOCAL_PR_FMT " ch:%#x" CHANDEF_PR_FMT,
421675a0b04SKarl Beldan 		LOCAL_PR_ARG, __entry->changed, CHANDEF_PR_ARG
422011ad0e9SJohannes Berg 	)
423011ad0e9SJohannes Berg );
424011ad0e9SJohannes Berg 
4257b7090b4SJohannes Berg TRACE_EVENT(drv_vif_cfg_changed,
426011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
427011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
4287b7090b4SJohannes Berg 		 u64 changed),
429011ad0e9SJohannes Berg 
4307b7090b4SJohannes Berg 	TP_ARGS(local, sdata, changed),
431011ad0e9SJohannes Berg 
432011ad0e9SJohannes Berg 	TP_STRUCT__entry(
433011ad0e9SJohannes Berg 		LOCAL_ENTRY
434011ad0e9SJohannes Berg 		VIF_ENTRY
4357b7090b4SJohannes Berg 		__field(u64, changed)
436011ad0e9SJohannes Berg 		__field(bool, assoc)
4371724ffbcSJohannes Berg 		__field(bool, ibss_joined)
4381724ffbcSJohannes Berg 		__field(bool, ibss_creator)
439011ad0e9SJohannes Berg 		__field(u16, aid)
4407b7090b4SJohannes Berg 		__dynamic_array(u32, arp_addr_list,
4417b7090b4SJohannes Berg 				sdata->vif.cfg.arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
4427b7090b4SJohannes Berg 					IEEE80211_BSS_ARP_ADDR_LIST_LEN :
4437b7090b4SJohannes Berg 					sdata->vif.cfg.arp_addr_cnt)
4447b7090b4SJohannes Berg 		__field(int, arp_addr_cnt)
4457b7090b4SJohannes Berg 		__dynamic_array(u8, ssid, sdata->vif.cfg.ssid_len)
4467b7090b4SJohannes Berg 		__field(int, s1g)
4477b7090b4SJohannes Berg 		__field(bool, idle)
448a3b8008dSJohannes Berg 		__field(bool, ps)
4497b7090b4SJohannes Berg 	),
4507b7090b4SJohannes Berg 
4517b7090b4SJohannes Berg 	TP_fast_assign(
4527b7090b4SJohannes Berg 		LOCAL_ASSIGN;
4537b7090b4SJohannes Berg 		VIF_ASSIGN;
4547b7090b4SJohannes Berg 		__entry->changed = changed;
4557b7090b4SJohannes Berg 		__entry->aid = sdata->vif.cfg.aid;
4567b7090b4SJohannes Berg 		__entry->assoc = sdata->vif.cfg.assoc;
4577b7090b4SJohannes Berg 		__entry->ibss_joined = sdata->vif.cfg.ibss_joined;
4587b7090b4SJohannes Berg 		__entry->ibss_creator = sdata->vif.cfg.ibss_creator;
459a3b8008dSJohannes Berg 		__entry->ps = sdata->vif.cfg.ps;
4607b7090b4SJohannes Berg 
4617b7090b4SJohannes Berg 		__entry->arp_addr_cnt = sdata->vif.cfg.arp_addr_cnt;
4627b7090b4SJohannes Berg 		memcpy(__get_dynamic_array(arp_addr_list),
4637b7090b4SJohannes Berg 		       sdata->vif.cfg.arp_addr_list,
4647b7090b4SJohannes Berg 		       sizeof(u32) * (sdata->vif.cfg.arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
4657b7090b4SJohannes Berg 					IEEE80211_BSS_ARP_ADDR_LIST_LEN :
4667b7090b4SJohannes Berg 					sdata->vif.cfg.arp_addr_cnt));
4677b7090b4SJohannes Berg 		memcpy(__get_dynamic_array(ssid),
4687b7090b4SJohannes Berg 		       sdata->vif.cfg.ssid,
4697b7090b4SJohannes Berg 		       sdata->vif.cfg.ssid_len);
4707b7090b4SJohannes Berg 		__entry->s1g = sdata->vif.cfg.s1g;
4717b7090b4SJohannes Berg 		__entry->idle = sdata->vif.cfg.idle;
4727b7090b4SJohannes Berg 	),
4737b7090b4SJohannes Berg 
4747b7090b4SJohannes Berg 	TP_printk(
4757b7090b4SJohannes Berg 		LOCAL_PR_FMT  VIF_PR_FMT " changed:%#llx",
4767b7090b4SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
4777b7090b4SJohannes Berg 	)
4787b7090b4SJohannes Berg );
4797b7090b4SJohannes Berg 
4807b7090b4SJohannes Berg TRACE_EVENT(drv_link_info_changed,
4817b7090b4SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
4827b7090b4SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
483d8675a63SJohannes Berg 		 struct ieee80211_bss_conf *link_conf,
4847840bd46SGregory Greenman 		 u64 changed),
4857b7090b4SJohannes Berg 
4867840bd46SGregory Greenman 	TP_ARGS(local, sdata, link_conf, changed),
4877b7090b4SJohannes Berg 
4887b7090b4SJohannes Berg 	TP_STRUCT__entry(
4897b7090b4SJohannes Berg 		LOCAL_ENTRY
4907b7090b4SJohannes Berg 		VIF_ENTRY
4917b7090b4SJohannes Berg 		__field(u64, changed)
4927b7090b4SJohannes Berg 		__field(int, link_id)
493011ad0e9SJohannes Berg 		__field(bool, cts)
494011ad0e9SJohannes Berg 		__field(bool, shortpre)
495011ad0e9SJohannes Berg 		__field(bool, shortslot)
4961724ffbcSJohannes Berg 		__field(bool, enable_beacon)
497011ad0e9SJohannes Berg 		__field(u8, dtimper)
498011ad0e9SJohannes Berg 		__field(u16, bcnint)
499011ad0e9SJohannes Berg 		__field(u16, assoc_cap)
5008c358bcdSJohannes Berg 		__field(u64, sync_tsf)
5018c358bcdSJohannes Berg 		__field(u32, sync_device_ts)
502ef429dadSJohannes Berg 		__field(u8, sync_dtim_count)
503011ad0e9SJohannes Berg 		__field(u32, basic_rates)
50457fbcce3SJohannes Berg 		__array(int, mcast_rate, NUM_NL80211_BANDS)
505011ad0e9SJohannes Berg 		__field(u16, ht_operation_mode)
50604ae87a5SPeter Zijlstra 		__field(s32, cqm_rssi_thold)
50704ae87a5SPeter Zijlstra 		__field(s32, cqm_rssi_hyst)
50804ae87a5SPeter Zijlstra 		__field(u32, channel_width)
50904ae87a5SPeter Zijlstra 		__field(u32, channel_cfreq1)
510b6011960SThomas Pedersen 		__field(u32, channel_cfreq1_offset)
51104ae87a5SPeter Zijlstra 		__field(bool, qos)
51204ae87a5SPeter Zijlstra 		__field(bool, hidden_ssid)
5131ea6f9c0SJohannes Berg 		__field(int, txpower)
51467baf663SJanusz Dziedzic 		__field(u8, p2p_oppps_ctwindow)
515011ad0e9SJohannes Berg 	),
516011ad0e9SJohannes Berg 
517011ad0e9SJohannes Berg 	TP_fast_assign(
518011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
519011ad0e9SJohannes Berg 		VIF_ASSIGN;
520011ad0e9SJohannes Berg 		__entry->changed = changed;
5217840bd46SGregory Greenman 		__entry->link_id = link_conf->link_id;
5227ffc4b29SJohannes Berg 		__entry->shortpre = link_conf->use_short_preamble;
5237ffc4b29SJohannes Berg 		__entry->cts = link_conf->use_cts_prot;
5247ffc4b29SJohannes Berg 		__entry->shortslot = link_conf->use_short_slot;
5257ffc4b29SJohannes Berg 		__entry->enable_beacon = link_conf->enable_beacon;
5267ffc4b29SJohannes Berg 		__entry->dtimper = link_conf->dtim_period;
5277ffc4b29SJohannes Berg 		__entry->bcnint = link_conf->beacon_int;
5287ffc4b29SJohannes Berg 		__entry->assoc_cap = link_conf->assoc_capability;
5297ffc4b29SJohannes Berg 		__entry->sync_tsf = link_conf->sync_tsf;
5307ffc4b29SJohannes Berg 		__entry->sync_device_ts = link_conf->sync_device_ts;
5317ffc4b29SJohannes Berg 		__entry->sync_dtim_count = link_conf->sync_dtim_count;
5327ffc4b29SJohannes Berg 		__entry->basic_rates = link_conf->basic_rates;
5337ffc4b29SJohannes Berg 		memcpy(__entry->mcast_rate, link_conf->mcast_rate,
5341724ffbcSJohannes Berg 		       sizeof(__entry->mcast_rate));
5357ffc4b29SJohannes Berg 		__entry->ht_operation_mode = link_conf->ht_operation_mode;
5367ffc4b29SJohannes Berg 		__entry->cqm_rssi_thold = link_conf->cqm_rssi_thold;
5377ffc4b29SJohannes Berg 		__entry->cqm_rssi_hyst = link_conf->cqm_rssi_hyst;
5386092077aSJohannes Berg 		__entry->channel_width = link_conf->chanreq.oper.width;
5396092077aSJohannes Berg 		__entry->channel_cfreq1 = link_conf->chanreq.oper.center_freq1;
5406092077aSJohannes Berg 		__entry->channel_cfreq1_offset = link_conf->chanreq.oper.freq1_offset;
5417ffc4b29SJohannes Berg 		__entry->qos = link_conf->qos;
5427ffc4b29SJohannes Berg 		__entry->hidden_ssid = link_conf->hidden_ssid;
5437ffc4b29SJohannes Berg 		__entry->txpower = link_conf->txpower;
5447ffc4b29SJohannes Berg 		__entry->p2p_oppps_ctwindow = link_conf->p2p_noa_attr.oppps_ctwindow;
545011ad0e9SJohannes Berg 	),
546011ad0e9SJohannes Berg 
547011ad0e9SJohannes Berg 	TP_printk(
5487b7090b4SJohannes Berg 		LOCAL_PR_FMT  VIF_PR_FMT " link_id:%d, changed:%#llx",
5497b7090b4SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id,
5507b7090b4SJohannes Berg 		__entry->changed
551011ad0e9SJohannes Berg 	)
552011ad0e9SJohannes Berg );
553011ad0e9SJohannes Berg 
554011ad0e9SJohannes Berg TRACE_EVENT(drv_prepare_multicast,
555011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local, int mc_count),
556011ad0e9SJohannes Berg 
557011ad0e9SJohannes Berg 	TP_ARGS(local, mc_count),
558011ad0e9SJohannes Berg 
559011ad0e9SJohannes Berg 	TP_STRUCT__entry(
560011ad0e9SJohannes Berg 		LOCAL_ENTRY
561011ad0e9SJohannes Berg 		__field(int, mc_count)
562011ad0e9SJohannes Berg 	),
563011ad0e9SJohannes Berg 
564011ad0e9SJohannes Berg 	TP_fast_assign(
565011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
566011ad0e9SJohannes Berg 		__entry->mc_count = mc_count;
567011ad0e9SJohannes Berg 	),
568011ad0e9SJohannes Berg 
569011ad0e9SJohannes Berg 	TP_printk(
570011ad0e9SJohannes Berg 		LOCAL_PR_FMT " prepare mc (%d)",
571011ad0e9SJohannes Berg 		LOCAL_PR_ARG, __entry->mc_count
572011ad0e9SJohannes Berg 	)
573011ad0e9SJohannes Berg );
574011ad0e9SJohannes Berg 
575011ad0e9SJohannes Berg TRACE_EVENT(drv_configure_filter,
576011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
577011ad0e9SJohannes Berg 		 unsigned int changed_flags,
578011ad0e9SJohannes Berg 		 unsigned int *total_flags,
579011ad0e9SJohannes Berg 		 u64 multicast),
580011ad0e9SJohannes Berg 
581011ad0e9SJohannes Berg 	TP_ARGS(local, changed_flags, total_flags, multicast),
582011ad0e9SJohannes Berg 
583011ad0e9SJohannes Berg 	TP_STRUCT__entry(
584011ad0e9SJohannes Berg 		LOCAL_ENTRY
585011ad0e9SJohannes Berg 		__field(unsigned int, changed)
586011ad0e9SJohannes Berg 		__field(unsigned int, total)
587011ad0e9SJohannes Berg 		__field(u64, multicast)
588011ad0e9SJohannes Berg 	),
589011ad0e9SJohannes Berg 
590011ad0e9SJohannes Berg 	TP_fast_assign(
591011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
592011ad0e9SJohannes Berg 		__entry->changed = changed_flags;
593011ad0e9SJohannes Berg 		__entry->total = *total_flags;
594011ad0e9SJohannes Berg 		__entry->multicast = multicast;
595011ad0e9SJohannes Berg 	),
596011ad0e9SJohannes Berg 
597011ad0e9SJohannes Berg 	TP_printk(
598011ad0e9SJohannes Berg 		LOCAL_PR_FMT " changed:%#x total:%#x",
599011ad0e9SJohannes Berg 		LOCAL_PR_ARG, __entry->changed, __entry->total
600011ad0e9SJohannes Berg 	)
601011ad0e9SJohannes Berg );
602011ad0e9SJohannes Berg 
6031b09b556SAndrei Otcheretianski TRACE_EVENT(drv_config_iface_filter,
6041b09b556SAndrei Otcheretianski 	TP_PROTO(struct ieee80211_local *local,
6051b09b556SAndrei Otcheretianski 		 struct ieee80211_sub_if_data *sdata,
6061b09b556SAndrei Otcheretianski 		 unsigned int filter_flags,
6071b09b556SAndrei Otcheretianski 		 unsigned int changed_flags),
6081b09b556SAndrei Otcheretianski 
6091b09b556SAndrei Otcheretianski 	TP_ARGS(local, sdata, filter_flags, changed_flags),
6101b09b556SAndrei Otcheretianski 
6111b09b556SAndrei Otcheretianski 	TP_STRUCT__entry(
6121b09b556SAndrei Otcheretianski 		LOCAL_ENTRY
6131b09b556SAndrei Otcheretianski 		VIF_ENTRY
6141b09b556SAndrei Otcheretianski 		__field(unsigned int, filter_flags)
6151b09b556SAndrei Otcheretianski 		__field(unsigned int, changed_flags)
6161b09b556SAndrei Otcheretianski 	),
6171b09b556SAndrei Otcheretianski 
6181b09b556SAndrei Otcheretianski 	TP_fast_assign(
6191b09b556SAndrei Otcheretianski 		LOCAL_ASSIGN;
6201b09b556SAndrei Otcheretianski 		VIF_ASSIGN;
6211b09b556SAndrei Otcheretianski 		__entry->filter_flags = filter_flags;
6221b09b556SAndrei Otcheretianski 		__entry->changed_flags = changed_flags;
6231b09b556SAndrei Otcheretianski 	),
6241b09b556SAndrei Otcheretianski 
6251b09b556SAndrei Otcheretianski 	TP_printk(
6261b09b556SAndrei Otcheretianski 		LOCAL_PR_FMT VIF_PR_FMT
6271b09b556SAndrei Otcheretianski 		" filter_flags: %#x changed_flags: %#x",
6281b09b556SAndrei Otcheretianski 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->filter_flags,
6291b09b556SAndrei Otcheretianski 		__entry->changed_flags
6301b09b556SAndrei Otcheretianski 	)
6311b09b556SAndrei Otcheretianski );
6321b09b556SAndrei Otcheretianski 
633011ad0e9SJohannes Berg TRACE_EVENT(drv_set_tim,
634011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
635011ad0e9SJohannes Berg 		 struct ieee80211_sta *sta, bool set),
636011ad0e9SJohannes Berg 
637011ad0e9SJohannes Berg 	TP_ARGS(local, sta, set),
638011ad0e9SJohannes Berg 
639011ad0e9SJohannes Berg 	TP_STRUCT__entry(
640011ad0e9SJohannes Berg 		LOCAL_ENTRY
641011ad0e9SJohannes Berg 		STA_ENTRY
642011ad0e9SJohannes Berg 		__field(bool, set)
643011ad0e9SJohannes Berg 	),
644011ad0e9SJohannes Berg 
645011ad0e9SJohannes Berg 	TP_fast_assign(
646011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
647011ad0e9SJohannes Berg 		STA_ASSIGN;
648011ad0e9SJohannes Berg 		__entry->set = set;
649011ad0e9SJohannes Berg 	),
650011ad0e9SJohannes Berg 
651011ad0e9SJohannes Berg 	TP_printk(
652011ad0e9SJohannes Berg 		LOCAL_PR_FMT STA_PR_FMT " set:%d",
65315ac7c47SSeth Forshee 		LOCAL_PR_ARG, STA_PR_ARG, __entry->set
654011ad0e9SJohannes Berg 	)
655011ad0e9SJohannes Berg );
656011ad0e9SJohannes Berg 
657011ad0e9SJohannes Berg TRACE_EVENT(drv_set_key,
658011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
659011ad0e9SJohannes Berg 		 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
660011ad0e9SJohannes Berg 		 struct ieee80211_sta *sta,
661011ad0e9SJohannes Berg 		 struct ieee80211_key_conf *key),
662011ad0e9SJohannes Berg 
663011ad0e9SJohannes Berg 	TP_ARGS(local, cmd, sdata, sta, key),
664011ad0e9SJohannes Berg 
665011ad0e9SJohannes Berg 	TP_STRUCT__entry(
666011ad0e9SJohannes Berg 		LOCAL_ENTRY
667011ad0e9SJohannes Berg 		VIF_ENTRY
668011ad0e9SJohannes Berg 		STA_ENTRY
6694c2d68f7SJohannes Berg 		__field(u32, cmd)
6709352c19fSJohannes Berg 		KEY_ENTRY
671011ad0e9SJohannes Berg 	),
672011ad0e9SJohannes Berg 
673011ad0e9SJohannes Berg 	TP_fast_assign(
674011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
675011ad0e9SJohannes Berg 		VIF_ASSIGN;
676011ad0e9SJohannes Berg 		STA_ASSIGN;
6774c2d68f7SJohannes Berg 		__entry->cmd = cmd;
6789352c19fSJohannes Berg 		KEY_ASSIGN(key);
679011ad0e9SJohannes Berg 	),
680011ad0e9SJohannes Berg 
681011ad0e9SJohannes Berg 	TP_printk(
6824c2d68f7SJohannes Berg 		LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT " cmd: %d" KEY_PR_FMT,
6834c2d68f7SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd, KEY_PR_ARG
684011ad0e9SJohannes Berg 	)
685011ad0e9SJohannes Berg );
686011ad0e9SJohannes Berg 
687011ad0e9SJohannes Berg TRACE_EVENT(drv_update_tkip_key,
688011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
689011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
690011ad0e9SJohannes Berg 		 struct ieee80211_key_conf *conf,
691011ad0e9SJohannes Berg 		 struct ieee80211_sta *sta, u32 iv32),
692011ad0e9SJohannes Berg 
693011ad0e9SJohannes Berg 	TP_ARGS(local, sdata, conf, sta, iv32),
694011ad0e9SJohannes Berg 
695011ad0e9SJohannes Berg 	TP_STRUCT__entry(
696011ad0e9SJohannes Berg 		LOCAL_ENTRY
697011ad0e9SJohannes Berg 		VIF_ENTRY
698011ad0e9SJohannes Berg 		STA_ENTRY
699011ad0e9SJohannes Berg 		__field(u32, iv32)
700011ad0e9SJohannes Berg 	),
701011ad0e9SJohannes Berg 
702011ad0e9SJohannes Berg 	TP_fast_assign(
703011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
704011ad0e9SJohannes Berg 		VIF_ASSIGN;
705011ad0e9SJohannes Berg 		STA_ASSIGN;
706011ad0e9SJohannes Berg 		__entry->iv32 = iv32;
707011ad0e9SJohannes Berg 	),
708011ad0e9SJohannes Berg 
709011ad0e9SJohannes Berg 	TP_printk(
710011ad0e9SJohannes Berg 		LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
711011ad0e9SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->iv32
712011ad0e9SJohannes Berg 	)
713011ad0e9SJohannes Berg );
714011ad0e9SJohannes Berg 
715011ad0e9SJohannes Berg DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
716011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
717011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata),
718011ad0e9SJohannes Berg 	TP_ARGS(local, sdata)
719011ad0e9SJohannes Berg );
720011ad0e9SJohannes Berg 
721011ad0e9SJohannes Berg DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
722011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
723011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata),
724011ad0e9SJohannes Berg 	TP_ARGS(local, sdata)
725011ad0e9SJohannes Berg );
726011ad0e9SJohannes Berg 
727011ad0e9SJohannes Berg DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
728011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
729011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata),
730011ad0e9SJohannes Berg 	TP_ARGS(local, sdata)
731011ad0e9SJohannes Berg );
732011ad0e9SJohannes Berg 
733011ad0e9SJohannes Berg DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
734011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
735011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata),
736011ad0e9SJohannes Berg 	TP_ARGS(local, sdata)
737011ad0e9SJohannes Berg );
738011ad0e9SJohannes Berg 
739a344d677SJohannes Berg TRACE_EVENT(drv_sw_scan_start,
740a344d677SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
741a344d677SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
742a344d677SJohannes Berg 		 const u8 *mac_addr),
743a344d677SJohannes Berg 
744a344d677SJohannes Berg 	TP_ARGS(local, sdata, mac_addr),
745a344d677SJohannes Berg 
746a344d677SJohannes Berg 	TP_STRUCT__entry(
747a344d677SJohannes Berg 		LOCAL_ENTRY
748a344d677SJohannes Berg 		VIF_ENTRY
749a344d677SJohannes Berg 		__array(char, mac_addr, ETH_ALEN)
750a344d677SJohannes Berg 	),
751a344d677SJohannes Berg 
752a344d677SJohannes Berg 	TP_fast_assign(
753a344d677SJohannes Berg 		LOCAL_ASSIGN;
754a344d677SJohannes Berg 		VIF_ASSIGN;
755a344d677SJohannes Berg 		memcpy(__entry->mac_addr, mac_addr, ETH_ALEN);
756a344d677SJohannes Berg 	),
757a344d677SJohannes Berg 
758a344d677SJohannes Berg 	TP_printk(LOCAL_PR_FMT ", " VIF_PR_FMT ", addr:%pM",
759a344d677SJohannes Berg 		  LOCAL_PR_ARG, VIF_PR_ARG, __entry->mac_addr)
760011ad0e9SJohannes Berg );
761011ad0e9SJohannes Berg 
762a344d677SJohannes Berg DEFINE_EVENT(local_sdata_evt, drv_sw_scan_complete,
763a344d677SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
764a344d677SJohannes Berg 		 struct ieee80211_sub_if_data *sdata),
765a344d677SJohannes Berg 	TP_ARGS(local, sdata)
766011ad0e9SJohannes Berg );
767011ad0e9SJohannes Berg 
768011ad0e9SJohannes Berg TRACE_EVENT(drv_get_stats,
769011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
770011ad0e9SJohannes Berg 		 struct ieee80211_low_level_stats *stats,
771011ad0e9SJohannes Berg 		 int ret),
772011ad0e9SJohannes Berg 
773011ad0e9SJohannes Berg 	TP_ARGS(local, stats, ret),
774011ad0e9SJohannes Berg 
775011ad0e9SJohannes Berg 	TP_STRUCT__entry(
776011ad0e9SJohannes Berg 		LOCAL_ENTRY
777011ad0e9SJohannes Berg 		__field(int, ret)
778011ad0e9SJohannes Berg 		__field(unsigned int, ackfail)
779011ad0e9SJohannes Berg 		__field(unsigned int, rtsfail)
780011ad0e9SJohannes Berg 		__field(unsigned int, fcserr)
781011ad0e9SJohannes Berg 		__field(unsigned int, rtssucc)
782011ad0e9SJohannes Berg 	),
783011ad0e9SJohannes Berg 
784011ad0e9SJohannes Berg 	TP_fast_assign(
785011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
786011ad0e9SJohannes Berg 		__entry->ret = ret;
787011ad0e9SJohannes Berg 		__entry->ackfail = stats->dot11ACKFailureCount;
788011ad0e9SJohannes Berg 		__entry->rtsfail = stats->dot11RTSFailureCount;
789011ad0e9SJohannes Berg 		__entry->fcserr = stats->dot11FCSErrorCount;
790011ad0e9SJohannes Berg 		__entry->rtssucc = stats->dot11RTSSuccessCount;
791011ad0e9SJohannes Berg 	),
792011ad0e9SJohannes Berg 
793011ad0e9SJohannes Berg 	TP_printk(
794011ad0e9SJohannes Berg 		LOCAL_PR_FMT " ret:%d",
795011ad0e9SJohannes Berg 		LOCAL_PR_ARG, __entry->ret
796011ad0e9SJohannes Berg 	)
797011ad0e9SJohannes Berg );
798011ad0e9SJohannes Berg 
7999352c19fSJohannes Berg TRACE_EVENT(drv_get_key_seq,
800011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
8019352c19fSJohannes Berg 		 struct ieee80211_key_conf *key),
802011ad0e9SJohannes Berg 
8039352c19fSJohannes Berg 	TP_ARGS(local, key),
804011ad0e9SJohannes Berg 
805011ad0e9SJohannes Berg 	TP_STRUCT__entry(
806011ad0e9SJohannes Berg 		LOCAL_ENTRY
8079352c19fSJohannes Berg 		KEY_ENTRY
808011ad0e9SJohannes Berg 	),
809011ad0e9SJohannes Berg 
810011ad0e9SJohannes Berg 	TP_fast_assign(
811011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
8129352c19fSJohannes Berg 		KEY_ASSIGN(key);
813011ad0e9SJohannes Berg 	),
814011ad0e9SJohannes Berg 
815011ad0e9SJohannes Berg 	TP_printk(
8169352c19fSJohannes Berg 		LOCAL_PR_FMT KEY_PR_FMT,
8179352c19fSJohannes Berg 		LOCAL_PR_ARG, KEY_PR_ARG
818011ad0e9SJohannes Berg 	)
819011ad0e9SJohannes Berg );
820011ad0e9SJohannes Berg 
821011ad0e9SJohannes Berg DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
822011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local, u32 value),
823011ad0e9SJohannes Berg 	TP_ARGS(local, value)
824011ad0e9SJohannes Berg );
825011ad0e9SJohannes Berg 
826011ad0e9SJohannes Berg DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
827011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local, u32 value),
828011ad0e9SJohannes Berg 	TP_ARGS(local, value)
829011ad0e9SJohannes Berg );
830011ad0e9SJohannes Berg 
831011ad0e9SJohannes Berg TRACE_EVENT(drv_set_coverage_class,
832a4bcaf55SLorenzo Bianconi 	TP_PROTO(struct ieee80211_local *local, s16 value),
833011ad0e9SJohannes Berg 
834011ad0e9SJohannes Berg 	TP_ARGS(local, value),
835011ad0e9SJohannes Berg 
836011ad0e9SJohannes Berg 	TP_STRUCT__entry(
837011ad0e9SJohannes Berg 		LOCAL_ENTRY
838a4bcaf55SLorenzo Bianconi 		__field(s16, value)
839011ad0e9SJohannes Berg 	),
840011ad0e9SJohannes Berg 
841011ad0e9SJohannes Berg 	TP_fast_assign(
842011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
843011ad0e9SJohannes Berg 		__entry->value = value;
844011ad0e9SJohannes Berg 	),
845011ad0e9SJohannes Berg 
846011ad0e9SJohannes Berg 	TP_printk(
847011ad0e9SJohannes Berg 		LOCAL_PR_FMT " value:%d",
848011ad0e9SJohannes Berg 		LOCAL_PR_ARG, __entry->value
849011ad0e9SJohannes Berg 	)
850011ad0e9SJohannes Berg );
851011ad0e9SJohannes Berg 
852011ad0e9SJohannes Berg TRACE_EVENT(drv_sta_notify,
853011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
854011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
855011ad0e9SJohannes Berg 		 enum sta_notify_cmd cmd,
856011ad0e9SJohannes Berg 		 struct ieee80211_sta *sta),
857011ad0e9SJohannes Berg 
858011ad0e9SJohannes Berg 	TP_ARGS(local, sdata, cmd, sta),
859011ad0e9SJohannes Berg 
860011ad0e9SJohannes Berg 	TP_STRUCT__entry(
861011ad0e9SJohannes Berg 		LOCAL_ENTRY
862011ad0e9SJohannes Berg 		VIF_ENTRY
863011ad0e9SJohannes Berg 		STA_ENTRY
864011ad0e9SJohannes Berg 		__field(u32, cmd)
865011ad0e9SJohannes Berg 	),
866011ad0e9SJohannes Berg 
867011ad0e9SJohannes Berg 	TP_fast_assign(
868011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
869011ad0e9SJohannes Berg 		VIF_ASSIGN;
870011ad0e9SJohannes Berg 		STA_ASSIGN;
871011ad0e9SJohannes Berg 		__entry->cmd = cmd;
872011ad0e9SJohannes Berg 	),
873011ad0e9SJohannes Berg 
874011ad0e9SJohannes Berg 	TP_printk(
875011ad0e9SJohannes Berg 		LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT " cmd:%d",
876011ad0e9SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
877011ad0e9SJohannes Berg 	)
878011ad0e9SJohannes Berg );
879011ad0e9SJohannes Berg 
880011ad0e9SJohannes Berg TRACE_EVENT(drv_sta_state,
881011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
882011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
883011ad0e9SJohannes Berg 		 struct ieee80211_sta *sta,
884011ad0e9SJohannes Berg 		 enum ieee80211_sta_state old_state,
885011ad0e9SJohannes Berg 		 enum ieee80211_sta_state new_state),
886011ad0e9SJohannes Berg 
887011ad0e9SJohannes Berg 	TP_ARGS(local, sdata, sta, old_state, new_state),
888011ad0e9SJohannes Berg 
889011ad0e9SJohannes Berg 	TP_STRUCT__entry(
890011ad0e9SJohannes Berg 		LOCAL_ENTRY
891011ad0e9SJohannes Berg 		VIF_ENTRY
892011ad0e9SJohannes Berg 		STA_ENTRY
893011ad0e9SJohannes Berg 		__field(u32, old_state)
894011ad0e9SJohannes Berg 		__field(u32, new_state)
895011ad0e9SJohannes Berg 	),
896011ad0e9SJohannes Berg 
897011ad0e9SJohannes Berg 	TP_fast_assign(
898011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
899011ad0e9SJohannes Berg 		VIF_ASSIGN;
900011ad0e9SJohannes Berg 		STA_ASSIGN;
901011ad0e9SJohannes Berg 		__entry->old_state = old_state;
902011ad0e9SJohannes Berg 		__entry->new_state = new_state;
903011ad0e9SJohannes Berg 	),
904011ad0e9SJohannes Berg 
905011ad0e9SJohannes Berg 	TP_printk(
906011ad0e9SJohannes Berg 		LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT " state: %d->%d",
907011ad0e9SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
908011ad0e9SJohannes Berg 		__entry->old_state, __entry->new_state
909011ad0e9SJohannes Berg 	)
910011ad0e9SJohannes Berg );
911011ad0e9SJohannes Berg 
912ba905bf4SAshok Raj Nagarajan TRACE_EVENT(drv_sta_set_txpwr,
913ba905bf4SAshok Raj Nagarajan 	TP_PROTO(struct ieee80211_local *local,
914ba905bf4SAshok Raj Nagarajan 		 struct ieee80211_sub_if_data *sdata,
915ba905bf4SAshok Raj Nagarajan 		 struct ieee80211_sta *sta),
916ba905bf4SAshok Raj Nagarajan 
917ba905bf4SAshok Raj Nagarajan 	TP_ARGS(local, sdata, sta),
918ba905bf4SAshok Raj Nagarajan 
919ba905bf4SAshok Raj Nagarajan 	TP_STRUCT__entry(
920ba905bf4SAshok Raj Nagarajan 		LOCAL_ENTRY
921ba905bf4SAshok Raj Nagarajan 		VIF_ENTRY
922ba905bf4SAshok Raj Nagarajan 		STA_ENTRY
923ba905bf4SAshok Raj Nagarajan 		__field(s16, txpwr)
924ba905bf4SAshok Raj Nagarajan 		__field(u8, type)
925ba905bf4SAshok Raj Nagarajan 	),
926ba905bf4SAshok Raj Nagarajan 
927ba905bf4SAshok Raj Nagarajan 	TP_fast_assign(
928ba905bf4SAshok Raj Nagarajan 		LOCAL_ASSIGN;
929ba905bf4SAshok Raj Nagarajan 		VIF_ASSIGN;
930ba905bf4SAshok Raj Nagarajan 		STA_ASSIGN;
931046d2e7cSSriram R 		__entry->txpwr = sta->deflink.txpwr.power;
932046d2e7cSSriram R 		__entry->type = sta->deflink.txpwr.type;
933ba905bf4SAshok Raj Nagarajan 	),
934ba905bf4SAshok Raj Nagarajan 
935ba905bf4SAshok Raj Nagarajan 	TP_printk(
936ba905bf4SAshok Raj Nagarajan 		LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT " txpwr: %d type %d",
937ba905bf4SAshok Raj Nagarajan 		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
938ba905bf4SAshok Raj Nagarajan 		__entry->txpwr,  __entry->type
939ba905bf4SAshok Raj Nagarajan 	)
940ba905bf4SAshok Raj Nagarajan );
941ba905bf4SAshok Raj Nagarajan 
942011ad0e9SJohannes Berg TRACE_EVENT(drv_sta_rc_update,
943011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
944011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
945011ad0e9SJohannes Berg 		 struct ieee80211_sta *sta,
946011ad0e9SJohannes Berg 		 u32 changed),
947011ad0e9SJohannes Berg 
948011ad0e9SJohannes Berg 	TP_ARGS(local, sdata, sta, changed),
949011ad0e9SJohannes Berg 
950011ad0e9SJohannes Berg 	TP_STRUCT__entry(
951011ad0e9SJohannes Berg 		LOCAL_ENTRY
952011ad0e9SJohannes Berg 		VIF_ENTRY
953011ad0e9SJohannes Berg 		STA_ENTRY
954011ad0e9SJohannes Berg 		__field(u32, changed)
955011ad0e9SJohannes Berg 	),
956011ad0e9SJohannes Berg 
957011ad0e9SJohannes Berg 	TP_fast_assign(
958011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
959011ad0e9SJohannes Berg 		VIF_ASSIGN;
960011ad0e9SJohannes Berg 		STA_ASSIGN;
961011ad0e9SJohannes Berg 		__entry->changed = changed;
962011ad0e9SJohannes Berg 	),
963011ad0e9SJohannes Berg 
964011ad0e9SJohannes Berg 	TP_printk(
965011ad0e9SJohannes Berg 		LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT " changed: 0x%x",
966011ad0e9SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
967011ad0e9SJohannes Berg 	)
968011ad0e9SJohannes Berg );
969011ad0e9SJohannes Berg 
9706a9d1b91SJohannes Berg DECLARE_EVENT_CLASS(sta_event,
971011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
972011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
973011ad0e9SJohannes Berg 		 struct ieee80211_sta *sta),
974011ad0e9SJohannes Berg 
975011ad0e9SJohannes Berg 	TP_ARGS(local, sdata, sta),
976011ad0e9SJohannes Berg 
977011ad0e9SJohannes Berg 	TP_STRUCT__entry(
978011ad0e9SJohannes Berg 		LOCAL_ENTRY
979011ad0e9SJohannes Berg 		VIF_ENTRY
980011ad0e9SJohannes Berg 		STA_ENTRY
981011ad0e9SJohannes Berg 	),
982011ad0e9SJohannes Berg 
983011ad0e9SJohannes Berg 	TP_fast_assign(
984011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
985011ad0e9SJohannes Berg 		VIF_ASSIGN;
986011ad0e9SJohannes Berg 		STA_ASSIGN;
987011ad0e9SJohannes Berg 	),
988011ad0e9SJohannes Berg 
989011ad0e9SJohannes Berg 	TP_printk(
990011ad0e9SJohannes Berg 		LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT,
991011ad0e9SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
992011ad0e9SJohannes Berg 	)
993011ad0e9SJohannes Berg );
994011ad0e9SJohannes Berg 
9952b9a7e1bSJohannes Berg DEFINE_EVENT(sta_event, drv_sta_statistics,
9962b9a7e1bSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
9972b9a7e1bSJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
9982b9a7e1bSJohannes Berg 		 struct ieee80211_sta *sta),
9992b9a7e1bSJohannes Berg 	TP_ARGS(local, sdata, sta)
10002b9a7e1bSJohannes Berg );
10012b9a7e1bSJohannes Berg 
10026a9d1b91SJohannes Berg DEFINE_EVENT(sta_event, drv_sta_add,
1003011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
1004011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
1005011ad0e9SJohannes Berg 		 struct ieee80211_sta *sta),
10066a9d1b91SJohannes Berg 	TP_ARGS(local, sdata, sta)
10076a9d1b91SJohannes Berg );
1008011ad0e9SJohannes Berg 
10096a9d1b91SJohannes Berg DEFINE_EVENT(sta_event, drv_sta_remove,
10106a9d1b91SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
10116a9d1b91SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
10126a9d1b91SJohannes Berg 		 struct ieee80211_sta *sta),
10136a9d1b91SJohannes Berg 	TP_ARGS(local, sdata, sta)
10146a9d1b91SJohannes Berg );
1015011ad0e9SJohannes Berg 
10166a9d1b91SJohannes Berg DEFINE_EVENT(sta_event, drv_sta_pre_rcu_remove,
10176a9d1b91SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
10186a9d1b91SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
10196a9d1b91SJohannes Berg 		 struct ieee80211_sta *sta),
10206a9d1b91SJohannes Berg 	TP_ARGS(local, sdata, sta)
1021011ad0e9SJohannes Berg );
1022011ad0e9SJohannes Berg 
1023f59374ebSSara Sharon DEFINE_EVENT(sta_event, drv_sync_rx_queues,
1024f59374ebSSara Sharon 	TP_PROTO(struct ieee80211_local *local,
1025f59374ebSSara Sharon 		 struct ieee80211_sub_if_data *sdata,
1026f59374ebSSara Sharon 		 struct ieee80211_sta *sta),
1027f59374ebSSara Sharon 	TP_ARGS(local, sdata, sta)
1028f59374ebSSara Sharon );
1029f59374ebSSara Sharon 
1030f815e2b3SJohannes Berg DEFINE_EVENT(sta_event, drv_sta_rate_tbl_update,
1031f815e2b3SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
1032f815e2b3SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
1033f815e2b3SJohannes Berg 		 struct ieee80211_sta *sta),
1034f815e2b3SJohannes Berg 	TP_ARGS(local, sdata, sta)
1035f815e2b3SJohannes Berg );
1036f815e2b3SJohannes Berg 
1037011ad0e9SJohannes Berg TRACE_EVENT(drv_conf_tx,
1038011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
1039011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
1040b3e2130bSJohannes Berg 		 unsigned int link_id,
1041011ad0e9SJohannes Berg 		 u16 ac, const struct ieee80211_tx_queue_params *params),
1042011ad0e9SJohannes Berg 
1043b3e2130bSJohannes Berg 	TP_ARGS(local, sdata, link_id, ac, params),
1044011ad0e9SJohannes Berg 
1045011ad0e9SJohannes Berg 	TP_STRUCT__entry(
1046011ad0e9SJohannes Berg 		LOCAL_ENTRY
1047011ad0e9SJohannes Berg 		VIF_ENTRY
1048b3e2130bSJohannes Berg 		__field(unsigned int, link_id)
1049011ad0e9SJohannes Berg 		__field(u16, ac)
1050011ad0e9SJohannes Berg 		__field(u16, txop)
1051011ad0e9SJohannes Berg 		__field(u16, cw_min)
1052011ad0e9SJohannes Berg 		__field(u16, cw_max)
1053011ad0e9SJohannes Berg 		__field(u8, aifs)
1054011ad0e9SJohannes Berg 		__field(bool, uapsd)
1055011ad0e9SJohannes Berg 	),
1056011ad0e9SJohannes Berg 
1057011ad0e9SJohannes Berg 	TP_fast_assign(
1058011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
1059011ad0e9SJohannes Berg 		VIF_ASSIGN;
1060b3e2130bSJohannes Berg 		__entry->link_id = link_id;
1061011ad0e9SJohannes Berg 		__entry->ac = ac;
1062011ad0e9SJohannes Berg 		__entry->txop = params->txop;
1063011ad0e9SJohannes Berg 		__entry->cw_max = params->cw_max;
1064011ad0e9SJohannes Berg 		__entry->cw_min = params->cw_min;
1065011ad0e9SJohannes Berg 		__entry->aifs = params->aifs;
1066011ad0e9SJohannes Berg 		__entry->uapsd = params->uapsd;
1067011ad0e9SJohannes Berg 	),
1068011ad0e9SJohannes Berg 
1069011ad0e9SJohannes Berg 	TP_printk(
1070b3e2130bSJohannes Berg 		LOCAL_PR_FMT  VIF_PR_FMT  " link_id: %d, AC:%d",
1071b3e2130bSJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id, __entry->ac
1072011ad0e9SJohannes Berg 	)
1073011ad0e9SJohannes Berg );
1074011ad0e9SJohannes Berg 
1075011ad0e9SJohannes Berg DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
1076011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
1077011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata),
1078011ad0e9SJohannes Berg 	TP_ARGS(local, sdata)
1079011ad0e9SJohannes Berg );
1080011ad0e9SJohannes Berg 
1081011ad0e9SJohannes Berg TRACE_EVENT(drv_set_tsf,
1082011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
1083011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
1084011ad0e9SJohannes Berg 		 u64 tsf),
1085011ad0e9SJohannes Berg 
1086011ad0e9SJohannes Berg 	TP_ARGS(local, sdata, tsf),
1087011ad0e9SJohannes Berg 
1088011ad0e9SJohannes Berg 	TP_STRUCT__entry(
1089011ad0e9SJohannes Berg 		LOCAL_ENTRY
1090011ad0e9SJohannes Berg 		VIF_ENTRY
1091011ad0e9SJohannes Berg 		__field(u64, tsf)
1092011ad0e9SJohannes Berg 	),
1093011ad0e9SJohannes Berg 
1094011ad0e9SJohannes Berg 	TP_fast_assign(
1095011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
1096011ad0e9SJohannes Berg 		VIF_ASSIGN;
1097011ad0e9SJohannes Berg 		__entry->tsf = tsf;
1098011ad0e9SJohannes Berg 	),
1099011ad0e9SJohannes Berg 
1100011ad0e9SJohannes Berg 	TP_printk(
1101011ad0e9SJohannes Berg 		LOCAL_PR_FMT  VIF_PR_FMT  " tsf:%llu",
1102011ad0e9SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
1103011ad0e9SJohannes Berg 	)
1104011ad0e9SJohannes Berg );
1105011ad0e9SJohannes Berg 
1106354d381bSPedersen, Thomas TRACE_EVENT(drv_offset_tsf,
1107354d381bSPedersen, Thomas 	TP_PROTO(struct ieee80211_local *local,
1108354d381bSPedersen, Thomas 		 struct ieee80211_sub_if_data *sdata,
1109354d381bSPedersen, Thomas 		 s64 offset),
1110354d381bSPedersen, Thomas 
1111354d381bSPedersen, Thomas 	TP_ARGS(local, sdata, offset),
1112354d381bSPedersen, Thomas 
1113354d381bSPedersen, Thomas 	TP_STRUCT__entry(
1114354d381bSPedersen, Thomas 		LOCAL_ENTRY
1115354d381bSPedersen, Thomas 		VIF_ENTRY
1116354d381bSPedersen, Thomas 		__field(s64, tsf_offset)
1117354d381bSPedersen, Thomas 	),
1118354d381bSPedersen, Thomas 
1119354d381bSPedersen, Thomas 	TP_fast_assign(
1120354d381bSPedersen, Thomas 		LOCAL_ASSIGN;
1121354d381bSPedersen, Thomas 		VIF_ASSIGN;
1122354d381bSPedersen, Thomas 		__entry->tsf_offset = offset;
1123354d381bSPedersen, Thomas 	),
1124354d381bSPedersen, Thomas 
1125354d381bSPedersen, Thomas 	TP_printk(
1126354d381bSPedersen, Thomas 		LOCAL_PR_FMT  VIF_PR_FMT  " tsf offset:%lld",
1127354d381bSPedersen, Thomas 		LOCAL_PR_ARG, VIF_PR_ARG,
1128354d381bSPedersen, Thomas 		(unsigned long long)__entry->tsf_offset
1129354d381bSPedersen, Thomas 	)
1130354d381bSPedersen, Thomas );
1131354d381bSPedersen, Thomas 
1132011ad0e9SJohannes Berg DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
1133011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
1134011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata),
1135011ad0e9SJohannes Berg 	TP_ARGS(local, sdata)
1136011ad0e9SJohannes Berg );
1137011ad0e9SJohannes Berg 
1138011ad0e9SJohannes Berg DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
1139011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local),
1140011ad0e9SJohannes Berg 	TP_ARGS(local)
1141011ad0e9SJohannes Berg );
1142011ad0e9SJohannes Berg 
1143011ad0e9SJohannes Berg TRACE_EVENT(drv_ampdu_action,
1144011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
1145011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
114650ea05efSSara Sharon 		 struct ieee80211_ampdu_params *params),
1147011ad0e9SJohannes Berg 
114850ea05efSSara Sharon 	TP_ARGS(local, sdata, params),
1149011ad0e9SJohannes Berg 
1150011ad0e9SJohannes Berg 	TP_STRUCT__entry(
1151011ad0e9SJohannes Berg 		LOCAL_ENTRY
1152011ad0e9SJohannes Berg 		VIF_ENTRY
115350ea05efSSara Sharon 		AMPDU_ACTION_ENTRY
1154011ad0e9SJohannes Berg 	),
1155011ad0e9SJohannes Berg 
1156011ad0e9SJohannes Berg 	TP_fast_assign(
1157011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
1158011ad0e9SJohannes Berg 		VIF_ASSIGN;
115950ea05efSSara Sharon 		AMPDU_ACTION_ASSIGN;
1160011ad0e9SJohannes Berg 	),
1161011ad0e9SJohannes Berg 
1162011ad0e9SJohannes Berg 	TP_printk(
116350ea05efSSara Sharon 		LOCAL_PR_FMT VIF_PR_FMT AMPDU_ACTION_PR_FMT,
116450ea05efSSara Sharon 		LOCAL_PR_ARG, VIF_PR_ARG, AMPDU_ACTION_PR_ARG
1165011ad0e9SJohannes Berg 	)
1166011ad0e9SJohannes Berg );
1167011ad0e9SJohannes Berg 
1168011ad0e9SJohannes Berg TRACE_EVENT(drv_get_survey,
1169140d905bSJohannes Berg 	TP_PROTO(struct ieee80211_local *local, int _idx,
1170011ad0e9SJohannes Berg 		 struct survey_info *survey),
1171011ad0e9SJohannes Berg 
1172140d905bSJohannes Berg 	TP_ARGS(local, _idx, survey),
1173011ad0e9SJohannes Berg 
1174011ad0e9SJohannes Berg 	TP_STRUCT__entry(
1175011ad0e9SJohannes Berg 		LOCAL_ENTRY
1176011ad0e9SJohannes Berg 		__field(int, idx)
1177011ad0e9SJohannes Berg 	),
1178011ad0e9SJohannes Berg 
1179011ad0e9SJohannes Berg 	TP_fast_assign(
1180011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
1181140d905bSJohannes Berg 		__entry->idx = _idx;
1182011ad0e9SJohannes Berg 	),
1183011ad0e9SJohannes Berg 
1184011ad0e9SJohannes Berg 	TP_printk(
1185011ad0e9SJohannes Berg 		LOCAL_PR_FMT " idx:%d",
1186011ad0e9SJohannes Berg 		LOCAL_PR_ARG, __entry->idx
1187011ad0e9SJohannes Berg 	)
1188011ad0e9SJohannes Berg );
1189011ad0e9SJohannes Berg 
1190011ad0e9SJohannes Berg TRACE_EVENT(drv_flush,
119139ecc01dSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
119239ecc01dSJohannes Berg 		 u32 queues, bool drop),
1193011ad0e9SJohannes Berg 
119439ecc01dSJohannes Berg 	TP_ARGS(local, queues, drop),
1195011ad0e9SJohannes Berg 
1196011ad0e9SJohannes Berg 	TP_STRUCT__entry(
1197011ad0e9SJohannes Berg 		LOCAL_ENTRY
1198011ad0e9SJohannes Berg 		__field(bool, drop)
119939ecc01dSJohannes Berg 		__field(u32, queues)
1200011ad0e9SJohannes Berg 	),
1201011ad0e9SJohannes Berg 
1202011ad0e9SJohannes Berg 	TP_fast_assign(
1203011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
1204011ad0e9SJohannes Berg 		__entry->drop = drop;
120539ecc01dSJohannes Berg 		__entry->queues = queues;
1206011ad0e9SJohannes Berg 	),
1207011ad0e9SJohannes Berg 
1208011ad0e9SJohannes Berg 	TP_printk(
120939ecc01dSJohannes Berg 		LOCAL_PR_FMT " queues:0x%x drop:%d",
121039ecc01dSJohannes Berg 		LOCAL_PR_ARG, __entry->queues, __entry->drop
1211011ad0e9SJohannes Berg 	)
1212011ad0e9SJohannes Berg );
1213011ad0e9SJohannes Berg 
1214d00800a2SJohannes Berg DEFINE_EVENT(sta_event, drv_flush_sta,
1215d00800a2SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
1216d00800a2SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
1217d00800a2SJohannes Berg 		 struct ieee80211_sta *sta),
1218d00800a2SJohannes Berg 	TP_ARGS(local, sdata, sta)
1219d00800a2SJohannes Berg );
1220d00800a2SJohannes Berg 
1221e6ee3a37SJohannes Berg DECLARE_EVENT_CLASS(chanswitch_evt,
1222011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
12230f791eb4SLuciano Coelho 		 struct ieee80211_sub_if_data *sdata,
1224011ad0e9SJohannes Berg 		 struct ieee80211_channel_switch *ch_switch),
1225011ad0e9SJohannes Berg 
12260f791eb4SLuciano Coelho 	TP_ARGS(local, sdata, ch_switch),
1227011ad0e9SJohannes Berg 
1228011ad0e9SJohannes Berg 	TP_STRUCT__entry(
1229011ad0e9SJohannes Berg 		LOCAL_ENTRY
12300f791eb4SLuciano Coelho 		VIF_ENTRY
123185220d71SJohannes Berg 		CHANDEF_ENTRY
1232011ad0e9SJohannes Berg 		__field(u64, timestamp)
12332ba45384SLuciano Coelho 		__field(u32, device_timestamp)
1234011ad0e9SJohannes Berg 		__field(bool, block_tx)
1235011ad0e9SJohannes Berg 		__field(u8, count)
1236e6ee3a37SJohannes Berg 		__field(u8, link_id)
1237011ad0e9SJohannes Berg 	),
1238011ad0e9SJohannes Berg 
1239011ad0e9SJohannes Berg 	TP_fast_assign(
1240011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
12410f791eb4SLuciano Coelho 		VIF_ASSIGN;
124285220d71SJohannes Berg 		CHANDEF_ASSIGN(&ch_switch->chandef)
1243011ad0e9SJohannes Berg 		__entry->timestamp = ch_switch->timestamp;
12442ba45384SLuciano Coelho 		__entry->device_timestamp = ch_switch->device_timestamp;
1245011ad0e9SJohannes Berg 		__entry->block_tx = ch_switch->block_tx;
1246011ad0e9SJohannes Berg 		__entry->count = ch_switch->count;
1247e6ee3a37SJohannes Berg 		__entry->link_id = ch_switch->link_id;
1248011ad0e9SJohannes Berg 	),
1249011ad0e9SJohannes Berg 
1250011ad0e9SJohannes Berg 	TP_printk(
1251e6ee3a37SJohannes Berg 		LOCAL_PR_FMT VIF_PR_FMT CHANDEF_PR_FMT  " count:%d block_tx:%d timestamp:%llu device_ts:%u link_id:%d",
1252e6ee3a37SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count,
1253e6ee3a37SJohannes Berg 		__entry->block_tx, __entry->timestamp,
1254e6ee3a37SJohannes Berg 		__entry->device_timestamp, __entry->link_id
1255011ad0e9SJohannes Berg 	)
1256011ad0e9SJohannes Berg );
1257011ad0e9SJohannes Berg 
1258e6ee3a37SJohannes Berg DEFINE_EVENT(chanswitch_evt, drv_channel_switch,
1259e6ee3a37SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
1260e6ee3a37SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
1261e6ee3a37SJohannes Berg 		 struct ieee80211_channel_switch *ch_switch),
1262e6ee3a37SJohannes Berg 	TP_ARGS(local, sdata, ch_switch)
1263e6ee3a37SJohannes Berg );
1264e6ee3a37SJohannes Berg 
1265011ad0e9SJohannes Berg TRACE_EVENT(drv_set_antenna,
1266011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1267011ad0e9SJohannes Berg 
1268011ad0e9SJohannes Berg 	TP_ARGS(local, tx_ant, rx_ant, ret),
1269011ad0e9SJohannes Berg 
1270011ad0e9SJohannes Berg 	TP_STRUCT__entry(
1271011ad0e9SJohannes Berg 		LOCAL_ENTRY
1272011ad0e9SJohannes Berg 		__field(u32, tx_ant)
1273011ad0e9SJohannes Berg 		__field(u32, rx_ant)
1274011ad0e9SJohannes Berg 		__field(int, ret)
1275011ad0e9SJohannes Berg 	),
1276011ad0e9SJohannes Berg 
1277011ad0e9SJohannes Berg 	TP_fast_assign(
1278011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
1279011ad0e9SJohannes Berg 		__entry->tx_ant = tx_ant;
1280011ad0e9SJohannes Berg 		__entry->rx_ant = rx_ant;
1281011ad0e9SJohannes Berg 		__entry->ret = ret;
1282011ad0e9SJohannes Berg 	),
1283011ad0e9SJohannes Berg 
1284011ad0e9SJohannes Berg 	TP_printk(
1285011ad0e9SJohannes Berg 		LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1286011ad0e9SJohannes Berg 		LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1287011ad0e9SJohannes Berg 	)
1288011ad0e9SJohannes Berg );
1289011ad0e9SJohannes Berg 
1290011ad0e9SJohannes Berg TRACE_EVENT(drv_get_antenna,
1291011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1292011ad0e9SJohannes Berg 
1293011ad0e9SJohannes Berg 	TP_ARGS(local, tx_ant, rx_ant, ret),
1294011ad0e9SJohannes Berg 
1295011ad0e9SJohannes Berg 	TP_STRUCT__entry(
1296011ad0e9SJohannes Berg 		LOCAL_ENTRY
1297011ad0e9SJohannes Berg 		__field(u32, tx_ant)
1298011ad0e9SJohannes Berg 		__field(u32, rx_ant)
1299011ad0e9SJohannes Berg 		__field(int, ret)
1300011ad0e9SJohannes Berg 	),
1301011ad0e9SJohannes Berg 
1302011ad0e9SJohannes Berg 	TP_fast_assign(
1303011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
1304011ad0e9SJohannes Berg 		__entry->tx_ant = tx_ant;
1305011ad0e9SJohannes Berg 		__entry->rx_ant = rx_ant;
1306011ad0e9SJohannes Berg 		__entry->ret = ret;
1307011ad0e9SJohannes Berg 	),
1308011ad0e9SJohannes Berg 
1309011ad0e9SJohannes Berg 	TP_printk(
1310011ad0e9SJohannes Berg 		LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1311011ad0e9SJohannes Berg 		LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1312011ad0e9SJohannes Berg 	)
1313011ad0e9SJohannes Berg );
1314011ad0e9SJohannes Berg 
1315011ad0e9SJohannes Berg TRACE_EVENT(drv_remain_on_channel,
131649884568SEliad Peller 	TP_PROTO(struct ieee80211_local *local,
131749884568SEliad Peller 		 struct ieee80211_sub_if_data *sdata,
131849884568SEliad Peller 		 struct ieee80211_channel *chan,
1319d339d5caSIlan Peer 		 unsigned int duration,
1320d339d5caSIlan Peer 		 enum ieee80211_roc_type type),
1321011ad0e9SJohannes Berg 
1322d339d5caSIlan Peer 	TP_ARGS(local, sdata, chan, duration, type),
1323011ad0e9SJohannes Berg 
1324011ad0e9SJohannes Berg 	TP_STRUCT__entry(
1325011ad0e9SJohannes Berg 		LOCAL_ENTRY
132649884568SEliad Peller 		VIF_ENTRY
1327011ad0e9SJohannes Berg 		__field(int, center_freq)
1328b6011960SThomas Pedersen 		__field(int, freq_offset)
1329011ad0e9SJohannes Berg 		__field(unsigned int, duration)
1330d339d5caSIlan Peer 		__field(u32, type)
1331011ad0e9SJohannes Berg 	),
1332011ad0e9SJohannes Berg 
1333011ad0e9SJohannes Berg 	TP_fast_assign(
1334011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
133549884568SEliad Peller 		VIF_ASSIGN;
1336011ad0e9SJohannes Berg 		__entry->center_freq = chan->center_freq;
1337b6011960SThomas Pedersen 		__entry->freq_offset = chan->freq_offset;
1338011ad0e9SJohannes Berg 		__entry->duration = duration;
1339d339d5caSIlan Peer 		__entry->type = type;
1340011ad0e9SJohannes Berg 	),
1341011ad0e9SJohannes Berg 
1342011ad0e9SJohannes Berg 	TP_printk(
1343b6011960SThomas Pedersen 		LOCAL_PR_FMT  VIF_PR_FMT " freq:%d.%03dMHz duration:%dms type=%d",
134449884568SEliad Peller 		LOCAL_PR_ARG, VIF_PR_ARG,
1345b6011960SThomas Pedersen 		__entry->center_freq, __entry->freq_offset,
1346b6011960SThomas Pedersen 		__entry->duration, __entry->type
1347011ad0e9SJohannes Berg 	)
1348011ad0e9SJohannes Berg );
1349011ad0e9SJohannes Berg 
13505db4c4b9SEmmanuel Grumbach DEFINE_EVENT(local_sdata_evt, drv_cancel_remain_on_channel,
13515db4c4b9SEmmanuel Grumbach 	TP_PROTO(struct ieee80211_local *local,
13525db4c4b9SEmmanuel Grumbach 		 struct ieee80211_sub_if_data *sdata),
13535db4c4b9SEmmanuel Grumbach 	TP_ARGS(local, sdata)
1354011ad0e9SJohannes Berg );
1355011ad0e9SJohannes Berg 
1356011ad0e9SJohannes Berg TRACE_EVENT(drv_set_ringparam,
1357011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1358011ad0e9SJohannes Berg 
1359011ad0e9SJohannes Berg 	TP_ARGS(local, tx, rx),
1360011ad0e9SJohannes Berg 
1361011ad0e9SJohannes Berg 	TP_STRUCT__entry(
1362011ad0e9SJohannes Berg 		LOCAL_ENTRY
1363011ad0e9SJohannes Berg 		__field(u32, tx)
1364011ad0e9SJohannes Berg 		__field(u32, rx)
1365011ad0e9SJohannes Berg 	),
1366011ad0e9SJohannes Berg 
1367011ad0e9SJohannes Berg 	TP_fast_assign(
1368011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
1369011ad0e9SJohannes Berg 		__entry->tx = tx;
1370011ad0e9SJohannes Berg 		__entry->rx = rx;
1371011ad0e9SJohannes Berg 	),
1372011ad0e9SJohannes Berg 
1373011ad0e9SJohannes Berg 	TP_printk(
1374011ad0e9SJohannes Berg 		LOCAL_PR_FMT " tx:%d rx %d",
1375011ad0e9SJohannes Berg 		LOCAL_PR_ARG, __entry->tx, __entry->rx
1376011ad0e9SJohannes Berg 	)
1377011ad0e9SJohannes Berg );
1378011ad0e9SJohannes Berg 
1379011ad0e9SJohannes Berg TRACE_EVENT(drv_get_ringparam,
1380011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1381011ad0e9SJohannes Berg 		 u32 *rx, u32 *rx_max),
1382011ad0e9SJohannes Berg 
1383011ad0e9SJohannes Berg 	TP_ARGS(local, tx, tx_max, rx, rx_max),
1384011ad0e9SJohannes Berg 
1385011ad0e9SJohannes Berg 	TP_STRUCT__entry(
1386011ad0e9SJohannes Berg 		LOCAL_ENTRY
1387011ad0e9SJohannes Berg 		__field(u32, tx)
1388011ad0e9SJohannes Berg 		__field(u32, tx_max)
1389011ad0e9SJohannes Berg 		__field(u32, rx)
1390011ad0e9SJohannes Berg 		__field(u32, rx_max)
1391011ad0e9SJohannes Berg 	),
1392011ad0e9SJohannes Berg 
1393011ad0e9SJohannes Berg 	TP_fast_assign(
1394011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
1395011ad0e9SJohannes Berg 		__entry->tx = *tx;
1396011ad0e9SJohannes Berg 		__entry->tx_max = *tx_max;
1397011ad0e9SJohannes Berg 		__entry->rx = *rx;
1398011ad0e9SJohannes Berg 		__entry->rx_max = *rx_max;
1399011ad0e9SJohannes Berg 	),
1400011ad0e9SJohannes Berg 
1401011ad0e9SJohannes Berg 	TP_printk(
1402011ad0e9SJohannes Berg 		LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1403011ad0e9SJohannes Berg 		LOCAL_PR_ARG,
1404011ad0e9SJohannes Berg 		__entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1405011ad0e9SJohannes Berg 	)
1406011ad0e9SJohannes Berg );
1407011ad0e9SJohannes Berg 
1408011ad0e9SJohannes Berg DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1409011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local),
1410011ad0e9SJohannes Berg 	TP_ARGS(local)
1411011ad0e9SJohannes Berg );
1412011ad0e9SJohannes Berg 
1413011ad0e9SJohannes Berg DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1414011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local),
1415011ad0e9SJohannes Berg 	TP_ARGS(local)
1416011ad0e9SJohannes Berg );
1417011ad0e9SJohannes Berg 
1418011ad0e9SJohannes Berg TRACE_EVENT(drv_set_bitrate_mask,
1419011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
1420011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
1421011ad0e9SJohannes Berg 		 const struct cfg80211_bitrate_mask *mask),
1422011ad0e9SJohannes Berg 
1423011ad0e9SJohannes Berg 	TP_ARGS(local, sdata, mask),
1424011ad0e9SJohannes Berg 
1425011ad0e9SJohannes Berg 	TP_STRUCT__entry(
1426011ad0e9SJohannes Berg 		LOCAL_ENTRY
1427011ad0e9SJohannes Berg 		VIF_ENTRY
1428011ad0e9SJohannes Berg 		__field(u32, legacy_2g)
1429011ad0e9SJohannes Berg 		__field(u32, legacy_5g)
1430011ad0e9SJohannes Berg 	),
1431011ad0e9SJohannes Berg 
1432011ad0e9SJohannes Berg 	TP_fast_assign(
1433011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
1434011ad0e9SJohannes Berg 		VIF_ASSIGN;
143557fbcce3SJohannes Berg 		__entry->legacy_2g = mask->control[NL80211_BAND_2GHZ].legacy;
143657fbcce3SJohannes Berg 		__entry->legacy_5g = mask->control[NL80211_BAND_5GHZ].legacy;
1437011ad0e9SJohannes Berg 	),
1438011ad0e9SJohannes Berg 
1439011ad0e9SJohannes Berg 	TP_printk(
1440011ad0e9SJohannes Berg 		LOCAL_PR_FMT  VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1441011ad0e9SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1442011ad0e9SJohannes Berg 	)
1443011ad0e9SJohannes Berg );
1444011ad0e9SJohannes Berg 
1445011ad0e9SJohannes Berg TRACE_EVENT(drv_set_rekey_data,
1446011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
1447011ad0e9SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
1448011ad0e9SJohannes Berg 		 struct cfg80211_gtk_rekey_data *data),
1449011ad0e9SJohannes Berg 
1450011ad0e9SJohannes Berg 	TP_ARGS(local, sdata, data),
1451011ad0e9SJohannes Berg 
1452011ad0e9SJohannes Berg 	TP_STRUCT__entry(
1453011ad0e9SJohannes Berg 		LOCAL_ENTRY
1454011ad0e9SJohannes Berg 		VIF_ENTRY
1455011ad0e9SJohannes Berg 		__array(u8, kek, NL80211_KEK_LEN)
1456011ad0e9SJohannes Berg 		__array(u8, kck, NL80211_KCK_LEN)
1457011ad0e9SJohannes Berg 		__array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1458011ad0e9SJohannes Berg 	),
1459011ad0e9SJohannes Berg 
1460011ad0e9SJohannes Berg 	TP_fast_assign(
1461011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
1462011ad0e9SJohannes Berg 		VIF_ASSIGN;
1463011ad0e9SJohannes Berg 		memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1464011ad0e9SJohannes Berg 		memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1465011ad0e9SJohannes Berg 		memcpy(__entry->replay_ctr, data->replay_ctr,
1466011ad0e9SJohannes Berg 		       NL80211_REPLAY_CTR_LEN);
1467011ad0e9SJohannes Berg 	),
1468011ad0e9SJohannes Berg 
1469011ad0e9SJohannes Berg 	TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1470011ad0e9SJohannes Berg 		  LOCAL_PR_ARG, VIF_PR_ARG)
1471011ad0e9SJohannes Berg );
1472011ad0e9SJohannes Berg 
1473a8182929SEmmanuel Grumbach TRACE_EVENT(drv_event_callback,
1474011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
1475887da917SEmmanuel Grumbach 		 struct ieee80211_sub_if_data *sdata,
1476a8182929SEmmanuel Grumbach 		 const struct ieee80211_event *_event),
1477011ad0e9SJohannes Berg 
1478a8182929SEmmanuel Grumbach 	TP_ARGS(local, sdata, _event),
1479011ad0e9SJohannes Berg 
1480011ad0e9SJohannes Berg 	TP_STRUCT__entry(
1481011ad0e9SJohannes Berg 		LOCAL_ENTRY
1482887da917SEmmanuel Grumbach 		VIF_ENTRY
1483a8182929SEmmanuel Grumbach 		__field(u32, type)
1484011ad0e9SJohannes Berg 	),
1485011ad0e9SJohannes Berg 
1486011ad0e9SJohannes Berg 	TP_fast_assign(
1487011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
1488887da917SEmmanuel Grumbach 		VIF_ASSIGN;
1489a8182929SEmmanuel Grumbach 		__entry->type = _event->type;
1490011ad0e9SJohannes Berg 	),
1491011ad0e9SJohannes Berg 
1492011ad0e9SJohannes Berg 	TP_printk(
1493a8182929SEmmanuel Grumbach 		LOCAL_PR_FMT VIF_PR_FMT " event:%d",
1494a8182929SEmmanuel Grumbach 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->type
1495011ad0e9SJohannes Berg 	)
1496011ad0e9SJohannes Berg );
1497011ad0e9SJohannes Berg 
1498011ad0e9SJohannes Berg DECLARE_EVENT_CLASS(release_evt,
1499011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
1500011ad0e9SJohannes Berg 		 struct ieee80211_sta *sta,
1501011ad0e9SJohannes Berg 		 u16 tids, int num_frames,
1502011ad0e9SJohannes Berg 		 enum ieee80211_frame_release_type reason,
1503011ad0e9SJohannes Berg 		 bool more_data),
1504011ad0e9SJohannes Berg 
1505011ad0e9SJohannes Berg 	TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1506011ad0e9SJohannes Berg 
1507011ad0e9SJohannes Berg 	TP_STRUCT__entry(
1508011ad0e9SJohannes Berg 		LOCAL_ENTRY
1509011ad0e9SJohannes Berg 		STA_ENTRY
1510011ad0e9SJohannes Berg 		__field(u16, tids)
1511011ad0e9SJohannes Berg 		__field(int, num_frames)
1512011ad0e9SJohannes Berg 		__field(int, reason)
1513011ad0e9SJohannes Berg 		__field(bool, more_data)
1514011ad0e9SJohannes Berg 	),
1515011ad0e9SJohannes Berg 
1516011ad0e9SJohannes Berg 	TP_fast_assign(
1517011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
1518011ad0e9SJohannes Berg 		STA_ASSIGN;
1519011ad0e9SJohannes Berg 		__entry->tids = tids;
1520011ad0e9SJohannes Berg 		__entry->num_frames = num_frames;
1521011ad0e9SJohannes Berg 		__entry->reason = reason;
1522011ad0e9SJohannes Berg 		__entry->more_data = more_data;
1523011ad0e9SJohannes Berg 	),
1524011ad0e9SJohannes Berg 
1525011ad0e9SJohannes Berg 	TP_printk(
1526011ad0e9SJohannes Berg 		LOCAL_PR_FMT STA_PR_FMT
1527011ad0e9SJohannes Berg 		" TIDs:0x%.4x frames:%d reason:%d more:%d",
1528011ad0e9SJohannes Berg 		LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1529011ad0e9SJohannes Berg 		__entry->reason, __entry->more_data
1530011ad0e9SJohannes Berg 	)
1531011ad0e9SJohannes Berg );
1532011ad0e9SJohannes Berg 
1533011ad0e9SJohannes Berg DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1534011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
1535011ad0e9SJohannes Berg 		 struct ieee80211_sta *sta,
1536011ad0e9SJohannes Berg 		 u16 tids, int num_frames,
1537011ad0e9SJohannes Berg 		 enum ieee80211_frame_release_type reason,
1538011ad0e9SJohannes Berg 		 bool more_data),
1539011ad0e9SJohannes Berg 
1540011ad0e9SJohannes Berg 	TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1541011ad0e9SJohannes Berg );
1542011ad0e9SJohannes Berg 
1543011ad0e9SJohannes Berg DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1544011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
1545011ad0e9SJohannes Berg 		 struct ieee80211_sta *sta,
1546011ad0e9SJohannes Berg 		 u16 tids, int num_frames,
1547011ad0e9SJohannes Berg 		 enum ieee80211_frame_release_type reason,
1548011ad0e9SJohannes Berg 		 bool more_data),
1549011ad0e9SJohannes Berg 
1550011ad0e9SJohannes Berg 	TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1551011ad0e9SJohannes Berg );
1552011ad0e9SJohannes Berg 
155315fae341SJohannes Berg DECLARE_EVENT_CLASS(mgd_prepare_complete_tx_evt,
1554a1845fc7SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
1555d4e36e55SIlan Peer 		 struct ieee80211_sub_if_data *sdata,
155615fae341SJohannes Berg 		 u16 duration, u16 subtype, bool success),
1557a1845fc7SJohannes Berg 
155815fae341SJohannes Berg 	TP_ARGS(local, sdata, duration, subtype, success),
1559d4e36e55SIlan Peer 
1560d4e36e55SIlan Peer 	TP_STRUCT__entry(
1561d4e36e55SIlan Peer 		LOCAL_ENTRY
1562d4e36e55SIlan Peer 		VIF_ENTRY
1563d4e36e55SIlan Peer 		__field(u32, duration)
156415fae341SJohannes Berg 		__field(u16, subtype)
156515fae341SJohannes Berg 		__field(u8, success)
1566d4e36e55SIlan Peer 	),
1567d4e36e55SIlan Peer 
1568d4e36e55SIlan Peer 	TP_fast_assign(
1569d4e36e55SIlan Peer 		LOCAL_ASSIGN;
1570d4e36e55SIlan Peer 		VIF_ASSIGN;
1571d4e36e55SIlan Peer 		__entry->duration = duration;
157215fae341SJohannes Berg 		__entry->subtype = subtype;
157315fae341SJohannes Berg 		__entry->success = success;
1574d4e36e55SIlan Peer 	),
1575d4e36e55SIlan Peer 
1576d4e36e55SIlan Peer 	TP_printk(
157715fae341SJohannes Berg 		LOCAL_PR_FMT VIF_PR_FMT " duration: %u, subtype:0x%x, success:%d",
157815fae341SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->duration,
157915fae341SJohannes Berg 		__entry->subtype, __entry->success
1580d4e36e55SIlan Peer 	)
1581a1845fc7SJohannes Berg );
1582a1845fc7SJohannes Berg 
158315fae341SJohannes Berg DEFINE_EVENT(mgd_prepare_complete_tx_evt, drv_mgd_prepare_tx,
158415fae341SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
158515fae341SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
158615fae341SJohannes Berg 		 u16 duration, u16 subtype, bool success),
158715fae341SJohannes Berg 
158815fae341SJohannes Berg 	TP_ARGS(local, sdata, duration, subtype, success)
158915fae341SJohannes Berg );
159015fae341SJohannes Berg 
159115fae341SJohannes Berg DEFINE_EVENT(mgd_prepare_complete_tx_evt, drv_mgd_complete_tx,
159215fae341SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
159315fae341SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
159415fae341SJohannes Berg 		 u16 duration, u16 subtype, bool success),
159515fae341SJohannes Berg 
159615fae341SJohannes Berg 	TP_ARGS(local, sdata, duration, subtype, success)
159715fae341SJohannes Berg );
159815fae341SJohannes Berg 
1599ee10f2c7SArik Nemtsov DEFINE_EVENT(local_sdata_evt, drv_mgd_protect_tdls_discover,
1600ee10f2c7SArik Nemtsov 	TP_PROTO(struct ieee80211_local *local,
1601ee10f2c7SArik Nemtsov 		 struct ieee80211_sub_if_data *sdata),
1602ee10f2c7SArik Nemtsov 
1603ee10f2c7SArik Nemtsov 	TP_ARGS(local, sdata)
1604ee10f2c7SArik Nemtsov );
1605ee10f2c7SArik Nemtsov 
1606c3645eacSMichal Kazior DECLARE_EVENT_CLASS(local_chanctx,
1607c3645eacSMichal Kazior 	TP_PROTO(struct ieee80211_local *local,
1608c3645eacSMichal Kazior 		 struct ieee80211_chanctx *ctx),
1609c3645eacSMichal Kazior 
1610c3645eacSMichal Kazior 	TP_ARGS(local, ctx),
1611c3645eacSMichal Kazior 
1612c3645eacSMichal Kazior 	TP_STRUCT__entry(
1613c3645eacSMichal Kazior 		LOCAL_ENTRY
1614c3645eacSMichal Kazior 		CHANCTX_ENTRY
1615c3645eacSMichal Kazior 	),
1616c3645eacSMichal Kazior 
1617c3645eacSMichal Kazior 	TP_fast_assign(
1618c3645eacSMichal Kazior 		LOCAL_ASSIGN;
1619c3645eacSMichal Kazior 		CHANCTX_ASSIGN;
1620c3645eacSMichal Kazior 	),
1621c3645eacSMichal Kazior 
1622c3645eacSMichal Kazior 	TP_printk(
1623c3645eacSMichal Kazior 		LOCAL_PR_FMT CHANCTX_PR_FMT,
1624c3645eacSMichal Kazior 		LOCAL_PR_ARG, CHANCTX_PR_ARG
1625c3645eacSMichal Kazior 	)
1626c3645eacSMichal Kazior );
1627c3645eacSMichal Kazior 
1628c3645eacSMichal Kazior DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1629c3645eacSMichal Kazior 	TP_PROTO(struct ieee80211_local *local,
1630c3645eacSMichal Kazior 		 struct ieee80211_chanctx *ctx),
1631c3645eacSMichal Kazior 	TP_ARGS(local, ctx)
1632c3645eacSMichal Kazior );
1633c3645eacSMichal Kazior 
1634c3645eacSMichal Kazior DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1635c3645eacSMichal Kazior 	TP_PROTO(struct ieee80211_local *local,
1636c3645eacSMichal Kazior 		 struct ieee80211_chanctx *ctx),
1637c3645eacSMichal Kazior 	TP_ARGS(local, ctx)
1638c3645eacSMichal Kazior );
1639c3645eacSMichal Kazior 
1640c3645eacSMichal Kazior TRACE_EVENT(drv_change_chanctx,
1641c3645eacSMichal Kazior 	TP_PROTO(struct ieee80211_local *local,
1642c3645eacSMichal Kazior 		 struct ieee80211_chanctx *ctx,
1643c3645eacSMichal Kazior 		 u32 changed),
1644c3645eacSMichal Kazior 
1645c3645eacSMichal Kazior 	TP_ARGS(local, ctx, changed),
1646c3645eacSMichal Kazior 
1647c3645eacSMichal Kazior 	TP_STRUCT__entry(
1648c3645eacSMichal Kazior 		LOCAL_ENTRY
1649c3645eacSMichal Kazior 		CHANCTX_ENTRY
1650c3645eacSMichal Kazior 		__field(u32, changed)
1651c3645eacSMichal Kazior 	),
1652c3645eacSMichal Kazior 
1653c3645eacSMichal Kazior 	TP_fast_assign(
1654c3645eacSMichal Kazior 		LOCAL_ASSIGN;
1655c3645eacSMichal Kazior 		CHANCTX_ASSIGN;
1656c3645eacSMichal Kazior 		__entry->changed = changed;
1657c3645eacSMichal Kazior 	),
1658c3645eacSMichal Kazior 
1659c3645eacSMichal Kazior 	TP_printk(
1660c3645eacSMichal Kazior 		LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1661c3645eacSMichal Kazior 		LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1662c3645eacSMichal Kazior 	)
1663c3645eacSMichal Kazior );
1664c3645eacSMichal Kazior 
16651a5f0c13SLuciano Coelho #if !defined(__TRACE_VIF_ENTRY)
16661a5f0c13SLuciano Coelho #define __TRACE_VIF_ENTRY
16671a5f0c13SLuciano Coelho struct trace_vif_entry {
16681a5f0c13SLuciano Coelho 	enum nl80211_iftype vif_type;
16691a5f0c13SLuciano Coelho 	bool p2p;
16701a5f0c13SLuciano Coelho 	char vif_name[IFNAMSIZ];
16711a5f0c13SLuciano Coelho } __packed;
16721a5f0c13SLuciano Coelho 
16731a5f0c13SLuciano Coelho struct trace_chandef_entry {
16741a5f0c13SLuciano Coelho 	u32 control_freq;
1675b6011960SThomas Pedersen 	u32 freq_offset;
16761a5f0c13SLuciano Coelho 	u32 chan_width;
16771a5f0c13SLuciano Coelho 	u32 center_freq1;
1678b6011960SThomas Pedersen 	u32 freq1_offset;
16791a5f0c13SLuciano Coelho 	u32 center_freq2;
16801a5f0c13SLuciano Coelho } __packed;
16811a5f0c13SLuciano Coelho 
16821a5f0c13SLuciano Coelho struct trace_switch_entry {
16831a5f0c13SLuciano Coelho 	struct trace_vif_entry vif;
1684b4f85443SJohannes Berg 	unsigned int link_id;
16851a5f0c13SLuciano Coelho 	struct trace_chandef_entry old_chandef;
16861a5f0c13SLuciano Coelho 	struct trace_chandef_entry new_chandef;
16871a5f0c13SLuciano Coelho } __packed;
16881a5f0c13SLuciano Coelho 
16891a5f0c13SLuciano Coelho #define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
16901a5f0c13SLuciano Coelho #endif
16911a5f0c13SLuciano Coelho 
16921a5f0c13SLuciano Coelho TRACE_EVENT(drv_switch_vif_chanctx,
16931a5f0c13SLuciano Coelho 	TP_PROTO(struct ieee80211_local *local,
16941a5f0c13SLuciano Coelho 		 struct ieee80211_vif_chanctx_switch *vifs,
16951a5f0c13SLuciano Coelho 		 int n_vifs, enum ieee80211_chanctx_switch_mode mode),
16961a5f0c13SLuciano Coelho 	    TP_ARGS(local, vifs, n_vifs, mode),
16971a5f0c13SLuciano Coelho 
16981a5f0c13SLuciano Coelho 	TP_STRUCT__entry(
16991a5f0c13SLuciano Coelho 		LOCAL_ENTRY
17001a5f0c13SLuciano Coelho 		__field(int, n_vifs)
17011a5f0c13SLuciano Coelho 		__field(u32, mode)
17021a5f0c13SLuciano Coelho 		__dynamic_array(u8, vifs,
17031a5f0c13SLuciano Coelho 				sizeof(struct trace_switch_entry) * n_vifs)
17041a5f0c13SLuciano Coelho 	),
17051a5f0c13SLuciano Coelho 
17061a5f0c13SLuciano Coelho 	TP_fast_assign(
17071a5f0c13SLuciano Coelho 		LOCAL_ASSIGN;
17081a5f0c13SLuciano Coelho 		__entry->n_vifs = n_vifs;
17091a5f0c13SLuciano Coelho 		__entry->mode = mode;
17101a5f0c13SLuciano Coelho 		{
17111a5f0c13SLuciano Coelho 			struct trace_switch_entry *local_vifs =
17121a5f0c13SLuciano Coelho 				__get_dynamic_array(vifs);
17131a5f0c13SLuciano Coelho 			int i;
17141a5f0c13SLuciano Coelho 
17151a5f0c13SLuciano Coelho 			for (i = 0; i < n_vifs; i++) {
17161a5f0c13SLuciano Coelho 				struct ieee80211_sub_if_data *sdata;
17171a5f0c13SLuciano Coelho 
17181a5f0c13SLuciano Coelho 				sdata = container_of(vifs[i].vif,
17191a5f0c13SLuciano Coelho 						struct ieee80211_sub_if_data,
17201a5f0c13SLuciano Coelho 						vif);
17211a5f0c13SLuciano Coelho 
17221a5f0c13SLuciano Coelho 				SWITCH_ENTRY_ASSIGN(vif.vif_type, vif->type);
17231a5f0c13SLuciano Coelho 				SWITCH_ENTRY_ASSIGN(vif.p2p, vif->p2p);
1724727eff4dSGregory Greenman 				SWITCH_ENTRY_ASSIGN(link_id, link_conf->link_id);
17251a5f0c13SLuciano Coelho 				strncpy(local_vifs[i].vif.vif_name,
17261a5f0c13SLuciano Coelho 					sdata->name,
17271a5f0c13SLuciano Coelho 					sizeof(local_vifs[i].vif.vif_name));
17281a5f0c13SLuciano Coelho 				SWITCH_ENTRY_ASSIGN(old_chandef.control_freq,
17291a5f0c13SLuciano Coelho 						old_ctx->def.chan->center_freq);
1730b6011960SThomas Pedersen 				SWITCH_ENTRY_ASSIGN(old_chandef.freq_offset,
1731b6011960SThomas Pedersen 						old_ctx->def.chan->freq_offset);
17321a5f0c13SLuciano Coelho 				SWITCH_ENTRY_ASSIGN(old_chandef.chan_width,
17331a5f0c13SLuciano Coelho 						    old_ctx->def.width);
17341a5f0c13SLuciano Coelho 				SWITCH_ENTRY_ASSIGN(old_chandef.center_freq1,
17351a5f0c13SLuciano Coelho 						    old_ctx->def.center_freq1);
1736b6011960SThomas Pedersen 				SWITCH_ENTRY_ASSIGN(old_chandef.freq1_offset,
1737b6011960SThomas Pedersen 						    old_ctx->def.freq1_offset);
17381a5f0c13SLuciano Coelho 				SWITCH_ENTRY_ASSIGN(old_chandef.center_freq2,
17391a5f0c13SLuciano Coelho 						    old_ctx->def.center_freq2);
17401a5f0c13SLuciano Coelho 				SWITCH_ENTRY_ASSIGN(new_chandef.control_freq,
17411a5f0c13SLuciano Coelho 						new_ctx->def.chan->center_freq);
1742b6011960SThomas Pedersen 				SWITCH_ENTRY_ASSIGN(new_chandef.freq_offset,
1743b6011960SThomas Pedersen 						new_ctx->def.chan->freq_offset);
17441a5f0c13SLuciano Coelho 				SWITCH_ENTRY_ASSIGN(new_chandef.chan_width,
17451a5f0c13SLuciano Coelho 						    new_ctx->def.width);
17461a5f0c13SLuciano Coelho 				SWITCH_ENTRY_ASSIGN(new_chandef.center_freq1,
17471a5f0c13SLuciano Coelho 						    new_ctx->def.center_freq1);
1748b6011960SThomas Pedersen 				SWITCH_ENTRY_ASSIGN(new_chandef.freq1_offset,
1749b6011960SThomas Pedersen 						    new_ctx->def.freq1_offset);
17501a5f0c13SLuciano Coelho 				SWITCH_ENTRY_ASSIGN(new_chandef.center_freq2,
17511a5f0c13SLuciano Coelho 						    new_ctx->def.center_freq2);
17521a5f0c13SLuciano Coelho 			}
17531a5f0c13SLuciano Coelho 		}
17541a5f0c13SLuciano Coelho 	),
17551a5f0c13SLuciano Coelho 
17561a5f0c13SLuciano Coelho 	TP_printk(
17571a5f0c13SLuciano Coelho 		LOCAL_PR_FMT " n_vifs:%d mode:%d",
17581a5f0c13SLuciano Coelho 		LOCAL_PR_ARG, __entry->n_vifs, __entry->mode
17591a5f0c13SLuciano Coelho 	)
17601a5f0c13SLuciano Coelho );
17611a5f0c13SLuciano Coelho 
1762c3645eacSMichal Kazior DECLARE_EVENT_CLASS(local_sdata_chanctx,
1763c3645eacSMichal Kazior 	TP_PROTO(struct ieee80211_local *local,
1764c3645eacSMichal Kazior 		 struct ieee80211_sub_if_data *sdata,
1765727eff4dSGregory Greenman 		 struct ieee80211_bss_conf *link_conf,
1766c3645eacSMichal Kazior 		 struct ieee80211_chanctx *ctx),
1767c3645eacSMichal Kazior 
1768727eff4dSGregory Greenman 	TP_ARGS(local, sdata, link_conf, ctx),
1769c3645eacSMichal Kazior 
1770c3645eacSMichal Kazior 	TP_STRUCT__entry(
1771c3645eacSMichal Kazior 		LOCAL_ENTRY
1772c3645eacSMichal Kazior 		VIF_ENTRY
1773c3645eacSMichal Kazior 		CHANCTX_ENTRY
1774b4f85443SJohannes Berg 		__field(unsigned int, link_id)
1775c3645eacSMichal Kazior 	),
1776c3645eacSMichal Kazior 
1777c3645eacSMichal Kazior 	TP_fast_assign(
1778c3645eacSMichal Kazior 		LOCAL_ASSIGN;
1779c3645eacSMichal Kazior 		VIF_ASSIGN;
1780c3645eacSMichal Kazior 		CHANCTX_ASSIGN;
1781727eff4dSGregory Greenman 		__entry->link_id = link_conf->link_id;
1782c3645eacSMichal Kazior 	),
1783c3645eacSMichal Kazior 
1784c3645eacSMichal Kazior 	TP_printk(
1785b4f85443SJohannes Berg 		LOCAL_PR_FMT VIF_PR_FMT " link_id:%d" CHANCTX_PR_FMT,
1786b4f85443SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id, CHANCTX_PR_ARG
1787c3645eacSMichal Kazior 	)
1788c3645eacSMichal Kazior );
1789c3645eacSMichal Kazior 
1790c3645eacSMichal Kazior DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1791c3645eacSMichal Kazior 	TP_PROTO(struct ieee80211_local *local,
1792c3645eacSMichal Kazior 		 struct ieee80211_sub_if_data *sdata,
1793727eff4dSGregory Greenman 		 struct ieee80211_bss_conf *link_conf,
1794c3645eacSMichal Kazior 		 struct ieee80211_chanctx *ctx),
1795727eff4dSGregory Greenman 	TP_ARGS(local, sdata, link_conf, ctx)
1796c3645eacSMichal Kazior );
1797c3645eacSMichal Kazior 
1798c3645eacSMichal Kazior DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1799c3645eacSMichal Kazior 	TP_PROTO(struct ieee80211_local *local,
1800c3645eacSMichal Kazior 		 struct ieee80211_sub_if_data *sdata,
1801727eff4dSGregory Greenman 		 struct ieee80211_bss_conf *link_conf,
1802c3645eacSMichal Kazior 		 struct ieee80211_chanctx *ctx),
1803727eff4dSGregory Greenman 	TP_ARGS(local, sdata, link_conf, ctx)
1804c3645eacSMichal Kazior );
1805c3645eacSMichal Kazior 
18061041638fSJohannes Berg TRACE_EVENT(drv_start_ap,
18071041638fSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
18081041638fSJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
1809b327c84cSGregory Greenman 		 struct ieee80211_bss_conf *link_conf),
18101041638fSJohannes Berg 
1811b327c84cSGregory Greenman 	TP_ARGS(local, sdata, link_conf),
18121041638fSJohannes Berg 
18131041638fSJohannes Berg 	TP_STRUCT__entry(
18141041638fSJohannes Berg 		LOCAL_ENTRY
18151041638fSJohannes Berg 		VIF_ENTRY
1816ae7ba17bSShaul Triebitz 		__field(u32, link_id)
18171041638fSJohannes Berg 		__field(u8, dtimper)
18181041638fSJohannes Berg 		__field(u16, bcnint)
1819f276e20bSJohannes Berg 		__dynamic_array(u8, ssid, sdata->vif.cfg.ssid_len)
182004ae87a5SPeter Zijlstra 		__field(bool, hidden_ssid)
18211041638fSJohannes Berg 	),
18221041638fSJohannes Berg 
18231041638fSJohannes Berg 	TP_fast_assign(
18241041638fSJohannes Berg 		LOCAL_ASSIGN;
18251041638fSJohannes Berg 		VIF_ASSIGN;
1826b327c84cSGregory Greenman 		__entry->link_id = link_conf->link_id;
1827b327c84cSGregory Greenman 		__entry->dtimper = link_conf->dtim_period;
1828b327c84cSGregory Greenman 		__entry->bcnint = link_conf->beacon_int;
1829b327c84cSGregory Greenman 		__entry->hidden_ssid = link_conf->hidden_ssid;
1830f276e20bSJohannes Berg 		memcpy(__get_dynamic_array(ssid),
1831f276e20bSJohannes Berg 		       sdata->vif.cfg.ssid,
1832f276e20bSJohannes Berg 		       sdata->vif.cfg.ssid_len);
18331041638fSJohannes Berg 	),
18341041638fSJohannes Berg 
18351041638fSJohannes Berg 	TP_printk(
1836ae7ba17bSShaul Triebitz 		LOCAL_PR_FMT  VIF_PR_FMT " link id %u",
1837ae7ba17bSShaul Triebitz 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id
18381041638fSJohannes Berg 	)
18391041638fSJohannes Berg );
18401041638fSJohannes Berg 
1841ae7ba17bSShaul Triebitz TRACE_EVENT(drv_stop_ap,
18421041638fSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
1843ae7ba17bSShaul Triebitz 		 struct ieee80211_sub_if_data *sdata,
1844b327c84cSGregory Greenman 		 struct ieee80211_bss_conf *link_conf),
1845ae7ba17bSShaul Triebitz 
1846b327c84cSGregory Greenman 	TP_ARGS(local, sdata, link_conf),
1847ae7ba17bSShaul Triebitz 
1848ae7ba17bSShaul Triebitz 	TP_STRUCT__entry(
1849ae7ba17bSShaul Triebitz 		LOCAL_ENTRY
1850ae7ba17bSShaul Triebitz 		VIF_ENTRY
1851ae7ba17bSShaul Triebitz 		__field(u32, link_id)
1852ae7ba17bSShaul Triebitz 	),
1853ae7ba17bSShaul Triebitz 
1854ae7ba17bSShaul Triebitz 	TP_fast_assign(
1855ae7ba17bSShaul Triebitz 		LOCAL_ASSIGN;
1856ae7ba17bSShaul Triebitz 		VIF_ASSIGN;
1857b327c84cSGregory Greenman 		__entry->link_id = link_conf->link_id;
1858ae7ba17bSShaul Triebitz 	),
1859ae7ba17bSShaul Triebitz 
1860ae7ba17bSShaul Triebitz 	TP_printk(
1861ae7ba17bSShaul Triebitz 		LOCAL_PR_FMT  VIF_PR_FMT " link id %u",
1862ae7ba17bSShaul Triebitz 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id
1863ae7ba17bSShaul Triebitz 	)
18641041638fSJohannes Berg );
18651041638fSJohannes Berg 
1866cf2c92d8SEliad Peller TRACE_EVENT(drv_reconfig_complete,
1867cf2c92d8SEliad Peller 	TP_PROTO(struct ieee80211_local *local,
1868cf2c92d8SEliad Peller 		 enum ieee80211_reconfig_type reconfig_type),
1869cf2c92d8SEliad Peller 	TP_ARGS(local, reconfig_type),
1870cf2c92d8SEliad Peller 
1871cf2c92d8SEliad Peller 	TP_STRUCT__entry(
1872cf2c92d8SEliad Peller 		LOCAL_ENTRY
1873cf2c92d8SEliad Peller 		__field(u8, reconfig_type)
1874cf2c92d8SEliad Peller 	),
1875cf2c92d8SEliad Peller 
1876cf2c92d8SEliad Peller 	TP_fast_assign(
1877cf2c92d8SEliad Peller 		LOCAL_ASSIGN;
1878cf2c92d8SEliad Peller 		__entry->reconfig_type = reconfig_type;
1879cf2c92d8SEliad Peller 	),
1880cf2c92d8SEliad Peller 
1881cf2c92d8SEliad Peller 	TP_printk(
1882cf2c92d8SEliad Peller 		LOCAL_PR_FMT  " reconfig_type:%d",
1883cf2c92d8SEliad Peller 		LOCAL_PR_ARG, __entry->reconfig_type
1884cf2c92d8SEliad Peller 	)
1885cf2c92d8SEliad Peller 
18869214ad7fSJohannes Berg );
18879214ad7fSJohannes Berg 
1888a65240c1SJohannes Berg #if IS_ENABLED(CONFIG_IPV6)
1889a65240c1SJohannes Berg DEFINE_EVENT(local_sdata_evt, drv_ipv6_addr_change,
1890a65240c1SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
1891a65240c1SJohannes Berg 		 struct ieee80211_sub_if_data *sdata),
1892a65240c1SJohannes Berg 	TP_ARGS(local, sdata)
1893a65240c1SJohannes Berg );
1894a65240c1SJohannes Berg #endif
1895a65240c1SJohannes Berg 
189655fff501SJohannes Berg TRACE_EVENT(drv_join_ibss,
189755fff501SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
189855fff501SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
189955fff501SJohannes Berg 		 struct ieee80211_bss_conf *info),
190055fff501SJohannes Berg 
190155fff501SJohannes Berg 	TP_ARGS(local, sdata, info),
190255fff501SJohannes Berg 
190355fff501SJohannes Berg 	TP_STRUCT__entry(
190455fff501SJohannes Berg 		LOCAL_ENTRY
190555fff501SJohannes Berg 		VIF_ENTRY
190655fff501SJohannes Berg 		__field(u8, dtimper)
190755fff501SJohannes Berg 		__field(u16, bcnint)
1908f276e20bSJohannes Berg 		__dynamic_array(u8, ssid, sdata->vif.cfg.ssid_len)
190955fff501SJohannes Berg 	),
191055fff501SJohannes Berg 
191155fff501SJohannes Berg 	TP_fast_assign(
191255fff501SJohannes Berg 		LOCAL_ASSIGN;
191355fff501SJohannes Berg 		VIF_ASSIGN;
191455fff501SJohannes Berg 		__entry->dtimper = info->dtim_period;
191555fff501SJohannes Berg 		__entry->bcnint = info->beacon_int;
1916f276e20bSJohannes Berg 		memcpy(__get_dynamic_array(ssid),
1917f276e20bSJohannes Berg 		       sdata->vif.cfg.ssid,
1918f276e20bSJohannes Berg 		       sdata->vif.cfg.ssid_len);
191955fff501SJohannes Berg 	),
192055fff501SJohannes Berg 
192155fff501SJohannes Berg 	TP_printk(
192255fff501SJohannes Berg 		LOCAL_PR_FMT  VIF_PR_FMT,
192355fff501SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG
192455fff501SJohannes Berg 	)
192555fff501SJohannes Berg );
192655fff501SJohannes Berg 
192755fff501SJohannes Berg DEFINE_EVENT(local_sdata_evt, drv_leave_ibss,
192855fff501SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
192955fff501SJohannes Berg 		 struct ieee80211_sub_if_data *sdata),
193055fff501SJohannes Berg 	TP_ARGS(local, sdata)
193155fff501SJohannes Berg );
193255fff501SJohannes Berg 
1933cca674d4SAntonio Quartulli TRACE_EVENT(drv_get_expected_throughput,
1934cca674d4SAntonio Quartulli 	TP_PROTO(struct ieee80211_sta *sta),
1935cca674d4SAntonio Quartulli 
1936cca674d4SAntonio Quartulli 	TP_ARGS(sta),
1937cca674d4SAntonio Quartulli 
1938cca674d4SAntonio Quartulli 	TP_STRUCT__entry(
1939cca674d4SAntonio Quartulli 		STA_ENTRY
1940cca674d4SAntonio Quartulli 	),
1941cca674d4SAntonio Quartulli 
1942cca674d4SAntonio Quartulli 	TP_fast_assign(
1943cca674d4SAntonio Quartulli 		STA_ASSIGN;
1944cca674d4SAntonio Quartulli 	),
1945cca674d4SAntonio Quartulli 
1946cca674d4SAntonio Quartulli 	TP_printk(
1947cca674d4SAntonio Quartulli 		STA_PR_FMT, STA_PR_ARG
1948cca674d4SAntonio Quartulli 	)
1949cca674d4SAntonio Quartulli );
1950cca674d4SAntonio Quartulli 
1951708d50edSAyala Beker TRACE_EVENT(drv_start_nan,
1952708d50edSAyala Beker 	TP_PROTO(struct ieee80211_local *local,
1953708d50edSAyala Beker 		 struct ieee80211_sub_if_data *sdata,
1954708d50edSAyala Beker 		 struct cfg80211_nan_conf *conf),
1955708d50edSAyala Beker 
1956708d50edSAyala Beker 	TP_ARGS(local, sdata, conf),
1957708d50edSAyala Beker 	TP_STRUCT__entry(
1958708d50edSAyala Beker 		LOCAL_ENTRY
1959708d50edSAyala Beker 		VIF_ENTRY
1960708d50edSAyala Beker 		__field(u8, master_pref)
19618585989dSLuca Coelho 		__field(u8, bands)
1962708d50edSAyala Beker 	),
1963708d50edSAyala Beker 
1964708d50edSAyala Beker 	TP_fast_assign(
1965708d50edSAyala Beker 		LOCAL_ASSIGN;
1966708d50edSAyala Beker 		VIF_ASSIGN;
1967708d50edSAyala Beker 		__entry->master_pref = conf->master_pref;
19688585989dSLuca Coelho 		__entry->bands = conf->bands;
1969708d50edSAyala Beker 	),
1970708d50edSAyala Beker 
1971708d50edSAyala Beker 	TP_printk(
1972708d50edSAyala Beker 		LOCAL_PR_FMT  VIF_PR_FMT
19738585989dSLuca Coelho 		", master preference: %u, bands: 0x%0x",
1974708d50edSAyala Beker 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->master_pref,
19758585989dSLuca Coelho 		__entry->bands
1976708d50edSAyala Beker 	)
1977708d50edSAyala Beker );
1978708d50edSAyala Beker 
1979708d50edSAyala Beker TRACE_EVENT(drv_stop_nan,
1980708d50edSAyala Beker 	TP_PROTO(struct ieee80211_local *local,
1981708d50edSAyala Beker 		 struct ieee80211_sub_if_data *sdata),
1982708d50edSAyala Beker 
1983708d50edSAyala Beker 	TP_ARGS(local, sdata),
1984708d50edSAyala Beker 
1985708d50edSAyala Beker 	TP_STRUCT__entry(
1986708d50edSAyala Beker 		LOCAL_ENTRY
1987708d50edSAyala Beker 		VIF_ENTRY
1988708d50edSAyala Beker 	),
1989708d50edSAyala Beker 
1990708d50edSAyala Beker 	TP_fast_assign(
1991708d50edSAyala Beker 		LOCAL_ASSIGN;
1992708d50edSAyala Beker 		VIF_ASSIGN;
1993708d50edSAyala Beker 	),
1994708d50edSAyala Beker 
1995708d50edSAyala Beker 	TP_printk(
1996708d50edSAyala Beker 		LOCAL_PR_FMT  VIF_PR_FMT,
1997708d50edSAyala Beker 		LOCAL_PR_ARG, VIF_PR_ARG
1998708d50edSAyala Beker 	)
1999708d50edSAyala Beker );
2000708d50edSAyala Beker 
20015953ff6dSAyala Beker TRACE_EVENT(drv_nan_change_conf,
20025953ff6dSAyala Beker 	TP_PROTO(struct ieee80211_local *local,
20035953ff6dSAyala Beker 		 struct ieee80211_sub_if_data *sdata,
20045953ff6dSAyala Beker 		 struct cfg80211_nan_conf *conf,
20055953ff6dSAyala Beker 		 u32 changes),
20065953ff6dSAyala Beker 
20075953ff6dSAyala Beker 	TP_ARGS(local, sdata, conf, changes),
20085953ff6dSAyala Beker 	TP_STRUCT__entry(
20095953ff6dSAyala Beker 		LOCAL_ENTRY
20105953ff6dSAyala Beker 		VIF_ENTRY
20115953ff6dSAyala Beker 		__field(u8, master_pref)
20128585989dSLuca Coelho 		__field(u8, bands)
20135953ff6dSAyala Beker 		__field(u32, changes)
20145953ff6dSAyala Beker 	),
20155953ff6dSAyala Beker 
20165953ff6dSAyala Beker 	TP_fast_assign(
20175953ff6dSAyala Beker 		LOCAL_ASSIGN;
20185953ff6dSAyala Beker 		VIF_ASSIGN;
20195953ff6dSAyala Beker 		__entry->master_pref = conf->master_pref;
20208585989dSLuca Coelho 		__entry->bands = conf->bands;
20215953ff6dSAyala Beker 		__entry->changes = changes;
20225953ff6dSAyala Beker 	),
20235953ff6dSAyala Beker 
20245953ff6dSAyala Beker 	TP_printk(
20255953ff6dSAyala Beker 		LOCAL_PR_FMT  VIF_PR_FMT
20268585989dSLuca Coelho 		", master preference: %u, bands: 0x%0x, changes: 0x%x",
20275953ff6dSAyala Beker 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->master_pref,
20288585989dSLuca Coelho 		__entry->bands, __entry->changes
20295953ff6dSAyala Beker 	)
20305953ff6dSAyala Beker );
20315953ff6dSAyala Beker 
2032167e33f4SAyala Beker TRACE_EVENT(drv_add_nan_func,
2033167e33f4SAyala Beker 	TP_PROTO(struct ieee80211_local *local,
2034167e33f4SAyala Beker 		 struct ieee80211_sub_if_data *sdata,
2035167e33f4SAyala Beker 		 const struct cfg80211_nan_func *func),
2036167e33f4SAyala Beker 
2037167e33f4SAyala Beker 	TP_ARGS(local, sdata, func),
2038167e33f4SAyala Beker 	TP_STRUCT__entry(
2039167e33f4SAyala Beker 		LOCAL_ENTRY
2040167e33f4SAyala Beker 		VIF_ENTRY
2041167e33f4SAyala Beker 		__field(u8, type)
2042167e33f4SAyala Beker 		__field(u8, inst_id)
2043167e33f4SAyala Beker 	),
2044167e33f4SAyala Beker 
2045167e33f4SAyala Beker 	TP_fast_assign(
2046167e33f4SAyala Beker 		LOCAL_ASSIGN;
2047167e33f4SAyala Beker 		VIF_ASSIGN;
2048167e33f4SAyala Beker 		__entry->type = func->type;
2049167e33f4SAyala Beker 		__entry->inst_id = func->instance_id;
2050167e33f4SAyala Beker 	),
2051167e33f4SAyala Beker 
2052167e33f4SAyala Beker 	TP_printk(
2053167e33f4SAyala Beker 		LOCAL_PR_FMT  VIF_PR_FMT
2054167e33f4SAyala Beker 		", type: %u, inst_id: %u",
2055167e33f4SAyala Beker 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->type, __entry->inst_id
2056167e33f4SAyala Beker 	)
2057167e33f4SAyala Beker );
2058167e33f4SAyala Beker 
2059167e33f4SAyala Beker TRACE_EVENT(drv_del_nan_func,
2060167e33f4SAyala Beker 	TP_PROTO(struct ieee80211_local *local,
2061167e33f4SAyala Beker 		 struct ieee80211_sub_if_data *sdata,
2062167e33f4SAyala Beker 		 u8 instance_id),
2063167e33f4SAyala Beker 
2064167e33f4SAyala Beker 	TP_ARGS(local, sdata, instance_id),
2065167e33f4SAyala Beker 	TP_STRUCT__entry(
2066167e33f4SAyala Beker 		LOCAL_ENTRY
2067167e33f4SAyala Beker 		VIF_ENTRY
2068167e33f4SAyala Beker 		__field(u8, instance_id)
2069167e33f4SAyala Beker 	),
2070167e33f4SAyala Beker 
2071167e33f4SAyala Beker 	TP_fast_assign(
2072167e33f4SAyala Beker 		LOCAL_ASSIGN;
2073167e33f4SAyala Beker 		VIF_ASSIGN;
2074167e33f4SAyala Beker 		__entry->instance_id = instance_id;
2075167e33f4SAyala Beker 	),
2076167e33f4SAyala Beker 
2077167e33f4SAyala Beker 	TP_printk(
2078167e33f4SAyala Beker 		LOCAL_PR_FMT  VIF_PR_FMT
2079167e33f4SAyala Beker 		", instance_id: %u",
2080167e33f4SAyala Beker 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->instance_id
2081167e33f4SAyala Beker 	)
2082167e33f4SAyala Beker );
2083167e33f4SAyala Beker 
2084cee7013bSJohannes Berg DEFINE_EVENT(local_sdata_evt, drv_start_pmsr,
2085cee7013bSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
2086cee7013bSJohannes Berg 		 struct ieee80211_sub_if_data *sdata),
2087cee7013bSJohannes Berg 	TP_ARGS(local, sdata)
2088cee7013bSJohannes Berg );
2089cee7013bSJohannes Berg 
2090cee7013bSJohannes Berg DEFINE_EVENT(local_sdata_evt, drv_abort_pmsr,
2091cee7013bSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
2092cee7013bSJohannes Berg 		 struct ieee80211_sub_if_data *sdata),
2093cee7013bSJohannes Berg 	TP_ARGS(local, sdata)
2094cee7013bSJohannes Berg );
2095cee7013bSJohannes Berg 
209637a7d0daSJohannes Berg TRACE_EVENT(drv_set_default_unicast_key,
209737a7d0daSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
209837a7d0daSJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
209937a7d0daSJohannes Berg 		 int key_idx),
210037a7d0daSJohannes Berg 
210137a7d0daSJohannes Berg 	TP_ARGS(local, sdata, key_idx),
210237a7d0daSJohannes Berg 
210337a7d0daSJohannes Berg 	TP_STRUCT__entry(
210437a7d0daSJohannes Berg 		LOCAL_ENTRY
210537a7d0daSJohannes Berg 		VIF_ENTRY
210637a7d0daSJohannes Berg 		__field(int, key_idx)
210737a7d0daSJohannes Berg 	),
210837a7d0daSJohannes Berg 
210937a7d0daSJohannes Berg 	TP_fast_assign(
211037a7d0daSJohannes Berg 		LOCAL_ASSIGN;
211137a7d0daSJohannes Berg 		VIF_ASSIGN;
211237a7d0daSJohannes Berg 		__entry->key_idx = key_idx;
211337a7d0daSJohannes Berg 	),
211437a7d0daSJohannes Berg 
211537a7d0daSJohannes Berg 	TP_printk(LOCAL_PR_FMT VIF_PR_FMT " key_idx:%d",
211637a7d0daSJohannes Berg 		  LOCAL_PR_ARG, VIF_PR_ARG, __entry->key_idx)
211737a7d0daSJohannes Berg );
211837a7d0daSJohannes Berg 
211937a7d0daSJohannes Berg TRACE_EVENT(drv_channel_switch_beacon,
212037a7d0daSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
212137a7d0daSJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
212237a7d0daSJohannes Berg 		 struct cfg80211_chan_def *chandef),
212337a7d0daSJohannes Berg 
212437a7d0daSJohannes Berg 	TP_ARGS(local, sdata, chandef),
212537a7d0daSJohannes Berg 
212637a7d0daSJohannes Berg 	TP_STRUCT__entry(
212737a7d0daSJohannes Berg 		LOCAL_ENTRY
212837a7d0daSJohannes Berg 		VIF_ENTRY
212937a7d0daSJohannes Berg 		CHANDEF_ENTRY
213037a7d0daSJohannes Berg 	),
213137a7d0daSJohannes Berg 
213237a7d0daSJohannes Berg 	TP_fast_assign(
213337a7d0daSJohannes Berg 		LOCAL_ASSIGN;
213437a7d0daSJohannes Berg 		VIF_ASSIGN;
213537a7d0daSJohannes Berg 		CHANDEF_ASSIGN(chandef);
213637a7d0daSJohannes Berg 	),
213737a7d0daSJohannes Berg 
213837a7d0daSJohannes Berg 	TP_printk(
213937a7d0daSJohannes Berg 		LOCAL_PR_FMT VIF_PR_FMT " channel switch to " CHANDEF_PR_FMT,
214037a7d0daSJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG
214137a7d0daSJohannes Berg 	)
214237a7d0daSJohannes Berg );
214337a7d0daSJohannes Berg 
2144e6ee3a37SJohannes Berg DEFINE_EVENT(chanswitch_evt, drv_pre_channel_switch,
214537a7d0daSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
214637a7d0daSJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
214737a7d0daSJohannes Berg 		 struct ieee80211_channel_switch *ch_switch),
2148e6ee3a37SJohannes Berg 	TP_ARGS(local, sdata, ch_switch)
214937a7d0daSJohannes Berg );
215037a7d0daSJohannes Berg 
215137a7d0daSJohannes Berg DEFINE_EVENT(local_sdata_evt, drv_post_channel_switch,
215237a7d0daSJohannes Berg 	     TP_PROTO(struct ieee80211_local *local,
215337a7d0daSJohannes Berg 		      struct ieee80211_sub_if_data *sdata),
215437a7d0daSJohannes Berg 	     TP_ARGS(local, sdata)
215537a7d0daSJohannes Berg );
215637a7d0daSJohannes Berg 
215737a7d0daSJohannes Berg DEFINE_EVENT(local_sdata_evt, drv_abort_channel_switch,
215837a7d0daSJohannes Berg 	     TP_PROTO(struct ieee80211_local *local,
215937a7d0daSJohannes Berg 		      struct ieee80211_sub_if_data *sdata),
216037a7d0daSJohannes Berg 	     TP_ARGS(local, sdata)
216137a7d0daSJohannes Berg );
216237a7d0daSJohannes Berg 
2163e6ee3a37SJohannes Berg DEFINE_EVENT(chanswitch_evt, drv_channel_switch_rx_beacon,
216437a7d0daSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
216537a7d0daSJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
216637a7d0daSJohannes Berg 		 struct ieee80211_channel_switch *ch_switch),
2167e6ee3a37SJohannes Berg 	TP_ARGS(local, sdata, ch_switch)
216837a7d0daSJohannes Berg );
216937a7d0daSJohannes Berg 
217037a7d0daSJohannes Berg TRACE_EVENT(drv_get_txpower,
217137a7d0daSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
217237a7d0daSJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
217337a7d0daSJohannes Berg 		 int dbm, int ret),
217437a7d0daSJohannes Berg 
217537a7d0daSJohannes Berg 	TP_ARGS(local, sdata, dbm, ret),
217637a7d0daSJohannes Berg 
217737a7d0daSJohannes Berg 	TP_STRUCT__entry(
217837a7d0daSJohannes Berg 		LOCAL_ENTRY
217937a7d0daSJohannes Berg 		VIF_ENTRY
218037a7d0daSJohannes Berg 		__field(int, dbm)
218137a7d0daSJohannes Berg 		__field(int, ret)
218237a7d0daSJohannes Berg 	),
218337a7d0daSJohannes Berg 
218437a7d0daSJohannes Berg 	TP_fast_assign(
218537a7d0daSJohannes Berg 		LOCAL_ASSIGN;
218637a7d0daSJohannes Berg 		VIF_ASSIGN;
218737a7d0daSJohannes Berg 		__entry->dbm = dbm;
218837a7d0daSJohannes Berg 		__entry->ret = ret;
218937a7d0daSJohannes Berg 	),
219037a7d0daSJohannes Berg 
219137a7d0daSJohannes Berg 	TP_printk(
219237a7d0daSJohannes Berg 		LOCAL_PR_FMT VIF_PR_FMT " dbm:%d ret:%d",
219337a7d0daSJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->dbm, __entry->ret
219437a7d0daSJohannes Berg 	)
219537a7d0daSJohannes Berg );
219637a7d0daSJohannes Berg 
219737a7d0daSJohannes Berg TRACE_EVENT(drv_tdls_channel_switch,
219837a7d0daSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
219937a7d0daSJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
220037a7d0daSJohannes Berg 		 struct ieee80211_sta *sta, u8 oper_class,
220137a7d0daSJohannes Berg 		 struct cfg80211_chan_def *chandef),
220237a7d0daSJohannes Berg 
220337a7d0daSJohannes Berg 	TP_ARGS(local, sdata, sta, oper_class, chandef),
220437a7d0daSJohannes Berg 
220537a7d0daSJohannes Berg 	TP_STRUCT__entry(
220637a7d0daSJohannes Berg 		LOCAL_ENTRY
220737a7d0daSJohannes Berg 		VIF_ENTRY
220837a7d0daSJohannes Berg 		STA_ENTRY
220937a7d0daSJohannes Berg 		__field(u8, oper_class)
221037a7d0daSJohannes Berg 		CHANDEF_ENTRY
221137a7d0daSJohannes Berg 	),
221237a7d0daSJohannes Berg 
221337a7d0daSJohannes Berg 	TP_fast_assign(
221437a7d0daSJohannes Berg 		LOCAL_ASSIGN;
221537a7d0daSJohannes Berg 		VIF_ASSIGN;
221637a7d0daSJohannes Berg 		STA_ASSIGN;
221737a7d0daSJohannes Berg 		__entry->oper_class = oper_class;
221837a7d0daSJohannes Berg 		CHANDEF_ASSIGN(chandef)
221937a7d0daSJohannes Berg 	),
222037a7d0daSJohannes Berg 
222137a7d0daSJohannes Berg 	TP_printk(
222237a7d0daSJohannes Berg 		LOCAL_PR_FMT VIF_PR_FMT " tdls channel switch to"
222337a7d0daSJohannes Berg 		CHANDEF_PR_FMT  " oper_class:%d " STA_PR_FMT,
222437a7d0daSJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->oper_class,
222537a7d0daSJohannes Berg 		STA_PR_ARG
222637a7d0daSJohannes Berg 	)
222737a7d0daSJohannes Berg );
222837a7d0daSJohannes Berg 
222937a7d0daSJohannes Berg TRACE_EVENT(drv_tdls_cancel_channel_switch,
223037a7d0daSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
223137a7d0daSJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
223237a7d0daSJohannes Berg 		 struct ieee80211_sta *sta),
223337a7d0daSJohannes Berg 
223437a7d0daSJohannes Berg 	TP_ARGS(local, sdata, sta),
223537a7d0daSJohannes Berg 
223637a7d0daSJohannes Berg 	TP_STRUCT__entry(
223737a7d0daSJohannes Berg 		LOCAL_ENTRY
223837a7d0daSJohannes Berg 		VIF_ENTRY
223937a7d0daSJohannes Berg 		STA_ENTRY
224037a7d0daSJohannes Berg 	),
224137a7d0daSJohannes Berg 
224237a7d0daSJohannes Berg 	TP_fast_assign(
224337a7d0daSJohannes Berg 		LOCAL_ASSIGN;
224437a7d0daSJohannes Berg 		VIF_ASSIGN;
224537a7d0daSJohannes Berg 		STA_ASSIGN;
224637a7d0daSJohannes Berg 	),
224737a7d0daSJohannes Berg 
224837a7d0daSJohannes Berg 	TP_printk(
224937a7d0daSJohannes Berg 		LOCAL_PR_FMT VIF_PR_FMT
225037a7d0daSJohannes Berg 		" tdls cancel channel switch with " STA_PR_FMT,
225137a7d0daSJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
225237a7d0daSJohannes Berg 	)
225337a7d0daSJohannes Berg );
225437a7d0daSJohannes Berg 
225537a7d0daSJohannes Berg TRACE_EVENT(drv_tdls_recv_channel_switch,
225637a7d0daSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
225737a7d0daSJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
225837a7d0daSJohannes Berg 		 struct ieee80211_tdls_ch_sw_params *params),
225937a7d0daSJohannes Berg 
226037a7d0daSJohannes Berg 	TP_ARGS(local, sdata, params),
226137a7d0daSJohannes Berg 
226237a7d0daSJohannes Berg 	TP_STRUCT__entry(
226337a7d0daSJohannes Berg 		LOCAL_ENTRY
226437a7d0daSJohannes Berg 		VIF_ENTRY
226537a7d0daSJohannes Berg 		__field(u8, action_code)
226637a7d0daSJohannes Berg 		STA_ENTRY
226737a7d0daSJohannes Berg 		CHANDEF_ENTRY
226837a7d0daSJohannes Berg 		__field(u32, status)
226937a7d0daSJohannes Berg 		__field(bool, peer_initiator)
227037a7d0daSJohannes Berg 		__field(u32, timestamp)
227137a7d0daSJohannes Berg 		__field(u16, switch_time)
227237a7d0daSJohannes Berg 		__field(u16, switch_timeout)
227337a7d0daSJohannes Berg 	),
227437a7d0daSJohannes Berg 
227537a7d0daSJohannes Berg 	TP_fast_assign(
227637a7d0daSJohannes Berg 		LOCAL_ASSIGN;
227737a7d0daSJohannes Berg 		VIF_ASSIGN;
227837a7d0daSJohannes Berg 		STA_NAMED_ASSIGN(params->sta);
227937a7d0daSJohannes Berg 		CHANDEF_ASSIGN(params->chandef)
228037a7d0daSJohannes Berg 		__entry->peer_initiator = params->sta->tdls_initiator;
228137a7d0daSJohannes Berg 		__entry->action_code = params->action_code;
228237a7d0daSJohannes Berg 		__entry->status = params->status;
228337a7d0daSJohannes Berg 		__entry->timestamp = params->timestamp;
228437a7d0daSJohannes Berg 		__entry->switch_time = params->switch_time;
228537a7d0daSJohannes Berg 		__entry->switch_timeout = params->switch_timeout;
228637a7d0daSJohannes Berg 	),
228737a7d0daSJohannes Berg 
228837a7d0daSJohannes Berg 	TP_printk(
228937a7d0daSJohannes Berg 		LOCAL_PR_FMT VIF_PR_FMT " received tdls channel switch packet"
229037a7d0daSJohannes Berg 		" action:%d status:%d time:%d switch time:%d switch"
229137a7d0daSJohannes Berg 		" timeout:%d initiator: %d chan:" CHANDEF_PR_FMT STA_PR_FMT,
229237a7d0daSJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->action_code, __entry->status,
229337a7d0daSJohannes Berg 		__entry->timestamp, __entry->switch_time,
229437a7d0daSJohannes Berg 		__entry->switch_timeout, __entry->peer_initiator,
229537a7d0daSJohannes Berg 		CHANDEF_PR_ARG, STA_PR_ARG
229637a7d0daSJohannes Berg 	)
229737a7d0daSJohannes Berg );
229837a7d0daSJohannes Berg 
229937a7d0daSJohannes Berg TRACE_EVENT(drv_wake_tx_queue,
230037a7d0daSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
230137a7d0daSJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
230237a7d0daSJohannes Berg 		 struct txq_info *txq),
230337a7d0daSJohannes Berg 
230437a7d0daSJohannes Berg 	TP_ARGS(local, sdata, txq),
230537a7d0daSJohannes Berg 
230637a7d0daSJohannes Berg 	TP_STRUCT__entry(
230737a7d0daSJohannes Berg 		LOCAL_ENTRY
230837a7d0daSJohannes Berg 		VIF_ENTRY
230937a7d0daSJohannes Berg 		STA_ENTRY
231037a7d0daSJohannes Berg 		__field(u8, ac)
231137a7d0daSJohannes Berg 		__field(u8, tid)
231237a7d0daSJohannes Berg 	),
231337a7d0daSJohannes Berg 
231437a7d0daSJohannes Berg 	TP_fast_assign(
231537a7d0daSJohannes Berg 		struct ieee80211_sta *sta = txq->txq.sta;
231637a7d0daSJohannes Berg 
231737a7d0daSJohannes Berg 		LOCAL_ASSIGN;
231837a7d0daSJohannes Berg 		VIF_ASSIGN;
231937a7d0daSJohannes Berg 		STA_ASSIGN;
232037a7d0daSJohannes Berg 		__entry->ac = txq->txq.ac;
232137a7d0daSJohannes Berg 		__entry->tid = txq->txq.tid;
232237a7d0daSJohannes Berg 	),
232337a7d0daSJohannes Berg 
232437a7d0daSJohannes Berg 	TP_printk(
232537a7d0daSJohannes Berg 		LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT " ac:%d tid:%d",
232637a7d0daSJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ac, __entry->tid
232737a7d0daSJohannes Berg 	)
232837a7d0daSJohannes Berg );
232937a7d0daSJohannes Berg 
233037a7d0daSJohannes Berg TRACE_EVENT(drv_get_ftm_responder_stats,
233137a7d0daSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
233237a7d0daSJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
233337a7d0daSJohannes Berg 		 struct cfg80211_ftm_responder_stats *ftm_stats),
233437a7d0daSJohannes Berg 
233537a7d0daSJohannes Berg 	TP_ARGS(local, sdata, ftm_stats),
233637a7d0daSJohannes Berg 
233737a7d0daSJohannes Berg 	TP_STRUCT__entry(
233837a7d0daSJohannes Berg 		LOCAL_ENTRY
233937a7d0daSJohannes Berg 		VIF_ENTRY
234037a7d0daSJohannes Berg 	),
234137a7d0daSJohannes Berg 
234237a7d0daSJohannes Berg 	TP_fast_assign(
234337a7d0daSJohannes Berg 		LOCAL_ASSIGN;
234437a7d0daSJohannes Berg 		VIF_ASSIGN;
234537a7d0daSJohannes Berg 	),
234637a7d0daSJohannes Berg 
234737a7d0daSJohannes Berg 	TP_printk(
234837a7d0daSJohannes Berg 		LOCAL_PR_FMT VIF_PR_FMT,
234937a7d0daSJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG
235037a7d0daSJohannes Berg 	)
235137a7d0daSJohannes Berg );
235237a7d0daSJohannes Berg 
235337a7d0daSJohannes Berg DEFINE_EVENT(local_sdata_addr_evt, drv_update_vif_offload,
235437a7d0daSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
235537a7d0daSJohannes Berg 		 struct ieee80211_sub_if_data *sdata),
235637a7d0daSJohannes Berg 	TP_ARGS(local, sdata)
235737a7d0daSJohannes Berg );
235837a7d0daSJohannes Berg 
235937a7d0daSJohannes Berg DECLARE_EVENT_CLASS(sta_flag_evt,
236037a7d0daSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
236137a7d0daSJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
236237a7d0daSJohannes Berg 		 struct ieee80211_sta *sta, bool enabled),
236337a7d0daSJohannes Berg 
236437a7d0daSJohannes Berg 	TP_ARGS(local, sdata, sta, enabled),
236537a7d0daSJohannes Berg 
236637a7d0daSJohannes Berg 	TP_STRUCT__entry(
236737a7d0daSJohannes Berg 		LOCAL_ENTRY
236837a7d0daSJohannes Berg 		VIF_ENTRY
236937a7d0daSJohannes Berg 		STA_ENTRY
237037a7d0daSJohannes Berg 		__field(bool, enabled)
237137a7d0daSJohannes Berg 	),
237237a7d0daSJohannes Berg 
237337a7d0daSJohannes Berg 	TP_fast_assign(
237437a7d0daSJohannes Berg 		LOCAL_ASSIGN;
237537a7d0daSJohannes Berg 		VIF_ASSIGN;
237637a7d0daSJohannes Berg 		STA_ASSIGN;
237737a7d0daSJohannes Berg 		__entry->enabled = enabled;
237837a7d0daSJohannes Berg 	),
237937a7d0daSJohannes Berg 
238037a7d0daSJohannes Berg 	TP_printk(
238137a7d0daSJohannes Berg 		LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT " enabled:%d",
238237a7d0daSJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->enabled
238337a7d0daSJohannes Berg 	)
238437a7d0daSJohannes Berg );
238537a7d0daSJohannes Berg 
238637a7d0daSJohannes Berg DEFINE_EVENT(sta_flag_evt, drv_sta_set_4addr,
238737a7d0daSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
238837a7d0daSJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
238937a7d0daSJohannes Berg 		 struct ieee80211_sta *sta, bool enabled),
239037a7d0daSJohannes Berg 
239137a7d0daSJohannes Berg 	TP_ARGS(local, sdata, sta, enabled)
239237a7d0daSJohannes Berg );
239337a7d0daSJohannes Berg 
239437a7d0daSJohannes Berg DEFINE_EVENT(sta_flag_evt, drv_sta_set_decap_offload,
239537a7d0daSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
239637a7d0daSJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
239737a7d0daSJohannes Berg 		 struct ieee80211_sta *sta, bool enabled),
239837a7d0daSJohannes Berg 
239937a7d0daSJohannes Berg 	TP_ARGS(local, sdata, sta, enabled)
240037a7d0daSJohannes Berg );
240137a7d0daSJohannes Berg 
240237a7d0daSJohannes Berg TRACE_EVENT(drv_add_twt_setup,
240337a7d0daSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
240437a7d0daSJohannes Berg 		 struct ieee80211_sta *sta,
240537a7d0daSJohannes Berg 		 struct ieee80211_twt_setup *twt,
240637a7d0daSJohannes Berg 		 struct ieee80211_twt_params *twt_agrt),
240737a7d0daSJohannes Berg 
240837a7d0daSJohannes Berg 	TP_ARGS(local, sta, twt, twt_agrt),
240937a7d0daSJohannes Berg 
241037a7d0daSJohannes Berg 	TP_STRUCT__entry(
241137a7d0daSJohannes Berg 		LOCAL_ENTRY
241237a7d0daSJohannes Berg 		STA_ENTRY
241337a7d0daSJohannes Berg 		__field(u8, dialog_token)
241437a7d0daSJohannes Berg 		__field(u8, control)
241537a7d0daSJohannes Berg 		__field(__le16, req_type)
241637a7d0daSJohannes Berg 		__field(__le64, twt)
241737a7d0daSJohannes Berg 		__field(u8, duration)
241837a7d0daSJohannes Berg 		__field(__le16, mantissa)
241937a7d0daSJohannes Berg 		__field(u8, channel)
242037a7d0daSJohannes Berg 	),
242137a7d0daSJohannes Berg 
242237a7d0daSJohannes Berg 	TP_fast_assign(
242337a7d0daSJohannes Berg 		LOCAL_ASSIGN;
242437a7d0daSJohannes Berg 		STA_ASSIGN;
242537a7d0daSJohannes Berg 		__entry->dialog_token = twt->dialog_token;
242637a7d0daSJohannes Berg 		__entry->control = twt->control;
242737a7d0daSJohannes Berg 		__entry->req_type = twt_agrt->req_type;
242837a7d0daSJohannes Berg 		__entry->twt = twt_agrt->twt;
242937a7d0daSJohannes Berg 		__entry->duration = twt_agrt->min_twt_dur;
243037a7d0daSJohannes Berg 		__entry->mantissa = twt_agrt->mantissa;
243137a7d0daSJohannes Berg 		__entry->channel = twt_agrt->channel;
243237a7d0daSJohannes Berg 	),
243337a7d0daSJohannes Berg 
243437a7d0daSJohannes Berg 	TP_printk(
243537a7d0daSJohannes Berg 		LOCAL_PR_FMT STA_PR_FMT
243637a7d0daSJohannes Berg 		" token:%d control:0x%02x req_type:0x%04x"
243737a7d0daSJohannes Berg 		" twt:%llu duration:%d mantissa:%d channel:%d",
243837a7d0daSJohannes Berg 		LOCAL_PR_ARG, STA_PR_ARG, __entry->dialog_token,
243937a7d0daSJohannes Berg 		__entry->control, le16_to_cpu(__entry->req_type),
244037a7d0daSJohannes Berg 		le64_to_cpu(__entry->twt), __entry->duration,
244137a7d0daSJohannes Berg 		le16_to_cpu(__entry->mantissa), __entry->channel
244237a7d0daSJohannes Berg 	)
244337a7d0daSJohannes Berg );
244437a7d0daSJohannes Berg 
244537a7d0daSJohannes Berg TRACE_EVENT(drv_twt_teardown_request,
244637a7d0daSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
244737a7d0daSJohannes Berg 		 struct ieee80211_sta *sta, u8 flowid),
244837a7d0daSJohannes Berg 
244937a7d0daSJohannes Berg 	TP_ARGS(local, sta, flowid),
245037a7d0daSJohannes Berg 
245137a7d0daSJohannes Berg 	TP_STRUCT__entry(
245237a7d0daSJohannes Berg 		LOCAL_ENTRY
245337a7d0daSJohannes Berg 		STA_ENTRY
245437a7d0daSJohannes Berg 		__field(u8, flowid)
245537a7d0daSJohannes Berg 	),
245637a7d0daSJohannes Berg 
245737a7d0daSJohannes Berg 	TP_fast_assign(
245837a7d0daSJohannes Berg 		LOCAL_ASSIGN;
245937a7d0daSJohannes Berg 		STA_ASSIGN;
246037a7d0daSJohannes Berg 		__entry->flowid = flowid;
246137a7d0daSJohannes Berg 	),
246237a7d0daSJohannes Berg 
246337a7d0daSJohannes Berg 	TP_printk(
246437a7d0daSJohannes Berg 		LOCAL_PR_FMT STA_PR_FMT " flowid:%d",
246537a7d0daSJohannes Berg 		LOCAL_PR_ARG, STA_PR_ARG, __entry->flowid
246637a7d0daSJohannes Berg 	)
246737a7d0daSJohannes Berg );
246837a7d0daSJohannes Berg 
246937a7d0daSJohannes Berg DEFINE_EVENT(sta_event, drv_net_fill_forward_path,
247037a7d0daSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
247137a7d0daSJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
247237a7d0daSJohannes Berg 		 struct ieee80211_sta *sta),
247337a7d0daSJohannes Berg 	TP_ARGS(local, sdata, sta)
247437a7d0daSJohannes Berg );
247537a7d0daSJohannes Berg 
247661587f15SFelix Fietkau TRACE_EVENT(drv_net_setup_tc,
247761587f15SFelix Fietkau 	TP_PROTO(struct ieee80211_local *local,
247861587f15SFelix Fietkau 		 struct ieee80211_sub_if_data *sdata,
247961587f15SFelix Fietkau 		 u8 type),
248061587f15SFelix Fietkau 
248161587f15SFelix Fietkau 	TP_ARGS(local, sdata, type),
248261587f15SFelix Fietkau 
248361587f15SFelix Fietkau 	TP_STRUCT__entry(
248461587f15SFelix Fietkau 		LOCAL_ENTRY
248561587f15SFelix Fietkau 		VIF_ENTRY
248661587f15SFelix Fietkau 		__field(u8, type)
248761587f15SFelix Fietkau 	),
248861587f15SFelix Fietkau 
248961587f15SFelix Fietkau 	TP_fast_assign(
249061587f15SFelix Fietkau 		LOCAL_ASSIGN;
249161587f15SFelix Fietkau 		VIF_ASSIGN;
249261587f15SFelix Fietkau 		__entry->type = type;
249361587f15SFelix Fietkau 	),
249461587f15SFelix Fietkau 
249561587f15SFelix Fietkau 	TP_printk(
249661587f15SFelix Fietkau 		LOCAL_PR_FMT VIF_PR_FMT " type:%d\n",
249761587f15SFelix Fietkau 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->type
249861587f15SFelix Fietkau 	)
249961587f15SFelix Fietkau );
250061587f15SFelix Fietkau 
2501e993af2eSMiri Korenblit TRACE_EVENT(drv_can_activate_links,
2502e993af2eSMiri Korenblit 	TP_PROTO(struct ieee80211_local *local,
2503e993af2eSMiri Korenblit 		 struct ieee80211_sub_if_data *sdata,
2504e993af2eSMiri Korenblit 		 u16 active_links),
2505e993af2eSMiri Korenblit 
2506e993af2eSMiri Korenblit 	TP_ARGS(local, sdata, active_links),
2507e993af2eSMiri Korenblit 
2508e993af2eSMiri Korenblit 	TP_STRUCT__entry(
2509e993af2eSMiri Korenblit 		LOCAL_ENTRY
2510e993af2eSMiri Korenblit 		VIF_ENTRY
2511e993af2eSMiri Korenblit 		__field(u16, active_links)
2512e993af2eSMiri Korenblit 	),
2513e993af2eSMiri Korenblit 
2514e993af2eSMiri Korenblit 	TP_fast_assign(
2515e993af2eSMiri Korenblit 		LOCAL_ASSIGN;
2516e993af2eSMiri Korenblit 		VIF_ASSIGN;
2517e993af2eSMiri Korenblit 		__entry->active_links = active_links;
2518e993af2eSMiri Korenblit 	),
2519e993af2eSMiri Korenblit 
2520e993af2eSMiri Korenblit 	TP_printk(
2521e993af2eSMiri Korenblit 		LOCAL_PR_FMT VIF_PR_FMT " requested active_links:0x%04x\n",
2522e993af2eSMiri Korenblit 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->active_links
2523e993af2eSMiri Korenblit 	)
2524e993af2eSMiri Korenblit );
2525e993af2eSMiri Korenblit 
2526d8787ec6SJohannes Berg TRACE_EVENT(drv_change_vif_links,
2527d8787ec6SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
2528d8787ec6SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
2529d8787ec6SJohannes Berg 		 u16 old_links, u16 new_links),
2530d8787ec6SJohannes Berg 
2531d8787ec6SJohannes Berg 	TP_ARGS(local, sdata, old_links, new_links),
2532d8787ec6SJohannes Berg 
2533d8787ec6SJohannes Berg 	TP_STRUCT__entry(
2534d8787ec6SJohannes Berg 		LOCAL_ENTRY
2535d8787ec6SJohannes Berg 		VIF_ENTRY
2536d8787ec6SJohannes Berg 		__field(u16, old_links)
2537d8787ec6SJohannes Berg 		__field(u16, new_links)
2538d8787ec6SJohannes Berg 	),
2539d8787ec6SJohannes Berg 
2540d8787ec6SJohannes Berg 	TP_fast_assign(
2541d8787ec6SJohannes Berg 		LOCAL_ASSIGN;
2542d8787ec6SJohannes Berg 		VIF_ASSIGN;
2543d8787ec6SJohannes Berg 		__entry->old_links = old_links;
2544d8787ec6SJohannes Berg 		__entry->new_links = new_links;
2545d8787ec6SJohannes Berg 	),
2546d8787ec6SJohannes Berg 
2547d8787ec6SJohannes Berg 	TP_printk(
2548d8787ec6SJohannes Berg 		LOCAL_PR_FMT VIF_PR_FMT " old_links:0x%04x, new_links:0x%04x\n",
2549d8787ec6SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->old_links, __entry->new_links
2550d8787ec6SJohannes Berg 	)
2551d8787ec6SJohannes Berg );
2552d8787ec6SJohannes Berg 
2553cb71f1d1SJohannes Berg TRACE_EVENT(drv_change_sta_links,
2554cb71f1d1SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
2555cb71f1d1SJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
2556cb71f1d1SJohannes Berg 		 struct ieee80211_sta *sta,
2557cb71f1d1SJohannes Berg 		 u16 old_links, u16 new_links),
2558cb71f1d1SJohannes Berg 
2559cb71f1d1SJohannes Berg 	TP_ARGS(local, sdata, sta, old_links, new_links),
2560cb71f1d1SJohannes Berg 
2561cb71f1d1SJohannes Berg 	TP_STRUCT__entry(
2562cb71f1d1SJohannes Berg 		LOCAL_ENTRY
2563cb71f1d1SJohannes Berg 		VIF_ENTRY
2564cb71f1d1SJohannes Berg 		STA_ENTRY
2565cb71f1d1SJohannes Berg 		__field(u16, old_links)
2566cb71f1d1SJohannes Berg 		__field(u16, new_links)
2567cb71f1d1SJohannes Berg 	),
2568cb71f1d1SJohannes Berg 
2569cb71f1d1SJohannes Berg 	TP_fast_assign(
2570cb71f1d1SJohannes Berg 		LOCAL_ASSIGN;
2571cb71f1d1SJohannes Berg 		VIF_ASSIGN;
2572cb71f1d1SJohannes Berg 		STA_ASSIGN;
2573cb71f1d1SJohannes Berg 		__entry->old_links = old_links;
2574cb71f1d1SJohannes Berg 		__entry->new_links = new_links;
2575cb71f1d1SJohannes Berg 	),
2576cb71f1d1SJohannes Berg 
2577cb71f1d1SJohannes Berg 	TP_printk(
2578cb71f1d1SJohannes Berg 		LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " old_links:0x%04x, new_links:0x%04x\n",
2579cb71f1d1SJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
2580cb71f1d1SJohannes Berg 		__entry->old_links, __entry->new_links
2581cb71f1d1SJohannes Berg 	)
2582cb71f1d1SJohannes Berg );
2583cb71f1d1SJohannes Berg 
2584011ad0e9SJohannes Berg /*
2585011ad0e9SJohannes Berg  * Tracing for API calls that drivers call.
2586011ad0e9SJohannes Berg  */
2587011ad0e9SJohannes Berg 
2588011ad0e9SJohannes Berg TRACE_EVENT(api_start_tx_ba_session,
2589011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_sta *sta, u16 tid),
2590011ad0e9SJohannes Berg 
2591011ad0e9SJohannes Berg 	TP_ARGS(sta, tid),
2592011ad0e9SJohannes Berg 
2593011ad0e9SJohannes Berg 	TP_STRUCT__entry(
2594011ad0e9SJohannes Berg 		STA_ENTRY
2595011ad0e9SJohannes Berg 		__field(u16, tid)
2596011ad0e9SJohannes Berg 	),
2597011ad0e9SJohannes Berg 
2598011ad0e9SJohannes Berg 	TP_fast_assign(
2599011ad0e9SJohannes Berg 		STA_ASSIGN;
2600011ad0e9SJohannes Berg 		__entry->tid = tid;
2601011ad0e9SJohannes Berg 	),
2602011ad0e9SJohannes Berg 
2603011ad0e9SJohannes Berg 	TP_printk(
2604011ad0e9SJohannes Berg 		STA_PR_FMT " tid:%d",
2605011ad0e9SJohannes Berg 		STA_PR_ARG, __entry->tid
2606011ad0e9SJohannes Berg 	)
2607011ad0e9SJohannes Berg );
2608011ad0e9SJohannes Berg 
2609011ad0e9SJohannes Berg TRACE_EVENT(api_start_tx_ba_cb,
2610011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
2611011ad0e9SJohannes Berg 
2612011ad0e9SJohannes Berg 	TP_ARGS(sdata, ra, tid),
2613011ad0e9SJohannes Berg 
2614011ad0e9SJohannes Berg 	TP_STRUCT__entry(
2615011ad0e9SJohannes Berg 		VIF_ENTRY
2616011ad0e9SJohannes Berg 		__array(u8, ra, ETH_ALEN)
2617011ad0e9SJohannes Berg 		__field(u16, tid)
2618011ad0e9SJohannes Berg 	),
2619011ad0e9SJohannes Berg 
2620011ad0e9SJohannes Berg 	TP_fast_assign(
2621011ad0e9SJohannes Berg 		VIF_ASSIGN;
2622011ad0e9SJohannes Berg 		memcpy(__entry->ra, ra, ETH_ALEN);
2623011ad0e9SJohannes Berg 		__entry->tid = tid;
2624011ad0e9SJohannes Berg 	),
2625011ad0e9SJohannes Berg 
2626011ad0e9SJohannes Berg 	TP_printk(
2627011ad0e9SJohannes Berg 		VIF_PR_FMT " ra:%pM tid:%d",
2628011ad0e9SJohannes Berg 		VIF_PR_ARG, __entry->ra, __entry->tid
2629011ad0e9SJohannes Berg 	)
2630011ad0e9SJohannes Berg );
2631011ad0e9SJohannes Berg 
2632011ad0e9SJohannes Berg TRACE_EVENT(api_stop_tx_ba_session,
2633011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_sta *sta, u16 tid),
2634011ad0e9SJohannes Berg 
2635011ad0e9SJohannes Berg 	TP_ARGS(sta, tid),
2636011ad0e9SJohannes Berg 
2637011ad0e9SJohannes Berg 	TP_STRUCT__entry(
2638011ad0e9SJohannes Berg 		STA_ENTRY
2639011ad0e9SJohannes Berg 		__field(u16, tid)
2640011ad0e9SJohannes Berg 	),
2641011ad0e9SJohannes Berg 
2642011ad0e9SJohannes Berg 	TP_fast_assign(
2643011ad0e9SJohannes Berg 		STA_ASSIGN;
2644011ad0e9SJohannes Berg 		__entry->tid = tid;
2645011ad0e9SJohannes Berg 	),
2646011ad0e9SJohannes Berg 
2647011ad0e9SJohannes Berg 	TP_printk(
2648011ad0e9SJohannes Berg 		STA_PR_FMT " tid:%d",
2649011ad0e9SJohannes Berg 		STA_PR_ARG, __entry->tid
2650011ad0e9SJohannes Berg 	)
2651011ad0e9SJohannes Berg );
2652011ad0e9SJohannes Berg 
2653011ad0e9SJohannes Berg TRACE_EVENT(api_stop_tx_ba_cb,
2654011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
2655011ad0e9SJohannes Berg 
2656011ad0e9SJohannes Berg 	TP_ARGS(sdata, ra, tid),
2657011ad0e9SJohannes Berg 
2658011ad0e9SJohannes Berg 	TP_STRUCT__entry(
2659011ad0e9SJohannes Berg 		VIF_ENTRY
2660011ad0e9SJohannes Berg 		__array(u8, ra, ETH_ALEN)
2661011ad0e9SJohannes Berg 		__field(u16, tid)
2662011ad0e9SJohannes Berg 	),
2663011ad0e9SJohannes Berg 
2664011ad0e9SJohannes Berg 	TP_fast_assign(
2665011ad0e9SJohannes Berg 		VIF_ASSIGN;
2666011ad0e9SJohannes Berg 		memcpy(__entry->ra, ra, ETH_ALEN);
2667011ad0e9SJohannes Berg 		__entry->tid = tid;
2668011ad0e9SJohannes Berg 	),
2669011ad0e9SJohannes Berg 
2670011ad0e9SJohannes Berg 	TP_printk(
2671011ad0e9SJohannes Berg 		VIF_PR_FMT " ra:%pM tid:%d",
2672011ad0e9SJohannes Berg 		VIF_PR_ARG, __entry->ra, __entry->tid
2673011ad0e9SJohannes Berg 	)
2674011ad0e9SJohannes Berg );
2675011ad0e9SJohannes Berg 
2676011ad0e9SJohannes Berg DEFINE_EVENT(local_only_evt, api_restart_hw,
2677011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local),
2678011ad0e9SJohannes Berg 	TP_ARGS(local)
2679011ad0e9SJohannes Berg );
2680011ad0e9SJohannes Berg 
2681011ad0e9SJohannes Berg TRACE_EVENT(api_beacon_loss,
2682011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_sub_if_data *sdata),
2683011ad0e9SJohannes Berg 
2684011ad0e9SJohannes Berg 	TP_ARGS(sdata),
2685011ad0e9SJohannes Berg 
2686011ad0e9SJohannes Berg 	TP_STRUCT__entry(
2687011ad0e9SJohannes Berg 		VIF_ENTRY
2688011ad0e9SJohannes Berg 	),
2689011ad0e9SJohannes Berg 
2690011ad0e9SJohannes Berg 	TP_fast_assign(
2691011ad0e9SJohannes Berg 		VIF_ASSIGN;
2692011ad0e9SJohannes Berg 	),
2693011ad0e9SJohannes Berg 
2694011ad0e9SJohannes Berg 	TP_printk(
2695011ad0e9SJohannes Berg 		VIF_PR_FMT,
2696011ad0e9SJohannes Berg 		VIF_PR_ARG
2697011ad0e9SJohannes Berg 	)
2698011ad0e9SJohannes Berg );
2699011ad0e9SJohannes Berg 
2700011ad0e9SJohannes Berg TRACE_EVENT(api_connection_loss,
2701011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_sub_if_data *sdata),
2702011ad0e9SJohannes Berg 
2703011ad0e9SJohannes Berg 	TP_ARGS(sdata),
2704011ad0e9SJohannes Berg 
2705011ad0e9SJohannes Berg 	TP_STRUCT__entry(
2706011ad0e9SJohannes Berg 		VIF_ENTRY
2707011ad0e9SJohannes Berg 	),
2708011ad0e9SJohannes Berg 
2709011ad0e9SJohannes Berg 	TP_fast_assign(
2710011ad0e9SJohannes Berg 		VIF_ASSIGN;
2711011ad0e9SJohannes Berg 	),
2712011ad0e9SJohannes Berg 
2713011ad0e9SJohannes Berg 	TP_printk(
2714011ad0e9SJohannes Berg 		VIF_PR_FMT,
2715011ad0e9SJohannes Berg 		VIF_PR_ARG
2716011ad0e9SJohannes Berg 	)
2717011ad0e9SJohannes Berg );
2718011ad0e9SJohannes Berg 
27193f8a39ffSJohannes Berg TRACE_EVENT(api_disconnect,
27203f8a39ffSJohannes Berg 	TP_PROTO(struct ieee80211_sub_if_data *sdata, bool reconnect),
27213f8a39ffSJohannes Berg 
27223f8a39ffSJohannes Berg 	TP_ARGS(sdata, reconnect),
27233f8a39ffSJohannes Berg 
27243f8a39ffSJohannes Berg 	TP_STRUCT__entry(
27253f8a39ffSJohannes Berg 		VIF_ENTRY
27263f8a39ffSJohannes Berg 		__field(int, reconnect)
27273f8a39ffSJohannes Berg 	),
27283f8a39ffSJohannes Berg 
27293f8a39ffSJohannes Berg 	TP_fast_assign(
27303f8a39ffSJohannes Berg 		VIF_ASSIGN;
27313f8a39ffSJohannes Berg 		__entry->reconnect = reconnect;
27323f8a39ffSJohannes Berg 	),
27333f8a39ffSJohannes Berg 
27343f8a39ffSJohannes Berg 	TP_printk(
27353f8a39ffSJohannes Berg 		VIF_PR_FMT " reconnect:%d",
27363f8a39ffSJohannes Berg 		VIF_PR_ARG, __entry->reconnect
27373f8a39ffSJohannes Berg 	)
27383f8a39ffSJohannes Berg );
27393f8a39ffSJohannes Berg 
2740011ad0e9SJohannes Berg TRACE_EVENT(api_cqm_rssi_notify,
2741011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_sub_if_data *sdata,
2742769f07d8SAndrzej Zaborowski 		 enum nl80211_cqm_rssi_threshold_event rssi_event,
2743769f07d8SAndrzej Zaborowski 		 s32 rssi_level),
2744011ad0e9SJohannes Berg 
2745769f07d8SAndrzej Zaborowski 	TP_ARGS(sdata, rssi_event, rssi_level),
2746011ad0e9SJohannes Berg 
2747011ad0e9SJohannes Berg 	TP_STRUCT__entry(
2748011ad0e9SJohannes Berg 		VIF_ENTRY
2749011ad0e9SJohannes Berg 		__field(u32, rssi_event)
2750769f07d8SAndrzej Zaborowski 		__field(s32, rssi_level)
2751011ad0e9SJohannes Berg 	),
2752011ad0e9SJohannes Berg 
2753011ad0e9SJohannes Berg 	TP_fast_assign(
2754011ad0e9SJohannes Berg 		VIF_ASSIGN;
2755011ad0e9SJohannes Berg 		__entry->rssi_event = rssi_event;
2756769f07d8SAndrzej Zaborowski 		__entry->rssi_level = rssi_level;
2757011ad0e9SJohannes Berg 	),
2758011ad0e9SJohannes Berg 
2759011ad0e9SJohannes Berg 	TP_printk(
2760769f07d8SAndrzej Zaborowski 		VIF_PR_FMT " event:%d rssi:%d",
2761769f07d8SAndrzej Zaborowski 		VIF_PR_ARG, __entry->rssi_event, __entry->rssi_level
2762011ad0e9SJohannes Berg 	)
2763011ad0e9SJohannes Berg );
2764011ad0e9SJohannes Berg 
276598f03342SJohannes Berg DEFINE_EVENT(local_sdata_evt, api_cqm_beacon_loss_notify,
276698f03342SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
276798f03342SJohannes Berg 		 struct ieee80211_sub_if_data *sdata),
276898f03342SJohannes Berg 	TP_ARGS(local, sdata)
276998f03342SJohannes Berg );
277098f03342SJohannes Berg 
2771011ad0e9SJohannes Berg TRACE_EVENT(api_scan_completed,
2772011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local, bool aborted),
2773011ad0e9SJohannes Berg 
2774011ad0e9SJohannes Berg 	TP_ARGS(local, aborted),
2775011ad0e9SJohannes Berg 
2776011ad0e9SJohannes Berg 	TP_STRUCT__entry(
2777011ad0e9SJohannes Berg 		LOCAL_ENTRY
2778011ad0e9SJohannes Berg 		__field(bool, aborted)
2779011ad0e9SJohannes Berg 	),
2780011ad0e9SJohannes Berg 
2781011ad0e9SJohannes Berg 	TP_fast_assign(
2782011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
2783011ad0e9SJohannes Berg 		__entry->aborted = aborted;
2784011ad0e9SJohannes Berg 	),
2785011ad0e9SJohannes Berg 
2786011ad0e9SJohannes Berg 	TP_printk(
2787011ad0e9SJohannes Berg 		LOCAL_PR_FMT " aborted:%d",
2788011ad0e9SJohannes Berg 		LOCAL_PR_ARG, __entry->aborted
2789011ad0e9SJohannes Berg 	)
2790011ad0e9SJohannes Berg );
2791011ad0e9SJohannes Berg 
2792011ad0e9SJohannes Berg TRACE_EVENT(api_sched_scan_results,
2793011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local),
2794011ad0e9SJohannes Berg 
2795011ad0e9SJohannes Berg 	TP_ARGS(local),
2796011ad0e9SJohannes Berg 
2797011ad0e9SJohannes Berg 	TP_STRUCT__entry(
2798011ad0e9SJohannes Berg 		LOCAL_ENTRY
2799011ad0e9SJohannes Berg 	),
2800011ad0e9SJohannes Berg 
2801011ad0e9SJohannes Berg 	TP_fast_assign(
2802011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
2803011ad0e9SJohannes Berg 	),
2804011ad0e9SJohannes Berg 
2805011ad0e9SJohannes Berg 	TP_printk(
2806011ad0e9SJohannes Berg 		LOCAL_PR_FMT, LOCAL_PR_ARG
2807011ad0e9SJohannes Berg 	)
2808011ad0e9SJohannes Berg );
2809011ad0e9SJohannes Berg 
2810011ad0e9SJohannes Berg TRACE_EVENT(api_sched_scan_stopped,
2811011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local),
2812011ad0e9SJohannes Berg 
2813011ad0e9SJohannes Berg 	TP_ARGS(local),
2814011ad0e9SJohannes Berg 
2815011ad0e9SJohannes Berg 	TP_STRUCT__entry(
2816011ad0e9SJohannes Berg 		LOCAL_ENTRY
2817011ad0e9SJohannes Berg 	),
2818011ad0e9SJohannes Berg 
2819011ad0e9SJohannes Berg 	TP_fast_assign(
2820011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
2821011ad0e9SJohannes Berg 	),
2822011ad0e9SJohannes Berg 
2823011ad0e9SJohannes Berg 	TP_printk(
2824011ad0e9SJohannes Berg 		LOCAL_PR_FMT, LOCAL_PR_ARG
2825011ad0e9SJohannes Berg 	)
2826011ad0e9SJohannes Berg );
2827011ad0e9SJohannes Berg 
2828011ad0e9SJohannes Berg TRACE_EVENT(api_sta_block_awake,
2829011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
2830011ad0e9SJohannes Berg 		 struct ieee80211_sta *sta, bool block),
2831011ad0e9SJohannes Berg 
2832011ad0e9SJohannes Berg 	TP_ARGS(local, sta, block),
2833011ad0e9SJohannes Berg 
2834011ad0e9SJohannes Berg 	TP_STRUCT__entry(
2835011ad0e9SJohannes Berg 		LOCAL_ENTRY
2836011ad0e9SJohannes Berg 		STA_ENTRY
2837011ad0e9SJohannes Berg 		__field(bool, block)
2838011ad0e9SJohannes Berg 	),
2839011ad0e9SJohannes Berg 
2840011ad0e9SJohannes Berg 	TP_fast_assign(
2841011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
2842011ad0e9SJohannes Berg 		STA_ASSIGN;
2843011ad0e9SJohannes Berg 		__entry->block = block;
2844011ad0e9SJohannes Berg 	),
2845011ad0e9SJohannes Berg 
2846011ad0e9SJohannes Berg 	TP_printk(
2847011ad0e9SJohannes Berg 		LOCAL_PR_FMT STA_PR_FMT " block:%d",
284815ac7c47SSeth Forshee 		LOCAL_PR_ARG, STA_PR_ARG, __entry->block
2849011ad0e9SJohannes Berg 	)
2850011ad0e9SJohannes Berg );
2851011ad0e9SJohannes Berg 
2852011ad0e9SJohannes Berg TRACE_EVENT(api_chswitch_done,
2853a469a593SEmmanuel Grumbach 	TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success,
2854a469a593SEmmanuel Grumbach 		 unsigned int link_id),
2855011ad0e9SJohannes Berg 
2856a469a593SEmmanuel Grumbach 	TP_ARGS(sdata, success, link_id),
2857011ad0e9SJohannes Berg 
2858011ad0e9SJohannes Berg 	TP_STRUCT__entry(
2859011ad0e9SJohannes Berg 		VIF_ENTRY
2860011ad0e9SJohannes Berg 		__field(bool, success)
2861a469a593SEmmanuel Grumbach 		__field(unsigned int, link_id)
2862011ad0e9SJohannes Berg 	),
2863011ad0e9SJohannes Berg 
2864011ad0e9SJohannes Berg 	TP_fast_assign(
2865011ad0e9SJohannes Berg 		VIF_ASSIGN;
2866011ad0e9SJohannes Berg 		__entry->success = success;
2867a469a593SEmmanuel Grumbach 		__entry->link_id = link_id;
2868011ad0e9SJohannes Berg 	),
2869011ad0e9SJohannes Berg 
2870011ad0e9SJohannes Berg 	TP_printk(
2871a469a593SEmmanuel Grumbach 		VIF_PR_FMT " success=%d link_id=%d",
2872a469a593SEmmanuel Grumbach 		VIF_PR_ARG, __entry->success, __entry->link_id
2873011ad0e9SJohannes Berg 	)
2874011ad0e9SJohannes Berg );
2875011ad0e9SJohannes Berg 
2876011ad0e9SJohannes Berg DEFINE_EVENT(local_only_evt, api_ready_on_channel,
2877011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local),
2878011ad0e9SJohannes Berg 	TP_ARGS(local)
2879011ad0e9SJohannes Berg );
2880011ad0e9SJohannes Berg 
2881011ad0e9SJohannes Berg DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
2882011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local),
2883011ad0e9SJohannes Berg 	TP_ARGS(local)
2884011ad0e9SJohannes Berg );
2885011ad0e9SJohannes Berg 
2886011ad0e9SJohannes Berg TRACE_EVENT(api_gtk_rekey_notify,
2887011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_sub_if_data *sdata,
2888011ad0e9SJohannes Berg 		 const u8 *bssid, const u8 *replay_ctr),
2889011ad0e9SJohannes Berg 
2890011ad0e9SJohannes Berg 	TP_ARGS(sdata, bssid, replay_ctr),
2891011ad0e9SJohannes Berg 
2892011ad0e9SJohannes Berg 	TP_STRUCT__entry(
2893011ad0e9SJohannes Berg 		VIF_ENTRY
2894011ad0e9SJohannes Berg 		__array(u8, bssid, ETH_ALEN)
2895011ad0e9SJohannes Berg 		__array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
2896011ad0e9SJohannes Berg 	),
2897011ad0e9SJohannes Berg 
2898011ad0e9SJohannes Berg 	TP_fast_assign(
2899011ad0e9SJohannes Berg 		VIF_ASSIGN;
2900011ad0e9SJohannes Berg 		memcpy(__entry->bssid, bssid, ETH_ALEN);
2901011ad0e9SJohannes Berg 		memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
2902011ad0e9SJohannes Berg 	),
2903011ad0e9SJohannes Berg 
2904011ad0e9SJohannes Berg 	TP_printk(VIF_PR_FMT, VIF_PR_ARG)
2905011ad0e9SJohannes Berg );
2906011ad0e9SJohannes Berg 
2907011ad0e9SJohannes Berg TRACE_EVENT(api_enable_rssi_reports,
2908011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_sub_if_data *sdata,
2909011ad0e9SJohannes Berg 		 int rssi_min_thold, int rssi_max_thold),
2910011ad0e9SJohannes Berg 
2911011ad0e9SJohannes Berg 	TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
2912011ad0e9SJohannes Berg 
2913011ad0e9SJohannes Berg 	TP_STRUCT__entry(
2914011ad0e9SJohannes Berg 		VIF_ENTRY
2915011ad0e9SJohannes Berg 		__field(int, rssi_min_thold)
2916011ad0e9SJohannes Berg 		__field(int, rssi_max_thold)
2917011ad0e9SJohannes Berg 	),
2918011ad0e9SJohannes Berg 
2919011ad0e9SJohannes Berg 	TP_fast_assign(
2920011ad0e9SJohannes Berg 		VIF_ASSIGN;
2921011ad0e9SJohannes Berg 		__entry->rssi_min_thold = rssi_min_thold;
2922011ad0e9SJohannes Berg 		__entry->rssi_max_thold = rssi_max_thold;
2923011ad0e9SJohannes Berg 	),
2924011ad0e9SJohannes Berg 
2925011ad0e9SJohannes Berg 	TP_printk(
2926011ad0e9SJohannes Berg 		VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
2927011ad0e9SJohannes Berg 		VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
2928011ad0e9SJohannes Berg 	)
2929011ad0e9SJohannes Berg );
2930011ad0e9SJohannes Berg 
2931011ad0e9SJohannes Berg TRACE_EVENT(api_eosp,
2932011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
2933011ad0e9SJohannes Berg 		 struct ieee80211_sta *sta),
2934011ad0e9SJohannes Berg 
2935011ad0e9SJohannes Berg 	TP_ARGS(local, sta),
2936011ad0e9SJohannes Berg 
2937011ad0e9SJohannes Berg 	TP_STRUCT__entry(
2938011ad0e9SJohannes Berg 		LOCAL_ENTRY
2939011ad0e9SJohannes Berg 		STA_ENTRY
2940011ad0e9SJohannes Berg 	),
2941011ad0e9SJohannes Berg 
2942011ad0e9SJohannes Berg 	TP_fast_assign(
2943011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
2944011ad0e9SJohannes Berg 		STA_ASSIGN;
2945011ad0e9SJohannes Berg 	),
2946011ad0e9SJohannes Berg 
2947011ad0e9SJohannes Berg 	TP_printk(
2948011ad0e9SJohannes Berg 		LOCAL_PR_FMT STA_PR_FMT,
294915ac7c47SSeth Forshee 		LOCAL_PR_ARG, STA_PR_ARG
2950011ad0e9SJohannes Berg 	)
2951011ad0e9SJohannes Berg );
2952011ad0e9SJohannes Berg 
29530ead2510SEmmanuel Grumbach TRACE_EVENT(api_send_eosp_nullfunc,
29540ead2510SEmmanuel Grumbach 	TP_PROTO(struct ieee80211_local *local,
29550ead2510SEmmanuel Grumbach 		 struct ieee80211_sta *sta,
29560ead2510SEmmanuel Grumbach 		 u8 tid),
29570ead2510SEmmanuel Grumbach 
29580ead2510SEmmanuel Grumbach 	TP_ARGS(local, sta, tid),
29590ead2510SEmmanuel Grumbach 
29600ead2510SEmmanuel Grumbach 	TP_STRUCT__entry(
29610ead2510SEmmanuel Grumbach 		LOCAL_ENTRY
29620ead2510SEmmanuel Grumbach 		STA_ENTRY
29630ead2510SEmmanuel Grumbach 		__field(u8, tid)
29640ead2510SEmmanuel Grumbach 	),
29650ead2510SEmmanuel Grumbach 
29660ead2510SEmmanuel Grumbach 	TP_fast_assign(
29670ead2510SEmmanuel Grumbach 		LOCAL_ASSIGN;
29680ead2510SEmmanuel Grumbach 		STA_ASSIGN;
29690ead2510SEmmanuel Grumbach 		__entry->tid = tid;
29700ead2510SEmmanuel Grumbach 	),
29710ead2510SEmmanuel Grumbach 
29720ead2510SEmmanuel Grumbach 	TP_printk(
29730ead2510SEmmanuel Grumbach 		LOCAL_PR_FMT STA_PR_FMT " tid:%d",
29740ead2510SEmmanuel Grumbach 		LOCAL_PR_ARG, STA_PR_ARG, __entry->tid
29750ead2510SEmmanuel Grumbach 	)
29760ead2510SEmmanuel Grumbach );
29770ead2510SEmmanuel Grumbach 
29781b000789SJohannes Berg TRACE_EVENT(api_sta_set_buffered,
29791b000789SJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
29801b000789SJohannes Berg 		 struct ieee80211_sta *sta,
29811b000789SJohannes Berg 		 u8 tid, bool buffered),
29821b000789SJohannes Berg 
29831b000789SJohannes Berg 	TP_ARGS(local, sta, tid, buffered),
29841b000789SJohannes Berg 
29851b000789SJohannes Berg 	TP_STRUCT__entry(
29861b000789SJohannes Berg 		LOCAL_ENTRY
29871b000789SJohannes Berg 		STA_ENTRY
29881b000789SJohannes Berg 		__field(u8, tid)
29891b000789SJohannes Berg 		__field(bool, buffered)
29901b000789SJohannes Berg 	),
29911b000789SJohannes Berg 
29921b000789SJohannes Berg 	TP_fast_assign(
29931b000789SJohannes Berg 		LOCAL_ASSIGN;
29941b000789SJohannes Berg 		STA_ASSIGN;
29951b000789SJohannes Berg 		__entry->tid = tid;
29961b000789SJohannes Berg 		__entry->buffered = buffered;
29971b000789SJohannes Berg 	),
29981b000789SJohannes Berg 
29991b000789SJohannes Berg 	TP_printk(
30001b000789SJohannes Berg 		LOCAL_PR_FMT STA_PR_FMT " tid:%d buffered:%d",
30011b000789SJohannes Berg 		LOCAL_PR_ARG, STA_PR_ARG, __entry->tid, __entry->buffered
30021b000789SJohannes Berg 	)
30031b000789SJohannes Berg );
30041b000789SJohannes Berg 
300537a7d0daSJohannes Berg TRACE_EVENT(api_radar_detected,
300637a7d0daSJohannes Berg 	TP_PROTO(struct ieee80211_local *local),
300737a7d0daSJohannes Berg 
300837a7d0daSJohannes Berg 	TP_ARGS(local),
300937a7d0daSJohannes Berg 
301037a7d0daSJohannes Berg 	TP_STRUCT__entry(
301137a7d0daSJohannes Berg 		LOCAL_ENTRY
301237a7d0daSJohannes Berg 	),
301337a7d0daSJohannes Berg 
301437a7d0daSJohannes Berg 	TP_fast_assign(
301537a7d0daSJohannes Berg 		LOCAL_ASSIGN;
301637a7d0daSJohannes Berg 	),
301737a7d0daSJohannes Berg 
301837a7d0daSJohannes Berg 	TP_printk(
301937a7d0daSJohannes Berg 		LOCAL_PR_FMT " radar detected",
302037a7d0daSJohannes Berg 		LOCAL_PR_ARG
302137a7d0daSJohannes Berg 	)
302237a7d0daSJohannes Berg );
302337a7d0daSJohannes Berg 
3024f455f5adSJohannes Berg TRACE_EVENT(api_request_smps,
3025f455f5adSJohannes Berg 	TP_PROTO(struct ieee80211_local *local,
3026f455f5adSJohannes Berg 		 struct ieee80211_sub_if_data *sdata,
3027f455f5adSJohannes Berg 		 struct ieee80211_link_data *link,
3028f455f5adSJohannes Berg 		 enum ieee80211_smps_mode smps_mode),
3029f455f5adSJohannes Berg 
3030f455f5adSJohannes Berg 	TP_ARGS(local, sdata, link, smps_mode),
3031f455f5adSJohannes Berg 
3032f455f5adSJohannes Berg 	TP_STRUCT__entry(
3033f455f5adSJohannes Berg 		LOCAL_ENTRY
3034f455f5adSJohannes Berg 		VIF_ENTRY
3035f455f5adSJohannes Berg 		__field(int, link_id)
3036f455f5adSJohannes Berg 		__field(u32, smps_mode)
3037f455f5adSJohannes Berg 	),
3038f455f5adSJohannes Berg 
3039f455f5adSJohannes Berg 	TP_fast_assign(
3040f455f5adSJohannes Berg 		LOCAL_ASSIGN;
3041f455f5adSJohannes Berg 		VIF_ASSIGN;
3042f455f5adSJohannes Berg 		__entry->link_id = link->link_id,
3043f455f5adSJohannes Berg 		__entry->smps_mode = smps_mode;
3044f455f5adSJohannes Berg 	),
3045f455f5adSJohannes Berg 
3046f455f5adSJohannes Berg 	TP_printk(
3047f455f5adSJohannes Berg 		LOCAL_PR_FMT " " VIF_PR_FMT " link:%d, smps_mode:%d",
3048f455f5adSJohannes Berg 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id, __entry->smps_mode
3049f455f5adSJohannes Berg 	)
3050f455f5adSJohannes Berg );
3051f455f5adSJohannes Berg 
3052011ad0e9SJohannes Berg /*
3053011ad0e9SJohannes Berg  * Tracing for internal functions
3054011ad0e9SJohannes Berg  * (which may also be called in response to driver calls)
3055011ad0e9SJohannes Berg  */
3056011ad0e9SJohannes Berg 
3057011ad0e9SJohannes Berg TRACE_EVENT(wake_queue,
3058011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local, u16 queue,
3059011ad0e9SJohannes Berg 		 enum queue_stop_reason reason),
3060011ad0e9SJohannes Berg 
3061011ad0e9SJohannes Berg 	TP_ARGS(local, queue, reason),
3062011ad0e9SJohannes Berg 
3063011ad0e9SJohannes Berg 	TP_STRUCT__entry(
3064011ad0e9SJohannes Berg 		LOCAL_ENTRY
3065011ad0e9SJohannes Berg 		__field(u16, queue)
3066011ad0e9SJohannes Berg 		__field(u32, reason)
3067011ad0e9SJohannes Berg 	),
3068011ad0e9SJohannes Berg 
3069011ad0e9SJohannes Berg 	TP_fast_assign(
3070011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
3071011ad0e9SJohannes Berg 		__entry->queue = queue;
3072011ad0e9SJohannes Berg 		__entry->reason = reason;
3073011ad0e9SJohannes Berg 	),
3074011ad0e9SJohannes Berg 
3075011ad0e9SJohannes Berg 	TP_printk(
3076011ad0e9SJohannes Berg 		LOCAL_PR_FMT " queue:%d, reason:%d",
3077011ad0e9SJohannes Berg 		LOCAL_PR_ARG, __entry->queue, __entry->reason
3078011ad0e9SJohannes Berg 	)
3079011ad0e9SJohannes Berg );
3080011ad0e9SJohannes Berg 
3081011ad0e9SJohannes Berg TRACE_EVENT(stop_queue,
3082011ad0e9SJohannes Berg 	TP_PROTO(struct ieee80211_local *local, u16 queue,
3083011ad0e9SJohannes Berg 		 enum queue_stop_reason reason),
3084011ad0e9SJohannes Berg 
3085011ad0e9SJohannes Berg 	TP_ARGS(local, queue, reason),
3086011ad0e9SJohannes Berg 
3087011ad0e9SJohannes Berg 	TP_STRUCT__entry(
3088011ad0e9SJohannes Berg 		LOCAL_ENTRY
3089011ad0e9SJohannes Berg 		__field(u16, queue)
3090011ad0e9SJohannes Berg 		__field(u32, reason)
3091011ad0e9SJohannes Berg 	),
3092011ad0e9SJohannes Berg 
3093011ad0e9SJohannes Berg 	TP_fast_assign(
3094011ad0e9SJohannes Berg 		LOCAL_ASSIGN;
3095011ad0e9SJohannes Berg 		__entry->queue = queue;
3096011ad0e9SJohannes Berg 		__entry->reason = reason;
3097011ad0e9SJohannes Berg 	),
3098011ad0e9SJohannes Berg 
3099011ad0e9SJohannes Berg 	TP_printk(
3100011ad0e9SJohannes Berg 		LOCAL_PR_FMT " queue:%d, reason:%d",
3101011ad0e9SJohannes Berg 		LOCAL_PR_ARG, __entry->queue, __entry->reason
3102011ad0e9SJohannes Berg 	)
3103011ad0e9SJohannes Berg );
31043fae0273SJohannes Berg 
31058f500fbcSAyala Beker TRACE_EVENT(drv_can_neg_ttlm,
31068f500fbcSAyala Beker 	    TP_PROTO(struct ieee80211_local *local,
31078f500fbcSAyala Beker 		     struct ieee80211_sub_if_data *sdata,
31088f500fbcSAyala Beker 		     struct ieee80211_neg_ttlm *neg_ttlm),
31098f500fbcSAyala Beker 
31108f500fbcSAyala Beker 	TP_ARGS(local, sdata, neg_ttlm),
31118f500fbcSAyala Beker 
31128f500fbcSAyala Beker 	TP_STRUCT__entry(LOCAL_ENTRY
31138f500fbcSAyala Beker 			 VIF_ENTRY
31148f500fbcSAyala Beker 			 __array(u16, downlink, sizeof(u16) * 8)
31158f500fbcSAyala Beker 			 __array(u16, uplink, sizeof(u16) * 8)
31168f500fbcSAyala Beker 	),
31178f500fbcSAyala Beker 
31188f500fbcSAyala Beker 	TP_fast_assign(LOCAL_ASSIGN;
31198f500fbcSAyala Beker 		       VIF_ASSIGN;
31208f500fbcSAyala Beker 		       memcpy(__entry->downlink, neg_ttlm->downlink,
31218f500fbcSAyala Beker 			      sizeof(neg_ttlm->downlink));
31228f500fbcSAyala Beker 		       memcpy(__entry->uplink, neg_ttlm->uplink,
31238f500fbcSAyala Beker 			      sizeof(neg_ttlm->uplink));
31248f500fbcSAyala Beker 	),
31258f500fbcSAyala Beker 
31268f500fbcSAyala Beker 	TP_printk(LOCAL_PR_FMT ", " VIF_PR_FMT, LOCAL_PR_ARG, VIF_PR_ARG)
31278f500fbcSAyala Beker );
31288f500fbcSAyala Beker 
31298f500fbcSAyala Beker TRACE_EVENT(drv_neg_ttlm_res,
31308f500fbcSAyala Beker 	    TP_PROTO(struct ieee80211_local *local,
31318f500fbcSAyala Beker 		     struct ieee80211_sub_if_data *sdata,
31328f500fbcSAyala Beker 		     enum ieee80211_neg_ttlm_res res,
31338f500fbcSAyala Beker 		     struct ieee80211_neg_ttlm *neg_ttlm),
31348f500fbcSAyala Beker 
31358f500fbcSAyala Beker 	TP_ARGS(local, sdata, res, neg_ttlm),
31368f500fbcSAyala Beker 
31378f500fbcSAyala Beker 	TP_STRUCT__entry(LOCAL_ENTRY
31388f500fbcSAyala Beker 			 VIF_ENTRY
31398f500fbcSAyala Beker 			 __field(u32, res)
31408f500fbcSAyala Beker 			 __array(u16, downlink, sizeof(u16) * 8)
31418f500fbcSAyala Beker 			 __array(u16, uplink, sizeof(u16) * 8)
31428f500fbcSAyala Beker 	),
31438f500fbcSAyala Beker 
31448f500fbcSAyala Beker 	TP_fast_assign(LOCAL_ASSIGN;
31458f500fbcSAyala Beker 		       VIF_ASSIGN;
31468f500fbcSAyala Beker 		       __entry->res = res;
31478f500fbcSAyala Beker 		       memcpy(__entry->downlink, neg_ttlm->downlink,
31488f500fbcSAyala Beker 			      sizeof(neg_ttlm->downlink));
31498f500fbcSAyala Beker 		       memcpy(__entry->uplink, neg_ttlm->uplink,
31508f500fbcSAyala Beker 			      sizeof(neg_ttlm->uplink));
31518f500fbcSAyala Beker 	),
31528f500fbcSAyala Beker 
31538f500fbcSAyala Beker 	TP_printk(LOCAL_PR_FMT  VIF_PR_FMT " response: %d\n ",
31548f500fbcSAyala Beker 		  LOCAL_PR_ARG, VIF_PR_ARG, __entry->res
31558f500fbcSAyala Beker 	)
31568f500fbcSAyala Beker );
3157011ad0e9SJohannes Berg #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
3158011ad0e9SJohannes Berg 
3159011ad0e9SJohannes Berg #undef TRACE_INCLUDE_PATH
3160011ad0e9SJohannes Berg #define TRACE_INCLUDE_PATH .
3161011ad0e9SJohannes Berg #undef TRACE_INCLUDE_FILE
3162011ad0e9SJohannes Berg #define TRACE_INCLUDE_FILE trace
3163011ad0e9SJohannes Berg #include <trace/define_trace.h>
3164