blob: 7794e533989ab8e80280d5122db1bb7b3962f8bf [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 Berg488dd7b2012-10-29 20:08:01 +0100346 __field(u8, p2p_ctwindow)
347 __field(bool, p2p_oppps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200348 ),
349
350 TP_fast_assign(
351 LOCAL_ASSIGN;
352 VIF_ASSIGN;
353 __entry->changed = changed;
354 __entry->aid = info->aid;
355 __entry->assoc = info->assoc;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200356 __entry->ibss_joined = info->ibss_joined;
357 __entry->ibss_creator = info->ibss_creator;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200358 __entry->shortpre = info->use_short_preamble;
359 __entry->cts = info->use_cts_prot;
360 __entry->shortslot = info->use_short_slot;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200361 __entry->enable_beacon = info->enable_beacon;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200362 __entry->dtimper = info->dtim_period;
363 __entry->bcnint = info->beacon_int;
364 __entry->assoc_cap = info->assoc_capability;
Johannes Berg8c358bc2012-05-22 22:13:05 +0200365 __entry->sync_tsf = info->sync_tsf;
366 __entry->sync_device_ts = info->sync_device_ts;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200367 __entry->basic_rates = info->basic_rates;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200368 memcpy(__entry->mcast_rate, info->mcast_rate,
369 sizeof(__entry->mcast_rate));
Johannes Bergf911ab82009-11-25 19:07:20 +0100370 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200371 __entry->cqm_rssi_thold = info->cqm_rssi_thold;
372 __entry->cqm_rssi_hyst = info->cqm_rssi_hyst;
373 __entry->channel_type = info->channel_type;
374 memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list,
375 sizeof(u32) * info->arp_addr_cnt);
376 __entry->arp_filter_enabled = info->arp_filter_enabled;
377 __entry->qos = info->qos;
378 __entry->idle = info->idle;
379 __entry->ps = info->ps;
380 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
381 __entry->hidden_ssid = info->hidden_ssid;
Johannes Berg1ea6f9c2012-10-24 10:59:25 +0200382 __entry->txpower = info->txpower;
Johannes Berg488dd7b2012-10-29 20:08:01 +0100383 __entry->p2p_ctwindow = info->p2p_ctwindow;
384 __entry->p2p_oppps = info->p2p_oppps;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200385 ),
386
387 TP_printk(
388 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
389 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
390 )
391);
392
Johannes Berg3ac64be2009-08-17 16:16:53 +0200393TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200394 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200395
Johannes Berg4efc76b2010-06-10 10:56:20 +0200396 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200397
398 TP_STRUCT__entry(
399 LOCAL_ENTRY
400 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200401 ),
402
403 TP_fast_assign(
404 LOCAL_ASSIGN;
405 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200406 ),
407
408 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200409 LOCAL_PR_FMT " prepare mc (%d)",
410 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200411 )
412);
413
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200414TRACE_EVENT(drv_configure_filter,
415 TP_PROTO(struct ieee80211_local *local,
416 unsigned int changed_flags,
417 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200418 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200419
Johannes Berg3ac64be2009-08-17 16:16:53 +0200420 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200421
422 TP_STRUCT__entry(
423 LOCAL_ENTRY
424 __field(unsigned int, changed)
425 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200426 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200427 ),
428
429 TP_fast_assign(
430 LOCAL_ASSIGN;
431 __entry->changed = changed_flags;
432 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200433 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200434 ),
435
436 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200437 LOCAL_PR_FMT " changed:%#x total:%#x",
438 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200439 )
440);
441
442TRACE_EVENT(drv_set_tim,
443 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200444 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200445
Johannes Berg4efc76b2010-06-10 10:56:20 +0200446 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200447
448 TP_STRUCT__entry(
449 LOCAL_ENTRY
450 STA_ENTRY
451 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200452 ),
453
454 TP_fast_assign(
455 LOCAL_ASSIGN;
456 STA_ASSIGN;
457 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200458 ),
459
460 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200461 LOCAL_PR_FMT STA_PR_FMT " set:%d",
462 LOCAL_PR_ARG, STA_PR_FMT, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200463 )
464);
465
466TRACE_EVENT(drv_set_key,
467 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100468 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200469 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200470 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200471
Johannes Berg4efc76b2010-06-10 10:56:20 +0200472 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200473
474 TP_STRUCT__entry(
475 LOCAL_ENTRY
476 VIF_ENTRY
477 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200478 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200479 __field(u8, hw_key_idx)
480 __field(u8, flags)
481 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200482 ),
483
484 TP_fast_assign(
485 LOCAL_ASSIGN;
486 VIF_ASSIGN;
487 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200488 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200489 __entry->flags = key->flags;
490 __entry->keyidx = key->keyidx;
491 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200492 ),
493
494 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200495 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
496 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200497 )
498);
499
500TRACE_EVENT(drv_update_tkip_key,
501 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100502 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200503 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100504 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200505
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100506 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200507
508 TP_STRUCT__entry(
509 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100510 VIF_ENTRY
511 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200512 __field(u32, iv32)
513 ),
514
515 TP_fast_assign(
516 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100517 VIF_ASSIGN;
518 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200519 __entry->iv32 = iv32;
520 ),
521
522 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100523 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
524 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200525 )
526);
527
Luciano Coelho79f460c2011-05-11 17:09:36 +0300528DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200529 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300530 struct ieee80211_sub_if_data *sdata),
531 TP_ARGS(local, sdata)
532);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200533
Eliad Pellerb8564392011-06-13 12:47:30 +0300534DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
535 TP_PROTO(struct ieee80211_local *local,
536 struct ieee80211_sub_if_data *sdata),
537 TP_ARGS(local, sdata)
538);
539
Luciano Coelho79f460c2011-05-11 17:09:36 +0300540DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
541 TP_PROTO(struct ieee80211_local *local,
542 struct ieee80211_sub_if_data *sdata),
543 TP_ARGS(local, sdata)
544);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200545
Luciano Coelho79f460c2011-05-11 17:09:36 +0300546DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
547 TP_PROTO(struct ieee80211_local *local,
548 struct ieee80211_sub_if_data *sdata),
549 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200550);
551
Johannes Bergba99d932011-01-26 09:22:15 +0100552DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200553 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100554 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200555);
556
Johannes Bergba99d932011-01-26 09:22:15 +0100557DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200558 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100559 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200560);
561
562TRACE_EVENT(drv_get_stats,
563 TP_PROTO(struct ieee80211_local *local,
564 struct ieee80211_low_level_stats *stats,
565 int ret),
566
567 TP_ARGS(local, stats, ret),
568
569 TP_STRUCT__entry(
570 LOCAL_ENTRY
571 __field(int, ret)
572 __field(unsigned int, ackfail)
573 __field(unsigned int, rtsfail)
574 __field(unsigned int, fcserr)
575 __field(unsigned int, rtssucc)
576 ),
577
578 TP_fast_assign(
579 LOCAL_ASSIGN;
580 __entry->ret = ret;
581 __entry->ackfail = stats->dot11ACKFailureCount;
582 __entry->rtsfail = stats->dot11RTSFailureCount;
583 __entry->fcserr = stats->dot11FCSErrorCount;
584 __entry->rtssucc = stats->dot11RTSSuccessCount;
585 ),
586
587 TP_printk(
588 LOCAL_PR_FMT " ret:%d",
589 LOCAL_PR_ARG, __entry->ret
590 )
591);
592
593TRACE_EVENT(drv_get_tkip_seq,
594 TP_PROTO(struct ieee80211_local *local,
595 u8 hw_key_idx, u32 *iv32, u16 *iv16),
596
597 TP_ARGS(local, hw_key_idx, iv32, iv16),
598
599 TP_STRUCT__entry(
600 LOCAL_ENTRY
601 __field(u8, hw_key_idx)
602 __field(u32, iv32)
603 __field(u16, iv16)
604 ),
605
606 TP_fast_assign(
607 LOCAL_ASSIGN;
608 __entry->hw_key_idx = hw_key_idx;
609 __entry->iv32 = *iv32;
610 __entry->iv16 = *iv16;
611 ),
612
613 TP_printk(
614 LOCAL_PR_FMT, LOCAL_PR_ARG
615 )
616);
617
Luciano Coelho92ddc112011-05-09 14:40:06 +0300618DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200619 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300620 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200621);
622
Luciano Coelho92ddc112011-05-09 14:40:06 +0300623DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200624 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300625 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200626);
627
Lukáš Turek310bc672009-12-21 22:50:48 +0100628TRACE_EVENT(drv_set_coverage_class,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200629 TP_PROTO(struct ieee80211_local *local, u8 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100630
Johannes Berg4efc76b2010-06-10 10:56:20 +0200631 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100632
633 TP_STRUCT__entry(
634 LOCAL_ENTRY
635 __field(u8, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100636 ),
637
638 TP_fast_assign(
639 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100640 __entry->value = value;
641 ),
642
643 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200644 LOCAL_PR_FMT " value:%d",
645 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100646 )
647);
648
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200649TRACE_EVENT(drv_sta_notify,
650 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100651 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200652 enum sta_notify_cmd cmd,
653 struct ieee80211_sta *sta),
654
Johannes Berg12375ef2009-11-25 20:30:31 +0100655 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200656
657 TP_STRUCT__entry(
658 LOCAL_ENTRY
659 VIF_ENTRY
660 STA_ENTRY
661 __field(u32, cmd)
662 ),
663
664 TP_fast_assign(
665 LOCAL_ASSIGN;
666 VIF_ASSIGN;
667 STA_ASSIGN;
668 __entry->cmd = cmd;
669 ),
670
671 TP_printk(
672 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
673 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
674 )
675);
676
Johannes Bergf09603a2012-01-20 13:55:21 +0100677TRACE_EVENT(drv_sta_state,
678 TP_PROTO(struct ieee80211_local *local,
679 struct ieee80211_sub_if_data *sdata,
680 struct ieee80211_sta *sta,
681 enum ieee80211_sta_state old_state,
682 enum ieee80211_sta_state new_state),
683
684 TP_ARGS(local, sdata, sta, old_state, new_state),
685
686 TP_STRUCT__entry(
687 LOCAL_ENTRY
688 VIF_ENTRY
689 STA_ENTRY
690 __field(u32, old_state)
691 __field(u32, new_state)
692 ),
693
694 TP_fast_assign(
695 LOCAL_ASSIGN;
696 VIF_ASSIGN;
697 STA_ASSIGN;
698 __entry->old_state = old_state;
699 __entry->new_state = new_state;
700 ),
701
702 TP_printk(
703 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
704 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
705 __entry->old_state, __entry->new_state
706 )
707);
708
Johannes Berg8f727ef2012-03-30 08:43:32 +0200709TRACE_EVENT(drv_sta_rc_update,
710 TP_PROTO(struct ieee80211_local *local,
711 struct ieee80211_sub_if_data *sdata,
712 struct ieee80211_sta *sta,
713 u32 changed),
714
715 TP_ARGS(local, sdata, sta, changed),
716
717 TP_STRUCT__entry(
718 LOCAL_ENTRY
719 VIF_ENTRY
720 STA_ENTRY
721 __field(u32, changed)
722 ),
723
724 TP_fast_assign(
725 LOCAL_ASSIGN;
726 VIF_ASSIGN;
727 STA_ASSIGN;
728 __entry->changed = changed;
729 ),
730
731 TP_printk(
732 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
733 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
734 )
735);
736
Johannes Berg34e89502010-02-03 13:59:58 +0100737TRACE_EVENT(drv_sta_add,
738 TP_PROTO(struct ieee80211_local *local,
739 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200740 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100741
Johannes Berg4efc76b2010-06-10 10:56:20 +0200742 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100743
744 TP_STRUCT__entry(
745 LOCAL_ENTRY
746 VIF_ENTRY
747 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100748 ),
749
750 TP_fast_assign(
751 LOCAL_ASSIGN;
752 VIF_ASSIGN;
753 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100754 ),
755
756 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200757 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
758 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100759 )
760);
761
762TRACE_EVENT(drv_sta_remove,
763 TP_PROTO(struct ieee80211_local *local,
764 struct ieee80211_sub_if_data *sdata,
765 struct ieee80211_sta *sta),
766
767 TP_ARGS(local, sdata, sta),
768
769 TP_STRUCT__entry(
770 LOCAL_ENTRY
771 VIF_ENTRY
772 STA_ENTRY
773 ),
774
775 TP_fast_assign(
776 LOCAL_ASSIGN;
777 VIF_ASSIGN;
778 STA_ASSIGN;
779 ),
780
781 TP_printk(
782 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
783 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
784 )
785);
786
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200787TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300788 TP_PROTO(struct ieee80211_local *local,
789 struct ieee80211_sub_if_data *sdata,
Johannes Berga3304b02012-03-28 11:04:24 +0200790 u16 ac, const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200791
Johannes Berga3304b02012-03-28 11:04:24 +0200792 TP_ARGS(local, sdata, ac, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200793
794 TP_STRUCT__entry(
795 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300796 VIF_ENTRY
Johannes Berga3304b02012-03-28 11:04:24 +0200797 __field(u16, ac)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200798 __field(u16, txop)
799 __field(u16, cw_min)
800 __field(u16, cw_max)
801 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300802 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200803 ),
804
805 TP_fast_assign(
806 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300807 VIF_ASSIGN;
Johannes Berga3304b02012-03-28 11:04:24 +0200808 __entry->ac = ac;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200809 __entry->txop = params->txop;
810 __entry->cw_max = params->cw_max;
811 __entry->cw_min = params->cw_min;
812 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300813 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200814 ),
815
816 TP_printk(
Johannes Berga3304b02012-03-28 11:04:24 +0200817 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
818 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200819 )
820);
821
Eliad Peller37a41b42011-09-21 14:06:11 +0300822DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
823 TP_PROTO(struct ieee80211_local *local,
824 struct ieee80211_sub_if_data *sdata),
825 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200826);
827
828TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +0300829 TP_PROTO(struct ieee80211_local *local,
830 struct ieee80211_sub_if_data *sdata,
831 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200832
Eliad Peller37a41b42011-09-21 14:06:11 +0300833 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200834
835 TP_STRUCT__entry(
836 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +0300837 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200838 __field(u64, tsf)
839 ),
840
841 TP_fast_assign(
842 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +0300843 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200844 __entry->tsf = tsf;
845 ),
846
847 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +0300848 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
849 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200850 )
851);
852
Eliad Peller37a41b42011-09-21 14:06:11 +0300853DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
854 TP_PROTO(struct ieee80211_local *local,
855 struct ieee80211_sub_if_data *sdata),
856 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200857);
858
Johannes Bergba99d932011-01-26 09:22:15 +0100859DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200860 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100861 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200862);
863
864TRACE_EVENT(drv_ampdu_action,
865 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100866 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200867 enum ieee80211_ampdu_mlme_action action,
868 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100869 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200870
Johannes Berg0b01f032011-01-18 13:51:05 +0100871 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200872
873 TP_STRUCT__entry(
874 LOCAL_ENTRY
875 STA_ENTRY
876 __field(u32, action)
877 __field(u16, tid)
878 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100879 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100880 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200881 ),
882
883 TP_fast_assign(
884 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100885 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200886 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200887 __entry->action = action;
888 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800889 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100890 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200891 ),
892
893 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100894 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
895 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
896 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200897 )
898);
Johannes Berga80f7c02009-12-23 13:15:32 +0100899
John W. Linvillec466d4e2010-06-29 14:51:23 -0400900TRACE_EVENT(drv_get_survey,
901 TP_PROTO(struct ieee80211_local *local, int idx,
902 struct survey_info *survey),
903
904 TP_ARGS(local, idx, survey),
905
906 TP_STRUCT__entry(
907 LOCAL_ENTRY
908 __field(int, idx)
909 ),
910
911 TP_fast_assign(
912 LOCAL_ASSIGN;
913 __entry->idx = idx;
914 ),
915
916 TP_printk(
917 LOCAL_PR_FMT " idx:%d",
918 LOCAL_PR_ARG, __entry->idx
919 )
920);
921
Johannes Berga80f7c02009-12-23 13:15:32 +0100922TRACE_EVENT(drv_flush,
923 TP_PROTO(struct ieee80211_local *local, bool drop),
924
925 TP_ARGS(local, drop),
926
927 TP_STRUCT__entry(
928 LOCAL_ENTRY
929 __field(bool, drop)
930 ),
931
932 TP_fast_assign(
933 LOCAL_ASSIGN;
934 __entry->drop = drop;
935 ),
936
937 TP_printk(
938 LOCAL_PR_FMT " drop:%d",
939 LOCAL_PR_ARG, __entry->drop
940 )
941);
Johannes Bergb5878a22010-04-07 16:48:40 +0200942
Johannes Berg5ce6e432010-05-11 16:20:57 +0200943TRACE_EVENT(drv_channel_switch,
944 TP_PROTO(struct ieee80211_local *local,
945 struct ieee80211_channel_switch *ch_switch),
946
947 TP_ARGS(local, ch_switch),
948
949 TP_STRUCT__entry(
950 LOCAL_ENTRY
951 __field(u64, timestamp)
952 __field(bool, block_tx)
953 __field(u16, freq)
954 __field(u8, count)
955 ),
956
957 TP_fast_assign(
958 LOCAL_ASSIGN;
959 __entry->timestamp = ch_switch->timestamp;
960 __entry->block_tx = ch_switch->block_tx;
961 __entry->freq = ch_switch->channel->center_freq;
962 __entry->count = ch_switch->count;
963 ),
964
965 TP_printk(
966 LOCAL_PR_FMT " new freq:%u count:%d",
967 LOCAL_PR_ARG, __entry->freq, __entry->count
968 )
969);
970
Bruno Randolf15d96752010-11-10 12:50:56 +0900971TRACE_EVENT(drv_set_antenna,
972 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
973
974 TP_ARGS(local, tx_ant, rx_ant, ret),
975
976 TP_STRUCT__entry(
977 LOCAL_ENTRY
978 __field(u32, tx_ant)
979 __field(u32, rx_ant)
980 __field(int, ret)
981 ),
982
983 TP_fast_assign(
984 LOCAL_ASSIGN;
985 __entry->tx_ant = tx_ant;
986 __entry->rx_ant = rx_ant;
987 __entry->ret = ret;
988 ),
989
990 TP_printk(
991 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
992 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
993 )
994);
995
996TRACE_EVENT(drv_get_antenna,
997 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
998
999 TP_ARGS(local, tx_ant, rx_ant, ret),
1000
1001 TP_STRUCT__entry(
1002 LOCAL_ENTRY
1003 __field(u32, tx_ant)
1004 __field(u32, rx_ant)
1005 __field(int, ret)
1006 ),
1007
1008 TP_fast_assign(
1009 LOCAL_ASSIGN;
1010 __entry->tx_ant = tx_ant;
1011 __entry->rx_ant = rx_ant;
1012 __entry->ret = ret;
1013 ),
1014
1015 TP_printk(
1016 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1017 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1018 )
1019);
1020
Johannes Berg21f83582010-12-18 17:20:47 +01001021TRACE_EVENT(drv_remain_on_channel,
1022 TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
1023 enum nl80211_channel_type chantype, unsigned int duration),
1024
1025 TP_ARGS(local, chan, chantype, duration),
1026
1027 TP_STRUCT__entry(
1028 LOCAL_ENTRY
1029 __field(int, center_freq)
1030 __field(int, channel_type)
1031 __field(unsigned int, duration)
1032 ),
1033
1034 TP_fast_assign(
1035 LOCAL_ASSIGN;
1036 __entry->center_freq = chan->center_freq;
1037 __entry->channel_type = chantype;
1038 __entry->duration = duration;
1039 ),
1040
1041 TP_printk(
1042 LOCAL_PR_FMT " freq:%dMHz duration:%dms",
1043 LOCAL_PR_ARG, __entry->center_freq, __entry->duration
1044 )
1045);
1046
Johannes Bergba99d932011-01-26 09:22:15 +01001047DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001048 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001049 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001050);
1051
Johannes Berg5f16a432011-02-25 15:36:57 +01001052TRACE_EVENT(drv_offchannel_tx,
1053 TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
1054 struct ieee80211_channel *chan,
1055 enum nl80211_channel_type channel_type,
1056 unsigned int wait),
1057
1058 TP_ARGS(local, skb, chan, channel_type, wait),
1059
1060 TP_STRUCT__entry(
1061 LOCAL_ENTRY
1062 __field(int, center_freq)
1063 __field(int, channel_type)
1064 __field(unsigned int, wait)
1065 ),
1066
1067 TP_fast_assign(
1068 LOCAL_ASSIGN;
1069 __entry->center_freq = chan->center_freq;
1070 __entry->channel_type = channel_type;
1071 __entry->wait = wait;
1072 ),
1073
1074 TP_printk(
1075 LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
1076 LOCAL_PR_ARG, __entry->center_freq, __entry->wait
1077 )
1078);
1079
John W. Linville38c09152011-03-07 16:19:18 -05001080TRACE_EVENT(drv_set_ringparam,
1081 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1082
1083 TP_ARGS(local, tx, rx),
1084
1085 TP_STRUCT__entry(
1086 LOCAL_ENTRY
1087 __field(u32, tx)
1088 __field(u32, rx)
1089 ),
1090
1091 TP_fast_assign(
1092 LOCAL_ASSIGN;
1093 __entry->tx = tx;
1094 __entry->rx = rx;
1095 ),
1096
1097 TP_printk(
1098 LOCAL_PR_FMT " tx:%d rx %d",
1099 LOCAL_PR_ARG, __entry->tx, __entry->rx
1100 )
1101);
1102
1103TRACE_EVENT(drv_get_ringparam,
1104 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1105 u32 *rx, u32 *rx_max),
1106
1107 TP_ARGS(local, tx, tx_max, rx, rx_max),
1108
1109 TP_STRUCT__entry(
1110 LOCAL_ENTRY
1111 __field(u32, tx)
1112 __field(u32, tx_max)
1113 __field(u32, rx)
1114 __field(u32, rx_max)
1115 ),
1116
1117 TP_fast_assign(
1118 LOCAL_ASSIGN;
1119 __entry->tx = *tx;
1120 __entry->tx_max = *tx_max;
1121 __entry->rx = *rx;
1122 __entry->rx_max = *rx_max;
1123 ),
1124
1125 TP_printk(
1126 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1127 LOCAL_PR_ARG,
1128 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1129 )
1130);
1131
Vivek Natarajane8306f92011-04-06 11:41:10 +05301132DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1133 TP_PROTO(struct ieee80211_local *local),
1134 TP_ARGS(local)
1135);
1136
Johannes Berg5f16a432011-02-25 15:36:57 +01001137DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1138 TP_PROTO(struct ieee80211_local *local),
1139 TP_ARGS(local)
1140);
1141
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301142TRACE_EVENT(drv_set_bitrate_mask,
1143 TP_PROTO(struct ieee80211_local *local,
1144 struct ieee80211_sub_if_data *sdata,
1145 const struct cfg80211_bitrate_mask *mask),
1146
1147 TP_ARGS(local, sdata, mask),
1148
1149 TP_STRUCT__entry(
1150 LOCAL_ENTRY
1151 VIF_ENTRY
1152 __field(u32, legacy_2g)
1153 __field(u32, legacy_5g)
1154 ),
1155
1156 TP_fast_assign(
1157 LOCAL_ASSIGN;
1158 VIF_ASSIGN;
1159 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1160 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1161 ),
1162
1163 TP_printk(
1164 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1165 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1166 )
1167);
1168
Johannes Bergc68f4b82011-07-05 16:35:41 +02001169TRACE_EVENT(drv_set_rekey_data,
1170 TP_PROTO(struct ieee80211_local *local,
1171 struct ieee80211_sub_if_data *sdata,
1172 struct cfg80211_gtk_rekey_data *data),
1173
1174 TP_ARGS(local, sdata, data),
1175
1176 TP_STRUCT__entry(
1177 LOCAL_ENTRY
1178 VIF_ENTRY
1179 __array(u8, kek, NL80211_KEK_LEN)
1180 __array(u8, kck, NL80211_KCK_LEN)
1181 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1182 ),
1183
1184 TP_fast_assign(
1185 LOCAL_ASSIGN;
1186 VIF_ASSIGN;
1187 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1188 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1189 memcpy(__entry->replay_ctr, data->replay_ctr,
1190 NL80211_REPLAY_CTR_LEN);
1191 ),
1192
1193 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1194 LOCAL_PR_ARG, VIF_PR_ARG)
1195);
1196
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001197TRACE_EVENT(drv_rssi_callback,
1198 TP_PROTO(struct ieee80211_local *local,
1199 enum ieee80211_rssi_event rssi_event),
1200
1201 TP_ARGS(local, rssi_event),
1202
1203 TP_STRUCT__entry(
1204 LOCAL_ENTRY
1205 __field(u32, rssi_event)
1206 ),
1207
1208 TP_fast_assign(
1209 LOCAL_ASSIGN;
1210 __entry->rssi_event = rssi_event;
1211 ),
1212
1213 TP_printk(
1214 LOCAL_PR_FMT " rssi_event:%d",
1215 LOCAL_PR_ARG, __entry->rssi_event
1216 )
1217);
1218
Johannes Berg40b96402011-09-29 16:04:38 +02001219DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001220 TP_PROTO(struct ieee80211_local *local,
1221 struct ieee80211_sta *sta,
1222 u16 tids, int num_frames,
1223 enum ieee80211_frame_release_type reason,
1224 bool more_data),
1225
1226 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1227
1228 TP_STRUCT__entry(
1229 LOCAL_ENTRY
1230 STA_ENTRY
1231 __field(u16, tids)
1232 __field(int, num_frames)
1233 __field(int, reason)
1234 __field(bool, more_data)
1235 ),
1236
1237 TP_fast_assign(
1238 LOCAL_ASSIGN;
1239 STA_ASSIGN;
1240 __entry->tids = tids;
1241 __entry->num_frames = num_frames;
1242 __entry->reason = reason;
1243 __entry->more_data = more_data;
1244 ),
1245
1246 TP_printk(
1247 LOCAL_PR_FMT STA_PR_FMT
1248 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1249 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1250 __entry->reason, __entry->more_data
1251 )
1252);
1253
Johannes Berg40b96402011-09-29 16:04:38 +02001254DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1255 TP_PROTO(struct ieee80211_local *local,
1256 struct ieee80211_sta *sta,
1257 u16 tids, int num_frames,
1258 enum ieee80211_frame_release_type reason,
1259 bool more_data),
1260
1261 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1262);
1263
1264DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1265 TP_PROTO(struct ieee80211_local *local,
1266 struct ieee80211_sta *sta,
1267 u16 tids, int num_frames,
1268 enum ieee80211_frame_release_type reason,
1269 bool more_data),
1270
1271 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1272);
1273
Victor Goldenshtein66572cf2012-06-21 10:56:46 +03001274TRACE_EVENT(drv_get_rssi,
1275 TP_PROTO(struct ieee80211_local *local, struct ieee80211_sta *sta,
1276 s8 rssi, int ret),
1277
1278 TP_ARGS(local, sta, rssi, ret),
1279
1280 TP_STRUCT__entry(
1281 LOCAL_ENTRY
1282 STA_ENTRY
1283 __field(s8, rssi)
1284 __field(int, ret)
1285 ),
1286
1287 TP_fast_assign(
1288 LOCAL_ASSIGN;
1289 STA_ASSIGN;
1290 __entry->rssi = rssi;
1291 __entry->ret = ret;
1292 ),
1293
1294 TP_printk(
1295 LOCAL_PR_FMT STA_PR_FMT " rssi:%d ret:%d",
1296 LOCAL_PR_ARG, STA_PR_ARG, __entry->rssi, __entry->ret
1297 )
1298);
1299
Johannes Berga1845fc2012-06-27 13:18:36 +02001300DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
1301 TP_PROTO(struct ieee80211_local *local,
1302 struct ieee80211_sub_if_data *sdata),
1303
1304 TP_ARGS(local, sdata)
1305);
1306
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001307DECLARE_EVENT_CLASS(local_chanctx,
1308 TP_PROTO(struct ieee80211_local *local,
1309 struct ieee80211_chanctx *ctx),
1310
1311 TP_ARGS(local, ctx),
1312
1313 TP_STRUCT__entry(
1314 LOCAL_ENTRY
1315 CHANCTX_ENTRY
1316 ),
1317
1318 TP_fast_assign(
1319 LOCAL_ASSIGN;
1320 CHANCTX_ASSIGN;
1321 ),
1322
1323 TP_printk(
1324 LOCAL_PR_FMT CHANCTX_PR_FMT,
1325 LOCAL_PR_ARG, CHANCTX_PR_ARG
1326 )
1327);
1328
1329DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1330 TP_PROTO(struct ieee80211_local *local,
1331 struct ieee80211_chanctx *ctx),
1332 TP_ARGS(local, ctx)
1333);
1334
1335DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1336 TP_PROTO(struct ieee80211_local *local,
1337 struct ieee80211_chanctx *ctx),
1338 TP_ARGS(local, ctx)
1339);
1340
1341TRACE_EVENT(drv_change_chanctx,
1342 TP_PROTO(struct ieee80211_local *local,
1343 struct ieee80211_chanctx *ctx,
1344 u32 changed),
1345
1346 TP_ARGS(local, ctx, changed),
1347
1348 TP_STRUCT__entry(
1349 LOCAL_ENTRY
1350 CHANCTX_ENTRY
1351 __field(u32, changed)
1352 ),
1353
1354 TP_fast_assign(
1355 LOCAL_ASSIGN;
1356 CHANCTX_ASSIGN;
1357 __entry->changed = changed;
1358 ),
1359
1360 TP_printk(
1361 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1362 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1363 )
1364);
1365
1366DECLARE_EVENT_CLASS(local_sdata_chanctx,
1367 TP_PROTO(struct ieee80211_local *local,
1368 struct ieee80211_sub_if_data *sdata,
1369 struct ieee80211_chanctx *ctx),
1370
1371 TP_ARGS(local, sdata, ctx),
1372
1373 TP_STRUCT__entry(
1374 LOCAL_ENTRY
1375 VIF_ENTRY
1376 CHANCTX_ENTRY
1377 ),
1378
1379 TP_fast_assign(
1380 LOCAL_ASSIGN;
1381 VIF_ASSIGN;
1382 CHANCTX_ASSIGN;
1383 ),
1384
1385 TP_printk(
1386 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
1387 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
1388 )
1389);
1390
1391DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1392 TP_PROTO(struct ieee80211_local *local,
1393 struct ieee80211_sub_if_data *sdata,
1394 struct ieee80211_chanctx *ctx),
1395 TP_ARGS(local, sdata, ctx)
1396);
1397
1398DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1399 TP_PROTO(struct ieee80211_local *local,
1400 struct ieee80211_sub_if_data *sdata,
1401 struct ieee80211_chanctx *ctx),
1402 TP_ARGS(local, sdata, ctx)
1403);
1404
Johannes Berg10416382012-10-19 15:44:42 +02001405TRACE_EVENT(drv_start_ap,
1406 TP_PROTO(struct ieee80211_local *local,
1407 struct ieee80211_sub_if_data *sdata,
1408 struct ieee80211_bss_conf *info),
1409
1410 TP_ARGS(local, sdata, info),
1411
1412 TP_STRUCT__entry(
1413 LOCAL_ENTRY
1414 VIF_ENTRY
1415 __field(u8, dtimper)
1416 __field(u16, bcnint)
1417 __dynamic_array(u8, ssid, info->ssid_len);
1418 __field(bool, hidden_ssid);
1419 ),
1420
1421 TP_fast_assign(
1422 LOCAL_ASSIGN;
1423 VIF_ASSIGN;
1424 __entry->dtimper = info->dtim_period;
1425 __entry->bcnint = info->beacon_int;
1426 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1427 __entry->hidden_ssid = info->hidden_ssid;
1428 ),
1429
1430 TP_printk(
1431 LOCAL_PR_FMT VIF_PR_FMT,
1432 LOCAL_PR_ARG, VIF_PR_ARG
1433 )
1434);
1435
1436DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
1437 TP_PROTO(struct ieee80211_local *local,
1438 struct ieee80211_sub_if_data *sdata),
1439 TP_ARGS(local, sdata)
1440);
1441
Johannes Bergb5878a22010-04-07 16:48:40 +02001442/*
1443 * Tracing for API calls that drivers call.
1444 */
1445
1446TRACE_EVENT(api_start_tx_ba_session,
1447 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1448
1449 TP_ARGS(sta, tid),
1450
1451 TP_STRUCT__entry(
1452 STA_ENTRY
1453 __field(u16, tid)
1454 ),
1455
1456 TP_fast_assign(
1457 STA_ASSIGN;
1458 __entry->tid = tid;
1459 ),
1460
1461 TP_printk(
1462 STA_PR_FMT " tid:%d",
1463 STA_PR_ARG, __entry->tid
1464 )
1465);
1466
1467TRACE_EVENT(api_start_tx_ba_cb,
1468 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1469
1470 TP_ARGS(sdata, ra, tid),
1471
1472 TP_STRUCT__entry(
1473 VIF_ENTRY
1474 __array(u8, ra, ETH_ALEN)
1475 __field(u16, tid)
1476 ),
1477
1478 TP_fast_assign(
1479 VIF_ASSIGN;
1480 memcpy(__entry->ra, ra, ETH_ALEN);
1481 __entry->tid = tid;
1482 ),
1483
1484 TP_printk(
1485 VIF_PR_FMT " ra:%pM tid:%d",
1486 VIF_PR_ARG, __entry->ra, __entry->tid
1487 )
1488);
1489
1490TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001491 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001492
Johannes Berg6a8579d2010-05-27 14:41:07 +02001493 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001494
1495 TP_STRUCT__entry(
1496 STA_ENTRY
1497 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001498 ),
1499
1500 TP_fast_assign(
1501 STA_ASSIGN;
1502 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001503 ),
1504
1505 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001506 STA_PR_FMT " tid:%d",
1507 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001508 )
1509);
1510
1511TRACE_EVENT(api_stop_tx_ba_cb,
1512 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1513
1514 TP_ARGS(sdata, ra, tid),
1515
1516 TP_STRUCT__entry(
1517 VIF_ENTRY
1518 __array(u8, ra, ETH_ALEN)
1519 __field(u16, tid)
1520 ),
1521
1522 TP_fast_assign(
1523 VIF_ASSIGN;
1524 memcpy(__entry->ra, ra, ETH_ALEN);
1525 __entry->tid = tid;
1526 ),
1527
1528 TP_printk(
1529 VIF_PR_FMT " ra:%pM tid:%d",
1530 VIF_PR_ARG, __entry->ra, __entry->tid
1531 )
1532);
1533
Johannes Bergba99d932011-01-26 09:22:15 +01001534DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001535 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001536 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001537);
1538
1539TRACE_EVENT(api_beacon_loss,
1540 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1541
1542 TP_ARGS(sdata),
1543
1544 TP_STRUCT__entry(
1545 VIF_ENTRY
1546 ),
1547
1548 TP_fast_assign(
1549 VIF_ASSIGN;
1550 ),
1551
1552 TP_printk(
1553 VIF_PR_FMT,
1554 VIF_PR_ARG
1555 )
1556);
1557
1558TRACE_EVENT(api_connection_loss,
1559 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1560
1561 TP_ARGS(sdata),
1562
1563 TP_STRUCT__entry(
1564 VIF_ENTRY
1565 ),
1566
1567 TP_fast_assign(
1568 VIF_ASSIGN;
1569 ),
1570
1571 TP_printk(
1572 VIF_PR_FMT,
1573 VIF_PR_ARG
1574 )
1575);
1576
1577TRACE_EVENT(api_cqm_rssi_notify,
1578 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1579 enum nl80211_cqm_rssi_threshold_event rssi_event),
1580
1581 TP_ARGS(sdata, rssi_event),
1582
1583 TP_STRUCT__entry(
1584 VIF_ENTRY
1585 __field(u32, rssi_event)
1586 ),
1587
1588 TP_fast_assign(
1589 VIF_ASSIGN;
1590 __entry->rssi_event = rssi_event;
1591 ),
1592
1593 TP_printk(
1594 VIF_PR_FMT " event:%d",
1595 VIF_PR_ARG, __entry->rssi_event
1596 )
1597);
1598
1599TRACE_EVENT(api_scan_completed,
1600 TP_PROTO(struct ieee80211_local *local, bool aborted),
1601
1602 TP_ARGS(local, aborted),
1603
1604 TP_STRUCT__entry(
1605 LOCAL_ENTRY
1606 __field(bool, aborted)
1607 ),
1608
1609 TP_fast_assign(
1610 LOCAL_ASSIGN;
1611 __entry->aborted = aborted;
1612 ),
1613
1614 TP_printk(
1615 LOCAL_PR_FMT " aborted:%d",
1616 LOCAL_PR_ARG, __entry->aborted
1617 )
1618);
1619
Luciano Coelho79f460c2011-05-11 17:09:36 +03001620TRACE_EVENT(api_sched_scan_results,
1621 TP_PROTO(struct ieee80211_local *local),
1622
1623 TP_ARGS(local),
1624
1625 TP_STRUCT__entry(
1626 LOCAL_ENTRY
1627 ),
1628
1629 TP_fast_assign(
1630 LOCAL_ASSIGN;
1631 ),
1632
1633 TP_printk(
1634 LOCAL_PR_FMT, LOCAL_PR_ARG
1635 )
1636);
1637
1638TRACE_EVENT(api_sched_scan_stopped,
1639 TP_PROTO(struct ieee80211_local *local),
1640
1641 TP_ARGS(local),
1642
1643 TP_STRUCT__entry(
1644 LOCAL_ENTRY
1645 ),
1646
1647 TP_fast_assign(
1648 LOCAL_ASSIGN;
1649 ),
1650
1651 TP_printk(
1652 LOCAL_PR_FMT, LOCAL_PR_ARG
1653 )
1654);
1655
Johannes Bergb5878a22010-04-07 16:48:40 +02001656TRACE_EVENT(api_sta_block_awake,
1657 TP_PROTO(struct ieee80211_local *local,
1658 struct ieee80211_sta *sta, bool block),
1659
1660 TP_ARGS(local, sta, block),
1661
1662 TP_STRUCT__entry(
1663 LOCAL_ENTRY
1664 STA_ENTRY
1665 __field(bool, block)
1666 ),
1667
1668 TP_fast_assign(
1669 LOCAL_ASSIGN;
1670 STA_ASSIGN;
1671 __entry->block = block;
1672 ),
1673
1674 TP_printk(
1675 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1676 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
1677 )
1678);
1679
Johannes Berg5ce6e432010-05-11 16:20:57 +02001680TRACE_EVENT(api_chswitch_done,
1681 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1682
1683 TP_ARGS(sdata, success),
1684
1685 TP_STRUCT__entry(
1686 VIF_ENTRY
1687 __field(bool, success)
1688 ),
1689
1690 TP_fast_assign(
1691 VIF_ASSIGN;
1692 __entry->success = success;
1693 ),
1694
1695 TP_printk(
1696 VIF_PR_FMT " success=%d",
1697 VIF_PR_ARG, __entry->success
1698 )
1699);
1700
Johannes Bergba99d932011-01-26 09:22:15 +01001701DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001702 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001703 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001704);
1705
Johannes Bergba99d932011-01-26 09:22:15 +01001706DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001707 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001708 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001709);
1710
Johannes Bergc68f4b82011-07-05 16:35:41 +02001711TRACE_EVENT(api_gtk_rekey_notify,
1712 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1713 const u8 *bssid, const u8 *replay_ctr),
1714
1715 TP_ARGS(sdata, bssid, replay_ctr),
1716
1717 TP_STRUCT__entry(
1718 VIF_ENTRY
1719 __array(u8, bssid, ETH_ALEN)
1720 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1721 ),
1722
1723 TP_fast_assign(
1724 VIF_ASSIGN;
1725 memcpy(__entry->bssid, bssid, ETH_ALEN);
1726 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1727 ),
1728
1729 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1730);
1731
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001732TRACE_EVENT(api_enable_rssi_reports,
1733 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1734 int rssi_min_thold, int rssi_max_thold),
1735
1736 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1737
1738 TP_STRUCT__entry(
1739 VIF_ENTRY
1740 __field(int, rssi_min_thold)
1741 __field(int, rssi_max_thold)
1742 ),
1743
1744 TP_fast_assign(
1745 VIF_ASSIGN;
1746 __entry->rssi_min_thold = rssi_min_thold;
1747 __entry->rssi_max_thold = rssi_max_thold;
1748 ),
1749
1750 TP_printk(
1751 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
1752 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
1753 )
1754);
1755
Johannes Berg37fbd902011-09-29 16:04:39 +02001756TRACE_EVENT(api_eosp,
1757 TP_PROTO(struct ieee80211_local *local,
1758 struct ieee80211_sta *sta),
1759
1760 TP_ARGS(local, sta),
1761
1762 TP_STRUCT__entry(
1763 LOCAL_ENTRY
1764 STA_ENTRY
1765 ),
1766
1767 TP_fast_assign(
1768 LOCAL_ASSIGN;
1769 STA_ASSIGN;
1770 ),
1771
1772 TP_printk(
1773 LOCAL_PR_FMT STA_PR_FMT,
1774 LOCAL_PR_ARG, STA_PR_FMT
1775 )
1776);
1777
Johannes Bergb5878a22010-04-07 16:48:40 +02001778/*
1779 * Tracing for internal functions
1780 * (which may also be called in response to driver calls)
1781 */
1782
1783TRACE_EVENT(wake_queue,
1784 TP_PROTO(struct ieee80211_local *local, u16 queue,
1785 enum queue_stop_reason reason),
1786
1787 TP_ARGS(local, queue, reason),
1788
1789 TP_STRUCT__entry(
1790 LOCAL_ENTRY
1791 __field(u16, queue)
1792 __field(u32, reason)
1793 ),
1794
1795 TP_fast_assign(
1796 LOCAL_ASSIGN;
1797 __entry->queue = queue;
1798 __entry->reason = reason;
1799 ),
1800
1801 TP_printk(
1802 LOCAL_PR_FMT " queue:%d, reason:%d",
1803 LOCAL_PR_ARG, __entry->queue, __entry->reason
1804 )
1805);
1806
1807TRACE_EVENT(stop_queue,
1808 TP_PROTO(struct ieee80211_local *local, u16 queue,
1809 enum queue_stop_reason reason),
1810
1811 TP_ARGS(local, queue, reason),
1812
1813 TP_STRUCT__entry(
1814 LOCAL_ENTRY
1815 __field(u16, queue)
1816 __field(u32, reason)
1817 ),
1818
1819 TP_fast_assign(
1820 LOCAL_ASSIGN;
1821 __entry->queue = queue;
1822 __entry->reason = reason;
1823 ),
1824
1825 TP_printk(
1826 LOCAL_PR_FMT " queue:%d, reason:%d",
1827 LOCAL_PR_ARG, __entry->queue, __entry->reason
1828 )
1829);
Johannes Berg3fae0272012-06-22 13:36:25 +02001830
1831#ifdef CONFIG_MAC80211_MESSAGE_TRACING
1832#undef TRACE_SYSTEM
1833#define TRACE_SYSTEM mac80211_msg
1834
1835#define MAX_MSG_LEN 100
1836
1837DECLARE_EVENT_CLASS(mac80211_msg_event,
1838 TP_PROTO(struct va_format *vaf),
1839
1840 TP_ARGS(vaf),
1841
1842 TP_STRUCT__entry(
1843 __dynamic_array(char, msg, MAX_MSG_LEN)
1844 ),
1845
1846 TP_fast_assign(
1847 WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
1848 MAX_MSG_LEN, vaf->fmt,
1849 *vaf->va) >= MAX_MSG_LEN);
1850 ),
1851
1852 TP_printk("%s", __get_str(msg))
1853);
1854
1855DEFINE_EVENT(mac80211_msg_event, mac80211_info,
1856 TP_PROTO(struct va_format *vaf),
1857 TP_ARGS(vaf)
1858);
1859DEFINE_EVENT(mac80211_msg_event, mac80211_dbg,
1860 TP_PROTO(struct va_format *vaf),
1861 TP_ARGS(vaf)
1862);
1863DEFINE_EVENT(mac80211_msg_event, mac80211_err,
1864 TP_PROTO(struct va_format *vaf),
1865 TP_ARGS(vaf)
1866);
1867#endif
1868
Christian Lamparterf7428802009-07-19 23:21:07 +02001869#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001870
1871#undef TRACE_INCLUDE_PATH
1872#define TRACE_INCLUDE_PATH .
1873#undef TRACE_INCLUDE_FILE
Johannes Berg011ad0e2012-06-22 12:55:52 +02001874#define TRACE_INCLUDE_FILE trace
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001875#include <trace/define_trace.h>