blob: f47b00dc7afd839017a4a485b3ced5149dd9e6b9 [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 Bergb2abb6e2011-07-19 10:39:53 +0200322DECLARE_EVENT_CLASS(tx_sync_evt,
323 TP_PROTO(struct ieee80211_local *local,
324 struct ieee80211_sub_if_data *sdata,
325 const u8 *bssid,
326 enum ieee80211_tx_sync_type type),
327 TP_ARGS(local, sdata, bssid, type),
328
329 TP_STRUCT__entry(
330 LOCAL_ENTRY
331 VIF_ENTRY
332 __array(char, bssid, ETH_ALEN)
333 __field(u32, sync_type)
334 ),
335
336 TP_fast_assign(
337 LOCAL_ASSIGN;
338 VIF_ASSIGN;
339 memcpy(__entry->bssid, bssid, ETH_ALEN);
340 __entry->sync_type = type;
341 ),
342
343 TP_printk(
344 LOCAL_PR_FMT VIF_PR_FMT " bssid:%pM type:%d",
345 LOCAL_PR_ARG, VIF_PR_ARG, __entry->bssid, __entry->sync_type
346 )
347);
348
349DEFINE_EVENT(tx_sync_evt, drv_tx_sync,
350 TP_PROTO(struct ieee80211_local *local,
351 struct ieee80211_sub_if_data *sdata,
352 const u8 *bssid,
353 enum ieee80211_tx_sync_type type),
354 TP_ARGS(local, sdata, bssid, type)
355);
356
357DEFINE_EVENT(tx_sync_evt, drv_finish_tx_sync,
358 TP_PROTO(struct ieee80211_local *local,
359 struct ieee80211_sub_if_data *sdata,
360 const u8 *bssid,
361 enum ieee80211_tx_sync_type type),
362 TP_ARGS(local, sdata, bssid, type)
363);
364
Johannes Berg3ac64be2009-08-17 16:16:53 +0200365TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200366 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200367
Johannes Berg4efc76b2010-06-10 10:56:20 +0200368 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200369
370 TP_STRUCT__entry(
371 LOCAL_ENTRY
372 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200373 ),
374
375 TP_fast_assign(
376 LOCAL_ASSIGN;
377 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200378 ),
379
380 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200381 LOCAL_PR_FMT " prepare mc (%d)",
382 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200383 )
384);
385
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200386TRACE_EVENT(drv_configure_filter,
387 TP_PROTO(struct ieee80211_local *local,
388 unsigned int changed_flags,
389 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200390 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200391
Johannes Berg3ac64be2009-08-17 16:16:53 +0200392 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200393
394 TP_STRUCT__entry(
395 LOCAL_ENTRY
396 __field(unsigned int, changed)
397 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200398 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200399 ),
400
401 TP_fast_assign(
402 LOCAL_ASSIGN;
403 __entry->changed = changed_flags;
404 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200405 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200406 ),
407
408 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200409 LOCAL_PR_FMT " changed:%#x total:%#x",
410 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200411 )
412);
413
414TRACE_EVENT(drv_set_tim,
415 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200416 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200417
Johannes Berg4efc76b2010-06-10 10:56:20 +0200418 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200419
420 TP_STRUCT__entry(
421 LOCAL_ENTRY
422 STA_ENTRY
423 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200424 ),
425
426 TP_fast_assign(
427 LOCAL_ASSIGN;
428 STA_ASSIGN;
429 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200430 ),
431
432 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200433 LOCAL_PR_FMT STA_PR_FMT " set:%d",
434 LOCAL_PR_ARG, STA_PR_FMT, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200435 )
436);
437
438TRACE_EVENT(drv_set_key,
439 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100440 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200441 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200442 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200443
Johannes Berg4efc76b2010-06-10 10:56:20 +0200444 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200445
446 TP_STRUCT__entry(
447 LOCAL_ENTRY
448 VIF_ENTRY
449 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200450 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200451 __field(u8, hw_key_idx)
452 __field(u8, flags)
453 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200454 ),
455
456 TP_fast_assign(
457 LOCAL_ASSIGN;
458 VIF_ASSIGN;
459 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200460 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200461 __entry->flags = key->flags;
462 __entry->keyidx = key->keyidx;
463 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200464 ),
465
466 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200467 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
468 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200469 )
470);
471
472TRACE_EVENT(drv_update_tkip_key,
473 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100474 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200475 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100476 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200477
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100478 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200479
480 TP_STRUCT__entry(
481 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100482 VIF_ENTRY
483 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200484 __field(u32, iv32)
485 ),
486
487 TP_fast_assign(
488 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100489 VIF_ASSIGN;
490 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200491 __entry->iv32 = iv32;
492 ),
493
494 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100495 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
496 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200497 )
498);
499
Luciano Coelho79f460c2011-05-11 17:09:36 +0300500DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200501 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300502 struct ieee80211_sub_if_data *sdata),
503 TP_ARGS(local, sdata)
504);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200505
Eliad Pellerb8564392011-06-13 12:47:30 +0300506DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
507 TP_PROTO(struct ieee80211_local *local,
508 struct ieee80211_sub_if_data *sdata),
509 TP_ARGS(local, sdata)
510);
511
Luciano Coelho79f460c2011-05-11 17:09:36 +0300512DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
513 TP_PROTO(struct ieee80211_local *local,
514 struct ieee80211_sub_if_data *sdata),
515 TP_ARGS(local, sdata)
516);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200517
Luciano Coelho79f460c2011-05-11 17:09:36 +0300518DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
519 TP_PROTO(struct ieee80211_local *local,
520 struct ieee80211_sub_if_data *sdata),
521 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200522);
523
Johannes Bergba99d932011-01-26 09:22:15 +0100524DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200525 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100526 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200527);
528
Johannes Bergba99d932011-01-26 09:22:15 +0100529DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200530 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100531 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200532);
533
534TRACE_EVENT(drv_get_stats,
535 TP_PROTO(struct ieee80211_local *local,
536 struct ieee80211_low_level_stats *stats,
537 int ret),
538
539 TP_ARGS(local, stats, ret),
540
541 TP_STRUCT__entry(
542 LOCAL_ENTRY
543 __field(int, ret)
544 __field(unsigned int, ackfail)
545 __field(unsigned int, rtsfail)
546 __field(unsigned int, fcserr)
547 __field(unsigned int, rtssucc)
548 ),
549
550 TP_fast_assign(
551 LOCAL_ASSIGN;
552 __entry->ret = ret;
553 __entry->ackfail = stats->dot11ACKFailureCount;
554 __entry->rtsfail = stats->dot11RTSFailureCount;
555 __entry->fcserr = stats->dot11FCSErrorCount;
556 __entry->rtssucc = stats->dot11RTSSuccessCount;
557 ),
558
559 TP_printk(
560 LOCAL_PR_FMT " ret:%d",
561 LOCAL_PR_ARG, __entry->ret
562 )
563);
564
565TRACE_EVENT(drv_get_tkip_seq,
566 TP_PROTO(struct ieee80211_local *local,
567 u8 hw_key_idx, u32 *iv32, u16 *iv16),
568
569 TP_ARGS(local, hw_key_idx, iv32, iv16),
570
571 TP_STRUCT__entry(
572 LOCAL_ENTRY
573 __field(u8, hw_key_idx)
574 __field(u32, iv32)
575 __field(u16, iv16)
576 ),
577
578 TP_fast_assign(
579 LOCAL_ASSIGN;
580 __entry->hw_key_idx = hw_key_idx;
581 __entry->iv32 = *iv32;
582 __entry->iv16 = *iv16;
583 ),
584
585 TP_printk(
586 LOCAL_PR_FMT, LOCAL_PR_ARG
587 )
588);
589
Luciano Coelho92ddc112011-05-09 14:40:06 +0300590DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200591 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300592 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200593);
594
Luciano Coelho92ddc112011-05-09 14:40:06 +0300595DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200596 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300597 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200598);
599
Lukáš Turek310bc672009-12-21 22:50:48 +0100600TRACE_EVENT(drv_set_coverage_class,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200601 TP_PROTO(struct ieee80211_local *local, u8 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100602
Johannes Berg4efc76b2010-06-10 10:56:20 +0200603 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100604
605 TP_STRUCT__entry(
606 LOCAL_ENTRY
607 __field(u8, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100608 ),
609
610 TP_fast_assign(
611 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100612 __entry->value = value;
613 ),
614
615 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200616 LOCAL_PR_FMT " value:%d",
617 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100618 )
619);
620
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200621TRACE_EVENT(drv_sta_notify,
622 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100623 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200624 enum sta_notify_cmd cmd,
625 struct ieee80211_sta *sta),
626
Johannes Berg12375ef2009-11-25 20:30:31 +0100627 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200628
629 TP_STRUCT__entry(
630 LOCAL_ENTRY
631 VIF_ENTRY
632 STA_ENTRY
633 __field(u32, cmd)
634 ),
635
636 TP_fast_assign(
637 LOCAL_ASSIGN;
638 VIF_ASSIGN;
639 STA_ASSIGN;
640 __entry->cmd = cmd;
641 ),
642
643 TP_printk(
644 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
645 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
646 )
647);
648
Johannes Berg34e89502010-02-03 13:59:58 +0100649TRACE_EVENT(drv_sta_add,
650 TP_PROTO(struct ieee80211_local *local,
651 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200652 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100653
Johannes Berg4efc76b2010-06-10 10:56:20 +0200654 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100655
656 TP_STRUCT__entry(
657 LOCAL_ENTRY
658 VIF_ENTRY
659 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100660 ),
661
662 TP_fast_assign(
663 LOCAL_ASSIGN;
664 VIF_ASSIGN;
665 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100666 ),
667
668 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200669 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
670 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100671 )
672);
673
674TRACE_EVENT(drv_sta_remove,
675 TP_PROTO(struct ieee80211_local *local,
676 struct ieee80211_sub_if_data *sdata,
677 struct ieee80211_sta *sta),
678
679 TP_ARGS(local, sdata, sta),
680
681 TP_STRUCT__entry(
682 LOCAL_ENTRY
683 VIF_ENTRY
684 STA_ENTRY
685 ),
686
687 TP_fast_assign(
688 LOCAL_ASSIGN;
689 VIF_ASSIGN;
690 STA_ASSIGN;
691 ),
692
693 TP_printk(
694 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
695 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
696 )
697);
698
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200699TRACE_EVENT(drv_conf_tx,
700 TP_PROTO(struct ieee80211_local *local, u16 queue,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200701 const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200702
Johannes Berg4efc76b2010-06-10 10:56:20 +0200703 TP_ARGS(local, queue, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200704
705 TP_STRUCT__entry(
706 LOCAL_ENTRY
707 __field(u16, queue)
708 __field(u16, txop)
709 __field(u16, cw_min)
710 __field(u16, cw_max)
711 __field(u8, aifs)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200712 ),
713
714 TP_fast_assign(
715 LOCAL_ASSIGN;
716 __entry->queue = queue;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200717 __entry->txop = params->txop;
718 __entry->cw_max = params->cw_max;
719 __entry->cw_min = params->cw_min;
720 __entry->aifs = params->aifs;
721 ),
722
723 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200724 LOCAL_PR_FMT " queue:%d",
725 LOCAL_PR_ARG, __entry->queue
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200726 )
727);
728
Johannes Bergba99d932011-01-26 09:22:15 +0100729DEFINE_EVENT(local_only_evt, drv_get_tsf,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200730 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100731 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200732);
733
734TRACE_EVENT(drv_set_tsf,
735 TP_PROTO(struct ieee80211_local *local, u64 tsf),
736
737 TP_ARGS(local, tsf),
738
739 TP_STRUCT__entry(
740 LOCAL_ENTRY
741 __field(u64, tsf)
742 ),
743
744 TP_fast_assign(
745 LOCAL_ASSIGN;
746 __entry->tsf = tsf;
747 ),
748
749 TP_printk(
750 LOCAL_PR_FMT " tsf:%llu",
751 LOCAL_PR_ARG, (unsigned long long)__entry->tsf
752 )
753);
754
Johannes Bergba99d932011-01-26 09:22:15 +0100755DEFINE_EVENT(local_only_evt, drv_reset_tsf,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200756 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100757 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200758);
759
Johannes Bergba99d932011-01-26 09:22:15 +0100760DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200761 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100762 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200763);
764
765TRACE_EVENT(drv_ampdu_action,
766 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100767 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200768 enum ieee80211_ampdu_mlme_action action,
769 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100770 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200771
Johannes Berg0b01f032011-01-18 13:51:05 +0100772 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200773
774 TP_STRUCT__entry(
775 LOCAL_ENTRY
776 STA_ENTRY
777 __field(u32, action)
778 __field(u16, tid)
779 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100780 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100781 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200782 ),
783
784 TP_fast_assign(
785 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100786 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200787 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200788 __entry->action = action;
789 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800790 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100791 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200792 ),
793
794 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100795 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
796 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
797 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200798 )
799);
Johannes Berga80f7c02009-12-23 13:15:32 +0100800
John W. Linvillec466d4e2010-06-29 14:51:23 -0400801TRACE_EVENT(drv_get_survey,
802 TP_PROTO(struct ieee80211_local *local, int idx,
803 struct survey_info *survey),
804
805 TP_ARGS(local, idx, survey),
806
807 TP_STRUCT__entry(
808 LOCAL_ENTRY
809 __field(int, idx)
810 ),
811
812 TP_fast_assign(
813 LOCAL_ASSIGN;
814 __entry->idx = idx;
815 ),
816
817 TP_printk(
818 LOCAL_PR_FMT " idx:%d",
819 LOCAL_PR_ARG, __entry->idx
820 )
821);
822
Johannes Berga80f7c02009-12-23 13:15:32 +0100823TRACE_EVENT(drv_flush,
824 TP_PROTO(struct ieee80211_local *local, bool drop),
825
826 TP_ARGS(local, drop),
827
828 TP_STRUCT__entry(
829 LOCAL_ENTRY
830 __field(bool, drop)
831 ),
832
833 TP_fast_assign(
834 LOCAL_ASSIGN;
835 __entry->drop = drop;
836 ),
837
838 TP_printk(
839 LOCAL_PR_FMT " drop:%d",
840 LOCAL_PR_ARG, __entry->drop
841 )
842);
Johannes Bergb5878a22010-04-07 16:48:40 +0200843
Johannes Berg5ce6e432010-05-11 16:20:57 +0200844TRACE_EVENT(drv_channel_switch,
845 TP_PROTO(struct ieee80211_local *local,
846 struct ieee80211_channel_switch *ch_switch),
847
848 TP_ARGS(local, ch_switch),
849
850 TP_STRUCT__entry(
851 LOCAL_ENTRY
852 __field(u64, timestamp)
853 __field(bool, block_tx)
854 __field(u16, freq)
855 __field(u8, count)
856 ),
857
858 TP_fast_assign(
859 LOCAL_ASSIGN;
860 __entry->timestamp = ch_switch->timestamp;
861 __entry->block_tx = ch_switch->block_tx;
862 __entry->freq = ch_switch->channel->center_freq;
863 __entry->count = ch_switch->count;
864 ),
865
866 TP_printk(
867 LOCAL_PR_FMT " new freq:%u count:%d",
868 LOCAL_PR_ARG, __entry->freq, __entry->count
869 )
870);
871
Bruno Randolf15d96752010-11-10 12:50:56 +0900872TRACE_EVENT(drv_set_antenna,
873 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
874
875 TP_ARGS(local, tx_ant, rx_ant, ret),
876
877 TP_STRUCT__entry(
878 LOCAL_ENTRY
879 __field(u32, tx_ant)
880 __field(u32, rx_ant)
881 __field(int, ret)
882 ),
883
884 TP_fast_assign(
885 LOCAL_ASSIGN;
886 __entry->tx_ant = tx_ant;
887 __entry->rx_ant = rx_ant;
888 __entry->ret = ret;
889 ),
890
891 TP_printk(
892 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
893 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
894 )
895);
896
897TRACE_EVENT(drv_get_antenna,
898 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
899
900 TP_ARGS(local, tx_ant, rx_ant, ret),
901
902 TP_STRUCT__entry(
903 LOCAL_ENTRY
904 __field(u32, tx_ant)
905 __field(u32, rx_ant)
906 __field(int, ret)
907 ),
908
909 TP_fast_assign(
910 LOCAL_ASSIGN;
911 __entry->tx_ant = tx_ant;
912 __entry->rx_ant = rx_ant;
913 __entry->ret = ret;
914 ),
915
916 TP_printk(
917 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
918 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
919 )
920);
921
Johannes Berg21f83582010-12-18 17:20:47 +0100922TRACE_EVENT(drv_remain_on_channel,
923 TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
924 enum nl80211_channel_type chantype, unsigned int duration),
925
926 TP_ARGS(local, chan, chantype, duration),
927
928 TP_STRUCT__entry(
929 LOCAL_ENTRY
930 __field(int, center_freq)
931 __field(int, channel_type)
932 __field(unsigned int, duration)
933 ),
934
935 TP_fast_assign(
936 LOCAL_ASSIGN;
937 __entry->center_freq = chan->center_freq;
938 __entry->channel_type = chantype;
939 __entry->duration = duration;
940 ),
941
942 TP_printk(
943 LOCAL_PR_FMT " freq:%dMHz duration:%dms",
944 LOCAL_PR_ARG, __entry->center_freq, __entry->duration
945 )
946);
947
Johannes Bergba99d932011-01-26 09:22:15 +0100948DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +0100949 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100950 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +0100951);
952
Johannes Berg5f16a432011-02-25 15:36:57 +0100953TRACE_EVENT(drv_offchannel_tx,
954 TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
955 struct ieee80211_channel *chan,
956 enum nl80211_channel_type channel_type,
957 unsigned int wait),
958
959 TP_ARGS(local, skb, chan, channel_type, wait),
960
961 TP_STRUCT__entry(
962 LOCAL_ENTRY
963 __field(int, center_freq)
964 __field(int, channel_type)
965 __field(unsigned int, wait)
966 ),
967
968 TP_fast_assign(
969 LOCAL_ASSIGN;
970 __entry->center_freq = chan->center_freq;
971 __entry->channel_type = channel_type;
972 __entry->wait = wait;
973 ),
974
975 TP_printk(
976 LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
977 LOCAL_PR_ARG, __entry->center_freq, __entry->wait
978 )
979);
980
John W. Linville38c09152011-03-07 16:19:18 -0500981TRACE_EVENT(drv_set_ringparam,
982 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
983
984 TP_ARGS(local, tx, rx),
985
986 TP_STRUCT__entry(
987 LOCAL_ENTRY
988 __field(u32, tx)
989 __field(u32, rx)
990 ),
991
992 TP_fast_assign(
993 LOCAL_ASSIGN;
994 __entry->tx = tx;
995 __entry->rx = rx;
996 ),
997
998 TP_printk(
999 LOCAL_PR_FMT " tx:%d rx %d",
1000 LOCAL_PR_ARG, __entry->tx, __entry->rx
1001 )
1002);
1003
1004TRACE_EVENT(drv_get_ringparam,
1005 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1006 u32 *rx, u32 *rx_max),
1007
1008 TP_ARGS(local, tx, tx_max, rx, rx_max),
1009
1010 TP_STRUCT__entry(
1011 LOCAL_ENTRY
1012 __field(u32, tx)
1013 __field(u32, tx_max)
1014 __field(u32, rx)
1015 __field(u32, rx_max)
1016 ),
1017
1018 TP_fast_assign(
1019 LOCAL_ASSIGN;
1020 __entry->tx = *tx;
1021 __entry->tx_max = *tx_max;
1022 __entry->rx = *rx;
1023 __entry->rx_max = *rx_max;
1024 ),
1025
1026 TP_printk(
1027 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1028 LOCAL_PR_ARG,
1029 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1030 )
1031);
1032
Vivek Natarajane8306f92011-04-06 11:41:10 +05301033DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1034 TP_PROTO(struct ieee80211_local *local),
1035 TP_ARGS(local)
1036);
1037
Johannes Berg5f16a432011-02-25 15:36:57 +01001038DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1039 TP_PROTO(struct ieee80211_local *local),
1040 TP_ARGS(local)
1041);
1042
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301043TRACE_EVENT(drv_set_bitrate_mask,
1044 TP_PROTO(struct ieee80211_local *local,
1045 struct ieee80211_sub_if_data *sdata,
1046 const struct cfg80211_bitrate_mask *mask),
1047
1048 TP_ARGS(local, sdata, mask),
1049
1050 TP_STRUCT__entry(
1051 LOCAL_ENTRY
1052 VIF_ENTRY
1053 __field(u32, legacy_2g)
1054 __field(u32, legacy_5g)
1055 ),
1056
1057 TP_fast_assign(
1058 LOCAL_ASSIGN;
1059 VIF_ASSIGN;
1060 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1061 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1062 ),
1063
1064 TP_printk(
1065 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1066 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1067 )
1068);
1069
Johannes Bergc68f4b82011-07-05 16:35:41 +02001070TRACE_EVENT(drv_set_rekey_data,
1071 TP_PROTO(struct ieee80211_local *local,
1072 struct ieee80211_sub_if_data *sdata,
1073 struct cfg80211_gtk_rekey_data *data),
1074
1075 TP_ARGS(local, sdata, data),
1076
1077 TP_STRUCT__entry(
1078 LOCAL_ENTRY
1079 VIF_ENTRY
1080 __array(u8, kek, NL80211_KEK_LEN)
1081 __array(u8, kck, NL80211_KCK_LEN)
1082 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1083 ),
1084
1085 TP_fast_assign(
1086 LOCAL_ASSIGN;
1087 VIF_ASSIGN;
1088 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1089 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1090 memcpy(__entry->replay_ctr, data->replay_ctr,
1091 NL80211_REPLAY_CTR_LEN);
1092 ),
1093
1094 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1095 LOCAL_PR_ARG, VIF_PR_ARG)
1096);
1097
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001098TRACE_EVENT(drv_rssi_callback,
1099 TP_PROTO(struct ieee80211_local *local,
1100 enum ieee80211_rssi_event rssi_event),
1101
1102 TP_ARGS(local, rssi_event),
1103
1104 TP_STRUCT__entry(
1105 LOCAL_ENTRY
1106 __field(u32, rssi_event)
1107 ),
1108
1109 TP_fast_assign(
1110 LOCAL_ASSIGN;
1111 __entry->rssi_event = rssi_event;
1112 ),
1113
1114 TP_printk(
1115 LOCAL_PR_FMT " rssi_event:%d",
1116 LOCAL_PR_ARG, __entry->rssi_event
1117 )
1118);
1119
Johannes Bergb5878a22010-04-07 16:48:40 +02001120/*
1121 * Tracing for API calls that drivers call.
1122 */
1123
1124TRACE_EVENT(api_start_tx_ba_session,
1125 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1126
1127 TP_ARGS(sta, tid),
1128
1129 TP_STRUCT__entry(
1130 STA_ENTRY
1131 __field(u16, tid)
1132 ),
1133
1134 TP_fast_assign(
1135 STA_ASSIGN;
1136 __entry->tid = tid;
1137 ),
1138
1139 TP_printk(
1140 STA_PR_FMT " tid:%d",
1141 STA_PR_ARG, __entry->tid
1142 )
1143);
1144
1145TRACE_EVENT(api_start_tx_ba_cb,
1146 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1147
1148 TP_ARGS(sdata, ra, tid),
1149
1150 TP_STRUCT__entry(
1151 VIF_ENTRY
1152 __array(u8, ra, ETH_ALEN)
1153 __field(u16, tid)
1154 ),
1155
1156 TP_fast_assign(
1157 VIF_ASSIGN;
1158 memcpy(__entry->ra, ra, ETH_ALEN);
1159 __entry->tid = tid;
1160 ),
1161
1162 TP_printk(
1163 VIF_PR_FMT " ra:%pM tid:%d",
1164 VIF_PR_ARG, __entry->ra, __entry->tid
1165 )
1166);
1167
1168TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001169 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001170
Johannes Berg6a8579d2010-05-27 14:41:07 +02001171 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001172
1173 TP_STRUCT__entry(
1174 STA_ENTRY
1175 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001176 ),
1177
1178 TP_fast_assign(
1179 STA_ASSIGN;
1180 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001181 ),
1182
1183 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001184 STA_PR_FMT " tid:%d",
1185 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001186 )
1187);
1188
1189TRACE_EVENT(api_stop_tx_ba_cb,
1190 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1191
1192 TP_ARGS(sdata, ra, tid),
1193
1194 TP_STRUCT__entry(
1195 VIF_ENTRY
1196 __array(u8, ra, ETH_ALEN)
1197 __field(u16, tid)
1198 ),
1199
1200 TP_fast_assign(
1201 VIF_ASSIGN;
1202 memcpy(__entry->ra, ra, ETH_ALEN);
1203 __entry->tid = tid;
1204 ),
1205
1206 TP_printk(
1207 VIF_PR_FMT " ra:%pM tid:%d",
1208 VIF_PR_ARG, __entry->ra, __entry->tid
1209 )
1210);
1211
Johannes Bergba99d932011-01-26 09:22:15 +01001212DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001213 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001214 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001215);
1216
1217TRACE_EVENT(api_beacon_loss,
1218 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1219
1220 TP_ARGS(sdata),
1221
1222 TP_STRUCT__entry(
1223 VIF_ENTRY
1224 ),
1225
1226 TP_fast_assign(
1227 VIF_ASSIGN;
1228 ),
1229
1230 TP_printk(
1231 VIF_PR_FMT,
1232 VIF_PR_ARG
1233 )
1234);
1235
1236TRACE_EVENT(api_connection_loss,
1237 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1238
1239 TP_ARGS(sdata),
1240
1241 TP_STRUCT__entry(
1242 VIF_ENTRY
1243 ),
1244
1245 TP_fast_assign(
1246 VIF_ASSIGN;
1247 ),
1248
1249 TP_printk(
1250 VIF_PR_FMT,
1251 VIF_PR_ARG
1252 )
1253);
1254
1255TRACE_EVENT(api_cqm_rssi_notify,
1256 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1257 enum nl80211_cqm_rssi_threshold_event rssi_event),
1258
1259 TP_ARGS(sdata, rssi_event),
1260
1261 TP_STRUCT__entry(
1262 VIF_ENTRY
1263 __field(u32, rssi_event)
1264 ),
1265
1266 TP_fast_assign(
1267 VIF_ASSIGN;
1268 __entry->rssi_event = rssi_event;
1269 ),
1270
1271 TP_printk(
1272 VIF_PR_FMT " event:%d",
1273 VIF_PR_ARG, __entry->rssi_event
1274 )
1275);
1276
1277TRACE_EVENT(api_scan_completed,
1278 TP_PROTO(struct ieee80211_local *local, bool aborted),
1279
1280 TP_ARGS(local, aborted),
1281
1282 TP_STRUCT__entry(
1283 LOCAL_ENTRY
1284 __field(bool, aborted)
1285 ),
1286
1287 TP_fast_assign(
1288 LOCAL_ASSIGN;
1289 __entry->aborted = aborted;
1290 ),
1291
1292 TP_printk(
1293 LOCAL_PR_FMT " aborted:%d",
1294 LOCAL_PR_ARG, __entry->aborted
1295 )
1296);
1297
Luciano Coelho79f460c2011-05-11 17:09:36 +03001298TRACE_EVENT(api_sched_scan_results,
1299 TP_PROTO(struct ieee80211_local *local),
1300
1301 TP_ARGS(local),
1302
1303 TP_STRUCT__entry(
1304 LOCAL_ENTRY
1305 ),
1306
1307 TP_fast_assign(
1308 LOCAL_ASSIGN;
1309 ),
1310
1311 TP_printk(
1312 LOCAL_PR_FMT, LOCAL_PR_ARG
1313 )
1314);
1315
1316TRACE_EVENT(api_sched_scan_stopped,
1317 TP_PROTO(struct ieee80211_local *local),
1318
1319 TP_ARGS(local),
1320
1321 TP_STRUCT__entry(
1322 LOCAL_ENTRY
1323 ),
1324
1325 TP_fast_assign(
1326 LOCAL_ASSIGN;
1327 ),
1328
1329 TP_printk(
1330 LOCAL_PR_FMT, LOCAL_PR_ARG
1331 )
1332);
1333
Johannes Bergb5878a22010-04-07 16:48:40 +02001334TRACE_EVENT(api_sta_block_awake,
1335 TP_PROTO(struct ieee80211_local *local,
1336 struct ieee80211_sta *sta, bool block),
1337
1338 TP_ARGS(local, sta, block),
1339
1340 TP_STRUCT__entry(
1341 LOCAL_ENTRY
1342 STA_ENTRY
1343 __field(bool, block)
1344 ),
1345
1346 TP_fast_assign(
1347 LOCAL_ASSIGN;
1348 STA_ASSIGN;
1349 __entry->block = block;
1350 ),
1351
1352 TP_printk(
1353 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1354 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
1355 )
1356);
1357
Johannes Berg5ce6e432010-05-11 16:20:57 +02001358TRACE_EVENT(api_chswitch_done,
1359 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1360
1361 TP_ARGS(sdata, success),
1362
1363 TP_STRUCT__entry(
1364 VIF_ENTRY
1365 __field(bool, success)
1366 ),
1367
1368 TP_fast_assign(
1369 VIF_ASSIGN;
1370 __entry->success = success;
1371 ),
1372
1373 TP_printk(
1374 VIF_PR_FMT " success=%d",
1375 VIF_PR_ARG, __entry->success
1376 )
1377);
1378
Johannes Bergba99d932011-01-26 09:22:15 +01001379DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001380 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001381 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001382);
1383
Johannes Bergba99d932011-01-26 09:22:15 +01001384DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001385 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001386 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001387);
1388
Johannes Bergc68f4b82011-07-05 16:35:41 +02001389TRACE_EVENT(api_gtk_rekey_notify,
1390 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1391 const u8 *bssid, const u8 *replay_ctr),
1392
1393 TP_ARGS(sdata, bssid, replay_ctr),
1394
1395 TP_STRUCT__entry(
1396 VIF_ENTRY
1397 __array(u8, bssid, ETH_ALEN)
1398 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1399 ),
1400
1401 TP_fast_assign(
1402 VIF_ASSIGN;
1403 memcpy(__entry->bssid, bssid, ETH_ALEN);
1404 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1405 ),
1406
1407 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1408);
1409
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001410TRACE_EVENT(api_enable_rssi_reports,
1411 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1412 int rssi_min_thold, int rssi_max_thold),
1413
1414 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1415
1416 TP_STRUCT__entry(
1417 VIF_ENTRY
1418 __field(int, rssi_min_thold)
1419 __field(int, rssi_max_thold)
1420 ),
1421
1422 TP_fast_assign(
1423 VIF_ASSIGN;
1424 __entry->rssi_min_thold = rssi_min_thold;
1425 __entry->rssi_max_thold = rssi_max_thold;
1426 ),
1427
1428 TP_printk(
1429 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
1430 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
1431 )
1432);
1433
Johannes Bergb5878a22010-04-07 16:48:40 +02001434/*
1435 * Tracing for internal functions
1436 * (which may also be called in response to driver calls)
1437 */
1438
1439TRACE_EVENT(wake_queue,
1440 TP_PROTO(struct ieee80211_local *local, u16 queue,
1441 enum queue_stop_reason reason),
1442
1443 TP_ARGS(local, queue, reason),
1444
1445 TP_STRUCT__entry(
1446 LOCAL_ENTRY
1447 __field(u16, queue)
1448 __field(u32, reason)
1449 ),
1450
1451 TP_fast_assign(
1452 LOCAL_ASSIGN;
1453 __entry->queue = queue;
1454 __entry->reason = reason;
1455 ),
1456
1457 TP_printk(
1458 LOCAL_PR_FMT " queue:%d, reason:%d",
1459 LOCAL_PR_ARG, __entry->queue, __entry->reason
1460 )
1461);
1462
1463TRACE_EVENT(stop_queue,
1464 TP_PROTO(struct ieee80211_local *local, u16 queue,
1465 enum queue_stop_reason reason),
1466
1467 TP_ARGS(local, queue, reason),
1468
1469 TP_STRUCT__entry(
1470 LOCAL_ENTRY
1471 __field(u16, queue)
1472 __field(u32, reason)
1473 ),
1474
1475 TP_fast_assign(
1476 LOCAL_ASSIGN;
1477 __entry->queue = queue;
1478 __entry->reason = reason;
1479 ),
1480
1481 TP_printk(
1482 LOCAL_PR_FMT " queue:%d, reason:%d",
1483 LOCAL_PR_ARG, __entry->queue, __entry->reason
1484 )
1485);
Christian Lamparterf7428802009-07-19 23:21:07 +02001486#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001487
1488#undef TRACE_INCLUDE_PATH
1489#define TRACE_INCLUDE_PATH .
1490#undef TRACE_INCLUDE_FILE
1491#define TRACE_INCLUDE_FILE driver-trace
1492#include <trace/define_trace.h>