blob: 0ab69a1964f8b97a7035a58f0321e5490c6a9a58 [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
4* Copyright(c) 2016 Intel Deutschland GmbH
Ilan Peerd4e36e52018-04-20 13:49:25 +03005* Copyright (C) 2018 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)
25#define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN))
Arik Nemtsov8a4d32f2014-11-09 18:50:20 +020026#define STA_NAMED_ASSIGN(s) memcpy(__entry->sta_addr, (s)->addr, ETH_ALEN)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020027#define STA_PR_FMT " sta:%pM"
28#define STA_PR_ARG __entry->sta_addr
29
Johannes Berg2ca27bc2010-09-16 14:58:23 +020030#define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
31 __field(bool, p2p) \
Eliad Pellerf9ac71b2014-02-26 14:46:35 +020032 __string(vif_name, sdata->name)
Johannes Berg2ca27bc2010-09-16 14:58:23 +020033#define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
34 __entry->p2p = sdata->vif.p2p; \
Eliad Pellerf9ac71b2014-02-26 14:46:35 +020035 __assign_str(vif_name, sdata->name)
Johannes Berg2ca27bc2010-09-16 14:58:23 +020036#define VIF_PR_FMT " vif:%s(%d%s)"
37#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020038
Karl Beldan675a0b02013-03-25 16:26:57 +010039#define CHANDEF_ENTRY __field(u32, control_freq) \
40 __field(u32, chan_width) \
41 __field(u32, center_freq1) \
Johannes Berg5a32aff2012-12-21 12:36:33 +010042 __field(u32, center_freq2)
Arik Nemtsov254d3df2015-10-25 10:59:41 +020043#define CHANDEF_ASSIGN(c) \
44 __entry->control_freq = (c) ? ((c)->chan ? (c)->chan->center_freq : 0) : 0; \
45 __entry->chan_width = (c) ? (c)->width : 0; \
46 __entry->center_freq1 = (c) ? (c)->center_freq1 : 0; \
47 __entry->center_freq2 = (c) ? (c)->center_freq2 : 0;
Johannes Berg5a32aff2012-12-21 12:36:33 +010048#define CHANDEF_PR_FMT " control:%d MHz width:%d center: %d/%d MHz"
Karl Beldan675a0b02013-03-25 16:26:57 +010049#define CHANDEF_PR_ARG __entry->control_freq, __entry->chan_width, \
Johannes Berg5a32aff2012-12-21 12:36:33 +010050 __entry->center_freq1, __entry->center_freq2
51
Eliad Peller21f659b2013-11-11 20:14:01 +020052#define MIN_CHANDEF_ENTRY \
53 __field(u32, min_control_freq) \
54 __field(u32, min_chan_width) \
55 __field(u32, min_center_freq1) \
56 __field(u32, min_center_freq2)
57
58#define MIN_CHANDEF_ASSIGN(c) \
59 __entry->min_control_freq = (c)->chan ? (c)->chan->center_freq : 0; \
60 __entry->min_chan_width = (c)->width; \
61 __entry->min_center_freq1 = (c)->center_freq1; \
62 __entry->min_center_freq2 = (c)->center_freq2;
63#define MIN_CHANDEF_PR_FMT " min_control:%d MHz min_width:%d min_center: %d/%d MHz"
64#define MIN_CHANDEF_PR_ARG __entry->min_control_freq, __entry->min_chan_width, \
65 __entry->min_center_freq1, __entry->min_center_freq2
66
Karl Beldan675a0b02013-03-25 16:26:57 +010067#define CHANCTX_ENTRY CHANDEF_ENTRY \
Eliad Peller21f659b2013-11-11 20:14:01 +020068 MIN_CHANDEF_ENTRY \
Karl Beldan675a0b02013-03-25 16:26:57 +010069 __field(u8, rx_chains_static) \
Johannes Berg04ecd252012-09-11 14:34:12 +020070 __field(u8, rx_chains_dynamic)
Karl Beldan675a0b02013-03-25 16:26:57 +010071#define CHANCTX_ASSIGN CHANDEF_ASSIGN(&ctx->conf.def) \
Eliad Peller21f659b2013-11-11 20:14:01 +020072 MIN_CHANDEF_ASSIGN(&ctx->conf.min_def) \
Karl Beldan675a0b02013-03-25 16:26:57 +010073 __entry->rx_chains_static = ctx->conf.rx_chains_static; \
Johannes Berg04ecd252012-09-11 14:34:12 +020074 __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic
Eliad Peller21f659b2013-11-11 20:14:01 +020075#define CHANCTX_PR_FMT CHANDEF_PR_FMT MIN_CHANDEF_PR_FMT " chains:%d/%d"
76#define CHANCTX_PR_ARG CHANDEF_PR_ARG, MIN_CHANDEF_PR_ARG, \
Johannes Berg04ecd252012-09-11 14:34:12 +020077 __entry->rx_chains_static, __entry->rx_chains_dynamic
Michal Kaziorc3645ea2012-06-26 14:37:17 +020078
Johannes Berg9352c192015-04-20 18:12:41 +020079#define KEY_ENTRY __field(u32, cipher) \
80 __field(u8, hw_key_idx) \
81 __field(u8, flags) \
82 __field(s8, keyidx)
83#define KEY_ASSIGN(k) __entry->cipher = (k)->cipher; \
84 __entry->flags = (k)->flags; \
85 __entry->keyidx = (k)->keyidx; \
86 __entry->hw_key_idx = (k)->hw_key_idx;
87#define KEY_PR_FMT " cipher:0x%x, flags=%#x, keyidx=%d, hw_key_idx=%d"
88#define KEY_PR_ARG __entry->cipher, __entry->flags, __entry->keyidx, __entry->hw_key_idx
89
Sara Sharon50ea05e2015-12-30 16:06:04 +020090#define AMPDU_ACTION_ENTRY __field(enum ieee80211_ampdu_mlme_action, \
91 ieee80211_ampdu_mlme_action) \
92 STA_ENTRY \
93 __field(u16, tid) \
94 __field(u16, ssn) \
Luca Coelho41cbb0f2018-06-09 09:14:44 +030095 __field(u16, buf_size) \
Sara Sharon50ea05e2015-12-30 16:06:04 +020096 __field(bool, amsdu) \
Emmanuel Grumbach6dad28a2017-06-10 13:52:46 +030097 __field(u16, timeout) \
98 __field(u16, action)
Sara Sharon50ea05e2015-12-30 16:06:04 +020099#define AMPDU_ACTION_ASSIGN STA_NAMED_ASSIGN(params->sta); \
100 __entry->tid = params->tid; \
101 __entry->ssn = params->ssn; \
102 __entry->buf_size = params->buf_size; \
103 __entry->amsdu = params->amsdu; \
Emmanuel Grumbach6dad28a2017-06-10 13:52:46 +0300104 __entry->timeout = params->timeout; \
105 __entry->action = params->action;
106#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 +0200107#define AMPDU_ACTION_PR_ARG STA_PR_ARG, __entry->tid, __entry->ssn, \
Emmanuel Grumbach6dad28a2017-06-10 13:52:46 +0300108 __entry->buf_size, __entry->amsdu, __entry->timeout, \
109 __entry->action
Michal Kaziorc3645ea2012-06-26 14:37:17 +0200110
Johannes Bergb5878a22010-04-07 16:48:40 +0200111/*
112 * Tracing for driver callbacks.
113 */
114
Johannes Bergba99d932011-01-26 09:22:15 +0100115DECLARE_EVENT_CLASS(local_only_evt,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200116 TP_PROTO(struct ieee80211_local *local),
117 TP_ARGS(local),
118 TP_STRUCT__entry(
119 LOCAL_ENTRY
120 ),
121 TP_fast_assign(
122 LOCAL_ASSIGN;
123 ),
124 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
125);
126
Luciano Coelho92ddc112011-05-09 14:40:06 +0300127DECLARE_EVENT_CLASS(local_sdata_addr_evt,
128 TP_PROTO(struct ieee80211_local *local,
129 struct ieee80211_sub_if_data *sdata),
130 TP_ARGS(local, sdata),
131
132 TP_STRUCT__entry(
133 LOCAL_ENTRY
134 VIF_ENTRY
Joe Perchesd458cdf2013-10-01 19:04:40 -0700135 __array(char, addr, ETH_ALEN)
Luciano Coelho92ddc112011-05-09 14:40:06 +0300136 ),
137
138 TP_fast_assign(
139 LOCAL_ASSIGN;
140 VIF_ASSIGN;
Joe Perchesd458cdf2013-10-01 19:04:40 -0700141 memcpy(__entry->addr, sdata->vif.addr, ETH_ALEN);
Luciano Coelho92ddc112011-05-09 14:40:06 +0300142 ),
143
144 TP_printk(
145 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
146 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
147 )
148);
149
150DECLARE_EVENT_CLASS(local_u32_evt,
151 TP_PROTO(struct ieee80211_local *local, u32 value),
152 TP_ARGS(local, value),
153
154 TP_STRUCT__entry(
155 LOCAL_ENTRY
156 __field(u32, value)
157 ),
158
159 TP_fast_assign(
160 LOCAL_ASSIGN;
161 __entry->value = value;
162 ),
163
164 TP_printk(
165 LOCAL_PR_FMT " value:%d",
166 LOCAL_PR_ARG, __entry->value
167 )
168);
169
Luciano Coelho79f460c2011-05-11 17:09:36 +0300170DECLARE_EVENT_CLASS(local_sdata_evt,
171 TP_PROTO(struct ieee80211_local *local,
172 struct ieee80211_sub_if_data *sdata),
173 TP_ARGS(local, sdata),
174
175 TP_STRUCT__entry(
176 LOCAL_ENTRY
177 VIF_ENTRY
178 ),
179
180 TP_fast_assign(
181 LOCAL_ASSIGN;
182 VIF_ASSIGN;
183 ),
184
185 TP_printk(
186 LOCAL_PR_FMT VIF_PR_FMT,
187 LOCAL_PR_ARG, VIF_PR_ARG
188 )
189);
190
Johannes Bergba99d932011-01-26 09:22:15 +0100191DEFINE_EVENT(local_only_evt, drv_return_void,
192 TP_PROTO(struct ieee80211_local *local),
193 TP_ARGS(local)
194);
195
Johannes Berg4efc76b2010-06-10 10:56:20 +0200196TRACE_EVENT(drv_return_int,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200197 TP_PROTO(struct ieee80211_local *local, int ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200198 TP_ARGS(local, ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200199 TP_STRUCT__entry(
200 LOCAL_ENTRY
201 __field(int, ret)
202 ),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200203 TP_fast_assign(
204 LOCAL_ASSIGN;
205 __entry->ret = ret;
206 ),
Johannes Berg4efc76b2010-06-10 10:56:20 +0200207 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
208);
209
Vivek Natarajane8306f92011-04-06 11:41:10 +0530210TRACE_EVENT(drv_return_bool,
211 TP_PROTO(struct ieee80211_local *local, bool ret),
212 TP_ARGS(local, ret),
213 TP_STRUCT__entry(
214 LOCAL_ENTRY
215 __field(bool, ret)
216 ),
217 TP_fast_assign(
218 LOCAL_ASSIGN;
219 __entry->ret = ret;
220 ),
221 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
222 "true" : "false")
223);
224
Antonio Quartullicca674d2014-05-19 21:53:20 +0200225TRACE_EVENT(drv_return_u32,
226 TP_PROTO(struct ieee80211_local *local, u32 ret),
227 TP_ARGS(local, ret),
228 TP_STRUCT__entry(
229 LOCAL_ENTRY
230 __field(u32, ret)
231 ),
232 TP_fast_assign(
233 LOCAL_ASSIGN;
234 __entry->ret = ret;
235 ),
236 TP_printk(LOCAL_PR_FMT " - %u", LOCAL_PR_ARG, __entry->ret)
237);
238
Johannes Berg4efc76b2010-06-10 10:56:20 +0200239TRACE_EVENT(drv_return_u64,
240 TP_PROTO(struct ieee80211_local *local, u64 ret),
241 TP_ARGS(local, ret),
242 TP_STRUCT__entry(
243 LOCAL_ENTRY
244 __field(u64, ret)
245 ),
246 TP_fast_assign(
247 LOCAL_ASSIGN;
248 __entry->ret = ret;
249 ),
250 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
251);
252
Johannes Bergba99d932011-01-26 09:22:15 +0100253DEFINE_EVENT(local_only_evt, drv_start,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200254 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100255 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200256);
257
Ben Greeare3521142012-04-23 12:50:31 -0700258DEFINE_EVENT(local_u32_evt, drv_get_et_strings,
259 TP_PROTO(struct ieee80211_local *local, u32 sset),
260 TP_ARGS(local, sset)
261);
262
263DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count,
264 TP_PROTO(struct ieee80211_local *local, u32 sset),
265 TP_ARGS(local, sset)
266);
267
268DEFINE_EVENT(local_only_evt, drv_get_et_stats,
269 TP_PROTO(struct ieee80211_local *local),
270 TP_ARGS(local)
271);
272
Johannes Bergeecc4802011-05-04 15:37:29 +0200273DEFINE_EVENT(local_only_evt, drv_suspend,
274 TP_PROTO(struct ieee80211_local *local),
275 TP_ARGS(local)
276);
277
278DEFINE_EVENT(local_only_evt, drv_resume,
279 TP_PROTO(struct ieee80211_local *local),
280 TP_ARGS(local)
281);
282
Johannes Berg6d525632012-04-04 15:05:25 +0200283TRACE_EVENT(drv_set_wakeup,
284 TP_PROTO(struct ieee80211_local *local, bool enabled),
285 TP_ARGS(local, enabled),
286 TP_STRUCT__entry(
287 LOCAL_ENTRY
288 __field(bool, enabled)
289 ),
290 TP_fast_assign(
291 LOCAL_ASSIGN;
292 __entry->enabled = enabled;
293 ),
294 TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
295);
296
Johannes Bergba99d932011-01-26 09:22:15 +0100297DEFINE_EVENT(local_only_evt, drv_stop,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200298 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100299 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200300);
301
Luciano Coelho92ddc112011-05-09 14:40:06 +0300302DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200303 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200304 struct ieee80211_sub_if_data *sdata),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300305 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200306);
307
Johannes Berg34d4bc42010-08-27 12:35:58 +0200308TRACE_EVENT(drv_change_interface,
309 TP_PROTO(struct ieee80211_local *local,
310 struct ieee80211_sub_if_data *sdata,
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200311 enum nl80211_iftype type, bool p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200312
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200313 TP_ARGS(local, sdata, type, p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200314
315 TP_STRUCT__entry(
316 LOCAL_ENTRY
317 VIF_ENTRY
318 __field(u32, new_type)
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200319 __field(bool, new_p2p)
Johannes Berg34d4bc42010-08-27 12:35:58 +0200320 ),
321
322 TP_fast_assign(
323 LOCAL_ASSIGN;
324 VIF_ASSIGN;
325 __entry->new_type = type;
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200326 __entry->new_p2p = p2p;
Johannes Berg34d4bc42010-08-27 12:35:58 +0200327 ),
328
329 TP_printk(
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200330 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
331 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
332 __entry->new_p2p ? "/p2p" : ""
Johannes Berg34d4bc42010-08-27 12:35:58 +0200333 )
334);
335
Luciano Coelho92ddc112011-05-09 14:40:06 +0300336DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
337 TP_PROTO(struct ieee80211_local *local,
338 struct ieee80211_sub_if_data *sdata),
339 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200340);
341
342TRACE_EVENT(drv_config,
343 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200344 u32 changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200345
Johannes Berg4efc76b2010-06-10 10:56:20 +0200346 TP_ARGS(local, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200347
348 TP_STRUCT__entry(
349 LOCAL_ENTRY
350 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100351 __field(u32, flags)
352 __field(int, power_level)
353 __field(int, dynamic_ps_timeout)
Johannes Bergf911ab82009-11-25 19:07:20 +0100354 __field(u16, listen_interval)
355 __field(u8, long_frame_max_tx_count)
356 __field(u8, short_frame_max_tx_count)
Karl Beldan675a0b02013-03-25 16:26:57 +0100357 CHANDEF_ENTRY
Johannes Berg0f782312009-12-01 13:37:02 +0100358 __field(int, smps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200359 ),
360
361 TP_fast_assign(
362 LOCAL_ASSIGN;
363 __entry->changed = changed;
Johannes Bergf911ab82009-11-25 19:07:20 +0100364 __entry->flags = local->hw.conf.flags;
365 __entry->power_level = local->hw.conf.power_level;
366 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
Johannes Bergf911ab82009-11-25 19:07:20 +0100367 __entry->listen_interval = local->hw.conf.listen_interval;
Johannes Berg3d01be72012-07-26 14:27:39 +0200368 __entry->long_frame_max_tx_count =
369 local->hw.conf.long_frame_max_tx_count;
370 __entry->short_frame_max_tx_count =
371 local->hw.conf.short_frame_max_tx_count;
Karl Beldan675a0b02013-03-25 16:26:57 +0100372 CHANDEF_ASSIGN(&local->hw.conf.chandef)
Johannes Berg0f782312009-12-01 13:37:02 +0100373 __entry->smps = local->hw.conf.smps_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200374 ),
375
376 TP_printk(
Karl Beldan675a0b02013-03-25 16:26:57 +0100377 LOCAL_PR_FMT " ch:%#x" CHANDEF_PR_FMT,
378 LOCAL_PR_ARG, __entry->changed, CHANDEF_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200379 )
380);
381
382TRACE_EVENT(drv_bss_info_changed,
383 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100384 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200385 struct ieee80211_bss_conf *info,
386 u32 changed),
387
Johannes Berg12375ef2009-11-25 20:30:31 +0100388 TP_ARGS(local, sdata, info, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200389
390 TP_STRUCT__entry(
391 LOCAL_ENTRY
392 VIF_ENTRY
Johannes Berg1724ffb2012-10-24 11:38:30 +0200393 __field(u32, changed)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200394 __field(bool, assoc)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200395 __field(bool, ibss_joined)
396 __field(bool, ibss_creator)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200397 __field(u16, aid)
398 __field(bool, cts)
399 __field(bool, shortpre)
400 __field(bool, shortslot)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200401 __field(bool, enable_beacon)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200402 __field(u8, dtimper)
403 __field(u16, bcnint)
404 __field(u16, assoc_cap)
Johannes Berg8c358bc2012-05-22 22:13:05 +0200405 __field(u64, sync_tsf)
406 __field(u32, sync_device_ts)
Johannes Bergef429da2013-02-05 17:48:40 +0100407 __field(u8, sync_dtim_count)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200408 __field(u32, basic_rates)
Johannes Berg57fbcce2016-04-12 15:56:15 +0200409 __array(int, mcast_rate, NUM_NL80211_BANDS)
Johannes Bergf911ab82009-11-25 19:07:20 +0100410 __field(u16, ht_operation_mode)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200411 __field(s32, cqm_rssi_thold);
412 __field(s32, cqm_rssi_hyst);
Johannes Berg4bf88532012-11-09 11:39:59 +0100413 __field(u32, channel_width);
414 __field(u32, channel_cfreq1);
Johannes Berg0f19b412013-01-14 16:39:07 +0100415 __dynamic_array(u32, arp_addr_list,
416 info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
417 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
418 info->arp_addr_cnt);
419 __field(int, arp_addr_cnt);
Johannes Berg1724ffb2012-10-24 11:38:30 +0200420 __field(bool, qos);
421 __field(bool, idle);
422 __field(bool, ps);
423 __dynamic_array(u8, ssid, info->ssid_len);
424 __field(bool, hidden_ssid);
Johannes Berg1ea6f9c2012-10-24 10:59:25 +0200425 __field(int, txpower)
Janusz Dziedzic67baf662013-03-21 15:47:56 +0100426 __field(u8, p2p_oppps_ctwindow)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200427 ),
428
429 TP_fast_assign(
430 LOCAL_ASSIGN;
431 VIF_ASSIGN;
432 __entry->changed = changed;
433 __entry->aid = info->aid;
434 __entry->assoc = info->assoc;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200435 __entry->ibss_joined = info->ibss_joined;
436 __entry->ibss_creator = info->ibss_creator;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200437 __entry->shortpre = info->use_short_preamble;
438 __entry->cts = info->use_cts_prot;
439 __entry->shortslot = info->use_short_slot;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200440 __entry->enable_beacon = info->enable_beacon;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200441 __entry->dtimper = info->dtim_period;
442 __entry->bcnint = info->beacon_int;
443 __entry->assoc_cap = info->assoc_capability;
Johannes Berg8c358bc2012-05-22 22:13:05 +0200444 __entry->sync_tsf = info->sync_tsf;
445 __entry->sync_device_ts = info->sync_device_ts;
Johannes Bergef429da2013-02-05 17:48:40 +0100446 __entry->sync_dtim_count = info->sync_dtim_count;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200447 __entry->basic_rates = info->basic_rates;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200448 memcpy(__entry->mcast_rate, info->mcast_rate,
449 sizeof(__entry->mcast_rate));
Johannes Bergf911ab82009-11-25 19:07:20 +0100450 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200451 __entry->cqm_rssi_thold = info->cqm_rssi_thold;
452 __entry->cqm_rssi_hyst = info->cqm_rssi_hyst;
Johannes Berg4bf88532012-11-09 11:39:59 +0100453 __entry->channel_width = info->chandef.width;
454 __entry->channel_cfreq1 = info->chandef.center_freq1;
Johannes Berg0f19b412013-01-14 16:39:07 +0100455 __entry->arp_addr_cnt = info->arp_addr_cnt;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200456 memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list,
Johannes Berg0f19b412013-01-14 16:39:07 +0100457 sizeof(u32) * (info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
458 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
459 info->arp_addr_cnt));
Johannes Berg1724ffb2012-10-24 11:38:30 +0200460 __entry->qos = info->qos;
461 __entry->idle = info->idle;
462 __entry->ps = info->ps;
463 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
464 __entry->hidden_ssid = info->hidden_ssid;
Johannes Berg1ea6f9c2012-10-24 10:59:25 +0200465 __entry->txpower = info->txpower;
Janusz Dziedzic67baf662013-03-21 15:47:56 +0100466 __entry->p2p_oppps_ctwindow = info->p2p_noa_attr.oppps_ctwindow;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200467 ),
468
469 TP_printk(
470 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
471 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
472 )
473);
474
Johannes Berg3ac64be2009-08-17 16:16:53 +0200475TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200476 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200477
Johannes Berg4efc76b2010-06-10 10:56:20 +0200478 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200479
480 TP_STRUCT__entry(
481 LOCAL_ENTRY
482 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200483 ),
484
485 TP_fast_assign(
486 LOCAL_ASSIGN;
487 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200488 ),
489
490 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200491 LOCAL_PR_FMT " prepare mc (%d)",
492 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200493 )
494);
495
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200496TRACE_EVENT(drv_configure_filter,
497 TP_PROTO(struct ieee80211_local *local,
498 unsigned int changed_flags,
499 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200500 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200501
Johannes Berg3ac64be2009-08-17 16:16:53 +0200502 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200503
504 TP_STRUCT__entry(
505 LOCAL_ENTRY
506 __field(unsigned int, changed)
507 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200508 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200509 ),
510
511 TP_fast_assign(
512 LOCAL_ASSIGN;
513 __entry->changed = changed_flags;
514 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200515 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200516 ),
517
518 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200519 LOCAL_PR_FMT " changed:%#x total:%#x",
520 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200521 )
522);
523
Andrei Otcheretianski1b09b552015-08-15 22:39:50 +0300524TRACE_EVENT(drv_config_iface_filter,
525 TP_PROTO(struct ieee80211_local *local,
526 struct ieee80211_sub_if_data *sdata,
527 unsigned int filter_flags,
528 unsigned int changed_flags),
529
530 TP_ARGS(local, sdata, filter_flags, changed_flags),
531
532 TP_STRUCT__entry(
533 LOCAL_ENTRY
534 VIF_ENTRY
535 __field(unsigned int, filter_flags)
536 __field(unsigned int, changed_flags)
537 ),
538
539 TP_fast_assign(
540 LOCAL_ASSIGN;
541 VIF_ASSIGN;
542 __entry->filter_flags = filter_flags;
543 __entry->changed_flags = changed_flags;
544 ),
545
546 TP_printk(
547 LOCAL_PR_FMT VIF_PR_FMT
548 " filter_flags: %#x changed_flags: %#x",
549 LOCAL_PR_ARG, VIF_PR_ARG, __entry->filter_flags,
550 __entry->changed_flags
551 )
552);
553
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200554TRACE_EVENT(drv_set_tim,
555 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200556 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200557
Johannes Berg4efc76b2010-06-10 10:56:20 +0200558 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200559
560 TP_STRUCT__entry(
561 LOCAL_ENTRY
562 STA_ENTRY
563 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200564 ),
565
566 TP_fast_assign(
567 LOCAL_ASSIGN;
568 STA_ASSIGN;
569 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200570 ),
571
572 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200573 LOCAL_PR_FMT STA_PR_FMT " set:%d",
Seth Forshee15ac7c42013-02-15 13:15:48 -0600574 LOCAL_PR_ARG, STA_PR_ARG, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200575 )
576);
577
578TRACE_EVENT(drv_set_key,
579 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100580 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200581 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200582 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200583
Johannes Berg4efc76b2010-06-10 10:56:20 +0200584 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200585
586 TP_STRUCT__entry(
587 LOCAL_ENTRY
588 VIF_ENTRY
589 STA_ENTRY
Johannes Berg9352c192015-04-20 18:12:41 +0200590 KEY_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200591 ),
592
593 TP_fast_assign(
594 LOCAL_ASSIGN;
595 VIF_ASSIGN;
596 STA_ASSIGN;
Johannes Berg9352c192015-04-20 18:12:41 +0200597 KEY_ASSIGN(key);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200598 ),
599
600 TP_printk(
Johannes Berg9352c192015-04-20 18:12:41 +0200601 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT KEY_PR_FMT,
602 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, KEY_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200603 )
604);
605
606TRACE_EVENT(drv_update_tkip_key,
607 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100608 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200609 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100610 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200611
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100612 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200613
614 TP_STRUCT__entry(
615 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100616 VIF_ENTRY
617 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200618 __field(u32, iv32)
619 ),
620
621 TP_fast_assign(
622 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100623 VIF_ASSIGN;
624 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200625 __entry->iv32 = iv32;
626 ),
627
628 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100629 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
Weilong Chenf359d3f2013-12-18 15:44:16 +0800630 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200631 )
632);
633
Luciano Coelho79f460c2011-05-11 17:09:36 +0300634DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200635 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300636 struct ieee80211_sub_if_data *sdata),
637 TP_ARGS(local, sdata)
638);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200639
Eliad Pellerb8564392011-06-13 12:47:30 +0300640DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
641 TP_PROTO(struct ieee80211_local *local,
642 struct ieee80211_sub_if_data *sdata),
643 TP_ARGS(local, sdata)
644);
645
Luciano Coelho79f460c2011-05-11 17:09:36 +0300646DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
647 TP_PROTO(struct ieee80211_local *local,
648 struct ieee80211_sub_if_data *sdata),
649 TP_ARGS(local, sdata)
650);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200651
Luciano Coelho79f460c2011-05-11 17:09:36 +0300652DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
653 TP_PROTO(struct ieee80211_local *local,
654 struct ieee80211_sub_if_data *sdata),
655 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200656);
657
Johannes Berga344d672014-06-12 22:24:31 +0200658TRACE_EVENT(drv_sw_scan_start,
659 TP_PROTO(struct ieee80211_local *local,
660 struct ieee80211_sub_if_data *sdata,
661 const u8 *mac_addr),
662
663 TP_ARGS(local, sdata, mac_addr),
664
665 TP_STRUCT__entry(
666 LOCAL_ENTRY
667 VIF_ENTRY
668 __array(char, mac_addr, ETH_ALEN)
669 ),
670
671 TP_fast_assign(
672 LOCAL_ASSIGN;
673 VIF_ASSIGN;
674 memcpy(__entry->mac_addr, mac_addr, ETH_ALEN);
675 ),
676
677 TP_printk(LOCAL_PR_FMT ", " VIF_PR_FMT ", addr:%pM",
678 LOCAL_PR_ARG, VIF_PR_ARG, __entry->mac_addr)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200679);
680
Johannes Berga344d672014-06-12 22:24:31 +0200681DEFINE_EVENT(local_sdata_evt, drv_sw_scan_complete,
682 TP_PROTO(struct ieee80211_local *local,
683 struct ieee80211_sub_if_data *sdata),
684 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200685);
686
687TRACE_EVENT(drv_get_stats,
688 TP_PROTO(struct ieee80211_local *local,
689 struct ieee80211_low_level_stats *stats,
690 int ret),
691
692 TP_ARGS(local, stats, ret),
693
694 TP_STRUCT__entry(
695 LOCAL_ENTRY
696 __field(int, ret)
697 __field(unsigned int, ackfail)
698 __field(unsigned int, rtsfail)
699 __field(unsigned int, fcserr)
700 __field(unsigned int, rtssucc)
701 ),
702
703 TP_fast_assign(
704 LOCAL_ASSIGN;
705 __entry->ret = ret;
706 __entry->ackfail = stats->dot11ACKFailureCount;
707 __entry->rtsfail = stats->dot11RTSFailureCount;
708 __entry->fcserr = stats->dot11FCSErrorCount;
709 __entry->rtssucc = stats->dot11RTSSuccessCount;
710 ),
711
712 TP_printk(
713 LOCAL_PR_FMT " ret:%d",
714 LOCAL_PR_ARG, __entry->ret
715 )
716);
717
Johannes Berg9352c192015-04-20 18:12:41 +0200718TRACE_EVENT(drv_get_key_seq,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200719 TP_PROTO(struct ieee80211_local *local,
Johannes Berg9352c192015-04-20 18:12:41 +0200720 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200721
Johannes Berg9352c192015-04-20 18:12:41 +0200722 TP_ARGS(local, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200723
724 TP_STRUCT__entry(
725 LOCAL_ENTRY
Johannes Berg9352c192015-04-20 18:12:41 +0200726 KEY_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200727 ),
728
729 TP_fast_assign(
730 LOCAL_ASSIGN;
Johannes Berg9352c192015-04-20 18:12:41 +0200731 KEY_ASSIGN(key);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200732 ),
733
734 TP_printk(
Johannes Berg9352c192015-04-20 18:12:41 +0200735 LOCAL_PR_FMT KEY_PR_FMT,
736 LOCAL_PR_ARG, KEY_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200737 )
738);
739
Luciano Coelho92ddc112011-05-09 14:40:06 +0300740DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200741 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300742 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200743);
744
Luciano Coelho92ddc112011-05-09 14:40:06 +0300745DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200746 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300747 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200748);
749
Lukáš Turek310bc672009-12-21 22:50:48 +0100750TRACE_EVENT(drv_set_coverage_class,
Lorenzo Bianconia4bcaf52014-09-04 23:57:41 +0200751 TP_PROTO(struct ieee80211_local *local, s16 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100752
Johannes Berg4efc76b2010-06-10 10:56:20 +0200753 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100754
755 TP_STRUCT__entry(
756 LOCAL_ENTRY
Lorenzo Bianconia4bcaf52014-09-04 23:57:41 +0200757 __field(s16, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100758 ),
759
760 TP_fast_assign(
761 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100762 __entry->value = value;
763 ),
764
765 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200766 LOCAL_PR_FMT " value:%d",
767 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100768 )
769);
770
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200771TRACE_EVENT(drv_sta_notify,
772 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100773 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200774 enum sta_notify_cmd cmd,
775 struct ieee80211_sta *sta),
776
Johannes Berg12375ef2009-11-25 20:30:31 +0100777 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200778
779 TP_STRUCT__entry(
780 LOCAL_ENTRY
781 VIF_ENTRY
782 STA_ENTRY
783 __field(u32, cmd)
784 ),
785
786 TP_fast_assign(
787 LOCAL_ASSIGN;
788 VIF_ASSIGN;
789 STA_ASSIGN;
790 __entry->cmd = cmd;
791 ),
792
793 TP_printk(
794 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
795 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
796 )
797);
798
Johannes Bergf09603a2012-01-20 13:55:21 +0100799TRACE_EVENT(drv_sta_state,
800 TP_PROTO(struct ieee80211_local *local,
801 struct ieee80211_sub_if_data *sdata,
802 struct ieee80211_sta *sta,
803 enum ieee80211_sta_state old_state,
804 enum ieee80211_sta_state new_state),
805
806 TP_ARGS(local, sdata, sta, old_state, new_state),
807
808 TP_STRUCT__entry(
809 LOCAL_ENTRY
810 VIF_ENTRY
811 STA_ENTRY
812 __field(u32, old_state)
813 __field(u32, new_state)
814 ),
815
816 TP_fast_assign(
817 LOCAL_ASSIGN;
818 VIF_ASSIGN;
819 STA_ASSIGN;
820 __entry->old_state = old_state;
821 __entry->new_state = new_state;
822 ),
823
824 TP_printk(
825 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
826 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
827 __entry->old_state, __entry->new_state
828 )
829);
830
Johannes Berg8f727ef2012-03-30 08:43:32 +0200831TRACE_EVENT(drv_sta_rc_update,
832 TP_PROTO(struct ieee80211_local *local,
833 struct ieee80211_sub_if_data *sdata,
834 struct ieee80211_sta *sta,
835 u32 changed),
836
837 TP_ARGS(local, sdata, sta, changed),
838
839 TP_STRUCT__entry(
840 LOCAL_ENTRY
841 VIF_ENTRY
842 STA_ENTRY
843 __field(u32, changed)
844 ),
845
846 TP_fast_assign(
847 LOCAL_ASSIGN;
848 VIF_ASSIGN;
849 STA_ASSIGN;
850 __entry->changed = changed;
851 ),
852
853 TP_printk(
854 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
855 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
856 )
857);
858
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100859DECLARE_EVENT_CLASS(sta_event,
Johannes Berg34e89502010-02-03 13:59:58 +0100860 TP_PROTO(struct ieee80211_local *local,
861 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200862 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100863
Johannes Berg4efc76b2010-06-10 10:56:20 +0200864 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100865
866 TP_STRUCT__entry(
867 LOCAL_ENTRY
868 VIF_ENTRY
869 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100870 ),
871
872 TP_fast_assign(
873 LOCAL_ASSIGN;
874 VIF_ASSIGN;
875 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100876 ),
877
878 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200879 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
880 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100881 )
882);
883
Johannes Berg2b9a7e12014-11-17 11:35:23 +0100884DEFINE_EVENT(sta_event, drv_sta_statistics,
885 TP_PROTO(struct ieee80211_local *local,
886 struct ieee80211_sub_if_data *sdata,
887 struct ieee80211_sta *sta),
888 TP_ARGS(local, sdata, sta)
889);
890
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100891DEFINE_EVENT(sta_event, drv_sta_add,
Johannes Berg34e89502010-02-03 13:59:58 +0100892 TP_PROTO(struct ieee80211_local *local,
893 struct ieee80211_sub_if_data *sdata,
894 struct ieee80211_sta *sta),
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100895 TP_ARGS(local, sdata, sta)
896);
Johannes Berg34e89502010-02-03 13:59:58 +0100897
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100898DEFINE_EVENT(sta_event, drv_sta_remove,
899 TP_PROTO(struct ieee80211_local *local,
900 struct ieee80211_sub_if_data *sdata,
901 struct ieee80211_sta *sta),
902 TP_ARGS(local, sdata, sta)
903);
Johannes Berg34e89502010-02-03 13:59:58 +0100904
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100905DEFINE_EVENT(sta_event, drv_sta_pre_rcu_remove,
906 TP_PROTO(struct ieee80211_local *local,
907 struct ieee80211_sub_if_data *sdata,
908 struct ieee80211_sta *sta),
909 TP_ARGS(local, sdata, sta)
Johannes Berg34e89502010-02-03 13:59:58 +0100910);
911
Sara Sharonf59374e2016-03-02 23:46:14 +0200912DEFINE_EVENT(sta_event, drv_sync_rx_queues,
913 TP_PROTO(struct ieee80211_local *local,
914 struct ieee80211_sub_if_data *sdata,
915 struct ieee80211_sta *sta),
916 TP_ARGS(local, sdata, sta)
917);
918
Johannes Bergf815e2b2014-11-19 00:10:42 +0100919DEFINE_EVENT(sta_event, drv_sta_rate_tbl_update,
920 TP_PROTO(struct ieee80211_local *local,
921 struct ieee80211_sub_if_data *sdata,
922 struct ieee80211_sta *sta),
923 TP_ARGS(local, sdata, sta)
924);
925
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200926TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300927 TP_PROTO(struct ieee80211_local *local,
928 struct ieee80211_sub_if_data *sdata,
Johannes Berga3304b02012-03-28 11:04:24 +0200929 u16 ac, const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200930
Johannes Berga3304b02012-03-28 11:04:24 +0200931 TP_ARGS(local, sdata, ac, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200932
933 TP_STRUCT__entry(
934 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300935 VIF_ENTRY
Johannes Berga3304b02012-03-28 11:04:24 +0200936 __field(u16, ac)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200937 __field(u16, txop)
938 __field(u16, cw_min)
939 __field(u16, cw_max)
940 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300941 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200942 ),
943
944 TP_fast_assign(
945 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300946 VIF_ASSIGN;
Johannes Berga3304b02012-03-28 11:04:24 +0200947 __entry->ac = ac;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200948 __entry->txop = params->txop;
949 __entry->cw_max = params->cw_max;
950 __entry->cw_min = params->cw_min;
951 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300952 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200953 ),
954
955 TP_printk(
Johannes Berga3304b02012-03-28 11:04:24 +0200956 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
957 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200958 )
959);
960
Eliad Peller37a41b42011-09-21 14:06:11 +0300961DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
962 TP_PROTO(struct ieee80211_local *local,
963 struct ieee80211_sub_if_data *sdata),
964 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200965);
966
967TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +0300968 TP_PROTO(struct ieee80211_local *local,
969 struct ieee80211_sub_if_data *sdata,
970 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200971
Eliad Peller37a41b42011-09-21 14:06:11 +0300972 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200973
974 TP_STRUCT__entry(
975 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +0300976 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200977 __field(u64, tsf)
978 ),
979
980 TP_fast_assign(
981 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +0300982 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200983 __entry->tsf = tsf;
984 ),
985
986 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +0300987 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
988 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200989 )
990);
991
Pedersen, Thomas354d3812016-09-28 16:56:28 -0700992TRACE_EVENT(drv_offset_tsf,
993 TP_PROTO(struct ieee80211_local *local,
994 struct ieee80211_sub_if_data *sdata,
995 s64 offset),
996
997 TP_ARGS(local, sdata, offset),
998
999 TP_STRUCT__entry(
1000 LOCAL_ENTRY
1001 VIF_ENTRY
1002 __field(s64, tsf_offset)
1003 ),
1004
1005 TP_fast_assign(
1006 LOCAL_ASSIGN;
1007 VIF_ASSIGN;
1008 __entry->tsf_offset = offset;
1009 ),
1010
1011 TP_printk(
1012 LOCAL_PR_FMT VIF_PR_FMT " tsf offset:%lld",
1013 LOCAL_PR_ARG, VIF_PR_ARG,
1014 (unsigned long long)__entry->tsf_offset
1015 )
1016);
1017
Eliad Peller37a41b42011-09-21 14:06:11 +03001018DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
1019 TP_PROTO(struct ieee80211_local *local,
1020 struct ieee80211_sub_if_data *sdata),
1021 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001022);
1023
Johannes Bergba99d932011-01-26 09:22:15 +01001024DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +02001025 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001026 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001027);
1028
1029TRACE_EVENT(drv_ampdu_action,
1030 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +01001031 struct ieee80211_sub_if_data *sdata,
Sara Sharon50ea05e2015-12-30 16:06:04 +02001032 struct ieee80211_ampdu_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001033
Sara Sharon50ea05e2015-12-30 16:06:04 +02001034 TP_ARGS(local, sdata, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001035
1036 TP_STRUCT__entry(
1037 LOCAL_ENTRY
Johannes Bergc951ad32009-11-16 12:00:38 +01001038 VIF_ENTRY
Sara Sharon50ea05e2015-12-30 16:06:04 +02001039 AMPDU_ACTION_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001040 ),
1041
1042 TP_fast_assign(
1043 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +01001044 VIF_ASSIGN;
Sara Sharon50ea05e2015-12-30 16:06:04 +02001045 AMPDU_ACTION_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001046 ),
1047
1048 TP_printk(
Sara Sharon50ea05e2015-12-30 16:06:04 +02001049 LOCAL_PR_FMT VIF_PR_FMT AMPDU_ACTION_PR_FMT,
1050 LOCAL_PR_ARG, VIF_PR_ARG, AMPDU_ACTION_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001051 )
1052);
Johannes Berga80f7c02009-12-23 13:15:32 +01001053
John W. Linvillec466d4e2010-06-29 14:51:23 -04001054TRACE_EVENT(drv_get_survey,
1055 TP_PROTO(struct ieee80211_local *local, int idx,
1056 struct survey_info *survey),
1057
1058 TP_ARGS(local, idx, survey),
1059
1060 TP_STRUCT__entry(
1061 LOCAL_ENTRY
1062 __field(int, idx)
1063 ),
1064
1065 TP_fast_assign(
1066 LOCAL_ASSIGN;
1067 __entry->idx = idx;
1068 ),
1069
1070 TP_printk(
1071 LOCAL_PR_FMT " idx:%d",
1072 LOCAL_PR_ARG, __entry->idx
1073 )
1074);
1075
Johannes Berga80f7c02009-12-23 13:15:32 +01001076TRACE_EVENT(drv_flush,
Johannes Berg39ecc012013-02-13 12:11:00 +01001077 TP_PROTO(struct ieee80211_local *local,
1078 u32 queues, bool drop),
Johannes Berga80f7c02009-12-23 13:15:32 +01001079
Johannes Berg39ecc012013-02-13 12:11:00 +01001080 TP_ARGS(local, queues, drop),
Johannes Berga80f7c02009-12-23 13:15:32 +01001081
1082 TP_STRUCT__entry(
1083 LOCAL_ENTRY
1084 __field(bool, drop)
Johannes Berg39ecc012013-02-13 12:11:00 +01001085 __field(u32, queues)
Johannes Berga80f7c02009-12-23 13:15:32 +01001086 ),
1087
1088 TP_fast_assign(
1089 LOCAL_ASSIGN;
1090 __entry->drop = drop;
Johannes Berg39ecc012013-02-13 12:11:00 +01001091 __entry->queues = queues;
Johannes Berga80f7c02009-12-23 13:15:32 +01001092 ),
1093
1094 TP_printk(
Johannes Berg39ecc012013-02-13 12:11:00 +01001095 LOCAL_PR_FMT " queues:0x%x drop:%d",
1096 LOCAL_PR_ARG, __entry->queues, __entry->drop
Johannes Berga80f7c02009-12-23 13:15:32 +01001097 )
1098);
Johannes Bergb5878a22010-04-07 16:48:40 +02001099
Johannes Berg5ce6e432010-05-11 16:20:57 +02001100TRACE_EVENT(drv_channel_switch,
1101 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001102 struct ieee80211_sub_if_data *sdata,
Johannes Berg5ce6e432010-05-11 16:20:57 +02001103 struct ieee80211_channel_switch *ch_switch),
1104
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001105 TP_ARGS(local, sdata, ch_switch),
Johannes Berg5ce6e432010-05-11 16:20:57 +02001106
1107 TP_STRUCT__entry(
1108 LOCAL_ENTRY
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001109 VIF_ENTRY
Johannes Berg85220d72013-03-25 18:29:27 +01001110 CHANDEF_ENTRY
Johannes Berg5ce6e432010-05-11 16:20:57 +02001111 __field(u64, timestamp)
Luciano Coelho2ba45382014-10-08 09:48:35 +03001112 __field(u32, device_timestamp)
Johannes Berg5ce6e432010-05-11 16:20:57 +02001113 __field(bool, block_tx)
Johannes Berg5ce6e432010-05-11 16:20:57 +02001114 __field(u8, count)
1115 ),
1116
1117 TP_fast_assign(
1118 LOCAL_ASSIGN;
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001119 VIF_ASSIGN;
Johannes Berg85220d72013-03-25 18:29:27 +01001120 CHANDEF_ASSIGN(&ch_switch->chandef)
Johannes Berg5ce6e432010-05-11 16:20:57 +02001121 __entry->timestamp = ch_switch->timestamp;
Luciano Coelho2ba45382014-10-08 09:48:35 +03001122 __entry->device_timestamp = ch_switch->device_timestamp;
Johannes Berg5ce6e432010-05-11 16:20:57 +02001123 __entry->block_tx = ch_switch->block_tx;
Johannes Berg5ce6e432010-05-11 16:20:57 +02001124 __entry->count = ch_switch->count;
1125 ),
1126
1127 TP_printk(
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001128 LOCAL_PR_FMT VIF_PR_FMT " new " CHANDEF_PR_FMT " count:%d",
1129 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count
Johannes Berg5ce6e432010-05-11 16:20:57 +02001130 )
1131);
1132
Bruno Randolf15d96752010-11-10 12:50:56 +09001133TRACE_EVENT(drv_set_antenna,
1134 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1135
1136 TP_ARGS(local, tx_ant, rx_ant, ret),
1137
1138 TP_STRUCT__entry(
1139 LOCAL_ENTRY
1140 __field(u32, tx_ant)
1141 __field(u32, rx_ant)
1142 __field(int, ret)
1143 ),
1144
1145 TP_fast_assign(
1146 LOCAL_ASSIGN;
1147 __entry->tx_ant = tx_ant;
1148 __entry->rx_ant = rx_ant;
1149 __entry->ret = ret;
1150 ),
1151
1152 TP_printk(
1153 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1154 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1155 )
1156);
1157
1158TRACE_EVENT(drv_get_antenna,
1159 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1160
1161 TP_ARGS(local, tx_ant, rx_ant, ret),
1162
1163 TP_STRUCT__entry(
1164 LOCAL_ENTRY
1165 __field(u32, tx_ant)
1166 __field(u32, rx_ant)
1167 __field(int, ret)
1168 ),
1169
1170 TP_fast_assign(
1171 LOCAL_ASSIGN;
1172 __entry->tx_ant = tx_ant;
1173 __entry->rx_ant = rx_ant;
1174 __entry->ret = ret;
1175 ),
1176
1177 TP_printk(
1178 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1179 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1180 )
1181);
1182
Johannes Berg21f83582010-12-18 17:20:47 +01001183TRACE_EVENT(drv_remain_on_channel,
Eliad Peller49884562012-11-19 17:05:09 +02001184 TP_PROTO(struct ieee80211_local *local,
1185 struct ieee80211_sub_if_data *sdata,
1186 struct ieee80211_channel *chan,
Ilan Peerd339d5c2013-02-12 09:34:13 +02001187 unsigned int duration,
1188 enum ieee80211_roc_type type),
Johannes Berg21f83582010-12-18 17:20:47 +01001189
Ilan Peerd339d5c2013-02-12 09:34:13 +02001190 TP_ARGS(local, sdata, chan, duration, type),
Johannes Berg21f83582010-12-18 17:20:47 +01001191
1192 TP_STRUCT__entry(
1193 LOCAL_ENTRY
Eliad Peller49884562012-11-19 17:05:09 +02001194 VIF_ENTRY
Johannes Berg21f83582010-12-18 17:20:47 +01001195 __field(int, center_freq)
Johannes Berg21f83582010-12-18 17:20:47 +01001196 __field(unsigned int, duration)
Ilan Peerd339d5c2013-02-12 09:34:13 +02001197 __field(u32, type)
Johannes Berg21f83582010-12-18 17:20:47 +01001198 ),
1199
1200 TP_fast_assign(
1201 LOCAL_ASSIGN;
Eliad Peller49884562012-11-19 17:05:09 +02001202 VIF_ASSIGN;
Johannes Berg21f83582010-12-18 17:20:47 +01001203 __entry->center_freq = chan->center_freq;
Johannes Berg21f83582010-12-18 17:20:47 +01001204 __entry->duration = duration;
Ilan Peerd339d5c2013-02-12 09:34:13 +02001205 __entry->type = type;
Johannes Berg21f83582010-12-18 17:20:47 +01001206 ),
1207
1208 TP_printk(
Ilan Peerd339d5c2013-02-12 09:34:13 +02001209 LOCAL_PR_FMT VIF_PR_FMT " freq:%dMHz duration:%dms type=%d",
Eliad Peller49884562012-11-19 17:05:09 +02001210 LOCAL_PR_ARG, VIF_PR_ARG,
Ilan Peerd339d5c2013-02-12 09:34:13 +02001211 __entry->center_freq, __entry->duration, __entry->type
Johannes Berg21f83582010-12-18 17:20:47 +01001212 )
1213);
1214
Johannes Bergba99d932011-01-26 09:22:15 +01001215DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001216 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001217 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001218);
1219
John W. Linville38c09152011-03-07 16:19:18 -05001220TRACE_EVENT(drv_set_ringparam,
1221 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1222
1223 TP_ARGS(local, tx, rx),
1224
1225 TP_STRUCT__entry(
1226 LOCAL_ENTRY
1227 __field(u32, tx)
1228 __field(u32, rx)
1229 ),
1230
1231 TP_fast_assign(
1232 LOCAL_ASSIGN;
1233 __entry->tx = tx;
1234 __entry->rx = rx;
1235 ),
1236
1237 TP_printk(
1238 LOCAL_PR_FMT " tx:%d rx %d",
1239 LOCAL_PR_ARG, __entry->tx, __entry->rx
1240 )
1241);
1242
1243TRACE_EVENT(drv_get_ringparam,
1244 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1245 u32 *rx, u32 *rx_max),
1246
1247 TP_ARGS(local, tx, tx_max, rx, rx_max),
1248
1249 TP_STRUCT__entry(
1250 LOCAL_ENTRY
1251 __field(u32, tx)
1252 __field(u32, tx_max)
1253 __field(u32, rx)
1254 __field(u32, rx_max)
1255 ),
1256
1257 TP_fast_assign(
1258 LOCAL_ASSIGN;
1259 __entry->tx = *tx;
1260 __entry->tx_max = *tx_max;
1261 __entry->rx = *rx;
1262 __entry->rx_max = *rx_max;
1263 ),
1264
1265 TP_printk(
1266 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1267 LOCAL_PR_ARG,
1268 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1269 )
1270);
1271
Vivek Natarajane8306f92011-04-06 11:41:10 +05301272DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1273 TP_PROTO(struct ieee80211_local *local),
1274 TP_ARGS(local)
1275);
1276
Johannes Berg5f16a432011-02-25 15:36:57 +01001277DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1278 TP_PROTO(struct ieee80211_local *local),
1279 TP_ARGS(local)
1280);
1281
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301282TRACE_EVENT(drv_set_bitrate_mask,
1283 TP_PROTO(struct ieee80211_local *local,
1284 struct ieee80211_sub_if_data *sdata,
1285 const struct cfg80211_bitrate_mask *mask),
1286
1287 TP_ARGS(local, sdata, mask),
1288
1289 TP_STRUCT__entry(
1290 LOCAL_ENTRY
1291 VIF_ENTRY
1292 __field(u32, legacy_2g)
1293 __field(u32, legacy_5g)
1294 ),
1295
1296 TP_fast_assign(
1297 LOCAL_ASSIGN;
1298 VIF_ASSIGN;
Johannes Berg57fbcce2016-04-12 15:56:15 +02001299 __entry->legacy_2g = mask->control[NL80211_BAND_2GHZ].legacy;
1300 __entry->legacy_5g = mask->control[NL80211_BAND_5GHZ].legacy;
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301301 ),
1302
1303 TP_printk(
1304 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1305 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1306 )
1307);
1308
Johannes Bergc68f4b82011-07-05 16:35:41 +02001309TRACE_EVENT(drv_set_rekey_data,
1310 TP_PROTO(struct ieee80211_local *local,
1311 struct ieee80211_sub_if_data *sdata,
1312 struct cfg80211_gtk_rekey_data *data),
1313
1314 TP_ARGS(local, sdata, data),
1315
1316 TP_STRUCT__entry(
1317 LOCAL_ENTRY
1318 VIF_ENTRY
1319 __array(u8, kek, NL80211_KEK_LEN)
1320 __array(u8, kck, NL80211_KCK_LEN)
1321 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1322 ),
1323
1324 TP_fast_assign(
1325 LOCAL_ASSIGN;
1326 VIF_ASSIGN;
1327 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1328 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1329 memcpy(__entry->replay_ctr, data->replay_ctr,
1330 NL80211_REPLAY_CTR_LEN);
1331 ),
1332
1333 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1334 LOCAL_PR_ARG, VIF_PR_ARG)
1335);
1336
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001337TRACE_EVENT(drv_event_callback,
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001338 TP_PROTO(struct ieee80211_local *local,
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001339 struct ieee80211_sub_if_data *sdata,
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001340 const struct ieee80211_event *_event),
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001341
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001342 TP_ARGS(local, sdata, _event),
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001343
1344 TP_STRUCT__entry(
1345 LOCAL_ENTRY
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001346 VIF_ENTRY
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001347 __field(u32, type)
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001348 ),
1349
1350 TP_fast_assign(
1351 LOCAL_ASSIGN;
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001352 VIF_ASSIGN;
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001353 __entry->type = _event->type;
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001354 ),
1355
1356 TP_printk(
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001357 LOCAL_PR_FMT VIF_PR_FMT " event:%d",
1358 LOCAL_PR_ARG, VIF_PR_ARG, __entry->type
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001359 )
1360);
1361
Johannes Berg40b96402011-09-29 16:04:38 +02001362DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001363 TP_PROTO(struct ieee80211_local *local,
1364 struct ieee80211_sta *sta,
1365 u16 tids, int num_frames,
1366 enum ieee80211_frame_release_type reason,
1367 bool more_data),
1368
1369 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1370
1371 TP_STRUCT__entry(
1372 LOCAL_ENTRY
1373 STA_ENTRY
1374 __field(u16, tids)
1375 __field(int, num_frames)
1376 __field(int, reason)
1377 __field(bool, more_data)
1378 ),
1379
1380 TP_fast_assign(
1381 LOCAL_ASSIGN;
1382 STA_ASSIGN;
1383 __entry->tids = tids;
1384 __entry->num_frames = num_frames;
1385 __entry->reason = reason;
1386 __entry->more_data = more_data;
1387 ),
1388
1389 TP_printk(
1390 LOCAL_PR_FMT STA_PR_FMT
1391 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1392 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1393 __entry->reason, __entry->more_data
1394 )
1395);
1396
Johannes Berg40b96402011-09-29 16:04:38 +02001397DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1398 TP_PROTO(struct ieee80211_local *local,
1399 struct ieee80211_sta *sta,
1400 u16 tids, int num_frames,
1401 enum ieee80211_frame_release_type reason,
1402 bool more_data),
1403
1404 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1405);
1406
1407DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1408 TP_PROTO(struct ieee80211_local *local,
1409 struct ieee80211_sta *sta,
1410 u16 tids, int num_frames,
1411 enum ieee80211_frame_release_type reason,
1412 bool more_data),
1413
1414 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1415);
1416
Ilan Peerd4e36e52018-04-20 13:49:25 +03001417TRACE_EVENT(drv_mgd_prepare_tx,
Johannes Berga1845fc2012-06-27 13:18:36 +02001418 TP_PROTO(struct ieee80211_local *local,
Ilan Peerd4e36e52018-04-20 13:49:25 +03001419 struct ieee80211_sub_if_data *sdata,
1420 u16 duration),
Johannes Berga1845fc2012-06-27 13:18:36 +02001421
Ilan Peerd4e36e52018-04-20 13:49:25 +03001422 TP_ARGS(local, sdata, duration),
1423
1424 TP_STRUCT__entry(
1425 LOCAL_ENTRY
1426 VIF_ENTRY
1427 __field(u32, duration)
1428 ),
1429
1430 TP_fast_assign(
1431 LOCAL_ASSIGN;
1432 VIF_ASSIGN;
1433 __entry->duration = duration;
1434 ),
1435
1436 TP_printk(
1437 LOCAL_PR_FMT VIF_PR_FMT " duration: %u",
1438 LOCAL_PR_ARG, VIF_PR_ARG, __entry->duration
1439 )
Johannes Berga1845fc2012-06-27 13:18:36 +02001440);
1441
Arik Nemtsovee10f2c2014-06-11 17:18:27 +03001442DEFINE_EVENT(local_sdata_evt, drv_mgd_protect_tdls_discover,
1443 TP_PROTO(struct ieee80211_local *local,
1444 struct ieee80211_sub_if_data *sdata),
1445
1446 TP_ARGS(local, sdata)
1447);
1448
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001449DECLARE_EVENT_CLASS(local_chanctx,
1450 TP_PROTO(struct ieee80211_local *local,
1451 struct ieee80211_chanctx *ctx),
1452
1453 TP_ARGS(local, ctx),
1454
1455 TP_STRUCT__entry(
1456 LOCAL_ENTRY
1457 CHANCTX_ENTRY
1458 ),
1459
1460 TP_fast_assign(
1461 LOCAL_ASSIGN;
1462 CHANCTX_ASSIGN;
1463 ),
1464
1465 TP_printk(
1466 LOCAL_PR_FMT CHANCTX_PR_FMT,
1467 LOCAL_PR_ARG, CHANCTX_PR_ARG
1468 )
1469);
1470
1471DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1472 TP_PROTO(struct ieee80211_local *local,
1473 struct ieee80211_chanctx *ctx),
1474 TP_ARGS(local, ctx)
1475);
1476
1477DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1478 TP_PROTO(struct ieee80211_local *local,
1479 struct ieee80211_chanctx *ctx),
1480 TP_ARGS(local, ctx)
1481);
1482
1483TRACE_EVENT(drv_change_chanctx,
1484 TP_PROTO(struct ieee80211_local *local,
1485 struct ieee80211_chanctx *ctx,
1486 u32 changed),
1487
1488 TP_ARGS(local, ctx, changed),
1489
1490 TP_STRUCT__entry(
1491 LOCAL_ENTRY
1492 CHANCTX_ENTRY
1493 __field(u32, changed)
1494 ),
1495
1496 TP_fast_assign(
1497 LOCAL_ASSIGN;
1498 CHANCTX_ASSIGN;
1499 __entry->changed = changed;
1500 ),
1501
1502 TP_printk(
1503 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1504 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1505 )
1506);
1507
Luciano Coelho1a5f0c12014-05-23 14:33:12 +03001508#if !defined(__TRACE_VIF_ENTRY)
1509#define __TRACE_VIF_ENTRY
1510struct trace_vif_entry {
1511 enum nl80211_iftype vif_type;
1512 bool p2p;
1513 char vif_name[IFNAMSIZ];
1514} __packed;
1515
1516struct trace_chandef_entry {
1517 u32 control_freq;
1518 u32 chan_width;
1519 u32 center_freq1;
1520 u32 center_freq2;
1521} __packed;
1522
1523struct trace_switch_entry {
1524 struct trace_vif_entry vif;
1525 struct trace_chandef_entry old_chandef;
1526 struct trace_chandef_entry new_chandef;
1527} __packed;
1528
1529#define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
1530#endif
1531
1532TRACE_EVENT(drv_switch_vif_chanctx,
1533 TP_PROTO(struct ieee80211_local *local,
1534 struct ieee80211_vif_chanctx_switch *vifs,
1535 int n_vifs, enum ieee80211_chanctx_switch_mode mode),
1536 TP_ARGS(local, vifs, n_vifs, mode),
1537
1538 TP_STRUCT__entry(
1539 LOCAL_ENTRY
1540 __field(int, n_vifs)
1541 __field(u32, mode)
1542 __dynamic_array(u8, vifs,
1543 sizeof(struct trace_switch_entry) * n_vifs)
1544 ),
1545
1546 TP_fast_assign(
1547 LOCAL_ASSIGN;
1548 __entry->n_vifs = n_vifs;
1549 __entry->mode = mode;
1550 {
1551 struct trace_switch_entry *local_vifs =
1552 __get_dynamic_array(vifs);
1553 int i;
1554
1555 for (i = 0; i < n_vifs; i++) {
1556 struct ieee80211_sub_if_data *sdata;
1557
1558 sdata = container_of(vifs[i].vif,
1559 struct ieee80211_sub_if_data,
1560 vif);
1561
1562 SWITCH_ENTRY_ASSIGN(vif.vif_type, vif->type);
1563 SWITCH_ENTRY_ASSIGN(vif.p2p, vif->p2p);
1564 strncpy(local_vifs[i].vif.vif_name,
1565 sdata->name,
1566 sizeof(local_vifs[i].vif.vif_name));
1567 SWITCH_ENTRY_ASSIGN(old_chandef.control_freq,
1568 old_ctx->def.chan->center_freq);
1569 SWITCH_ENTRY_ASSIGN(old_chandef.chan_width,
1570 old_ctx->def.width);
1571 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq1,
1572 old_ctx->def.center_freq1);
1573 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq2,
1574 old_ctx->def.center_freq2);
1575 SWITCH_ENTRY_ASSIGN(new_chandef.control_freq,
1576 new_ctx->def.chan->center_freq);
1577 SWITCH_ENTRY_ASSIGN(new_chandef.chan_width,
1578 new_ctx->def.width);
1579 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq1,
1580 new_ctx->def.center_freq1);
1581 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq2,
1582 new_ctx->def.center_freq2);
1583 }
1584 }
1585 ),
1586
1587 TP_printk(
1588 LOCAL_PR_FMT " n_vifs:%d mode:%d",
1589 LOCAL_PR_ARG, __entry->n_vifs, __entry->mode
1590 )
1591);
1592
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001593DECLARE_EVENT_CLASS(local_sdata_chanctx,
1594 TP_PROTO(struct ieee80211_local *local,
1595 struct ieee80211_sub_if_data *sdata,
1596 struct ieee80211_chanctx *ctx),
1597
1598 TP_ARGS(local, sdata, ctx),
1599
1600 TP_STRUCT__entry(
1601 LOCAL_ENTRY
1602 VIF_ENTRY
1603 CHANCTX_ENTRY
1604 ),
1605
1606 TP_fast_assign(
1607 LOCAL_ASSIGN;
1608 VIF_ASSIGN;
1609 CHANCTX_ASSIGN;
1610 ),
1611
1612 TP_printk(
1613 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
1614 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
1615 )
1616);
1617
1618DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1619 TP_PROTO(struct ieee80211_local *local,
1620 struct ieee80211_sub_if_data *sdata,
1621 struct ieee80211_chanctx *ctx),
1622 TP_ARGS(local, sdata, ctx)
1623);
1624
1625DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1626 TP_PROTO(struct ieee80211_local *local,
1627 struct ieee80211_sub_if_data *sdata,
1628 struct ieee80211_chanctx *ctx),
1629 TP_ARGS(local, sdata, ctx)
1630);
1631
Johannes Berg10416382012-10-19 15:44:42 +02001632TRACE_EVENT(drv_start_ap,
1633 TP_PROTO(struct ieee80211_local *local,
1634 struct ieee80211_sub_if_data *sdata,
1635 struct ieee80211_bss_conf *info),
1636
1637 TP_ARGS(local, sdata, info),
1638
1639 TP_STRUCT__entry(
1640 LOCAL_ENTRY
1641 VIF_ENTRY
1642 __field(u8, dtimper)
1643 __field(u16, bcnint)
1644 __dynamic_array(u8, ssid, info->ssid_len);
1645 __field(bool, hidden_ssid);
1646 ),
1647
1648 TP_fast_assign(
1649 LOCAL_ASSIGN;
1650 VIF_ASSIGN;
1651 __entry->dtimper = info->dtim_period;
1652 __entry->bcnint = info->beacon_int;
1653 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1654 __entry->hidden_ssid = info->hidden_ssid;
1655 ),
1656
1657 TP_printk(
1658 LOCAL_PR_FMT VIF_PR_FMT,
1659 LOCAL_PR_ARG, VIF_PR_ARG
1660 )
1661);
1662
1663DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
1664 TP_PROTO(struct ieee80211_local *local,
1665 struct ieee80211_sub_if_data *sdata),
1666 TP_ARGS(local, sdata)
1667);
1668
Eliad Pellercf2c92d2014-11-04 11:43:54 +02001669TRACE_EVENT(drv_reconfig_complete,
1670 TP_PROTO(struct ieee80211_local *local,
1671 enum ieee80211_reconfig_type reconfig_type),
1672 TP_ARGS(local, reconfig_type),
1673
1674 TP_STRUCT__entry(
1675 LOCAL_ENTRY
1676 __field(u8, reconfig_type)
1677 ),
1678
1679 TP_fast_assign(
1680 LOCAL_ASSIGN;
1681 __entry->reconfig_type = reconfig_type;
1682 ),
1683
1684 TP_printk(
1685 LOCAL_PR_FMT " reconfig_type:%d",
1686 LOCAL_PR_ARG, __entry->reconfig_type
1687 )
1688
Johannes Berg9214ad72012-11-06 19:18:13 +01001689);
1690
Johannes Berga65240c2013-01-14 15:14:34 +01001691#if IS_ENABLED(CONFIG_IPV6)
1692DEFINE_EVENT(local_sdata_evt, drv_ipv6_addr_change,
1693 TP_PROTO(struct ieee80211_local *local,
1694 struct ieee80211_sub_if_data *sdata),
1695 TP_ARGS(local, sdata)
1696);
1697#endif
1698
Johannes Berg55fff502013-08-19 18:48:41 +02001699TRACE_EVENT(drv_join_ibss,
1700 TP_PROTO(struct ieee80211_local *local,
1701 struct ieee80211_sub_if_data *sdata,
1702 struct ieee80211_bss_conf *info),
1703
1704 TP_ARGS(local, sdata, info),
1705
1706 TP_STRUCT__entry(
1707 LOCAL_ENTRY
1708 VIF_ENTRY
1709 __field(u8, dtimper)
1710 __field(u16, bcnint)
1711 __dynamic_array(u8, ssid, info->ssid_len);
1712 ),
1713
1714 TP_fast_assign(
1715 LOCAL_ASSIGN;
1716 VIF_ASSIGN;
1717 __entry->dtimper = info->dtim_period;
1718 __entry->bcnint = info->beacon_int;
1719 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1720 ),
1721
1722 TP_printk(
1723 LOCAL_PR_FMT VIF_PR_FMT,
1724 LOCAL_PR_ARG, VIF_PR_ARG
1725 )
1726);
1727
1728DEFINE_EVENT(local_sdata_evt, drv_leave_ibss,
1729 TP_PROTO(struct ieee80211_local *local,
1730 struct ieee80211_sub_if_data *sdata),
1731 TP_ARGS(local, sdata)
1732);
1733
Antonio Quartullicca674d2014-05-19 21:53:20 +02001734TRACE_EVENT(drv_get_expected_throughput,
1735 TP_PROTO(struct ieee80211_sta *sta),
1736
1737 TP_ARGS(sta),
1738
1739 TP_STRUCT__entry(
1740 STA_ENTRY
1741 ),
1742
1743 TP_fast_assign(
1744 STA_ASSIGN;
1745 ),
1746
1747 TP_printk(
1748 STA_PR_FMT, STA_PR_ARG
1749 )
1750);
1751
Ayala Beker708d50e2016-09-20 17:31:14 +03001752TRACE_EVENT(drv_start_nan,
1753 TP_PROTO(struct ieee80211_local *local,
1754 struct ieee80211_sub_if_data *sdata,
1755 struct cfg80211_nan_conf *conf),
1756
1757 TP_ARGS(local, sdata, conf),
1758 TP_STRUCT__entry(
1759 LOCAL_ENTRY
1760 VIF_ENTRY
1761 __field(u8, master_pref)
Luca Coelho85859892017-02-08 15:00:34 +02001762 __field(u8, bands)
Ayala Beker708d50e2016-09-20 17:31:14 +03001763 ),
1764
1765 TP_fast_assign(
1766 LOCAL_ASSIGN;
1767 VIF_ASSIGN;
1768 __entry->master_pref = conf->master_pref;
Luca Coelho85859892017-02-08 15:00:34 +02001769 __entry->bands = conf->bands;
Ayala Beker708d50e2016-09-20 17:31:14 +03001770 ),
1771
1772 TP_printk(
1773 LOCAL_PR_FMT VIF_PR_FMT
Luca Coelho85859892017-02-08 15:00:34 +02001774 ", master preference: %u, bands: 0x%0x",
Ayala Beker708d50e2016-09-20 17:31:14 +03001775 LOCAL_PR_ARG, VIF_PR_ARG, __entry->master_pref,
Luca Coelho85859892017-02-08 15:00:34 +02001776 __entry->bands
Ayala Beker708d50e2016-09-20 17:31:14 +03001777 )
1778);
1779
1780TRACE_EVENT(drv_stop_nan,
1781 TP_PROTO(struct ieee80211_local *local,
1782 struct ieee80211_sub_if_data *sdata),
1783
1784 TP_ARGS(local, sdata),
1785
1786 TP_STRUCT__entry(
1787 LOCAL_ENTRY
1788 VIF_ENTRY
1789 ),
1790
1791 TP_fast_assign(
1792 LOCAL_ASSIGN;
1793 VIF_ASSIGN;
1794 ),
1795
1796 TP_printk(
1797 LOCAL_PR_FMT VIF_PR_FMT,
1798 LOCAL_PR_ARG, VIF_PR_ARG
1799 )
1800);
1801
Ayala Beker5953ff62016-09-20 17:31:19 +03001802TRACE_EVENT(drv_nan_change_conf,
1803 TP_PROTO(struct ieee80211_local *local,
1804 struct ieee80211_sub_if_data *sdata,
1805 struct cfg80211_nan_conf *conf,
1806 u32 changes),
1807
1808 TP_ARGS(local, sdata, conf, changes),
1809 TP_STRUCT__entry(
1810 LOCAL_ENTRY
1811 VIF_ENTRY
1812 __field(u8, master_pref)
Luca Coelho85859892017-02-08 15:00:34 +02001813 __field(u8, bands)
Ayala Beker5953ff62016-09-20 17:31:19 +03001814 __field(u32, changes)
1815 ),
1816
1817 TP_fast_assign(
1818 LOCAL_ASSIGN;
1819 VIF_ASSIGN;
1820 __entry->master_pref = conf->master_pref;
Luca Coelho85859892017-02-08 15:00:34 +02001821 __entry->bands = conf->bands;
Ayala Beker5953ff62016-09-20 17:31:19 +03001822 __entry->changes = changes;
1823 ),
1824
1825 TP_printk(
1826 LOCAL_PR_FMT VIF_PR_FMT
Luca Coelho85859892017-02-08 15:00:34 +02001827 ", master preference: %u, bands: 0x%0x, changes: 0x%x",
Ayala Beker5953ff62016-09-20 17:31:19 +03001828 LOCAL_PR_ARG, VIF_PR_ARG, __entry->master_pref,
Luca Coelho85859892017-02-08 15:00:34 +02001829 __entry->bands, __entry->changes
Ayala Beker5953ff62016-09-20 17:31:19 +03001830 )
1831);
1832
Ayala Beker167e33f2016-09-20 17:31:20 +03001833TRACE_EVENT(drv_add_nan_func,
1834 TP_PROTO(struct ieee80211_local *local,
1835 struct ieee80211_sub_if_data *sdata,
1836 const struct cfg80211_nan_func *func),
1837
1838 TP_ARGS(local, sdata, func),
1839 TP_STRUCT__entry(
1840 LOCAL_ENTRY
1841 VIF_ENTRY
1842 __field(u8, type)
1843 __field(u8, inst_id)
1844 ),
1845
1846 TP_fast_assign(
1847 LOCAL_ASSIGN;
1848 VIF_ASSIGN;
1849 __entry->type = func->type;
1850 __entry->inst_id = func->instance_id;
1851 ),
1852
1853 TP_printk(
1854 LOCAL_PR_FMT VIF_PR_FMT
1855 ", type: %u, inst_id: %u",
1856 LOCAL_PR_ARG, VIF_PR_ARG, __entry->type, __entry->inst_id
1857 )
1858);
1859
1860TRACE_EVENT(drv_del_nan_func,
1861 TP_PROTO(struct ieee80211_local *local,
1862 struct ieee80211_sub_if_data *sdata,
1863 u8 instance_id),
1864
1865 TP_ARGS(local, sdata, instance_id),
1866 TP_STRUCT__entry(
1867 LOCAL_ENTRY
1868 VIF_ENTRY
1869 __field(u8, instance_id)
1870 ),
1871
1872 TP_fast_assign(
1873 LOCAL_ASSIGN;
1874 VIF_ASSIGN;
1875 __entry->instance_id = instance_id;
1876 ),
1877
1878 TP_printk(
1879 LOCAL_PR_FMT VIF_PR_FMT
1880 ", instance_id: %u",
1881 LOCAL_PR_ARG, VIF_PR_ARG, __entry->instance_id
1882 )
1883);
1884
Johannes Bergb5878a22010-04-07 16:48:40 +02001885/*
1886 * Tracing for API calls that drivers call.
1887 */
1888
1889TRACE_EVENT(api_start_tx_ba_session,
1890 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1891
1892 TP_ARGS(sta, tid),
1893
1894 TP_STRUCT__entry(
1895 STA_ENTRY
1896 __field(u16, tid)
1897 ),
1898
1899 TP_fast_assign(
1900 STA_ASSIGN;
1901 __entry->tid = tid;
1902 ),
1903
1904 TP_printk(
1905 STA_PR_FMT " tid:%d",
1906 STA_PR_ARG, __entry->tid
1907 )
1908);
1909
1910TRACE_EVENT(api_start_tx_ba_cb,
1911 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1912
1913 TP_ARGS(sdata, ra, tid),
1914
1915 TP_STRUCT__entry(
1916 VIF_ENTRY
1917 __array(u8, ra, ETH_ALEN)
1918 __field(u16, tid)
1919 ),
1920
1921 TP_fast_assign(
1922 VIF_ASSIGN;
1923 memcpy(__entry->ra, ra, ETH_ALEN);
1924 __entry->tid = tid;
1925 ),
1926
1927 TP_printk(
1928 VIF_PR_FMT " ra:%pM tid:%d",
1929 VIF_PR_ARG, __entry->ra, __entry->tid
1930 )
1931);
1932
1933TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001934 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001935
Johannes Berg6a8579d2010-05-27 14:41:07 +02001936 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001937
1938 TP_STRUCT__entry(
1939 STA_ENTRY
1940 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001941 ),
1942
1943 TP_fast_assign(
1944 STA_ASSIGN;
1945 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001946 ),
1947
1948 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001949 STA_PR_FMT " tid:%d",
1950 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001951 )
1952);
1953
1954TRACE_EVENT(api_stop_tx_ba_cb,
1955 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1956
1957 TP_ARGS(sdata, ra, tid),
1958
1959 TP_STRUCT__entry(
1960 VIF_ENTRY
1961 __array(u8, ra, ETH_ALEN)
1962 __field(u16, tid)
1963 ),
1964
1965 TP_fast_assign(
1966 VIF_ASSIGN;
1967 memcpy(__entry->ra, ra, ETH_ALEN);
1968 __entry->tid = tid;
1969 ),
1970
1971 TP_printk(
1972 VIF_PR_FMT " ra:%pM tid:%d",
1973 VIF_PR_ARG, __entry->ra, __entry->tid
1974 )
1975);
1976
Johannes Bergba99d932011-01-26 09:22:15 +01001977DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001978 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001979 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001980);
1981
1982TRACE_EVENT(api_beacon_loss,
1983 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1984
1985 TP_ARGS(sdata),
1986
1987 TP_STRUCT__entry(
1988 VIF_ENTRY
1989 ),
1990
1991 TP_fast_assign(
1992 VIF_ASSIGN;
1993 ),
1994
1995 TP_printk(
1996 VIF_PR_FMT,
1997 VIF_PR_ARG
1998 )
1999);
2000
2001TRACE_EVENT(api_connection_loss,
2002 TP_PROTO(struct ieee80211_sub_if_data *sdata),
2003
2004 TP_ARGS(sdata),
2005
2006 TP_STRUCT__entry(
2007 VIF_ENTRY
2008 ),
2009
2010 TP_fast_assign(
2011 VIF_ASSIGN;
2012 ),
2013
2014 TP_printk(
2015 VIF_PR_FMT,
2016 VIF_PR_ARG
2017 )
2018);
2019
2020TRACE_EVENT(api_cqm_rssi_notify,
2021 TP_PROTO(struct ieee80211_sub_if_data *sdata,
Andrzej Zaborowski769f07d2017-01-25 12:43:40 +01002022 enum nl80211_cqm_rssi_threshold_event rssi_event,
2023 s32 rssi_level),
Johannes Bergb5878a22010-04-07 16:48:40 +02002024
Andrzej Zaborowski769f07d2017-01-25 12:43:40 +01002025 TP_ARGS(sdata, rssi_event, rssi_level),
Johannes Bergb5878a22010-04-07 16:48:40 +02002026
2027 TP_STRUCT__entry(
2028 VIF_ENTRY
2029 __field(u32, rssi_event)
Andrzej Zaborowski769f07d2017-01-25 12:43:40 +01002030 __field(s32, rssi_level)
Johannes Bergb5878a22010-04-07 16:48:40 +02002031 ),
2032
2033 TP_fast_assign(
2034 VIF_ASSIGN;
2035 __entry->rssi_event = rssi_event;
Andrzej Zaborowski769f07d2017-01-25 12:43:40 +01002036 __entry->rssi_level = rssi_level;
Johannes Bergb5878a22010-04-07 16:48:40 +02002037 ),
2038
2039 TP_printk(
Andrzej Zaborowski769f07d2017-01-25 12:43:40 +01002040 VIF_PR_FMT " event:%d rssi:%d",
2041 VIF_PR_ARG, __entry->rssi_event, __entry->rssi_level
Johannes Bergb5878a22010-04-07 16:48:40 +02002042 )
2043);
2044
Johannes Berg98f03342014-11-26 12:42:02 +01002045DEFINE_EVENT(local_sdata_evt, api_cqm_beacon_loss_notify,
2046 TP_PROTO(struct ieee80211_local *local,
2047 struct ieee80211_sub_if_data *sdata),
2048 TP_ARGS(local, sdata)
2049);
2050
Johannes Bergb5878a22010-04-07 16:48:40 +02002051TRACE_EVENT(api_scan_completed,
2052 TP_PROTO(struct ieee80211_local *local, bool aborted),
2053
2054 TP_ARGS(local, aborted),
2055
2056 TP_STRUCT__entry(
2057 LOCAL_ENTRY
2058 __field(bool, aborted)
2059 ),
2060
2061 TP_fast_assign(
2062 LOCAL_ASSIGN;
2063 __entry->aborted = aborted;
2064 ),
2065
2066 TP_printk(
2067 LOCAL_PR_FMT " aborted:%d",
2068 LOCAL_PR_ARG, __entry->aborted
2069 )
2070);
2071
Luciano Coelho79f460c2011-05-11 17:09:36 +03002072TRACE_EVENT(api_sched_scan_results,
2073 TP_PROTO(struct ieee80211_local *local),
2074
2075 TP_ARGS(local),
2076
2077 TP_STRUCT__entry(
2078 LOCAL_ENTRY
2079 ),
2080
2081 TP_fast_assign(
2082 LOCAL_ASSIGN;
2083 ),
2084
2085 TP_printk(
2086 LOCAL_PR_FMT, LOCAL_PR_ARG
2087 )
2088);
2089
2090TRACE_EVENT(api_sched_scan_stopped,
2091 TP_PROTO(struct ieee80211_local *local),
2092
2093 TP_ARGS(local),
2094
2095 TP_STRUCT__entry(
2096 LOCAL_ENTRY
2097 ),
2098
2099 TP_fast_assign(
2100 LOCAL_ASSIGN;
2101 ),
2102
2103 TP_printk(
2104 LOCAL_PR_FMT, LOCAL_PR_ARG
2105 )
2106);
2107
Johannes Bergb5878a22010-04-07 16:48:40 +02002108TRACE_EVENT(api_sta_block_awake,
2109 TP_PROTO(struct ieee80211_local *local,
2110 struct ieee80211_sta *sta, bool block),
2111
2112 TP_ARGS(local, sta, block),
2113
2114 TP_STRUCT__entry(
2115 LOCAL_ENTRY
2116 STA_ENTRY
2117 __field(bool, block)
2118 ),
2119
2120 TP_fast_assign(
2121 LOCAL_ASSIGN;
2122 STA_ASSIGN;
2123 __entry->block = block;
2124 ),
2125
2126 TP_printk(
2127 LOCAL_PR_FMT STA_PR_FMT " block:%d",
Seth Forshee15ac7c42013-02-15 13:15:48 -06002128 LOCAL_PR_ARG, STA_PR_ARG, __entry->block
Johannes Bergb5878a22010-04-07 16:48:40 +02002129 )
2130);
2131
Johannes Berg5ce6e432010-05-11 16:20:57 +02002132TRACE_EVENT(api_chswitch_done,
2133 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
2134
2135 TP_ARGS(sdata, success),
2136
2137 TP_STRUCT__entry(
2138 VIF_ENTRY
2139 __field(bool, success)
2140 ),
2141
2142 TP_fast_assign(
2143 VIF_ASSIGN;
2144 __entry->success = success;
2145 ),
2146
2147 TP_printk(
2148 VIF_PR_FMT " success=%d",
2149 VIF_PR_ARG, __entry->success
2150 )
2151);
2152
Johannes Bergba99d932011-01-26 09:22:15 +01002153DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01002154 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01002155 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01002156);
2157
Johannes Bergba99d932011-01-26 09:22:15 +01002158DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01002159 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01002160 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01002161);
2162
Johannes Bergc68f4b82011-07-05 16:35:41 +02002163TRACE_EVENT(api_gtk_rekey_notify,
2164 TP_PROTO(struct ieee80211_sub_if_data *sdata,
2165 const u8 *bssid, const u8 *replay_ctr),
2166
2167 TP_ARGS(sdata, bssid, replay_ctr),
2168
2169 TP_STRUCT__entry(
2170 VIF_ENTRY
2171 __array(u8, bssid, ETH_ALEN)
2172 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
2173 ),
2174
2175 TP_fast_assign(
2176 VIF_ASSIGN;
2177 memcpy(__entry->bssid, bssid, ETH_ALEN);
2178 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
2179 ),
2180
2181 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
2182);
2183
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07002184TRACE_EVENT(api_enable_rssi_reports,
2185 TP_PROTO(struct ieee80211_sub_if_data *sdata,
2186 int rssi_min_thold, int rssi_max_thold),
2187
2188 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
2189
2190 TP_STRUCT__entry(
2191 VIF_ENTRY
2192 __field(int, rssi_min_thold)
2193 __field(int, rssi_max_thold)
2194 ),
2195
2196 TP_fast_assign(
2197 VIF_ASSIGN;
2198 __entry->rssi_min_thold = rssi_min_thold;
2199 __entry->rssi_max_thold = rssi_max_thold;
2200 ),
2201
2202 TP_printk(
2203 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
2204 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
2205 )
2206);
2207
Johannes Berg37fbd902011-09-29 16:04:39 +02002208TRACE_EVENT(api_eosp,
2209 TP_PROTO(struct ieee80211_local *local,
2210 struct ieee80211_sta *sta),
2211
2212 TP_ARGS(local, sta),
2213
2214 TP_STRUCT__entry(
2215 LOCAL_ENTRY
2216 STA_ENTRY
2217 ),
2218
2219 TP_fast_assign(
2220 LOCAL_ASSIGN;
2221 STA_ASSIGN;
2222 ),
2223
2224 TP_printk(
2225 LOCAL_PR_FMT STA_PR_FMT,
Seth Forshee15ac7c42013-02-15 13:15:48 -06002226 LOCAL_PR_ARG, STA_PR_ARG
Johannes Berg37fbd902011-09-29 16:04:39 +02002227 )
2228);
2229
Emmanuel Grumbach0ead2512015-11-17 10:24:36 +02002230TRACE_EVENT(api_send_eosp_nullfunc,
2231 TP_PROTO(struct ieee80211_local *local,
2232 struct ieee80211_sta *sta,
2233 u8 tid),
2234
2235 TP_ARGS(local, sta, tid),
2236
2237 TP_STRUCT__entry(
2238 LOCAL_ENTRY
2239 STA_ENTRY
2240 __field(u8, tid)
2241 ),
2242
2243 TP_fast_assign(
2244 LOCAL_ASSIGN;
2245 STA_ASSIGN;
2246 __entry->tid = tid;
2247 ),
2248
2249 TP_printk(
2250 LOCAL_PR_FMT STA_PR_FMT " tid:%d",
2251 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid
2252 )
2253);
2254
Johannes Berg1b000782013-12-19 10:47:48 +01002255TRACE_EVENT(api_sta_set_buffered,
2256 TP_PROTO(struct ieee80211_local *local,
2257 struct ieee80211_sta *sta,
2258 u8 tid, bool buffered),
2259
2260 TP_ARGS(local, sta, tid, buffered),
2261
2262 TP_STRUCT__entry(
2263 LOCAL_ENTRY
2264 STA_ENTRY
2265 __field(u8, tid)
2266 __field(bool, buffered)
2267 ),
2268
2269 TP_fast_assign(
2270 LOCAL_ASSIGN;
2271 STA_ASSIGN;
2272 __entry->tid = tid;
2273 __entry->buffered = buffered;
2274 ),
2275
2276 TP_printk(
2277 LOCAL_PR_FMT STA_PR_FMT " tid:%d buffered:%d",
2278 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid, __entry->buffered
2279 )
2280);
2281
Johannes Bergb5878a22010-04-07 16:48:40 +02002282/*
2283 * Tracing for internal functions
2284 * (which may also be called in response to driver calls)
2285 */
2286
2287TRACE_EVENT(wake_queue,
2288 TP_PROTO(struct ieee80211_local *local, u16 queue,
2289 enum queue_stop_reason reason),
2290
2291 TP_ARGS(local, queue, reason),
2292
2293 TP_STRUCT__entry(
2294 LOCAL_ENTRY
2295 __field(u16, queue)
2296 __field(u32, reason)
2297 ),
2298
2299 TP_fast_assign(
2300 LOCAL_ASSIGN;
2301 __entry->queue = queue;
2302 __entry->reason = reason;
2303 ),
2304
2305 TP_printk(
2306 LOCAL_PR_FMT " queue:%d, reason:%d",
2307 LOCAL_PR_ARG, __entry->queue, __entry->reason
2308 )
2309);
2310
2311TRACE_EVENT(stop_queue,
2312 TP_PROTO(struct ieee80211_local *local, u16 queue,
2313 enum queue_stop_reason reason),
2314
2315 TP_ARGS(local, queue, reason),
2316
2317 TP_STRUCT__entry(
2318 LOCAL_ENTRY
2319 __field(u16, queue)
2320 __field(u32, reason)
2321 ),
2322
2323 TP_fast_assign(
2324 LOCAL_ASSIGN;
2325 __entry->queue = queue;
2326 __entry->reason = reason;
2327 ),
2328
2329 TP_printk(
2330 LOCAL_PR_FMT " queue:%d, reason:%d",
2331 LOCAL_PR_ARG, __entry->queue, __entry->reason
2332 )
2333);
Johannes Berg3fae0272012-06-22 13:36:25 +02002334
Yoni Divinskyde5fad82012-05-30 11:36:39 +03002335TRACE_EVENT(drv_set_default_unicast_key,
2336 TP_PROTO(struct ieee80211_local *local,
2337 struct ieee80211_sub_if_data *sdata,
2338 int key_idx),
2339
2340 TP_ARGS(local, sdata, key_idx),
2341
2342 TP_STRUCT__entry(
2343 LOCAL_ENTRY
2344 VIF_ENTRY
2345 __field(int, key_idx)
2346 ),
2347
2348 TP_fast_assign(
2349 LOCAL_ASSIGN;
2350 VIF_ASSIGN;
2351 __entry->key_idx = key_idx;
2352 ),
2353
2354 TP_printk(LOCAL_PR_FMT VIF_PR_FMT " key_idx:%d",
2355 LOCAL_PR_ARG, VIF_PR_ARG, __entry->key_idx)
2356);
2357
Simon Wunderlich164eb022013-02-08 18:16:20 +01002358TRACE_EVENT(api_radar_detected,
2359 TP_PROTO(struct ieee80211_local *local),
2360
2361 TP_ARGS(local),
2362
2363 TP_STRUCT__entry(
2364 LOCAL_ENTRY
2365 ),
2366
2367 TP_fast_assign(
2368 LOCAL_ASSIGN;
2369 ),
2370
2371 TP_printk(
2372 LOCAL_PR_FMT " radar detected",
2373 LOCAL_PR_ARG
2374 )
2375);
2376
Simon Wunderlich73da7d52013-07-11 16:09:06 +02002377TRACE_EVENT(drv_channel_switch_beacon,
2378 TP_PROTO(struct ieee80211_local *local,
2379 struct ieee80211_sub_if_data *sdata,
2380 struct cfg80211_chan_def *chandef),
2381
2382 TP_ARGS(local, sdata, chandef),
2383
2384 TP_STRUCT__entry(
2385 LOCAL_ENTRY
2386 VIF_ENTRY
2387 CHANDEF_ENTRY
2388 ),
2389
2390 TP_fast_assign(
2391 LOCAL_ASSIGN;
2392 VIF_ASSIGN;
2393 CHANDEF_ASSIGN(chandef);
2394 ),
2395
2396 TP_printk(
2397 LOCAL_PR_FMT VIF_PR_FMT " channel switch to " CHANDEF_PR_FMT,
2398 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG
2399 )
2400);
2401
Luciano Coelho6d027bc2014-10-08 09:48:37 +03002402TRACE_EVENT(drv_pre_channel_switch,
2403 TP_PROTO(struct ieee80211_local *local,
2404 struct ieee80211_sub_if_data *sdata,
2405 struct ieee80211_channel_switch *ch_switch),
2406
2407 TP_ARGS(local, sdata, ch_switch),
2408
2409 TP_STRUCT__entry(
2410 LOCAL_ENTRY
2411 VIF_ENTRY
2412 CHANDEF_ENTRY
2413 __field(u64, timestamp)
Luciano Coelho127f10e2014-11-07 15:28:34 +02002414 __field(u32, device_timestamp)
Luciano Coelho6d027bc2014-10-08 09:48:37 +03002415 __field(bool, block_tx)
2416 __field(u8, count)
2417 ),
2418
2419 TP_fast_assign(
2420 LOCAL_ASSIGN;
2421 VIF_ASSIGN;
2422 CHANDEF_ASSIGN(&ch_switch->chandef)
2423 __entry->timestamp = ch_switch->timestamp;
Luciano Coelho127f10e2014-11-07 15:28:34 +02002424 __entry->device_timestamp = ch_switch->device_timestamp;
Luciano Coelho6d027bc2014-10-08 09:48:37 +03002425 __entry->block_tx = ch_switch->block_tx;
2426 __entry->count = ch_switch->count;
2427 ),
2428
2429 TP_printk(
2430 LOCAL_PR_FMT VIF_PR_FMT " prepare channel switch to "
2431 CHANDEF_PR_FMT " count:%d block_tx:%d timestamp:%llu",
2432 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count,
2433 __entry->block_tx, __entry->timestamp
2434 )
2435);
2436
Luciano Coelhof1d65582014-10-08 09:48:38 +03002437DEFINE_EVENT(local_sdata_evt, drv_post_channel_switch,
2438 TP_PROTO(struct ieee80211_local *local,
2439 struct ieee80211_sub_if_data *sdata),
2440 TP_ARGS(local, sdata)
2441);
2442
Felix Fietkau5b3dc422014-10-26 00:32:53 +02002443TRACE_EVENT(drv_get_txpower,
2444 TP_PROTO(struct ieee80211_local *local,
2445 struct ieee80211_sub_if_data *sdata,
2446 int dbm, int ret),
2447
2448 TP_ARGS(local, sdata, dbm, ret),
2449
2450 TP_STRUCT__entry(
2451 LOCAL_ENTRY
2452 VIF_ENTRY
2453 __field(int, dbm)
2454 __field(int, ret)
2455 ),
2456
2457 TP_fast_assign(
2458 LOCAL_ASSIGN;
2459 VIF_ASSIGN;
2460 __entry->dbm = dbm;
2461 __entry->ret = ret;
2462 ),
2463
2464 TP_printk(
2465 LOCAL_PR_FMT VIF_PR_FMT " dbm:%d ret:%d",
2466 LOCAL_PR_ARG, VIF_PR_ARG, __entry->dbm, __entry->ret
2467 )
2468);
2469
Arik Nemtsova7a6bdd2014-11-09 18:50:19 +02002470TRACE_EVENT(drv_tdls_channel_switch,
2471 TP_PROTO(struct ieee80211_local *local,
2472 struct ieee80211_sub_if_data *sdata,
2473 struct ieee80211_sta *sta, u8 oper_class,
2474 struct cfg80211_chan_def *chandef),
2475
2476 TP_ARGS(local, sdata, sta, oper_class, chandef),
2477
2478 TP_STRUCT__entry(
2479 LOCAL_ENTRY
2480 VIF_ENTRY
2481 STA_ENTRY
2482 __field(u8, oper_class)
2483 CHANDEF_ENTRY
2484 ),
2485
2486 TP_fast_assign(
2487 LOCAL_ASSIGN;
2488 VIF_ASSIGN;
2489 STA_ASSIGN;
2490 __entry->oper_class = oper_class;
2491 CHANDEF_ASSIGN(chandef)
2492 ),
2493
2494 TP_printk(
2495 LOCAL_PR_FMT VIF_PR_FMT " tdls channel switch to"
2496 CHANDEF_PR_FMT " oper_class:%d " STA_PR_FMT,
2497 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->oper_class,
2498 STA_PR_ARG
2499 )
2500);
2501
2502TRACE_EVENT(drv_tdls_cancel_channel_switch,
2503 TP_PROTO(struct ieee80211_local *local,
2504 struct ieee80211_sub_if_data *sdata,
2505 struct ieee80211_sta *sta),
2506
2507 TP_ARGS(local, sdata, sta),
2508
2509 TP_STRUCT__entry(
2510 LOCAL_ENTRY
2511 VIF_ENTRY
2512 STA_ENTRY
2513 ),
2514
2515 TP_fast_assign(
2516 LOCAL_ASSIGN;
2517 VIF_ASSIGN;
2518 STA_ASSIGN;
2519 ),
2520
2521 TP_printk(
2522 LOCAL_PR_FMT VIF_PR_FMT
2523 " tdls cancel channel switch with " STA_PR_FMT,
2524 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
2525 )
2526);
Simon Wunderlich73da7d52013-07-11 16:09:06 +02002527
Arik Nemtsov8a4d32f2014-11-09 18:50:20 +02002528TRACE_EVENT(drv_tdls_recv_channel_switch,
2529 TP_PROTO(struct ieee80211_local *local,
2530 struct ieee80211_sub_if_data *sdata,
2531 struct ieee80211_tdls_ch_sw_params *params),
2532
2533 TP_ARGS(local, sdata, params),
2534
2535 TP_STRUCT__entry(
2536 LOCAL_ENTRY
2537 VIF_ENTRY
2538 __field(u8, action_code)
2539 STA_ENTRY
2540 CHANDEF_ENTRY
2541 __field(u32, status)
2542 __field(bool, peer_initiator)
2543 __field(u32, timestamp)
2544 __field(u16, switch_time)
2545 __field(u16, switch_timeout)
2546 ),
2547
2548 TP_fast_assign(
2549 LOCAL_ASSIGN;
2550 VIF_ASSIGN;
2551 STA_NAMED_ASSIGN(params->sta);
2552 CHANDEF_ASSIGN(params->chandef)
2553 __entry->peer_initiator = params->sta->tdls_initiator;
2554 __entry->action_code = params->action_code;
2555 __entry->status = params->status;
2556 __entry->timestamp = params->timestamp;
2557 __entry->switch_time = params->switch_time;
2558 __entry->switch_timeout = params->switch_timeout;
2559 ),
2560
2561 TP_printk(
2562 LOCAL_PR_FMT VIF_PR_FMT " received tdls channel switch packet"
2563 " action:%d status:%d time:%d switch time:%d switch"
2564 " timeout:%d initiator: %d chan:" CHANDEF_PR_FMT STA_PR_FMT,
2565 LOCAL_PR_ARG, VIF_PR_ARG, __entry->action_code, __entry->status,
2566 __entry->timestamp, __entry->switch_time,
2567 __entry->switch_timeout, __entry->peer_initiator,
2568 CHANDEF_PR_ARG, STA_PR_ARG
2569 )
2570);
2571
Felix Fietkauba8c3d62015-03-27 21:30:37 +01002572TRACE_EVENT(drv_wake_tx_queue,
2573 TP_PROTO(struct ieee80211_local *local,
2574 struct ieee80211_sub_if_data *sdata,
2575 struct txq_info *txq),
2576
2577 TP_ARGS(local, sdata, txq),
2578
2579 TP_STRUCT__entry(
2580 LOCAL_ENTRY
2581 VIF_ENTRY
2582 STA_ENTRY
2583 __field(u8, ac)
2584 __field(u8, tid)
2585 ),
2586
2587 TP_fast_assign(
2588 struct ieee80211_sta *sta = txq->txq.sta;
2589
2590 LOCAL_ASSIGN;
2591 VIF_ASSIGN;
2592 STA_ASSIGN;
2593 __entry->ac = txq->txq.ac;
2594 __entry->tid = txq->txq.tid;
2595 ),
2596
2597 TP_printk(
2598 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ac:%d tid:%d",
2599 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ac, __entry->tid
2600 )
2601);
2602
Christian Lamparterf7428802009-07-19 23:21:07 +02002603#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02002604
2605#undef TRACE_INCLUDE_PATH
2606#define TRACE_INCLUDE_PATH .
2607#undef TRACE_INCLUDE_FILE
Johannes Berg011ad0e2012-06-22 12:55:52 +02002608#define TRACE_INCLUDE_FILE trace
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02002609#include <trace/define_trace.h>