blob: 21d6f5290a1c67883d004ab5c2215bd9ebdafc54 [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 Berg12375ef2009-11-25 20:30:31 +010027 __assign_str(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
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
Johannes Bergb5878a22010-04-07 16:48:40 +020031/*
32 * Tracing for driver callbacks.
33 */
34
Johannes Bergba99d932011-01-26 09:22:15 +010035DECLARE_EVENT_CLASS(local_only_evt,
Johannes Berg4efc76b2010-06-10 10:56:20 +020036 TP_PROTO(struct ieee80211_local *local),
37 TP_ARGS(local),
38 TP_STRUCT__entry(
39 LOCAL_ENTRY
40 ),
41 TP_fast_assign(
42 LOCAL_ASSIGN;
43 ),
44 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
45);
46
Luciano Coelho92ddc112011-05-09 14:40:06 +030047DECLARE_EVENT_CLASS(local_sdata_addr_evt,
48 TP_PROTO(struct ieee80211_local *local,
49 struct ieee80211_sub_if_data *sdata),
50 TP_ARGS(local, sdata),
51
52 TP_STRUCT__entry(
53 LOCAL_ENTRY
54 VIF_ENTRY
55 __array(char, addr, 6)
56 ),
57
58 TP_fast_assign(
59 LOCAL_ASSIGN;
60 VIF_ASSIGN;
61 memcpy(__entry->addr, sdata->vif.addr, 6);
62 ),
63
64 TP_printk(
65 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
66 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
67 )
68);
69
70DECLARE_EVENT_CLASS(local_u32_evt,
71 TP_PROTO(struct ieee80211_local *local, u32 value),
72 TP_ARGS(local, value),
73
74 TP_STRUCT__entry(
75 LOCAL_ENTRY
76 __field(u32, value)
77 ),
78
79 TP_fast_assign(
80 LOCAL_ASSIGN;
81 __entry->value = value;
82 ),
83
84 TP_printk(
85 LOCAL_PR_FMT " value:%d",
86 LOCAL_PR_ARG, __entry->value
87 )
88);
89
Luciano Coelho79f460c2011-05-11 17:09:36 +030090DECLARE_EVENT_CLASS(local_sdata_evt,
91 TP_PROTO(struct ieee80211_local *local,
92 struct ieee80211_sub_if_data *sdata),
93 TP_ARGS(local, sdata),
94
95 TP_STRUCT__entry(
96 LOCAL_ENTRY
97 VIF_ENTRY
98 ),
99
100 TP_fast_assign(
101 LOCAL_ASSIGN;
102 VIF_ASSIGN;
103 ),
104
105 TP_printk(
106 LOCAL_PR_FMT VIF_PR_FMT,
107 LOCAL_PR_ARG, VIF_PR_ARG
108 )
109);
110
Johannes Bergba99d932011-01-26 09:22:15 +0100111DEFINE_EVENT(local_only_evt, drv_return_void,
112 TP_PROTO(struct ieee80211_local *local),
113 TP_ARGS(local)
114);
115
Johannes Berg4efc76b2010-06-10 10:56:20 +0200116TRACE_EVENT(drv_return_int,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200117 TP_PROTO(struct ieee80211_local *local, int ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200118 TP_ARGS(local, ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200119 TP_STRUCT__entry(
120 LOCAL_ENTRY
121 __field(int, ret)
122 ),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200123 TP_fast_assign(
124 LOCAL_ASSIGN;
125 __entry->ret = ret;
126 ),
Johannes Berg4efc76b2010-06-10 10:56:20 +0200127 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
128);
129
Vivek Natarajane8306f92011-04-06 11:41:10 +0530130TRACE_EVENT(drv_return_bool,
131 TP_PROTO(struct ieee80211_local *local, bool ret),
132 TP_ARGS(local, ret),
133 TP_STRUCT__entry(
134 LOCAL_ENTRY
135 __field(bool, ret)
136 ),
137 TP_fast_assign(
138 LOCAL_ASSIGN;
139 __entry->ret = ret;
140 ),
141 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
142 "true" : "false")
143);
144
Johannes Berg4efc76b2010-06-10 10:56:20 +0200145TRACE_EVENT(drv_return_u64,
146 TP_PROTO(struct ieee80211_local *local, u64 ret),
147 TP_ARGS(local, ret),
148 TP_STRUCT__entry(
149 LOCAL_ENTRY
150 __field(u64, ret)
151 ),
152 TP_fast_assign(
153 LOCAL_ASSIGN;
154 __entry->ret = ret;
155 ),
156 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
157);
158
Johannes Bergba99d932011-01-26 09:22:15 +0100159DEFINE_EVENT(local_only_evt, drv_start,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200160 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100161 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200162);
163
Johannes Bergeecc4802011-05-04 15:37:29 +0200164DEFINE_EVENT(local_only_evt, drv_suspend,
165 TP_PROTO(struct ieee80211_local *local),
166 TP_ARGS(local)
167);
168
169DEFINE_EVENT(local_only_evt, drv_resume,
170 TP_PROTO(struct ieee80211_local *local),
171 TP_ARGS(local)
172);
173
Johannes Bergba99d932011-01-26 09:22:15 +0100174DEFINE_EVENT(local_only_evt, drv_stop,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200175 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100176 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200177);
178
Luciano Coelho92ddc112011-05-09 14:40:06 +0300179DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200180 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200181 struct ieee80211_sub_if_data *sdata),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300182 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200183);
184
Johannes Berg34d4bc42010-08-27 12:35:58 +0200185TRACE_EVENT(drv_change_interface,
186 TP_PROTO(struct ieee80211_local *local,
187 struct ieee80211_sub_if_data *sdata,
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200188 enum nl80211_iftype type, bool p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200189
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200190 TP_ARGS(local, sdata, type, p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200191
192 TP_STRUCT__entry(
193 LOCAL_ENTRY
194 VIF_ENTRY
195 __field(u32, new_type)
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200196 __field(bool, new_p2p)
Johannes Berg34d4bc42010-08-27 12:35:58 +0200197 ),
198
199 TP_fast_assign(
200 LOCAL_ASSIGN;
201 VIF_ASSIGN;
202 __entry->new_type = type;
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200203 __entry->new_p2p = p2p;
Johannes Berg34d4bc42010-08-27 12:35:58 +0200204 ),
205
206 TP_printk(
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200207 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
208 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
209 __entry->new_p2p ? "/p2p" : ""
Johannes Berg34d4bc42010-08-27 12:35:58 +0200210 )
211);
212
Luciano Coelho92ddc112011-05-09 14:40:06 +0300213DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
214 TP_PROTO(struct ieee80211_local *local,
215 struct ieee80211_sub_if_data *sdata),
216 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200217);
218
219TRACE_EVENT(drv_config,
220 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200221 u32 changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200222
Johannes Berg4efc76b2010-06-10 10:56:20 +0200223 TP_ARGS(local, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200224
225 TP_STRUCT__entry(
226 LOCAL_ENTRY
227 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100228 __field(u32, flags)
229 __field(int, power_level)
230 __field(int, dynamic_ps_timeout)
231 __field(int, max_sleep_period)
232 __field(u16, listen_interval)
233 __field(u8, long_frame_max_tx_count)
234 __field(u8, short_frame_max_tx_count)
235 __field(int, center_freq)
236 __field(int, channel_type)
Johannes Berg0f782312009-12-01 13:37:02 +0100237 __field(int, smps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200238 ),
239
240 TP_fast_assign(
241 LOCAL_ASSIGN;
242 __entry->changed = changed;
Johannes Bergf911ab82009-11-25 19:07:20 +0100243 __entry->flags = local->hw.conf.flags;
244 __entry->power_level = local->hw.conf.power_level;
245 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
246 __entry->max_sleep_period = local->hw.conf.max_sleep_period;
247 __entry->listen_interval = local->hw.conf.listen_interval;
248 __entry->long_frame_max_tx_count = local->hw.conf.long_frame_max_tx_count;
249 __entry->short_frame_max_tx_count = local->hw.conf.short_frame_max_tx_count;
250 __entry->center_freq = local->hw.conf.channel->center_freq;
251 __entry->channel_type = local->hw.conf.channel_type;
Johannes Berg0f782312009-12-01 13:37:02 +0100252 __entry->smps = local->hw.conf.smps_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200253 ),
254
255 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200256 LOCAL_PR_FMT " ch:%#x freq:%d",
257 LOCAL_PR_ARG, __entry->changed, __entry->center_freq
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200258 )
259);
260
261TRACE_EVENT(drv_bss_info_changed,
262 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100263 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200264 struct ieee80211_bss_conf *info,
265 u32 changed),
266
Johannes Berg12375ef2009-11-25 20:30:31 +0100267 TP_ARGS(local, sdata, info, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200268
269 TP_STRUCT__entry(
270 LOCAL_ENTRY
271 VIF_ENTRY
272 __field(bool, assoc)
273 __field(u16, aid)
274 __field(bool, cts)
275 __field(bool, shortpre)
276 __field(bool, shortslot)
277 __field(u8, dtimper)
278 __field(u16, bcnint)
279 __field(u16, assoc_cap)
280 __field(u64, timestamp)
281 __field(u32, basic_rates)
282 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100283 __field(bool, enable_beacon)
284 __field(u16, ht_operation_mode)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200285 ),
286
287 TP_fast_assign(
288 LOCAL_ASSIGN;
289 VIF_ASSIGN;
290 __entry->changed = changed;
291 __entry->aid = info->aid;
292 __entry->assoc = info->assoc;
293 __entry->shortpre = info->use_short_preamble;
294 __entry->cts = info->use_cts_prot;
295 __entry->shortslot = info->use_short_slot;
296 __entry->dtimper = info->dtim_period;
297 __entry->bcnint = info->beacon_int;
298 __entry->assoc_cap = info->assoc_capability;
Johannes Berge9ac0742012-03-13 14:29:30 +0100299 __entry->timestamp = info->last_tsf;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200300 __entry->basic_rates = info->basic_rates;
Johannes Bergf911ab82009-11-25 19:07:20 +0100301 __entry->enable_beacon = info->enable_beacon;
302 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200303 ),
304
305 TP_printk(
306 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
307 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
308 )
309);
310
Johannes Berg3ac64be2009-08-17 16:16:53 +0200311TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200312 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200313
Johannes Berg4efc76b2010-06-10 10:56:20 +0200314 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200315
316 TP_STRUCT__entry(
317 LOCAL_ENTRY
318 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200319 ),
320
321 TP_fast_assign(
322 LOCAL_ASSIGN;
323 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200324 ),
325
326 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200327 LOCAL_PR_FMT " prepare mc (%d)",
328 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200329 )
330);
331
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200332TRACE_EVENT(drv_configure_filter,
333 TP_PROTO(struct ieee80211_local *local,
334 unsigned int changed_flags,
335 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200336 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200337
Johannes Berg3ac64be2009-08-17 16:16:53 +0200338 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200339
340 TP_STRUCT__entry(
341 LOCAL_ENTRY
342 __field(unsigned int, changed)
343 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200344 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200345 ),
346
347 TP_fast_assign(
348 LOCAL_ASSIGN;
349 __entry->changed = changed_flags;
350 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200351 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200352 ),
353
354 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200355 LOCAL_PR_FMT " changed:%#x total:%#x",
356 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200357 )
358);
359
360TRACE_EVENT(drv_set_tim,
361 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200362 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200363
Johannes Berg4efc76b2010-06-10 10:56:20 +0200364 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200365
366 TP_STRUCT__entry(
367 LOCAL_ENTRY
368 STA_ENTRY
369 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200370 ),
371
372 TP_fast_assign(
373 LOCAL_ASSIGN;
374 STA_ASSIGN;
375 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200376 ),
377
378 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200379 LOCAL_PR_FMT STA_PR_FMT " set:%d",
380 LOCAL_PR_ARG, STA_PR_FMT, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200381 )
382);
383
384TRACE_EVENT(drv_set_key,
385 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100386 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200387 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200388 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200389
Johannes Berg4efc76b2010-06-10 10:56:20 +0200390 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200391
392 TP_STRUCT__entry(
393 LOCAL_ENTRY
394 VIF_ENTRY
395 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200396 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200397 __field(u8, hw_key_idx)
398 __field(u8, flags)
399 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200400 ),
401
402 TP_fast_assign(
403 LOCAL_ASSIGN;
404 VIF_ASSIGN;
405 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200406 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200407 __entry->flags = key->flags;
408 __entry->keyidx = key->keyidx;
409 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200410 ),
411
412 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200413 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
414 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200415 )
416);
417
418TRACE_EVENT(drv_update_tkip_key,
419 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100420 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200421 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100422 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200423
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100424 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200425
426 TP_STRUCT__entry(
427 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100428 VIF_ENTRY
429 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200430 __field(u32, iv32)
431 ),
432
433 TP_fast_assign(
434 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100435 VIF_ASSIGN;
436 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200437 __entry->iv32 = iv32;
438 ),
439
440 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100441 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
442 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200443 )
444);
445
Luciano Coelho79f460c2011-05-11 17:09:36 +0300446DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200447 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300448 struct ieee80211_sub_if_data *sdata),
449 TP_ARGS(local, sdata)
450);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200451
Eliad Pellerb8564392011-06-13 12:47:30 +0300452DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
453 TP_PROTO(struct ieee80211_local *local,
454 struct ieee80211_sub_if_data *sdata),
455 TP_ARGS(local, sdata)
456);
457
Luciano Coelho79f460c2011-05-11 17:09:36 +0300458DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
459 TP_PROTO(struct ieee80211_local *local,
460 struct ieee80211_sub_if_data *sdata),
461 TP_ARGS(local, sdata)
462);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200463
Luciano Coelho79f460c2011-05-11 17:09:36 +0300464DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
465 TP_PROTO(struct ieee80211_local *local,
466 struct ieee80211_sub_if_data *sdata),
467 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200468);
469
Johannes Bergba99d932011-01-26 09:22:15 +0100470DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200471 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100472 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200473);
474
Johannes Bergba99d932011-01-26 09:22:15 +0100475DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200476 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100477 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200478);
479
480TRACE_EVENT(drv_get_stats,
481 TP_PROTO(struct ieee80211_local *local,
482 struct ieee80211_low_level_stats *stats,
483 int ret),
484
485 TP_ARGS(local, stats, ret),
486
487 TP_STRUCT__entry(
488 LOCAL_ENTRY
489 __field(int, ret)
490 __field(unsigned int, ackfail)
491 __field(unsigned int, rtsfail)
492 __field(unsigned int, fcserr)
493 __field(unsigned int, rtssucc)
494 ),
495
496 TP_fast_assign(
497 LOCAL_ASSIGN;
498 __entry->ret = ret;
499 __entry->ackfail = stats->dot11ACKFailureCount;
500 __entry->rtsfail = stats->dot11RTSFailureCount;
501 __entry->fcserr = stats->dot11FCSErrorCount;
502 __entry->rtssucc = stats->dot11RTSSuccessCount;
503 ),
504
505 TP_printk(
506 LOCAL_PR_FMT " ret:%d",
507 LOCAL_PR_ARG, __entry->ret
508 )
509);
510
511TRACE_EVENT(drv_get_tkip_seq,
512 TP_PROTO(struct ieee80211_local *local,
513 u8 hw_key_idx, u32 *iv32, u16 *iv16),
514
515 TP_ARGS(local, hw_key_idx, iv32, iv16),
516
517 TP_STRUCT__entry(
518 LOCAL_ENTRY
519 __field(u8, hw_key_idx)
520 __field(u32, iv32)
521 __field(u16, iv16)
522 ),
523
524 TP_fast_assign(
525 LOCAL_ASSIGN;
526 __entry->hw_key_idx = hw_key_idx;
527 __entry->iv32 = *iv32;
528 __entry->iv16 = *iv16;
529 ),
530
531 TP_printk(
532 LOCAL_PR_FMT, LOCAL_PR_ARG
533 )
534);
535
Luciano Coelho92ddc112011-05-09 14:40:06 +0300536DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200537 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300538 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200539);
540
Luciano Coelho92ddc112011-05-09 14:40:06 +0300541DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200542 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300543 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200544);
545
Lukáš Turek310bc672009-12-21 22:50:48 +0100546TRACE_EVENT(drv_set_coverage_class,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200547 TP_PROTO(struct ieee80211_local *local, u8 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100548
Johannes Berg4efc76b2010-06-10 10:56:20 +0200549 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100550
551 TP_STRUCT__entry(
552 LOCAL_ENTRY
553 __field(u8, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100554 ),
555
556 TP_fast_assign(
557 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100558 __entry->value = value;
559 ),
560
561 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200562 LOCAL_PR_FMT " value:%d",
563 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100564 )
565);
566
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200567TRACE_EVENT(drv_sta_notify,
568 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100569 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200570 enum sta_notify_cmd cmd,
571 struct ieee80211_sta *sta),
572
Johannes Berg12375ef2009-11-25 20:30:31 +0100573 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200574
575 TP_STRUCT__entry(
576 LOCAL_ENTRY
577 VIF_ENTRY
578 STA_ENTRY
579 __field(u32, cmd)
580 ),
581
582 TP_fast_assign(
583 LOCAL_ASSIGN;
584 VIF_ASSIGN;
585 STA_ASSIGN;
586 __entry->cmd = cmd;
587 ),
588
589 TP_printk(
590 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
591 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
592 )
593);
594
Johannes Bergf09603a2012-01-20 13:55:21 +0100595TRACE_EVENT(drv_sta_state,
596 TP_PROTO(struct ieee80211_local *local,
597 struct ieee80211_sub_if_data *sdata,
598 struct ieee80211_sta *sta,
599 enum ieee80211_sta_state old_state,
600 enum ieee80211_sta_state new_state),
601
602 TP_ARGS(local, sdata, sta, old_state, new_state),
603
604 TP_STRUCT__entry(
605 LOCAL_ENTRY
606 VIF_ENTRY
607 STA_ENTRY
608 __field(u32, old_state)
609 __field(u32, new_state)
610 ),
611
612 TP_fast_assign(
613 LOCAL_ASSIGN;
614 VIF_ASSIGN;
615 STA_ASSIGN;
616 __entry->old_state = old_state;
617 __entry->new_state = new_state;
618 ),
619
620 TP_printk(
621 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
622 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
623 __entry->old_state, __entry->new_state
624 )
625);
626
Johannes Berg34e89502010-02-03 13:59:58 +0100627TRACE_EVENT(drv_sta_add,
628 TP_PROTO(struct ieee80211_local *local,
629 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200630 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100631
Johannes Berg4efc76b2010-06-10 10:56:20 +0200632 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100633
634 TP_STRUCT__entry(
635 LOCAL_ENTRY
636 VIF_ENTRY
637 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100638 ),
639
640 TP_fast_assign(
641 LOCAL_ASSIGN;
642 VIF_ASSIGN;
643 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100644 ),
645
646 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200647 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
648 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100649 )
650);
651
652TRACE_EVENT(drv_sta_remove,
653 TP_PROTO(struct ieee80211_local *local,
654 struct ieee80211_sub_if_data *sdata,
655 struct ieee80211_sta *sta),
656
657 TP_ARGS(local, sdata, sta),
658
659 TP_STRUCT__entry(
660 LOCAL_ENTRY
661 VIF_ENTRY
662 STA_ENTRY
663 ),
664
665 TP_fast_assign(
666 LOCAL_ASSIGN;
667 VIF_ASSIGN;
668 STA_ASSIGN;
669 ),
670
671 TP_printk(
672 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
673 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
674 )
675);
676
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200677TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300678 TP_PROTO(struct ieee80211_local *local,
679 struct ieee80211_sub_if_data *sdata,
680 u16 queue,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200681 const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200682
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300683 TP_ARGS(local, sdata, queue, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200684
685 TP_STRUCT__entry(
686 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300687 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200688 __field(u16, queue)
689 __field(u16, txop)
690 __field(u16, cw_min)
691 __field(u16, cw_max)
692 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300693 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200694 ),
695
696 TP_fast_assign(
697 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300698 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200699 __entry->queue = queue;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200700 __entry->txop = params->txop;
701 __entry->cw_max = params->cw_max;
702 __entry->cw_min = params->cw_min;
703 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300704 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200705 ),
706
707 TP_printk(
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300708 LOCAL_PR_FMT VIF_PR_FMT " queue:%d",
709 LOCAL_PR_ARG, VIF_PR_ARG, __entry->queue
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200710 )
711);
712
Eliad Peller37a41b42011-09-21 14:06:11 +0300713DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
714 TP_PROTO(struct ieee80211_local *local,
715 struct ieee80211_sub_if_data *sdata),
716 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200717);
718
719TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +0300720 TP_PROTO(struct ieee80211_local *local,
721 struct ieee80211_sub_if_data *sdata,
722 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200723
Eliad Peller37a41b42011-09-21 14:06:11 +0300724 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200725
726 TP_STRUCT__entry(
727 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +0300728 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200729 __field(u64, tsf)
730 ),
731
732 TP_fast_assign(
733 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +0300734 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200735 __entry->tsf = tsf;
736 ),
737
738 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +0300739 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
740 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200741 )
742);
743
Eliad Peller37a41b42011-09-21 14:06:11 +0300744DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
745 TP_PROTO(struct ieee80211_local *local,
746 struct ieee80211_sub_if_data *sdata),
747 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200748);
749
Johannes Bergba99d932011-01-26 09:22:15 +0100750DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200751 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100752 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200753);
754
755TRACE_EVENT(drv_ampdu_action,
756 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100757 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200758 enum ieee80211_ampdu_mlme_action action,
759 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100760 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200761
Johannes Berg0b01f032011-01-18 13:51:05 +0100762 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200763
764 TP_STRUCT__entry(
765 LOCAL_ENTRY
766 STA_ENTRY
767 __field(u32, action)
768 __field(u16, tid)
769 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100770 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100771 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200772 ),
773
774 TP_fast_assign(
775 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100776 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200777 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200778 __entry->action = action;
779 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800780 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100781 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200782 ),
783
784 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100785 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
786 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
787 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200788 )
789);
Johannes Berga80f7c02009-12-23 13:15:32 +0100790
John W. Linvillec466d4e2010-06-29 14:51:23 -0400791TRACE_EVENT(drv_get_survey,
792 TP_PROTO(struct ieee80211_local *local, int idx,
793 struct survey_info *survey),
794
795 TP_ARGS(local, idx, survey),
796
797 TP_STRUCT__entry(
798 LOCAL_ENTRY
799 __field(int, idx)
800 ),
801
802 TP_fast_assign(
803 LOCAL_ASSIGN;
804 __entry->idx = idx;
805 ),
806
807 TP_printk(
808 LOCAL_PR_FMT " idx:%d",
809 LOCAL_PR_ARG, __entry->idx
810 )
811);
812
Johannes Berga80f7c02009-12-23 13:15:32 +0100813TRACE_EVENT(drv_flush,
814 TP_PROTO(struct ieee80211_local *local, bool drop),
815
816 TP_ARGS(local, drop),
817
818 TP_STRUCT__entry(
819 LOCAL_ENTRY
820 __field(bool, drop)
821 ),
822
823 TP_fast_assign(
824 LOCAL_ASSIGN;
825 __entry->drop = drop;
826 ),
827
828 TP_printk(
829 LOCAL_PR_FMT " drop:%d",
830 LOCAL_PR_ARG, __entry->drop
831 )
832);
Johannes Bergb5878a22010-04-07 16:48:40 +0200833
Johannes Berg5ce6e432010-05-11 16:20:57 +0200834TRACE_EVENT(drv_channel_switch,
835 TP_PROTO(struct ieee80211_local *local,
836 struct ieee80211_channel_switch *ch_switch),
837
838 TP_ARGS(local, ch_switch),
839
840 TP_STRUCT__entry(
841 LOCAL_ENTRY
842 __field(u64, timestamp)
843 __field(bool, block_tx)
844 __field(u16, freq)
845 __field(u8, count)
846 ),
847
848 TP_fast_assign(
849 LOCAL_ASSIGN;
850 __entry->timestamp = ch_switch->timestamp;
851 __entry->block_tx = ch_switch->block_tx;
852 __entry->freq = ch_switch->channel->center_freq;
853 __entry->count = ch_switch->count;
854 ),
855
856 TP_printk(
857 LOCAL_PR_FMT " new freq:%u count:%d",
858 LOCAL_PR_ARG, __entry->freq, __entry->count
859 )
860);
861
Bruno Randolf15d96752010-11-10 12:50:56 +0900862TRACE_EVENT(drv_set_antenna,
863 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
864
865 TP_ARGS(local, tx_ant, rx_ant, ret),
866
867 TP_STRUCT__entry(
868 LOCAL_ENTRY
869 __field(u32, tx_ant)
870 __field(u32, rx_ant)
871 __field(int, ret)
872 ),
873
874 TP_fast_assign(
875 LOCAL_ASSIGN;
876 __entry->tx_ant = tx_ant;
877 __entry->rx_ant = rx_ant;
878 __entry->ret = ret;
879 ),
880
881 TP_printk(
882 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
883 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
884 )
885);
886
887TRACE_EVENT(drv_get_antenna,
888 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
889
890 TP_ARGS(local, tx_ant, rx_ant, ret),
891
892 TP_STRUCT__entry(
893 LOCAL_ENTRY
894 __field(u32, tx_ant)
895 __field(u32, rx_ant)
896 __field(int, ret)
897 ),
898
899 TP_fast_assign(
900 LOCAL_ASSIGN;
901 __entry->tx_ant = tx_ant;
902 __entry->rx_ant = rx_ant;
903 __entry->ret = ret;
904 ),
905
906 TP_printk(
907 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
908 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
909 )
910);
911
Johannes Berg21f83582010-12-18 17:20:47 +0100912TRACE_EVENT(drv_remain_on_channel,
913 TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
914 enum nl80211_channel_type chantype, unsigned int duration),
915
916 TP_ARGS(local, chan, chantype, duration),
917
918 TP_STRUCT__entry(
919 LOCAL_ENTRY
920 __field(int, center_freq)
921 __field(int, channel_type)
922 __field(unsigned int, duration)
923 ),
924
925 TP_fast_assign(
926 LOCAL_ASSIGN;
927 __entry->center_freq = chan->center_freq;
928 __entry->channel_type = chantype;
929 __entry->duration = duration;
930 ),
931
932 TP_printk(
933 LOCAL_PR_FMT " freq:%dMHz duration:%dms",
934 LOCAL_PR_ARG, __entry->center_freq, __entry->duration
935 )
936);
937
Johannes Bergba99d932011-01-26 09:22:15 +0100938DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +0100939 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100940 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +0100941);
942
Johannes Berg5f16a432011-02-25 15:36:57 +0100943TRACE_EVENT(drv_offchannel_tx,
944 TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
945 struct ieee80211_channel *chan,
946 enum nl80211_channel_type channel_type,
947 unsigned int wait),
948
949 TP_ARGS(local, skb, chan, channel_type, wait),
950
951 TP_STRUCT__entry(
952 LOCAL_ENTRY
953 __field(int, center_freq)
954 __field(int, channel_type)
955 __field(unsigned int, wait)
956 ),
957
958 TP_fast_assign(
959 LOCAL_ASSIGN;
960 __entry->center_freq = chan->center_freq;
961 __entry->channel_type = channel_type;
962 __entry->wait = wait;
963 ),
964
965 TP_printk(
966 LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
967 LOCAL_PR_ARG, __entry->center_freq, __entry->wait
968 )
969);
970
John W. Linville38c09152011-03-07 16:19:18 -0500971TRACE_EVENT(drv_set_ringparam,
972 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
973
974 TP_ARGS(local, tx, rx),
975
976 TP_STRUCT__entry(
977 LOCAL_ENTRY
978 __field(u32, tx)
979 __field(u32, rx)
980 ),
981
982 TP_fast_assign(
983 LOCAL_ASSIGN;
984 __entry->tx = tx;
985 __entry->rx = rx;
986 ),
987
988 TP_printk(
989 LOCAL_PR_FMT " tx:%d rx %d",
990 LOCAL_PR_ARG, __entry->tx, __entry->rx
991 )
992);
993
994TRACE_EVENT(drv_get_ringparam,
995 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
996 u32 *rx, u32 *rx_max),
997
998 TP_ARGS(local, tx, tx_max, rx, rx_max),
999
1000 TP_STRUCT__entry(
1001 LOCAL_ENTRY
1002 __field(u32, tx)
1003 __field(u32, tx_max)
1004 __field(u32, rx)
1005 __field(u32, rx_max)
1006 ),
1007
1008 TP_fast_assign(
1009 LOCAL_ASSIGN;
1010 __entry->tx = *tx;
1011 __entry->tx_max = *tx_max;
1012 __entry->rx = *rx;
1013 __entry->rx_max = *rx_max;
1014 ),
1015
1016 TP_printk(
1017 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1018 LOCAL_PR_ARG,
1019 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1020 )
1021);
1022
Vivek Natarajane8306f92011-04-06 11:41:10 +05301023DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1024 TP_PROTO(struct ieee80211_local *local),
1025 TP_ARGS(local)
1026);
1027
Johannes Berg5f16a432011-02-25 15:36:57 +01001028DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1029 TP_PROTO(struct ieee80211_local *local),
1030 TP_ARGS(local)
1031);
1032
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301033TRACE_EVENT(drv_set_bitrate_mask,
1034 TP_PROTO(struct ieee80211_local *local,
1035 struct ieee80211_sub_if_data *sdata,
1036 const struct cfg80211_bitrate_mask *mask),
1037
1038 TP_ARGS(local, sdata, mask),
1039
1040 TP_STRUCT__entry(
1041 LOCAL_ENTRY
1042 VIF_ENTRY
1043 __field(u32, legacy_2g)
1044 __field(u32, legacy_5g)
1045 ),
1046
1047 TP_fast_assign(
1048 LOCAL_ASSIGN;
1049 VIF_ASSIGN;
1050 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1051 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1052 ),
1053
1054 TP_printk(
1055 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1056 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1057 )
1058);
1059
Johannes Bergc68f4b82011-07-05 16:35:41 +02001060TRACE_EVENT(drv_set_rekey_data,
1061 TP_PROTO(struct ieee80211_local *local,
1062 struct ieee80211_sub_if_data *sdata,
1063 struct cfg80211_gtk_rekey_data *data),
1064
1065 TP_ARGS(local, sdata, data),
1066
1067 TP_STRUCT__entry(
1068 LOCAL_ENTRY
1069 VIF_ENTRY
1070 __array(u8, kek, NL80211_KEK_LEN)
1071 __array(u8, kck, NL80211_KCK_LEN)
1072 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1073 ),
1074
1075 TP_fast_assign(
1076 LOCAL_ASSIGN;
1077 VIF_ASSIGN;
1078 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1079 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1080 memcpy(__entry->replay_ctr, data->replay_ctr,
1081 NL80211_REPLAY_CTR_LEN);
1082 ),
1083
1084 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1085 LOCAL_PR_ARG, VIF_PR_ARG)
1086);
1087
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001088TRACE_EVENT(drv_rssi_callback,
1089 TP_PROTO(struct ieee80211_local *local,
1090 enum ieee80211_rssi_event rssi_event),
1091
1092 TP_ARGS(local, rssi_event),
1093
1094 TP_STRUCT__entry(
1095 LOCAL_ENTRY
1096 __field(u32, rssi_event)
1097 ),
1098
1099 TP_fast_assign(
1100 LOCAL_ASSIGN;
1101 __entry->rssi_event = rssi_event;
1102 ),
1103
1104 TP_printk(
1105 LOCAL_PR_FMT " rssi_event:%d",
1106 LOCAL_PR_ARG, __entry->rssi_event
1107 )
1108);
1109
Johannes Berg40b96402011-09-29 16:04:38 +02001110DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001111 TP_PROTO(struct ieee80211_local *local,
1112 struct ieee80211_sta *sta,
1113 u16 tids, int num_frames,
1114 enum ieee80211_frame_release_type reason,
1115 bool more_data),
1116
1117 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1118
1119 TP_STRUCT__entry(
1120 LOCAL_ENTRY
1121 STA_ENTRY
1122 __field(u16, tids)
1123 __field(int, num_frames)
1124 __field(int, reason)
1125 __field(bool, more_data)
1126 ),
1127
1128 TP_fast_assign(
1129 LOCAL_ASSIGN;
1130 STA_ASSIGN;
1131 __entry->tids = tids;
1132 __entry->num_frames = num_frames;
1133 __entry->reason = reason;
1134 __entry->more_data = more_data;
1135 ),
1136
1137 TP_printk(
1138 LOCAL_PR_FMT STA_PR_FMT
1139 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1140 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1141 __entry->reason, __entry->more_data
1142 )
1143);
1144
Johannes Berg40b96402011-09-29 16:04:38 +02001145DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1146 TP_PROTO(struct ieee80211_local *local,
1147 struct ieee80211_sta *sta,
1148 u16 tids, int num_frames,
1149 enum ieee80211_frame_release_type reason,
1150 bool more_data),
1151
1152 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1153);
1154
1155DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1156 TP_PROTO(struct ieee80211_local *local,
1157 struct ieee80211_sta *sta,
1158 u16 tids, int num_frames,
1159 enum ieee80211_frame_release_type reason,
1160 bool more_data),
1161
1162 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1163);
1164
Johannes Bergb5878a22010-04-07 16:48:40 +02001165/*
1166 * Tracing for API calls that drivers call.
1167 */
1168
1169TRACE_EVENT(api_start_tx_ba_session,
1170 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1171
1172 TP_ARGS(sta, tid),
1173
1174 TP_STRUCT__entry(
1175 STA_ENTRY
1176 __field(u16, tid)
1177 ),
1178
1179 TP_fast_assign(
1180 STA_ASSIGN;
1181 __entry->tid = tid;
1182 ),
1183
1184 TP_printk(
1185 STA_PR_FMT " tid:%d",
1186 STA_PR_ARG, __entry->tid
1187 )
1188);
1189
1190TRACE_EVENT(api_start_tx_ba_cb,
1191 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1192
1193 TP_ARGS(sdata, ra, tid),
1194
1195 TP_STRUCT__entry(
1196 VIF_ENTRY
1197 __array(u8, ra, ETH_ALEN)
1198 __field(u16, tid)
1199 ),
1200
1201 TP_fast_assign(
1202 VIF_ASSIGN;
1203 memcpy(__entry->ra, ra, ETH_ALEN);
1204 __entry->tid = tid;
1205 ),
1206
1207 TP_printk(
1208 VIF_PR_FMT " ra:%pM tid:%d",
1209 VIF_PR_ARG, __entry->ra, __entry->tid
1210 )
1211);
1212
1213TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001214 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001215
Johannes Berg6a8579d2010-05-27 14:41:07 +02001216 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001217
1218 TP_STRUCT__entry(
1219 STA_ENTRY
1220 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001221 ),
1222
1223 TP_fast_assign(
1224 STA_ASSIGN;
1225 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001226 ),
1227
1228 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001229 STA_PR_FMT " tid:%d",
1230 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001231 )
1232);
1233
1234TRACE_EVENT(api_stop_tx_ba_cb,
1235 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1236
1237 TP_ARGS(sdata, ra, tid),
1238
1239 TP_STRUCT__entry(
1240 VIF_ENTRY
1241 __array(u8, ra, ETH_ALEN)
1242 __field(u16, tid)
1243 ),
1244
1245 TP_fast_assign(
1246 VIF_ASSIGN;
1247 memcpy(__entry->ra, ra, ETH_ALEN);
1248 __entry->tid = tid;
1249 ),
1250
1251 TP_printk(
1252 VIF_PR_FMT " ra:%pM tid:%d",
1253 VIF_PR_ARG, __entry->ra, __entry->tid
1254 )
1255);
1256
Johannes Bergba99d932011-01-26 09:22:15 +01001257DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001258 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001259 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001260);
1261
1262TRACE_EVENT(api_beacon_loss,
1263 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1264
1265 TP_ARGS(sdata),
1266
1267 TP_STRUCT__entry(
1268 VIF_ENTRY
1269 ),
1270
1271 TP_fast_assign(
1272 VIF_ASSIGN;
1273 ),
1274
1275 TP_printk(
1276 VIF_PR_FMT,
1277 VIF_PR_ARG
1278 )
1279);
1280
1281TRACE_EVENT(api_connection_loss,
1282 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1283
1284 TP_ARGS(sdata),
1285
1286 TP_STRUCT__entry(
1287 VIF_ENTRY
1288 ),
1289
1290 TP_fast_assign(
1291 VIF_ASSIGN;
1292 ),
1293
1294 TP_printk(
1295 VIF_PR_FMT,
1296 VIF_PR_ARG
1297 )
1298);
1299
1300TRACE_EVENT(api_cqm_rssi_notify,
1301 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1302 enum nl80211_cqm_rssi_threshold_event rssi_event),
1303
1304 TP_ARGS(sdata, rssi_event),
1305
1306 TP_STRUCT__entry(
1307 VIF_ENTRY
1308 __field(u32, rssi_event)
1309 ),
1310
1311 TP_fast_assign(
1312 VIF_ASSIGN;
1313 __entry->rssi_event = rssi_event;
1314 ),
1315
1316 TP_printk(
1317 VIF_PR_FMT " event:%d",
1318 VIF_PR_ARG, __entry->rssi_event
1319 )
1320);
1321
1322TRACE_EVENT(api_scan_completed,
1323 TP_PROTO(struct ieee80211_local *local, bool aborted),
1324
1325 TP_ARGS(local, aborted),
1326
1327 TP_STRUCT__entry(
1328 LOCAL_ENTRY
1329 __field(bool, aborted)
1330 ),
1331
1332 TP_fast_assign(
1333 LOCAL_ASSIGN;
1334 __entry->aborted = aborted;
1335 ),
1336
1337 TP_printk(
1338 LOCAL_PR_FMT " aborted:%d",
1339 LOCAL_PR_ARG, __entry->aborted
1340 )
1341);
1342
Luciano Coelho79f460c2011-05-11 17:09:36 +03001343TRACE_EVENT(api_sched_scan_results,
1344 TP_PROTO(struct ieee80211_local *local),
1345
1346 TP_ARGS(local),
1347
1348 TP_STRUCT__entry(
1349 LOCAL_ENTRY
1350 ),
1351
1352 TP_fast_assign(
1353 LOCAL_ASSIGN;
1354 ),
1355
1356 TP_printk(
1357 LOCAL_PR_FMT, LOCAL_PR_ARG
1358 )
1359);
1360
1361TRACE_EVENT(api_sched_scan_stopped,
1362 TP_PROTO(struct ieee80211_local *local),
1363
1364 TP_ARGS(local),
1365
1366 TP_STRUCT__entry(
1367 LOCAL_ENTRY
1368 ),
1369
1370 TP_fast_assign(
1371 LOCAL_ASSIGN;
1372 ),
1373
1374 TP_printk(
1375 LOCAL_PR_FMT, LOCAL_PR_ARG
1376 )
1377);
1378
Johannes Bergb5878a22010-04-07 16:48:40 +02001379TRACE_EVENT(api_sta_block_awake,
1380 TP_PROTO(struct ieee80211_local *local,
1381 struct ieee80211_sta *sta, bool block),
1382
1383 TP_ARGS(local, sta, block),
1384
1385 TP_STRUCT__entry(
1386 LOCAL_ENTRY
1387 STA_ENTRY
1388 __field(bool, block)
1389 ),
1390
1391 TP_fast_assign(
1392 LOCAL_ASSIGN;
1393 STA_ASSIGN;
1394 __entry->block = block;
1395 ),
1396
1397 TP_printk(
1398 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1399 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
1400 )
1401);
1402
Johannes Berg5ce6e432010-05-11 16:20:57 +02001403TRACE_EVENT(api_chswitch_done,
1404 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1405
1406 TP_ARGS(sdata, success),
1407
1408 TP_STRUCT__entry(
1409 VIF_ENTRY
1410 __field(bool, success)
1411 ),
1412
1413 TP_fast_assign(
1414 VIF_ASSIGN;
1415 __entry->success = success;
1416 ),
1417
1418 TP_printk(
1419 VIF_PR_FMT " success=%d",
1420 VIF_PR_ARG, __entry->success
1421 )
1422);
1423
Johannes Bergba99d932011-01-26 09:22:15 +01001424DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001425 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001426 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001427);
1428
Johannes Bergba99d932011-01-26 09:22:15 +01001429DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001430 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001431 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001432);
1433
Johannes Bergc68f4b82011-07-05 16:35:41 +02001434TRACE_EVENT(api_gtk_rekey_notify,
1435 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1436 const u8 *bssid, const u8 *replay_ctr),
1437
1438 TP_ARGS(sdata, bssid, replay_ctr),
1439
1440 TP_STRUCT__entry(
1441 VIF_ENTRY
1442 __array(u8, bssid, ETH_ALEN)
1443 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1444 ),
1445
1446 TP_fast_assign(
1447 VIF_ASSIGN;
1448 memcpy(__entry->bssid, bssid, ETH_ALEN);
1449 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1450 ),
1451
1452 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1453);
1454
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001455TRACE_EVENT(api_enable_rssi_reports,
1456 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1457 int rssi_min_thold, int rssi_max_thold),
1458
1459 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1460
1461 TP_STRUCT__entry(
1462 VIF_ENTRY
1463 __field(int, rssi_min_thold)
1464 __field(int, rssi_max_thold)
1465 ),
1466
1467 TP_fast_assign(
1468 VIF_ASSIGN;
1469 __entry->rssi_min_thold = rssi_min_thold;
1470 __entry->rssi_max_thold = rssi_max_thold;
1471 ),
1472
1473 TP_printk(
1474 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
1475 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
1476 )
1477);
1478
Johannes Berg37fbd902011-09-29 16:04:39 +02001479TRACE_EVENT(api_eosp,
1480 TP_PROTO(struct ieee80211_local *local,
1481 struct ieee80211_sta *sta),
1482
1483 TP_ARGS(local, sta),
1484
1485 TP_STRUCT__entry(
1486 LOCAL_ENTRY
1487 STA_ENTRY
1488 ),
1489
1490 TP_fast_assign(
1491 LOCAL_ASSIGN;
1492 STA_ASSIGN;
1493 ),
1494
1495 TP_printk(
1496 LOCAL_PR_FMT STA_PR_FMT,
1497 LOCAL_PR_ARG, STA_PR_FMT
1498 )
1499);
1500
Johannes Bergb5878a22010-04-07 16:48:40 +02001501/*
1502 * Tracing for internal functions
1503 * (which may also be called in response to driver calls)
1504 */
1505
1506TRACE_EVENT(wake_queue,
1507 TP_PROTO(struct ieee80211_local *local, u16 queue,
1508 enum queue_stop_reason reason),
1509
1510 TP_ARGS(local, queue, reason),
1511
1512 TP_STRUCT__entry(
1513 LOCAL_ENTRY
1514 __field(u16, queue)
1515 __field(u32, reason)
1516 ),
1517
1518 TP_fast_assign(
1519 LOCAL_ASSIGN;
1520 __entry->queue = queue;
1521 __entry->reason = reason;
1522 ),
1523
1524 TP_printk(
1525 LOCAL_PR_FMT " queue:%d, reason:%d",
1526 LOCAL_PR_ARG, __entry->queue, __entry->reason
1527 )
1528);
1529
1530TRACE_EVENT(stop_queue,
1531 TP_PROTO(struct ieee80211_local *local, u16 queue,
1532 enum queue_stop_reason reason),
1533
1534 TP_ARGS(local, queue, reason),
1535
1536 TP_STRUCT__entry(
1537 LOCAL_ENTRY
1538 __field(u16, queue)
1539 __field(u32, reason)
1540 ),
1541
1542 TP_fast_assign(
1543 LOCAL_ASSIGN;
1544 __entry->queue = queue;
1545 __entry->reason = reason;
1546 ),
1547
1548 TP_printk(
1549 LOCAL_PR_FMT " queue:%d, reason:%d",
1550 LOCAL_PR_ARG, __entry->queue, __entry->reason
1551 )
1552);
Christian Lamparterf7428802009-07-19 23:21:07 +02001553#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001554
1555#undef TRACE_INCLUDE_PATH
1556#define TRACE_INCLUDE_PATH .
1557#undef TRACE_INCLUDE_FILE
1558#define TRACE_INCLUDE_FILE driver-trace
1559#include <trace/define_trace.h>