blob: a3f5fe2a84a86a3971ec37bf865b7e14ce84906a [file] [log] [blame]
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001#if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
2#define __MAC80211_DRIVER_TRACE
3
4#include <linux/tracepoint.h>
5#include <net/mac80211.h>
6#include "ieee80211_i.h"
7
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02008#undef TRACE_SYSTEM
9#define TRACE_SYSTEM mac80211
10
11#define MAXNAME 32
12#define LOCAL_ENTRY __array(char, wiphy_name, 32)
13#define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME)
14#define LOCAL_PR_FMT "%s"
15#define LOCAL_PR_ARG __entry->wiphy_name
16
17#define STA_ENTRY __array(char, sta_addr, ETH_ALEN)
18#define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN))
19#define STA_PR_FMT " sta:%pM"
20#define STA_PR_ARG __entry->sta_addr
21
Johannes Berg2ca27bc2010-09-16 14:58:23 +020022#define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
23 __field(bool, p2p) \
Johannes Berg12375ef2009-11-25 20:30:31 +010024 __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
Johannes Berg2ca27bc2010-09-16 14:58:23 +020025#define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
26 __entry->p2p = sdata->vif.p2p; \
Johannes Bergf142c6b2012-06-18 20:07:15 +020027 __assign_str(vif_name, sdata->dev ? sdata->dev->name : sdata->name)
Johannes Berg2ca27bc2010-09-16 14:58:23 +020028#define VIF_PR_FMT " vif:%s(%d%s)"
29#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020030
Michal Kaziorc3645ea2012-06-26 14:37:17 +020031#define CHANCTX_ENTRY __field(int, freq) \
32 __field(int, chantype)
33#define CHANCTX_ASSIGN __entry->freq = ctx->conf.channel->center_freq; \
34 __entry->chantype = ctx->conf.channel_type
35#define CHANCTX_PR_FMT " freq:%d MHz chantype:%d"
36#define CHANCTX_PR_ARG __entry->freq, __entry->chantype
37
38
39
Johannes Bergb5878a22010-04-07 16:48:40 +020040/*
41 * Tracing for driver callbacks.
42 */
43
Johannes Bergba99d932011-01-26 09:22:15 +010044DECLARE_EVENT_CLASS(local_only_evt,
Johannes Berg4efc76b2010-06-10 10:56:20 +020045 TP_PROTO(struct ieee80211_local *local),
46 TP_ARGS(local),
47 TP_STRUCT__entry(
48 LOCAL_ENTRY
49 ),
50 TP_fast_assign(
51 LOCAL_ASSIGN;
52 ),
53 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
54);
55
Luciano Coelho92ddc112011-05-09 14:40:06 +030056DECLARE_EVENT_CLASS(local_sdata_addr_evt,
57 TP_PROTO(struct ieee80211_local *local,
58 struct ieee80211_sub_if_data *sdata),
59 TP_ARGS(local, sdata),
60
61 TP_STRUCT__entry(
62 LOCAL_ENTRY
63 VIF_ENTRY
64 __array(char, addr, 6)
65 ),
66
67 TP_fast_assign(
68 LOCAL_ASSIGN;
69 VIF_ASSIGN;
70 memcpy(__entry->addr, sdata->vif.addr, 6);
71 ),
72
73 TP_printk(
74 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
75 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
76 )
77);
78
79DECLARE_EVENT_CLASS(local_u32_evt,
80 TP_PROTO(struct ieee80211_local *local, u32 value),
81 TP_ARGS(local, value),
82
83 TP_STRUCT__entry(
84 LOCAL_ENTRY
85 __field(u32, value)
86 ),
87
88 TP_fast_assign(
89 LOCAL_ASSIGN;
90 __entry->value = value;
91 ),
92
93 TP_printk(
94 LOCAL_PR_FMT " value:%d",
95 LOCAL_PR_ARG, __entry->value
96 )
97);
98
Luciano Coelho79f460c2011-05-11 17:09:36 +030099DECLARE_EVENT_CLASS(local_sdata_evt,
100 TP_PROTO(struct ieee80211_local *local,
101 struct ieee80211_sub_if_data *sdata),
102 TP_ARGS(local, sdata),
103
104 TP_STRUCT__entry(
105 LOCAL_ENTRY
106 VIF_ENTRY
107 ),
108
109 TP_fast_assign(
110 LOCAL_ASSIGN;
111 VIF_ASSIGN;
112 ),
113
114 TP_printk(
115 LOCAL_PR_FMT VIF_PR_FMT,
116 LOCAL_PR_ARG, VIF_PR_ARG
117 )
118);
119
Johannes Bergba99d932011-01-26 09:22:15 +0100120DEFINE_EVENT(local_only_evt, drv_return_void,
121 TP_PROTO(struct ieee80211_local *local),
122 TP_ARGS(local)
123);
124
Johannes Berg4efc76b2010-06-10 10:56:20 +0200125TRACE_EVENT(drv_return_int,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200126 TP_PROTO(struct ieee80211_local *local, int ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200127 TP_ARGS(local, ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200128 TP_STRUCT__entry(
129 LOCAL_ENTRY
130 __field(int, ret)
131 ),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200132 TP_fast_assign(
133 LOCAL_ASSIGN;
134 __entry->ret = ret;
135 ),
Johannes Berg4efc76b2010-06-10 10:56:20 +0200136 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
137);
138
Vivek Natarajane8306f92011-04-06 11:41:10 +0530139TRACE_EVENT(drv_return_bool,
140 TP_PROTO(struct ieee80211_local *local, bool ret),
141 TP_ARGS(local, ret),
142 TP_STRUCT__entry(
143 LOCAL_ENTRY
144 __field(bool, ret)
145 ),
146 TP_fast_assign(
147 LOCAL_ASSIGN;
148 __entry->ret = ret;
149 ),
150 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
151 "true" : "false")
152);
153
Johannes Berg4efc76b2010-06-10 10:56:20 +0200154TRACE_EVENT(drv_return_u64,
155 TP_PROTO(struct ieee80211_local *local, u64 ret),
156 TP_ARGS(local, ret),
157 TP_STRUCT__entry(
158 LOCAL_ENTRY
159 __field(u64, ret)
160 ),
161 TP_fast_assign(
162 LOCAL_ASSIGN;
163 __entry->ret = ret;
164 ),
165 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
166);
167
Johannes Bergba99d932011-01-26 09:22:15 +0100168DEFINE_EVENT(local_only_evt, drv_start,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200169 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100170 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200171);
172
Ben Greeare3521142012-04-23 12:50:31 -0700173DEFINE_EVENT(local_u32_evt, drv_get_et_strings,
174 TP_PROTO(struct ieee80211_local *local, u32 sset),
175 TP_ARGS(local, sset)
176);
177
178DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count,
179 TP_PROTO(struct ieee80211_local *local, u32 sset),
180 TP_ARGS(local, sset)
181);
182
183DEFINE_EVENT(local_only_evt, drv_get_et_stats,
184 TP_PROTO(struct ieee80211_local *local),
185 TP_ARGS(local)
186);
187
Johannes Bergeecc4802011-05-04 15:37:29 +0200188DEFINE_EVENT(local_only_evt, drv_suspend,
189 TP_PROTO(struct ieee80211_local *local),
190 TP_ARGS(local)
191);
192
193DEFINE_EVENT(local_only_evt, drv_resume,
194 TP_PROTO(struct ieee80211_local *local),
195 TP_ARGS(local)
196);
197
Johannes Berg6d525632012-04-04 15:05:25 +0200198TRACE_EVENT(drv_set_wakeup,
199 TP_PROTO(struct ieee80211_local *local, bool enabled),
200 TP_ARGS(local, enabled),
201 TP_STRUCT__entry(
202 LOCAL_ENTRY
203 __field(bool, enabled)
204 ),
205 TP_fast_assign(
206 LOCAL_ASSIGN;
207 __entry->enabled = enabled;
208 ),
209 TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
210);
211
Johannes Bergba99d932011-01-26 09:22:15 +0100212DEFINE_EVENT(local_only_evt, drv_stop,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200213 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100214 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200215);
216
Luciano Coelho92ddc112011-05-09 14:40:06 +0300217DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200218 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200219 struct ieee80211_sub_if_data *sdata),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300220 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200221);
222
Johannes Berg34d4bc42010-08-27 12:35:58 +0200223TRACE_EVENT(drv_change_interface,
224 TP_PROTO(struct ieee80211_local *local,
225 struct ieee80211_sub_if_data *sdata,
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200226 enum nl80211_iftype type, bool p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200227
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200228 TP_ARGS(local, sdata, type, p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200229
230 TP_STRUCT__entry(
231 LOCAL_ENTRY
232 VIF_ENTRY
233 __field(u32, new_type)
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200234 __field(bool, new_p2p)
Johannes Berg34d4bc42010-08-27 12:35:58 +0200235 ),
236
237 TP_fast_assign(
238 LOCAL_ASSIGN;
239 VIF_ASSIGN;
240 __entry->new_type = type;
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200241 __entry->new_p2p = p2p;
Johannes Berg34d4bc42010-08-27 12:35:58 +0200242 ),
243
244 TP_printk(
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200245 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
246 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
247 __entry->new_p2p ? "/p2p" : ""
Johannes Berg34d4bc42010-08-27 12:35:58 +0200248 )
249);
250
Luciano Coelho92ddc112011-05-09 14:40:06 +0300251DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
252 TP_PROTO(struct ieee80211_local *local,
253 struct ieee80211_sub_if_data *sdata),
254 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200255);
256
257TRACE_EVENT(drv_config,
258 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200259 u32 changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200260
Johannes Berg4efc76b2010-06-10 10:56:20 +0200261 TP_ARGS(local, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200262
263 TP_STRUCT__entry(
264 LOCAL_ENTRY
265 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100266 __field(u32, flags)
267 __field(int, power_level)
268 __field(int, dynamic_ps_timeout)
269 __field(int, max_sleep_period)
270 __field(u16, listen_interval)
271 __field(u8, long_frame_max_tx_count)
272 __field(u8, short_frame_max_tx_count)
273 __field(int, center_freq)
274 __field(int, channel_type)
Johannes Berg0f782312009-12-01 13:37:02 +0100275 __field(int, smps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200276 ),
277
278 TP_fast_assign(
279 LOCAL_ASSIGN;
280 __entry->changed = changed;
Johannes Bergf911ab82009-11-25 19:07:20 +0100281 __entry->flags = local->hw.conf.flags;
282 __entry->power_level = local->hw.conf.power_level;
283 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
284 __entry->max_sleep_period = local->hw.conf.max_sleep_period;
285 __entry->listen_interval = local->hw.conf.listen_interval;
Johannes Berg3d01be72012-07-26 14:27:39 +0200286 __entry->long_frame_max_tx_count =
287 local->hw.conf.long_frame_max_tx_count;
288 __entry->short_frame_max_tx_count =
289 local->hw.conf.short_frame_max_tx_count;
290 __entry->center_freq = local->hw.conf.channel ?
291 local->hw.conf.channel->center_freq : 0;
Johannes Bergf911ab82009-11-25 19:07:20 +0100292 __entry->channel_type = local->hw.conf.channel_type;
Johannes Berg0f782312009-12-01 13:37:02 +0100293 __entry->smps = local->hw.conf.smps_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200294 ),
295
296 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200297 LOCAL_PR_FMT " ch:%#x freq:%d",
298 LOCAL_PR_ARG, __entry->changed, __entry->center_freq
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200299 )
300);
301
302TRACE_EVENT(drv_bss_info_changed,
303 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100304 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200305 struct ieee80211_bss_conf *info,
306 u32 changed),
307
Johannes Berg12375ef2009-11-25 20:30:31 +0100308 TP_ARGS(local, sdata, info, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200309
310 TP_STRUCT__entry(
311 LOCAL_ENTRY
312 VIF_ENTRY
313 __field(bool, assoc)
314 __field(u16, aid)
315 __field(bool, cts)
316 __field(bool, shortpre)
317 __field(bool, shortslot)
318 __field(u8, dtimper)
319 __field(u16, bcnint)
320 __field(u16, assoc_cap)
Johannes Berg8c358bc2012-05-22 22:13:05 +0200321 __field(u64, sync_tsf)
322 __field(u32, sync_device_ts)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200323 __field(u32, basic_rates)
324 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100325 __field(bool, enable_beacon)
326 __field(u16, ht_operation_mode)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200327 ),
328
329 TP_fast_assign(
330 LOCAL_ASSIGN;
331 VIF_ASSIGN;
332 __entry->changed = changed;
333 __entry->aid = info->aid;
334 __entry->assoc = info->assoc;
335 __entry->shortpre = info->use_short_preamble;
336 __entry->cts = info->use_cts_prot;
337 __entry->shortslot = info->use_short_slot;
338 __entry->dtimper = info->dtim_period;
339 __entry->bcnint = info->beacon_int;
340 __entry->assoc_cap = info->assoc_capability;
Johannes Berg8c358bc2012-05-22 22:13:05 +0200341 __entry->sync_tsf = info->sync_tsf;
342 __entry->sync_device_ts = info->sync_device_ts;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200343 __entry->basic_rates = info->basic_rates;
Johannes Bergf911ab82009-11-25 19:07:20 +0100344 __entry->enable_beacon = info->enable_beacon;
345 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200346 ),
347
348 TP_printk(
349 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
350 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
351 )
352);
353
Johannes Berg3ac64be2009-08-17 16:16:53 +0200354TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200355 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200356
Johannes Berg4efc76b2010-06-10 10:56:20 +0200357 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200358
359 TP_STRUCT__entry(
360 LOCAL_ENTRY
361 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200362 ),
363
364 TP_fast_assign(
365 LOCAL_ASSIGN;
366 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200367 ),
368
369 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200370 LOCAL_PR_FMT " prepare mc (%d)",
371 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200372 )
373);
374
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200375TRACE_EVENT(drv_configure_filter,
376 TP_PROTO(struct ieee80211_local *local,
377 unsigned int changed_flags,
378 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200379 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200380
Johannes Berg3ac64be2009-08-17 16:16:53 +0200381 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200382
383 TP_STRUCT__entry(
384 LOCAL_ENTRY
385 __field(unsigned int, changed)
386 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200387 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200388 ),
389
390 TP_fast_assign(
391 LOCAL_ASSIGN;
392 __entry->changed = changed_flags;
393 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200394 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200395 ),
396
397 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200398 LOCAL_PR_FMT " changed:%#x total:%#x",
399 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200400 )
401);
402
403TRACE_EVENT(drv_set_tim,
404 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200405 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200406
Johannes Berg4efc76b2010-06-10 10:56:20 +0200407 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200408
409 TP_STRUCT__entry(
410 LOCAL_ENTRY
411 STA_ENTRY
412 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200413 ),
414
415 TP_fast_assign(
416 LOCAL_ASSIGN;
417 STA_ASSIGN;
418 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200419 ),
420
421 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200422 LOCAL_PR_FMT STA_PR_FMT " set:%d",
423 LOCAL_PR_ARG, STA_PR_FMT, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200424 )
425);
426
427TRACE_EVENT(drv_set_key,
428 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100429 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200430 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200431 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200432
Johannes Berg4efc76b2010-06-10 10:56:20 +0200433 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200434
435 TP_STRUCT__entry(
436 LOCAL_ENTRY
437 VIF_ENTRY
438 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200439 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200440 __field(u8, hw_key_idx)
441 __field(u8, flags)
442 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200443 ),
444
445 TP_fast_assign(
446 LOCAL_ASSIGN;
447 VIF_ASSIGN;
448 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200449 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200450 __entry->flags = key->flags;
451 __entry->keyidx = key->keyidx;
452 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200453 ),
454
455 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200456 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
457 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200458 )
459);
460
461TRACE_EVENT(drv_update_tkip_key,
462 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100463 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200464 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100465 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200466
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100467 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200468
469 TP_STRUCT__entry(
470 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100471 VIF_ENTRY
472 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200473 __field(u32, iv32)
474 ),
475
476 TP_fast_assign(
477 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100478 VIF_ASSIGN;
479 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200480 __entry->iv32 = iv32;
481 ),
482
483 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100484 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
485 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200486 )
487);
488
Luciano Coelho79f460c2011-05-11 17:09:36 +0300489DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200490 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300491 struct ieee80211_sub_if_data *sdata),
492 TP_ARGS(local, sdata)
493);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200494
Eliad Pellerb8564392011-06-13 12:47:30 +0300495DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
496 TP_PROTO(struct ieee80211_local *local,
497 struct ieee80211_sub_if_data *sdata),
498 TP_ARGS(local, sdata)
499);
500
Luciano Coelho79f460c2011-05-11 17:09:36 +0300501DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
502 TP_PROTO(struct ieee80211_local *local,
503 struct ieee80211_sub_if_data *sdata),
504 TP_ARGS(local, sdata)
505);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200506
Luciano Coelho79f460c2011-05-11 17:09:36 +0300507DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
508 TP_PROTO(struct ieee80211_local *local,
509 struct ieee80211_sub_if_data *sdata),
510 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200511);
512
Johannes Bergba99d932011-01-26 09:22:15 +0100513DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200514 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100515 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200516);
517
Johannes Bergba99d932011-01-26 09:22:15 +0100518DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200519 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100520 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200521);
522
523TRACE_EVENT(drv_get_stats,
524 TP_PROTO(struct ieee80211_local *local,
525 struct ieee80211_low_level_stats *stats,
526 int ret),
527
528 TP_ARGS(local, stats, ret),
529
530 TP_STRUCT__entry(
531 LOCAL_ENTRY
532 __field(int, ret)
533 __field(unsigned int, ackfail)
534 __field(unsigned int, rtsfail)
535 __field(unsigned int, fcserr)
536 __field(unsigned int, rtssucc)
537 ),
538
539 TP_fast_assign(
540 LOCAL_ASSIGN;
541 __entry->ret = ret;
542 __entry->ackfail = stats->dot11ACKFailureCount;
543 __entry->rtsfail = stats->dot11RTSFailureCount;
544 __entry->fcserr = stats->dot11FCSErrorCount;
545 __entry->rtssucc = stats->dot11RTSSuccessCount;
546 ),
547
548 TP_printk(
549 LOCAL_PR_FMT " ret:%d",
550 LOCAL_PR_ARG, __entry->ret
551 )
552);
553
554TRACE_EVENT(drv_get_tkip_seq,
555 TP_PROTO(struct ieee80211_local *local,
556 u8 hw_key_idx, u32 *iv32, u16 *iv16),
557
558 TP_ARGS(local, hw_key_idx, iv32, iv16),
559
560 TP_STRUCT__entry(
561 LOCAL_ENTRY
562 __field(u8, hw_key_idx)
563 __field(u32, iv32)
564 __field(u16, iv16)
565 ),
566
567 TP_fast_assign(
568 LOCAL_ASSIGN;
569 __entry->hw_key_idx = hw_key_idx;
570 __entry->iv32 = *iv32;
571 __entry->iv16 = *iv16;
572 ),
573
574 TP_printk(
575 LOCAL_PR_FMT, LOCAL_PR_ARG
576 )
577);
578
Luciano Coelho92ddc112011-05-09 14:40:06 +0300579DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200580 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300581 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200582);
583
Luciano Coelho92ddc112011-05-09 14:40:06 +0300584DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200585 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300586 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200587);
588
Lukáš Turek310bc672009-12-21 22:50:48 +0100589TRACE_EVENT(drv_set_coverage_class,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200590 TP_PROTO(struct ieee80211_local *local, u8 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100591
Johannes Berg4efc76b2010-06-10 10:56:20 +0200592 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100593
594 TP_STRUCT__entry(
595 LOCAL_ENTRY
596 __field(u8, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100597 ),
598
599 TP_fast_assign(
600 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100601 __entry->value = value;
602 ),
603
604 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200605 LOCAL_PR_FMT " value:%d",
606 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100607 )
608);
609
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200610TRACE_EVENT(drv_sta_notify,
611 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100612 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200613 enum sta_notify_cmd cmd,
614 struct ieee80211_sta *sta),
615
Johannes Berg12375ef2009-11-25 20:30:31 +0100616 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200617
618 TP_STRUCT__entry(
619 LOCAL_ENTRY
620 VIF_ENTRY
621 STA_ENTRY
622 __field(u32, cmd)
623 ),
624
625 TP_fast_assign(
626 LOCAL_ASSIGN;
627 VIF_ASSIGN;
628 STA_ASSIGN;
629 __entry->cmd = cmd;
630 ),
631
632 TP_printk(
633 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
634 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
635 )
636);
637
Johannes Bergf09603a2012-01-20 13:55:21 +0100638TRACE_EVENT(drv_sta_state,
639 TP_PROTO(struct ieee80211_local *local,
640 struct ieee80211_sub_if_data *sdata,
641 struct ieee80211_sta *sta,
642 enum ieee80211_sta_state old_state,
643 enum ieee80211_sta_state new_state),
644
645 TP_ARGS(local, sdata, sta, old_state, new_state),
646
647 TP_STRUCT__entry(
648 LOCAL_ENTRY
649 VIF_ENTRY
650 STA_ENTRY
651 __field(u32, old_state)
652 __field(u32, new_state)
653 ),
654
655 TP_fast_assign(
656 LOCAL_ASSIGN;
657 VIF_ASSIGN;
658 STA_ASSIGN;
659 __entry->old_state = old_state;
660 __entry->new_state = new_state;
661 ),
662
663 TP_printk(
664 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
665 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
666 __entry->old_state, __entry->new_state
667 )
668);
669
Johannes Berg8f727ef2012-03-30 08:43:32 +0200670TRACE_EVENT(drv_sta_rc_update,
671 TP_PROTO(struct ieee80211_local *local,
672 struct ieee80211_sub_if_data *sdata,
673 struct ieee80211_sta *sta,
674 u32 changed),
675
676 TP_ARGS(local, sdata, sta, changed),
677
678 TP_STRUCT__entry(
679 LOCAL_ENTRY
680 VIF_ENTRY
681 STA_ENTRY
682 __field(u32, changed)
683 ),
684
685 TP_fast_assign(
686 LOCAL_ASSIGN;
687 VIF_ASSIGN;
688 STA_ASSIGN;
689 __entry->changed = changed;
690 ),
691
692 TP_printk(
693 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
694 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
695 )
696);
697
Johannes Berg34e89502010-02-03 13:59:58 +0100698TRACE_EVENT(drv_sta_add,
699 TP_PROTO(struct ieee80211_local *local,
700 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200701 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100702
Johannes Berg4efc76b2010-06-10 10:56:20 +0200703 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100704
705 TP_STRUCT__entry(
706 LOCAL_ENTRY
707 VIF_ENTRY
708 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100709 ),
710
711 TP_fast_assign(
712 LOCAL_ASSIGN;
713 VIF_ASSIGN;
714 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100715 ),
716
717 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200718 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
719 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100720 )
721);
722
723TRACE_EVENT(drv_sta_remove,
724 TP_PROTO(struct ieee80211_local *local,
725 struct ieee80211_sub_if_data *sdata,
726 struct ieee80211_sta *sta),
727
728 TP_ARGS(local, sdata, sta),
729
730 TP_STRUCT__entry(
731 LOCAL_ENTRY
732 VIF_ENTRY
733 STA_ENTRY
734 ),
735
736 TP_fast_assign(
737 LOCAL_ASSIGN;
738 VIF_ASSIGN;
739 STA_ASSIGN;
740 ),
741
742 TP_printk(
743 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
744 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
745 )
746);
747
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200748TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300749 TP_PROTO(struct ieee80211_local *local,
750 struct ieee80211_sub_if_data *sdata,
Johannes Berga3304b02012-03-28 11:04:24 +0200751 u16 ac, const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200752
Johannes Berga3304b02012-03-28 11:04:24 +0200753 TP_ARGS(local, sdata, ac, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200754
755 TP_STRUCT__entry(
756 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300757 VIF_ENTRY
Johannes Berga3304b02012-03-28 11:04:24 +0200758 __field(u16, ac)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200759 __field(u16, txop)
760 __field(u16, cw_min)
761 __field(u16, cw_max)
762 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300763 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200764 ),
765
766 TP_fast_assign(
767 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300768 VIF_ASSIGN;
Johannes Berga3304b02012-03-28 11:04:24 +0200769 __entry->ac = ac;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200770 __entry->txop = params->txop;
771 __entry->cw_max = params->cw_max;
772 __entry->cw_min = params->cw_min;
773 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300774 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200775 ),
776
777 TP_printk(
Johannes Berga3304b02012-03-28 11:04:24 +0200778 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
779 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200780 )
781);
782
Eliad Peller37a41b42011-09-21 14:06:11 +0300783DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
784 TP_PROTO(struct ieee80211_local *local,
785 struct ieee80211_sub_if_data *sdata),
786 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200787);
788
789TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +0300790 TP_PROTO(struct ieee80211_local *local,
791 struct ieee80211_sub_if_data *sdata,
792 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200793
Eliad Peller37a41b42011-09-21 14:06:11 +0300794 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200795
796 TP_STRUCT__entry(
797 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +0300798 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200799 __field(u64, tsf)
800 ),
801
802 TP_fast_assign(
803 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +0300804 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200805 __entry->tsf = tsf;
806 ),
807
808 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +0300809 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
810 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200811 )
812);
813
Eliad Peller37a41b42011-09-21 14:06:11 +0300814DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
815 TP_PROTO(struct ieee80211_local *local,
816 struct ieee80211_sub_if_data *sdata),
817 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200818);
819
Johannes Bergba99d932011-01-26 09:22:15 +0100820DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200821 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100822 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200823);
824
825TRACE_EVENT(drv_ampdu_action,
826 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100827 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200828 enum ieee80211_ampdu_mlme_action action,
829 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100830 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200831
Johannes Berg0b01f032011-01-18 13:51:05 +0100832 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200833
834 TP_STRUCT__entry(
835 LOCAL_ENTRY
836 STA_ENTRY
837 __field(u32, action)
838 __field(u16, tid)
839 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100840 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100841 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200842 ),
843
844 TP_fast_assign(
845 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100846 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200847 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200848 __entry->action = action;
849 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800850 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100851 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200852 ),
853
854 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100855 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
856 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
857 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200858 )
859);
Johannes Berga80f7c02009-12-23 13:15:32 +0100860
John W. Linvillec466d4e2010-06-29 14:51:23 -0400861TRACE_EVENT(drv_get_survey,
862 TP_PROTO(struct ieee80211_local *local, int idx,
863 struct survey_info *survey),
864
865 TP_ARGS(local, idx, survey),
866
867 TP_STRUCT__entry(
868 LOCAL_ENTRY
869 __field(int, idx)
870 ),
871
872 TP_fast_assign(
873 LOCAL_ASSIGN;
874 __entry->idx = idx;
875 ),
876
877 TP_printk(
878 LOCAL_PR_FMT " idx:%d",
879 LOCAL_PR_ARG, __entry->idx
880 )
881);
882
Johannes Berga80f7c02009-12-23 13:15:32 +0100883TRACE_EVENT(drv_flush,
884 TP_PROTO(struct ieee80211_local *local, bool drop),
885
886 TP_ARGS(local, drop),
887
888 TP_STRUCT__entry(
889 LOCAL_ENTRY
890 __field(bool, drop)
891 ),
892
893 TP_fast_assign(
894 LOCAL_ASSIGN;
895 __entry->drop = drop;
896 ),
897
898 TP_printk(
899 LOCAL_PR_FMT " drop:%d",
900 LOCAL_PR_ARG, __entry->drop
901 )
902);
Johannes Bergb5878a22010-04-07 16:48:40 +0200903
Johannes Berg5ce6e432010-05-11 16:20:57 +0200904TRACE_EVENT(drv_channel_switch,
905 TP_PROTO(struct ieee80211_local *local,
906 struct ieee80211_channel_switch *ch_switch),
907
908 TP_ARGS(local, ch_switch),
909
910 TP_STRUCT__entry(
911 LOCAL_ENTRY
912 __field(u64, timestamp)
913 __field(bool, block_tx)
914 __field(u16, freq)
915 __field(u8, count)
916 ),
917
918 TP_fast_assign(
919 LOCAL_ASSIGN;
920 __entry->timestamp = ch_switch->timestamp;
921 __entry->block_tx = ch_switch->block_tx;
922 __entry->freq = ch_switch->channel->center_freq;
923 __entry->count = ch_switch->count;
924 ),
925
926 TP_printk(
927 LOCAL_PR_FMT " new freq:%u count:%d",
928 LOCAL_PR_ARG, __entry->freq, __entry->count
929 )
930);
931
Bruno Randolf15d96752010-11-10 12:50:56 +0900932TRACE_EVENT(drv_set_antenna,
933 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
934
935 TP_ARGS(local, tx_ant, rx_ant, ret),
936
937 TP_STRUCT__entry(
938 LOCAL_ENTRY
939 __field(u32, tx_ant)
940 __field(u32, rx_ant)
941 __field(int, ret)
942 ),
943
944 TP_fast_assign(
945 LOCAL_ASSIGN;
946 __entry->tx_ant = tx_ant;
947 __entry->rx_ant = rx_ant;
948 __entry->ret = ret;
949 ),
950
951 TP_printk(
952 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
953 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
954 )
955);
956
957TRACE_EVENT(drv_get_antenna,
958 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
959
960 TP_ARGS(local, tx_ant, rx_ant, ret),
961
962 TP_STRUCT__entry(
963 LOCAL_ENTRY
964 __field(u32, tx_ant)
965 __field(u32, rx_ant)
966 __field(int, ret)
967 ),
968
969 TP_fast_assign(
970 LOCAL_ASSIGN;
971 __entry->tx_ant = tx_ant;
972 __entry->rx_ant = rx_ant;
973 __entry->ret = ret;
974 ),
975
976 TP_printk(
977 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
978 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
979 )
980);
981
Johannes Berg21f83582010-12-18 17:20:47 +0100982TRACE_EVENT(drv_remain_on_channel,
983 TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
984 enum nl80211_channel_type chantype, unsigned int duration),
985
986 TP_ARGS(local, chan, chantype, duration),
987
988 TP_STRUCT__entry(
989 LOCAL_ENTRY
990 __field(int, center_freq)
991 __field(int, channel_type)
992 __field(unsigned int, duration)
993 ),
994
995 TP_fast_assign(
996 LOCAL_ASSIGN;
997 __entry->center_freq = chan->center_freq;
998 __entry->channel_type = chantype;
999 __entry->duration = duration;
1000 ),
1001
1002 TP_printk(
1003 LOCAL_PR_FMT " freq:%dMHz duration:%dms",
1004 LOCAL_PR_ARG, __entry->center_freq, __entry->duration
1005 )
1006);
1007
Johannes Bergba99d932011-01-26 09:22:15 +01001008DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001009 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001010 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001011);
1012
Johannes Berg5f16a432011-02-25 15:36:57 +01001013TRACE_EVENT(drv_offchannel_tx,
1014 TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
1015 struct ieee80211_channel *chan,
1016 enum nl80211_channel_type channel_type,
1017 unsigned int wait),
1018
1019 TP_ARGS(local, skb, chan, channel_type, wait),
1020
1021 TP_STRUCT__entry(
1022 LOCAL_ENTRY
1023 __field(int, center_freq)
1024 __field(int, channel_type)
1025 __field(unsigned int, wait)
1026 ),
1027
1028 TP_fast_assign(
1029 LOCAL_ASSIGN;
1030 __entry->center_freq = chan->center_freq;
1031 __entry->channel_type = channel_type;
1032 __entry->wait = wait;
1033 ),
1034
1035 TP_printk(
1036 LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
1037 LOCAL_PR_ARG, __entry->center_freq, __entry->wait
1038 )
1039);
1040
John W. Linville38c09152011-03-07 16:19:18 -05001041TRACE_EVENT(drv_set_ringparam,
1042 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1043
1044 TP_ARGS(local, tx, rx),
1045
1046 TP_STRUCT__entry(
1047 LOCAL_ENTRY
1048 __field(u32, tx)
1049 __field(u32, rx)
1050 ),
1051
1052 TP_fast_assign(
1053 LOCAL_ASSIGN;
1054 __entry->tx = tx;
1055 __entry->rx = rx;
1056 ),
1057
1058 TP_printk(
1059 LOCAL_PR_FMT " tx:%d rx %d",
1060 LOCAL_PR_ARG, __entry->tx, __entry->rx
1061 )
1062);
1063
1064TRACE_EVENT(drv_get_ringparam,
1065 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1066 u32 *rx, u32 *rx_max),
1067
1068 TP_ARGS(local, tx, tx_max, rx, rx_max),
1069
1070 TP_STRUCT__entry(
1071 LOCAL_ENTRY
1072 __field(u32, tx)
1073 __field(u32, tx_max)
1074 __field(u32, rx)
1075 __field(u32, rx_max)
1076 ),
1077
1078 TP_fast_assign(
1079 LOCAL_ASSIGN;
1080 __entry->tx = *tx;
1081 __entry->tx_max = *tx_max;
1082 __entry->rx = *rx;
1083 __entry->rx_max = *rx_max;
1084 ),
1085
1086 TP_printk(
1087 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1088 LOCAL_PR_ARG,
1089 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1090 )
1091);
1092
Vivek Natarajane8306f92011-04-06 11:41:10 +05301093DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1094 TP_PROTO(struct ieee80211_local *local),
1095 TP_ARGS(local)
1096);
1097
Johannes Berg5f16a432011-02-25 15:36:57 +01001098DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1099 TP_PROTO(struct ieee80211_local *local),
1100 TP_ARGS(local)
1101);
1102
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301103TRACE_EVENT(drv_set_bitrate_mask,
1104 TP_PROTO(struct ieee80211_local *local,
1105 struct ieee80211_sub_if_data *sdata,
1106 const struct cfg80211_bitrate_mask *mask),
1107
1108 TP_ARGS(local, sdata, mask),
1109
1110 TP_STRUCT__entry(
1111 LOCAL_ENTRY
1112 VIF_ENTRY
1113 __field(u32, legacy_2g)
1114 __field(u32, legacy_5g)
1115 ),
1116
1117 TP_fast_assign(
1118 LOCAL_ASSIGN;
1119 VIF_ASSIGN;
1120 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1121 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1122 ),
1123
1124 TP_printk(
1125 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1126 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1127 )
1128);
1129
Johannes Bergc68f4b82011-07-05 16:35:41 +02001130TRACE_EVENT(drv_set_rekey_data,
1131 TP_PROTO(struct ieee80211_local *local,
1132 struct ieee80211_sub_if_data *sdata,
1133 struct cfg80211_gtk_rekey_data *data),
1134
1135 TP_ARGS(local, sdata, data),
1136
1137 TP_STRUCT__entry(
1138 LOCAL_ENTRY
1139 VIF_ENTRY
1140 __array(u8, kek, NL80211_KEK_LEN)
1141 __array(u8, kck, NL80211_KCK_LEN)
1142 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1143 ),
1144
1145 TP_fast_assign(
1146 LOCAL_ASSIGN;
1147 VIF_ASSIGN;
1148 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1149 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1150 memcpy(__entry->replay_ctr, data->replay_ctr,
1151 NL80211_REPLAY_CTR_LEN);
1152 ),
1153
1154 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1155 LOCAL_PR_ARG, VIF_PR_ARG)
1156);
1157
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001158TRACE_EVENT(drv_rssi_callback,
1159 TP_PROTO(struct ieee80211_local *local,
1160 enum ieee80211_rssi_event rssi_event),
1161
1162 TP_ARGS(local, rssi_event),
1163
1164 TP_STRUCT__entry(
1165 LOCAL_ENTRY
1166 __field(u32, rssi_event)
1167 ),
1168
1169 TP_fast_assign(
1170 LOCAL_ASSIGN;
1171 __entry->rssi_event = rssi_event;
1172 ),
1173
1174 TP_printk(
1175 LOCAL_PR_FMT " rssi_event:%d",
1176 LOCAL_PR_ARG, __entry->rssi_event
1177 )
1178);
1179
Johannes Berg40b96402011-09-29 16:04:38 +02001180DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001181 TP_PROTO(struct ieee80211_local *local,
1182 struct ieee80211_sta *sta,
1183 u16 tids, int num_frames,
1184 enum ieee80211_frame_release_type reason,
1185 bool more_data),
1186
1187 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1188
1189 TP_STRUCT__entry(
1190 LOCAL_ENTRY
1191 STA_ENTRY
1192 __field(u16, tids)
1193 __field(int, num_frames)
1194 __field(int, reason)
1195 __field(bool, more_data)
1196 ),
1197
1198 TP_fast_assign(
1199 LOCAL_ASSIGN;
1200 STA_ASSIGN;
1201 __entry->tids = tids;
1202 __entry->num_frames = num_frames;
1203 __entry->reason = reason;
1204 __entry->more_data = more_data;
1205 ),
1206
1207 TP_printk(
1208 LOCAL_PR_FMT STA_PR_FMT
1209 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1210 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1211 __entry->reason, __entry->more_data
1212 )
1213);
1214
Johannes Berg40b96402011-09-29 16:04:38 +02001215DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1216 TP_PROTO(struct ieee80211_local *local,
1217 struct ieee80211_sta *sta,
1218 u16 tids, int num_frames,
1219 enum ieee80211_frame_release_type reason,
1220 bool more_data),
1221
1222 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1223);
1224
1225DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1226 TP_PROTO(struct ieee80211_local *local,
1227 struct ieee80211_sta *sta,
1228 u16 tids, int num_frames,
1229 enum ieee80211_frame_release_type reason,
1230 bool more_data),
1231
1232 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1233);
1234
Victor Goldenshtein66572cf2012-06-21 10:56:46 +03001235TRACE_EVENT(drv_get_rssi,
1236 TP_PROTO(struct ieee80211_local *local, struct ieee80211_sta *sta,
1237 s8 rssi, int ret),
1238
1239 TP_ARGS(local, sta, rssi, ret),
1240
1241 TP_STRUCT__entry(
1242 LOCAL_ENTRY
1243 STA_ENTRY
1244 __field(s8, rssi)
1245 __field(int, ret)
1246 ),
1247
1248 TP_fast_assign(
1249 LOCAL_ASSIGN;
1250 STA_ASSIGN;
1251 __entry->rssi = rssi;
1252 __entry->ret = ret;
1253 ),
1254
1255 TP_printk(
1256 LOCAL_PR_FMT STA_PR_FMT " rssi:%d ret:%d",
1257 LOCAL_PR_ARG, STA_PR_ARG, __entry->rssi, __entry->ret
1258 )
1259);
1260
Johannes Berga1845fc2012-06-27 13:18:36 +02001261DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
1262 TP_PROTO(struct ieee80211_local *local,
1263 struct ieee80211_sub_if_data *sdata),
1264
1265 TP_ARGS(local, sdata)
1266);
1267
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001268DECLARE_EVENT_CLASS(local_chanctx,
1269 TP_PROTO(struct ieee80211_local *local,
1270 struct ieee80211_chanctx *ctx),
1271
1272 TP_ARGS(local, ctx),
1273
1274 TP_STRUCT__entry(
1275 LOCAL_ENTRY
1276 CHANCTX_ENTRY
1277 ),
1278
1279 TP_fast_assign(
1280 LOCAL_ASSIGN;
1281 CHANCTX_ASSIGN;
1282 ),
1283
1284 TP_printk(
1285 LOCAL_PR_FMT CHANCTX_PR_FMT,
1286 LOCAL_PR_ARG, CHANCTX_PR_ARG
1287 )
1288);
1289
1290DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1291 TP_PROTO(struct ieee80211_local *local,
1292 struct ieee80211_chanctx *ctx),
1293 TP_ARGS(local, ctx)
1294);
1295
1296DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1297 TP_PROTO(struct ieee80211_local *local,
1298 struct ieee80211_chanctx *ctx),
1299 TP_ARGS(local, ctx)
1300);
1301
1302TRACE_EVENT(drv_change_chanctx,
1303 TP_PROTO(struct ieee80211_local *local,
1304 struct ieee80211_chanctx *ctx,
1305 u32 changed),
1306
1307 TP_ARGS(local, ctx, changed),
1308
1309 TP_STRUCT__entry(
1310 LOCAL_ENTRY
1311 CHANCTX_ENTRY
1312 __field(u32, changed)
1313 ),
1314
1315 TP_fast_assign(
1316 LOCAL_ASSIGN;
1317 CHANCTX_ASSIGN;
1318 __entry->changed = changed;
1319 ),
1320
1321 TP_printk(
1322 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1323 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1324 )
1325);
1326
1327DECLARE_EVENT_CLASS(local_sdata_chanctx,
1328 TP_PROTO(struct ieee80211_local *local,
1329 struct ieee80211_sub_if_data *sdata,
1330 struct ieee80211_chanctx *ctx),
1331
1332 TP_ARGS(local, sdata, ctx),
1333
1334 TP_STRUCT__entry(
1335 LOCAL_ENTRY
1336 VIF_ENTRY
1337 CHANCTX_ENTRY
1338 ),
1339
1340 TP_fast_assign(
1341 LOCAL_ASSIGN;
1342 VIF_ASSIGN;
1343 CHANCTX_ASSIGN;
1344 ),
1345
1346 TP_printk(
1347 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
1348 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
1349 )
1350);
1351
1352DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1353 TP_PROTO(struct ieee80211_local *local,
1354 struct ieee80211_sub_if_data *sdata,
1355 struct ieee80211_chanctx *ctx),
1356 TP_ARGS(local, sdata, ctx)
1357);
1358
1359DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1360 TP_PROTO(struct ieee80211_local *local,
1361 struct ieee80211_sub_if_data *sdata,
1362 struct ieee80211_chanctx *ctx),
1363 TP_ARGS(local, sdata, ctx)
1364);
1365
Johannes Bergb5878a22010-04-07 16:48:40 +02001366/*
1367 * Tracing for API calls that drivers call.
1368 */
1369
1370TRACE_EVENT(api_start_tx_ba_session,
1371 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1372
1373 TP_ARGS(sta, tid),
1374
1375 TP_STRUCT__entry(
1376 STA_ENTRY
1377 __field(u16, tid)
1378 ),
1379
1380 TP_fast_assign(
1381 STA_ASSIGN;
1382 __entry->tid = tid;
1383 ),
1384
1385 TP_printk(
1386 STA_PR_FMT " tid:%d",
1387 STA_PR_ARG, __entry->tid
1388 )
1389);
1390
1391TRACE_EVENT(api_start_tx_ba_cb,
1392 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1393
1394 TP_ARGS(sdata, ra, tid),
1395
1396 TP_STRUCT__entry(
1397 VIF_ENTRY
1398 __array(u8, ra, ETH_ALEN)
1399 __field(u16, tid)
1400 ),
1401
1402 TP_fast_assign(
1403 VIF_ASSIGN;
1404 memcpy(__entry->ra, ra, ETH_ALEN);
1405 __entry->tid = tid;
1406 ),
1407
1408 TP_printk(
1409 VIF_PR_FMT " ra:%pM tid:%d",
1410 VIF_PR_ARG, __entry->ra, __entry->tid
1411 )
1412);
1413
1414TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001415 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001416
Johannes Berg6a8579d2010-05-27 14:41:07 +02001417 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001418
1419 TP_STRUCT__entry(
1420 STA_ENTRY
1421 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001422 ),
1423
1424 TP_fast_assign(
1425 STA_ASSIGN;
1426 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001427 ),
1428
1429 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001430 STA_PR_FMT " tid:%d",
1431 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001432 )
1433);
1434
1435TRACE_EVENT(api_stop_tx_ba_cb,
1436 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1437
1438 TP_ARGS(sdata, ra, tid),
1439
1440 TP_STRUCT__entry(
1441 VIF_ENTRY
1442 __array(u8, ra, ETH_ALEN)
1443 __field(u16, tid)
1444 ),
1445
1446 TP_fast_assign(
1447 VIF_ASSIGN;
1448 memcpy(__entry->ra, ra, ETH_ALEN);
1449 __entry->tid = tid;
1450 ),
1451
1452 TP_printk(
1453 VIF_PR_FMT " ra:%pM tid:%d",
1454 VIF_PR_ARG, __entry->ra, __entry->tid
1455 )
1456);
1457
Johannes Bergba99d932011-01-26 09:22:15 +01001458DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001459 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001460 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001461);
1462
1463TRACE_EVENT(api_beacon_loss,
1464 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1465
1466 TP_ARGS(sdata),
1467
1468 TP_STRUCT__entry(
1469 VIF_ENTRY
1470 ),
1471
1472 TP_fast_assign(
1473 VIF_ASSIGN;
1474 ),
1475
1476 TP_printk(
1477 VIF_PR_FMT,
1478 VIF_PR_ARG
1479 )
1480);
1481
1482TRACE_EVENT(api_connection_loss,
1483 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1484
1485 TP_ARGS(sdata),
1486
1487 TP_STRUCT__entry(
1488 VIF_ENTRY
1489 ),
1490
1491 TP_fast_assign(
1492 VIF_ASSIGN;
1493 ),
1494
1495 TP_printk(
1496 VIF_PR_FMT,
1497 VIF_PR_ARG
1498 )
1499);
1500
1501TRACE_EVENT(api_cqm_rssi_notify,
1502 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1503 enum nl80211_cqm_rssi_threshold_event rssi_event),
1504
1505 TP_ARGS(sdata, rssi_event),
1506
1507 TP_STRUCT__entry(
1508 VIF_ENTRY
1509 __field(u32, rssi_event)
1510 ),
1511
1512 TP_fast_assign(
1513 VIF_ASSIGN;
1514 __entry->rssi_event = rssi_event;
1515 ),
1516
1517 TP_printk(
1518 VIF_PR_FMT " event:%d",
1519 VIF_PR_ARG, __entry->rssi_event
1520 )
1521);
1522
1523TRACE_EVENT(api_scan_completed,
1524 TP_PROTO(struct ieee80211_local *local, bool aborted),
1525
1526 TP_ARGS(local, aborted),
1527
1528 TP_STRUCT__entry(
1529 LOCAL_ENTRY
1530 __field(bool, aborted)
1531 ),
1532
1533 TP_fast_assign(
1534 LOCAL_ASSIGN;
1535 __entry->aborted = aborted;
1536 ),
1537
1538 TP_printk(
1539 LOCAL_PR_FMT " aborted:%d",
1540 LOCAL_PR_ARG, __entry->aborted
1541 )
1542);
1543
Luciano Coelho79f460c2011-05-11 17:09:36 +03001544TRACE_EVENT(api_sched_scan_results,
1545 TP_PROTO(struct ieee80211_local *local),
1546
1547 TP_ARGS(local),
1548
1549 TP_STRUCT__entry(
1550 LOCAL_ENTRY
1551 ),
1552
1553 TP_fast_assign(
1554 LOCAL_ASSIGN;
1555 ),
1556
1557 TP_printk(
1558 LOCAL_PR_FMT, LOCAL_PR_ARG
1559 )
1560);
1561
1562TRACE_EVENT(api_sched_scan_stopped,
1563 TP_PROTO(struct ieee80211_local *local),
1564
1565 TP_ARGS(local),
1566
1567 TP_STRUCT__entry(
1568 LOCAL_ENTRY
1569 ),
1570
1571 TP_fast_assign(
1572 LOCAL_ASSIGN;
1573 ),
1574
1575 TP_printk(
1576 LOCAL_PR_FMT, LOCAL_PR_ARG
1577 )
1578);
1579
Johannes Bergb5878a22010-04-07 16:48:40 +02001580TRACE_EVENT(api_sta_block_awake,
1581 TP_PROTO(struct ieee80211_local *local,
1582 struct ieee80211_sta *sta, bool block),
1583
1584 TP_ARGS(local, sta, block),
1585
1586 TP_STRUCT__entry(
1587 LOCAL_ENTRY
1588 STA_ENTRY
1589 __field(bool, block)
1590 ),
1591
1592 TP_fast_assign(
1593 LOCAL_ASSIGN;
1594 STA_ASSIGN;
1595 __entry->block = block;
1596 ),
1597
1598 TP_printk(
1599 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1600 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
1601 )
1602);
1603
Johannes Berg5ce6e432010-05-11 16:20:57 +02001604TRACE_EVENT(api_chswitch_done,
1605 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1606
1607 TP_ARGS(sdata, success),
1608
1609 TP_STRUCT__entry(
1610 VIF_ENTRY
1611 __field(bool, success)
1612 ),
1613
1614 TP_fast_assign(
1615 VIF_ASSIGN;
1616 __entry->success = success;
1617 ),
1618
1619 TP_printk(
1620 VIF_PR_FMT " success=%d",
1621 VIF_PR_ARG, __entry->success
1622 )
1623);
1624
Johannes Bergba99d932011-01-26 09:22:15 +01001625DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001626 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001627 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001628);
1629
Johannes Bergba99d932011-01-26 09:22:15 +01001630DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001631 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001632 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001633);
1634
Johannes Bergc68f4b82011-07-05 16:35:41 +02001635TRACE_EVENT(api_gtk_rekey_notify,
1636 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1637 const u8 *bssid, const u8 *replay_ctr),
1638
1639 TP_ARGS(sdata, bssid, replay_ctr),
1640
1641 TP_STRUCT__entry(
1642 VIF_ENTRY
1643 __array(u8, bssid, ETH_ALEN)
1644 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1645 ),
1646
1647 TP_fast_assign(
1648 VIF_ASSIGN;
1649 memcpy(__entry->bssid, bssid, ETH_ALEN);
1650 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1651 ),
1652
1653 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1654);
1655
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001656TRACE_EVENT(api_enable_rssi_reports,
1657 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1658 int rssi_min_thold, int rssi_max_thold),
1659
1660 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1661
1662 TP_STRUCT__entry(
1663 VIF_ENTRY
1664 __field(int, rssi_min_thold)
1665 __field(int, rssi_max_thold)
1666 ),
1667
1668 TP_fast_assign(
1669 VIF_ASSIGN;
1670 __entry->rssi_min_thold = rssi_min_thold;
1671 __entry->rssi_max_thold = rssi_max_thold;
1672 ),
1673
1674 TP_printk(
1675 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
1676 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
1677 )
1678);
1679
Johannes Berg37fbd902011-09-29 16:04:39 +02001680TRACE_EVENT(api_eosp,
1681 TP_PROTO(struct ieee80211_local *local,
1682 struct ieee80211_sta *sta),
1683
1684 TP_ARGS(local, sta),
1685
1686 TP_STRUCT__entry(
1687 LOCAL_ENTRY
1688 STA_ENTRY
1689 ),
1690
1691 TP_fast_assign(
1692 LOCAL_ASSIGN;
1693 STA_ASSIGN;
1694 ),
1695
1696 TP_printk(
1697 LOCAL_PR_FMT STA_PR_FMT,
1698 LOCAL_PR_ARG, STA_PR_FMT
1699 )
1700);
1701
Johannes Bergb5878a22010-04-07 16:48:40 +02001702/*
1703 * Tracing for internal functions
1704 * (which may also be called in response to driver calls)
1705 */
1706
1707TRACE_EVENT(wake_queue,
1708 TP_PROTO(struct ieee80211_local *local, u16 queue,
1709 enum queue_stop_reason reason),
1710
1711 TP_ARGS(local, queue, reason),
1712
1713 TP_STRUCT__entry(
1714 LOCAL_ENTRY
1715 __field(u16, queue)
1716 __field(u32, reason)
1717 ),
1718
1719 TP_fast_assign(
1720 LOCAL_ASSIGN;
1721 __entry->queue = queue;
1722 __entry->reason = reason;
1723 ),
1724
1725 TP_printk(
1726 LOCAL_PR_FMT " queue:%d, reason:%d",
1727 LOCAL_PR_ARG, __entry->queue, __entry->reason
1728 )
1729);
1730
1731TRACE_EVENT(stop_queue,
1732 TP_PROTO(struct ieee80211_local *local, u16 queue,
1733 enum queue_stop_reason reason),
1734
1735 TP_ARGS(local, queue, reason),
1736
1737 TP_STRUCT__entry(
1738 LOCAL_ENTRY
1739 __field(u16, queue)
1740 __field(u32, reason)
1741 ),
1742
1743 TP_fast_assign(
1744 LOCAL_ASSIGN;
1745 __entry->queue = queue;
1746 __entry->reason = reason;
1747 ),
1748
1749 TP_printk(
1750 LOCAL_PR_FMT " queue:%d, reason:%d",
1751 LOCAL_PR_ARG, __entry->queue, __entry->reason
1752 )
1753);
Johannes Berg3fae0272012-06-22 13:36:25 +02001754
1755#ifdef CONFIG_MAC80211_MESSAGE_TRACING
1756#undef TRACE_SYSTEM
1757#define TRACE_SYSTEM mac80211_msg
1758
1759#define MAX_MSG_LEN 100
1760
1761DECLARE_EVENT_CLASS(mac80211_msg_event,
1762 TP_PROTO(struct va_format *vaf),
1763
1764 TP_ARGS(vaf),
1765
1766 TP_STRUCT__entry(
1767 __dynamic_array(char, msg, MAX_MSG_LEN)
1768 ),
1769
1770 TP_fast_assign(
1771 WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
1772 MAX_MSG_LEN, vaf->fmt,
1773 *vaf->va) >= MAX_MSG_LEN);
1774 ),
1775
1776 TP_printk("%s", __get_str(msg))
1777);
1778
1779DEFINE_EVENT(mac80211_msg_event, mac80211_info,
1780 TP_PROTO(struct va_format *vaf),
1781 TP_ARGS(vaf)
1782);
1783DEFINE_EVENT(mac80211_msg_event, mac80211_dbg,
1784 TP_PROTO(struct va_format *vaf),
1785 TP_ARGS(vaf)
1786);
1787DEFINE_EVENT(mac80211_msg_event, mac80211_err,
1788 TP_PROTO(struct va_format *vaf),
1789 TP_ARGS(vaf)
1790);
1791#endif
1792
Christian Lamparterf7428802009-07-19 23:21:07 +02001793#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001794
1795#undef TRACE_INCLUDE_PATH
1796#define TRACE_INCLUDE_PATH .
1797#undef TRACE_INCLUDE_FILE
Johannes Berg011ad0e2012-06-22 12:55:52 +02001798#define TRACE_INCLUDE_FILE trace
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001799#include <trace/define_trace.h>