blob: 89723907a0945ec0c70967ca0a2407325f95796c [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Sara Sharonf59374e2016-03-02 23:46:14 +02002/*
3* Portions of this file
Sara Sharonfafd2bc2019-02-06 13:17:15 +02004* Copyright(c) 2016-2017 Intel Deutschland GmbH
5* Copyright (C) 2018 - 2019 Intel Corporation
Sara Sharonf59374e2016-03-02 23:46:14 +02006*/
7
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02008#if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
9#define __MAC80211_DRIVER_TRACE
10
11#include <linux/tracepoint.h>
12#include <net/mac80211.h>
13#include "ieee80211_i.h"
14
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020015#undef TRACE_SYSTEM
16#define TRACE_SYSTEM mac80211
17
18#define MAXNAME 32
19#define LOCAL_ENTRY __array(char, wiphy_name, 32)
20#define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME)
21#define LOCAL_PR_FMT "%s"
22#define LOCAL_PR_ARG __entry->wiphy_name
23
24#define STA_ENTRY __array(char, sta_addr, ETH_ALEN)
Miaohe Lin47d76e32020-08-01 17:12:38 +080025#define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : \
26 eth_zero_addr(__entry->sta_addr))
Arik Nemtsov8a4d32f2014-11-09 18:50:20 +020027#define STA_NAMED_ASSIGN(s) memcpy(__entry->sta_addr, (s)->addr, ETH_ALEN)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020028#define STA_PR_FMT " sta:%pM"
29#define STA_PR_ARG __entry->sta_addr
30
Johannes Berg2ca27bc2010-09-16 14:58:23 +020031#define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
32 __field(bool, p2p) \
Eliad Pellerf9ac71b2014-02-26 14:46:35 +020033 __string(vif_name, sdata->name)
Johannes Berg2ca27bc2010-09-16 14:58:23 +020034#define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
35 __entry->p2p = sdata->vif.p2p; \
Eliad Pellerf9ac71b2014-02-26 14:46:35 +020036 __assign_str(vif_name, sdata->name)
Johannes Berg2ca27bc2010-09-16 14:58:23 +020037#define VIF_PR_FMT " vif:%s(%d%s)"
38#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020039
Karl Beldan675a0b02013-03-25 16:26:57 +010040#define CHANDEF_ENTRY __field(u32, control_freq) \
Thomas Pedersenb6011962020-04-01 18:18:04 -070041 __field(u32, freq_offset) \
Karl Beldan675a0b02013-03-25 16:26:57 +010042 __field(u32, chan_width) \
43 __field(u32, center_freq1) \
Thomas Pedersenb6011962020-04-01 18:18:04 -070044 __field(u32, freq1_offset) \
Johannes Berg5a32aff2012-12-21 12:36:33 +010045 __field(u32, center_freq2)
Arik Nemtsov254d3df2015-10-25 10:59:41 +020046#define CHANDEF_ASSIGN(c) \
47 __entry->control_freq = (c) ? ((c)->chan ? (c)->chan->center_freq : 0) : 0; \
Thomas Pedersenb6011962020-04-01 18:18:04 -070048 __entry->freq_offset = (c) ? ((c)->chan ? (c)->chan->freq_offset : 0) : 0; \
Arik Nemtsov254d3df2015-10-25 10:59:41 +020049 __entry->chan_width = (c) ? (c)->width : 0; \
50 __entry->center_freq1 = (c) ? (c)->center_freq1 : 0; \
Thomas Pedersenb6011962020-04-01 18:18:04 -070051 __entry->freq1_offset = (c) ? (c)->freq1_offset : 0; \
Arik Nemtsov254d3df2015-10-25 10:59:41 +020052 __entry->center_freq2 = (c) ? (c)->center_freq2 : 0;
Thomas Pedersenb6011962020-04-01 18:18:04 -070053#define CHANDEF_PR_FMT " control:%d.%03d MHz width:%d center: %d.%03d/%d MHz"
54#define CHANDEF_PR_ARG __entry->control_freq, __entry->freq_offset, __entry->chan_width, \
55 __entry->center_freq1, __entry->freq1_offset, __entry->center_freq2
Johannes Berg5a32aff2012-12-21 12:36:33 +010056
Eliad Peller21f659b2013-11-11 20:14:01 +020057#define MIN_CHANDEF_ENTRY \
58 __field(u32, min_control_freq) \
Thomas Pedersenb6011962020-04-01 18:18:04 -070059 __field(u32, min_freq_offset) \
Eliad Peller21f659b2013-11-11 20:14:01 +020060 __field(u32, min_chan_width) \
61 __field(u32, min_center_freq1) \
Thomas Pedersenb6011962020-04-01 18:18:04 -070062 __field(u32, min_freq1_offset) \
Eliad Peller21f659b2013-11-11 20:14:01 +020063 __field(u32, min_center_freq2)
64
65#define MIN_CHANDEF_ASSIGN(c) \
66 __entry->min_control_freq = (c)->chan ? (c)->chan->center_freq : 0; \
Thomas Pedersenb6011962020-04-01 18:18:04 -070067 __entry->min_freq_offset = (c)->chan ? (c)->chan->freq_offset : 0; \
Eliad Peller21f659b2013-11-11 20:14:01 +020068 __entry->min_chan_width = (c)->width; \
69 __entry->min_center_freq1 = (c)->center_freq1; \
Thomas Pedersenb6011962020-04-01 18:18:04 -070070 __entry->freq1_offset = (c)->freq1_offset; \
Eliad Peller21f659b2013-11-11 20:14:01 +020071 __entry->min_center_freq2 = (c)->center_freq2;
Thomas Pedersenb6011962020-04-01 18:18:04 -070072#define MIN_CHANDEF_PR_FMT " min_control:%d.%03d MHz min_width:%d min_center: %d.%03d/%d MHz"
73#define MIN_CHANDEF_PR_ARG __entry->min_control_freq, __entry->min_freq_offset, \
74 __entry->min_chan_width, \
75 __entry->min_center_freq1, __entry->min_freq1_offset, \
76 __entry->min_center_freq2
Eliad Peller21f659b2013-11-11 20:14:01 +020077
Karl Beldan675a0b02013-03-25 16:26:57 +010078#define CHANCTX_ENTRY CHANDEF_ENTRY \
Eliad Peller21f659b2013-11-11 20:14:01 +020079 MIN_CHANDEF_ENTRY \
Karl Beldan675a0b02013-03-25 16:26:57 +010080 __field(u8, rx_chains_static) \
Johannes Berg04ecd252012-09-11 14:34:12 +020081 __field(u8, rx_chains_dynamic)
Karl Beldan675a0b02013-03-25 16:26:57 +010082#define CHANCTX_ASSIGN CHANDEF_ASSIGN(&ctx->conf.def) \
Eliad Peller21f659b2013-11-11 20:14:01 +020083 MIN_CHANDEF_ASSIGN(&ctx->conf.min_def) \
Karl Beldan675a0b02013-03-25 16:26:57 +010084 __entry->rx_chains_static = ctx->conf.rx_chains_static; \
Johannes Berg04ecd252012-09-11 14:34:12 +020085 __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic
Eliad Peller21f659b2013-11-11 20:14:01 +020086#define CHANCTX_PR_FMT CHANDEF_PR_FMT MIN_CHANDEF_PR_FMT " chains:%d/%d"
87#define CHANCTX_PR_ARG CHANDEF_PR_ARG, MIN_CHANDEF_PR_ARG, \
Johannes Berg04ecd252012-09-11 14:34:12 +020088 __entry->rx_chains_static, __entry->rx_chains_dynamic
Michal Kaziorc3645ea2012-06-26 14:37:17 +020089
Johannes Berg9352c192015-04-20 18:12:41 +020090#define KEY_ENTRY __field(u32, cipher) \
91 __field(u8, hw_key_idx) \
92 __field(u8, flags) \
93 __field(s8, keyidx)
94#define KEY_ASSIGN(k) __entry->cipher = (k)->cipher; \
95 __entry->flags = (k)->flags; \
96 __entry->keyidx = (k)->keyidx; \
97 __entry->hw_key_idx = (k)->hw_key_idx;
98#define KEY_PR_FMT " cipher:0x%x, flags=%#x, keyidx=%d, hw_key_idx=%d"
99#define KEY_PR_ARG __entry->cipher, __entry->flags, __entry->keyidx, __entry->hw_key_idx
100
Sara Sharon50ea05e2015-12-30 16:06:04 +0200101#define AMPDU_ACTION_ENTRY __field(enum ieee80211_ampdu_mlme_action, \
102 ieee80211_ampdu_mlme_action) \
103 STA_ENTRY \
104 __field(u16, tid) \
105 __field(u16, ssn) \
Luca Coelho41cbb0f2018-06-09 09:14:44 +0300106 __field(u16, buf_size) \
Sara Sharon50ea05e2015-12-30 16:06:04 +0200107 __field(bool, amsdu) \
Emmanuel Grumbach6dad28a2017-06-10 13:52:46 +0300108 __field(u16, timeout) \
109 __field(u16, action)
Sara Sharon50ea05e2015-12-30 16:06:04 +0200110#define AMPDU_ACTION_ASSIGN STA_NAMED_ASSIGN(params->sta); \
111 __entry->tid = params->tid; \
112 __entry->ssn = params->ssn; \
113 __entry->buf_size = params->buf_size; \
114 __entry->amsdu = params->amsdu; \
Emmanuel Grumbach6dad28a2017-06-10 13:52:46 +0300115 __entry->timeout = params->timeout; \
116 __entry->action = params->action;
117#define AMPDU_ACTION_PR_FMT STA_PR_FMT " tid %d, ssn %d, buf_size %u, amsdu %d, timeout %d action %d"
Sara Sharon50ea05e2015-12-30 16:06:04 +0200118#define AMPDU_ACTION_PR_ARG STA_PR_ARG, __entry->tid, __entry->ssn, \
Emmanuel Grumbach6dad28a2017-06-10 13:52:46 +0300119 __entry->buf_size, __entry->amsdu, __entry->timeout, \
120 __entry->action
Michal Kaziorc3645ea2012-06-26 14:37:17 +0200121
Johannes Bergb5878a22010-04-07 16:48:40 +0200122/*
123 * Tracing for driver callbacks.
124 */
125
Johannes Bergba99d932011-01-26 09:22:15 +0100126DECLARE_EVENT_CLASS(local_only_evt,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200127 TP_PROTO(struct ieee80211_local *local),
128 TP_ARGS(local),
129 TP_STRUCT__entry(
130 LOCAL_ENTRY
131 ),
132 TP_fast_assign(
133 LOCAL_ASSIGN;
134 ),
135 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
136);
137
Luciano Coelho92ddc112011-05-09 14:40:06 +0300138DECLARE_EVENT_CLASS(local_sdata_addr_evt,
139 TP_PROTO(struct ieee80211_local *local,
140 struct ieee80211_sub_if_data *sdata),
141 TP_ARGS(local, sdata),
142
143 TP_STRUCT__entry(
144 LOCAL_ENTRY
145 VIF_ENTRY
Joe Perchesd458cdf2013-10-01 19:04:40 -0700146 __array(char, addr, ETH_ALEN)
Luciano Coelho92ddc112011-05-09 14:40:06 +0300147 ),
148
149 TP_fast_assign(
150 LOCAL_ASSIGN;
151 VIF_ASSIGN;
Joe Perchesd458cdf2013-10-01 19:04:40 -0700152 memcpy(__entry->addr, sdata->vif.addr, ETH_ALEN);
Luciano Coelho92ddc112011-05-09 14:40:06 +0300153 ),
154
155 TP_printk(
156 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
157 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
158 )
159);
160
161DECLARE_EVENT_CLASS(local_u32_evt,
162 TP_PROTO(struct ieee80211_local *local, u32 value),
163 TP_ARGS(local, value),
164
165 TP_STRUCT__entry(
166 LOCAL_ENTRY
167 __field(u32, value)
168 ),
169
170 TP_fast_assign(
171 LOCAL_ASSIGN;
172 __entry->value = value;
173 ),
174
175 TP_printk(
176 LOCAL_PR_FMT " value:%d",
177 LOCAL_PR_ARG, __entry->value
178 )
179);
180
Luciano Coelho79f460c2011-05-11 17:09:36 +0300181DECLARE_EVENT_CLASS(local_sdata_evt,
182 TP_PROTO(struct ieee80211_local *local,
183 struct ieee80211_sub_if_data *sdata),
184 TP_ARGS(local, sdata),
185
186 TP_STRUCT__entry(
187 LOCAL_ENTRY
188 VIF_ENTRY
189 ),
190
191 TP_fast_assign(
192 LOCAL_ASSIGN;
193 VIF_ASSIGN;
194 ),
195
196 TP_printk(
197 LOCAL_PR_FMT VIF_PR_FMT,
198 LOCAL_PR_ARG, VIF_PR_ARG
199 )
200);
201
Johannes Bergba99d932011-01-26 09:22:15 +0100202DEFINE_EVENT(local_only_evt, drv_return_void,
203 TP_PROTO(struct ieee80211_local *local),
204 TP_ARGS(local)
205);
206
Johannes Berg4efc76b2010-06-10 10:56:20 +0200207TRACE_EVENT(drv_return_int,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200208 TP_PROTO(struct ieee80211_local *local, int ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200209 TP_ARGS(local, ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200210 TP_STRUCT__entry(
211 LOCAL_ENTRY
212 __field(int, ret)
213 ),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200214 TP_fast_assign(
215 LOCAL_ASSIGN;
216 __entry->ret = ret;
217 ),
Johannes Berg4efc76b2010-06-10 10:56:20 +0200218 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
219);
220
Vivek Natarajane8306f92011-04-06 11:41:10 +0530221TRACE_EVENT(drv_return_bool,
222 TP_PROTO(struct ieee80211_local *local, bool ret),
223 TP_ARGS(local, ret),
224 TP_STRUCT__entry(
225 LOCAL_ENTRY
226 __field(bool, ret)
227 ),
228 TP_fast_assign(
229 LOCAL_ASSIGN;
230 __entry->ret = ret;
231 ),
232 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
233 "true" : "false")
234);
235
Antonio Quartullicca674d2014-05-19 21:53:20 +0200236TRACE_EVENT(drv_return_u32,
237 TP_PROTO(struct ieee80211_local *local, u32 ret),
238 TP_ARGS(local, ret),
239 TP_STRUCT__entry(
240 LOCAL_ENTRY
241 __field(u32, ret)
242 ),
243 TP_fast_assign(
244 LOCAL_ASSIGN;
245 __entry->ret = ret;
246 ),
247 TP_printk(LOCAL_PR_FMT " - %u", LOCAL_PR_ARG, __entry->ret)
248);
249
Johannes Berg4efc76b2010-06-10 10:56:20 +0200250TRACE_EVENT(drv_return_u64,
251 TP_PROTO(struct ieee80211_local *local, u64 ret),
252 TP_ARGS(local, ret),
253 TP_STRUCT__entry(
254 LOCAL_ENTRY
255 __field(u64, ret)
256 ),
257 TP_fast_assign(
258 LOCAL_ASSIGN;
259 __entry->ret = ret;
260 ),
261 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
262);
263
Johannes Bergba99d932011-01-26 09:22:15 +0100264DEFINE_EVENT(local_only_evt, drv_start,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200265 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100266 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200267);
268
Ben Greeare3521142012-04-23 12:50:31 -0700269DEFINE_EVENT(local_u32_evt, drv_get_et_strings,
270 TP_PROTO(struct ieee80211_local *local, u32 sset),
271 TP_ARGS(local, sset)
272);
273
274DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count,
275 TP_PROTO(struct ieee80211_local *local, u32 sset),
276 TP_ARGS(local, sset)
277);
278
279DEFINE_EVENT(local_only_evt, drv_get_et_stats,
280 TP_PROTO(struct ieee80211_local *local),
281 TP_ARGS(local)
282);
283
Johannes Bergeecc4802011-05-04 15:37:29 +0200284DEFINE_EVENT(local_only_evt, drv_suspend,
285 TP_PROTO(struct ieee80211_local *local),
286 TP_ARGS(local)
287);
288
289DEFINE_EVENT(local_only_evt, drv_resume,
290 TP_PROTO(struct ieee80211_local *local),
291 TP_ARGS(local)
292);
293
Johannes Berg6d525632012-04-04 15:05:25 +0200294TRACE_EVENT(drv_set_wakeup,
295 TP_PROTO(struct ieee80211_local *local, bool enabled),
296 TP_ARGS(local, enabled),
297 TP_STRUCT__entry(
298 LOCAL_ENTRY
299 __field(bool, enabled)
300 ),
301 TP_fast_assign(
302 LOCAL_ASSIGN;
303 __entry->enabled = enabled;
304 ),
305 TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
306);
307
Johannes Bergba99d932011-01-26 09:22:15 +0100308DEFINE_EVENT(local_only_evt, drv_stop,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200309 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100310 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200311);
312
Luciano Coelho92ddc112011-05-09 14:40:06 +0300313DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200314 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200315 struct ieee80211_sub_if_data *sdata),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300316 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200317);
318
Johannes Berg34d4bc42010-08-27 12:35:58 +0200319TRACE_EVENT(drv_change_interface,
320 TP_PROTO(struct ieee80211_local *local,
321 struct ieee80211_sub_if_data *sdata,
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200322 enum nl80211_iftype type, bool p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200323
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200324 TP_ARGS(local, sdata, type, p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200325
326 TP_STRUCT__entry(
327 LOCAL_ENTRY
328 VIF_ENTRY
329 __field(u32, new_type)
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200330 __field(bool, new_p2p)
Johannes Berg34d4bc42010-08-27 12:35:58 +0200331 ),
332
333 TP_fast_assign(
334 LOCAL_ASSIGN;
335 VIF_ASSIGN;
336 __entry->new_type = type;
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200337 __entry->new_p2p = p2p;
Johannes Berg34d4bc42010-08-27 12:35:58 +0200338 ),
339
340 TP_printk(
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200341 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
342 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
343 __entry->new_p2p ? "/p2p" : ""
Johannes Berg34d4bc42010-08-27 12:35:58 +0200344 )
345);
346
Luciano Coelho92ddc112011-05-09 14:40:06 +0300347DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
348 TP_PROTO(struct ieee80211_local *local,
349 struct ieee80211_sub_if_data *sdata),
350 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200351);
352
353TRACE_EVENT(drv_config,
354 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200355 u32 changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200356
Johannes Berg4efc76b2010-06-10 10:56:20 +0200357 TP_ARGS(local, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200358
359 TP_STRUCT__entry(
360 LOCAL_ENTRY
361 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100362 __field(u32, flags)
363 __field(int, power_level)
364 __field(int, dynamic_ps_timeout)
Johannes Bergf911ab82009-11-25 19:07:20 +0100365 __field(u16, listen_interval)
366 __field(u8, long_frame_max_tx_count)
367 __field(u8, short_frame_max_tx_count)
Karl Beldan675a0b02013-03-25 16:26:57 +0100368 CHANDEF_ENTRY
Johannes Berg0f782312009-12-01 13:37:02 +0100369 __field(int, smps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200370 ),
371
372 TP_fast_assign(
373 LOCAL_ASSIGN;
374 __entry->changed = changed;
Johannes Bergf911ab82009-11-25 19:07:20 +0100375 __entry->flags = local->hw.conf.flags;
376 __entry->power_level = local->hw.conf.power_level;
377 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
Johannes Bergf911ab82009-11-25 19:07:20 +0100378 __entry->listen_interval = local->hw.conf.listen_interval;
Johannes Berg3d01be72012-07-26 14:27:39 +0200379 __entry->long_frame_max_tx_count =
380 local->hw.conf.long_frame_max_tx_count;
381 __entry->short_frame_max_tx_count =
382 local->hw.conf.short_frame_max_tx_count;
Karl Beldan675a0b02013-03-25 16:26:57 +0100383 CHANDEF_ASSIGN(&local->hw.conf.chandef)
Johannes Berg0f782312009-12-01 13:37:02 +0100384 __entry->smps = local->hw.conf.smps_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200385 ),
386
387 TP_printk(
Karl Beldan675a0b02013-03-25 16:26:57 +0100388 LOCAL_PR_FMT " ch:%#x" CHANDEF_PR_FMT,
389 LOCAL_PR_ARG, __entry->changed, CHANDEF_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200390 )
391);
392
393TRACE_EVENT(drv_bss_info_changed,
394 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100395 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200396 struct ieee80211_bss_conf *info,
397 u32 changed),
398
Johannes Berg12375ef2009-11-25 20:30:31 +0100399 TP_ARGS(local, sdata, info, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200400
401 TP_STRUCT__entry(
402 LOCAL_ENTRY
403 VIF_ENTRY
Johannes Berg1724ffb2012-10-24 11:38:30 +0200404 __field(u32, changed)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200405 __field(bool, assoc)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200406 __field(bool, ibss_joined)
407 __field(bool, ibss_creator)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200408 __field(u16, aid)
409 __field(bool, cts)
410 __field(bool, shortpre)
411 __field(bool, shortslot)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200412 __field(bool, enable_beacon)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200413 __field(u8, dtimper)
414 __field(u16, bcnint)
415 __field(u16, assoc_cap)
Johannes Berg8c358bc2012-05-22 22:13:05 +0200416 __field(u64, sync_tsf)
417 __field(u32, sync_device_ts)
Johannes Bergef429da2013-02-05 17:48:40 +0100418 __field(u8, sync_dtim_count)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200419 __field(u32, basic_rates)
Johannes Berg57fbcce2016-04-12 15:56:15 +0200420 __array(int, mcast_rate, NUM_NL80211_BANDS)
Johannes Bergf911ab82009-11-25 19:07:20 +0100421 __field(u16, ht_operation_mode)
Peter Zijlstra04ae87a2019-10-24 22:26:59 +0200422 __field(s32, cqm_rssi_thold)
423 __field(s32, cqm_rssi_hyst)
424 __field(u32, channel_width)
425 __field(u32, channel_cfreq1)
Thomas Pedersenb6011962020-04-01 18:18:04 -0700426 __field(u32, channel_cfreq1_offset)
Johannes Berg0f19b412013-01-14 16:39:07 +0100427 __dynamic_array(u32, arp_addr_list,
428 info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
429 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
Peter Zijlstra04ae87a2019-10-24 22:26:59 +0200430 info->arp_addr_cnt)
431 __field(int, arp_addr_cnt)
432 __field(bool, qos)
433 __field(bool, idle)
434 __field(bool, ps)
435 __dynamic_array(u8, ssid, info->ssid_len)
436 __field(bool, hidden_ssid)
Johannes Berg1ea6f9c2012-10-24 10:59:25 +0200437 __field(int, txpower)
Janusz Dziedzic67baf662013-03-21 15:47:56 +0100438 __field(u8, p2p_oppps_ctwindow)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200439 ),
440
441 TP_fast_assign(
442 LOCAL_ASSIGN;
443 VIF_ASSIGN;
444 __entry->changed = changed;
445 __entry->aid = info->aid;
446 __entry->assoc = info->assoc;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200447 __entry->ibss_joined = info->ibss_joined;
448 __entry->ibss_creator = info->ibss_creator;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200449 __entry->shortpre = info->use_short_preamble;
450 __entry->cts = info->use_cts_prot;
451 __entry->shortslot = info->use_short_slot;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200452 __entry->enable_beacon = info->enable_beacon;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200453 __entry->dtimper = info->dtim_period;
454 __entry->bcnint = info->beacon_int;
455 __entry->assoc_cap = info->assoc_capability;
Johannes Berg8c358bc2012-05-22 22:13:05 +0200456 __entry->sync_tsf = info->sync_tsf;
457 __entry->sync_device_ts = info->sync_device_ts;
Johannes Bergef429da2013-02-05 17:48:40 +0100458 __entry->sync_dtim_count = info->sync_dtim_count;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200459 __entry->basic_rates = info->basic_rates;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200460 memcpy(__entry->mcast_rate, info->mcast_rate,
461 sizeof(__entry->mcast_rate));
Johannes Bergf911ab82009-11-25 19:07:20 +0100462 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200463 __entry->cqm_rssi_thold = info->cqm_rssi_thold;
464 __entry->cqm_rssi_hyst = info->cqm_rssi_hyst;
Johannes Berg4bf88532012-11-09 11:39:59 +0100465 __entry->channel_width = info->chandef.width;
466 __entry->channel_cfreq1 = info->chandef.center_freq1;
Thomas Pedersenb6011962020-04-01 18:18:04 -0700467 __entry->channel_cfreq1_offset = info->chandef.freq1_offset;
Johannes Berg0f19b412013-01-14 16:39:07 +0100468 __entry->arp_addr_cnt = info->arp_addr_cnt;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200469 memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list,
Johannes Berg0f19b412013-01-14 16:39:07 +0100470 sizeof(u32) * (info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
471 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
472 info->arp_addr_cnt));
Johannes Berg1724ffb2012-10-24 11:38:30 +0200473 __entry->qos = info->qos;
474 __entry->idle = info->idle;
475 __entry->ps = info->ps;
476 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
477 __entry->hidden_ssid = info->hidden_ssid;
Johannes Berg1ea6f9c2012-10-24 10:59:25 +0200478 __entry->txpower = info->txpower;
Janusz Dziedzic67baf662013-03-21 15:47:56 +0100479 __entry->p2p_oppps_ctwindow = info->p2p_noa_attr.oppps_ctwindow;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200480 ),
481
482 TP_printk(
483 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
484 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
485 )
486);
487
Johannes Berg3ac64be2009-08-17 16:16:53 +0200488TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200489 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200490
Johannes Berg4efc76b2010-06-10 10:56:20 +0200491 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200492
493 TP_STRUCT__entry(
494 LOCAL_ENTRY
495 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200496 ),
497
498 TP_fast_assign(
499 LOCAL_ASSIGN;
500 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200501 ),
502
503 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200504 LOCAL_PR_FMT " prepare mc (%d)",
505 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200506 )
507);
508
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200509TRACE_EVENT(drv_configure_filter,
510 TP_PROTO(struct ieee80211_local *local,
511 unsigned int changed_flags,
512 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200513 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200514
Johannes Berg3ac64be2009-08-17 16:16:53 +0200515 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200516
517 TP_STRUCT__entry(
518 LOCAL_ENTRY
519 __field(unsigned int, changed)
520 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200521 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200522 ),
523
524 TP_fast_assign(
525 LOCAL_ASSIGN;
526 __entry->changed = changed_flags;
527 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200528 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200529 ),
530
531 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200532 LOCAL_PR_FMT " changed:%#x total:%#x",
533 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200534 )
535);
536
Andrei Otcheretianski1b09b552015-08-15 22:39:50 +0300537TRACE_EVENT(drv_config_iface_filter,
538 TP_PROTO(struct ieee80211_local *local,
539 struct ieee80211_sub_if_data *sdata,
540 unsigned int filter_flags,
541 unsigned int changed_flags),
542
543 TP_ARGS(local, sdata, filter_flags, changed_flags),
544
545 TP_STRUCT__entry(
546 LOCAL_ENTRY
547 VIF_ENTRY
548 __field(unsigned int, filter_flags)
549 __field(unsigned int, changed_flags)
550 ),
551
552 TP_fast_assign(
553 LOCAL_ASSIGN;
554 VIF_ASSIGN;
555 __entry->filter_flags = filter_flags;
556 __entry->changed_flags = changed_flags;
557 ),
558
559 TP_printk(
560 LOCAL_PR_FMT VIF_PR_FMT
561 " filter_flags: %#x changed_flags: %#x",
562 LOCAL_PR_ARG, VIF_PR_ARG, __entry->filter_flags,
563 __entry->changed_flags
564 )
565);
566
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200567TRACE_EVENT(drv_set_tim,
568 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200569 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200570
Johannes Berg4efc76b2010-06-10 10:56:20 +0200571 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200572
573 TP_STRUCT__entry(
574 LOCAL_ENTRY
575 STA_ENTRY
576 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200577 ),
578
579 TP_fast_assign(
580 LOCAL_ASSIGN;
581 STA_ASSIGN;
582 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200583 ),
584
585 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200586 LOCAL_PR_FMT STA_PR_FMT " set:%d",
Seth Forshee15ac7c472013-02-15 13:15:48 -0600587 LOCAL_PR_ARG, STA_PR_ARG, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200588 )
589);
590
591TRACE_EVENT(drv_set_key,
592 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100593 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200594 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200595 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200596
Johannes Berg4efc76b2010-06-10 10:56:20 +0200597 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200598
599 TP_STRUCT__entry(
600 LOCAL_ENTRY
601 VIF_ENTRY
602 STA_ENTRY
Johannes Berg9352c192015-04-20 18:12:41 +0200603 KEY_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200604 ),
605
606 TP_fast_assign(
607 LOCAL_ASSIGN;
608 VIF_ASSIGN;
609 STA_ASSIGN;
Johannes Berg9352c192015-04-20 18:12:41 +0200610 KEY_ASSIGN(key);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200611 ),
612
613 TP_printk(
Johannes Berg9352c192015-04-20 18:12:41 +0200614 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT KEY_PR_FMT,
615 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, KEY_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200616 )
617);
618
619TRACE_EVENT(drv_update_tkip_key,
620 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100621 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200622 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100623 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200624
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100625 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200626
627 TP_STRUCT__entry(
628 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100629 VIF_ENTRY
630 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200631 __field(u32, iv32)
632 ),
633
634 TP_fast_assign(
635 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100636 VIF_ASSIGN;
637 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200638 __entry->iv32 = iv32;
639 ),
640
641 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100642 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
Weilong Chenf359d3f2013-12-18 15:44:16 +0800643 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200644 )
645);
646
Luciano Coelho79f460c2011-05-11 17:09:36 +0300647DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200648 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300649 struct ieee80211_sub_if_data *sdata),
650 TP_ARGS(local, sdata)
651);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200652
Eliad Pellerb8564392011-06-13 12:47:30 +0300653DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
654 TP_PROTO(struct ieee80211_local *local,
655 struct ieee80211_sub_if_data *sdata),
656 TP_ARGS(local, sdata)
657);
658
Luciano Coelho79f460c2011-05-11 17:09:36 +0300659DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
660 TP_PROTO(struct ieee80211_local *local,
661 struct ieee80211_sub_if_data *sdata),
662 TP_ARGS(local, sdata)
663);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200664
Luciano Coelho79f460c2011-05-11 17:09:36 +0300665DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
666 TP_PROTO(struct ieee80211_local *local,
667 struct ieee80211_sub_if_data *sdata),
668 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200669);
670
Johannes Berga344d672014-06-12 22:24:31 +0200671TRACE_EVENT(drv_sw_scan_start,
672 TP_PROTO(struct ieee80211_local *local,
673 struct ieee80211_sub_if_data *sdata,
674 const u8 *mac_addr),
675
676 TP_ARGS(local, sdata, mac_addr),
677
678 TP_STRUCT__entry(
679 LOCAL_ENTRY
680 VIF_ENTRY
681 __array(char, mac_addr, ETH_ALEN)
682 ),
683
684 TP_fast_assign(
685 LOCAL_ASSIGN;
686 VIF_ASSIGN;
687 memcpy(__entry->mac_addr, mac_addr, ETH_ALEN);
688 ),
689
690 TP_printk(LOCAL_PR_FMT ", " VIF_PR_FMT ", addr:%pM",
691 LOCAL_PR_ARG, VIF_PR_ARG, __entry->mac_addr)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200692);
693
Johannes Berga344d672014-06-12 22:24:31 +0200694DEFINE_EVENT(local_sdata_evt, drv_sw_scan_complete,
695 TP_PROTO(struct ieee80211_local *local,
696 struct ieee80211_sub_if_data *sdata),
697 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200698);
699
700TRACE_EVENT(drv_get_stats,
701 TP_PROTO(struct ieee80211_local *local,
702 struct ieee80211_low_level_stats *stats,
703 int ret),
704
705 TP_ARGS(local, stats, ret),
706
707 TP_STRUCT__entry(
708 LOCAL_ENTRY
709 __field(int, ret)
710 __field(unsigned int, ackfail)
711 __field(unsigned int, rtsfail)
712 __field(unsigned int, fcserr)
713 __field(unsigned int, rtssucc)
714 ),
715
716 TP_fast_assign(
717 LOCAL_ASSIGN;
718 __entry->ret = ret;
719 __entry->ackfail = stats->dot11ACKFailureCount;
720 __entry->rtsfail = stats->dot11RTSFailureCount;
721 __entry->fcserr = stats->dot11FCSErrorCount;
722 __entry->rtssucc = stats->dot11RTSSuccessCount;
723 ),
724
725 TP_printk(
726 LOCAL_PR_FMT " ret:%d",
727 LOCAL_PR_ARG, __entry->ret
728 )
729);
730
Johannes Berg9352c192015-04-20 18:12:41 +0200731TRACE_EVENT(drv_get_key_seq,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200732 TP_PROTO(struct ieee80211_local *local,
Johannes Berg9352c192015-04-20 18:12:41 +0200733 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200734
Johannes Berg9352c192015-04-20 18:12:41 +0200735 TP_ARGS(local, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200736
737 TP_STRUCT__entry(
738 LOCAL_ENTRY
Johannes Berg9352c192015-04-20 18:12:41 +0200739 KEY_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200740 ),
741
742 TP_fast_assign(
743 LOCAL_ASSIGN;
Johannes Berg9352c192015-04-20 18:12:41 +0200744 KEY_ASSIGN(key);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200745 ),
746
747 TP_printk(
Johannes Berg9352c192015-04-20 18:12:41 +0200748 LOCAL_PR_FMT KEY_PR_FMT,
749 LOCAL_PR_ARG, KEY_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200750 )
751);
752
Luciano Coelho92ddc112011-05-09 14:40:06 +0300753DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200754 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300755 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200756);
757
Luciano Coelho92ddc112011-05-09 14:40:06 +0300758DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200759 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300760 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200761);
762
Lukáš Turek310bc672009-12-21 22:50:48 +0100763TRACE_EVENT(drv_set_coverage_class,
Lorenzo Bianconia4bcaf52014-09-04 23:57:41 +0200764 TP_PROTO(struct ieee80211_local *local, s16 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100765
Johannes Berg4efc76b2010-06-10 10:56:20 +0200766 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100767
768 TP_STRUCT__entry(
769 LOCAL_ENTRY
Lorenzo Bianconia4bcaf52014-09-04 23:57:41 +0200770 __field(s16, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100771 ),
772
773 TP_fast_assign(
774 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100775 __entry->value = value;
776 ),
777
778 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200779 LOCAL_PR_FMT " value:%d",
780 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100781 )
782);
783
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200784TRACE_EVENT(drv_sta_notify,
785 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100786 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200787 enum sta_notify_cmd cmd,
788 struct ieee80211_sta *sta),
789
Johannes Berg12375ef2009-11-25 20:30:31 +0100790 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200791
792 TP_STRUCT__entry(
793 LOCAL_ENTRY
794 VIF_ENTRY
795 STA_ENTRY
796 __field(u32, cmd)
797 ),
798
799 TP_fast_assign(
800 LOCAL_ASSIGN;
801 VIF_ASSIGN;
802 STA_ASSIGN;
803 __entry->cmd = cmd;
804 ),
805
806 TP_printk(
807 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
808 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
809 )
810);
811
Johannes Bergf09603a2012-01-20 13:55:21 +0100812TRACE_EVENT(drv_sta_state,
813 TP_PROTO(struct ieee80211_local *local,
814 struct ieee80211_sub_if_data *sdata,
815 struct ieee80211_sta *sta,
816 enum ieee80211_sta_state old_state,
817 enum ieee80211_sta_state new_state),
818
819 TP_ARGS(local, sdata, sta, old_state, new_state),
820
821 TP_STRUCT__entry(
822 LOCAL_ENTRY
823 VIF_ENTRY
824 STA_ENTRY
825 __field(u32, old_state)
826 __field(u32, new_state)
827 ),
828
829 TP_fast_assign(
830 LOCAL_ASSIGN;
831 VIF_ASSIGN;
832 STA_ASSIGN;
833 __entry->old_state = old_state;
834 __entry->new_state = new_state;
835 ),
836
837 TP_printk(
838 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
839 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
840 __entry->old_state, __entry->new_state
841 )
842);
843
Ashok Raj Nagarajanba905bf2019-03-29 16:19:09 +0530844TRACE_EVENT(drv_sta_set_txpwr,
845 TP_PROTO(struct ieee80211_local *local,
846 struct ieee80211_sub_if_data *sdata,
847 struct ieee80211_sta *sta),
848
849 TP_ARGS(local, sdata, sta),
850
851 TP_STRUCT__entry(
852 LOCAL_ENTRY
853 VIF_ENTRY
854 STA_ENTRY
855 __field(s16, txpwr)
856 __field(u8, type)
857 ),
858
859 TP_fast_assign(
860 LOCAL_ASSIGN;
861 VIF_ASSIGN;
862 STA_ASSIGN;
863 __entry->txpwr = sta->txpwr.power;
864 __entry->type = sta->txpwr.type;
865 ),
866
867 TP_printk(
868 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " txpwr: %d type %d",
869 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
870 __entry->txpwr, __entry->type
871 )
872);
873
Johannes Berg8f727ef2012-03-30 08:43:32 +0200874TRACE_EVENT(drv_sta_rc_update,
875 TP_PROTO(struct ieee80211_local *local,
876 struct ieee80211_sub_if_data *sdata,
877 struct ieee80211_sta *sta,
878 u32 changed),
879
880 TP_ARGS(local, sdata, sta, changed),
881
882 TP_STRUCT__entry(
883 LOCAL_ENTRY
884 VIF_ENTRY
885 STA_ENTRY
886 __field(u32, changed)
887 ),
888
889 TP_fast_assign(
890 LOCAL_ASSIGN;
891 VIF_ASSIGN;
892 STA_ASSIGN;
893 __entry->changed = changed;
894 ),
895
896 TP_printk(
897 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
898 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
899 )
900);
901
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100902DECLARE_EVENT_CLASS(sta_event,
Johannes Berg34e89502010-02-03 13:59:58 +0100903 TP_PROTO(struct ieee80211_local *local,
904 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200905 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100906
Johannes Berg4efc76b2010-06-10 10:56:20 +0200907 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100908
909 TP_STRUCT__entry(
910 LOCAL_ENTRY
911 VIF_ENTRY
912 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100913 ),
914
915 TP_fast_assign(
916 LOCAL_ASSIGN;
917 VIF_ASSIGN;
918 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100919 ),
920
921 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200922 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
923 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100924 )
925);
926
Johannes Berg2b9a7e12014-11-17 11:35:23 +0100927DEFINE_EVENT(sta_event, drv_sta_statistics,
928 TP_PROTO(struct ieee80211_local *local,
929 struct ieee80211_sub_if_data *sdata,
930 struct ieee80211_sta *sta),
931 TP_ARGS(local, sdata, sta)
932);
933
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100934DEFINE_EVENT(sta_event, drv_sta_add,
Johannes Berg34e89502010-02-03 13:59:58 +0100935 TP_PROTO(struct ieee80211_local *local,
936 struct ieee80211_sub_if_data *sdata,
937 struct ieee80211_sta *sta),
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100938 TP_ARGS(local, sdata, sta)
939);
Johannes Berg34e89502010-02-03 13:59:58 +0100940
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100941DEFINE_EVENT(sta_event, drv_sta_remove,
942 TP_PROTO(struct ieee80211_local *local,
943 struct ieee80211_sub_if_data *sdata,
944 struct ieee80211_sta *sta),
945 TP_ARGS(local, sdata, sta)
946);
Johannes Berg34e89502010-02-03 13:59:58 +0100947
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100948DEFINE_EVENT(sta_event, drv_sta_pre_rcu_remove,
949 TP_PROTO(struct ieee80211_local *local,
950 struct ieee80211_sub_if_data *sdata,
951 struct ieee80211_sta *sta),
952 TP_ARGS(local, sdata, sta)
Johannes Berg34e89502010-02-03 13:59:58 +0100953);
954
Sara Sharonf59374e2016-03-02 23:46:14 +0200955DEFINE_EVENT(sta_event, drv_sync_rx_queues,
956 TP_PROTO(struct ieee80211_local *local,
957 struct ieee80211_sub_if_data *sdata,
958 struct ieee80211_sta *sta),
959 TP_ARGS(local, sdata, sta)
960);
961
Johannes Bergf815e2b2014-11-19 00:10:42 +0100962DEFINE_EVENT(sta_event, drv_sta_rate_tbl_update,
963 TP_PROTO(struct ieee80211_local *local,
964 struct ieee80211_sub_if_data *sdata,
965 struct ieee80211_sta *sta),
966 TP_ARGS(local, sdata, sta)
967);
968
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200969TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300970 TP_PROTO(struct ieee80211_local *local,
971 struct ieee80211_sub_if_data *sdata,
Johannes Berga3304b02012-03-28 11:04:24 +0200972 u16 ac, const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200973
Johannes Berga3304b02012-03-28 11:04:24 +0200974 TP_ARGS(local, sdata, ac, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200975
976 TP_STRUCT__entry(
977 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300978 VIF_ENTRY
Johannes Berga3304b02012-03-28 11:04:24 +0200979 __field(u16, ac)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200980 __field(u16, txop)
981 __field(u16, cw_min)
982 __field(u16, cw_max)
983 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300984 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200985 ),
986
987 TP_fast_assign(
988 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300989 VIF_ASSIGN;
Johannes Berga3304b02012-03-28 11:04:24 +0200990 __entry->ac = ac;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200991 __entry->txop = params->txop;
992 __entry->cw_max = params->cw_max;
993 __entry->cw_min = params->cw_min;
994 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300995 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200996 ),
997
998 TP_printk(
Johannes Berga3304b02012-03-28 11:04:24 +0200999 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
1000 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001001 )
1002);
1003
Eliad Peller37a41b42011-09-21 14:06:11 +03001004DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
1005 TP_PROTO(struct ieee80211_local *local,
1006 struct ieee80211_sub_if_data *sdata),
1007 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001008);
1009
1010TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +03001011 TP_PROTO(struct ieee80211_local *local,
1012 struct ieee80211_sub_if_data *sdata,
1013 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001014
Eliad Peller37a41b42011-09-21 14:06:11 +03001015 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001016
1017 TP_STRUCT__entry(
1018 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +03001019 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001020 __field(u64, tsf)
1021 ),
1022
1023 TP_fast_assign(
1024 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +03001025 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001026 __entry->tsf = tsf;
1027 ),
1028
1029 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +03001030 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
1031 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001032 )
1033);
1034
Pedersen, Thomas354d3812016-09-28 16:56:28 -07001035TRACE_EVENT(drv_offset_tsf,
1036 TP_PROTO(struct ieee80211_local *local,
1037 struct ieee80211_sub_if_data *sdata,
1038 s64 offset),
1039
1040 TP_ARGS(local, sdata, offset),
1041
1042 TP_STRUCT__entry(
1043 LOCAL_ENTRY
1044 VIF_ENTRY
1045 __field(s64, tsf_offset)
1046 ),
1047
1048 TP_fast_assign(
1049 LOCAL_ASSIGN;
1050 VIF_ASSIGN;
1051 __entry->tsf_offset = offset;
1052 ),
1053
1054 TP_printk(
1055 LOCAL_PR_FMT VIF_PR_FMT " tsf offset:%lld",
1056 LOCAL_PR_ARG, VIF_PR_ARG,
1057 (unsigned long long)__entry->tsf_offset
1058 )
1059);
1060
Eliad Peller37a41b42011-09-21 14:06:11 +03001061DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
1062 TP_PROTO(struct ieee80211_local *local,
1063 struct ieee80211_sub_if_data *sdata),
1064 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001065);
1066
Johannes Bergba99d932011-01-26 09:22:15 +01001067DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +02001068 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001069 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001070);
1071
1072TRACE_EVENT(drv_ampdu_action,
1073 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +01001074 struct ieee80211_sub_if_data *sdata,
Sara Sharon50ea05e2015-12-30 16:06:04 +02001075 struct ieee80211_ampdu_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001076
Sara Sharon50ea05e2015-12-30 16:06:04 +02001077 TP_ARGS(local, sdata, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001078
1079 TP_STRUCT__entry(
1080 LOCAL_ENTRY
Johannes Bergc951ad32009-11-16 12:00:38 +01001081 VIF_ENTRY
Sara Sharon50ea05e2015-12-30 16:06:04 +02001082 AMPDU_ACTION_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001083 ),
1084
1085 TP_fast_assign(
1086 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +01001087 VIF_ASSIGN;
Sara Sharon50ea05e2015-12-30 16:06:04 +02001088 AMPDU_ACTION_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001089 ),
1090
1091 TP_printk(
Sara Sharon50ea05e2015-12-30 16:06:04 +02001092 LOCAL_PR_FMT VIF_PR_FMT AMPDU_ACTION_PR_FMT,
1093 LOCAL_PR_ARG, VIF_PR_ARG, AMPDU_ACTION_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001094 )
1095);
Johannes Berga80f7c02009-12-23 13:15:32 +01001096
John W. Linvillec466d4e2010-06-29 14:51:23 -04001097TRACE_EVENT(drv_get_survey,
Johannes Berg140d9052018-11-09 11:10:47 +01001098 TP_PROTO(struct ieee80211_local *local, int _idx,
John W. Linvillec466d4e2010-06-29 14:51:23 -04001099 struct survey_info *survey),
1100
Johannes Berg140d9052018-11-09 11:10:47 +01001101 TP_ARGS(local, _idx, survey),
John W. Linvillec466d4e2010-06-29 14:51:23 -04001102
1103 TP_STRUCT__entry(
1104 LOCAL_ENTRY
1105 __field(int, idx)
1106 ),
1107
1108 TP_fast_assign(
1109 LOCAL_ASSIGN;
Johannes Berg140d9052018-11-09 11:10:47 +01001110 __entry->idx = _idx;
John W. Linvillec466d4e2010-06-29 14:51:23 -04001111 ),
1112
1113 TP_printk(
1114 LOCAL_PR_FMT " idx:%d",
1115 LOCAL_PR_ARG, __entry->idx
1116 )
1117);
1118
Johannes Berga80f7c02009-12-23 13:15:32 +01001119TRACE_EVENT(drv_flush,
Johannes Berg39ecc012013-02-13 12:11:00 +01001120 TP_PROTO(struct ieee80211_local *local,
1121 u32 queues, bool drop),
Johannes Berga80f7c02009-12-23 13:15:32 +01001122
Johannes Berg39ecc012013-02-13 12:11:00 +01001123 TP_ARGS(local, queues, drop),
Johannes Berga80f7c02009-12-23 13:15:32 +01001124
1125 TP_STRUCT__entry(
1126 LOCAL_ENTRY
1127 __field(bool, drop)
Johannes Berg39ecc012013-02-13 12:11:00 +01001128 __field(u32, queues)
Johannes Berga80f7c02009-12-23 13:15:32 +01001129 ),
1130
1131 TP_fast_assign(
1132 LOCAL_ASSIGN;
1133 __entry->drop = drop;
Johannes Berg39ecc012013-02-13 12:11:00 +01001134 __entry->queues = queues;
Johannes Berga80f7c02009-12-23 13:15:32 +01001135 ),
1136
1137 TP_printk(
Johannes Berg39ecc012013-02-13 12:11:00 +01001138 LOCAL_PR_FMT " queues:0x%x drop:%d",
1139 LOCAL_PR_ARG, __entry->queues, __entry->drop
Johannes Berga80f7c02009-12-23 13:15:32 +01001140 )
1141);
Johannes Bergb5878a22010-04-07 16:48:40 +02001142
Johannes Berg5ce6e432010-05-11 16:20:57 +02001143TRACE_EVENT(drv_channel_switch,
1144 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001145 struct ieee80211_sub_if_data *sdata,
Johannes Berg5ce6e432010-05-11 16:20:57 +02001146 struct ieee80211_channel_switch *ch_switch),
1147
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001148 TP_ARGS(local, sdata, ch_switch),
Johannes Berg5ce6e432010-05-11 16:20:57 +02001149
1150 TP_STRUCT__entry(
1151 LOCAL_ENTRY
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001152 VIF_ENTRY
Johannes Berg85220d72013-03-25 18:29:27 +01001153 CHANDEF_ENTRY
Johannes Berg5ce6e432010-05-11 16:20:57 +02001154 __field(u64, timestamp)
Luciano Coelho2ba45382014-10-08 09:48:35 +03001155 __field(u32, device_timestamp)
Johannes Berg5ce6e432010-05-11 16:20:57 +02001156 __field(bool, block_tx)
Johannes Berg5ce6e432010-05-11 16:20:57 +02001157 __field(u8, count)
1158 ),
1159
1160 TP_fast_assign(
1161 LOCAL_ASSIGN;
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001162 VIF_ASSIGN;
Johannes Berg85220d72013-03-25 18:29:27 +01001163 CHANDEF_ASSIGN(&ch_switch->chandef)
Johannes Berg5ce6e432010-05-11 16:20:57 +02001164 __entry->timestamp = ch_switch->timestamp;
Luciano Coelho2ba45382014-10-08 09:48:35 +03001165 __entry->device_timestamp = ch_switch->device_timestamp;
Johannes Berg5ce6e432010-05-11 16:20:57 +02001166 __entry->block_tx = ch_switch->block_tx;
Johannes Berg5ce6e432010-05-11 16:20:57 +02001167 __entry->count = ch_switch->count;
1168 ),
1169
1170 TP_printk(
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001171 LOCAL_PR_FMT VIF_PR_FMT " new " CHANDEF_PR_FMT " count:%d",
1172 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count
Johannes Berg5ce6e432010-05-11 16:20:57 +02001173 )
1174);
1175
Bruno Randolf15d96752010-11-10 12:50:56 +09001176TRACE_EVENT(drv_set_antenna,
1177 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1178
1179 TP_ARGS(local, tx_ant, rx_ant, ret),
1180
1181 TP_STRUCT__entry(
1182 LOCAL_ENTRY
1183 __field(u32, tx_ant)
1184 __field(u32, rx_ant)
1185 __field(int, ret)
1186 ),
1187
1188 TP_fast_assign(
1189 LOCAL_ASSIGN;
1190 __entry->tx_ant = tx_ant;
1191 __entry->rx_ant = rx_ant;
1192 __entry->ret = ret;
1193 ),
1194
1195 TP_printk(
1196 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1197 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1198 )
1199);
1200
1201TRACE_EVENT(drv_get_antenna,
1202 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1203
1204 TP_ARGS(local, tx_ant, rx_ant, ret),
1205
1206 TP_STRUCT__entry(
1207 LOCAL_ENTRY
1208 __field(u32, tx_ant)
1209 __field(u32, rx_ant)
1210 __field(int, ret)
1211 ),
1212
1213 TP_fast_assign(
1214 LOCAL_ASSIGN;
1215 __entry->tx_ant = tx_ant;
1216 __entry->rx_ant = rx_ant;
1217 __entry->ret = ret;
1218 ),
1219
1220 TP_printk(
1221 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1222 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1223 )
1224);
1225
Johannes Berg21f83582010-12-18 17:20:47 +01001226TRACE_EVENT(drv_remain_on_channel,
Eliad Peller49884562012-11-19 17:05:09 +02001227 TP_PROTO(struct ieee80211_local *local,
1228 struct ieee80211_sub_if_data *sdata,
1229 struct ieee80211_channel *chan,
Ilan Peerd339d5c2013-02-12 09:34:13 +02001230 unsigned int duration,
1231 enum ieee80211_roc_type type),
Johannes Berg21f83582010-12-18 17:20:47 +01001232
Ilan Peerd339d5c2013-02-12 09:34:13 +02001233 TP_ARGS(local, sdata, chan, duration, type),
Johannes Berg21f83582010-12-18 17:20:47 +01001234
1235 TP_STRUCT__entry(
1236 LOCAL_ENTRY
Eliad Peller49884562012-11-19 17:05:09 +02001237 VIF_ENTRY
Johannes Berg21f83582010-12-18 17:20:47 +01001238 __field(int, center_freq)
Thomas Pedersenb6011962020-04-01 18:18:04 -07001239 __field(int, freq_offset)
Johannes Berg21f83582010-12-18 17:20:47 +01001240 __field(unsigned int, duration)
Ilan Peerd339d5c2013-02-12 09:34:13 +02001241 __field(u32, type)
Johannes Berg21f83582010-12-18 17:20:47 +01001242 ),
1243
1244 TP_fast_assign(
1245 LOCAL_ASSIGN;
Eliad Peller49884562012-11-19 17:05:09 +02001246 VIF_ASSIGN;
Johannes Berg21f83582010-12-18 17:20:47 +01001247 __entry->center_freq = chan->center_freq;
Thomas Pedersenb6011962020-04-01 18:18:04 -07001248 __entry->freq_offset = chan->freq_offset;
Johannes Berg21f83582010-12-18 17:20:47 +01001249 __entry->duration = duration;
Ilan Peerd339d5c2013-02-12 09:34:13 +02001250 __entry->type = type;
Johannes Berg21f83582010-12-18 17:20:47 +01001251 ),
1252
1253 TP_printk(
Thomas Pedersenb6011962020-04-01 18:18:04 -07001254 LOCAL_PR_FMT VIF_PR_FMT " freq:%d.%03dMHz duration:%dms type=%d",
Eliad Peller49884562012-11-19 17:05:09 +02001255 LOCAL_PR_ARG, VIF_PR_ARG,
Thomas Pedersenb6011962020-04-01 18:18:04 -07001256 __entry->center_freq, __entry->freq_offset,
1257 __entry->duration, __entry->type
Johannes Berg21f83582010-12-18 17:20:47 +01001258 )
1259);
1260
Emmanuel Grumbach5db4c4b2019-07-23 21:00:01 +03001261DEFINE_EVENT(local_sdata_evt, drv_cancel_remain_on_channel,
1262 TP_PROTO(struct ieee80211_local *local,
1263 struct ieee80211_sub_if_data *sdata),
1264 TP_ARGS(local, sdata)
Johannes Berg21f83582010-12-18 17:20:47 +01001265);
1266
John W. Linville38c09152011-03-07 16:19:18 -05001267TRACE_EVENT(drv_set_ringparam,
1268 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1269
1270 TP_ARGS(local, tx, rx),
1271
1272 TP_STRUCT__entry(
1273 LOCAL_ENTRY
1274 __field(u32, tx)
1275 __field(u32, rx)
1276 ),
1277
1278 TP_fast_assign(
1279 LOCAL_ASSIGN;
1280 __entry->tx = tx;
1281 __entry->rx = rx;
1282 ),
1283
1284 TP_printk(
1285 LOCAL_PR_FMT " tx:%d rx %d",
1286 LOCAL_PR_ARG, __entry->tx, __entry->rx
1287 )
1288);
1289
1290TRACE_EVENT(drv_get_ringparam,
1291 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1292 u32 *rx, u32 *rx_max),
1293
1294 TP_ARGS(local, tx, tx_max, rx, rx_max),
1295
1296 TP_STRUCT__entry(
1297 LOCAL_ENTRY
1298 __field(u32, tx)
1299 __field(u32, tx_max)
1300 __field(u32, rx)
1301 __field(u32, rx_max)
1302 ),
1303
1304 TP_fast_assign(
1305 LOCAL_ASSIGN;
1306 __entry->tx = *tx;
1307 __entry->tx_max = *tx_max;
1308 __entry->rx = *rx;
1309 __entry->rx_max = *rx_max;
1310 ),
1311
1312 TP_printk(
1313 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1314 LOCAL_PR_ARG,
1315 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1316 )
1317);
1318
Vivek Natarajane8306f92011-04-06 11:41:10 +05301319DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1320 TP_PROTO(struct ieee80211_local *local),
1321 TP_ARGS(local)
1322);
1323
Johannes Berg5f16a432011-02-25 15:36:57 +01001324DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1325 TP_PROTO(struct ieee80211_local *local),
1326 TP_ARGS(local)
1327);
1328
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301329TRACE_EVENT(drv_set_bitrate_mask,
1330 TP_PROTO(struct ieee80211_local *local,
1331 struct ieee80211_sub_if_data *sdata,
1332 const struct cfg80211_bitrate_mask *mask),
1333
1334 TP_ARGS(local, sdata, mask),
1335
1336 TP_STRUCT__entry(
1337 LOCAL_ENTRY
1338 VIF_ENTRY
1339 __field(u32, legacy_2g)
1340 __field(u32, legacy_5g)
1341 ),
1342
1343 TP_fast_assign(
1344 LOCAL_ASSIGN;
1345 VIF_ASSIGN;
Johannes Berg57fbcce2016-04-12 15:56:15 +02001346 __entry->legacy_2g = mask->control[NL80211_BAND_2GHZ].legacy;
1347 __entry->legacy_5g = mask->control[NL80211_BAND_5GHZ].legacy;
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301348 ),
1349
1350 TP_printk(
1351 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1352 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1353 )
1354);
1355
Johannes Bergc68f4b82011-07-05 16:35:41 +02001356TRACE_EVENT(drv_set_rekey_data,
1357 TP_PROTO(struct ieee80211_local *local,
1358 struct ieee80211_sub_if_data *sdata,
1359 struct cfg80211_gtk_rekey_data *data),
1360
1361 TP_ARGS(local, sdata, data),
1362
1363 TP_STRUCT__entry(
1364 LOCAL_ENTRY
1365 VIF_ENTRY
1366 __array(u8, kek, NL80211_KEK_LEN)
1367 __array(u8, kck, NL80211_KCK_LEN)
1368 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1369 ),
1370
1371 TP_fast_assign(
1372 LOCAL_ASSIGN;
1373 VIF_ASSIGN;
1374 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1375 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1376 memcpy(__entry->replay_ctr, data->replay_ctr,
1377 NL80211_REPLAY_CTR_LEN);
1378 ),
1379
1380 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1381 LOCAL_PR_ARG, VIF_PR_ARG)
1382);
1383
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001384TRACE_EVENT(drv_event_callback,
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001385 TP_PROTO(struct ieee80211_local *local,
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001386 struct ieee80211_sub_if_data *sdata,
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001387 const struct ieee80211_event *_event),
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001388
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001389 TP_ARGS(local, sdata, _event),
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001390
1391 TP_STRUCT__entry(
1392 LOCAL_ENTRY
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001393 VIF_ENTRY
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001394 __field(u32, type)
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001395 ),
1396
1397 TP_fast_assign(
1398 LOCAL_ASSIGN;
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001399 VIF_ASSIGN;
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001400 __entry->type = _event->type;
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001401 ),
1402
1403 TP_printk(
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001404 LOCAL_PR_FMT VIF_PR_FMT " event:%d",
1405 LOCAL_PR_ARG, VIF_PR_ARG, __entry->type
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001406 )
1407);
1408
Johannes Berg40b96402011-09-29 16:04:38 +02001409DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001410 TP_PROTO(struct ieee80211_local *local,
1411 struct ieee80211_sta *sta,
1412 u16 tids, int num_frames,
1413 enum ieee80211_frame_release_type reason,
1414 bool more_data),
1415
1416 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1417
1418 TP_STRUCT__entry(
1419 LOCAL_ENTRY
1420 STA_ENTRY
1421 __field(u16, tids)
1422 __field(int, num_frames)
1423 __field(int, reason)
1424 __field(bool, more_data)
1425 ),
1426
1427 TP_fast_assign(
1428 LOCAL_ASSIGN;
1429 STA_ASSIGN;
1430 __entry->tids = tids;
1431 __entry->num_frames = num_frames;
1432 __entry->reason = reason;
1433 __entry->more_data = more_data;
1434 ),
1435
1436 TP_printk(
1437 LOCAL_PR_FMT STA_PR_FMT
1438 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1439 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1440 __entry->reason, __entry->more_data
1441 )
1442);
1443
Johannes Berg40b96402011-09-29 16:04:38 +02001444DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1445 TP_PROTO(struct ieee80211_local *local,
1446 struct ieee80211_sta *sta,
1447 u16 tids, int num_frames,
1448 enum ieee80211_frame_release_type reason,
1449 bool more_data),
1450
1451 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1452);
1453
1454DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1455 TP_PROTO(struct ieee80211_local *local,
1456 struct ieee80211_sta *sta,
1457 u16 tids, int num_frames,
1458 enum ieee80211_frame_release_type reason,
1459 bool more_data),
1460
1461 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1462);
1463
Ilan Peerd4e36e52018-04-20 13:49:25 +03001464TRACE_EVENT(drv_mgd_prepare_tx,
Johannes Berga1845fc2012-06-27 13:18:36 +02001465 TP_PROTO(struct ieee80211_local *local,
Ilan Peerd4e36e52018-04-20 13:49:25 +03001466 struct ieee80211_sub_if_data *sdata,
1467 u16 duration),
Johannes Berga1845fc2012-06-27 13:18:36 +02001468
Ilan Peerd4e36e52018-04-20 13:49:25 +03001469 TP_ARGS(local, sdata, duration),
1470
1471 TP_STRUCT__entry(
1472 LOCAL_ENTRY
1473 VIF_ENTRY
1474 __field(u32, duration)
1475 ),
1476
1477 TP_fast_assign(
1478 LOCAL_ASSIGN;
1479 VIF_ASSIGN;
1480 __entry->duration = duration;
1481 ),
1482
1483 TP_printk(
1484 LOCAL_PR_FMT VIF_PR_FMT " duration: %u",
1485 LOCAL_PR_ARG, VIF_PR_ARG, __entry->duration
1486 )
Johannes Berga1845fc2012-06-27 13:18:36 +02001487);
1488
Arik Nemtsovee10f2c2014-06-11 17:18:27 +03001489DEFINE_EVENT(local_sdata_evt, drv_mgd_protect_tdls_discover,
1490 TP_PROTO(struct ieee80211_local *local,
1491 struct ieee80211_sub_if_data *sdata),
1492
1493 TP_ARGS(local, sdata)
1494);
1495
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001496DECLARE_EVENT_CLASS(local_chanctx,
1497 TP_PROTO(struct ieee80211_local *local,
1498 struct ieee80211_chanctx *ctx),
1499
1500 TP_ARGS(local, ctx),
1501
1502 TP_STRUCT__entry(
1503 LOCAL_ENTRY
1504 CHANCTX_ENTRY
1505 ),
1506
1507 TP_fast_assign(
1508 LOCAL_ASSIGN;
1509 CHANCTX_ASSIGN;
1510 ),
1511
1512 TP_printk(
1513 LOCAL_PR_FMT CHANCTX_PR_FMT,
1514 LOCAL_PR_ARG, CHANCTX_PR_ARG
1515 )
1516);
1517
1518DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1519 TP_PROTO(struct ieee80211_local *local,
1520 struct ieee80211_chanctx *ctx),
1521 TP_ARGS(local, ctx)
1522);
1523
1524DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1525 TP_PROTO(struct ieee80211_local *local,
1526 struct ieee80211_chanctx *ctx),
1527 TP_ARGS(local, ctx)
1528);
1529
1530TRACE_EVENT(drv_change_chanctx,
1531 TP_PROTO(struct ieee80211_local *local,
1532 struct ieee80211_chanctx *ctx,
1533 u32 changed),
1534
1535 TP_ARGS(local, ctx, changed),
1536
1537 TP_STRUCT__entry(
1538 LOCAL_ENTRY
1539 CHANCTX_ENTRY
1540 __field(u32, changed)
1541 ),
1542
1543 TP_fast_assign(
1544 LOCAL_ASSIGN;
1545 CHANCTX_ASSIGN;
1546 __entry->changed = changed;
1547 ),
1548
1549 TP_printk(
1550 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1551 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1552 )
1553);
1554
Luciano Coelho1a5f0c12014-05-23 14:33:12 +03001555#if !defined(__TRACE_VIF_ENTRY)
1556#define __TRACE_VIF_ENTRY
1557struct trace_vif_entry {
1558 enum nl80211_iftype vif_type;
1559 bool p2p;
1560 char vif_name[IFNAMSIZ];
1561} __packed;
1562
1563struct trace_chandef_entry {
1564 u32 control_freq;
Thomas Pedersenb6011962020-04-01 18:18:04 -07001565 u32 freq_offset;
Luciano Coelho1a5f0c12014-05-23 14:33:12 +03001566 u32 chan_width;
1567 u32 center_freq1;
Thomas Pedersenb6011962020-04-01 18:18:04 -07001568 u32 freq1_offset;
Luciano Coelho1a5f0c12014-05-23 14:33:12 +03001569 u32 center_freq2;
1570} __packed;
1571
1572struct trace_switch_entry {
1573 struct trace_vif_entry vif;
1574 struct trace_chandef_entry old_chandef;
1575 struct trace_chandef_entry new_chandef;
1576} __packed;
1577
1578#define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
1579#endif
1580
1581TRACE_EVENT(drv_switch_vif_chanctx,
1582 TP_PROTO(struct ieee80211_local *local,
1583 struct ieee80211_vif_chanctx_switch *vifs,
1584 int n_vifs, enum ieee80211_chanctx_switch_mode mode),
1585 TP_ARGS(local, vifs, n_vifs, mode),
1586
1587 TP_STRUCT__entry(
1588 LOCAL_ENTRY
1589 __field(int, n_vifs)
1590 __field(u32, mode)
1591 __dynamic_array(u8, vifs,
1592 sizeof(struct trace_switch_entry) * n_vifs)
1593 ),
1594
1595 TP_fast_assign(
1596 LOCAL_ASSIGN;
1597 __entry->n_vifs = n_vifs;
1598 __entry->mode = mode;
1599 {
1600 struct trace_switch_entry *local_vifs =
1601 __get_dynamic_array(vifs);
1602 int i;
1603
1604 for (i = 0; i < n_vifs; i++) {
1605 struct ieee80211_sub_if_data *sdata;
1606
1607 sdata = container_of(vifs[i].vif,
1608 struct ieee80211_sub_if_data,
1609 vif);
1610
1611 SWITCH_ENTRY_ASSIGN(vif.vif_type, vif->type);
1612 SWITCH_ENTRY_ASSIGN(vif.p2p, vif->p2p);
1613 strncpy(local_vifs[i].vif.vif_name,
1614 sdata->name,
1615 sizeof(local_vifs[i].vif.vif_name));
1616 SWITCH_ENTRY_ASSIGN(old_chandef.control_freq,
1617 old_ctx->def.chan->center_freq);
Thomas Pedersenb6011962020-04-01 18:18:04 -07001618 SWITCH_ENTRY_ASSIGN(old_chandef.freq_offset,
1619 old_ctx->def.chan->freq_offset);
Luciano Coelho1a5f0c12014-05-23 14:33:12 +03001620 SWITCH_ENTRY_ASSIGN(old_chandef.chan_width,
1621 old_ctx->def.width);
1622 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq1,
1623 old_ctx->def.center_freq1);
Thomas Pedersenb6011962020-04-01 18:18:04 -07001624 SWITCH_ENTRY_ASSIGN(old_chandef.freq1_offset,
1625 old_ctx->def.freq1_offset);
Luciano Coelho1a5f0c12014-05-23 14:33:12 +03001626 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq2,
1627 old_ctx->def.center_freq2);
1628 SWITCH_ENTRY_ASSIGN(new_chandef.control_freq,
1629 new_ctx->def.chan->center_freq);
Thomas Pedersenb6011962020-04-01 18:18:04 -07001630 SWITCH_ENTRY_ASSIGN(new_chandef.freq_offset,
1631 new_ctx->def.chan->freq_offset);
Luciano Coelho1a5f0c12014-05-23 14:33:12 +03001632 SWITCH_ENTRY_ASSIGN(new_chandef.chan_width,
1633 new_ctx->def.width);
1634 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq1,
1635 new_ctx->def.center_freq1);
Thomas Pedersenb6011962020-04-01 18:18:04 -07001636 SWITCH_ENTRY_ASSIGN(new_chandef.freq1_offset,
1637 new_ctx->def.freq1_offset);
Luciano Coelho1a5f0c12014-05-23 14:33:12 +03001638 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq2,
1639 new_ctx->def.center_freq2);
1640 }
1641 }
1642 ),
1643
1644 TP_printk(
1645 LOCAL_PR_FMT " n_vifs:%d mode:%d",
1646 LOCAL_PR_ARG, __entry->n_vifs, __entry->mode
1647 )
1648);
1649
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001650DECLARE_EVENT_CLASS(local_sdata_chanctx,
1651 TP_PROTO(struct ieee80211_local *local,
1652 struct ieee80211_sub_if_data *sdata,
1653 struct ieee80211_chanctx *ctx),
1654
1655 TP_ARGS(local, sdata, ctx),
1656
1657 TP_STRUCT__entry(
1658 LOCAL_ENTRY
1659 VIF_ENTRY
1660 CHANCTX_ENTRY
1661 ),
1662
1663 TP_fast_assign(
1664 LOCAL_ASSIGN;
1665 VIF_ASSIGN;
1666 CHANCTX_ASSIGN;
1667 ),
1668
1669 TP_printk(
1670 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
1671 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
1672 )
1673);
1674
1675DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1676 TP_PROTO(struct ieee80211_local *local,
1677 struct ieee80211_sub_if_data *sdata,
1678 struct ieee80211_chanctx *ctx),
1679 TP_ARGS(local, sdata, ctx)
1680);
1681
1682DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1683 TP_PROTO(struct ieee80211_local *local,
1684 struct ieee80211_sub_if_data *sdata,
1685 struct ieee80211_chanctx *ctx),
1686 TP_ARGS(local, sdata, ctx)
1687);
1688
Johannes Berg10416382012-10-19 15:44:42 +02001689TRACE_EVENT(drv_start_ap,
1690 TP_PROTO(struct ieee80211_local *local,
1691 struct ieee80211_sub_if_data *sdata,
1692 struct ieee80211_bss_conf *info),
1693
1694 TP_ARGS(local, sdata, info),
1695
1696 TP_STRUCT__entry(
1697 LOCAL_ENTRY
1698 VIF_ENTRY
1699 __field(u8, dtimper)
1700 __field(u16, bcnint)
Peter Zijlstra04ae87a2019-10-24 22:26:59 +02001701 __dynamic_array(u8, ssid, info->ssid_len)
1702 __field(bool, hidden_ssid)
Johannes Berg10416382012-10-19 15:44:42 +02001703 ),
1704
1705 TP_fast_assign(
1706 LOCAL_ASSIGN;
1707 VIF_ASSIGN;
1708 __entry->dtimper = info->dtim_period;
1709 __entry->bcnint = info->beacon_int;
1710 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1711 __entry->hidden_ssid = info->hidden_ssid;
1712 ),
1713
1714 TP_printk(
1715 LOCAL_PR_FMT VIF_PR_FMT,
1716 LOCAL_PR_ARG, VIF_PR_ARG
1717 )
1718);
1719
1720DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
1721 TP_PROTO(struct ieee80211_local *local,
1722 struct ieee80211_sub_if_data *sdata),
1723 TP_ARGS(local, sdata)
1724);
1725
Eliad Pellercf2c92d2014-11-04 11:43:54 +02001726TRACE_EVENT(drv_reconfig_complete,
1727 TP_PROTO(struct ieee80211_local *local,
1728 enum ieee80211_reconfig_type reconfig_type),
1729 TP_ARGS(local, reconfig_type),
1730
1731 TP_STRUCT__entry(
1732 LOCAL_ENTRY
1733 __field(u8, reconfig_type)
1734 ),
1735
1736 TP_fast_assign(
1737 LOCAL_ASSIGN;
1738 __entry->reconfig_type = reconfig_type;
1739 ),
1740
1741 TP_printk(
1742 LOCAL_PR_FMT " reconfig_type:%d",
1743 LOCAL_PR_ARG, __entry->reconfig_type
1744 )
1745
Johannes Berg9214ad72012-11-06 19:18:13 +01001746);
1747
Johannes Berga65240c2013-01-14 15:14:34 +01001748#if IS_ENABLED(CONFIG_IPV6)
1749DEFINE_EVENT(local_sdata_evt, drv_ipv6_addr_change,
1750 TP_PROTO(struct ieee80211_local *local,
1751 struct ieee80211_sub_if_data *sdata),
1752 TP_ARGS(local, sdata)
1753);
1754#endif
1755
Johannes Berg55fff502013-08-19 18:48:41 +02001756TRACE_EVENT(drv_join_ibss,
1757 TP_PROTO(struct ieee80211_local *local,
1758 struct ieee80211_sub_if_data *sdata,
1759 struct ieee80211_bss_conf *info),
1760
1761 TP_ARGS(local, sdata, info),
1762
1763 TP_STRUCT__entry(
1764 LOCAL_ENTRY
1765 VIF_ENTRY
1766 __field(u8, dtimper)
1767 __field(u16, bcnint)
Peter Zijlstra04ae87a2019-10-24 22:26:59 +02001768 __dynamic_array(u8, ssid, info->ssid_len)
Johannes Berg55fff502013-08-19 18:48:41 +02001769 ),
1770
1771 TP_fast_assign(
1772 LOCAL_ASSIGN;
1773 VIF_ASSIGN;
1774 __entry->dtimper = info->dtim_period;
1775 __entry->bcnint = info->beacon_int;
1776 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1777 ),
1778
1779 TP_printk(
1780 LOCAL_PR_FMT VIF_PR_FMT,
1781 LOCAL_PR_ARG, VIF_PR_ARG
1782 )
1783);
1784
1785DEFINE_EVENT(local_sdata_evt, drv_leave_ibss,
1786 TP_PROTO(struct ieee80211_local *local,
1787 struct ieee80211_sub_if_data *sdata),
1788 TP_ARGS(local, sdata)
1789);
1790
Antonio Quartullicca674d2014-05-19 21:53:20 +02001791TRACE_EVENT(drv_get_expected_throughput,
1792 TP_PROTO(struct ieee80211_sta *sta),
1793
1794 TP_ARGS(sta),
1795
1796 TP_STRUCT__entry(
1797 STA_ENTRY
1798 ),
1799
1800 TP_fast_assign(
1801 STA_ASSIGN;
1802 ),
1803
1804 TP_printk(
1805 STA_PR_FMT, STA_PR_ARG
1806 )
1807);
1808
Ayala Beker708d50e2016-09-20 17:31:14 +03001809TRACE_EVENT(drv_start_nan,
1810 TP_PROTO(struct ieee80211_local *local,
1811 struct ieee80211_sub_if_data *sdata,
1812 struct cfg80211_nan_conf *conf),
1813
1814 TP_ARGS(local, sdata, conf),
1815 TP_STRUCT__entry(
1816 LOCAL_ENTRY
1817 VIF_ENTRY
1818 __field(u8, master_pref)
Luca Coelho85859892017-02-08 15:00:34 +02001819 __field(u8, bands)
Ayala Beker708d50e2016-09-20 17:31:14 +03001820 ),
1821
1822 TP_fast_assign(
1823 LOCAL_ASSIGN;
1824 VIF_ASSIGN;
1825 __entry->master_pref = conf->master_pref;
Luca Coelho85859892017-02-08 15:00:34 +02001826 __entry->bands = conf->bands;
Ayala Beker708d50e2016-09-20 17:31:14 +03001827 ),
1828
1829 TP_printk(
1830 LOCAL_PR_FMT VIF_PR_FMT
Luca Coelho85859892017-02-08 15:00:34 +02001831 ", master preference: %u, bands: 0x%0x",
Ayala Beker708d50e2016-09-20 17:31:14 +03001832 LOCAL_PR_ARG, VIF_PR_ARG, __entry->master_pref,
Luca Coelho85859892017-02-08 15:00:34 +02001833 __entry->bands
Ayala Beker708d50e2016-09-20 17:31:14 +03001834 )
1835);
1836
1837TRACE_EVENT(drv_stop_nan,
1838 TP_PROTO(struct ieee80211_local *local,
1839 struct ieee80211_sub_if_data *sdata),
1840
1841 TP_ARGS(local, sdata),
1842
1843 TP_STRUCT__entry(
1844 LOCAL_ENTRY
1845 VIF_ENTRY
1846 ),
1847
1848 TP_fast_assign(
1849 LOCAL_ASSIGN;
1850 VIF_ASSIGN;
1851 ),
1852
1853 TP_printk(
1854 LOCAL_PR_FMT VIF_PR_FMT,
1855 LOCAL_PR_ARG, VIF_PR_ARG
1856 )
1857);
1858
Ayala Beker5953ff62016-09-20 17:31:19 +03001859TRACE_EVENT(drv_nan_change_conf,
1860 TP_PROTO(struct ieee80211_local *local,
1861 struct ieee80211_sub_if_data *sdata,
1862 struct cfg80211_nan_conf *conf,
1863 u32 changes),
1864
1865 TP_ARGS(local, sdata, conf, changes),
1866 TP_STRUCT__entry(
1867 LOCAL_ENTRY
1868 VIF_ENTRY
1869 __field(u8, master_pref)
Luca Coelho85859892017-02-08 15:00:34 +02001870 __field(u8, bands)
Ayala Beker5953ff62016-09-20 17:31:19 +03001871 __field(u32, changes)
1872 ),
1873
1874 TP_fast_assign(
1875 LOCAL_ASSIGN;
1876 VIF_ASSIGN;
1877 __entry->master_pref = conf->master_pref;
Luca Coelho85859892017-02-08 15:00:34 +02001878 __entry->bands = conf->bands;
Ayala Beker5953ff62016-09-20 17:31:19 +03001879 __entry->changes = changes;
1880 ),
1881
1882 TP_printk(
1883 LOCAL_PR_FMT VIF_PR_FMT
Luca Coelho85859892017-02-08 15:00:34 +02001884 ", master preference: %u, bands: 0x%0x, changes: 0x%x",
Ayala Beker5953ff62016-09-20 17:31:19 +03001885 LOCAL_PR_ARG, VIF_PR_ARG, __entry->master_pref,
Luca Coelho85859892017-02-08 15:00:34 +02001886 __entry->bands, __entry->changes
Ayala Beker5953ff62016-09-20 17:31:19 +03001887 )
1888);
1889
Ayala Beker167e33f2016-09-20 17:31:20 +03001890TRACE_EVENT(drv_add_nan_func,
1891 TP_PROTO(struct ieee80211_local *local,
1892 struct ieee80211_sub_if_data *sdata,
1893 const struct cfg80211_nan_func *func),
1894
1895 TP_ARGS(local, sdata, func),
1896 TP_STRUCT__entry(
1897 LOCAL_ENTRY
1898 VIF_ENTRY
1899 __field(u8, type)
1900 __field(u8, inst_id)
1901 ),
1902
1903 TP_fast_assign(
1904 LOCAL_ASSIGN;
1905 VIF_ASSIGN;
1906 __entry->type = func->type;
1907 __entry->inst_id = func->instance_id;
1908 ),
1909
1910 TP_printk(
1911 LOCAL_PR_FMT VIF_PR_FMT
1912 ", type: %u, inst_id: %u",
1913 LOCAL_PR_ARG, VIF_PR_ARG, __entry->type, __entry->inst_id
1914 )
1915);
1916
1917TRACE_EVENT(drv_del_nan_func,
1918 TP_PROTO(struct ieee80211_local *local,
1919 struct ieee80211_sub_if_data *sdata,
1920 u8 instance_id),
1921
1922 TP_ARGS(local, sdata, instance_id),
1923 TP_STRUCT__entry(
1924 LOCAL_ENTRY
1925 VIF_ENTRY
1926 __field(u8, instance_id)
1927 ),
1928
1929 TP_fast_assign(
1930 LOCAL_ASSIGN;
1931 VIF_ASSIGN;
1932 __entry->instance_id = instance_id;
1933 ),
1934
1935 TP_printk(
1936 LOCAL_PR_FMT VIF_PR_FMT
1937 ", instance_id: %u",
1938 LOCAL_PR_ARG, VIF_PR_ARG, __entry->instance_id
1939 )
1940);
1941
Johannes Bergcee70132018-10-16 11:24:47 +02001942DEFINE_EVENT(local_sdata_evt, drv_start_pmsr,
1943 TP_PROTO(struct ieee80211_local *local,
1944 struct ieee80211_sub_if_data *sdata),
1945 TP_ARGS(local, sdata)
1946);
1947
1948DEFINE_EVENT(local_sdata_evt, drv_abort_pmsr,
1949 TP_PROTO(struct ieee80211_local *local,
1950 struct ieee80211_sub_if_data *sdata),
1951 TP_ARGS(local, sdata)
1952);
1953
Johannes Bergb5878a22010-04-07 16:48:40 +02001954/*
1955 * Tracing for API calls that drivers call.
1956 */
1957
1958TRACE_EVENT(api_start_tx_ba_session,
1959 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1960
1961 TP_ARGS(sta, tid),
1962
1963 TP_STRUCT__entry(
1964 STA_ENTRY
1965 __field(u16, tid)
1966 ),
1967
1968 TP_fast_assign(
1969 STA_ASSIGN;
1970 __entry->tid = tid;
1971 ),
1972
1973 TP_printk(
1974 STA_PR_FMT " tid:%d",
1975 STA_PR_ARG, __entry->tid
1976 )
1977);
1978
1979TRACE_EVENT(api_start_tx_ba_cb,
1980 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1981
1982 TP_ARGS(sdata, ra, tid),
1983
1984 TP_STRUCT__entry(
1985 VIF_ENTRY
1986 __array(u8, ra, ETH_ALEN)
1987 __field(u16, tid)
1988 ),
1989
1990 TP_fast_assign(
1991 VIF_ASSIGN;
1992 memcpy(__entry->ra, ra, ETH_ALEN);
1993 __entry->tid = tid;
1994 ),
1995
1996 TP_printk(
1997 VIF_PR_FMT " ra:%pM tid:%d",
1998 VIF_PR_ARG, __entry->ra, __entry->tid
1999 )
2000);
2001
2002TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02002003 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02002004
Johannes Berg6a8579d2010-05-27 14:41:07 +02002005 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02002006
2007 TP_STRUCT__entry(
2008 STA_ENTRY
2009 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02002010 ),
2011
2012 TP_fast_assign(
2013 STA_ASSIGN;
2014 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02002015 ),
2016
2017 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02002018 STA_PR_FMT " tid:%d",
2019 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02002020 )
2021);
2022
2023TRACE_EVENT(api_stop_tx_ba_cb,
2024 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
2025
2026 TP_ARGS(sdata, ra, tid),
2027
2028 TP_STRUCT__entry(
2029 VIF_ENTRY
2030 __array(u8, ra, ETH_ALEN)
2031 __field(u16, tid)
2032 ),
2033
2034 TP_fast_assign(
2035 VIF_ASSIGN;
2036 memcpy(__entry->ra, ra, ETH_ALEN);
2037 __entry->tid = tid;
2038 ),
2039
2040 TP_printk(
2041 VIF_PR_FMT " ra:%pM tid:%d",
2042 VIF_PR_ARG, __entry->ra, __entry->tid
2043 )
2044);
2045
Johannes Bergba99d932011-01-26 09:22:15 +01002046DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02002047 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01002048 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02002049);
2050
2051TRACE_EVENT(api_beacon_loss,
2052 TP_PROTO(struct ieee80211_sub_if_data *sdata),
2053
2054 TP_ARGS(sdata),
2055
2056 TP_STRUCT__entry(
2057 VIF_ENTRY
2058 ),
2059
2060 TP_fast_assign(
2061 VIF_ASSIGN;
2062 ),
2063
2064 TP_printk(
2065 VIF_PR_FMT,
2066 VIF_PR_ARG
2067 )
2068);
2069
2070TRACE_EVENT(api_connection_loss,
2071 TP_PROTO(struct ieee80211_sub_if_data *sdata),
2072
2073 TP_ARGS(sdata),
2074
2075 TP_STRUCT__entry(
2076 VIF_ENTRY
2077 ),
2078
2079 TP_fast_assign(
2080 VIF_ASSIGN;
2081 ),
2082
2083 TP_printk(
2084 VIF_PR_FMT,
2085 VIF_PR_ARG
2086 )
2087);
2088
2089TRACE_EVENT(api_cqm_rssi_notify,
2090 TP_PROTO(struct ieee80211_sub_if_data *sdata,
Andrzej Zaborowski769f07d2017-01-25 12:43:40 +01002091 enum nl80211_cqm_rssi_threshold_event rssi_event,
2092 s32 rssi_level),
Johannes Bergb5878a22010-04-07 16:48:40 +02002093
Andrzej Zaborowski769f07d2017-01-25 12:43:40 +01002094 TP_ARGS(sdata, rssi_event, rssi_level),
Johannes Bergb5878a22010-04-07 16:48:40 +02002095
2096 TP_STRUCT__entry(
2097 VIF_ENTRY
2098 __field(u32, rssi_event)
Andrzej Zaborowski769f07d2017-01-25 12:43:40 +01002099 __field(s32, rssi_level)
Johannes Bergb5878a22010-04-07 16:48:40 +02002100 ),
2101
2102 TP_fast_assign(
2103 VIF_ASSIGN;
2104 __entry->rssi_event = rssi_event;
Andrzej Zaborowski769f07d2017-01-25 12:43:40 +01002105 __entry->rssi_level = rssi_level;
Johannes Bergb5878a22010-04-07 16:48:40 +02002106 ),
2107
2108 TP_printk(
Andrzej Zaborowski769f07d2017-01-25 12:43:40 +01002109 VIF_PR_FMT " event:%d rssi:%d",
2110 VIF_PR_ARG, __entry->rssi_event, __entry->rssi_level
Johannes Bergb5878a22010-04-07 16:48:40 +02002111 )
2112);
2113
Johannes Berg98f03342014-11-26 12:42:02 +01002114DEFINE_EVENT(local_sdata_evt, api_cqm_beacon_loss_notify,
2115 TP_PROTO(struct ieee80211_local *local,
2116 struct ieee80211_sub_if_data *sdata),
2117 TP_ARGS(local, sdata)
2118);
2119
Johannes Bergb5878a22010-04-07 16:48:40 +02002120TRACE_EVENT(api_scan_completed,
2121 TP_PROTO(struct ieee80211_local *local, bool aborted),
2122
2123 TP_ARGS(local, aborted),
2124
2125 TP_STRUCT__entry(
2126 LOCAL_ENTRY
2127 __field(bool, aborted)
2128 ),
2129
2130 TP_fast_assign(
2131 LOCAL_ASSIGN;
2132 __entry->aborted = aborted;
2133 ),
2134
2135 TP_printk(
2136 LOCAL_PR_FMT " aborted:%d",
2137 LOCAL_PR_ARG, __entry->aborted
2138 )
2139);
2140
Luciano Coelho79f460c2011-05-11 17:09:36 +03002141TRACE_EVENT(api_sched_scan_results,
2142 TP_PROTO(struct ieee80211_local *local),
2143
2144 TP_ARGS(local),
2145
2146 TP_STRUCT__entry(
2147 LOCAL_ENTRY
2148 ),
2149
2150 TP_fast_assign(
2151 LOCAL_ASSIGN;
2152 ),
2153
2154 TP_printk(
2155 LOCAL_PR_FMT, LOCAL_PR_ARG
2156 )
2157);
2158
2159TRACE_EVENT(api_sched_scan_stopped,
2160 TP_PROTO(struct ieee80211_local *local),
2161
2162 TP_ARGS(local),
2163
2164 TP_STRUCT__entry(
2165 LOCAL_ENTRY
2166 ),
2167
2168 TP_fast_assign(
2169 LOCAL_ASSIGN;
2170 ),
2171
2172 TP_printk(
2173 LOCAL_PR_FMT, LOCAL_PR_ARG
2174 )
2175);
2176
Johannes Bergb5878a22010-04-07 16:48:40 +02002177TRACE_EVENT(api_sta_block_awake,
2178 TP_PROTO(struct ieee80211_local *local,
2179 struct ieee80211_sta *sta, bool block),
2180
2181 TP_ARGS(local, sta, block),
2182
2183 TP_STRUCT__entry(
2184 LOCAL_ENTRY
2185 STA_ENTRY
2186 __field(bool, block)
2187 ),
2188
2189 TP_fast_assign(
2190 LOCAL_ASSIGN;
2191 STA_ASSIGN;
2192 __entry->block = block;
2193 ),
2194
2195 TP_printk(
2196 LOCAL_PR_FMT STA_PR_FMT " block:%d",
Seth Forshee15ac7c472013-02-15 13:15:48 -06002197 LOCAL_PR_ARG, STA_PR_ARG, __entry->block
Johannes Bergb5878a22010-04-07 16:48:40 +02002198 )
2199);
2200
Johannes Berg5ce6e432010-05-11 16:20:57 +02002201TRACE_EVENT(api_chswitch_done,
2202 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
2203
2204 TP_ARGS(sdata, success),
2205
2206 TP_STRUCT__entry(
2207 VIF_ENTRY
2208 __field(bool, success)
2209 ),
2210
2211 TP_fast_assign(
2212 VIF_ASSIGN;
2213 __entry->success = success;
2214 ),
2215
2216 TP_printk(
2217 VIF_PR_FMT " success=%d",
2218 VIF_PR_ARG, __entry->success
2219 )
2220);
2221
Johannes Bergba99d932011-01-26 09:22:15 +01002222DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01002223 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01002224 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01002225);
2226
Johannes Bergba99d932011-01-26 09:22:15 +01002227DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01002228 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01002229 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01002230);
2231
Johannes Bergc68f4b82011-07-05 16:35:41 +02002232TRACE_EVENT(api_gtk_rekey_notify,
2233 TP_PROTO(struct ieee80211_sub_if_data *sdata,
2234 const u8 *bssid, const u8 *replay_ctr),
2235
2236 TP_ARGS(sdata, bssid, replay_ctr),
2237
2238 TP_STRUCT__entry(
2239 VIF_ENTRY
2240 __array(u8, bssid, ETH_ALEN)
2241 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
2242 ),
2243
2244 TP_fast_assign(
2245 VIF_ASSIGN;
2246 memcpy(__entry->bssid, bssid, ETH_ALEN);
2247 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
2248 ),
2249
2250 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
2251);
2252
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07002253TRACE_EVENT(api_enable_rssi_reports,
2254 TP_PROTO(struct ieee80211_sub_if_data *sdata,
2255 int rssi_min_thold, int rssi_max_thold),
2256
2257 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
2258
2259 TP_STRUCT__entry(
2260 VIF_ENTRY
2261 __field(int, rssi_min_thold)
2262 __field(int, rssi_max_thold)
2263 ),
2264
2265 TP_fast_assign(
2266 VIF_ASSIGN;
2267 __entry->rssi_min_thold = rssi_min_thold;
2268 __entry->rssi_max_thold = rssi_max_thold;
2269 ),
2270
2271 TP_printk(
2272 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
2273 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
2274 )
2275);
2276
Johannes Berg37fbd902011-09-29 16:04:39 +02002277TRACE_EVENT(api_eosp,
2278 TP_PROTO(struct ieee80211_local *local,
2279 struct ieee80211_sta *sta),
2280
2281 TP_ARGS(local, sta),
2282
2283 TP_STRUCT__entry(
2284 LOCAL_ENTRY
2285 STA_ENTRY
2286 ),
2287
2288 TP_fast_assign(
2289 LOCAL_ASSIGN;
2290 STA_ASSIGN;
2291 ),
2292
2293 TP_printk(
2294 LOCAL_PR_FMT STA_PR_FMT,
Seth Forshee15ac7c472013-02-15 13:15:48 -06002295 LOCAL_PR_ARG, STA_PR_ARG
Johannes Berg37fbd902011-09-29 16:04:39 +02002296 )
2297);
2298
Emmanuel Grumbach0ead2512015-11-17 10:24:36 +02002299TRACE_EVENT(api_send_eosp_nullfunc,
2300 TP_PROTO(struct ieee80211_local *local,
2301 struct ieee80211_sta *sta,
2302 u8 tid),
2303
2304 TP_ARGS(local, sta, tid),
2305
2306 TP_STRUCT__entry(
2307 LOCAL_ENTRY
2308 STA_ENTRY
2309 __field(u8, tid)
2310 ),
2311
2312 TP_fast_assign(
2313 LOCAL_ASSIGN;
2314 STA_ASSIGN;
2315 __entry->tid = tid;
2316 ),
2317
2318 TP_printk(
2319 LOCAL_PR_FMT STA_PR_FMT " tid:%d",
2320 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid
2321 )
2322);
2323
Johannes Berg1b000782013-12-19 10:47:48 +01002324TRACE_EVENT(api_sta_set_buffered,
2325 TP_PROTO(struct ieee80211_local *local,
2326 struct ieee80211_sta *sta,
2327 u8 tid, bool buffered),
2328
2329 TP_ARGS(local, sta, tid, buffered),
2330
2331 TP_STRUCT__entry(
2332 LOCAL_ENTRY
2333 STA_ENTRY
2334 __field(u8, tid)
2335 __field(bool, buffered)
2336 ),
2337
2338 TP_fast_assign(
2339 LOCAL_ASSIGN;
2340 STA_ASSIGN;
2341 __entry->tid = tid;
2342 __entry->buffered = buffered;
2343 ),
2344
2345 TP_printk(
2346 LOCAL_PR_FMT STA_PR_FMT " tid:%d buffered:%d",
2347 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid, __entry->buffered
2348 )
2349);
2350
Johannes Bergb5878a22010-04-07 16:48:40 +02002351/*
2352 * Tracing for internal functions
2353 * (which may also be called in response to driver calls)
2354 */
2355
2356TRACE_EVENT(wake_queue,
2357 TP_PROTO(struct ieee80211_local *local, u16 queue,
2358 enum queue_stop_reason reason),
2359
2360 TP_ARGS(local, queue, reason),
2361
2362 TP_STRUCT__entry(
2363 LOCAL_ENTRY
2364 __field(u16, queue)
2365 __field(u32, reason)
2366 ),
2367
2368 TP_fast_assign(
2369 LOCAL_ASSIGN;
2370 __entry->queue = queue;
2371 __entry->reason = reason;
2372 ),
2373
2374 TP_printk(
2375 LOCAL_PR_FMT " queue:%d, reason:%d",
2376 LOCAL_PR_ARG, __entry->queue, __entry->reason
2377 )
2378);
2379
2380TRACE_EVENT(stop_queue,
2381 TP_PROTO(struct ieee80211_local *local, u16 queue,
2382 enum queue_stop_reason reason),
2383
2384 TP_ARGS(local, queue, reason),
2385
2386 TP_STRUCT__entry(
2387 LOCAL_ENTRY
2388 __field(u16, queue)
2389 __field(u32, reason)
2390 ),
2391
2392 TP_fast_assign(
2393 LOCAL_ASSIGN;
2394 __entry->queue = queue;
2395 __entry->reason = reason;
2396 ),
2397
2398 TP_printk(
2399 LOCAL_PR_FMT " queue:%d, reason:%d",
2400 LOCAL_PR_ARG, __entry->queue, __entry->reason
2401 )
2402);
Johannes Berg3fae0272012-06-22 13:36:25 +02002403
Yoni Divinskyde5fad82012-05-30 11:36:39 +03002404TRACE_EVENT(drv_set_default_unicast_key,
2405 TP_PROTO(struct ieee80211_local *local,
2406 struct ieee80211_sub_if_data *sdata,
2407 int key_idx),
2408
2409 TP_ARGS(local, sdata, key_idx),
2410
2411 TP_STRUCT__entry(
2412 LOCAL_ENTRY
2413 VIF_ENTRY
2414 __field(int, key_idx)
2415 ),
2416
2417 TP_fast_assign(
2418 LOCAL_ASSIGN;
2419 VIF_ASSIGN;
2420 __entry->key_idx = key_idx;
2421 ),
2422
2423 TP_printk(LOCAL_PR_FMT VIF_PR_FMT " key_idx:%d",
2424 LOCAL_PR_ARG, VIF_PR_ARG, __entry->key_idx)
2425);
2426
Simon Wunderlich164eb022013-02-08 18:16:20 +01002427TRACE_EVENT(api_radar_detected,
2428 TP_PROTO(struct ieee80211_local *local),
2429
2430 TP_ARGS(local),
2431
2432 TP_STRUCT__entry(
2433 LOCAL_ENTRY
2434 ),
2435
2436 TP_fast_assign(
2437 LOCAL_ASSIGN;
2438 ),
2439
2440 TP_printk(
2441 LOCAL_PR_FMT " radar detected",
2442 LOCAL_PR_ARG
2443 )
2444);
2445
Simon Wunderlich73da7d52013-07-11 16:09:06 +02002446TRACE_EVENT(drv_channel_switch_beacon,
2447 TP_PROTO(struct ieee80211_local *local,
2448 struct ieee80211_sub_if_data *sdata,
2449 struct cfg80211_chan_def *chandef),
2450
2451 TP_ARGS(local, sdata, chandef),
2452
2453 TP_STRUCT__entry(
2454 LOCAL_ENTRY
2455 VIF_ENTRY
2456 CHANDEF_ENTRY
2457 ),
2458
2459 TP_fast_assign(
2460 LOCAL_ASSIGN;
2461 VIF_ASSIGN;
2462 CHANDEF_ASSIGN(chandef);
2463 ),
2464
2465 TP_printk(
2466 LOCAL_PR_FMT VIF_PR_FMT " channel switch to " CHANDEF_PR_FMT,
2467 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG
2468 )
2469);
2470
Luciano Coelho6d027bc2014-10-08 09:48:37 +03002471TRACE_EVENT(drv_pre_channel_switch,
2472 TP_PROTO(struct ieee80211_local *local,
2473 struct ieee80211_sub_if_data *sdata,
2474 struct ieee80211_channel_switch *ch_switch),
2475
2476 TP_ARGS(local, sdata, ch_switch),
2477
2478 TP_STRUCT__entry(
2479 LOCAL_ENTRY
2480 VIF_ENTRY
2481 CHANDEF_ENTRY
2482 __field(u64, timestamp)
Luciano Coelho127f10e2014-11-07 15:28:34 +02002483 __field(u32, device_timestamp)
Luciano Coelho6d027bc2014-10-08 09:48:37 +03002484 __field(bool, block_tx)
2485 __field(u8, count)
2486 ),
2487
2488 TP_fast_assign(
2489 LOCAL_ASSIGN;
2490 VIF_ASSIGN;
2491 CHANDEF_ASSIGN(&ch_switch->chandef)
2492 __entry->timestamp = ch_switch->timestamp;
Luciano Coelho127f10e2014-11-07 15:28:34 +02002493 __entry->device_timestamp = ch_switch->device_timestamp;
Luciano Coelho6d027bc2014-10-08 09:48:37 +03002494 __entry->block_tx = ch_switch->block_tx;
2495 __entry->count = ch_switch->count;
2496 ),
2497
2498 TP_printk(
2499 LOCAL_PR_FMT VIF_PR_FMT " prepare channel switch to "
2500 CHANDEF_PR_FMT " count:%d block_tx:%d timestamp:%llu",
2501 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count,
2502 __entry->block_tx, __entry->timestamp
2503 )
2504);
2505
Luciano Coelhof1d65582014-10-08 09:48:38 +03002506DEFINE_EVENT(local_sdata_evt, drv_post_channel_switch,
2507 TP_PROTO(struct ieee80211_local *local,
2508 struct ieee80211_sub_if_data *sdata),
2509 TP_ARGS(local, sdata)
2510);
2511
Sara Sharonb9cc81d2019-02-06 13:17:10 +02002512DEFINE_EVENT(local_sdata_evt, drv_abort_channel_switch,
2513 TP_PROTO(struct ieee80211_local *local,
2514 struct ieee80211_sub_if_data *sdata),
2515 TP_ARGS(local, sdata)
2516);
2517
Sara Sharonfafd2bc2019-02-06 13:17:15 +02002518TRACE_EVENT(drv_channel_switch_rx_beacon,
2519 TP_PROTO(struct ieee80211_local *local,
2520 struct ieee80211_sub_if_data *sdata,
2521 struct ieee80211_channel_switch *ch_switch),
2522
2523 TP_ARGS(local, sdata, ch_switch),
2524
2525 TP_STRUCT__entry(
2526 LOCAL_ENTRY
2527 VIF_ENTRY
2528 CHANDEF_ENTRY
2529 __field(u64, timestamp)
2530 __field(u32, device_timestamp)
2531 __field(bool, block_tx)
2532 __field(u8, count)
2533 ),
2534
2535 TP_fast_assign(
2536 LOCAL_ASSIGN;
2537 VIF_ASSIGN;
2538 CHANDEF_ASSIGN(&ch_switch->chandef)
2539 __entry->timestamp = ch_switch->timestamp;
2540 __entry->device_timestamp = ch_switch->device_timestamp;
2541 __entry->block_tx = ch_switch->block_tx;
2542 __entry->count = ch_switch->count;
2543 ),
2544
2545 TP_printk(
2546 LOCAL_PR_FMT VIF_PR_FMT
2547 " received a channel switch beacon to "
2548 CHANDEF_PR_FMT " count:%d block_tx:%d timestamp:%llu",
2549 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count,
2550 __entry->block_tx, __entry->timestamp
2551 )
2552);
2553
Felix Fietkau5b3dc422014-10-26 00:32:53 +02002554TRACE_EVENT(drv_get_txpower,
2555 TP_PROTO(struct ieee80211_local *local,
2556 struct ieee80211_sub_if_data *sdata,
2557 int dbm, int ret),
2558
2559 TP_ARGS(local, sdata, dbm, ret),
2560
2561 TP_STRUCT__entry(
2562 LOCAL_ENTRY
2563 VIF_ENTRY
2564 __field(int, dbm)
2565 __field(int, ret)
2566 ),
2567
2568 TP_fast_assign(
2569 LOCAL_ASSIGN;
2570 VIF_ASSIGN;
2571 __entry->dbm = dbm;
2572 __entry->ret = ret;
2573 ),
2574
2575 TP_printk(
2576 LOCAL_PR_FMT VIF_PR_FMT " dbm:%d ret:%d",
2577 LOCAL_PR_ARG, VIF_PR_ARG, __entry->dbm, __entry->ret
2578 )
2579);
2580
Arik Nemtsova7a6bdd2014-11-09 18:50:19 +02002581TRACE_EVENT(drv_tdls_channel_switch,
2582 TP_PROTO(struct ieee80211_local *local,
2583 struct ieee80211_sub_if_data *sdata,
2584 struct ieee80211_sta *sta, u8 oper_class,
2585 struct cfg80211_chan_def *chandef),
2586
2587 TP_ARGS(local, sdata, sta, oper_class, chandef),
2588
2589 TP_STRUCT__entry(
2590 LOCAL_ENTRY
2591 VIF_ENTRY
2592 STA_ENTRY
2593 __field(u8, oper_class)
2594 CHANDEF_ENTRY
2595 ),
2596
2597 TP_fast_assign(
2598 LOCAL_ASSIGN;
2599 VIF_ASSIGN;
2600 STA_ASSIGN;
2601 __entry->oper_class = oper_class;
2602 CHANDEF_ASSIGN(chandef)
2603 ),
2604
2605 TP_printk(
2606 LOCAL_PR_FMT VIF_PR_FMT " tdls channel switch to"
2607 CHANDEF_PR_FMT " oper_class:%d " STA_PR_FMT,
2608 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->oper_class,
2609 STA_PR_ARG
2610 )
2611);
2612
2613TRACE_EVENT(drv_tdls_cancel_channel_switch,
2614 TP_PROTO(struct ieee80211_local *local,
2615 struct ieee80211_sub_if_data *sdata,
2616 struct ieee80211_sta *sta),
2617
2618 TP_ARGS(local, sdata, sta),
2619
2620 TP_STRUCT__entry(
2621 LOCAL_ENTRY
2622 VIF_ENTRY
2623 STA_ENTRY
2624 ),
2625
2626 TP_fast_assign(
2627 LOCAL_ASSIGN;
2628 VIF_ASSIGN;
2629 STA_ASSIGN;
2630 ),
2631
2632 TP_printk(
2633 LOCAL_PR_FMT VIF_PR_FMT
2634 " tdls cancel channel switch with " STA_PR_FMT,
2635 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
2636 )
2637);
Simon Wunderlich73da7d52013-07-11 16:09:06 +02002638
Arik Nemtsov8a4d32f2014-11-09 18:50:20 +02002639TRACE_EVENT(drv_tdls_recv_channel_switch,
2640 TP_PROTO(struct ieee80211_local *local,
2641 struct ieee80211_sub_if_data *sdata,
2642 struct ieee80211_tdls_ch_sw_params *params),
2643
2644 TP_ARGS(local, sdata, params),
2645
2646 TP_STRUCT__entry(
2647 LOCAL_ENTRY
2648 VIF_ENTRY
2649 __field(u8, action_code)
2650 STA_ENTRY
2651 CHANDEF_ENTRY
2652 __field(u32, status)
2653 __field(bool, peer_initiator)
2654 __field(u32, timestamp)
2655 __field(u16, switch_time)
2656 __field(u16, switch_timeout)
2657 ),
2658
2659 TP_fast_assign(
2660 LOCAL_ASSIGN;
2661 VIF_ASSIGN;
2662 STA_NAMED_ASSIGN(params->sta);
2663 CHANDEF_ASSIGN(params->chandef)
2664 __entry->peer_initiator = params->sta->tdls_initiator;
2665 __entry->action_code = params->action_code;
2666 __entry->status = params->status;
2667 __entry->timestamp = params->timestamp;
2668 __entry->switch_time = params->switch_time;
2669 __entry->switch_timeout = params->switch_timeout;
2670 ),
2671
2672 TP_printk(
2673 LOCAL_PR_FMT VIF_PR_FMT " received tdls channel switch packet"
2674 " action:%d status:%d time:%d switch time:%d switch"
2675 " timeout:%d initiator: %d chan:" CHANDEF_PR_FMT STA_PR_FMT,
2676 LOCAL_PR_ARG, VIF_PR_ARG, __entry->action_code, __entry->status,
2677 __entry->timestamp, __entry->switch_time,
2678 __entry->switch_timeout, __entry->peer_initiator,
2679 CHANDEF_PR_ARG, STA_PR_ARG
2680 )
2681);
2682
Felix Fietkauba8c3d62015-03-27 21:30:37 +01002683TRACE_EVENT(drv_wake_tx_queue,
2684 TP_PROTO(struct ieee80211_local *local,
2685 struct ieee80211_sub_if_data *sdata,
2686 struct txq_info *txq),
2687
2688 TP_ARGS(local, sdata, txq),
2689
2690 TP_STRUCT__entry(
2691 LOCAL_ENTRY
2692 VIF_ENTRY
2693 STA_ENTRY
2694 __field(u8, ac)
2695 __field(u8, tid)
2696 ),
2697
2698 TP_fast_assign(
2699 struct ieee80211_sta *sta = txq->txq.sta;
2700
2701 LOCAL_ASSIGN;
2702 VIF_ASSIGN;
2703 STA_ASSIGN;
2704 __entry->ac = txq->txq.ac;
2705 __entry->tid = txq->txq.tid;
2706 ),
2707
2708 TP_printk(
2709 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ac:%d tid:%d",
2710 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ac, __entry->tid
2711 )
2712);
2713
Pradeep Kumar Chitrapubc847972018-10-03 20:19:20 -07002714TRACE_EVENT(drv_get_ftm_responder_stats,
2715 TP_PROTO(struct ieee80211_local *local,
2716 struct ieee80211_sub_if_data *sdata,
2717 struct cfg80211_ftm_responder_stats *ftm_stats),
2718
2719 TP_ARGS(local, sdata, ftm_stats),
2720
2721 TP_STRUCT__entry(
2722 LOCAL_ENTRY
2723 VIF_ENTRY
2724 ),
2725
2726 TP_fast_assign(
2727 LOCAL_ASSIGN;
2728 VIF_ASSIGN;
2729 ),
2730
2731 TP_printk(
2732 LOCAL_PR_FMT VIF_PR_FMT,
2733 LOCAL_PR_ARG, VIF_PR_ARG
2734 )
2735);
2736
Felix Fietkau6aea26c2020-09-08 14:36:53 +02002737DEFINE_EVENT(local_sdata_addr_evt, drv_update_vif_offload,
2738 TP_PROTO(struct ieee80211_local *local,
2739 struct ieee80211_sub_if_data *sdata),
2740 TP_ARGS(local, sdata)
2741);
2742
Felix Fietkau1ff4e8f2020-09-08 14:37:01 +02002743TRACE_EVENT(drv_sta_set_4addr,
2744 TP_PROTO(struct ieee80211_local *local,
2745 struct ieee80211_sub_if_data *sdata,
2746 struct ieee80211_sta *sta, bool enabled),
2747
2748 TP_ARGS(local, sdata, sta, enabled),
2749
2750 TP_STRUCT__entry(
2751 LOCAL_ENTRY
2752 VIF_ENTRY
2753 STA_ENTRY
2754 __field(bool, enabled)
2755 ),
2756
2757 TP_fast_assign(
2758 LOCAL_ASSIGN;
2759 VIF_ASSIGN;
2760 STA_ASSIGN;
2761 __entry->enabled = enabled;
2762 ),
2763
2764 TP_printk(
2765 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " enabled:%d",
2766 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->enabled
2767 )
2768);
2769
Christian Lamparterf7428802009-07-19 23:21:07 +02002770#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02002771
2772#undef TRACE_INCLUDE_PATH
2773#define TRACE_INCLUDE_PATH .
2774#undef TRACE_INCLUDE_FILE
Johannes Berg011ad0e2012-06-22 12:55:52 +02002775#define TRACE_INCLUDE_FILE trace
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02002776#include <trace/define_trace.h>