blob: ed9edcbd9aa588b9bb36181f23bbdaf178121c63 [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
Christian Lamparterf7428802009-07-19 23:21:07 +02008#if !defined(CONFIG_MAC80211_DRIVER_API_TRACER) || defined(__CHECKER__)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02009#undef TRACE_EVENT
10#define TRACE_EVENT(name, proto, ...) \
11static inline void trace_ ## name(proto) {}
Johannes Bergba99d932011-01-26 09:22:15 +010012#undef DECLARE_EVENT_CLASS
13#define DECLARE_EVENT_CLASS(...)
14#undef DEFINE_EVENT
15#define DEFINE_EVENT(evt_class, name, proto, ...) \
16static inline void trace_ ## name(proto) {}
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020017#endif
18
19#undef TRACE_SYSTEM
20#define TRACE_SYSTEM mac80211
21
22#define MAXNAME 32
23#define LOCAL_ENTRY __array(char, wiphy_name, 32)
24#define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME)
25#define LOCAL_PR_FMT "%s"
26#define LOCAL_PR_ARG __entry->wiphy_name
27
28#define STA_ENTRY __array(char, sta_addr, ETH_ALEN)
29#define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN))
30#define STA_PR_FMT " sta:%pM"
31#define STA_PR_ARG __entry->sta_addr
32
Johannes Berg2ca27bc2010-09-16 14:58:23 +020033#define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
34 __field(bool, p2p) \
Johannes Berg12375ef2009-11-25 20:30:31 +010035 __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
Johannes Berg2ca27bc2010-09-16 14:58:23 +020036#define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
37 __entry->p2p = sdata->vif.p2p; \
Johannes Berg12375ef2009-11-25 20:30:31 +010038 __assign_str(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
Johannes Berg2ca27bc2010-09-16 14:58:23 +020039#define VIF_PR_FMT " vif:%s(%d%s)"
40#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020041
Johannes Bergb5878a22010-04-07 16:48:40 +020042/*
43 * Tracing for driver callbacks.
44 */
45
Johannes Bergba99d932011-01-26 09:22:15 +010046DECLARE_EVENT_CLASS(local_only_evt,
Johannes Berg4efc76b2010-06-10 10:56:20 +020047 TP_PROTO(struct ieee80211_local *local),
48 TP_ARGS(local),
49 TP_STRUCT__entry(
50 LOCAL_ENTRY
51 ),
52 TP_fast_assign(
53 LOCAL_ASSIGN;
54 ),
55 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
56);
57
Luciano Coelho92ddc112011-05-09 14:40:06 +030058DECLARE_EVENT_CLASS(local_sdata_addr_evt,
59 TP_PROTO(struct ieee80211_local *local,
60 struct ieee80211_sub_if_data *sdata),
61 TP_ARGS(local, sdata),
62
63 TP_STRUCT__entry(
64 LOCAL_ENTRY
65 VIF_ENTRY
66 __array(char, addr, 6)
67 ),
68
69 TP_fast_assign(
70 LOCAL_ASSIGN;
71 VIF_ASSIGN;
72 memcpy(__entry->addr, sdata->vif.addr, 6);
73 ),
74
75 TP_printk(
76 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
77 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
78 )
79);
80
81DECLARE_EVENT_CLASS(local_u32_evt,
82 TP_PROTO(struct ieee80211_local *local, u32 value),
83 TP_ARGS(local, value),
84
85 TP_STRUCT__entry(
86 LOCAL_ENTRY
87 __field(u32, value)
88 ),
89
90 TP_fast_assign(
91 LOCAL_ASSIGN;
92 __entry->value = value;
93 ),
94
95 TP_printk(
96 LOCAL_PR_FMT " value:%d",
97 LOCAL_PR_ARG, __entry->value
98 )
99);
100
Luciano Coelho79f460c2011-05-11 17:09:36 +0300101DECLARE_EVENT_CLASS(local_sdata_evt,
102 TP_PROTO(struct ieee80211_local *local,
103 struct ieee80211_sub_if_data *sdata),
104 TP_ARGS(local, sdata),
105
106 TP_STRUCT__entry(
107 LOCAL_ENTRY
108 VIF_ENTRY
109 ),
110
111 TP_fast_assign(
112 LOCAL_ASSIGN;
113 VIF_ASSIGN;
114 ),
115
116 TP_printk(
117 LOCAL_PR_FMT VIF_PR_FMT,
118 LOCAL_PR_ARG, VIF_PR_ARG
119 )
120);
121
Johannes Bergba99d932011-01-26 09:22:15 +0100122DEFINE_EVENT(local_only_evt, drv_return_void,
123 TP_PROTO(struct ieee80211_local *local),
124 TP_ARGS(local)
125);
126
Johannes Berg4efc76b2010-06-10 10:56:20 +0200127TRACE_EVENT(drv_return_int,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200128 TP_PROTO(struct ieee80211_local *local, int ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200129 TP_ARGS(local, ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200130 TP_STRUCT__entry(
131 LOCAL_ENTRY
132 __field(int, ret)
133 ),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200134 TP_fast_assign(
135 LOCAL_ASSIGN;
136 __entry->ret = ret;
137 ),
Johannes Berg4efc76b2010-06-10 10:56:20 +0200138 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
139);
140
Vivek Natarajane8306f92011-04-06 11:41:10 +0530141TRACE_EVENT(drv_return_bool,
142 TP_PROTO(struct ieee80211_local *local, bool ret),
143 TP_ARGS(local, ret),
144 TP_STRUCT__entry(
145 LOCAL_ENTRY
146 __field(bool, ret)
147 ),
148 TP_fast_assign(
149 LOCAL_ASSIGN;
150 __entry->ret = ret;
151 ),
152 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
153 "true" : "false")
154);
155
Johannes Berg4efc76b2010-06-10 10:56:20 +0200156TRACE_EVENT(drv_return_u64,
157 TP_PROTO(struct ieee80211_local *local, u64 ret),
158 TP_ARGS(local, ret),
159 TP_STRUCT__entry(
160 LOCAL_ENTRY
161 __field(u64, ret)
162 ),
163 TP_fast_assign(
164 LOCAL_ASSIGN;
165 __entry->ret = ret;
166 ),
167 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
168);
169
Johannes Bergba99d932011-01-26 09:22:15 +0100170DEFINE_EVENT(local_only_evt, drv_start,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200171 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100172 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200173);
174
Johannes Bergeecc4802011-05-04 15:37:29 +0200175DEFINE_EVENT(local_only_evt, drv_suspend,
176 TP_PROTO(struct ieee80211_local *local),
177 TP_ARGS(local)
178);
179
180DEFINE_EVENT(local_only_evt, drv_resume,
181 TP_PROTO(struct ieee80211_local *local),
182 TP_ARGS(local)
183);
184
Johannes Bergba99d932011-01-26 09:22:15 +0100185DEFINE_EVENT(local_only_evt, drv_stop,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200186 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100187 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200188);
189
Luciano Coelho92ddc112011-05-09 14:40:06 +0300190DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200191 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200192 struct ieee80211_sub_if_data *sdata),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300193 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200194);
195
Johannes Berg34d4bc42010-08-27 12:35:58 +0200196TRACE_EVENT(drv_change_interface,
197 TP_PROTO(struct ieee80211_local *local,
198 struct ieee80211_sub_if_data *sdata,
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200199 enum nl80211_iftype type, bool p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200200
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200201 TP_ARGS(local, sdata, type, p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200202
203 TP_STRUCT__entry(
204 LOCAL_ENTRY
205 VIF_ENTRY
206 __field(u32, new_type)
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200207 __field(bool, new_p2p)
Johannes Berg34d4bc42010-08-27 12:35:58 +0200208 ),
209
210 TP_fast_assign(
211 LOCAL_ASSIGN;
212 VIF_ASSIGN;
213 __entry->new_type = type;
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200214 __entry->new_p2p = p2p;
Johannes Berg34d4bc42010-08-27 12:35:58 +0200215 ),
216
217 TP_printk(
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200218 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
219 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
220 __entry->new_p2p ? "/p2p" : ""
Johannes Berg34d4bc42010-08-27 12:35:58 +0200221 )
222);
223
Luciano Coelho92ddc112011-05-09 14:40:06 +0300224DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
225 TP_PROTO(struct ieee80211_local *local,
226 struct ieee80211_sub_if_data *sdata),
227 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200228);
229
230TRACE_EVENT(drv_config,
231 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200232 u32 changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200233
Johannes Berg4efc76b2010-06-10 10:56:20 +0200234 TP_ARGS(local, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200235
236 TP_STRUCT__entry(
237 LOCAL_ENTRY
238 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100239 __field(u32, flags)
240 __field(int, power_level)
241 __field(int, dynamic_ps_timeout)
242 __field(int, max_sleep_period)
243 __field(u16, listen_interval)
244 __field(u8, long_frame_max_tx_count)
245 __field(u8, short_frame_max_tx_count)
246 __field(int, center_freq)
247 __field(int, channel_type)
Johannes Berg0f782312009-12-01 13:37:02 +0100248 __field(int, smps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200249 ),
250
251 TP_fast_assign(
252 LOCAL_ASSIGN;
253 __entry->changed = changed;
Johannes Bergf911ab82009-11-25 19:07:20 +0100254 __entry->flags = local->hw.conf.flags;
255 __entry->power_level = local->hw.conf.power_level;
256 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
257 __entry->max_sleep_period = local->hw.conf.max_sleep_period;
258 __entry->listen_interval = local->hw.conf.listen_interval;
259 __entry->long_frame_max_tx_count = local->hw.conf.long_frame_max_tx_count;
260 __entry->short_frame_max_tx_count = local->hw.conf.short_frame_max_tx_count;
261 __entry->center_freq = local->hw.conf.channel->center_freq;
262 __entry->channel_type = local->hw.conf.channel_type;
Johannes Berg0f782312009-12-01 13:37:02 +0100263 __entry->smps = local->hw.conf.smps_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200264 ),
265
266 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200267 LOCAL_PR_FMT " ch:%#x freq:%d",
268 LOCAL_PR_ARG, __entry->changed, __entry->center_freq
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200269 )
270);
271
272TRACE_EVENT(drv_bss_info_changed,
273 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100274 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200275 struct ieee80211_bss_conf *info,
276 u32 changed),
277
Johannes Berg12375ef2009-11-25 20:30:31 +0100278 TP_ARGS(local, sdata, info, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200279
280 TP_STRUCT__entry(
281 LOCAL_ENTRY
282 VIF_ENTRY
283 __field(bool, assoc)
284 __field(u16, aid)
285 __field(bool, cts)
286 __field(bool, shortpre)
287 __field(bool, shortslot)
288 __field(u8, dtimper)
289 __field(u16, bcnint)
290 __field(u16, assoc_cap)
291 __field(u64, timestamp)
292 __field(u32, basic_rates)
293 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100294 __field(bool, enable_beacon)
295 __field(u16, ht_operation_mode)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200296 ),
297
298 TP_fast_assign(
299 LOCAL_ASSIGN;
300 VIF_ASSIGN;
301 __entry->changed = changed;
302 __entry->aid = info->aid;
303 __entry->assoc = info->assoc;
304 __entry->shortpre = info->use_short_preamble;
305 __entry->cts = info->use_cts_prot;
306 __entry->shortslot = info->use_short_slot;
307 __entry->dtimper = info->dtim_period;
308 __entry->bcnint = info->beacon_int;
309 __entry->assoc_cap = info->assoc_capability;
310 __entry->timestamp = info->timestamp;
311 __entry->basic_rates = info->basic_rates;
Johannes Bergf911ab82009-11-25 19:07:20 +0100312 __entry->enable_beacon = info->enable_beacon;
313 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200314 ),
315
316 TP_printk(
317 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
318 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
319 )
320);
321
Johannes Berg3ac64be2009-08-17 16:16:53 +0200322TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200323 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200324
Johannes Berg4efc76b2010-06-10 10:56:20 +0200325 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200326
327 TP_STRUCT__entry(
328 LOCAL_ENTRY
329 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200330 ),
331
332 TP_fast_assign(
333 LOCAL_ASSIGN;
334 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200335 ),
336
337 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200338 LOCAL_PR_FMT " prepare mc (%d)",
339 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200340 )
341);
342
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200343TRACE_EVENT(drv_configure_filter,
344 TP_PROTO(struct ieee80211_local *local,
345 unsigned int changed_flags,
346 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200347 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200348
Johannes Berg3ac64be2009-08-17 16:16:53 +0200349 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200350
351 TP_STRUCT__entry(
352 LOCAL_ENTRY
353 __field(unsigned int, changed)
354 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200355 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200356 ),
357
358 TP_fast_assign(
359 LOCAL_ASSIGN;
360 __entry->changed = changed_flags;
361 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200362 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200363 ),
364
365 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200366 LOCAL_PR_FMT " changed:%#x total:%#x",
367 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200368 )
369);
370
371TRACE_EVENT(drv_set_tim,
372 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200373 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200374
Johannes Berg4efc76b2010-06-10 10:56:20 +0200375 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200376
377 TP_STRUCT__entry(
378 LOCAL_ENTRY
379 STA_ENTRY
380 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200381 ),
382
383 TP_fast_assign(
384 LOCAL_ASSIGN;
385 STA_ASSIGN;
386 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200387 ),
388
389 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200390 LOCAL_PR_FMT STA_PR_FMT " set:%d",
391 LOCAL_PR_ARG, STA_PR_FMT, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200392 )
393);
394
395TRACE_EVENT(drv_set_key,
396 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100397 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200398 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200399 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200400
Johannes Berg4efc76b2010-06-10 10:56:20 +0200401 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200402
403 TP_STRUCT__entry(
404 LOCAL_ENTRY
405 VIF_ENTRY
406 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200407 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200408 __field(u8, hw_key_idx)
409 __field(u8, flags)
410 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200411 ),
412
413 TP_fast_assign(
414 LOCAL_ASSIGN;
415 VIF_ASSIGN;
416 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200417 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200418 __entry->flags = key->flags;
419 __entry->keyidx = key->keyidx;
420 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200421 ),
422
423 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200424 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
425 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200426 )
427);
428
429TRACE_EVENT(drv_update_tkip_key,
430 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100431 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200432 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100433 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200434
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100435 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200436
437 TP_STRUCT__entry(
438 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100439 VIF_ENTRY
440 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200441 __field(u32, iv32)
442 ),
443
444 TP_fast_assign(
445 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100446 VIF_ASSIGN;
447 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200448 __entry->iv32 = iv32;
449 ),
450
451 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100452 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
453 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200454 )
455);
456
Luciano Coelho79f460c2011-05-11 17:09:36 +0300457DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200458 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300459 struct ieee80211_sub_if_data *sdata),
460 TP_ARGS(local, sdata)
461);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200462
Luciano Coelho79f460c2011-05-11 17:09:36 +0300463DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
464 TP_PROTO(struct ieee80211_local *local,
465 struct ieee80211_sub_if_data *sdata),
466 TP_ARGS(local, sdata)
467);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200468
Luciano Coelho79f460c2011-05-11 17:09:36 +0300469DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
470 TP_PROTO(struct ieee80211_local *local,
471 struct ieee80211_sub_if_data *sdata),
472 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200473);
474
Johannes Bergba99d932011-01-26 09:22:15 +0100475DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
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
Johannes Bergba99d932011-01-26 09:22:15 +0100480DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200481 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100482 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200483);
484
485TRACE_EVENT(drv_get_stats,
486 TP_PROTO(struct ieee80211_local *local,
487 struct ieee80211_low_level_stats *stats,
488 int ret),
489
490 TP_ARGS(local, stats, ret),
491
492 TP_STRUCT__entry(
493 LOCAL_ENTRY
494 __field(int, ret)
495 __field(unsigned int, ackfail)
496 __field(unsigned int, rtsfail)
497 __field(unsigned int, fcserr)
498 __field(unsigned int, rtssucc)
499 ),
500
501 TP_fast_assign(
502 LOCAL_ASSIGN;
503 __entry->ret = ret;
504 __entry->ackfail = stats->dot11ACKFailureCount;
505 __entry->rtsfail = stats->dot11RTSFailureCount;
506 __entry->fcserr = stats->dot11FCSErrorCount;
507 __entry->rtssucc = stats->dot11RTSSuccessCount;
508 ),
509
510 TP_printk(
511 LOCAL_PR_FMT " ret:%d",
512 LOCAL_PR_ARG, __entry->ret
513 )
514);
515
516TRACE_EVENT(drv_get_tkip_seq,
517 TP_PROTO(struct ieee80211_local *local,
518 u8 hw_key_idx, u32 *iv32, u16 *iv16),
519
520 TP_ARGS(local, hw_key_idx, iv32, iv16),
521
522 TP_STRUCT__entry(
523 LOCAL_ENTRY
524 __field(u8, hw_key_idx)
525 __field(u32, iv32)
526 __field(u16, iv16)
527 ),
528
529 TP_fast_assign(
530 LOCAL_ASSIGN;
531 __entry->hw_key_idx = hw_key_idx;
532 __entry->iv32 = *iv32;
533 __entry->iv16 = *iv16;
534 ),
535
536 TP_printk(
537 LOCAL_PR_FMT, LOCAL_PR_ARG
538 )
539);
540
Luciano Coelho92ddc112011-05-09 14:40:06 +0300541DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200542 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300543 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200544);
545
Luciano Coelho92ddc112011-05-09 14:40:06 +0300546DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200547 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300548 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200549);
550
Lukáš Turek310bc672009-12-21 22:50:48 +0100551TRACE_EVENT(drv_set_coverage_class,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200552 TP_PROTO(struct ieee80211_local *local, u8 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100553
Johannes Berg4efc76b2010-06-10 10:56:20 +0200554 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100555
556 TP_STRUCT__entry(
557 LOCAL_ENTRY
558 __field(u8, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100559 ),
560
561 TP_fast_assign(
562 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100563 __entry->value = value;
564 ),
565
566 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200567 LOCAL_PR_FMT " value:%d",
568 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100569 )
570);
571
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200572TRACE_EVENT(drv_sta_notify,
573 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100574 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200575 enum sta_notify_cmd cmd,
576 struct ieee80211_sta *sta),
577
Johannes Berg12375ef2009-11-25 20:30:31 +0100578 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200579
580 TP_STRUCT__entry(
581 LOCAL_ENTRY
582 VIF_ENTRY
583 STA_ENTRY
584 __field(u32, cmd)
585 ),
586
587 TP_fast_assign(
588 LOCAL_ASSIGN;
589 VIF_ASSIGN;
590 STA_ASSIGN;
591 __entry->cmd = cmd;
592 ),
593
594 TP_printk(
595 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
596 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
597 )
598);
599
Johannes Berg34e89502010-02-03 13:59:58 +0100600TRACE_EVENT(drv_sta_add,
601 TP_PROTO(struct ieee80211_local *local,
602 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200603 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100604
Johannes Berg4efc76b2010-06-10 10:56:20 +0200605 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100606
607 TP_STRUCT__entry(
608 LOCAL_ENTRY
609 VIF_ENTRY
610 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100611 ),
612
613 TP_fast_assign(
614 LOCAL_ASSIGN;
615 VIF_ASSIGN;
616 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100617 ),
618
619 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200620 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
621 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100622 )
623);
624
625TRACE_EVENT(drv_sta_remove,
626 TP_PROTO(struct ieee80211_local *local,
627 struct ieee80211_sub_if_data *sdata,
628 struct ieee80211_sta *sta),
629
630 TP_ARGS(local, sdata, sta),
631
632 TP_STRUCT__entry(
633 LOCAL_ENTRY
634 VIF_ENTRY
635 STA_ENTRY
636 ),
637
638 TP_fast_assign(
639 LOCAL_ASSIGN;
640 VIF_ASSIGN;
641 STA_ASSIGN;
642 ),
643
644 TP_printk(
645 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
646 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
647 )
648);
649
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200650TRACE_EVENT(drv_conf_tx,
651 TP_PROTO(struct ieee80211_local *local, u16 queue,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200652 const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200653
Johannes Berg4efc76b2010-06-10 10:56:20 +0200654 TP_ARGS(local, queue, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200655
656 TP_STRUCT__entry(
657 LOCAL_ENTRY
658 __field(u16, queue)
659 __field(u16, txop)
660 __field(u16, cw_min)
661 __field(u16, cw_max)
662 __field(u8, aifs)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200663 ),
664
665 TP_fast_assign(
666 LOCAL_ASSIGN;
667 __entry->queue = queue;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200668 __entry->txop = params->txop;
669 __entry->cw_max = params->cw_max;
670 __entry->cw_min = params->cw_min;
671 __entry->aifs = params->aifs;
672 ),
673
674 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200675 LOCAL_PR_FMT " queue:%d",
676 LOCAL_PR_ARG, __entry->queue
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200677 )
678);
679
Johannes Bergba99d932011-01-26 09:22:15 +0100680DEFINE_EVENT(local_only_evt, drv_get_tsf,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200681 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100682 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200683);
684
685TRACE_EVENT(drv_set_tsf,
686 TP_PROTO(struct ieee80211_local *local, u64 tsf),
687
688 TP_ARGS(local, tsf),
689
690 TP_STRUCT__entry(
691 LOCAL_ENTRY
692 __field(u64, tsf)
693 ),
694
695 TP_fast_assign(
696 LOCAL_ASSIGN;
697 __entry->tsf = tsf;
698 ),
699
700 TP_printk(
701 LOCAL_PR_FMT " tsf:%llu",
702 LOCAL_PR_ARG, (unsigned long long)__entry->tsf
703 )
704);
705
Johannes Bergba99d932011-01-26 09:22:15 +0100706DEFINE_EVENT(local_only_evt, drv_reset_tsf,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200707 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100708 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200709);
710
Johannes Bergba99d932011-01-26 09:22:15 +0100711DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200712 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100713 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200714);
715
716TRACE_EVENT(drv_ampdu_action,
717 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100718 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200719 enum ieee80211_ampdu_mlme_action action,
720 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100721 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200722
Johannes Berg0b01f032011-01-18 13:51:05 +0100723 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200724
725 TP_STRUCT__entry(
726 LOCAL_ENTRY
727 STA_ENTRY
728 __field(u32, action)
729 __field(u16, tid)
730 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100731 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100732 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200733 ),
734
735 TP_fast_assign(
736 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100737 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200738 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200739 __entry->action = action;
740 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800741 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100742 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200743 ),
744
745 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100746 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
747 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
748 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200749 )
750);
Johannes Berga80f7c02009-12-23 13:15:32 +0100751
John W. Linvillec466d4e2010-06-29 14:51:23 -0400752TRACE_EVENT(drv_get_survey,
753 TP_PROTO(struct ieee80211_local *local, int idx,
754 struct survey_info *survey),
755
756 TP_ARGS(local, idx, survey),
757
758 TP_STRUCT__entry(
759 LOCAL_ENTRY
760 __field(int, idx)
761 ),
762
763 TP_fast_assign(
764 LOCAL_ASSIGN;
765 __entry->idx = idx;
766 ),
767
768 TP_printk(
769 LOCAL_PR_FMT " idx:%d",
770 LOCAL_PR_ARG, __entry->idx
771 )
772);
773
Johannes Berga80f7c02009-12-23 13:15:32 +0100774TRACE_EVENT(drv_flush,
775 TP_PROTO(struct ieee80211_local *local, bool drop),
776
777 TP_ARGS(local, drop),
778
779 TP_STRUCT__entry(
780 LOCAL_ENTRY
781 __field(bool, drop)
782 ),
783
784 TP_fast_assign(
785 LOCAL_ASSIGN;
786 __entry->drop = drop;
787 ),
788
789 TP_printk(
790 LOCAL_PR_FMT " drop:%d",
791 LOCAL_PR_ARG, __entry->drop
792 )
793);
Johannes Bergb5878a22010-04-07 16:48:40 +0200794
Johannes Berg5ce6e432010-05-11 16:20:57 +0200795TRACE_EVENT(drv_channel_switch,
796 TP_PROTO(struct ieee80211_local *local,
797 struct ieee80211_channel_switch *ch_switch),
798
799 TP_ARGS(local, ch_switch),
800
801 TP_STRUCT__entry(
802 LOCAL_ENTRY
803 __field(u64, timestamp)
804 __field(bool, block_tx)
805 __field(u16, freq)
806 __field(u8, count)
807 ),
808
809 TP_fast_assign(
810 LOCAL_ASSIGN;
811 __entry->timestamp = ch_switch->timestamp;
812 __entry->block_tx = ch_switch->block_tx;
813 __entry->freq = ch_switch->channel->center_freq;
814 __entry->count = ch_switch->count;
815 ),
816
817 TP_printk(
818 LOCAL_PR_FMT " new freq:%u count:%d",
819 LOCAL_PR_ARG, __entry->freq, __entry->count
820 )
821);
822
Bruno Randolf15d96752010-11-10 12:50:56 +0900823TRACE_EVENT(drv_set_antenna,
824 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
825
826 TP_ARGS(local, tx_ant, rx_ant, ret),
827
828 TP_STRUCT__entry(
829 LOCAL_ENTRY
830 __field(u32, tx_ant)
831 __field(u32, rx_ant)
832 __field(int, ret)
833 ),
834
835 TP_fast_assign(
836 LOCAL_ASSIGN;
837 __entry->tx_ant = tx_ant;
838 __entry->rx_ant = rx_ant;
839 __entry->ret = ret;
840 ),
841
842 TP_printk(
843 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
844 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
845 )
846);
847
848TRACE_EVENT(drv_get_antenna,
849 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
850
851 TP_ARGS(local, tx_ant, rx_ant, ret),
852
853 TP_STRUCT__entry(
854 LOCAL_ENTRY
855 __field(u32, tx_ant)
856 __field(u32, rx_ant)
857 __field(int, ret)
858 ),
859
860 TP_fast_assign(
861 LOCAL_ASSIGN;
862 __entry->tx_ant = tx_ant;
863 __entry->rx_ant = rx_ant;
864 __entry->ret = ret;
865 ),
866
867 TP_printk(
868 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
869 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
870 )
871);
872
Johannes Berg21f83582010-12-18 17:20:47 +0100873TRACE_EVENT(drv_remain_on_channel,
874 TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
875 enum nl80211_channel_type chantype, unsigned int duration),
876
877 TP_ARGS(local, chan, chantype, duration),
878
879 TP_STRUCT__entry(
880 LOCAL_ENTRY
881 __field(int, center_freq)
882 __field(int, channel_type)
883 __field(unsigned int, duration)
884 ),
885
886 TP_fast_assign(
887 LOCAL_ASSIGN;
888 __entry->center_freq = chan->center_freq;
889 __entry->channel_type = chantype;
890 __entry->duration = duration;
891 ),
892
893 TP_printk(
894 LOCAL_PR_FMT " freq:%dMHz duration:%dms",
895 LOCAL_PR_ARG, __entry->center_freq, __entry->duration
896 )
897);
898
Johannes Bergba99d932011-01-26 09:22:15 +0100899DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +0100900 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100901 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +0100902);
903
Johannes Berg5f16a432011-02-25 15:36:57 +0100904TRACE_EVENT(drv_offchannel_tx,
905 TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
906 struct ieee80211_channel *chan,
907 enum nl80211_channel_type channel_type,
908 unsigned int wait),
909
910 TP_ARGS(local, skb, chan, channel_type, wait),
911
912 TP_STRUCT__entry(
913 LOCAL_ENTRY
914 __field(int, center_freq)
915 __field(int, channel_type)
916 __field(unsigned int, wait)
917 ),
918
919 TP_fast_assign(
920 LOCAL_ASSIGN;
921 __entry->center_freq = chan->center_freq;
922 __entry->channel_type = channel_type;
923 __entry->wait = wait;
924 ),
925
926 TP_printk(
927 LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
928 LOCAL_PR_ARG, __entry->center_freq, __entry->wait
929 )
930);
931
John W. Linville38c09152011-03-07 16:19:18 -0500932TRACE_EVENT(drv_set_ringparam,
933 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
934
935 TP_ARGS(local, tx, rx),
936
937 TP_STRUCT__entry(
938 LOCAL_ENTRY
939 __field(u32, tx)
940 __field(u32, rx)
941 ),
942
943 TP_fast_assign(
944 LOCAL_ASSIGN;
945 __entry->tx = tx;
946 __entry->rx = rx;
947 ),
948
949 TP_printk(
950 LOCAL_PR_FMT " tx:%d rx %d",
951 LOCAL_PR_ARG, __entry->tx, __entry->rx
952 )
953);
954
955TRACE_EVENT(drv_get_ringparam,
956 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
957 u32 *rx, u32 *rx_max),
958
959 TP_ARGS(local, tx, tx_max, rx, rx_max),
960
961 TP_STRUCT__entry(
962 LOCAL_ENTRY
963 __field(u32, tx)
964 __field(u32, tx_max)
965 __field(u32, rx)
966 __field(u32, rx_max)
967 ),
968
969 TP_fast_assign(
970 LOCAL_ASSIGN;
971 __entry->tx = *tx;
972 __entry->tx_max = *tx_max;
973 __entry->rx = *rx;
974 __entry->rx_max = *rx_max;
975 ),
976
977 TP_printk(
978 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
979 LOCAL_PR_ARG,
980 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
981 )
982);
983
Vivek Natarajane8306f92011-04-06 11:41:10 +0530984DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
985 TP_PROTO(struct ieee80211_local *local),
986 TP_ARGS(local)
987);
988
Johannes Berg5f16a432011-02-25 15:36:57 +0100989DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
990 TP_PROTO(struct ieee80211_local *local),
991 TP_ARGS(local)
992);
993
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +0530994TRACE_EVENT(drv_set_bitrate_mask,
995 TP_PROTO(struct ieee80211_local *local,
996 struct ieee80211_sub_if_data *sdata,
997 const struct cfg80211_bitrate_mask *mask),
998
999 TP_ARGS(local, sdata, mask),
1000
1001 TP_STRUCT__entry(
1002 LOCAL_ENTRY
1003 VIF_ENTRY
1004 __field(u32, legacy_2g)
1005 __field(u32, legacy_5g)
1006 ),
1007
1008 TP_fast_assign(
1009 LOCAL_ASSIGN;
1010 VIF_ASSIGN;
1011 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1012 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1013 ),
1014
1015 TP_printk(
1016 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1017 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1018 )
1019);
1020
Johannes Bergb5878a22010-04-07 16:48:40 +02001021/*
1022 * Tracing for API calls that drivers call.
1023 */
1024
1025TRACE_EVENT(api_start_tx_ba_session,
1026 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1027
1028 TP_ARGS(sta, tid),
1029
1030 TP_STRUCT__entry(
1031 STA_ENTRY
1032 __field(u16, tid)
1033 ),
1034
1035 TP_fast_assign(
1036 STA_ASSIGN;
1037 __entry->tid = tid;
1038 ),
1039
1040 TP_printk(
1041 STA_PR_FMT " tid:%d",
1042 STA_PR_ARG, __entry->tid
1043 )
1044);
1045
1046TRACE_EVENT(api_start_tx_ba_cb,
1047 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1048
1049 TP_ARGS(sdata, ra, tid),
1050
1051 TP_STRUCT__entry(
1052 VIF_ENTRY
1053 __array(u8, ra, ETH_ALEN)
1054 __field(u16, tid)
1055 ),
1056
1057 TP_fast_assign(
1058 VIF_ASSIGN;
1059 memcpy(__entry->ra, ra, ETH_ALEN);
1060 __entry->tid = tid;
1061 ),
1062
1063 TP_printk(
1064 VIF_PR_FMT " ra:%pM tid:%d",
1065 VIF_PR_ARG, __entry->ra, __entry->tid
1066 )
1067);
1068
1069TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001070 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001071
Johannes Berg6a8579d2010-05-27 14:41:07 +02001072 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001073
1074 TP_STRUCT__entry(
1075 STA_ENTRY
1076 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001077 ),
1078
1079 TP_fast_assign(
1080 STA_ASSIGN;
1081 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001082 ),
1083
1084 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001085 STA_PR_FMT " tid:%d",
1086 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001087 )
1088);
1089
1090TRACE_EVENT(api_stop_tx_ba_cb,
1091 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1092
1093 TP_ARGS(sdata, ra, tid),
1094
1095 TP_STRUCT__entry(
1096 VIF_ENTRY
1097 __array(u8, ra, ETH_ALEN)
1098 __field(u16, tid)
1099 ),
1100
1101 TP_fast_assign(
1102 VIF_ASSIGN;
1103 memcpy(__entry->ra, ra, ETH_ALEN);
1104 __entry->tid = tid;
1105 ),
1106
1107 TP_printk(
1108 VIF_PR_FMT " ra:%pM tid:%d",
1109 VIF_PR_ARG, __entry->ra, __entry->tid
1110 )
1111);
1112
Johannes Bergba99d932011-01-26 09:22:15 +01001113DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001114 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001115 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001116);
1117
1118TRACE_EVENT(api_beacon_loss,
1119 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1120
1121 TP_ARGS(sdata),
1122
1123 TP_STRUCT__entry(
1124 VIF_ENTRY
1125 ),
1126
1127 TP_fast_assign(
1128 VIF_ASSIGN;
1129 ),
1130
1131 TP_printk(
1132 VIF_PR_FMT,
1133 VIF_PR_ARG
1134 )
1135);
1136
1137TRACE_EVENT(api_connection_loss,
1138 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1139
1140 TP_ARGS(sdata),
1141
1142 TP_STRUCT__entry(
1143 VIF_ENTRY
1144 ),
1145
1146 TP_fast_assign(
1147 VIF_ASSIGN;
1148 ),
1149
1150 TP_printk(
1151 VIF_PR_FMT,
1152 VIF_PR_ARG
1153 )
1154);
1155
1156TRACE_EVENT(api_cqm_rssi_notify,
1157 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1158 enum nl80211_cqm_rssi_threshold_event rssi_event),
1159
1160 TP_ARGS(sdata, rssi_event),
1161
1162 TP_STRUCT__entry(
1163 VIF_ENTRY
1164 __field(u32, rssi_event)
1165 ),
1166
1167 TP_fast_assign(
1168 VIF_ASSIGN;
1169 __entry->rssi_event = rssi_event;
1170 ),
1171
1172 TP_printk(
1173 VIF_PR_FMT " event:%d",
1174 VIF_PR_ARG, __entry->rssi_event
1175 )
1176);
1177
1178TRACE_EVENT(api_scan_completed,
1179 TP_PROTO(struct ieee80211_local *local, bool aborted),
1180
1181 TP_ARGS(local, aborted),
1182
1183 TP_STRUCT__entry(
1184 LOCAL_ENTRY
1185 __field(bool, aborted)
1186 ),
1187
1188 TP_fast_assign(
1189 LOCAL_ASSIGN;
1190 __entry->aborted = aborted;
1191 ),
1192
1193 TP_printk(
1194 LOCAL_PR_FMT " aborted:%d",
1195 LOCAL_PR_ARG, __entry->aborted
1196 )
1197);
1198
Luciano Coelho79f460c2011-05-11 17:09:36 +03001199TRACE_EVENT(api_sched_scan_results,
1200 TP_PROTO(struct ieee80211_local *local),
1201
1202 TP_ARGS(local),
1203
1204 TP_STRUCT__entry(
1205 LOCAL_ENTRY
1206 ),
1207
1208 TP_fast_assign(
1209 LOCAL_ASSIGN;
1210 ),
1211
1212 TP_printk(
1213 LOCAL_PR_FMT, LOCAL_PR_ARG
1214 )
1215);
1216
1217TRACE_EVENT(api_sched_scan_stopped,
1218 TP_PROTO(struct ieee80211_local *local),
1219
1220 TP_ARGS(local),
1221
1222 TP_STRUCT__entry(
1223 LOCAL_ENTRY
1224 ),
1225
1226 TP_fast_assign(
1227 LOCAL_ASSIGN;
1228 ),
1229
1230 TP_printk(
1231 LOCAL_PR_FMT, LOCAL_PR_ARG
1232 )
1233);
1234
Johannes Bergb5878a22010-04-07 16:48:40 +02001235TRACE_EVENT(api_sta_block_awake,
1236 TP_PROTO(struct ieee80211_local *local,
1237 struct ieee80211_sta *sta, bool block),
1238
1239 TP_ARGS(local, sta, block),
1240
1241 TP_STRUCT__entry(
1242 LOCAL_ENTRY
1243 STA_ENTRY
1244 __field(bool, block)
1245 ),
1246
1247 TP_fast_assign(
1248 LOCAL_ASSIGN;
1249 STA_ASSIGN;
1250 __entry->block = block;
1251 ),
1252
1253 TP_printk(
1254 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1255 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
1256 )
1257);
1258
Johannes Berg5ce6e432010-05-11 16:20:57 +02001259TRACE_EVENT(api_chswitch_done,
1260 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1261
1262 TP_ARGS(sdata, success),
1263
1264 TP_STRUCT__entry(
1265 VIF_ENTRY
1266 __field(bool, success)
1267 ),
1268
1269 TP_fast_assign(
1270 VIF_ASSIGN;
1271 __entry->success = success;
1272 ),
1273
1274 TP_printk(
1275 VIF_PR_FMT " success=%d",
1276 VIF_PR_ARG, __entry->success
1277 )
1278);
1279
Johannes Bergba99d932011-01-26 09:22:15 +01001280DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001281 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001282 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001283);
1284
Johannes Bergba99d932011-01-26 09:22:15 +01001285DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001286 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001287 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001288);
1289
Johannes Bergb5878a22010-04-07 16:48:40 +02001290/*
1291 * Tracing for internal functions
1292 * (which may also be called in response to driver calls)
1293 */
1294
1295TRACE_EVENT(wake_queue,
1296 TP_PROTO(struct ieee80211_local *local, u16 queue,
1297 enum queue_stop_reason reason),
1298
1299 TP_ARGS(local, queue, reason),
1300
1301 TP_STRUCT__entry(
1302 LOCAL_ENTRY
1303 __field(u16, queue)
1304 __field(u32, reason)
1305 ),
1306
1307 TP_fast_assign(
1308 LOCAL_ASSIGN;
1309 __entry->queue = queue;
1310 __entry->reason = reason;
1311 ),
1312
1313 TP_printk(
1314 LOCAL_PR_FMT " queue:%d, reason:%d",
1315 LOCAL_PR_ARG, __entry->queue, __entry->reason
1316 )
1317);
1318
1319TRACE_EVENT(stop_queue,
1320 TP_PROTO(struct ieee80211_local *local, u16 queue,
1321 enum queue_stop_reason reason),
1322
1323 TP_ARGS(local, queue, reason),
1324
1325 TP_STRUCT__entry(
1326 LOCAL_ENTRY
1327 __field(u16, queue)
1328 __field(u32, reason)
1329 ),
1330
1331 TP_fast_assign(
1332 LOCAL_ASSIGN;
1333 __entry->queue = queue;
1334 __entry->reason = reason;
1335 ),
1336
1337 TP_printk(
1338 LOCAL_PR_FMT " queue:%d, reason:%d",
1339 LOCAL_PR_ARG, __entry->queue, __entry->reason
1340 )
1341);
Christian Lamparterf7428802009-07-19 23:21:07 +02001342#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001343
1344#undef TRACE_INCLUDE_PATH
1345#define TRACE_INCLUDE_PATH .
1346#undef TRACE_INCLUDE_FILE
1347#define TRACE_INCLUDE_FILE driver-trace
1348#include <trace/define_trace.h>