blob: eeebbd9cb8881479c5064a433a4688ec73db6220 [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 Berg1ea6f9c2012-10-24 10:59:25 +0200345 __field(int, txpower)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200346 ),
347
348 TP_fast_assign(
349 LOCAL_ASSIGN;
350 VIF_ASSIGN;
351 __entry->changed = changed;
352 __entry->aid = info->aid;
353 __entry->assoc = info->assoc;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200354 __entry->ibss_joined = info->ibss_joined;
355 __entry->ibss_creator = info->ibss_creator;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200356 __entry->shortpre = info->use_short_preamble;
357 __entry->cts = info->use_cts_prot;
358 __entry->shortslot = info->use_short_slot;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200359 __entry->enable_beacon = info->enable_beacon;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200360 __entry->dtimper = info->dtim_period;
361 __entry->bcnint = info->beacon_int;
362 __entry->assoc_cap = info->assoc_capability;
Johannes Berg8c358bc2012-05-22 22:13:05 +0200363 __entry->sync_tsf = info->sync_tsf;
364 __entry->sync_device_ts = info->sync_device_ts;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200365 __entry->basic_rates = info->basic_rates;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200366 memcpy(__entry->mcast_rate, info->mcast_rate,
367 sizeof(__entry->mcast_rate));
Johannes Bergf911ab82009-11-25 19:07:20 +0100368 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200369 __entry->cqm_rssi_thold = info->cqm_rssi_thold;
370 __entry->cqm_rssi_hyst = info->cqm_rssi_hyst;
371 __entry->channel_type = info->channel_type;
372 memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list,
373 sizeof(u32) * info->arp_addr_cnt);
374 __entry->arp_filter_enabled = info->arp_filter_enabled;
375 __entry->qos = info->qos;
376 __entry->idle = info->idle;
377 __entry->ps = info->ps;
378 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
379 __entry->hidden_ssid = info->hidden_ssid;
Johannes Berg1ea6f9c2012-10-24 10:59:25 +0200380 __entry->txpower = info->txpower;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200381 ),
382
383 TP_printk(
384 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
385 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
386 )
387);
388
Johannes Berg3ac64be2009-08-17 16:16:53 +0200389TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200390 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200391
Johannes Berg4efc76b2010-06-10 10:56:20 +0200392 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200393
394 TP_STRUCT__entry(
395 LOCAL_ENTRY
396 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200397 ),
398
399 TP_fast_assign(
400 LOCAL_ASSIGN;
401 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200402 ),
403
404 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200405 LOCAL_PR_FMT " prepare mc (%d)",
406 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200407 )
408);
409
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200410TRACE_EVENT(drv_configure_filter,
411 TP_PROTO(struct ieee80211_local *local,
412 unsigned int changed_flags,
413 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200414 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200415
Johannes Berg3ac64be2009-08-17 16:16:53 +0200416 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200417
418 TP_STRUCT__entry(
419 LOCAL_ENTRY
420 __field(unsigned int, changed)
421 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200422 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200423 ),
424
425 TP_fast_assign(
426 LOCAL_ASSIGN;
427 __entry->changed = changed_flags;
428 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200429 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200430 ),
431
432 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200433 LOCAL_PR_FMT " changed:%#x total:%#x",
434 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200435 )
436);
437
438TRACE_EVENT(drv_set_tim,
439 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200440 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200441
Johannes Berg4efc76b2010-06-10 10:56:20 +0200442 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200443
444 TP_STRUCT__entry(
445 LOCAL_ENTRY
446 STA_ENTRY
447 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200448 ),
449
450 TP_fast_assign(
451 LOCAL_ASSIGN;
452 STA_ASSIGN;
453 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200454 ),
455
456 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200457 LOCAL_PR_FMT STA_PR_FMT " set:%d",
458 LOCAL_PR_ARG, STA_PR_FMT, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200459 )
460);
461
462TRACE_EVENT(drv_set_key,
463 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100464 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200465 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200466 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200467
Johannes Berg4efc76b2010-06-10 10:56:20 +0200468 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200469
470 TP_STRUCT__entry(
471 LOCAL_ENTRY
472 VIF_ENTRY
473 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200474 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200475 __field(u8, hw_key_idx)
476 __field(u8, flags)
477 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200478 ),
479
480 TP_fast_assign(
481 LOCAL_ASSIGN;
482 VIF_ASSIGN;
483 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200484 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200485 __entry->flags = key->flags;
486 __entry->keyidx = key->keyidx;
487 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200488 ),
489
490 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200491 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
492 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200493 )
494);
495
496TRACE_EVENT(drv_update_tkip_key,
497 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100498 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200499 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100500 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200501
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100502 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200503
504 TP_STRUCT__entry(
505 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100506 VIF_ENTRY
507 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200508 __field(u32, iv32)
509 ),
510
511 TP_fast_assign(
512 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100513 VIF_ASSIGN;
514 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200515 __entry->iv32 = iv32;
516 ),
517
518 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100519 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
520 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200521 )
522);
523
Luciano Coelho79f460c2011-05-11 17:09:36 +0300524DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200525 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300526 struct ieee80211_sub_if_data *sdata),
527 TP_ARGS(local, sdata)
528);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200529
Eliad Pellerb8564392011-06-13 12:47:30 +0300530DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
531 TP_PROTO(struct ieee80211_local *local,
532 struct ieee80211_sub_if_data *sdata),
533 TP_ARGS(local, sdata)
534);
535
Luciano Coelho79f460c2011-05-11 17:09:36 +0300536DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
537 TP_PROTO(struct ieee80211_local *local,
538 struct ieee80211_sub_if_data *sdata),
539 TP_ARGS(local, sdata)
540);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200541
Luciano Coelho79f460c2011-05-11 17:09:36 +0300542DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
543 TP_PROTO(struct ieee80211_local *local,
544 struct ieee80211_sub_if_data *sdata),
545 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200546);
547
Johannes Bergba99d932011-01-26 09:22:15 +0100548DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200549 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100550 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200551);
552
Johannes Bergba99d932011-01-26 09:22:15 +0100553DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200554 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100555 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200556);
557
558TRACE_EVENT(drv_get_stats,
559 TP_PROTO(struct ieee80211_local *local,
560 struct ieee80211_low_level_stats *stats,
561 int ret),
562
563 TP_ARGS(local, stats, ret),
564
565 TP_STRUCT__entry(
566 LOCAL_ENTRY
567 __field(int, ret)
568 __field(unsigned int, ackfail)
569 __field(unsigned int, rtsfail)
570 __field(unsigned int, fcserr)
571 __field(unsigned int, rtssucc)
572 ),
573
574 TP_fast_assign(
575 LOCAL_ASSIGN;
576 __entry->ret = ret;
577 __entry->ackfail = stats->dot11ACKFailureCount;
578 __entry->rtsfail = stats->dot11RTSFailureCount;
579 __entry->fcserr = stats->dot11FCSErrorCount;
580 __entry->rtssucc = stats->dot11RTSSuccessCount;
581 ),
582
583 TP_printk(
584 LOCAL_PR_FMT " ret:%d",
585 LOCAL_PR_ARG, __entry->ret
586 )
587);
588
589TRACE_EVENT(drv_get_tkip_seq,
590 TP_PROTO(struct ieee80211_local *local,
591 u8 hw_key_idx, u32 *iv32, u16 *iv16),
592
593 TP_ARGS(local, hw_key_idx, iv32, iv16),
594
595 TP_STRUCT__entry(
596 LOCAL_ENTRY
597 __field(u8, hw_key_idx)
598 __field(u32, iv32)
599 __field(u16, iv16)
600 ),
601
602 TP_fast_assign(
603 LOCAL_ASSIGN;
604 __entry->hw_key_idx = hw_key_idx;
605 __entry->iv32 = *iv32;
606 __entry->iv16 = *iv16;
607 ),
608
609 TP_printk(
610 LOCAL_PR_FMT, LOCAL_PR_ARG
611 )
612);
613
Luciano Coelho92ddc112011-05-09 14:40:06 +0300614DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200615 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300616 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200617);
618
Luciano Coelho92ddc112011-05-09 14:40:06 +0300619DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200620 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300621 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200622);
623
Lukáš Turek310bc672009-12-21 22:50:48 +0100624TRACE_EVENT(drv_set_coverage_class,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200625 TP_PROTO(struct ieee80211_local *local, u8 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100626
Johannes Berg4efc76b2010-06-10 10:56:20 +0200627 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100628
629 TP_STRUCT__entry(
630 LOCAL_ENTRY
631 __field(u8, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100632 ),
633
634 TP_fast_assign(
635 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100636 __entry->value = value;
637 ),
638
639 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200640 LOCAL_PR_FMT " value:%d",
641 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100642 )
643);
644
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200645TRACE_EVENT(drv_sta_notify,
646 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100647 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200648 enum sta_notify_cmd cmd,
649 struct ieee80211_sta *sta),
650
Johannes Berg12375ef2009-11-25 20:30:31 +0100651 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200652
653 TP_STRUCT__entry(
654 LOCAL_ENTRY
655 VIF_ENTRY
656 STA_ENTRY
657 __field(u32, cmd)
658 ),
659
660 TP_fast_assign(
661 LOCAL_ASSIGN;
662 VIF_ASSIGN;
663 STA_ASSIGN;
664 __entry->cmd = cmd;
665 ),
666
667 TP_printk(
668 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
669 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
670 )
671);
672
Johannes Bergf09603a2012-01-20 13:55:21 +0100673TRACE_EVENT(drv_sta_state,
674 TP_PROTO(struct ieee80211_local *local,
675 struct ieee80211_sub_if_data *sdata,
676 struct ieee80211_sta *sta,
677 enum ieee80211_sta_state old_state,
678 enum ieee80211_sta_state new_state),
679
680 TP_ARGS(local, sdata, sta, old_state, new_state),
681
682 TP_STRUCT__entry(
683 LOCAL_ENTRY
684 VIF_ENTRY
685 STA_ENTRY
686 __field(u32, old_state)
687 __field(u32, new_state)
688 ),
689
690 TP_fast_assign(
691 LOCAL_ASSIGN;
692 VIF_ASSIGN;
693 STA_ASSIGN;
694 __entry->old_state = old_state;
695 __entry->new_state = new_state;
696 ),
697
698 TP_printk(
699 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
700 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
701 __entry->old_state, __entry->new_state
702 )
703);
704
Johannes Berg8f727ef2012-03-30 08:43:32 +0200705TRACE_EVENT(drv_sta_rc_update,
706 TP_PROTO(struct ieee80211_local *local,
707 struct ieee80211_sub_if_data *sdata,
708 struct ieee80211_sta *sta,
709 u32 changed),
710
711 TP_ARGS(local, sdata, sta, changed),
712
713 TP_STRUCT__entry(
714 LOCAL_ENTRY
715 VIF_ENTRY
716 STA_ENTRY
717 __field(u32, changed)
718 ),
719
720 TP_fast_assign(
721 LOCAL_ASSIGN;
722 VIF_ASSIGN;
723 STA_ASSIGN;
724 __entry->changed = changed;
725 ),
726
727 TP_printk(
728 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
729 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
730 )
731);
732
Johannes Berg34e89502010-02-03 13:59:58 +0100733TRACE_EVENT(drv_sta_add,
734 TP_PROTO(struct ieee80211_local *local,
735 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200736 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100737
Johannes Berg4efc76b2010-06-10 10:56:20 +0200738 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100739
740 TP_STRUCT__entry(
741 LOCAL_ENTRY
742 VIF_ENTRY
743 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100744 ),
745
746 TP_fast_assign(
747 LOCAL_ASSIGN;
748 VIF_ASSIGN;
749 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100750 ),
751
752 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200753 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
754 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100755 )
756);
757
758TRACE_EVENT(drv_sta_remove,
759 TP_PROTO(struct ieee80211_local *local,
760 struct ieee80211_sub_if_data *sdata,
761 struct ieee80211_sta *sta),
762
763 TP_ARGS(local, sdata, sta),
764
765 TP_STRUCT__entry(
766 LOCAL_ENTRY
767 VIF_ENTRY
768 STA_ENTRY
769 ),
770
771 TP_fast_assign(
772 LOCAL_ASSIGN;
773 VIF_ASSIGN;
774 STA_ASSIGN;
775 ),
776
777 TP_printk(
778 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
779 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
780 )
781);
782
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200783TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300784 TP_PROTO(struct ieee80211_local *local,
785 struct ieee80211_sub_if_data *sdata,
Johannes Berga3304b02012-03-28 11:04:24 +0200786 u16 ac, const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200787
Johannes Berga3304b02012-03-28 11:04:24 +0200788 TP_ARGS(local, sdata, ac, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200789
790 TP_STRUCT__entry(
791 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300792 VIF_ENTRY
Johannes Berga3304b02012-03-28 11:04:24 +0200793 __field(u16, ac)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200794 __field(u16, txop)
795 __field(u16, cw_min)
796 __field(u16, cw_max)
797 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300798 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200799 ),
800
801 TP_fast_assign(
802 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300803 VIF_ASSIGN;
Johannes Berga3304b02012-03-28 11:04:24 +0200804 __entry->ac = ac;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200805 __entry->txop = params->txop;
806 __entry->cw_max = params->cw_max;
807 __entry->cw_min = params->cw_min;
808 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300809 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200810 ),
811
812 TP_printk(
Johannes Berga3304b02012-03-28 11:04:24 +0200813 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
814 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200815 )
816);
817
Eliad Peller37a41b42011-09-21 14:06:11 +0300818DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
819 TP_PROTO(struct ieee80211_local *local,
820 struct ieee80211_sub_if_data *sdata),
821 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200822);
823
824TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +0300825 TP_PROTO(struct ieee80211_local *local,
826 struct ieee80211_sub_if_data *sdata,
827 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200828
Eliad Peller37a41b42011-09-21 14:06:11 +0300829 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200830
831 TP_STRUCT__entry(
832 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +0300833 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200834 __field(u64, tsf)
835 ),
836
837 TP_fast_assign(
838 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +0300839 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200840 __entry->tsf = tsf;
841 ),
842
843 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +0300844 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
845 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200846 )
847);
848
Eliad Peller37a41b42011-09-21 14:06:11 +0300849DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
850 TP_PROTO(struct ieee80211_local *local,
851 struct ieee80211_sub_if_data *sdata),
852 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200853);
854
Johannes Bergba99d932011-01-26 09:22:15 +0100855DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200856 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100857 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200858);
859
860TRACE_EVENT(drv_ampdu_action,
861 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100862 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200863 enum ieee80211_ampdu_mlme_action action,
864 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100865 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200866
Johannes Berg0b01f032011-01-18 13:51:05 +0100867 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200868
869 TP_STRUCT__entry(
870 LOCAL_ENTRY
871 STA_ENTRY
872 __field(u32, action)
873 __field(u16, tid)
874 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100875 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100876 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200877 ),
878
879 TP_fast_assign(
880 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100881 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200882 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200883 __entry->action = action;
884 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800885 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100886 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200887 ),
888
889 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100890 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
891 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
892 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200893 )
894);
Johannes Berga80f7c02009-12-23 13:15:32 +0100895
John W. Linvillec466d4e2010-06-29 14:51:23 -0400896TRACE_EVENT(drv_get_survey,
897 TP_PROTO(struct ieee80211_local *local, int idx,
898 struct survey_info *survey),
899
900 TP_ARGS(local, idx, survey),
901
902 TP_STRUCT__entry(
903 LOCAL_ENTRY
904 __field(int, idx)
905 ),
906
907 TP_fast_assign(
908 LOCAL_ASSIGN;
909 __entry->idx = idx;
910 ),
911
912 TP_printk(
913 LOCAL_PR_FMT " idx:%d",
914 LOCAL_PR_ARG, __entry->idx
915 )
916);
917
Johannes Berga80f7c02009-12-23 13:15:32 +0100918TRACE_EVENT(drv_flush,
919 TP_PROTO(struct ieee80211_local *local, bool drop),
920
921 TP_ARGS(local, drop),
922
923 TP_STRUCT__entry(
924 LOCAL_ENTRY
925 __field(bool, drop)
926 ),
927
928 TP_fast_assign(
929 LOCAL_ASSIGN;
930 __entry->drop = drop;
931 ),
932
933 TP_printk(
934 LOCAL_PR_FMT " drop:%d",
935 LOCAL_PR_ARG, __entry->drop
936 )
937);
Johannes Bergb5878a22010-04-07 16:48:40 +0200938
Johannes Berg5ce6e432010-05-11 16:20:57 +0200939TRACE_EVENT(drv_channel_switch,
940 TP_PROTO(struct ieee80211_local *local,
941 struct ieee80211_channel_switch *ch_switch),
942
943 TP_ARGS(local, ch_switch),
944
945 TP_STRUCT__entry(
946 LOCAL_ENTRY
947 __field(u64, timestamp)
948 __field(bool, block_tx)
949 __field(u16, freq)
950 __field(u8, count)
951 ),
952
953 TP_fast_assign(
954 LOCAL_ASSIGN;
955 __entry->timestamp = ch_switch->timestamp;
956 __entry->block_tx = ch_switch->block_tx;
957 __entry->freq = ch_switch->channel->center_freq;
958 __entry->count = ch_switch->count;
959 ),
960
961 TP_printk(
962 LOCAL_PR_FMT " new freq:%u count:%d",
963 LOCAL_PR_ARG, __entry->freq, __entry->count
964 )
965);
966
Bruno Randolf15d96752010-11-10 12:50:56 +0900967TRACE_EVENT(drv_set_antenna,
968 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
969
970 TP_ARGS(local, tx_ant, rx_ant, ret),
971
972 TP_STRUCT__entry(
973 LOCAL_ENTRY
974 __field(u32, tx_ant)
975 __field(u32, rx_ant)
976 __field(int, ret)
977 ),
978
979 TP_fast_assign(
980 LOCAL_ASSIGN;
981 __entry->tx_ant = tx_ant;
982 __entry->rx_ant = rx_ant;
983 __entry->ret = ret;
984 ),
985
986 TP_printk(
987 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
988 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
989 )
990);
991
992TRACE_EVENT(drv_get_antenna,
993 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
994
995 TP_ARGS(local, tx_ant, rx_ant, ret),
996
997 TP_STRUCT__entry(
998 LOCAL_ENTRY
999 __field(u32, tx_ant)
1000 __field(u32, rx_ant)
1001 __field(int, ret)
1002 ),
1003
1004 TP_fast_assign(
1005 LOCAL_ASSIGN;
1006 __entry->tx_ant = tx_ant;
1007 __entry->rx_ant = rx_ant;
1008 __entry->ret = ret;
1009 ),
1010
1011 TP_printk(
1012 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1013 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1014 )
1015);
1016
Johannes Berg21f83582010-12-18 17:20:47 +01001017TRACE_EVENT(drv_remain_on_channel,
1018 TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
1019 enum nl80211_channel_type chantype, unsigned int duration),
1020
1021 TP_ARGS(local, chan, chantype, duration),
1022
1023 TP_STRUCT__entry(
1024 LOCAL_ENTRY
1025 __field(int, center_freq)
1026 __field(int, channel_type)
1027 __field(unsigned int, duration)
1028 ),
1029
1030 TP_fast_assign(
1031 LOCAL_ASSIGN;
1032 __entry->center_freq = chan->center_freq;
1033 __entry->channel_type = chantype;
1034 __entry->duration = duration;
1035 ),
1036
1037 TP_printk(
1038 LOCAL_PR_FMT " freq:%dMHz duration:%dms",
1039 LOCAL_PR_ARG, __entry->center_freq, __entry->duration
1040 )
1041);
1042
Johannes Bergba99d932011-01-26 09:22:15 +01001043DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001044 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001045 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001046);
1047
Johannes Berg5f16a432011-02-25 15:36:57 +01001048TRACE_EVENT(drv_offchannel_tx,
1049 TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
1050 struct ieee80211_channel *chan,
1051 enum nl80211_channel_type channel_type,
1052 unsigned int wait),
1053
1054 TP_ARGS(local, skb, chan, channel_type, wait),
1055
1056 TP_STRUCT__entry(
1057 LOCAL_ENTRY
1058 __field(int, center_freq)
1059 __field(int, channel_type)
1060 __field(unsigned int, wait)
1061 ),
1062
1063 TP_fast_assign(
1064 LOCAL_ASSIGN;
1065 __entry->center_freq = chan->center_freq;
1066 __entry->channel_type = channel_type;
1067 __entry->wait = wait;
1068 ),
1069
1070 TP_printk(
1071 LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
1072 LOCAL_PR_ARG, __entry->center_freq, __entry->wait
1073 )
1074);
1075
John W. Linville38c09152011-03-07 16:19:18 -05001076TRACE_EVENT(drv_set_ringparam,
1077 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1078
1079 TP_ARGS(local, tx, rx),
1080
1081 TP_STRUCT__entry(
1082 LOCAL_ENTRY
1083 __field(u32, tx)
1084 __field(u32, rx)
1085 ),
1086
1087 TP_fast_assign(
1088 LOCAL_ASSIGN;
1089 __entry->tx = tx;
1090 __entry->rx = rx;
1091 ),
1092
1093 TP_printk(
1094 LOCAL_PR_FMT " tx:%d rx %d",
1095 LOCAL_PR_ARG, __entry->tx, __entry->rx
1096 )
1097);
1098
1099TRACE_EVENT(drv_get_ringparam,
1100 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1101 u32 *rx, u32 *rx_max),
1102
1103 TP_ARGS(local, tx, tx_max, rx, rx_max),
1104
1105 TP_STRUCT__entry(
1106 LOCAL_ENTRY
1107 __field(u32, tx)
1108 __field(u32, tx_max)
1109 __field(u32, rx)
1110 __field(u32, rx_max)
1111 ),
1112
1113 TP_fast_assign(
1114 LOCAL_ASSIGN;
1115 __entry->tx = *tx;
1116 __entry->tx_max = *tx_max;
1117 __entry->rx = *rx;
1118 __entry->rx_max = *rx_max;
1119 ),
1120
1121 TP_printk(
1122 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1123 LOCAL_PR_ARG,
1124 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1125 )
1126);
1127
Vivek Natarajane8306f92011-04-06 11:41:10 +05301128DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1129 TP_PROTO(struct ieee80211_local *local),
1130 TP_ARGS(local)
1131);
1132
Johannes Berg5f16a432011-02-25 15:36:57 +01001133DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1134 TP_PROTO(struct ieee80211_local *local),
1135 TP_ARGS(local)
1136);
1137
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301138TRACE_EVENT(drv_set_bitrate_mask,
1139 TP_PROTO(struct ieee80211_local *local,
1140 struct ieee80211_sub_if_data *sdata,
1141 const struct cfg80211_bitrate_mask *mask),
1142
1143 TP_ARGS(local, sdata, mask),
1144
1145 TP_STRUCT__entry(
1146 LOCAL_ENTRY
1147 VIF_ENTRY
1148 __field(u32, legacy_2g)
1149 __field(u32, legacy_5g)
1150 ),
1151
1152 TP_fast_assign(
1153 LOCAL_ASSIGN;
1154 VIF_ASSIGN;
1155 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1156 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1157 ),
1158
1159 TP_printk(
1160 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1161 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1162 )
1163);
1164
Johannes Bergc68f4b82011-07-05 16:35:41 +02001165TRACE_EVENT(drv_set_rekey_data,
1166 TP_PROTO(struct ieee80211_local *local,
1167 struct ieee80211_sub_if_data *sdata,
1168 struct cfg80211_gtk_rekey_data *data),
1169
1170 TP_ARGS(local, sdata, data),
1171
1172 TP_STRUCT__entry(
1173 LOCAL_ENTRY
1174 VIF_ENTRY
1175 __array(u8, kek, NL80211_KEK_LEN)
1176 __array(u8, kck, NL80211_KCK_LEN)
1177 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1178 ),
1179
1180 TP_fast_assign(
1181 LOCAL_ASSIGN;
1182 VIF_ASSIGN;
1183 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1184 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1185 memcpy(__entry->replay_ctr, data->replay_ctr,
1186 NL80211_REPLAY_CTR_LEN);
1187 ),
1188
1189 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1190 LOCAL_PR_ARG, VIF_PR_ARG)
1191);
1192
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001193TRACE_EVENT(drv_rssi_callback,
1194 TP_PROTO(struct ieee80211_local *local,
1195 enum ieee80211_rssi_event rssi_event),
1196
1197 TP_ARGS(local, rssi_event),
1198
1199 TP_STRUCT__entry(
1200 LOCAL_ENTRY
1201 __field(u32, rssi_event)
1202 ),
1203
1204 TP_fast_assign(
1205 LOCAL_ASSIGN;
1206 __entry->rssi_event = rssi_event;
1207 ),
1208
1209 TP_printk(
1210 LOCAL_PR_FMT " rssi_event:%d",
1211 LOCAL_PR_ARG, __entry->rssi_event
1212 )
1213);
1214
Johannes Berg40b96402011-09-29 16:04:38 +02001215DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001216 TP_PROTO(struct ieee80211_local *local,
1217 struct ieee80211_sta *sta,
1218 u16 tids, int num_frames,
1219 enum ieee80211_frame_release_type reason,
1220 bool more_data),
1221
1222 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1223
1224 TP_STRUCT__entry(
1225 LOCAL_ENTRY
1226 STA_ENTRY
1227 __field(u16, tids)
1228 __field(int, num_frames)
1229 __field(int, reason)
1230 __field(bool, more_data)
1231 ),
1232
1233 TP_fast_assign(
1234 LOCAL_ASSIGN;
1235 STA_ASSIGN;
1236 __entry->tids = tids;
1237 __entry->num_frames = num_frames;
1238 __entry->reason = reason;
1239 __entry->more_data = more_data;
1240 ),
1241
1242 TP_printk(
1243 LOCAL_PR_FMT STA_PR_FMT
1244 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1245 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1246 __entry->reason, __entry->more_data
1247 )
1248);
1249
Johannes Berg40b96402011-09-29 16:04:38 +02001250DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1251 TP_PROTO(struct ieee80211_local *local,
1252 struct ieee80211_sta *sta,
1253 u16 tids, int num_frames,
1254 enum ieee80211_frame_release_type reason,
1255 bool more_data),
1256
1257 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1258);
1259
1260DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1261 TP_PROTO(struct ieee80211_local *local,
1262 struct ieee80211_sta *sta,
1263 u16 tids, int num_frames,
1264 enum ieee80211_frame_release_type reason,
1265 bool more_data),
1266
1267 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1268);
1269
Victor Goldenshtein66572cf2012-06-21 10:56:46 +03001270TRACE_EVENT(drv_get_rssi,
1271 TP_PROTO(struct ieee80211_local *local, struct ieee80211_sta *sta,
1272 s8 rssi, int ret),
1273
1274 TP_ARGS(local, sta, rssi, ret),
1275
1276 TP_STRUCT__entry(
1277 LOCAL_ENTRY
1278 STA_ENTRY
1279 __field(s8, rssi)
1280 __field(int, ret)
1281 ),
1282
1283 TP_fast_assign(
1284 LOCAL_ASSIGN;
1285 STA_ASSIGN;
1286 __entry->rssi = rssi;
1287 __entry->ret = ret;
1288 ),
1289
1290 TP_printk(
1291 LOCAL_PR_FMT STA_PR_FMT " rssi:%d ret:%d",
1292 LOCAL_PR_ARG, STA_PR_ARG, __entry->rssi, __entry->ret
1293 )
1294);
1295
Johannes Berga1845fc2012-06-27 13:18:36 +02001296DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
1297 TP_PROTO(struct ieee80211_local *local,
1298 struct ieee80211_sub_if_data *sdata),
1299
1300 TP_ARGS(local, sdata)
1301);
1302
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001303DECLARE_EVENT_CLASS(local_chanctx,
1304 TP_PROTO(struct ieee80211_local *local,
1305 struct ieee80211_chanctx *ctx),
1306
1307 TP_ARGS(local, ctx),
1308
1309 TP_STRUCT__entry(
1310 LOCAL_ENTRY
1311 CHANCTX_ENTRY
1312 ),
1313
1314 TP_fast_assign(
1315 LOCAL_ASSIGN;
1316 CHANCTX_ASSIGN;
1317 ),
1318
1319 TP_printk(
1320 LOCAL_PR_FMT CHANCTX_PR_FMT,
1321 LOCAL_PR_ARG, CHANCTX_PR_ARG
1322 )
1323);
1324
1325DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1326 TP_PROTO(struct ieee80211_local *local,
1327 struct ieee80211_chanctx *ctx),
1328 TP_ARGS(local, ctx)
1329);
1330
1331DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1332 TP_PROTO(struct ieee80211_local *local,
1333 struct ieee80211_chanctx *ctx),
1334 TP_ARGS(local, ctx)
1335);
1336
1337TRACE_EVENT(drv_change_chanctx,
1338 TP_PROTO(struct ieee80211_local *local,
1339 struct ieee80211_chanctx *ctx,
1340 u32 changed),
1341
1342 TP_ARGS(local, ctx, changed),
1343
1344 TP_STRUCT__entry(
1345 LOCAL_ENTRY
1346 CHANCTX_ENTRY
1347 __field(u32, changed)
1348 ),
1349
1350 TP_fast_assign(
1351 LOCAL_ASSIGN;
1352 CHANCTX_ASSIGN;
1353 __entry->changed = changed;
1354 ),
1355
1356 TP_printk(
1357 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1358 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1359 )
1360);
1361
1362DECLARE_EVENT_CLASS(local_sdata_chanctx,
1363 TP_PROTO(struct ieee80211_local *local,
1364 struct ieee80211_sub_if_data *sdata,
1365 struct ieee80211_chanctx *ctx),
1366
1367 TP_ARGS(local, sdata, ctx),
1368
1369 TP_STRUCT__entry(
1370 LOCAL_ENTRY
1371 VIF_ENTRY
1372 CHANCTX_ENTRY
1373 ),
1374
1375 TP_fast_assign(
1376 LOCAL_ASSIGN;
1377 VIF_ASSIGN;
1378 CHANCTX_ASSIGN;
1379 ),
1380
1381 TP_printk(
1382 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
1383 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
1384 )
1385);
1386
1387DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1388 TP_PROTO(struct ieee80211_local *local,
1389 struct ieee80211_sub_if_data *sdata,
1390 struct ieee80211_chanctx *ctx),
1391 TP_ARGS(local, sdata, ctx)
1392);
1393
1394DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1395 TP_PROTO(struct ieee80211_local *local,
1396 struct ieee80211_sub_if_data *sdata,
1397 struct ieee80211_chanctx *ctx),
1398 TP_ARGS(local, sdata, ctx)
1399);
1400
Johannes Berg10416382012-10-19 15:44:42 +02001401TRACE_EVENT(drv_start_ap,
1402 TP_PROTO(struct ieee80211_local *local,
1403 struct ieee80211_sub_if_data *sdata,
1404 struct ieee80211_bss_conf *info),
1405
1406 TP_ARGS(local, sdata, info),
1407
1408 TP_STRUCT__entry(
1409 LOCAL_ENTRY
1410 VIF_ENTRY
1411 __field(u8, dtimper)
1412 __field(u16, bcnint)
1413 __dynamic_array(u8, ssid, info->ssid_len);
1414 __field(bool, hidden_ssid);
1415 ),
1416
1417 TP_fast_assign(
1418 LOCAL_ASSIGN;
1419 VIF_ASSIGN;
1420 __entry->dtimper = info->dtim_period;
1421 __entry->bcnint = info->beacon_int;
1422 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1423 __entry->hidden_ssid = info->hidden_ssid;
1424 ),
1425
1426 TP_printk(
1427 LOCAL_PR_FMT VIF_PR_FMT,
1428 LOCAL_PR_ARG, VIF_PR_ARG
1429 )
1430);
1431
1432DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
1433 TP_PROTO(struct ieee80211_local *local,
1434 struct ieee80211_sub_if_data *sdata),
1435 TP_ARGS(local, sdata)
1436);
1437
Johannes Bergb5878a22010-04-07 16:48:40 +02001438/*
1439 * Tracing for API calls that drivers call.
1440 */
1441
1442TRACE_EVENT(api_start_tx_ba_session,
1443 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1444
1445 TP_ARGS(sta, tid),
1446
1447 TP_STRUCT__entry(
1448 STA_ENTRY
1449 __field(u16, tid)
1450 ),
1451
1452 TP_fast_assign(
1453 STA_ASSIGN;
1454 __entry->tid = tid;
1455 ),
1456
1457 TP_printk(
1458 STA_PR_FMT " tid:%d",
1459 STA_PR_ARG, __entry->tid
1460 )
1461);
1462
1463TRACE_EVENT(api_start_tx_ba_cb,
1464 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1465
1466 TP_ARGS(sdata, ra, tid),
1467
1468 TP_STRUCT__entry(
1469 VIF_ENTRY
1470 __array(u8, ra, ETH_ALEN)
1471 __field(u16, tid)
1472 ),
1473
1474 TP_fast_assign(
1475 VIF_ASSIGN;
1476 memcpy(__entry->ra, ra, ETH_ALEN);
1477 __entry->tid = tid;
1478 ),
1479
1480 TP_printk(
1481 VIF_PR_FMT " ra:%pM tid:%d",
1482 VIF_PR_ARG, __entry->ra, __entry->tid
1483 )
1484);
1485
1486TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001487 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001488
Johannes Berg6a8579d2010-05-27 14:41:07 +02001489 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001490
1491 TP_STRUCT__entry(
1492 STA_ENTRY
1493 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001494 ),
1495
1496 TP_fast_assign(
1497 STA_ASSIGN;
1498 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001499 ),
1500
1501 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001502 STA_PR_FMT " tid:%d",
1503 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001504 )
1505);
1506
1507TRACE_EVENT(api_stop_tx_ba_cb,
1508 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1509
1510 TP_ARGS(sdata, ra, tid),
1511
1512 TP_STRUCT__entry(
1513 VIF_ENTRY
1514 __array(u8, ra, ETH_ALEN)
1515 __field(u16, tid)
1516 ),
1517
1518 TP_fast_assign(
1519 VIF_ASSIGN;
1520 memcpy(__entry->ra, ra, ETH_ALEN);
1521 __entry->tid = tid;
1522 ),
1523
1524 TP_printk(
1525 VIF_PR_FMT " ra:%pM tid:%d",
1526 VIF_PR_ARG, __entry->ra, __entry->tid
1527 )
1528);
1529
Johannes Bergba99d932011-01-26 09:22:15 +01001530DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001531 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001532 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001533);
1534
1535TRACE_EVENT(api_beacon_loss,
1536 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1537
1538 TP_ARGS(sdata),
1539
1540 TP_STRUCT__entry(
1541 VIF_ENTRY
1542 ),
1543
1544 TP_fast_assign(
1545 VIF_ASSIGN;
1546 ),
1547
1548 TP_printk(
1549 VIF_PR_FMT,
1550 VIF_PR_ARG
1551 )
1552);
1553
1554TRACE_EVENT(api_connection_loss,
1555 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1556
1557 TP_ARGS(sdata),
1558
1559 TP_STRUCT__entry(
1560 VIF_ENTRY
1561 ),
1562
1563 TP_fast_assign(
1564 VIF_ASSIGN;
1565 ),
1566
1567 TP_printk(
1568 VIF_PR_FMT,
1569 VIF_PR_ARG
1570 )
1571);
1572
1573TRACE_EVENT(api_cqm_rssi_notify,
1574 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1575 enum nl80211_cqm_rssi_threshold_event rssi_event),
1576
1577 TP_ARGS(sdata, rssi_event),
1578
1579 TP_STRUCT__entry(
1580 VIF_ENTRY
1581 __field(u32, rssi_event)
1582 ),
1583
1584 TP_fast_assign(
1585 VIF_ASSIGN;
1586 __entry->rssi_event = rssi_event;
1587 ),
1588
1589 TP_printk(
1590 VIF_PR_FMT " event:%d",
1591 VIF_PR_ARG, __entry->rssi_event
1592 )
1593);
1594
1595TRACE_EVENT(api_scan_completed,
1596 TP_PROTO(struct ieee80211_local *local, bool aborted),
1597
1598 TP_ARGS(local, aborted),
1599
1600 TP_STRUCT__entry(
1601 LOCAL_ENTRY
1602 __field(bool, aborted)
1603 ),
1604
1605 TP_fast_assign(
1606 LOCAL_ASSIGN;
1607 __entry->aborted = aborted;
1608 ),
1609
1610 TP_printk(
1611 LOCAL_PR_FMT " aborted:%d",
1612 LOCAL_PR_ARG, __entry->aborted
1613 )
1614);
1615
Luciano Coelho79f460c2011-05-11 17:09:36 +03001616TRACE_EVENT(api_sched_scan_results,
1617 TP_PROTO(struct ieee80211_local *local),
1618
1619 TP_ARGS(local),
1620
1621 TP_STRUCT__entry(
1622 LOCAL_ENTRY
1623 ),
1624
1625 TP_fast_assign(
1626 LOCAL_ASSIGN;
1627 ),
1628
1629 TP_printk(
1630 LOCAL_PR_FMT, LOCAL_PR_ARG
1631 )
1632);
1633
1634TRACE_EVENT(api_sched_scan_stopped,
1635 TP_PROTO(struct ieee80211_local *local),
1636
1637 TP_ARGS(local),
1638
1639 TP_STRUCT__entry(
1640 LOCAL_ENTRY
1641 ),
1642
1643 TP_fast_assign(
1644 LOCAL_ASSIGN;
1645 ),
1646
1647 TP_printk(
1648 LOCAL_PR_FMT, LOCAL_PR_ARG
1649 )
1650);
1651
Johannes Bergb5878a22010-04-07 16:48:40 +02001652TRACE_EVENT(api_sta_block_awake,
1653 TP_PROTO(struct ieee80211_local *local,
1654 struct ieee80211_sta *sta, bool block),
1655
1656 TP_ARGS(local, sta, block),
1657
1658 TP_STRUCT__entry(
1659 LOCAL_ENTRY
1660 STA_ENTRY
1661 __field(bool, block)
1662 ),
1663
1664 TP_fast_assign(
1665 LOCAL_ASSIGN;
1666 STA_ASSIGN;
1667 __entry->block = block;
1668 ),
1669
1670 TP_printk(
1671 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1672 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
1673 )
1674);
1675
Johannes Berg5ce6e432010-05-11 16:20:57 +02001676TRACE_EVENT(api_chswitch_done,
1677 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1678
1679 TP_ARGS(sdata, success),
1680
1681 TP_STRUCT__entry(
1682 VIF_ENTRY
1683 __field(bool, success)
1684 ),
1685
1686 TP_fast_assign(
1687 VIF_ASSIGN;
1688 __entry->success = success;
1689 ),
1690
1691 TP_printk(
1692 VIF_PR_FMT " success=%d",
1693 VIF_PR_ARG, __entry->success
1694 )
1695);
1696
Johannes Bergba99d932011-01-26 09:22:15 +01001697DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001698 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001699 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001700);
1701
Johannes Bergba99d932011-01-26 09:22:15 +01001702DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001703 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001704 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001705);
1706
Johannes Bergc68f4b82011-07-05 16:35:41 +02001707TRACE_EVENT(api_gtk_rekey_notify,
1708 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1709 const u8 *bssid, const u8 *replay_ctr),
1710
1711 TP_ARGS(sdata, bssid, replay_ctr),
1712
1713 TP_STRUCT__entry(
1714 VIF_ENTRY
1715 __array(u8, bssid, ETH_ALEN)
1716 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1717 ),
1718
1719 TP_fast_assign(
1720 VIF_ASSIGN;
1721 memcpy(__entry->bssid, bssid, ETH_ALEN);
1722 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1723 ),
1724
1725 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1726);
1727
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001728TRACE_EVENT(api_enable_rssi_reports,
1729 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1730 int rssi_min_thold, int rssi_max_thold),
1731
1732 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1733
1734 TP_STRUCT__entry(
1735 VIF_ENTRY
1736 __field(int, rssi_min_thold)
1737 __field(int, rssi_max_thold)
1738 ),
1739
1740 TP_fast_assign(
1741 VIF_ASSIGN;
1742 __entry->rssi_min_thold = rssi_min_thold;
1743 __entry->rssi_max_thold = rssi_max_thold;
1744 ),
1745
1746 TP_printk(
1747 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
1748 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
1749 )
1750);
1751
Johannes Berg37fbd902011-09-29 16:04:39 +02001752TRACE_EVENT(api_eosp,
1753 TP_PROTO(struct ieee80211_local *local,
1754 struct ieee80211_sta *sta),
1755
1756 TP_ARGS(local, sta),
1757
1758 TP_STRUCT__entry(
1759 LOCAL_ENTRY
1760 STA_ENTRY
1761 ),
1762
1763 TP_fast_assign(
1764 LOCAL_ASSIGN;
1765 STA_ASSIGN;
1766 ),
1767
1768 TP_printk(
1769 LOCAL_PR_FMT STA_PR_FMT,
1770 LOCAL_PR_ARG, STA_PR_FMT
1771 )
1772);
1773
Johannes Bergb5878a22010-04-07 16:48:40 +02001774/*
1775 * Tracing for internal functions
1776 * (which may also be called in response to driver calls)
1777 */
1778
1779TRACE_EVENT(wake_queue,
1780 TP_PROTO(struct ieee80211_local *local, u16 queue,
1781 enum queue_stop_reason reason),
1782
1783 TP_ARGS(local, queue, reason),
1784
1785 TP_STRUCT__entry(
1786 LOCAL_ENTRY
1787 __field(u16, queue)
1788 __field(u32, reason)
1789 ),
1790
1791 TP_fast_assign(
1792 LOCAL_ASSIGN;
1793 __entry->queue = queue;
1794 __entry->reason = reason;
1795 ),
1796
1797 TP_printk(
1798 LOCAL_PR_FMT " queue:%d, reason:%d",
1799 LOCAL_PR_ARG, __entry->queue, __entry->reason
1800 )
1801);
1802
1803TRACE_EVENT(stop_queue,
1804 TP_PROTO(struct ieee80211_local *local, u16 queue,
1805 enum queue_stop_reason reason),
1806
1807 TP_ARGS(local, queue, reason),
1808
1809 TP_STRUCT__entry(
1810 LOCAL_ENTRY
1811 __field(u16, queue)
1812 __field(u32, reason)
1813 ),
1814
1815 TP_fast_assign(
1816 LOCAL_ASSIGN;
1817 __entry->queue = queue;
1818 __entry->reason = reason;
1819 ),
1820
1821 TP_printk(
1822 LOCAL_PR_FMT " queue:%d, reason:%d",
1823 LOCAL_PR_ARG, __entry->queue, __entry->reason
1824 )
1825);
Johannes Berg3fae0272012-06-22 13:36:25 +02001826
1827#ifdef CONFIG_MAC80211_MESSAGE_TRACING
1828#undef TRACE_SYSTEM
1829#define TRACE_SYSTEM mac80211_msg
1830
1831#define MAX_MSG_LEN 100
1832
1833DECLARE_EVENT_CLASS(mac80211_msg_event,
1834 TP_PROTO(struct va_format *vaf),
1835
1836 TP_ARGS(vaf),
1837
1838 TP_STRUCT__entry(
1839 __dynamic_array(char, msg, MAX_MSG_LEN)
1840 ),
1841
1842 TP_fast_assign(
1843 WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
1844 MAX_MSG_LEN, vaf->fmt,
1845 *vaf->va) >= MAX_MSG_LEN);
1846 ),
1847
1848 TP_printk("%s", __get_str(msg))
1849);
1850
1851DEFINE_EVENT(mac80211_msg_event, mac80211_info,
1852 TP_PROTO(struct va_format *vaf),
1853 TP_ARGS(vaf)
1854);
1855DEFINE_EVENT(mac80211_msg_event, mac80211_dbg,
1856 TP_PROTO(struct va_format *vaf),
1857 TP_ARGS(vaf)
1858);
1859DEFINE_EVENT(mac80211_msg_event, mac80211_err,
1860 TP_PROTO(struct va_format *vaf),
1861 TP_ARGS(vaf)
1862);
1863#endif
1864
Christian Lamparterf7428802009-07-19 23:21:07 +02001865#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001866
1867#undef TRACE_INCLUDE_PATH
1868#define TRACE_INCLUDE_PATH .
1869#undef TRACE_INCLUDE_FILE
Johannes Berg011ad0e2012-06-22 12:55:52 +02001870#define TRACE_INCLUDE_FILE trace
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001871#include <trace/define_trace.h>