blob: 5e74e77cba9a0caf7242a62d3fd139206846fc68 [file] [log] [blame]
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001#if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
2#define __MAC80211_DRIVER_TRACE
3
4#include <linux/tracepoint.h>
5#include <net/mac80211.h>
6#include "ieee80211_i.h"
7
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02008#undef TRACE_SYSTEM
9#define TRACE_SYSTEM mac80211
10
11#define MAXNAME 32
12#define LOCAL_ENTRY __array(char, wiphy_name, 32)
13#define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME)
14#define LOCAL_PR_FMT "%s"
15#define LOCAL_PR_ARG __entry->wiphy_name
16
17#define STA_ENTRY __array(char, sta_addr, ETH_ALEN)
18#define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN))
19#define STA_PR_FMT " sta:%pM"
20#define STA_PR_ARG __entry->sta_addr
21
Johannes Berg2ca27bc2010-09-16 14:58:23 +020022#define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
23 __field(bool, p2p) \
Johannes Berg12375ef2009-11-25 20:30:31 +010024 __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
Johannes Berg2ca27bc2010-09-16 14:58:23 +020025#define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
26 __entry->p2p = sdata->vif.p2p; \
Johannes Bergf142c6b2012-06-18 20:07:15 +020027 __assign_str(vif_name, sdata->dev ? sdata->dev->name : sdata->name)
Johannes Berg2ca27bc2010-09-16 14:58:23 +020028#define VIF_PR_FMT " vif:%s(%d%s)"
29#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020030
Michal Kaziorc3645ea2012-06-26 14:37:17 +020031#define CHANCTX_ENTRY __field(int, freq) \
Johannes Berg04ecd252012-09-11 14:34:12 +020032 __field(int, chantype) \
33 __field(u8, rx_chains_static) \
34 __field(u8, rx_chains_dynamic)
Michal Kaziorc3645ea2012-06-26 14:37:17 +020035#define CHANCTX_ASSIGN __entry->freq = ctx->conf.channel->center_freq; \
Johannes Berg04ecd252012-09-11 14:34:12 +020036 __entry->chantype = ctx->conf.channel_type; \
37 __entry->rx_chains_static = ctx->conf.rx_chains_static; \
38 __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic
39#define CHANCTX_PR_FMT " freq:%d MHz chantype:%d chains:%d/%d"
40#define CHANCTX_PR_ARG __entry->freq, __entry->chantype, \
41 __entry->rx_chains_static, __entry->rx_chains_dynamic
Michal Kaziorc3645ea2012-06-26 14:37:17 +020042
43
44
Johannes Bergb5878a22010-04-07 16:48:40 +020045/*
46 * Tracing for driver callbacks.
47 */
48
Johannes Bergba99d932011-01-26 09:22:15 +010049DECLARE_EVENT_CLASS(local_only_evt,
Johannes Berg4efc76b2010-06-10 10:56:20 +020050 TP_PROTO(struct ieee80211_local *local),
51 TP_ARGS(local),
52 TP_STRUCT__entry(
53 LOCAL_ENTRY
54 ),
55 TP_fast_assign(
56 LOCAL_ASSIGN;
57 ),
58 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
59);
60
Luciano Coelho92ddc112011-05-09 14:40:06 +030061DECLARE_EVENT_CLASS(local_sdata_addr_evt,
62 TP_PROTO(struct ieee80211_local *local,
63 struct ieee80211_sub_if_data *sdata),
64 TP_ARGS(local, sdata),
65
66 TP_STRUCT__entry(
67 LOCAL_ENTRY
68 VIF_ENTRY
69 __array(char, addr, 6)
70 ),
71
72 TP_fast_assign(
73 LOCAL_ASSIGN;
74 VIF_ASSIGN;
75 memcpy(__entry->addr, sdata->vif.addr, 6);
76 ),
77
78 TP_printk(
79 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
80 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
81 )
82);
83
84DECLARE_EVENT_CLASS(local_u32_evt,
85 TP_PROTO(struct ieee80211_local *local, u32 value),
86 TP_ARGS(local, value),
87
88 TP_STRUCT__entry(
89 LOCAL_ENTRY
90 __field(u32, value)
91 ),
92
93 TP_fast_assign(
94 LOCAL_ASSIGN;
95 __entry->value = value;
96 ),
97
98 TP_printk(
99 LOCAL_PR_FMT " value:%d",
100 LOCAL_PR_ARG, __entry->value
101 )
102);
103
Luciano Coelho79f460c2011-05-11 17:09:36 +0300104DECLARE_EVENT_CLASS(local_sdata_evt,
105 TP_PROTO(struct ieee80211_local *local,
106 struct ieee80211_sub_if_data *sdata),
107 TP_ARGS(local, sdata),
108
109 TP_STRUCT__entry(
110 LOCAL_ENTRY
111 VIF_ENTRY
112 ),
113
114 TP_fast_assign(
115 LOCAL_ASSIGN;
116 VIF_ASSIGN;
117 ),
118
119 TP_printk(
120 LOCAL_PR_FMT VIF_PR_FMT,
121 LOCAL_PR_ARG, VIF_PR_ARG
122 )
123);
124
Johannes Bergba99d932011-01-26 09:22:15 +0100125DEFINE_EVENT(local_only_evt, drv_return_void,
126 TP_PROTO(struct ieee80211_local *local),
127 TP_ARGS(local)
128);
129
Johannes Berg4efc76b2010-06-10 10:56:20 +0200130TRACE_EVENT(drv_return_int,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200131 TP_PROTO(struct ieee80211_local *local, int ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200132 TP_ARGS(local, ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200133 TP_STRUCT__entry(
134 LOCAL_ENTRY
135 __field(int, ret)
136 ),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200137 TP_fast_assign(
138 LOCAL_ASSIGN;
139 __entry->ret = ret;
140 ),
Johannes Berg4efc76b2010-06-10 10:56:20 +0200141 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
142);
143
Vivek Natarajane8306f92011-04-06 11:41:10 +0530144TRACE_EVENT(drv_return_bool,
145 TP_PROTO(struct ieee80211_local *local, bool ret),
146 TP_ARGS(local, ret),
147 TP_STRUCT__entry(
148 LOCAL_ENTRY
149 __field(bool, ret)
150 ),
151 TP_fast_assign(
152 LOCAL_ASSIGN;
153 __entry->ret = ret;
154 ),
155 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
156 "true" : "false")
157);
158
Johannes Berg4efc76b2010-06-10 10:56:20 +0200159TRACE_EVENT(drv_return_u64,
160 TP_PROTO(struct ieee80211_local *local, u64 ret),
161 TP_ARGS(local, ret),
162 TP_STRUCT__entry(
163 LOCAL_ENTRY
164 __field(u64, ret)
165 ),
166 TP_fast_assign(
167 LOCAL_ASSIGN;
168 __entry->ret = ret;
169 ),
170 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
171);
172
Johannes Bergba99d932011-01-26 09:22:15 +0100173DEFINE_EVENT(local_only_evt, drv_start,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200174 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100175 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200176);
177
Ben Greeare3521142012-04-23 12:50:31 -0700178DEFINE_EVENT(local_u32_evt, drv_get_et_strings,
179 TP_PROTO(struct ieee80211_local *local, u32 sset),
180 TP_ARGS(local, sset)
181);
182
183DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count,
184 TP_PROTO(struct ieee80211_local *local, u32 sset),
185 TP_ARGS(local, sset)
186);
187
188DEFINE_EVENT(local_only_evt, drv_get_et_stats,
189 TP_PROTO(struct ieee80211_local *local),
190 TP_ARGS(local)
191);
192
Johannes Bergeecc4802011-05-04 15:37:29 +0200193DEFINE_EVENT(local_only_evt, drv_suspend,
194 TP_PROTO(struct ieee80211_local *local),
195 TP_ARGS(local)
196);
197
198DEFINE_EVENT(local_only_evt, drv_resume,
199 TP_PROTO(struct ieee80211_local *local),
200 TP_ARGS(local)
201);
202
Johannes Berg6d525632012-04-04 15:05:25 +0200203TRACE_EVENT(drv_set_wakeup,
204 TP_PROTO(struct ieee80211_local *local, bool enabled),
205 TP_ARGS(local, enabled),
206 TP_STRUCT__entry(
207 LOCAL_ENTRY
208 __field(bool, enabled)
209 ),
210 TP_fast_assign(
211 LOCAL_ASSIGN;
212 __entry->enabled = enabled;
213 ),
214 TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
215);
216
Johannes Bergba99d932011-01-26 09:22:15 +0100217DEFINE_EVENT(local_only_evt, drv_stop,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200218 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100219 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200220);
221
Luciano Coelho92ddc112011-05-09 14:40:06 +0300222DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200223 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200224 struct ieee80211_sub_if_data *sdata),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300225 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200226);
227
Johannes Berg34d4bc42010-08-27 12:35:58 +0200228TRACE_EVENT(drv_change_interface,
229 TP_PROTO(struct ieee80211_local *local,
230 struct ieee80211_sub_if_data *sdata,
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200231 enum nl80211_iftype type, bool p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200232
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200233 TP_ARGS(local, sdata, type, p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200234
235 TP_STRUCT__entry(
236 LOCAL_ENTRY
237 VIF_ENTRY
238 __field(u32, new_type)
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200239 __field(bool, new_p2p)
Johannes Berg34d4bc42010-08-27 12:35:58 +0200240 ),
241
242 TP_fast_assign(
243 LOCAL_ASSIGN;
244 VIF_ASSIGN;
245 __entry->new_type = type;
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200246 __entry->new_p2p = p2p;
Johannes Berg34d4bc42010-08-27 12:35:58 +0200247 ),
248
249 TP_printk(
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200250 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
251 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
252 __entry->new_p2p ? "/p2p" : ""
Johannes Berg34d4bc42010-08-27 12:35:58 +0200253 )
254);
255
Luciano Coelho92ddc112011-05-09 14:40:06 +0300256DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
257 TP_PROTO(struct ieee80211_local *local,
258 struct ieee80211_sub_if_data *sdata),
259 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200260);
261
262TRACE_EVENT(drv_config,
263 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200264 u32 changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200265
Johannes Berg4efc76b2010-06-10 10:56:20 +0200266 TP_ARGS(local, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200267
268 TP_STRUCT__entry(
269 LOCAL_ENTRY
270 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100271 __field(u32, flags)
272 __field(int, power_level)
273 __field(int, dynamic_ps_timeout)
274 __field(int, max_sleep_period)
275 __field(u16, listen_interval)
276 __field(u8, long_frame_max_tx_count)
277 __field(u8, short_frame_max_tx_count)
278 __field(int, center_freq)
279 __field(int, channel_type)
Johannes Berg0f782312009-12-01 13:37:02 +0100280 __field(int, smps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200281 ),
282
283 TP_fast_assign(
284 LOCAL_ASSIGN;
285 __entry->changed = changed;
Johannes Bergf911ab82009-11-25 19:07:20 +0100286 __entry->flags = local->hw.conf.flags;
287 __entry->power_level = local->hw.conf.power_level;
288 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
289 __entry->max_sleep_period = local->hw.conf.max_sleep_period;
290 __entry->listen_interval = local->hw.conf.listen_interval;
Johannes Berg3d01be72012-07-26 14:27:39 +0200291 __entry->long_frame_max_tx_count =
292 local->hw.conf.long_frame_max_tx_count;
293 __entry->short_frame_max_tx_count =
294 local->hw.conf.short_frame_max_tx_count;
295 __entry->center_freq = local->hw.conf.channel ?
296 local->hw.conf.channel->center_freq : 0;
Johannes Bergf911ab82009-11-25 19:07:20 +0100297 __entry->channel_type = local->hw.conf.channel_type;
Johannes Berg0f782312009-12-01 13:37:02 +0100298 __entry->smps = local->hw.conf.smps_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200299 ),
300
301 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200302 LOCAL_PR_FMT " ch:%#x freq:%d",
303 LOCAL_PR_ARG, __entry->changed, __entry->center_freq
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200304 )
305);
306
307TRACE_EVENT(drv_bss_info_changed,
308 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100309 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200310 struct ieee80211_bss_conf *info,
311 u32 changed),
312
Johannes Berg12375ef2009-11-25 20:30:31 +0100313 TP_ARGS(local, sdata, info, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200314
315 TP_STRUCT__entry(
316 LOCAL_ENTRY
317 VIF_ENTRY
Johannes Berg1724ffb2012-10-24 11:38:30 +0200318 __field(u32, changed)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200319 __field(bool, assoc)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200320 __field(bool, ibss_joined)
321 __field(bool, ibss_creator)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200322 __field(u16, aid)
323 __field(bool, cts)
324 __field(bool, shortpre)
325 __field(bool, shortslot)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200326 __field(bool, enable_beacon)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200327 __field(u8, dtimper)
328 __field(u16, bcnint)
329 __field(u16, assoc_cap)
Johannes Berg8c358bc2012-05-22 22:13:05 +0200330 __field(u64, sync_tsf)
331 __field(u32, sync_device_ts)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200332 __field(u32, basic_rates)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200333 __array(int, mcast_rate, IEEE80211_NUM_BANDS)
Johannes Bergf911ab82009-11-25 19:07:20 +0100334 __field(u16, ht_operation_mode)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200335 __field(s32, cqm_rssi_thold);
336 __field(s32, cqm_rssi_hyst);
337 __field(u32, channel_type);
338 __dynamic_array(u32, arp_addr_list, info->arp_addr_cnt);
339 __field(bool, arp_filter_enabled);
340 __field(bool, qos);
341 __field(bool, idle);
342 __field(bool, ps);
343 __dynamic_array(u8, ssid, info->ssid_len);
344 __field(bool, hidden_ssid);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200345 ),
346
347 TP_fast_assign(
348 LOCAL_ASSIGN;
349 VIF_ASSIGN;
350 __entry->changed = changed;
351 __entry->aid = info->aid;
352 __entry->assoc = info->assoc;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200353 __entry->ibss_joined = info->ibss_joined;
354 __entry->ibss_creator = info->ibss_creator;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200355 __entry->shortpre = info->use_short_preamble;
356 __entry->cts = info->use_cts_prot;
357 __entry->shortslot = info->use_short_slot;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200358 __entry->enable_beacon = info->enable_beacon;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200359 __entry->dtimper = info->dtim_period;
360 __entry->bcnint = info->beacon_int;
361 __entry->assoc_cap = info->assoc_capability;
Johannes Berg8c358bc2012-05-22 22:13:05 +0200362 __entry->sync_tsf = info->sync_tsf;
363 __entry->sync_device_ts = info->sync_device_ts;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200364 __entry->basic_rates = info->basic_rates;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200365 memcpy(__entry->mcast_rate, info->mcast_rate,
366 sizeof(__entry->mcast_rate));
Johannes Bergf911ab82009-11-25 19:07:20 +0100367 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200368 __entry->cqm_rssi_thold = info->cqm_rssi_thold;
369 __entry->cqm_rssi_hyst = info->cqm_rssi_hyst;
370 __entry->channel_type = info->channel_type;
371 memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list,
372 sizeof(u32) * info->arp_addr_cnt);
373 __entry->arp_filter_enabled = info->arp_filter_enabled;
374 __entry->qos = info->qos;
375 __entry->idle = info->idle;
376 __entry->ps = info->ps;
377 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
378 __entry->hidden_ssid = info->hidden_ssid;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200379 ),
380
381 TP_printk(
382 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
383 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
384 )
385);
386
Johannes Berg3ac64be2009-08-17 16:16:53 +0200387TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200388 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200389
Johannes Berg4efc76b2010-06-10 10:56:20 +0200390 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200391
392 TP_STRUCT__entry(
393 LOCAL_ENTRY
394 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200395 ),
396
397 TP_fast_assign(
398 LOCAL_ASSIGN;
399 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200400 ),
401
402 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200403 LOCAL_PR_FMT " prepare mc (%d)",
404 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200405 )
406);
407
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200408TRACE_EVENT(drv_configure_filter,
409 TP_PROTO(struct ieee80211_local *local,
410 unsigned int changed_flags,
411 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200412 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200413
Johannes Berg3ac64be2009-08-17 16:16:53 +0200414 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200415
416 TP_STRUCT__entry(
417 LOCAL_ENTRY
418 __field(unsigned int, changed)
419 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200420 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200421 ),
422
423 TP_fast_assign(
424 LOCAL_ASSIGN;
425 __entry->changed = changed_flags;
426 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200427 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200428 ),
429
430 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200431 LOCAL_PR_FMT " changed:%#x total:%#x",
432 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200433 )
434);
435
436TRACE_EVENT(drv_set_tim,
437 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200438 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200439
Johannes Berg4efc76b2010-06-10 10:56:20 +0200440 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200441
442 TP_STRUCT__entry(
443 LOCAL_ENTRY
444 STA_ENTRY
445 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200446 ),
447
448 TP_fast_assign(
449 LOCAL_ASSIGN;
450 STA_ASSIGN;
451 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200452 ),
453
454 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200455 LOCAL_PR_FMT STA_PR_FMT " set:%d",
456 LOCAL_PR_ARG, STA_PR_FMT, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200457 )
458);
459
460TRACE_EVENT(drv_set_key,
461 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100462 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200463 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200464 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200465
Johannes Berg4efc76b2010-06-10 10:56:20 +0200466 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200467
468 TP_STRUCT__entry(
469 LOCAL_ENTRY
470 VIF_ENTRY
471 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200472 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200473 __field(u8, hw_key_idx)
474 __field(u8, flags)
475 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200476 ),
477
478 TP_fast_assign(
479 LOCAL_ASSIGN;
480 VIF_ASSIGN;
481 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200482 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200483 __entry->flags = key->flags;
484 __entry->keyidx = key->keyidx;
485 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200486 ),
487
488 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200489 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
490 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200491 )
492);
493
494TRACE_EVENT(drv_update_tkip_key,
495 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100496 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200497 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100498 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200499
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100500 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200501
502 TP_STRUCT__entry(
503 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100504 VIF_ENTRY
505 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200506 __field(u32, iv32)
507 ),
508
509 TP_fast_assign(
510 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100511 VIF_ASSIGN;
512 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200513 __entry->iv32 = iv32;
514 ),
515
516 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100517 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
518 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200519 )
520);
521
Luciano Coelho79f460c2011-05-11 17:09:36 +0300522DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200523 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300524 struct ieee80211_sub_if_data *sdata),
525 TP_ARGS(local, sdata)
526);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200527
Eliad Pellerb8564392011-06-13 12:47:30 +0300528DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
529 TP_PROTO(struct ieee80211_local *local,
530 struct ieee80211_sub_if_data *sdata),
531 TP_ARGS(local, sdata)
532);
533
Luciano Coelho79f460c2011-05-11 17:09:36 +0300534DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
535 TP_PROTO(struct ieee80211_local *local,
536 struct ieee80211_sub_if_data *sdata),
537 TP_ARGS(local, sdata)
538);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200539
Luciano Coelho79f460c2011-05-11 17:09:36 +0300540DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
541 TP_PROTO(struct ieee80211_local *local,
542 struct ieee80211_sub_if_data *sdata),
543 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200544);
545
Johannes Bergba99d932011-01-26 09:22:15 +0100546DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200547 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100548 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200549);
550
Johannes Bergba99d932011-01-26 09:22:15 +0100551DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200552 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100553 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200554);
555
556TRACE_EVENT(drv_get_stats,
557 TP_PROTO(struct ieee80211_local *local,
558 struct ieee80211_low_level_stats *stats,
559 int ret),
560
561 TP_ARGS(local, stats, ret),
562
563 TP_STRUCT__entry(
564 LOCAL_ENTRY
565 __field(int, ret)
566 __field(unsigned int, ackfail)
567 __field(unsigned int, rtsfail)
568 __field(unsigned int, fcserr)
569 __field(unsigned int, rtssucc)
570 ),
571
572 TP_fast_assign(
573 LOCAL_ASSIGN;
574 __entry->ret = ret;
575 __entry->ackfail = stats->dot11ACKFailureCount;
576 __entry->rtsfail = stats->dot11RTSFailureCount;
577 __entry->fcserr = stats->dot11FCSErrorCount;
578 __entry->rtssucc = stats->dot11RTSSuccessCount;
579 ),
580
581 TP_printk(
582 LOCAL_PR_FMT " ret:%d",
583 LOCAL_PR_ARG, __entry->ret
584 )
585);
586
587TRACE_EVENT(drv_get_tkip_seq,
588 TP_PROTO(struct ieee80211_local *local,
589 u8 hw_key_idx, u32 *iv32, u16 *iv16),
590
591 TP_ARGS(local, hw_key_idx, iv32, iv16),
592
593 TP_STRUCT__entry(
594 LOCAL_ENTRY
595 __field(u8, hw_key_idx)
596 __field(u32, iv32)
597 __field(u16, iv16)
598 ),
599
600 TP_fast_assign(
601 LOCAL_ASSIGN;
602 __entry->hw_key_idx = hw_key_idx;
603 __entry->iv32 = *iv32;
604 __entry->iv16 = *iv16;
605 ),
606
607 TP_printk(
608 LOCAL_PR_FMT, LOCAL_PR_ARG
609 )
610);
611
Luciano Coelho92ddc112011-05-09 14:40:06 +0300612DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200613 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300614 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200615);
616
Luciano Coelho92ddc112011-05-09 14:40:06 +0300617DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200618 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300619 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200620);
621
Lukáš Turek310bc672009-12-21 22:50:48 +0100622TRACE_EVENT(drv_set_coverage_class,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200623 TP_PROTO(struct ieee80211_local *local, u8 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100624
Johannes Berg4efc76b2010-06-10 10:56:20 +0200625 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100626
627 TP_STRUCT__entry(
628 LOCAL_ENTRY
629 __field(u8, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100630 ),
631
632 TP_fast_assign(
633 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100634 __entry->value = value;
635 ),
636
637 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200638 LOCAL_PR_FMT " value:%d",
639 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100640 )
641);
642
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200643TRACE_EVENT(drv_sta_notify,
644 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100645 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200646 enum sta_notify_cmd cmd,
647 struct ieee80211_sta *sta),
648
Johannes Berg12375ef2009-11-25 20:30:31 +0100649 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200650
651 TP_STRUCT__entry(
652 LOCAL_ENTRY
653 VIF_ENTRY
654 STA_ENTRY
655 __field(u32, cmd)
656 ),
657
658 TP_fast_assign(
659 LOCAL_ASSIGN;
660 VIF_ASSIGN;
661 STA_ASSIGN;
662 __entry->cmd = cmd;
663 ),
664
665 TP_printk(
666 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
667 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
668 )
669);
670
Johannes Bergf09603a2012-01-20 13:55:21 +0100671TRACE_EVENT(drv_sta_state,
672 TP_PROTO(struct ieee80211_local *local,
673 struct ieee80211_sub_if_data *sdata,
674 struct ieee80211_sta *sta,
675 enum ieee80211_sta_state old_state,
676 enum ieee80211_sta_state new_state),
677
678 TP_ARGS(local, sdata, sta, old_state, new_state),
679
680 TP_STRUCT__entry(
681 LOCAL_ENTRY
682 VIF_ENTRY
683 STA_ENTRY
684 __field(u32, old_state)
685 __field(u32, new_state)
686 ),
687
688 TP_fast_assign(
689 LOCAL_ASSIGN;
690 VIF_ASSIGN;
691 STA_ASSIGN;
692 __entry->old_state = old_state;
693 __entry->new_state = new_state;
694 ),
695
696 TP_printk(
697 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
698 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
699 __entry->old_state, __entry->new_state
700 )
701);
702
Johannes Berg8f727ef2012-03-30 08:43:32 +0200703TRACE_EVENT(drv_sta_rc_update,
704 TP_PROTO(struct ieee80211_local *local,
705 struct ieee80211_sub_if_data *sdata,
706 struct ieee80211_sta *sta,
707 u32 changed),
708
709 TP_ARGS(local, sdata, sta, changed),
710
711 TP_STRUCT__entry(
712 LOCAL_ENTRY
713 VIF_ENTRY
714 STA_ENTRY
715 __field(u32, changed)
716 ),
717
718 TP_fast_assign(
719 LOCAL_ASSIGN;
720 VIF_ASSIGN;
721 STA_ASSIGN;
722 __entry->changed = changed;
723 ),
724
725 TP_printk(
726 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
727 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
728 )
729);
730
Johannes Berg34e89502010-02-03 13:59:58 +0100731TRACE_EVENT(drv_sta_add,
732 TP_PROTO(struct ieee80211_local *local,
733 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200734 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100735
Johannes Berg4efc76b2010-06-10 10:56:20 +0200736 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100737
738 TP_STRUCT__entry(
739 LOCAL_ENTRY
740 VIF_ENTRY
741 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100742 ),
743
744 TP_fast_assign(
745 LOCAL_ASSIGN;
746 VIF_ASSIGN;
747 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100748 ),
749
750 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200751 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
752 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100753 )
754);
755
756TRACE_EVENT(drv_sta_remove,
757 TP_PROTO(struct ieee80211_local *local,
758 struct ieee80211_sub_if_data *sdata,
759 struct ieee80211_sta *sta),
760
761 TP_ARGS(local, sdata, sta),
762
763 TP_STRUCT__entry(
764 LOCAL_ENTRY
765 VIF_ENTRY
766 STA_ENTRY
767 ),
768
769 TP_fast_assign(
770 LOCAL_ASSIGN;
771 VIF_ASSIGN;
772 STA_ASSIGN;
773 ),
774
775 TP_printk(
776 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
777 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
778 )
779);
780
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200781TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300782 TP_PROTO(struct ieee80211_local *local,
783 struct ieee80211_sub_if_data *sdata,
Johannes Berga3304b02012-03-28 11:04:24 +0200784 u16 ac, const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200785
Johannes Berga3304b02012-03-28 11:04:24 +0200786 TP_ARGS(local, sdata, ac, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200787
788 TP_STRUCT__entry(
789 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300790 VIF_ENTRY
Johannes Berga3304b02012-03-28 11:04:24 +0200791 __field(u16, ac)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200792 __field(u16, txop)
793 __field(u16, cw_min)
794 __field(u16, cw_max)
795 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300796 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200797 ),
798
799 TP_fast_assign(
800 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300801 VIF_ASSIGN;
Johannes Berga3304b02012-03-28 11:04:24 +0200802 __entry->ac = ac;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200803 __entry->txop = params->txop;
804 __entry->cw_max = params->cw_max;
805 __entry->cw_min = params->cw_min;
806 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300807 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200808 ),
809
810 TP_printk(
Johannes Berga3304b02012-03-28 11:04:24 +0200811 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
812 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200813 )
814);
815
Eliad Peller37a41b42011-09-21 14:06:11 +0300816DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
817 TP_PROTO(struct ieee80211_local *local,
818 struct ieee80211_sub_if_data *sdata),
819 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200820);
821
822TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +0300823 TP_PROTO(struct ieee80211_local *local,
824 struct ieee80211_sub_if_data *sdata,
825 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200826
Eliad Peller37a41b42011-09-21 14:06:11 +0300827 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200828
829 TP_STRUCT__entry(
830 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +0300831 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200832 __field(u64, tsf)
833 ),
834
835 TP_fast_assign(
836 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +0300837 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200838 __entry->tsf = tsf;
839 ),
840
841 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +0300842 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
843 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200844 )
845);
846
Eliad Peller37a41b42011-09-21 14:06:11 +0300847DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
848 TP_PROTO(struct ieee80211_local *local,
849 struct ieee80211_sub_if_data *sdata),
850 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200851);
852
Johannes Bergba99d932011-01-26 09:22:15 +0100853DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200854 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100855 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200856);
857
858TRACE_EVENT(drv_ampdu_action,
859 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100860 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200861 enum ieee80211_ampdu_mlme_action action,
862 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100863 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200864
Johannes Berg0b01f032011-01-18 13:51:05 +0100865 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200866
867 TP_STRUCT__entry(
868 LOCAL_ENTRY
869 STA_ENTRY
870 __field(u32, action)
871 __field(u16, tid)
872 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100873 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100874 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200875 ),
876
877 TP_fast_assign(
878 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100879 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200880 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200881 __entry->action = action;
882 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800883 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100884 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200885 ),
886
887 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100888 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
889 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
890 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200891 )
892);
Johannes Berga80f7c02009-12-23 13:15:32 +0100893
John W. Linvillec466d4e2010-06-29 14:51:23 -0400894TRACE_EVENT(drv_get_survey,
895 TP_PROTO(struct ieee80211_local *local, int idx,
896 struct survey_info *survey),
897
898 TP_ARGS(local, idx, survey),
899
900 TP_STRUCT__entry(
901 LOCAL_ENTRY
902 __field(int, idx)
903 ),
904
905 TP_fast_assign(
906 LOCAL_ASSIGN;
907 __entry->idx = idx;
908 ),
909
910 TP_printk(
911 LOCAL_PR_FMT " idx:%d",
912 LOCAL_PR_ARG, __entry->idx
913 )
914);
915
Johannes Berga80f7c02009-12-23 13:15:32 +0100916TRACE_EVENT(drv_flush,
917 TP_PROTO(struct ieee80211_local *local, bool drop),
918
919 TP_ARGS(local, drop),
920
921 TP_STRUCT__entry(
922 LOCAL_ENTRY
923 __field(bool, drop)
924 ),
925
926 TP_fast_assign(
927 LOCAL_ASSIGN;
928 __entry->drop = drop;
929 ),
930
931 TP_printk(
932 LOCAL_PR_FMT " drop:%d",
933 LOCAL_PR_ARG, __entry->drop
934 )
935);
Johannes Bergb5878a22010-04-07 16:48:40 +0200936
Johannes Berg5ce6e432010-05-11 16:20:57 +0200937TRACE_EVENT(drv_channel_switch,
938 TP_PROTO(struct ieee80211_local *local,
939 struct ieee80211_channel_switch *ch_switch),
940
941 TP_ARGS(local, ch_switch),
942
943 TP_STRUCT__entry(
944 LOCAL_ENTRY
945 __field(u64, timestamp)
946 __field(bool, block_tx)
947 __field(u16, freq)
948 __field(u8, count)
949 ),
950
951 TP_fast_assign(
952 LOCAL_ASSIGN;
953 __entry->timestamp = ch_switch->timestamp;
954 __entry->block_tx = ch_switch->block_tx;
955 __entry->freq = ch_switch->channel->center_freq;
956 __entry->count = ch_switch->count;
957 ),
958
959 TP_printk(
960 LOCAL_PR_FMT " new freq:%u count:%d",
961 LOCAL_PR_ARG, __entry->freq, __entry->count
962 )
963);
964
Bruno Randolf15d96752010-11-10 12:50:56 +0900965TRACE_EVENT(drv_set_antenna,
966 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
967
968 TP_ARGS(local, tx_ant, rx_ant, ret),
969
970 TP_STRUCT__entry(
971 LOCAL_ENTRY
972 __field(u32, tx_ant)
973 __field(u32, rx_ant)
974 __field(int, ret)
975 ),
976
977 TP_fast_assign(
978 LOCAL_ASSIGN;
979 __entry->tx_ant = tx_ant;
980 __entry->rx_ant = rx_ant;
981 __entry->ret = ret;
982 ),
983
984 TP_printk(
985 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
986 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
987 )
988);
989
990TRACE_EVENT(drv_get_antenna,
991 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
992
993 TP_ARGS(local, tx_ant, rx_ant, ret),
994
995 TP_STRUCT__entry(
996 LOCAL_ENTRY
997 __field(u32, tx_ant)
998 __field(u32, rx_ant)
999 __field(int, ret)
1000 ),
1001
1002 TP_fast_assign(
1003 LOCAL_ASSIGN;
1004 __entry->tx_ant = tx_ant;
1005 __entry->rx_ant = rx_ant;
1006 __entry->ret = ret;
1007 ),
1008
1009 TP_printk(
1010 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1011 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1012 )
1013);
1014
Johannes Berg21f83582010-12-18 17:20:47 +01001015TRACE_EVENT(drv_remain_on_channel,
1016 TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
1017 enum nl80211_channel_type chantype, unsigned int duration),
1018
1019 TP_ARGS(local, chan, chantype, duration),
1020
1021 TP_STRUCT__entry(
1022 LOCAL_ENTRY
1023 __field(int, center_freq)
1024 __field(int, channel_type)
1025 __field(unsigned int, duration)
1026 ),
1027
1028 TP_fast_assign(
1029 LOCAL_ASSIGN;
1030 __entry->center_freq = chan->center_freq;
1031 __entry->channel_type = chantype;
1032 __entry->duration = duration;
1033 ),
1034
1035 TP_printk(
1036 LOCAL_PR_FMT " freq:%dMHz duration:%dms",
1037 LOCAL_PR_ARG, __entry->center_freq, __entry->duration
1038 )
1039);
1040
Johannes Bergba99d932011-01-26 09:22:15 +01001041DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001042 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001043 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001044);
1045
Johannes Berg5f16a432011-02-25 15:36:57 +01001046TRACE_EVENT(drv_offchannel_tx,
1047 TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
1048 struct ieee80211_channel *chan,
1049 enum nl80211_channel_type channel_type,
1050 unsigned int wait),
1051
1052 TP_ARGS(local, skb, chan, channel_type, wait),
1053
1054 TP_STRUCT__entry(
1055 LOCAL_ENTRY
1056 __field(int, center_freq)
1057 __field(int, channel_type)
1058 __field(unsigned int, wait)
1059 ),
1060
1061 TP_fast_assign(
1062 LOCAL_ASSIGN;
1063 __entry->center_freq = chan->center_freq;
1064 __entry->channel_type = channel_type;
1065 __entry->wait = wait;
1066 ),
1067
1068 TP_printk(
1069 LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
1070 LOCAL_PR_ARG, __entry->center_freq, __entry->wait
1071 )
1072);
1073
John W. Linville38c09152011-03-07 16:19:18 -05001074TRACE_EVENT(drv_set_ringparam,
1075 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1076
1077 TP_ARGS(local, tx, rx),
1078
1079 TP_STRUCT__entry(
1080 LOCAL_ENTRY
1081 __field(u32, tx)
1082 __field(u32, rx)
1083 ),
1084
1085 TP_fast_assign(
1086 LOCAL_ASSIGN;
1087 __entry->tx = tx;
1088 __entry->rx = rx;
1089 ),
1090
1091 TP_printk(
1092 LOCAL_PR_FMT " tx:%d rx %d",
1093 LOCAL_PR_ARG, __entry->tx, __entry->rx
1094 )
1095);
1096
1097TRACE_EVENT(drv_get_ringparam,
1098 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1099 u32 *rx, u32 *rx_max),
1100
1101 TP_ARGS(local, tx, tx_max, rx, rx_max),
1102
1103 TP_STRUCT__entry(
1104 LOCAL_ENTRY
1105 __field(u32, tx)
1106 __field(u32, tx_max)
1107 __field(u32, rx)
1108 __field(u32, rx_max)
1109 ),
1110
1111 TP_fast_assign(
1112 LOCAL_ASSIGN;
1113 __entry->tx = *tx;
1114 __entry->tx_max = *tx_max;
1115 __entry->rx = *rx;
1116 __entry->rx_max = *rx_max;
1117 ),
1118
1119 TP_printk(
1120 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1121 LOCAL_PR_ARG,
1122 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1123 )
1124);
1125
Vivek Natarajane8306f92011-04-06 11:41:10 +05301126DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1127 TP_PROTO(struct ieee80211_local *local),
1128 TP_ARGS(local)
1129);
1130
Johannes Berg5f16a432011-02-25 15:36:57 +01001131DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1132 TP_PROTO(struct ieee80211_local *local),
1133 TP_ARGS(local)
1134);
1135
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301136TRACE_EVENT(drv_set_bitrate_mask,
1137 TP_PROTO(struct ieee80211_local *local,
1138 struct ieee80211_sub_if_data *sdata,
1139 const struct cfg80211_bitrate_mask *mask),
1140
1141 TP_ARGS(local, sdata, mask),
1142
1143 TP_STRUCT__entry(
1144 LOCAL_ENTRY
1145 VIF_ENTRY
1146 __field(u32, legacy_2g)
1147 __field(u32, legacy_5g)
1148 ),
1149
1150 TP_fast_assign(
1151 LOCAL_ASSIGN;
1152 VIF_ASSIGN;
1153 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1154 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1155 ),
1156
1157 TP_printk(
1158 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1159 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1160 )
1161);
1162
Johannes Bergc68f4b82011-07-05 16:35:41 +02001163TRACE_EVENT(drv_set_rekey_data,
1164 TP_PROTO(struct ieee80211_local *local,
1165 struct ieee80211_sub_if_data *sdata,
1166 struct cfg80211_gtk_rekey_data *data),
1167
1168 TP_ARGS(local, sdata, data),
1169
1170 TP_STRUCT__entry(
1171 LOCAL_ENTRY
1172 VIF_ENTRY
1173 __array(u8, kek, NL80211_KEK_LEN)
1174 __array(u8, kck, NL80211_KCK_LEN)
1175 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1176 ),
1177
1178 TP_fast_assign(
1179 LOCAL_ASSIGN;
1180 VIF_ASSIGN;
1181 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1182 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1183 memcpy(__entry->replay_ctr, data->replay_ctr,
1184 NL80211_REPLAY_CTR_LEN);
1185 ),
1186
1187 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1188 LOCAL_PR_ARG, VIF_PR_ARG)
1189);
1190
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001191TRACE_EVENT(drv_rssi_callback,
1192 TP_PROTO(struct ieee80211_local *local,
1193 enum ieee80211_rssi_event rssi_event),
1194
1195 TP_ARGS(local, rssi_event),
1196
1197 TP_STRUCT__entry(
1198 LOCAL_ENTRY
1199 __field(u32, rssi_event)
1200 ),
1201
1202 TP_fast_assign(
1203 LOCAL_ASSIGN;
1204 __entry->rssi_event = rssi_event;
1205 ),
1206
1207 TP_printk(
1208 LOCAL_PR_FMT " rssi_event:%d",
1209 LOCAL_PR_ARG, __entry->rssi_event
1210 )
1211);
1212
Johannes Berg40b96402011-09-29 16:04:38 +02001213DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001214 TP_PROTO(struct ieee80211_local *local,
1215 struct ieee80211_sta *sta,
1216 u16 tids, int num_frames,
1217 enum ieee80211_frame_release_type reason,
1218 bool more_data),
1219
1220 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1221
1222 TP_STRUCT__entry(
1223 LOCAL_ENTRY
1224 STA_ENTRY
1225 __field(u16, tids)
1226 __field(int, num_frames)
1227 __field(int, reason)
1228 __field(bool, more_data)
1229 ),
1230
1231 TP_fast_assign(
1232 LOCAL_ASSIGN;
1233 STA_ASSIGN;
1234 __entry->tids = tids;
1235 __entry->num_frames = num_frames;
1236 __entry->reason = reason;
1237 __entry->more_data = more_data;
1238 ),
1239
1240 TP_printk(
1241 LOCAL_PR_FMT STA_PR_FMT
1242 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1243 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1244 __entry->reason, __entry->more_data
1245 )
1246);
1247
Johannes Berg40b96402011-09-29 16:04:38 +02001248DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1249 TP_PROTO(struct ieee80211_local *local,
1250 struct ieee80211_sta *sta,
1251 u16 tids, int num_frames,
1252 enum ieee80211_frame_release_type reason,
1253 bool more_data),
1254
1255 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1256);
1257
1258DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1259 TP_PROTO(struct ieee80211_local *local,
1260 struct ieee80211_sta *sta,
1261 u16 tids, int num_frames,
1262 enum ieee80211_frame_release_type reason,
1263 bool more_data),
1264
1265 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1266);
1267
Victor Goldenshtein66572cf2012-06-21 10:56:46 +03001268TRACE_EVENT(drv_get_rssi,
1269 TP_PROTO(struct ieee80211_local *local, struct ieee80211_sta *sta,
1270 s8 rssi, int ret),
1271
1272 TP_ARGS(local, sta, rssi, ret),
1273
1274 TP_STRUCT__entry(
1275 LOCAL_ENTRY
1276 STA_ENTRY
1277 __field(s8, rssi)
1278 __field(int, ret)
1279 ),
1280
1281 TP_fast_assign(
1282 LOCAL_ASSIGN;
1283 STA_ASSIGN;
1284 __entry->rssi = rssi;
1285 __entry->ret = ret;
1286 ),
1287
1288 TP_printk(
1289 LOCAL_PR_FMT STA_PR_FMT " rssi:%d ret:%d",
1290 LOCAL_PR_ARG, STA_PR_ARG, __entry->rssi, __entry->ret
1291 )
1292);
1293
Johannes Berga1845fc2012-06-27 13:18:36 +02001294DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
1295 TP_PROTO(struct ieee80211_local *local,
1296 struct ieee80211_sub_if_data *sdata),
1297
1298 TP_ARGS(local, sdata)
1299);
1300
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001301DECLARE_EVENT_CLASS(local_chanctx,
1302 TP_PROTO(struct ieee80211_local *local,
1303 struct ieee80211_chanctx *ctx),
1304
1305 TP_ARGS(local, ctx),
1306
1307 TP_STRUCT__entry(
1308 LOCAL_ENTRY
1309 CHANCTX_ENTRY
1310 ),
1311
1312 TP_fast_assign(
1313 LOCAL_ASSIGN;
1314 CHANCTX_ASSIGN;
1315 ),
1316
1317 TP_printk(
1318 LOCAL_PR_FMT CHANCTX_PR_FMT,
1319 LOCAL_PR_ARG, CHANCTX_PR_ARG
1320 )
1321);
1322
1323DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1324 TP_PROTO(struct ieee80211_local *local,
1325 struct ieee80211_chanctx *ctx),
1326 TP_ARGS(local, ctx)
1327);
1328
1329DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1330 TP_PROTO(struct ieee80211_local *local,
1331 struct ieee80211_chanctx *ctx),
1332 TP_ARGS(local, ctx)
1333);
1334
1335TRACE_EVENT(drv_change_chanctx,
1336 TP_PROTO(struct ieee80211_local *local,
1337 struct ieee80211_chanctx *ctx,
1338 u32 changed),
1339
1340 TP_ARGS(local, ctx, changed),
1341
1342 TP_STRUCT__entry(
1343 LOCAL_ENTRY
1344 CHANCTX_ENTRY
1345 __field(u32, changed)
1346 ),
1347
1348 TP_fast_assign(
1349 LOCAL_ASSIGN;
1350 CHANCTX_ASSIGN;
1351 __entry->changed = changed;
1352 ),
1353
1354 TP_printk(
1355 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1356 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1357 )
1358);
1359
1360DECLARE_EVENT_CLASS(local_sdata_chanctx,
1361 TP_PROTO(struct ieee80211_local *local,
1362 struct ieee80211_sub_if_data *sdata,
1363 struct ieee80211_chanctx *ctx),
1364
1365 TP_ARGS(local, sdata, ctx),
1366
1367 TP_STRUCT__entry(
1368 LOCAL_ENTRY
1369 VIF_ENTRY
1370 CHANCTX_ENTRY
1371 ),
1372
1373 TP_fast_assign(
1374 LOCAL_ASSIGN;
1375 VIF_ASSIGN;
1376 CHANCTX_ASSIGN;
1377 ),
1378
1379 TP_printk(
1380 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
1381 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
1382 )
1383);
1384
1385DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1386 TP_PROTO(struct ieee80211_local *local,
1387 struct ieee80211_sub_if_data *sdata,
1388 struct ieee80211_chanctx *ctx),
1389 TP_ARGS(local, sdata, ctx)
1390);
1391
1392DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1393 TP_PROTO(struct ieee80211_local *local,
1394 struct ieee80211_sub_if_data *sdata,
1395 struct ieee80211_chanctx *ctx),
1396 TP_ARGS(local, sdata, ctx)
1397);
1398
Johannes Berg10416382012-10-19 15:44:42 +02001399TRACE_EVENT(drv_start_ap,
1400 TP_PROTO(struct ieee80211_local *local,
1401 struct ieee80211_sub_if_data *sdata,
1402 struct ieee80211_bss_conf *info),
1403
1404 TP_ARGS(local, sdata, info),
1405
1406 TP_STRUCT__entry(
1407 LOCAL_ENTRY
1408 VIF_ENTRY
1409 __field(u8, dtimper)
1410 __field(u16, bcnint)
1411 __dynamic_array(u8, ssid, info->ssid_len);
1412 __field(bool, hidden_ssid);
1413 ),
1414
1415 TP_fast_assign(
1416 LOCAL_ASSIGN;
1417 VIF_ASSIGN;
1418 __entry->dtimper = info->dtim_period;
1419 __entry->bcnint = info->beacon_int;
1420 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1421 __entry->hidden_ssid = info->hidden_ssid;
1422 ),
1423
1424 TP_printk(
1425 LOCAL_PR_FMT VIF_PR_FMT,
1426 LOCAL_PR_ARG, VIF_PR_ARG
1427 )
1428);
1429
1430DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
1431 TP_PROTO(struct ieee80211_local *local,
1432 struct ieee80211_sub_if_data *sdata),
1433 TP_ARGS(local, sdata)
1434);
1435
Johannes Bergb5878a22010-04-07 16:48:40 +02001436/*
1437 * Tracing for API calls that drivers call.
1438 */
1439
1440TRACE_EVENT(api_start_tx_ba_session,
1441 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1442
1443 TP_ARGS(sta, tid),
1444
1445 TP_STRUCT__entry(
1446 STA_ENTRY
1447 __field(u16, tid)
1448 ),
1449
1450 TP_fast_assign(
1451 STA_ASSIGN;
1452 __entry->tid = tid;
1453 ),
1454
1455 TP_printk(
1456 STA_PR_FMT " tid:%d",
1457 STA_PR_ARG, __entry->tid
1458 )
1459);
1460
1461TRACE_EVENT(api_start_tx_ba_cb,
1462 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1463
1464 TP_ARGS(sdata, ra, tid),
1465
1466 TP_STRUCT__entry(
1467 VIF_ENTRY
1468 __array(u8, ra, ETH_ALEN)
1469 __field(u16, tid)
1470 ),
1471
1472 TP_fast_assign(
1473 VIF_ASSIGN;
1474 memcpy(__entry->ra, ra, ETH_ALEN);
1475 __entry->tid = tid;
1476 ),
1477
1478 TP_printk(
1479 VIF_PR_FMT " ra:%pM tid:%d",
1480 VIF_PR_ARG, __entry->ra, __entry->tid
1481 )
1482);
1483
1484TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001485 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001486
Johannes Berg6a8579d2010-05-27 14:41:07 +02001487 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001488
1489 TP_STRUCT__entry(
1490 STA_ENTRY
1491 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001492 ),
1493
1494 TP_fast_assign(
1495 STA_ASSIGN;
1496 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001497 ),
1498
1499 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001500 STA_PR_FMT " tid:%d",
1501 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001502 )
1503);
1504
1505TRACE_EVENT(api_stop_tx_ba_cb,
1506 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1507
1508 TP_ARGS(sdata, ra, tid),
1509
1510 TP_STRUCT__entry(
1511 VIF_ENTRY
1512 __array(u8, ra, ETH_ALEN)
1513 __field(u16, tid)
1514 ),
1515
1516 TP_fast_assign(
1517 VIF_ASSIGN;
1518 memcpy(__entry->ra, ra, ETH_ALEN);
1519 __entry->tid = tid;
1520 ),
1521
1522 TP_printk(
1523 VIF_PR_FMT " ra:%pM tid:%d",
1524 VIF_PR_ARG, __entry->ra, __entry->tid
1525 )
1526);
1527
Johannes Bergba99d932011-01-26 09:22:15 +01001528DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001529 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001530 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001531);
1532
1533TRACE_EVENT(api_beacon_loss,
1534 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1535
1536 TP_ARGS(sdata),
1537
1538 TP_STRUCT__entry(
1539 VIF_ENTRY
1540 ),
1541
1542 TP_fast_assign(
1543 VIF_ASSIGN;
1544 ),
1545
1546 TP_printk(
1547 VIF_PR_FMT,
1548 VIF_PR_ARG
1549 )
1550);
1551
1552TRACE_EVENT(api_connection_loss,
1553 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1554
1555 TP_ARGS(sdata),
1556
1557 TP_STRUCT__entry(
1558 VIF_ENTRY
1559 ),
1560
1561 TP_fast_assign(
1562 VIF_ASSIGN;
1563 ),
1564
1565 TP_printk(
1566 VIF_PR_FMT,
1567 VIF_PR_ARG
1568 )
1569);
1570
1571TRACE_EVENT(api_cqm_rssi_notify,
1572 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1573 enum nl80211_cqm_rssi_threshold_event rssi_event),
1574
1575 TP_ARGS(sdata, rssi_event),
1576
1577 TP_STRUCT__entry(
1578 VIF_ENTRY
1579 __field(u32, rssi_event)
1580 ),
1581
1582 TP_fast_assign(
1583 VIF_ASSIGN;
1584 __entry->rssi_event = rssi_event;
1585 ),
1586
1587 TP_printk(
1588 VIF_PR_FMT " event:%d",
1589 VIF_PR_ARG, __entry->rssi_event
1590 )
1591);
1592
1593TRACE_EVENT(api_scan_completed,
1594 TP_PROTO(struct ieee80211_local *local, bool aborted),
1595
1596 TP_ARGS(local, aborted),
1597
1598 TP_STRUCT__entry(
1599 LOCAL_ENTRY
1600 __field(bool, aborted)
1601 ),
1602
1603 TP_fast_assign(
1604 LOCAL_ASSIGN;
1605 __entry->aborted = aborted;
1606 ),
1607
1608 TP_printk(
1609 LOCAL_PR_FMT " aborted:%d",
1610 LOCAL_PR_ARG, __entry->aborted
1611 )
1612);
1613
Luciano Coelho79f460c2011-05-11 17:09:36 +03001614TRACE_EVENT(api_sched_scan_results,
1615 TP_PROTO(struct ieee80211_local *local),
1616
1617 TP_ARGS(local),
1618
1619 TP_STRUCT__entry(
1620 LOCAL_ENTRY
1621 ),
1622
1623 TP_fast_assign(
1624 LOCAL_ASSIGN;
1625 ),
1626
1627 TP_printk(
1628 LOCAL_PR_FMT, LOCAL_PR_ARG
1629 )
1630);
1631
1632TRACE_EVENT(api_sched_scan_stopped,
1633 TP_PROTO(struct ieee80211_local *local),
1634
1635 TP_ARGS(local),
1636
1637 TP_STRUCT__entry(
1638 LOCAL_ENTRY
1639 ),
1640
1641 TP_fast_assign(
1642 LOCAL_ASSIGN;
1643 ),
1644
1645 TP_printk(
1646 LOCAL_PR_FMT, LOCAL_PR_ARG
1647 )
1648);
1649
Johannes Bergb5878a22010-04-07 16:48:40 +02001650TRACE_EVENT(api_sta_block_awake,
1651 TP_PROTO(struct ieee80211_local *local,
1652 struct ieee80211_sta *sta, bool block),
1653
1654 TP_ARGS(local, sta, block),
1655
1656 TP_STRUCT__entry(
1657 LOCAL_ENTRY
1658 STA_ENTRY
1659 __field(bool, block)
1660 ),
1661
1662 TP_fast_assign(
1663 LOCAL_ASSIGN;
1664 STA_ASSIGN;
1665 __entry->block = block;
1666 ),
1667
1668 TP_printk(
1669 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1670 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
1671 )
1672);
1673
Johannes Berg5ce6e432010-05-11 16:20:57 +02001674TRACE_EVENT(api_chswitch_done,
1675 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1676
1677 TP_ARGS(sdata, success),
1678
1679 TP_STRUCT__entry(
1680 VIF_ENTRY
1681 __field(bool, success)
1682 ),
1683
1684 TP_fast_assign(
1685 VIF_ASSIGN;
1686 __entry->success = success;
1687 ),
1688
1689 TP_printk(
1690 VIF_PR_FMT " success=%d",
1691 VIF_PR_ARG, __entry->success
1692 )
1693);
1694
Johannes Bergba99d932011-01-26 09:22:15 +01001695DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001696 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001697 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001698);
1699
Johannes Bergba99d932011-01-26 09:22:15 +01001700DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001701 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001702 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001703);
1704
Johannes Bergc68f4b82011-07-05 16:35:41 +02001705TRACE_EVENT(api_gtk_rekey_notify,
1706 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1707 const u8 *bssid, const u8 *replay_ctr),
1708
1709 TP_ARGS(sdata, bssid, replay_ctr),
1710
1711 TP_STRUCT__entry(
1712 VIF_ENTRY
1713 __array(u8, bssid, ETH_ALEN)
1714 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1715 ),
1716
1717 TP_fast_assign(
1718 VIF_ASSIGN;
1719 memcpy(__entry->bssid, bssid, ETH_ALEN);
1720 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1721 ),
1722
1723 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1724);
1725
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001726TRACE_EVENT(api_enable_rssi_reports,
1727 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1728 int rssi_min_thold, int rssi_max_thold),
1729
1730 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1731
1732 TP_STRUCT__entry(
1733 VIF_ENTRY
1734 __field(int, rssi_min_thold)
1735 __field(int, rssi_max_thold)
1736 ),
1737
1738 TP_fast_assign(
1739 VIF_ASSIGN;
1740 __entry->rssi_min_thold = rssi_min_thold;
1741 __entry->rssi_max_thold = rssi_max_thold;
1742 ),
1743
1744 TP_printk(
1745 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
1746 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
1747 )
1748);
1749
Johannes Berg37fbd902011-09-29 16:04:39 +02001750TRACE_EVENT(api_eosp,
1751 TP_PROTO(struct ieee80211_local *local,
1752 struct ieee80211_sta *sta),
1753
1754 TP_ARGS(local, sta),
1755
1756 TP_STRUCT__entry(
1757 LOCAL_ENTRY
1758 STA_ENTRY
1759 ),
1760
1761 TP_fast_assign(
1762 LOCAL_ASSIGN;
1763 STA_ASSIGN;
1764 ),
1765
1766 TP_printk(
1767 LOCAL_PR_FMT STA_PR_FMT,
1768 LOCAL_PR_ARG, STA_PR_FMT
1769 )
1770);
1771
Johannes Bergb5878a22010-04-07 16:48:40 +02001772/*
1773 * Tracing for internal functions
1774 * (which may also be called in response to driver calls)
1775 */
1776
1777TRACE_EVENT(wake_queue,
1778 TP_PROTO(struct ieee80211_local *local, u16 queue,
1779 enum queue_stop_reason reason),
1780
1781 TP_ARGS(local, queue, reason),
1782
1783 TP_STRUCT__entry(
1784 LOCAL_ENTRY
1785 __field(u16, queue)
1786 __field(u32, reason)
1787 ),
1788
1789 TP_fast_assign(
1790 LOCAL_ASSIGN;
1791 __entry->queue = queue;
1792 __entry->reason = reason;
1793 ),
1794
1795 TP_printk(
1796 LOCAL_PR_FMT " queue:%d, reason:%d",
1797 LOCAL_PR_ARG, __entry->queue, __entry->reason
1798 )
1799);
1800
1801TRACE_EVENT(stop_queue,
1802 TP_PROTO(struct ieee80211_local *local, u16 queue,
1803 enum queue_stop_reason reason),
1804
1805 TP_ARGS(local, queue, reason),
1806
1807 TP_STRUCT__entry(
1808 LOCAL_ENTRY
1809 __field(u16, queue)
1810 __field(u32, reason)
1811 ),
1812
1813 TP_fast_assign(
1814 LOCAL_ASSIGN;
1815 __entry->queue = queue;
1816 __entry->reason = reason;
1817 ),
1818
1819 TP_printk(
1820 LOCAL_PR_FMT " queue:%d, reason:%d",
1821 LOCAL_PR_ARG, __entry->queue, __entry->reason
1822 )
1823);
Johannes Berg3fae0272012-06-22 13:36:25 +02001824
1825#ifdef CONFIG_MAC80211_MESSAGE_TRACING
1826#undef TRACE_SYSTEM
1827#define TRACE_SYSTEM mac80211_msg
1828
1829#define MAX_MSG_LEN 100
1830
1831DECLARE_EVENT_CLASS(mac80211_msg_event,
1832 TP_PROTO(struct va_format *vaf),
1833
1834 TP_ARGS(vaf),
1835
1836 TP_STRUCT__entry(
1837 __dynamic_array(char, msg, MAX_MSG_LEN)
1838 ),
1839
1840 TP_fast_assign(
1841 WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
1842 MAX_MSG_LEN, vaf->fmt,
1843 *vaf->va) >= MAX_MSG_LEN);
1844 ),
1845
1846 TP_printk("%s", __get_str(msg))
1847);
1848
1849DEFINE_EVENT(mac80211_msg_event, mac80211_info,
1850 TP_PROTO(struct va_format *vaf),
1851 TP_ARGS(vaf)
1852);
1853DEFINE_EVENT(mac80211_msg_event, mac80211_dbg,
1854 TP_PROTO(struct va_format *vaf),
1855 TP_ARGS(vaf)
1856);
1857DEFINE_EVENT(mac80211_msg_event, mac80211_err,
1858 TP_PROTO(struct va_format *vaf),
1859 TP_ARGS(vaf)
1860);
1861#endif
1862
Christian Lamparterf7428802009-07-19 23:21:07 +02001863#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001864
1865#undef TRACE_INCLUDE_PATH
1866#define TRACE_INCLUDE_PATH .
1867#undef TRACE_INCLUDE_FILE
Johannes Berg011ad0e2012-06-22 12:55:52 +02001868#define TRACE_INCLUDE_FILE trace
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001869#include <trace/define_trace.h>