blob: 11e1ea5111ea505456a76c6e52394bf8b0bc11f5 [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
Johannes Bergba99d932011-01-26 09:22:15 +010058DEFINE_EVENT(local_only_evt, drv_return_void,
59 TP_PROTO(struct ieee80211_local *local),
60 TP_ARGS(local)
61);
62
Johannes Berg4efc76b2010-06-10 10:56:20 +020063TRACE_EVENT(drv_return_int,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020064 TP_PROTO(struct ieee80211_local *local, int ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020065 TP_ARGS(local, ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020066 TP_STRUCT__entry(
67 LOCAL_ENTRY
68 __field(int, ret)
69 ),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020070 TP_fast_assign(
71 LOCAL_ASSIGN;
72 __entry->ret = ret;
73 ),
Johannes Berg4efc76b2010-06-10 10:56:20 +020074 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
75);
76
Vivek Natarajane8306f92011-04-06 11:41:10 +053077TRACE_EVENT(drv_return_bool,
78 TP_PROTO(struct ieee80211_local *local, bool ret),
79 TP_ARGS(local, ret),
80 TP_STRUCT__entry(
81 LOCAL_ENTRY
82 __field(bool, ret)
83 ),
84 TP_fast_assign(
85 LOCAL_ASSIGN;
86 __entry->ret = ret;
87 ),
88 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
89 "true" : "false")
90);
91
Johannes Berg4efc76b2010-06-10 10:56:20 +020092TRACE_EVENT(drv_return_u64,
93 TP_PROTO(struct ieee80211_local *local, u64 ret),
94 TP_ARGS(local, ret),
95 TP_STRUCT__entry(
96 LOCAL_ENTRY
97 __field(u64, ret)
98 ),
99 TP_fast_assign(
100 LOCAL_ASSIGN;
101 __entry->ret = ret;
102 ),
103 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
104);
105
Johannes Bergba99d932011-01-26 09:22:15 +0100106DEFINE_EVENT(local_only_evt, drv_start,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200107 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100108 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200109);
110
Johannes Bergeecc4802011-05-04 15:37:29 +0200111DEFINE_EVENT(local_only_evt, drv_suspend,
112 TP_PROTO(struct ieee80211_local *local),
113 TP_ARGS(local)
114);
115
116DEFINE_EVENT(local_only_evt, drv_resume,
117 TP_PROTO(struct ieee80211_local *local),
118 TP_ARGS(local)
119);
120
Johannes Bergba99d932011-01-26 09:22:15 +0100121DEFINE_EVENT(local_only_evt, drv_stop,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200122 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100123 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200124);
125
126TRACE_EVENT(drv_add_interface,
127 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200128 struct ieee80211_sub_if_data *sdata),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200129
Johannes Berg4efc76b2010-06-10 10:56:20 +0200130 TP_ARGS(local, sdata),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200131
132 TP_STRUCT__entry(
133 LOCAL_ENTRY
134 VIF_ENTRY
135 __array(char, addr, 6)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200136 ),
137
138 TP_fast_assign(
139 LOCAL_ASSIGN;
140 VIF_ASSIGN;
Johannes Berg12375ef2009-11-25 20:30:31 +0100141 memcpy(__entry->addr, sdata->vif.addr, 6);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200142 ),
143
144 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200145 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
146 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200147 )
148);
149
Johannes Berg34d4bc42010-08-27 12:35:58 +0200150TRACE_EVENT(drv_change_interface,
151 TP_PROTO(struct ieee80211_local *local,
152 struct ieee80211_sub_if_data *sdata,
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200153 enum nl80211_iftype type, bool p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200154
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200155 TP_ARGS(local, sdata, type, p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200156
157 TP_STRUCT__entry(
158 LOCAL_ENTRY
159 VIF_ENTRY
160 __field(u32, new_type)
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200161 __field(bool, new_p2p)
Johannes Berg34d4bc42010-08-27 12:35:58 +0200162 ),
163
164 TP_fast_assign(
165 LOCAL_ASSIGN;
166 VIF_ASSIGN;
167 __entry->new_type = type;
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200168 __entry->new_p2p = p2p;
Johannes Berg34d4bc42010-08-27 12:35:58 +0200169 ),
170
171 TP_printk(
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200172 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
173 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
174 __entry->new_p2p ? "/p2p" : ""
Johannes Berg34d4bc42010-08-27 12:35:58 +0200175 )
176);
177
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200178TRACE_EVENT(drv_remove_interface,
Johannes Berg12375ef2009-11-25 20:30:31 +0100179 TP_PROTO(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200180
Johannes Berg12375ef2009-11-25 20:30:31 +0100181 TP_ARGS(local, sdata),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200182
183 TP_STRUCT__entry(
184 LOCAL_ENTRY
185 VIF_ENTRY
186 __array(char, addr, 6)
187 ),
188
189 TP_fast_assign(
190 LOCAL_ASSIGN;
191 VIF_ASSIGN;
Johannes Berg12375ef2009-11-25 20:30:31 +0100192 memcpy(__entry->addr, sdata->vif.addr, 6);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200193 ),
194
195 TP_printk(
196 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
197 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
198 )
199);
200
201TRACE_EVENT(drv_config,
202 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200203 u32 changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200204
Johannes Berg4efc76b2010-06-10 10:56:20 +0200205 TP_ARGS(local, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200206
207 TP_STRUCT__entry(
208 LOCAL_ENTRY
209 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100210 __field(u32, flags)
211 __field(int, power_level)
212 __field(int, dynamic_ps_timeout)
213 __field(int, max_sleep_period)
214 __field(u16, listen_interval)
215 __field(u8, long_frame_max_tx_count)
216 __field(u8, short_frame_max_tx_count)
217 __field(int, center_freq)
218 __field(int, channel_type)
Johannes Berg0f782312009-12-01 13:37:02 +0100219 __field(int, smps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200220 ),
221
222 TP_fast_assign(
223 LOCAL_ASSIGN;
224 __entry->changed = changed;
Johannes Bergf911ab82009-11-25 19:07:20 +0100225 __entry->flags = local->hw.conf.flags;
226 __entry->power_level = local->hw.conf.power_level;
227 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
228 __entry->max_sleep_period = local->hw.conf.max_sleep_period;
229 __entry->listen_interval = local->hw.conf.listen_interval;
230 __entry->long_frame_max_tx_count = local->hw.conf.long_frame_max_tx_count;
231 __entry->short_frame_max_tx_count = local->hw.conf.short_frame_max_tx_count;
232 __entry->center_freq = local->hw.conf.channel->center_freq;
233 __entry->channel_type = local->hw.conf.channel_type;
Johannes Berg0f782312009-12-01 13:37:02 +0100234 __entry->smps = local->hw.conf.smps_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200235 ),
236
237 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200238 LOCAL_PR_FMT " ch:%#x freq:%d",
239 LOCAL_PR_ARG, __entry->changed, __entry->center_freq
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200240 )
241);
242
243TRACE_EVENT(drv_bss_info_changed,
244 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100245 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200246 struct ieee80211_bss_conf *info,
247 u32 changed),
248
Johannes Berg12375ef2009-11-25 20:30:31 +0100249 TP_ARGS(local, sdata, info, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200250
251 TP_STRUCT__entry(
252 LOCAL_ENTRY
253 VIF_ENTRY
254 __field(bool, assoc)
255 __field(u16, aid)
256 __field(bool, cts)
257 __field(bool, shortpre)
258 __field(bool, shortslot)
259 __field(u8, dtimper)
260 __field(u16, bcnint)
261 __field(u16, assoc_cap)
262 __field(u64, timestamp)
263 __field(u32, basic_rates)
264 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100265 __field(bool, enable_beacon)
266 __field(u16, ht_operation_mode)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200267 ),
268
269 TP_fast_assign(
270 LOCAL_ASSIGN;
271 VIF_ASSIGN;
272 __entry->changed = changed;
273 __entry->aid = info->aid;
274 __entry->assoc = info->assoc;
275 __entry->shortpre = info->use_short_preamble;
276 __entry->cts = info->use_cts_prot;
277 __entry->shortslot = info->use_short_slot;
278 __entry->dtimper = info->dtim_period;
279 __entry->bcnint = info->beacon_int;
280 __entry->assoc_cap = info->assoc_capability;
281 __entry->timestamp = info->timestamp;
282 __entry->basic_rates = info->basic_rates;
Johannes Bergf911ab82009-11-25 19:07:20 +0100283 __entry->enable_beacon = info->enable_beacon;
284 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200285 ),
286
287 TP_printk(
288 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
289 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
290 )
291);
292
Johannes Berg3ac64be2009-08-17 16:16:53 +0200293TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200294 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200295
Johannes Berg4efc76b2010-06-10 10:56:20 +0200296 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200297
298 TP_STRUCT__entry(
299 LOCAL_ENTRY
300 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200301 ),
302
303 TP_fast_assign(
304 LOCAL_ASSIGN;
305 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200306 ),
307
308 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200309 LOCAL_PR_FMT " prepare mc (%d)",
310 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200311 )
312);
313
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200314TRACE_EVENT(drv_configure_filter,
315 TP_PROTO(struct ieee80211_local *local,
316 unsigned int changed_flags,
317 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200318 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200319
Johannes Berg3ac64be2009-08-17 16:16:53 +0200320 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200321
322 TP_STRUCT__entry(
323 LOCAL_ENTRY
324 __field(unsigned int, changed)
325 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200326 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200327 ),
328
329 TP_fast_assign(
330 LOCAL_ASSIGN;
331 __entry->changed = changed_flags;
332 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200333 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200334 ),
335
336 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200337 LOCAL_PR_FMT " changed:%#x total:%#x",
338 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200339 )
340);
341
342TRACE_EVENT(drv_set_tim,
343 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200344 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200345
Johannes Berg4efc76b2010-06-10 10:56:20 +0200346 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200347
348 TP_STRUCT__entry(
349 LOCAL_ENTRY
350 STA_ENTRY
351 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200352 ),
353
354 TP_fast_assign(
355 LOCAL_ASSIGN;
356 STA_ASSIGN;
357 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200358 ),
359
360 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200361 LOCAL_PR_FMT STA_PR_FMT " set:%d",
362 LOCAL_PR_ARG, STA_PR_FMT, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200363 )
364);
365
366TRACE_EVENT(drv_set_key,
367 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100368 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200369 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200370 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200371
Johannes Berg4efc76b2010-06-10 10:56:20 +0200372 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200373
374 TP_STRUCT__entry(
375 LOCAL_ENTRY
376 VIF_ENTRY
377 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200378 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200379 __field(u8, hw_key_idx)
380 __field(u8, flags)
381 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200382 ),
383
384 TP_fast_assign(
385 LOCAL_ASSIGN;
386 VIF_ASSIGN;
387 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200388 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200389 __entry->flags = key->flags;
390 __entry->keyidx = key->keyidx;
391 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200392 ),
393
394 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200395 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
396 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200397 )
398);
399
400TRACE_EVENT(drv_update_tkip_key,
401 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100402 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200403 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100404 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200405
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100406 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200407
408 TP_STRUCT__entry(
409 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100410 VIF_ENTRY
411 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200412 __field(u32, iv32)
413 ),
414
415 TP_fast_assign(
416 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100417 VIF_ASSIGN;
418 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200419 __entry->iv32 = iv32;
420 ),
421
422 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100423 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
424 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200425 )
426);
427
428TRACE_EVENT(drv_hw_scan,
429 TP_PROTO(struct ieee80211_local *local,
Johannes Berga060bbf2010-04-27 11:59:34 +0200430 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200431 struct cfg80211_scan_request *req),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200432
Johannes Berg4efc76b2010-06-10 10:56:20 +0200433 TP_ARGS(local, sdata, req),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200434
435 TP_STRUCT__entry(
436 LOCAL_ENTRY
Johannes Berga060bbf2010-04-27 11:59:34 +0200437 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200438 ),
439
440 TP_fast_assign(
441 LOCAL_ASSIGN;
Johannes Berga060bbf2010-04-27 11:59:34 +0200442 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200443 ),
444
445 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200446 LOCAL_PR_FMT VIF_PR_FMT,
447 LOCAL_PR_ARG,VIF_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200448 )
449);
450
Johannes Bergba99d932011-01-26 09:22:15 +0100451DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200452 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100453 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200454);
455
Johannes Bergba99d932011-01-26 09:22:15 +0100456DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200457 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100458 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200459);
460
461TRACE_EVENT(drv_get_stats,
462 TP_PROTO(struct ieee80211_local *local,
463 struct ieee80211_low_level_stats *stats,
464 int ret),
465
466 TP_ARGS(local, stats, ret),
467
468 TP_STRUCT__entry(
469 LOCAL_ENTRY
470 __field(int, ret)
471 __field(unsigned int, ackfail)
472 __field(unsigned int, rtsfail)
473 __field(unsigned int, fcserr)
474 __field(unsigned int, rtssucc)
475 ),
476
477 TP_fast_assign(
478 LOCAL_ASSIGN;
479 __entry->ret = ret;
480 __entry->ackfail = stats->dot11ACKFailureCount;
481 __entry->rtsfail = stats->dot11RTSFailureCount;
482 __entry->fcserr = stats->dot11FCSErrorCount;
483 __entry->rtssucc = stats->dot11RTSSuccessCount;
484 ),
485
486 TP_printk(
487 LOCAL_PR_FMT " ret:%d",
488 LOCAL_PR_ARG, __entry->ret
489 )
490);
491
492TRACE_EVENT(drv_get_tkip_seq,
493 TP_PROTO(struct ieee80211_local *local,
494 u8 hw_key_idx, u32 *iv32, u16 *iv16),
495
496 TP_ARGS(local, hw_key_idx, iv32, iv16),
497
498 TP_STRUCT__entry(
499 LOCAL_ENTRY
500 __field(u8, hw_key_idx)
501 __field(u32, iv32)
502 __field(u16, iv16)
503 ),
504
505 TP_fast_assign(
506 LOCAL_ASSIGN;
507 __entry->hw_key_idx = hw_key_idx;
508 __entry->iv32 = *iv32;
509 __entry->iv16 = *iv16;
510 ),
511
512 TP_printk(
513 LOCAL_PR_FMT, LOCAL_PR_ARG
514 )
515);
516
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200517TRACE_EVENT(drv_set_frag_threshold,
518 TP_PROTO(struct ieee80211_local *local, u32 value),
519
520 TP_ARGS(local, value),
521
522 TP_STRUCT__entry(
523 LOCAL_ENTRY
524 __field(u32, value)
525 ),
526
527 TP_fast_assign(
528 LOCAL_ASSIGN;
529 __entry->value = value;
530 ),
531
532 TP_printk(
533 LOCAL_PR_FMT " value:%d",
534 LOCAL_PR_ARG, __entry->value
535 )
536);
537
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200538TRACE_EVENT(drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200539 TP_PROTO(struct ieee80211_local *local, u32 value),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200540
Johannes Berg4efc76b2010-06-10 10:56:20 +0200541 TP_ARGS(local, value),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200542
543 TP_STRUCT__entry(
544 LOCAL_ENTRY
545 __field(u32, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200546 ),
547
548 TP_fast_assign(
549 LOCAL_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200550 __entry->value = value;
551 ),
552
553 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200554 LOCAL_PR_FMT " value:%d",
555 LOCAL_PR_ARG, __entry->value
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200556 )
557);
558
Lukáš Turek310bc672009-12-21 22:50:48 +0100559TRACE_EVENT(drv_set_coverage_class,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200560 TP_PROTO(struct ieee80211_local *local, u8 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100561
Johannes Berg4efc76b2010-06-10 10:56:20 +0200562 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100563
564 TP_STRUCT__entry(
565 LOCAL_ENTRY
566 __field(u8, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100567 ),
568
569 TP_fast_assign(
570 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100571 __entry->value = value;
572 ),
573
574 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200575 LOCAL_PR_FMT " value:%d",
576 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100577 )
578);
579
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200580TRACE_EVENT(drv_sta_notify,
581 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100582 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200583 enum sta_notify_cmd cmd,
584 struct ieee80211_sta *sta),
585
Johannes Berg12375ef2009-11-25 20:30:31 +0100586 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200587
588 TP_STRUCT__entry(
589 LOCAL_ENTRY
590 VIF_ENTRY
591 STA_ENTRY
592 __field(u32, cmd)
593 ),
594
595 TP_fast_assign(
596 LOCAL_ASSIGN;
597 VIF_ASSIGN;
598 STA_ASSIGN;
599 __entry->cmd = cmd;
600 ),
601
602 TP_printk(
603 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
604 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
605 )
606);
607
Johannes Berg34e89502010-02-03 13:59:58 +0100608TRACE_EVENT(drv_sta_add,
609 TP_PROTO(struct ieee80211_local *local,
610 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200611 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100612
Johannes Berg4efc76b2010-06-10 10:56:20 +0200613 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100614
615 TP_STRUCT__entry(
616 LOCAL_ENTRY
617 VIF_ENTRY
618 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100619 ),
620
621 TP_fast_assign(
622 LOCAL_ASSIGN;
623 VIF_ASSIGN;
624 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100625 ),
626
627 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200628 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
629 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100630 )
631);
632
633TRACE_EVENT(drv_sta_remove,
634 TP_PROTO(struct ieee80211_local *local,
635 struct ieee80211_sub_if_data *sdata,
636 struct ieee80211_sta *sta),
637
638 TP_ARGS(local, sdata, sta),
639
640 TP_STRUCT__entry(
641 LOCAL_ENTRY
642 VIF_ENTRY
643 STA_ENTRY
644 ),
645
646 TP_fast_assign(
647 LOCAL_ASSIGN;
648 VIF_ASSIGN;
649 STA_ASSIGN;
650 ),
651
652 TP_printk(
653 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
654 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
655 )
656);
657
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200658TRACE_EVENT(drv_conf_tx,
659 TP_PROTO(struct ieee80211_local *local, u16 queue,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200660 const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200661
Johannes Berg4efc76b2010-06-10 10:56:20 +0200662 TP_ARGS(local, queue, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200663
664 TP_STRUCT__entry(
665 LOCAL_ENTRY
666 __field(u16, queue)
667 __field(u16, txop)
668 __field(u16, cw_min)
669 __field(u16, cw_max)
670 __field(u8, aifs)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200671 ),
672
673 TP_fast_assign(
674 LOCAL_ASSIGN;
675 __entry->queue = queue;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200676 __entry->txop = params->txop;
677 __entry->cw_max = params->cw_max;
678 __entry->cw_min = params->cw_min;
679 __entry->aifs = params->aifs;
680 ),
681
682 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200683 LOCAL_PR_FMT " queue:%d",
684 LOCAL_PR_ARG, __entry->queue
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200685 )
686);
687
Johannes Bergba99d932011-01-26 09:22:15 +0100688DEFINE_EVENT(local_only_evt, drv_get_tsf,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200689 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100690 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200691);
692
693TRACE_EVENT(drv_set_tsf,
694 TP_PROTO(struct ieee80211_local *local, u64 tsf),
695
696 TP_ARGS(local, tsf),
697
698 TP_STRUCT__entry(
699 LOCAL_ENTRY
700 __field(u64, tsf)
701 ),
702
703 TP_fast_assign(
704 LOCAL_ASSIGN;
705 __entry->tsf = tsf;
706 ),
707
708 TP_printk(
709 LOCAL_PR_FMT " tsf:%llu",
710 LOCAL_PR_ARG, (unsigned long long)__entry->tsf
711 )
712);
713
Johannes Bergba99d932011-01-26 09:22:15 +0100714DEFINE_EVENT(local_only_evt, drv_reset_tsf,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200715 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100716 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200717);
718
Johannes Bergba99d932011-01-26 09:22:15 +0100719DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200720 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100721 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200722);
723
724TRACE_EVENT(drv_ampdu_action,
725 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100726 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200727 enum ieee80211_ampdu_mlme_action action,
728 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100729 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200730
Johannes Berg0b01f032011-01-18 13:51:05 +0100731 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200732
733 TP_STRUCT__entry(
734 LOCAL_ENTRY
735 STA_ENTRY
736 __field(u32, action)
737 __field(u16, tid)
738 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100739 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100740 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200741 ),
742
743 TP_fast_assign(
744 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100745 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200746 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200747 __entry->action = action;
748 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800749 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100750 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200751 ),
752
753 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100754 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
755 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
756 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200757 )
758);
Johannes Berga80f7c02009-12-23 13:15:32 +0100759
John W. Linvillec466d4e2010-06-29 14:51:23 -0400760TRACE_EVENT(drv_get_survey,
761 TP_PROTO(struct ieee80211_local *local, int idx,
762 struct survey_info *survey),
763
764 TP_ARGS(local, idx, survey),
765
766 TP_STRUCT__entry(
767 LOCAL_ENTRY
768 __field(int, idx)
769 ),
770
771 TP_fast_assign(
772 LOCAL_ASSIGN;
773 __entry->idx = idx;
774 ),
775
776 TP_printk(
777 LOCAL_PR_FMT " idx:%d",
778 LOCAL_PR_ARG, __entry->idx
779 )
780);
781
Johannes Berga80f7c02009-12-23 13:15:32 +0100782TRACE_EVENT(drv_flush,
783 TP_PROTO(struct ieee80211_local *local, bool drop),
784
785 TP_ARGS(local, drop),
786
787 TP_STRUCT__entry(
788 LOCAL_ENTRY
789 __field(bool, drop)
790 ),
791
792 TP_fast_assign(
793 LOCAL_ASSIGN;
794 __entry->drop = drop;
795 ),
796
797 TP_printk(
798 LOCAL_PR_FMT " drop:%d",
799 LOCAL_PR_ARG, __entry->drop
800 )
801);
Johannes Bergb5878a22010-04-07 16:48:40 +0200802
Johannes Berg5ce6e432010-05-11 16:20:57 +0200803TRACE_EVENT(drv_channel_switch,
804 TP_PROTO(struct ieee80211_local *local,
805 struct ieee80211_channel_switch *ch_switch),
806
807 TP_ARGS(local, ch_switch),
808
809 TP_STRUCT__entry(
810 LOCAL_ENTRY
811 __field(u64, timestamp)
812 __field(bool, block_tx)
813 __field(u16, freq)
814 __field(u8, count)
815 ),
816
817 TP_fast_assign(
818 LOCAL_ASSIGN;
819 __entry->timestamp = ch_switch->timestamp;
820 __entry->block_tx = ch_switch->block_tx;
821 __entry->freq = ch_switch->channel->center_freq;
822 __entry->count = ch_switch->count;
823 ),
824
825 TP_printk(
826 LOCAL_PR_FMT " new freq:%u count:%d",
827 LOCAL_PR_ARG, __entry->freq, __entry->count
828 )
829);
830
Bruno Randolf15d96752010-11-10 12:50:56 +0900831TRACE_EVENT(drv_set_antenna,
832 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
833
834 TP_ARGS(local, tx_ant, rx_ant, ret),
835
836 TP_STRUCT__entry(
837 LOCAL_ENTRY
838 __field(u32, tx_ant)
839 __field(u32, rx_ant)
840 __field(int, ret)
841 ),
842
843 TP_fast_assign(
844 LOCAL_ASSIGN;
845 __entry->tx_ant = tx_ant;
846 __entry->rx_ant = rx_ant;
847 __entry->ret = ret;
848 ),
849
850 TP_printk(
851 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
852 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
853 )
854);
855
856TRACE_EVENT(drv_get_antenna,
857 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
858
859 TP_ARGS(local, tx_ant, rx_ant, ret),
860
861 TP_STRUCT__entry(
862 LOCAL_ENTRY
863 __field(u32, tx_ant)
864 __field(u32, rx_ant)
865 __field(int, ret)
866 ),
867
868 TP_fast_assign(
869 LOCAL_ASSIGN;
870 __entry->tx_ant = tx_ant;
871 __entry->rx_ant = rx_ant;
872 __entry->ret = ret;
873 ),
874
875 TP_printk(
876 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
877 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
878 )
879);
880
Johannes Berg21f83582010-12-18 17:20:47 +0100881TRACE_EVENT(drv_remain_on_channel,
882 TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
883 enum nl80211_channel_type chantype, unsigned int duration),
884
885 TP_ARGS(local, chan, chantype, duration),
886
887 TP_STRUCT__entry(
888 LOCAL_ENTRY
889 __field(int, center_freq)
890 __field(int, channel_type)
891 __field(unsigned int, duration)
892 ),
893
894 TP_fast_assign(
895 LOCAL_ASSIGN;
896 __entry->center_freq = chan->center_freq;
897 __entry->channel_type = chantype;
898 __entry->duration = duration;
899 ),
900
901 TP_printk(
902 LOCAL_PR_FMT " freq:%dMHz duration:%dms",
903 LOCAL_PR_ARG, __entry->center_freq, __entry->duration
904 )
905);
906
Johannes Bergba99d932011-01-26 09:22:15 +0100907DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +0100908 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100909 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +0100910);
911
Johannes Berg5f16a432011-02-25 15:36:57 +0100912TRACE_EVENT(drv_offchannel_tx,
913 TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
914 struct ieee80211_channel *chan,
915 enum nl80211_channel_type channel_type,
916 unsigned int wait),
917
918 TP_ARGS(local, skb, chan, channel_type, wait),
919
920 TP_STRUCT__entry(
921 LOCAL_ENTRY
922 __field(int, center_freq)
923 __field(int, channel_type)
924 __field(unsigned int, wait)
925 ),
926
927 TP_fast_assign(
928 LOCAL_ASSIGN;
929 __entry->center_freq = chan->center_freq;
930 __entry->channel_type = channel_type;
931 __entry->wait = wait;
932 ),
933
934 TP_printk(
935 LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
936 LOCAL_PR_ARG, __entry->center_freq, __entry->wait
937 )
938);
939
John W. Linville38c09152011-03-07 16:19:18 -0500940TRACE_EVENT(drv_set_ringparam,
941 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
942
943 TP_ARGS(local, tx, rx),
944
945 TP_STRUCT__entry(
946 LOCAL_ENTRY
947 __field(u32, tx)
948 __field(u32, rx)
949 ),
950
951 TP_fast_assign(
952 LOCAL_ASSIGN;
953 __entry->tx = tx;
954 __entry->rx = rx;
955 ),
956
957 TP_printk(
958 LOCAL_PR_FMT " tx:%d rx %d",
959 LOCAL_PR_ARG, __entry->tx, __entry->rx
960 )
961);
962
963TRACE_EVENT(drv_get_ringparam,
964 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
965 u32 *rx, u32 *rx_max),
966
967 TP_ARGS(local, tx, tx_max, rx, rx_max),
968
969 TP_STRUCT__entry(
970 LOCAL_ENTRY
971 __field(u32, tx)
972 __field(u32, tx_max)
973 __field(u32, rx)
974 __field(u32, rx_max)
975 ),
976
977 TP_fast_assign(
978 LOCAL_ASSIGN;
979 __entry->tx = *tx;
980 __entry->tx_max = *tx_max;
981 __entry->rx = *rx;
982 __entry->rx_max = *rx_max;
983 ),
984
985 TP_printk(
986 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
987 LOCAL_PR_ARG,
988 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
989 )
990);
991
Vivek Natarajane8306f92011-04-06 11:41:10 +0530992DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
993 TP_PROTO(struct ieee80211_local *local),
994 TP_ARGS(local)
995);
996
Johannes Berg5f16a432011-02-25 15:36:57 +0100997DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
998 TP_PROTO(struct ieee80211_local *local),
999 TP_ARGS(local)
1000);
1001
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301002TRACE_EVENT(drv_set_bitrate_mask,
1003 TP_PROTO(struct ieee80211_local *local,
1004 struct ieee80211_sub_if_data *sdata,
1005 const struct cfg80211_bitrate_mask *mask),
1006
1007 TP_ARGS(local, sdata, mask),
1008
1009 TP_STRUCT__entry(
1010 LOCAL_ENTRY
1011 VIF_ENTRY
1012 __field(u32, legacy_2g)
1013 __field(u32, legacy_5g)
1014 ),
1015
1016 TP_fast_assign(
1017 LOCAL_ASSIGN;
1018 VIF_ASSIGN;
1019 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1020 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1021 ),
1022
1023 TP_printk(
1024 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1025 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1026 )
1027);
1028
Johannes Bergb5878a22010-04-07 16:48:40 +02001029/*
1030 * Tracing for API calls that drivers call.
1031 */
1032
1033TRACE_EVENT(api_start_tx_ba_session,
1034 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1035
1036 TP_ARGS(sta, tid),
1037
1038 TP_STRUCT__entry(
1039 STA_ENTRY
1040 __field(u16, tid)
1041 ),
1042
1043 TP_fast_assign(
1044 STA_ASSIGN;
1045 __entry->tid = tid;
1046 ),
1047
1048 TP_printk(
1049 STA_PR_FMT " tid:%d",
1050 STA_PR_ARG, __entry->tid
1051 )
1052);
1053
1054TRACE_EVENT(api_start_tx_ba_cb,
1055 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1056
1057 TP_ARGS(sdata, ra, tid),
1058
1059 TP_STRUCT__entry(
1060 VIF_ENTRY
1061 __array(u8, ra, ETH_ALEN)
1062 __field(u16, tid)
1063 ),
1064
1065 TP_fast_assign(
1066 VIF_ASSIGN;
1067 memcpy(__entry->ra, ra, ETH_ALEN);
1068 __entry->tid = tid;
1069 ),
1070
1071 TP_printk(
1072 VIF_PR_FMT " ra:%pM tid:%d",
1073 VIF_PR_ARG, __entry->ra, __entry->tid
1074 )
1075);
1076
1077TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001078 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001079
Johannes Berg6a8579d2010-05-27 14:41:07 +02001080 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001081
1082 TP_STRUCT__entry(
1083 STA_ENTRY
1084 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001085 ),
1086
1087 TP_fast_assign(
1088 STA_ASSIGN;
1089 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001090 ),
1091
1092 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001093 STA_PR_FMT " tid:%d",
1094 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001095 )
1096);
1097
1098TRACE_EVENT(api_stop_tx_ba_cb,
1099 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1100
1101 TP_ARGS(sdata, ra, tid),
1102
1103 TP_STRUCT__entry(
1104 VIF_ENTRY
1105 __array(u8, ra, ETH_ALEN)
1106 __field(u16, tid)
1107 ),
1108
1109 TP_fast_assign(
1110 VIF_ASSIGN;
1111 memcpy(__entry->ra, ra, ETH_ALEN);
1112 __entry->tid = tid;
1113 ),
1114
1115 TP_printk(
1116 VIF_PR_FMT " ra:%pM tid:%d",
1117 VIF_PR_ARG, __entry->ra, __entry->tid
1118 )
1119);
1120
Johannes Bergba99d932011-01-26 09:22:15 +01001121DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001122 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001123 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001124);
1125
1126TRACE_EVENT(api_beacon_loss,
1127 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1128
1129 TP_ARGS(sdata),
1130
1131 TP_STRUCT__entry(
1132 VIF_ENTRY
1133 ),
1134
1135 TP_fast_assign(
1136 VIF_ASSIGN;
1137 ),
1138
1139 TP_printk(
1140 VIF_PR_FMT,
1141 VIF_PR_ARG
1142 )
1143);
1144
1145TRACE_EVENT(api_connection_loss,
1146 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1147
1148 TP_ARGS(sdata),
1149
1150 TP_STRUCT__entry(
1151 VIF_ENTRY
1152 ),
1153
1154 TP_fast_assign(
1155 VIF_ASSIGN;
1156 ),
1157
1158 TP_printk(
1159 VIF_PR_FMT,
1160 VIF_PR_ARG
1161 )
1162);
1163
1164TRACE_EVENT(api_cqm_rssi_notify,
1165 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1166 enum nl80211_cqm_rssi_threshold_event rssi_event),
1167
1168 TP_ARGS(sdata, rssi_event),
1169
1170 TP_STRUCT__entry(
1171 VIF_ENTRY
1172 __field(u32, rssi_event)
1173 ),
1174
1175 TP_fast_assign(
1176 VIF_ASSIGN;
1177 __entry->rssi_event = rssi_event;
1178 ),
1179
1180 TP_printk(
1181 VIF_PR_FMT " event:%d",
1182 VIF_PR_ARG, __entry->rssi_event
1183 )
1184);
1185
1186TRACE_EVENT(api_scan_completed,
1187 TP_PROTO(struct ieee80211_local *local, bool aborted),
1188
1189 TP_ARGS(local, aborted),
1190
1191 TP_STRUCT__entry(
1192 LOCAL_ENTRY
1193 __field(bool, aborted)
1194 ),
1195
1196 TP_fast_assign(
1197 LOCAL_ASSIGN;
1198 __entry->aborted = aborted;
1199 ),
1200
1201 TP_printk(
1202 LOCAL_PR_FMT " aborted:%d",
1203 LOCAL_PR_ARG, __entry->aborted
1204 )
1205);
1206
1207TRACE_EVENT(api_sta_block_awake,
1208 TP_PROTO(struct ieee80211_local *local,
1209 struct ieee80211_sta *sta, bool block),
1210
1211 TP_ARGS(local, sta, block),
1212
1213 TP_STRUCT__entry(
1214 LOCAL_ENTRY
1215 STA_ENTRY
1216 __field(bool, block)
1217 ),
1218
1219 TP_fast_assign(
1220 LOCAL_ASSIGN;
1221 STA_ASSIGN;
1222 __entry->block = block;
1223 ),
1224
1225 TP_printk(
1226 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1227 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
1228 )
1229);
1230
Johannes Berg5ce6e432010-05-11 16:20:57 +02001231TRACE_EVENT(api_chswitch_done,
1232 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1233
1234 TP_ARGS(sdata, success),
1235
1236 TP_STRUCT__entry(
1237 VIF_ENTRY
1238 __field(bool, success)
1239 ),
1240
1241 TP_fast_assign(
1242 VIF_ASSIGN;
1243 __entry->success = success;
1244 ),
1245
1246 TP_printk(
1247 VIF_PR_FMT " success=%d",
1248 VIF_PR_ARG, __entry->success
1249 )
1250);
1251
Johannes Bergba99d932011-01-26 09:22:15 +01001252DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001253 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001254 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001255);
1256
Johannes Bergba99d932011-01-26 09:22:15 +01001257DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001258 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001259 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001260);
1261
Johannes Bergb5878a22010-04-07 16:48:40 +02001262/*
1263 * Tracing for internal functions
1264 * (which may also be called in response to driver calls)
1265 */
1266
1267TRACE_EVENT(wake_queue,
1268 TP_PROTO(struct ieee80211_local *local, u16 queue,
1269 enum queue_stop_reason reason),
1270
1271 TP_ARGS(local, queue, reason),
1272
1273 TP_STRUCT__entry(
1274 LOCAL_ENTRY
1275 __field(u16, queue)
1276 __field(u32, reason)
1277 ),
1278
1279 TP_fast_assign(
1280 LOCAL_ASSIGN;
1281 __entry->queue = queue;
1282 __entry->reason = reason;
1283 ),
1284
1285 TP_printk(
1286 LOCAL_PR_FMT " queue:%d, reason:%d",
1287 LOCAL_PR_ARG, __entry->queue, __entry->reason
1288 )
1289);
1290
1291TRACE_EVENT(stop_queue,
1292 TP_PROTO(struct ieee80211_local *local, u16 queue,
1293 enum queue_stop_reason reason),
1294
1295 TP_ARGS(local, queue, reason),
1296
1297 TP_STRUCT__entry(
1298 LOCAL_ENTRY
1299 __field(u16, queue)
1300 __field(u32, reason)
1301 ),
1302
1303 TP_fast_assign(
1304 LOCAL_ASSIGN;
1305 __entry->queue = queue;
1306 __entry->reason = reason;
1307 ),
1308
1309 TP_printk(
1310 LOCAL_PR_FMT " queue:%d, reason:%d",
1311 LOCAL_PR_ARG, __entry->queue, __entry->reason
1312 )
1313);
Christian Lamparterf7428802009-07-19 23:21:07 +02001314#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001315
1316#undef TRACE_INCLUDE_PATH
1317#define TRACE_INCLUDE_PATH .
1318#undef TRACE_INCLUDE_FILE
1319#define TRACE_INCLUDE_FILE driver-trace
1320#include <trace/define_trace.h>