blob: a8270b441a6f93249e095c74be849bdf9ce39f9b [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
Johannes Berg4bf88532012-11-09 11:39:59 +010031#define CHANCTX_ENTRY __field(u32, control_freq) \
32 __field(u32, chan_width) \
33 __field(u32, center_freq1) \
34 __field(u32, center_freq2) \
Johannes Berg04ecd252012-09-11 14:34:12 +020035 __field(u8, rx_chains_static) \
36 __field(u8, rx_chains_dynamic)
Johannes Berg4bf88532012-11-09 11:39:59 +010037#define CHANCTX_ASSIGN __entry->control_freq = ctx->conf.def.chan->center_freq;\
38 __entry->chan_width = ctx->conf.def.width; \
39 __entry->center_freq1 = ctx->conf.def.center_freq1; \
40 __entry->center_freq2 = ctx->conf.def.center_freq2; \
Johannes Berg04ecd252012-09-11 14:34:12 +020041 __entry->rx_chains_static = ctx->conf.rx_chains_static; \
42 __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic
Johannes Berg4bf88532012-11-09 11:39:59 +010043#define CHANCTX_PR_FMT " control:%d MHz width:%d center: %d/%d MHz chains:%d/%d"
44#define CHANCTX_PR_ARG __entry->control_freq, __entry->chan_width, \
45 __entry->center_freq1, __entry->center_freq2, \
Johannes Berg04ecd252012-09-11 14:34:12 +020046 __entry->rx_chains_static, __entry->rx_chains_dynamic
Michal Kaziorc3645ea2012-06-26 14:37:17 +020047
48
49
Johannes Bergb5878a22010-04-07 16:48:40 +020050/*
51 * Tracing for driver callbacks.
52 */
53
Johannes Bergba99d932011-01-26 09:22:15 +010054DECLARE_EVENT_CLASS(local_only_evt,
Johannes Berg4efc76b2010-06-10 10:56:20 +020055 TP_PROTO(struct ieee80211_local *local),
56 TP_ARGS(local),
57 TP_STRUCT__entry(
58 LOCAL_ENTRY
59 ),
60 TP_fast_assign(
61 LOCAL_ASSIGN;
62 ),
63 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
64);
65
Luciano Coelho92ddc112011-05-09 14:40:06 +030066DECLARE_EVENT_CLASS(local_sdata_addr_evt,
67 TP_PROTO(struct ieee80211_local *local,
68 struct ieee80211_sub_if_data *sdata),
69 TP_ARGS(local, sdata),
70
71 TP_STRUCT__entry(
72 LOCAL_ENTRY
73 VIF_ENTRY
74 __array(char, addr, 6)
75 ),
76
77 TP_fast_assign(
78 LOCAL_ASSIGN;
79 VIF_ASSIGN;
80 memcpy(__entry->addr, sdata->vif.addr, 6);
81 ),
82
83 TP_printk(
84 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
85 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
86 )
87);
88
89DECLARE_EVENT_CLASS(local_u32_evt,
90 TP_PROTO(struct ieee80211_local *local, u32 value),
91 TP_ARGS(local, value),
92
93 TP_STRUCT__entry(
94 LOCAL_ENTRY
95 __field(u32, value)
96 ),
97
98 TP_fast_assign(
99 LOCAL_ASSIGN;
100 __entry->value = value;
101 ),
102
103 TP_printk(
104 LOCAL_PR_FMT " value:%d",
105 LOCAL_PR_ARG, __entry->value
106 )
107);
108
Luciano Coelho79f460c2011-05-11 17:09:36 +0300109DECLARE_EVENT_CLASS(local_sdata_evt,
110 TP_PROTO(struct ieee80211_local *local,
111 struct ieee80211_sub_if_data *sdata),
112 TP_ARGS(local, sdata),
113
114 TP_STRUCT__entry(
115 LOCAL_ENTRY
116 VIF_ENTRY
117 ),
118
119 TP_fast_assign(
120 LOCAL_ASSIGN;
121 VIF_ASSIGN;
122 ),
123
124 TP_printk(
125 LOCAL_PR_FMT VIF_PR_FMT,
126 LOCAL_PR_ARG, VIF_PR_ARG
127 )
128);
129
Johannes Bergba99d932011-01-26 09:22:15 +0100130DEFINE_EVENT(local_only_evt, drv_return_void,
131 TP_PROTO(struct ieee80211_local *local),
132 TP_ARGS(local)
133);
134
Johannes Berg4efc76b2010-06-10 10:56:20 +0200135TRACE_EVENT(drv_return_int,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200136 TP_PROTO(struct ieee80211_local *local, int ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200137 TP_ARGS(local, ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200138 TP_STRUCT__entry(
139 LOCAL_ENTRY
140 __field(int, ret)
141 ),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200142 TP_fast_assign(
143 LOCAL_ASSIGN;
144 __entry->ret = ret;
145 ),
Johannes Berg4efc76b2010-06-10 10:56:20 +0200146 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
147);
148
Vivek Natarajane8306f92011-04-06 11:41:10 +0530149TRACE_EVENT(drv_return_bool,
150 TP_PROTO(struct ieee80211_local *local, bool ret),
151 TP_ARGS(local, ret),
152 TP_STRUCT__entry(
153 LOCAL_ENTRY
154 __field(bool, ret)
155 ),
156 TP_fast_assign(
157 LOCAL_ASSIGN;
158 __entry->ret = ret;
159 ),
160 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
161 "true" : "false")
162);
163
Johannes Berg4efc76b2010-06-10 10:56:20 +0200164TRACE_EVENT(drv_return_u64,
165 TP_PROTO(struct ieee80211_local *local, u64 ret),
166 TP_ARGS(local, ret),
167 TP_STRUCT__entry(
168 LOCAL_ENTRY
169 __field(u64, ret)
170 ),
171 TP_fast_assign(
172 LOCAL_ASSIGN;
173 __entry->ret = ret;
174 ),
175 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
176);
177
Johannes Bergba99d932011-01-26 09:22:15 +0100178DEFINE_EVENT(local_only_evt, drv_start,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200179 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100180 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200181);
182
Ben Greeare3521142012-04-23 12:50:31 -0700183DEFINE_EVENT(local_u32_evt, drv_get_et_strings,
184 TP_PROTO(struct ieee80211_local *local, u32 sset),
185 TP_ARGS(local, sset)
186);
187
188DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count,
189 TP_PROTO(struct ieee80211_local *local, u32 sset),
190 TP_ARGS(local, sset)
191);
192
193DEFINE_EVENT(local_only_evt, drv_get_et_stats,
194 TP_PROTO(struct ieee80211_local *local),
195 TP_ARGS(local)
196);
197
Johannes Bergeecc4802011-05-04 15:37:29 +0200198DEFINE_EVENT(local_only_evt, drv_suspend,
199 TP_PROTO(struct ieee80211_local *local),
200 TP_ARGS(local)
201);
202
203DEFINE_EVENT(local_only_evt, drv_resume,
204 TP_PROTO(struct ieee80211_local *local),
205 TP_ARGS(local)
206);
207
Johannes Berg6d525632012-04-04 15:05:25 +0200208TRACE_EVENT(drv_set_wakeup,
209 TP_PROTO(struct ieee80211_local *local, bool enabled),
210 TP_ARGS(local, enabled),
211 TP_STRUCT__entry(
212 LOCAL_ENTRY
213 __field(bool, enabled)
214 ),
215 TP_fast_assign(
216 LOCAL_ASSIGN;
217 __entry->enabled = enabled;
218 ),
219 TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
220);
221
Johannes Bergba99d932011-01-26 09:22:15 +0100222DEFINE_EVENT(local_only_evt, drv_stop,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200223 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100224 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200225);
226
Luciano Coelho92ddc112011-05-09 14:40:06 +0300227DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200228 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200229 struct ieee80211_sub_if_data *sdata),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300230 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200231);
232
Johannes Berg34d4bc42010-08-27 12:35:58 +0200233TRACE_EVENT(drv_change_interface,
234 TP_PROTO(struct ieee80211_local *local,
235 struct ieee80211_sub_if_data *sdata,
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200236 enum nl80211_iftype type, bool p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200237
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200238 TP_ARGS(local, sdata, type, p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200239
240 TP_STRUCT__entry(
241 LOCAL_ENTRY
242 VIF_ENTRY
243 __field(u32, new_type)
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200244 __field(bool, new_p2p)
Johannes Berg34d4bc42010-08-27 12:35:58 +0200245 ),
246
247 TP_fast_assign(
248 LOCAL_ASSIGN;
249 VIF_ASSIGN;
250 __entry->new_type = type;
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200251 __entry->new_p2p = p2p;
Johannes Berg34d4bc42010-08-27 12:35:58 +0200252 ),
253
254 TP_printk(
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200255 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
256 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
257 __entry->new_p2p ? "/p2p" : ""
Johannes Berg34d4bc42010-08-27 12:35:58 +0200258 )
259);
260
Luciano Coelho92ddc112011-05-09 14:40:06 +0300261DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
262 TP_PROTO(struct ieee80211_local *local,
263 struct ieee80211_sub_if_data *sdata),
264 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200265);
266
267TRACE_EVENT(drv_config,
268 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200269 u32 changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200270
Johannes Berg4efc76b2010-06-10 10:56:20 +0200271 TP_ARGS(local, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200272
273 TP_STRUCT__entry(
274 LOCAL_ENTRY
275 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100276 __field(u32, flags)
277 __field(int, power_level)
278 __field(int, dynamic_ps_timeout)
279 __field(int, max_sleep_period)
280 __field(u16, listen_interval)
281 __field(u8, long_frame_max_tx_count)
282 __field(u8, short_frame_max_tx_count)
283 __field(int, center_freq)
284 __field(int, channel_type)
Johannes Berg0f782312009-12-01 13:37:02 +0100285 __field(int, smps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200286 ),
287
288 TP_fast_assign(
289 LOCAL_ASSIGN;
290 __entry->changed = changed;
Johannes Bergf911ab82009-11-25 19:07:20 +0100291 __entry->flags = local->hw.conf.flags;
292 __entry->power_level = local->hw.conf.power_level;
293 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
294 __entry->max_sleep_period = local->hw.conf.max_sleep_period;
295 __entry->listen_interval = local->hw.conf.listen_interval;
Johannes Berg3d01be72012-07-26 14:27:39 +0200296 __entry->long_frame_max_tx_count =
297 local->hw.conf.long_frame_max_tx_count;
298 __entry->short_frame_max_tx_count =
299 local->hw.conf.short_frame_max_tx_count;
300 __entry->center_freq = local->hw.conf.channel ?
301 local->hw.conf.channel->center_freq : 0;
Johannes Bergf911ab82009-11-25 19:07:20 +0100302 __entry->channel_type = local->hw.conf.channel_type;
Johannes Berg0f782312009-12-01 13:37:02 +0100303 __entry->smps = local->hw.conf.smps_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200304 ),
305
306 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200307 LOCAL_PR_FMT " ch:%#x freq:%d",
308 LOCAL_PR_ARG, __entry->changed, __entry->center_freq
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200309 )
310);
311
312TRACE_EVENT(drv_bss_info_changed,
313 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100314 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200315 struct ieee80211_bss_conf *info,
316 u32 changed),
317
Johannes Berg12375ef2009-11-25 20:30:31 +0100318 TP_ARGS(local, sdata, info, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200319
320 TP_STRUCT__entry(
321 LOCAL_ENTRY
322 VIF_ENTRY
Johannes Berg1724ffb2012-10-24 11:38:30 +0200323 __field(u32, changed)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200324 __field(bool, assoc)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200325 __field(bool, ibss_joined)
326 __field(bool, ibss_creator)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200327 __field(u16, aid)
328 __field(bool, cts)
329 __field(bool, shortpre)
330 __field(bool, shortslot)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200331 __field(bool, enable_beacon)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200332 __field(u8, dtimper)
333 __field(u16, bcnint)
334 __field(u16, assoc_cap)
Johannes Berg8c358bc2012-05-22 22:13:05 +0200335 __field(u64, sync_tsf)
336 __field(u32, sync_device_ts)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200337 __field(u32, basic_rates)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200338 __array(int, mcast_rate, IEEE80211_NUM_BANDS)
Johannes Bergf911ab82009-11-25 19:07:20 +0100339 __field(u16, ht_operation_mode)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200340 __field(s32, cqm_rssi_thold);
341 __field(s32, cqm_rssi_hyst);
Johannes Berg4bf88532012-11-09 11:39:59 +0100342 __field(u32, channel_width);
343 __field(u32, channel_cfreq1);
Johannes Berg1724ffb2012-10-24 11:38:30 +0200344 __dynamic_array(u32, arp_addr_list, info->arp_addr_cnt);
345 __field(bool, arp_filter_enabled);
346 __field(bool, qos);
347 __field(bool, idle);
348 __field(bool, ps);
349 __dynamic_array(u8, ssid, info->ssid_len);
350 __field(bool, hidden_ssid);
Johannes Berg1ea6f9c2012-10-24 10:59:25 +0200351 __field(int, txpower)
Johannes Berg488dd7b2012-10-29 20:08:01 +0100352 __field(u8, p2p_ctwindow)
353 __field(bool, p2p_oppps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200354 ),
355
356 TP_fast_assign(
357 LOCAL_ASSIGN;
358 VIF_ASSIGN;
359 __entry->changed = changed;
360 __entry->aid = info->aid;
361 __entry->assoc = info->assoc;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200362 __entry->ibss_joined = info->ibss_joined;
363 __entry->ibss_creator = info->ibss_creator;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200364 __entry->shortpre = info->use_short_preamble;
365 __entry->cts = info->use_cts_prot;
366 __entry->shortslot = info->use_short_slot;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200367 __entry->enable_beacon = info->enable_beacon;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200368 __entry->dtimper = info->dtim_period;
369 __entry->bcnint = info->beacon_int;
370 __entry->assoc_cap = info->assoc_capability;
Johannes Berg8c358bc2012-05-22 22:13:05 +0200371 __entry->sync_tsf = info->sync_tsf;
372 __entry->sync_device_ts = info->sync_device_ts;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200373 __entry->basic_rates = info->basic_rates;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200374 memcpy(__entry->mcast_rate, info->mcast_rate,
375 sizeof(__entry->mcast_rate));
Johannes Bergf911ab82009-11-25 19:07:20 +0100376 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200377 __entry->cqm_rssi_thold = info->cqm_rssi_thold;
378 __entry->cqm_rssi_hyst = info->cqm_rssi_hyst;
Johannes Berg4bf88532012-11-09 11:39:59 +0100379 __entry->channel_width = info->chandef.width;
380 __entry->channel_cfreq1 = info->chandef.center_freq1;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200381 memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list,
382 sizeof(u32) * info->arp_addr_cnt);
383 __entry->arp_filter_enabled = info->arp_filter_enabled;
384 __entry->qos = info->qos;
385 __entry->idle = info->idle;
386 __entry->ps = info->ps;
387 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
388 __entry->hidden_ssid = info->hidden_ssid;
Johannes Berg1ea6f9c2012-10-24 10:59:25 +0200389 __entry->txpower = info->txpower;
Johannes Berg488dd7b2012-10-29 20:08:01 +0100390 __entry->p2p_ctwindow = info->p2p_ctwindow;
391 __entry->p2p_oppps = info->p2p_oppps;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200392 ),
393
394 TP_printk(
395 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
396 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
397 )
398);
399
Johannes Berg3ac64be2009-08-17 16:16:53 +0200400TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200401 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200402
Johannes Berg4efc76b2010-06-10 10:56:20 +0200403 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200404
405 TP_STRUCT__entry(
406 LOCAL_ENTRY
407 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200408 ),
409
410 TP_fast_assign(
411 LOCAL_ASSIGN;
412 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200413 ),
414
415 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200416 LOCAL_PR_FMT " prepare mc (%d)",
417 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200418 )
419);
420
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200421TRACE_EVENT(drv_configure_filter,
422 TP_PROTO(struct ieee80211_local *local,
423 unsigned int changed_flags,
424 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200425 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200426
Johannes Berg3ac64be2009-08-17 16:16:53 +0200427 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200428
429 TP_STRUCT__entry(
430 LOCAL_ENTRY
431 __field(unsigned int, changed)
432 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200433 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200434 ),
435
436 TP_fast_assign(
437 LOCAL_ASSIGN;
438 __entry->changed = changed_flags;
439 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200440 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200441 ),
442
443 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200444 LOCAL_PR_FMT " changed:%#x total:%#x",
445 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200446 )
447);
448
449TRACE_EVENT(drv_set_tim,
450 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200451 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200452
Johannes Berg4efc76b2010-06-10 10:56:20 +0200453 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200454
455 TP_STRUCT__entry(
456 LOCAL_ENTRY
457 STA_ENTRY
458 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200459 ),
460
461 TP_fast_assign(
462 LOCAL_ASSIGN;
463 STA_ASSIGN;
464 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200465 ),
466
467 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200468 LOCAL_PR_FMT STA_PR_FMT " set:%d",
469 LOCAL_PR_ARG, STA_PR_FMT, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200470 )
471);
472
473TRACE_EVENT(drv_set_key,
474 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100475 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200476 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200477 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200478
Johannes Berg4efc76b2010-06-10 10:56:20 +0200479 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200480
481 TP_STRUCT__entry(
482 LOCAL_ENTRY
483 VIF_ENTRY
484 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200485 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200486 __field(u8, hw_key_idx)
487 __field(u8, flags)
488 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200489 ),
490
491 TP_fast_assign(
492 LOCAL_ASSIGN;
493 VIF_ASSIGN;
494 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200495 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200496 __entry->flags = key->flags;
497 __entry->keyidx = key->keyidx;
498 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200499 ),
500
501 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200502 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
503 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200504 )
505);
506
507TRACE_EVENT(drv_update_tkip_key,
508 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100509 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200510 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100511 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200512
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100513 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200514
515 TP_STRUCT__entry(
516 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100517 VIF_ENTRY
518 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200519 __field(u32, iv32)
520 ),
521
522 TP_fast_assign(
523 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100524 VIF_ASSIGN;
525 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200526 __entry->iv32 = iv32;
527 ),
528
529 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100530 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
531 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200532 )
533);
534
Luciano Coelho79f460c2011-05-11 17:09:36 +0300535DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200536 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300537 struct ieee80211_sub_if_data *sdata),
538 TP_ARGS(local, sdata)
539);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200540
Eliad Pellerb8564392011-06-13 12:47:30 +0300541DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
542 TP_PROTO(struct ieee80211_local *local,
543 struct ieee80211_sub_if_data *sdata),
544 TP_ARGS(local, sdata)
545);
546
Luciano Coelho79f460c2011-05-11 17:09:36 +0300547DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
548 TP_PROTO(struct ieee80211_local *local,
549 struct ieee80211_sub_if_data *sdata),
550 TP_ARGS(local, sdata)
551);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200552
Luciano Coelho79f460c2011-05-11 17:09:36 +0300553DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
554 TP_PROTO(struct ieee80211_local *local,
555 struct ieee80211_sub_if_data *sdata),
556 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200557);
558
Johannes Bergba99d932011-01-26 09:22:15 +0100559DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200560 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100561 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200562);
563
Johannes Bergba99d932011-01-26 09:22:15 +0100564DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200565 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100566 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200567);
568
569TRACE_EVENT(drv_get_stats,
570 TP_PROTO(struct ieee80211_local *local,
571 struct ieee80211_low_level_stats *stats,
572 int ret),
573
574 TP_ARGS(local, stats, ret),
575
576 TP_STRUCT__entry(
577 LOCAL_ENTRY
578 __field(int, ret)
579 __field(unsigned int, ackfail)
580 __field(unsigned int, rtsfail)
581 __field(unsigned int, fcserr)
582 __field(unsigned int, rtssucc)
583 ),
584
585 TP_fast_assign(
586 LOCAL_ASSIGN;
587 __entry->ret = ret;
588 __entry->ackfail = stats->dot11ACKFailureCount;
589 __entry->rtsfail = stats->dot11RTSFailureCount;
590 __entry->fcserr = stats->dot11FCSErrorCount;
591 __entry->rtssucc = stats->dot11RTSSuccessCount;
592 ),
593
594 TP_printk(
595 LOCAL_PR_FMT " ret:%d",
596 LOCAL_PR_ARG, __entry->ret
597 )
598);
599
600TRACE_EVENT(drv_get_tkip_seq,
601 TP_PROTO(struct ieee80211_local *local,
602 u8 hw_key_idx, u32 *iv32, u16 *iv16),
603
604 TP_ARGS(local, hw_key_idx, iv32, iv16),
605
606 TP_STRUCT__entry(
607 LOCAL_ENTRY
608 __field(u8, hw_key_idx)
609 __field(u32, iv32)
610 __field(u16, iv16)
611 ),
612
613 TP_fast_assign(
614 LOCAL_ASSIGN;
615 __entry->hw_key_idx = hw_key_idx;
616 __entry->iv32 = *iv32;
617 __entry->iv16 = *iv16;
618 ),
619
620 TP_printk(
621 LOCAL_PR_FMT, LOCAL_PR_ARG
622 )
623);
624
Luciano Coelho92ddc112011-05-09 14:40:06 +0300625DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200626 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300627 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200628);
629
Luciano Coelho92ddc112011-05-09 14:40:06 +0300630DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200631 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300632 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200633);
634
Lukáš Turek310bc672009-12-21 22:50:48 +0100635TRACE_EVENT(drv_set_coverage_class,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200636 TP_PROTO(struct ieee80211_local *local, u8 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100637
Johannes Berg4efc76b2010-06-10 10:56:20 +0200638 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100639
640 TP_STRUCT__entry(
641 LOCAL_ENTRY
642 __field(u8, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100643 ),
644
645 TP_fast_assign(
646 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100647 __entry->value = value;
648 ),
649
650 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200651 LOCAL_PR_FMT " value:%d",
652 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100653 )
654);
655
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200656TRACE_EVENT(drv_sta_notify,
657 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100658 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200659 enum sta_notify_cmd cmd,
660 struct ieee80211_sta *sta),
661
Johannes Berg12375ef2009-11-25 20:30:31 +0100662 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200663
664 TP_STRUCT__entry(
665 LOCAL_ENTRY
666 VIF_ENTRY
667 STA_ENTRY
668 __field(u32, cmd)
669 ),
670
671 TP_fast_assign(
672 LOCAL_ASSIGN;
673 VIF_ASSIGN;
674 STA_ASSIGN;
675 __entry->cmd = cmd;
676 ),
677
678 TP_printk(
679 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
680 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
681 )
682);
683
Johannes Bergf09603a2012-01-20 13:55:21 +0100684TRACE_EVENT(drv_sta_state,
685 TP_PROTO(struct ieee80211_local *local,
686 struct ieee80211_sub_if_data *sdata,
687 struct ieee80211_sta *sta,
688 enum ieee80211_sta_state old_state,
689 enum ieee80211_sta_state new_state),
690
691 TP_ARGS(local, sdata, sta, old_state, new_state),
692
693 TP_STRUCT__entry(
694 LOCAL_ENTRY
695 VIF_ENTRY
696 STA_ENTRY
697 __field(u32, old_state)
698 __field(u32, new_state)
699 ),
700
701 TP_fast_assign(
702 LOCAL_ASSIGN;
703 VIF_ASSIGN;
704 STA_ASSIGN;
705 __entry->old_state = old_state;
706 __entry->new_state = new_state;
707 ),
708
709 TP_printk(
710 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
711 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
712 __entry->old_state, __entry->new_state
713 )
714);
715
Johannes Berg8f727ef2012-03-30 08:43:32 +0200716TRACE_EVENT(drv_sta_rc_update,
717 TP_PROTO(struct ieee80211_local *local,
718 struct ieee80211_sub_if_data *sdata,
719 struct ieee80211_sta *sta,
720 u32 changed),
721
722 TP_ARGS(local, sdata, sta, changed),
723
724 TP_STRUCT__entry(
725 LOCAL_ENTRY
726 VIF_ENTRY
727 STA_ENTRY
728 __field(u32, changed)
729 ),
730
731 TP_fast_assign(
732 LOCAL_ASSIGN;
733 VIF_ASSIGN;
734 STA_ASSIGN;
735 __entry->changed = changed;
736 ),
737
738 TP_printk(
739 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
740 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
741 )
742);
743
Johannes Berg34e89502010-02-03 13:59:58 +0100744TRACE_EVENT(drv_sta_add,
745 TP_PROTO(struct ieee80211_local *local,
746 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200747 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100748
Johannes Berg4efc76b2010-06-10 10:56:20 +0200749 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100750
751 TP_STRUCT__entry(
752 LOCAL_ENTRY
753 VIF_ENTRY
754 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100755 ),
756
757 TP_fast_assign(
758 LOCAL_ASSIGN;
759 VIF_ASSIGN;
760 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100761 ),
762
763 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200764 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
765 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100766 )
767);
768
769TRACE_EVENT(drv_sta_remove,
770 TP_PROTO(struct ieee80211_local *local,
771 struct ieee80211_sub_if_data *sdata,
772 struct ieee80211_sta *sta),
773
774 TP_ARGS(local, sdata, sta),
775
776 TP_STRUCT__entry(
777 LOCAL_ENTRY
778 VIF_ENTRY
779 STA_ENTRY
780 ),
781
782 TP_fast_assign(
783 LOCAL_ASSIGN;
784 VIF_ASSIGN;
785 STA_ASSIGN;
786 ),
787
788 TP_printk(
789 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
790 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
791 )
792);
793
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200794TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300795 TP_PROTO(struct ieee80211_local *local,
796 struct ieee80211_sub_if_data *sdata,
Johannes Berga3304b02012-03-28 11:04:24 +0200797 u16 ac, const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200798
Johannes Berga3304b02012-03-28 11:04:24 +0200799 TP_ARGS(local, sdata, ac, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200800
801 TP_STRUCT__entry(
802 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300803 VIF_ENTRY
Johannes Berga3304b02012-03-28 11:04:24 +0200804 __field(u16, ac)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200805 __field(u16, txop)
806 __field(u16, cw_min)
807 __field(u16, cw_max)
808 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300809 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200810 ),
811
812 TP_fast_assign(
813 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300814 VIF_ASSIGN;
Johannes Berga3304b02012-03-28 11:04:24 +0200815 __entry->ac = ac;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200816 __entry->txop = params->txop;
817 __entry->cw_max = params->cw_max;
818 __entry->cw_min = params->cw_min;
819 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300820 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200821 ),
822
823 TP_printk(
Johannes Berga3304b02012-03-28 11:04:24 +0200824 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
825 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200826 )
827);
828
Eliad Peller37a41b42011-09-21 14:06:11 +0300829DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
830 TP_PROTO(struct ieee80211_local *local,
831 struct ieee80211_sub_if_data *sdata),
832 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200833);
834
835TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +0300836 TP_PROTO(struct ieee80211_local *local,
837 struct ieee80211_sub_if_data *sdata,
838 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200839
Eliad Peller37a41b42011-09-21 14:06:11 +0300840 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200841
842 TP_STRUCT__entry(
843 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +0300844 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200845 __field(u64, tsf)
846 ),
847
848 TP_fast_assign(
849 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +0300850 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200851 __entry->tsf = tsf;
852 ),
853
854 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +0300855 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
856 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200857 )
858);
859
Eliad Peller37a41b42011-09-21 14:06:11 +0300860DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
861 TP_PROTO(struct ieee80211_local *local,
862 struct ieee80211_sub_if_data *sdata),
863 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200864);
865
Johannes Bergba99d932011-01-26 09:22:15 +0100866DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200867 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100868 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200869);
870
871TRACE_EVENT(drv_ampdu_action,
872 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100873 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200874 enum ieee80211_ampdu_mlme_action action,
875 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100876 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200877
Johannes Berg0b01f032011-01-18 13:51:05 +0100878 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200879
880 TP_STRUCT__entry(
881 LOCAL_ENTRY
882 STA_ENTRY
883 __field(u32, action)
884 __field(u16, tid)
885 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100886 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100887 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200888 ),
889
890 TP_fast_assign(
891 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100892 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200893 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200894 __entry->action = action;
895 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800896 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100897 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200898 ),
899
900 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100901 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
902 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
903 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200904 )
905);
Johannes Berga80f7c02009-12-23 13:15:32 +0100906
John W. Linvillec466d4e2010-06-29 14:51:23 -0400907TRACE_EVENT(drv_get_survey,
908 TP_PROTO(struct ieee80211_local *local, int idx,
909 struct survey_info *survey),
910
911 TP_ARGS(local, idx, survey),
912
913 TP_STRUCT__entry(
914 LOCAL_ENTRY
915 __field(int, idx)
916 ),
917
918 TP_fast_assign(
919 LOCAL_ASSIGN;
920 __entry->idx = idx;
921 ),
922
923 TP_printk(
924 LOCAL_PR_FMT " idx:%d",
925 LOCAL_PR_ARG, __entry->idx
926 )
927);
928
Johannes Berga80f7c02009-12-23 13:15:32 +0100929TRACE_EVENT(drv_flush,
930 TP_PROTO(struct ieee80211_local *local, bool drop),
931
932 TP_ARGS(local, drop),
933
934 TP_STRUCT__entry(
935 LOCAL_ENTRY
936 __field(bool, drop)
937 ),
938
939 TP_fast_assign(
940 LOCAL_ASSIGN;
941 __entry->drop = drop;
942 ),
943
944 TP_printk(
945 LOCAL_PR_FMT " drop:%d",
946 LOCAL_PR_ARG, __entry->drop
947 )
948);
Johannes Bergb5878a22010-04-07 16:48:40 +0200949
Johannes Berg5ce6e432010-05-11 16:20:57 +0200950TRACE_EVENT(drv_channel_switch,
951 TP_PROTO(struct ieee80211_local *local,
952 struct ieee80211_channel_switch *ch_switch),
953
954 TP_ARGS(local, ch_switch),
955
956 TP_STRUCT__entry(
957 LOCAL_ENTRY
958 __field(u64, timestamp)
959 __field(bool, block_tx)
960 __field(u16, freq)
961 __field(u8, count)
962 ),
963
964 TP_fast_assign(
965 LOCAL_ASSIGN;
966 __entry->timestamp = ch_switch->timestamp;
967 __entry->block_tx = ch_switch->block_tx;
968 __entry->freq = ch_switch->channel->center_freq;
969 __entry->count = ch_switch->count;
970 ),
971
972 TP_printk(
973 LOCAL_PR_FMT " new freq:%u count:%d",
974 LOCAL_PR_ARG, __entry->freq, __entry->count
975 )
976);
977
Bruno Randolf15d96752010-11-10 12:50:56 +0900978TRACE_EVENT(drv_set_antenna,
979 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
980
981 TP_ARGS(local, tx_ant, rx_ant, ret),
982
983 TP_STRUCT__entry(
984 LOCAL_ENTRY
985 __field(u32, tx_ant)
986 __field(u32, rx_ant)
987 __field(int, ret)
988 ),
989
990 TP_fast_assign(
991 LOCAL_ASSIGN;
992 __entry->tx_ant = tx_ant;
993 __entry->rx_ant = rx_ant;
994 __entry->ret = ret;
995 ),
996
997 TP_printk(
998 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
999 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1000 )
1001);
1002
1003TRACE_EVENT(drv_get_antenna,
1004 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1005
1006 TP_ARGS(local, tx_ant, rx_ant, ret),
1007
1008 TP_STRUCT__entry(
1009 LOCAL_ENTRY
1010 __field(u32, tx_ant)
1011 __field(u32, rx_ant)
1012 __field(int, ret)
1013 ),
1014
1015 TP_fast_assign(
1016 LOCAL_ASSIGN;
1017 __entry->tx_ant = tx_ant;
1018 __entry->rx_ant = rx_ant;
1019 __entry->ret = ret;
1020 ),
1021
1022 TP_printk(
1023 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1024 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1025 )
1026);
1027
Johannes Berg21f83582010-12-18 17:20:47 +01001028TRACE_EVENT(drv_remain_on_channel,
Eliad Peller49884562012-11-19 17:05:09 +02001029 TP_PROTO(struct ieee80211_local *local,
1030 struct ieee80211_sub_if_data *sdata,
1031 struct ieee80211_channel *chan,
Johannes Berg42d97a52012-11-08 18:31:02 +01001032 unsigned int duration),
Johannes Berg21f83582010-12-18 17:20:47 +01001033
Johannes Berg42d97a52012-11-08 18:31:02 +01001034 TP_ARGS(local, sdata, chan, duration),
Johannes Berg21f83582010-12-18 17:20:47 +01001035
1036 TP_STRUCT__entry(
1037 LOCAL_ENTRY
Eliad Peller49884562012-11-19 17:05:09 +02001038 VIF_ENTRY
Johannes Berg21f83582010-12-18 17:20:47 +01001039 __field(int, center_freq)
Johannes Berg21f83582010-12-18 17:20:47 +01001040 __field(unsigned int, duration)
1041 ),
1042
1043 TP_fast_assign(
1044 LOCAL_ASSIGN;
Eliad Peller49884562012-11-19 17:05:09 +02001045 VIF_ASSIGN;
Johannes Berg21f83582010-12-18 17:20:47 +01001046 __entry->center_freq = chan->center_freq;
Johannes Berg21f83582010-12-18 17:20:47 +01001047 __entry->duration = duration;
1048 ),
1049
1050 TP_printk(
Eliad Peller49884562012-11-19 17:05:09 +02001051 LOCAL_PR_FMT VIF_PR_FMT " freq:%dMHz duration:%dms",
1052 LOCAL_PR_ARG, VIF_PR_ARG,
1053 __entry->center_freq, __entry->duration
Johannes Berg21f83582010-12-18 17:20:47 +01001054 )
1055);
1056
Johannes Bergba99d932011-01-26 09:22:15 +01001057DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001058 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001059 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001060);
1061
John W. Linville38c09152011-03-07 16:19:18 -05001062TRACE_EVENT(drv_set_ringparam,
1063 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1064
1065 TP_ARGS(local, tx, rx),
1066
1067 TP_STRUCT__entry(
1068 LOCAL_ENTRY
1069 __field(u32, tx)
1070 __field(u32, rx)
1071 ),
1072
1073 TP_fast_assign(
1074 LOCAL_ASSIGN;
1075 __entry->tx = tx;
1076 __entry->rx = rx;
1077 ),
1078
1079 TP_printk(
1080 LOCAL_PR_FMT " tx:%d rx %d",
1081 LOCAL_PR_ARG, __entry->tx, __entry->rx
1082 )
1083);
1084
1085TRACE_EVENT(drv_get_ringparam,
1086 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1087 u32 *rx, u32 *rx_max),
1088
1089 TP_ARGS(local, tx, tx_max, rx, rx_max),
1090
1091 TP_STRUCT__entry(
1092 LOCAL_ENTRY
1093 __field(u32, tx)
1094 __field(u32, tx_max)
1095 __field(u32, rx)
1096 __field(u32, rx_max)
1097 ),
1098
1099 TP_fast_assign(
1100 LOCAL_ASSIGN;
1101 __entry->tx = *tx;
1102 __entry->tx_max = *tx_max;
1103 __entry->rx = *rx;
1104 __entry->rx_max = *rx_max;
1105 ),
1106
1107 TP_printk(
1108 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1109 LOCAL_PR_ARG,
1110 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1111 )
1112);
1113
Vivek Natarajane8306f92011-04-06 11:41:10 +05301114DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1115 TP_PROTO(struct ieee80211_local *local),
1116 TP_ARGS(local)
1117);
1118
Johannes Berg5f16a432011-02-25 15:36:57 +01001119DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1120 TP_PROTO(struct ieee80211_local *local),
1121 TP_ARGS(local)
1122);
1123
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301124TRACE_EVENT(drv_set_bitrate_mask,
1125 TP_PROTO(struct ieee80211_local *local,
1126 struct ieee80211_sub_if_data *sdata,
1127 const struct cfg80211_bitrate_mask *mask),
1128
1129 TP_ARGS(local, sdata, mask),
1130
1131 TP_STRUCT__entry(
1132 LOCAL_ENTRY
1133 VIF_ENTRY
1134 __field(u32, legacy_2g)
1135 __field(u32, legacy_5g)
1136 ),
1137
1138 TP_fast_assign(
1139 LOCAL_ASSIGN;
1140 VIF_ASSIGN;
1141 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1142 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1143 ),
1144
1145 TP_printk(
1146 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1147 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1148 )
1149);
1150
Johannes Bergc68f4b82011-07-05 16:35:41 +02001151TRACE_EVENT(drv_set_rekey_data,
1152 TP_PROTO(struct ieee80211_local *local,
1153 struct ieee80211_sub_if_data *sdata,
1154 struct cfg80211_gtk_rekey_data *data),
1155
1156 TP_ARGS(local, sdata, data),
1157
1158 TP_STRUCT__entry(
1159 LOCAL_ENTRY
1160 VIF_ENTRY
1161 __array(u8, kek, NL80211_KEK_LEN)
1162 __array(u8, kck, NL80211_KCK_LEN)
1163 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1164 ),
1165
1166 TP_fast_assign(
1167 LOCAL_ASSIGN;
1168 VIF_ASSIGN;
1169 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1170 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1171 memcpy(__entry->replay_ctr, data->replay_ctr,
1172 NL80211_REPLAY_CTR_LEN);
1173 ),
1174
1175 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1176 LOCAL_PR_ARG, VIF_PR_ARG)
1177);
1178
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001179TRACE_EVENT(drv_rssi_callback,
1180 TP_PROTO(struct ieee80211_local *local,
1181 enum ieee80211_rssi_event rssi_event),
1182
1183 TP_ARGS(local, rssi_event),
1184
1185 TP_STRUCT__entry(
1186 LOCAL_ENTRY
1187 __field(u32, rssi_event)
1188 ),
1189
1190 TP_fast_assign(
1191 LOCAL_ASSIGN;
1192 __entry->rssi_event = rssi_event;
1193 ),
1194
1195 TP_printk(
1196 LOCAL_PR_FMT " rssi_event:%d",
1197 LOCAL_PR_ARG, __entry->rssi_event
1198 )
1199);
1200
Johannes Berg40b96402011-09-29 16:04:38 +02001201DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001202 TP_PROTO(struct ieee80211_local *local,
1203 struct ieee80211_sta *sta,
1204 u16 tids, int num_frames,
1205 enum ieee80211_frame_release_type reason,
1206 bool more_data),
1207
1208 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1209
1210 TP_STRUCT__entry(
1211 LOCAL_ENTRY
1212 STA_ENTRY
1213 __field(u16, tids)
1214 __field(int, num_frames)
1215 __field(int, reason)
1216 __field(bool, more_data)
1217 ),
1218
1219 TP_fast_assign(
1220 LOCAL_ASSIGN;
1221 STA_ASSIGN;
1222 __entry->tids = tids;
1223 __entry->num_frames = num_frames;
1224 __entry->reason = reason;
1225 __entry->more_data = more_data;
1226 ),
1227
1228 TP_printk(
1229 LOCAL_PR_FMT STA_PR_FMT
1230 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1231 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1232 __entry->reason, __entry->more_data
1233 )
1234);
1235
Johannes Berg40b96402011-09-29 16:04:38 +02001236DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1237 TP_PROTO(struct ieee80211_local *local,
1238 struct ieee80211_sta *sta,
1239 u16 tids, int num_frames,
1240 enum ieee80211_frame_release_type reason,
1241 bool more_data),
1242
1243 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1244);
1245
1246DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1247 TP_PROTO(struct ieee80211_local *local,
1248 struct ieee80211_sta *sta,
1249 u16 tids, int num_frames,
1250 enum ieee80211_frame_release_type reason,
1251 bool more_data),
1252
1253 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1254);
1255
Victor Goldenshtein66572cf2012-06-21 10:56:46 +03001256TRACE_EVENT(drv_get_rssi,
1257 TP_PROTO(struct ieee80211_local *local, struct ieee80211_sta *sta,
1258 s8 rssi, int ret),
1259
1260 TP_ARGS(local, sta, rssi, ret),
1261
1262 TP_STRUCT__entry(
1263 LOCAL_ENTRY
1264 STA_ENTRY
1265 __field(s8, rssi)
1266 __field(int, ret)
1267 ),
1268
1269 TP_fast_assign(
1270 LOCAL_ASSIGN;
1271 STA_ASSIGN;
1272 __entry->rssi = rssi;
1273 __entry->ret = ret;
1274 ),
1275
1276 TP_printk(
1277 LOCAL_PR_FMT STA_PR_FMT " rssi:%d ret:%d",
1278 LOCAL_PR_ARG, STA_PR_ARG, __entry->rssi, __entry->ret
1279 )
1280);
1281
Johannes Berga1845fc2012-06-27 13:18:36 +02001282DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
1283 TP_PROTO(struct ieee80211_local *local,
1284 struct ieee80211_sub_if_data *sdata),
1285
1286 TP_ARGS(local, sdata)
1287);
1288
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001289DECLARE_EVENT_CLASS(local_chanctx,
1290 TP_PROTO(struct ieee80211_local *local,
1291 struct ieee80211_chanctx *ctx),
1292
1293 TP_ARGS(local, ctx),
1294
1295 TP_STRUCT__entry(
1296 LOCAL_ENTRY
1297 CHANCTX_ENTRY
1298 ),
1299
1300 TP_fast_assign(
1301 LOCAL_ASSIGN;
1302 CHANCTX_ASSIGN;
1303 ),
1304
1305 TP_printk(
1306 LOCAL_PR_FMT CHANCTX_PR_FMT,
1307 LOCAL_PR_ARG, CHANCTX_PR_ARG
1308 )
1309);
1310
1311DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1312 TP_PROTO(struct ieee80211_local *local,
1313 struct ieee80211_chanctx *ctx),
1314 TP_ARGS(local, ctx)
1315);
1316
1317DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1318 TP_PROTO(struct ieee80211_local *local,
1319 struct ieee80211_chanctx *ctx),
1320 TP_ARGS(local, ctx)
1321);
1322
1323TRACE_EVENT(drv_change_chanctx,
1324 TP_PROTO(struct ieee80211_local *local,
1325 struct ieee80211_chanctx *ctx,
1326 u32 changed),
1327
1328 TP_ARGS(local, ctx, changed),
1329
1330 TP_STRUCT__entry(
1331 LOCAL_ENTRY
1332 CHANCTX_ENTRY
1333 __field(u32, changed)
1334 ),
1335
1336 TP_fast_assign(
1337 LOCAL_ASSIGN;
1338 CHANCTX_ASSIGN;
1339 __entry->changed = changed;
1340 ),
1341
1342 TP_printk(
1343 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1344 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1345 )
1346);
1347
1348DECLARE_EVENT_CLASS(local_sdata_chanctx,
1349 TP_PROTO(struct ieee80211_local *local,
1350 struct ieee80211_sub_if_data *sdata,
1351 struct ieee80211_chanctx *ctx),
1352
1353 TP_ARGS(local, sdata, ctx),
1354
1355 TP_STRUCT__entry(
1356 LOCAL_ENTRY
1357 VIF_ENTRY
1358 CHANCTX_ENTRY
1359 ),
1360
1361 TP_fast_assign(
1362 LOCAL_ASSIGN;
1363 VIF_ASSIGN;
1364 CHANCTX_ASSIGN;
1365 ),
1366
1367 TP_printk(
1368 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
1369 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
1370 )
1371);
1372
1373DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1374 TP_PROTO(struct ieee80211_local *local,
1375 struct ieee80211_sub_if_data *sdata,
1376 struct ieee80211_chanctx *ctx),
1377 TP_ARGS(local, sdata, ctx)
1378);
1379
1380DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1381 TP_PROTO(struct ieee80211_local *local,
1382 struct ieee80211_sub_if_data *sdata,
1383 struct ieee80211_chanctx *ctx),
1384 TP_ARGS(local, sdata, ctx)
1385);
1386
Johannes Berg10416382012-10-19 15:44:42 +02001387TRACE_EVENT(drv_start_ap,
1388 TP_PROTO(struct ieee80211_local *local,
1389 struct ieee80211_sub_if_data *sdata,
1390 struct ieee80211_bss_conf *info),
1391
1392 TP_ARGS(local, sdata, info),
1393
1394 TP_STRUCT__entry(
1395 LOCAL_ENTRY
1396 VIF_ENTRY
1397 __field(u8, dtimper)
1398 __field(u16, bcnint)
1399 __dynamic_array(u8, ssid, info->ssid_len);
1400 __field(bool, hidden_ssid);
1401 ),
1402
1403 TP_fast_assign(
1404 LOCAL_ASSIGN;
1405 VIF_ASSIGN;
1406 __entry->dtimper = info->dtim_period;
1407 __entry->bcnint = info->beacon_int;
1408 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1409 __entry->hidden_ssid = info->hidden_ssid;
1410 ),
1411
1412 TP_printk(
1413 LOCAL_PR_FMT VIF_PR_FMT,
1414 LOCAL_PR_ARG, VIF_PR_ARG
1415 )
1416);
1417
1418DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
1419 TP_PROTO(struct ieee80211_local *local,
1420 struct ieee80211_sub_if_data *sdata),
1421 TP_ARGS(local, sdata)
1422);
1423
Johannes Berg9214ad72012-11-06 19:18:13 +01001424DEFINE_EVENT(local_only_evt, drv_restart_complete,
1425 TP_PROTO(struct ieee80211_local *local),
1426 TP_ARGS(local)
1427);
1428
Johannes Bergb5878a22010-04-07 16:48:40 +02001429/*
1430 * Tracing for API calls that drivers call.
1431 */
1432
1433TRACE_EVENT(api_start_tx_ba_session,
1434 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1435
1436 TP_ARGS(sta, tid),
1437
1438 TP_STRUCT__entry(
1439 STA_ENTRY
1440 __field(u16, tid)
1441 ),
1442
1443 TP_fast_assign(
1444 STA_ASSIGN;
1445 __entry->tid = tid;
1446 ),
1447
1448 TP_printk(
1449 STA_PR_FMT " tid:%d",
1450 STA_PR_ARG, __entry->tid
1451 )
1452);
1453
1454TRACE_EVENT(api_start_tx_ba_cb,
1455 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1456
1457 TP_ARGS(sdata, ra, tid),
1458
1459 TP_STRUCT__entry(
1460 VIF_ENTRY
1461 __array(u8, ra, ETH_ALEN)
1462 __field(u16, tid)
1463 ),
1464
1465 TP_fast_assign(
1466 VIF_ASSIGN;
1467 memcpy(__entry->ra, ra, ETH_ALEN);
1468 __entry->tid = tid;
1469 ),
1470
1471 TP_printk(
1472 VIF_PR_FMT " ra:%pM tid:%d",
1473 VIF_PR_ARG, __entry->ra, __entry->tid
1474 )
1475);
1476
1477TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001478 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001479
Johannes Berg6a8579d2010-05-27 14:41:07 +02001480 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001481
1482 TP_STRUCT__entry(
1483 STA_ENTRY
1484 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001485 ),
1486
1487 TP_fast_assign(
1488 STA_ASSIGN;
1489 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001490 ),
1491
1492 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001493 STA_PR_FMT " tid:%d",
1494 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001495 )
1496);
1497
1498TRACE_EVENT(api_stop_tx_ba_cb,
1499 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1500
1501 TP_ARGS(sdata, ra, tid),
1502
1503 TP_STRUCT__entry(
1504 VIF_ENTRY
1505 __array(u8, ra, ETH_ALEN)
1506 __field(u16, tid)
1507 ),
1508
1509 TP_fast_assign(
1510 VIF_ASSIGN;
1511 memcpy(__entry->ra, ra, ETH_ALEN);
1512 __entry->tid = tid;
1513 ),
1514
1515 TP_printk(
1516 VIF_PR_FMT " ra:%pM tid:%d",
1517 VIF_PR_ARG, __entry->ra, __entry->tid
1518 )
1519);
1520
Johannes Bergba99d932011-01-26 09:22:15 +01001521DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001522 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001523 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001524);
1525
1526TRACE_EVENT(api_beacon_loss,
1527 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1528
1529 TP_ARGS(sdata),
1530
1531 TP_STRUCT__entry(
1532 VIF_ENTRY
1533 ),
1534
1535 TP_fast_assign(
1536 VIF_ASSIGN;
1537 ),
1538
1539 TP_printk(
1540 VIF_PR_FMT,
1541 VIF_PR_ARG
1542 )
1543);
1544
1545TRACE_EVENT(api_connection_loss,
1546 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1547
1548 TP_ARGS(sdata),
1549
1550 TP_STRUCT__entry(
1551 VIF_ENTRY
1552 ),
1553
1554 TP_fast_assign(
1555 VIF_ASSIGN;
1556 ),
1557
1558 TP_printk(
1559 VIF_PR_FMT,
1560 VIF_PR_ARG
1561 )
1562);
1563
1564TRACE_EVENT(api_cqm_rssi_notify,
1565 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1566 enum nl80211_cqm_rssi_threshold_event rssi_event),
1567
1568 TP_ARGS(sdata, rssi_event),
1569
1570 TP_STRUCT__entry(
1571 VIF_ENTRY
1572 __field(u32, rssi_event)
1573 ),
1574
1575 TP_fast_assign(
1576 VIF_ASSIGN;
1577 __entry->rssi_event = rssi_event;
1578 ),
1579
1580 TP_printk(
1581 VIF_PR_FMT " event:%d",
1582 VIF_PR_ARG, __entry->rssi_event
1583 )
1584);
1585
1586TRACE_EVENT(api_scan_completed,
1587 TP_PROTO(struct ieee80211_local *local, bool aborted),
1588
1589 TP_ARGS(local, aborted),
1590
1591 TP_STRUCT__entry(
1592 LOCAL_ENTRY
1593 __field(bool, aborted)
1594 ),
1595
1596 TP_fast_assign(
1597 LOCAL_ASSIGN;
1598 __entry->aborted = aborted;
1599 ),
1600
1601 TP_printk(
1602 LOCAL_PR_FMT " aborted:%d",
1603 LOCAL_PR_ARG, __entry->aborted
1604 )
1605);
1606
Luciano Coelho79f460c2011-05-11 17:09:36 +03001607TRACE_EVENT(api_sched_scan_results,
1608 TP_PROTO(struct ieee80211_local *local),
1609
1610 TP_ARGS(local),
1611
1612 TP_STRUCT__entry(
1613 LOCAL_ENTRY
1614 ),
1615
1616 TP_fast_assign(
1617 LOCAL_ASSIGN;
1618 ),
1619
1620 TP_printk(
1621 LOCAL_PR_FMT, LOCAL_PR_ARG
1622 )
1623);
1624
1625TRACE_EVENT(api_sched_scan_stopped,
1626 TP_PROTO(struct ieee80211_local *local),
1627
1628 TP_ARGS(local),
1629
1630 TP_STRUCT__entry(
1631 LOCAL_ENTRY
1632 ),
1633
1634 TP_fast_assign(
1635 LOCAL_ASSIGN;
1636 ),
1637
1638 TP_printk(
1639 LOCAL_PR_FMT, LOCAL_PR_ARG
1640 )
1641);
1642
Johannes Bergb5878a22010-04-07 16:48:40 +02001643TRACE_EVENT(api_sta_block_awake,
1644 TP_PROTO(struct ieee80211_local *local,
1645 struct ieee80211_sta *sta, bool block),
1646
1647 TP_ARGS(local, sta, block),
1648
1649 TP_STRUCT__entry(
1650 LOCAL_ENTRY
1651 STA_ENTRY
1652 __field(bool, block)
1653 ),
1654
1655 TP_fast_assign(
1656 LOCAL_ASSIGN;
1657 STA_ASSIGN;
1658 __entry->block = block;
1659 ),
1660
1661 TP_printk(
1662 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1663 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
1664 )
1665);
1666
Johannes Berg5ce6e432010-05-11 16:20:57 +02001667TRACE_EVENT(api_chswitch_done,
1668 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1669
1670 TP_ARGS(sdata, success),
1671
1672 TP_STRUCT__entry(
1673 VIF_ENTRY
1674 __field(bool, success)
1675 ),
1676
1677 TP_fast_assign(
1678 VIF_ASSIGN;
1679 __entry->success = success;
1680 ),
1681
1682 TP_printk(
1683 VIF_PR_FMT " success=%d",
1684 VIF_PR_ARG, __entry->success
1685 )
1686);
1687
Johannes Bergba99d932011-01-26 09:22:15 +01001688DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001689 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001690 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001691);
1692
Johannes Bergba99d932011-01-26 09:22:15 +01001693DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001694 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001695 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001696);
1697
Johannes Bergc68f4b82011-07-05 16:35:41 +02001698TRACE_EVENT(api_gtk_rekey_notify,
1699 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1700 const u8 *bssid, const u8 *replay_ctr),
1701
1702 TP_ARGS(sdata, bssid, replay_ctr),
1703
1704 TP_STRUCT__entry(
1705 VIF_ENTRY
1706 __array(u8, bssid, ETH_ALEN)
1707 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1708 ),
1709
1710 TP_fast_assign(
1711 VIF_ASSIGN;
1712 memcpy(__entry->bssid, bssid, ETH_ALEN);
1713 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1714 ),
1715
1716 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1717);
1718
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001719TRACE_EVENT(api_enable_rssi_reports,
1720 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1721 int rssi_min_thold, int rssi_max_thold),
1722
1723 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1724
1725 TP_STRUCT__entry(
1726 VIF_ENTRY
1727 __field(int, rssi_min_thold)
1728 __field(int, rssi_max_thold)
1729 ),
1730
1731 TP_fast_assign(
1732 VIF_ASSIGN;
1733 __entry->rssi_min_thold = rssi_min_thold;
1734 __entry->rssi_max_thold = rssi_max_thold;
1735 ),
1736
1737 TP_printk(
1738 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
1739 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
1740 )
1741);
1742
Johannes Berg37fbd902011-09-29 16:04:39 +02001743TRACE_EVENT(api_eosp,
1744 TP_PROTO(struct ieee80211_local *local,
1745 struct ieee80211_sta *sta),
1746
1747 TP_ARGS(local, sta),
1748
1749 TP_STRUCT__entry(
1750 LOCAL_ENTRY
1751 STA_ENTRY
1752 ),
1753
1754 TP_fast_assign(
1755 LOCAL_ASSIGN;
1756 STA_ASSIGN;
1757 ),
1758
1759 TP_printk(
1760 LOCAL_PR_FMT STA_PR_FMT,
1761 LOCAL_PR_ARG, STA_PR_FMT
1762 )
1763);
1764
Johannes Bergb5878a22010-04-07 16:48:40 +02001765/*
1766 * Tracing for internal functions
1767 * (which may also be called in response to driver calls)
1768 */
1769
1770TRACE_EVENT(wake_queue,
1771 TP_PROTO(struct ieee80211_local *local, u16 queue,
1772 enum queue_stop_reason reason),
1773
1774 TP_ARGS(local, queue, reason),
1775
1776 TP_STRUCT__entry(
1777 LOCAL_ENTRY
1778 __field(u16, queue)
1779 __field(u32, reason)
1780 ),
1781
1782 TP_fast_assign(
1783 LOCAL_ASSIGN;
1784 __entry->queue = queue;
1785 __entry->reason = reason;
1786 ),
1787
1788 TP_printk(
1789 LOCAL_PR_FMT " queue:%d, reason:%d",
1790 LOCAL_PR_ARG, __entry->queue, __entry->reason
1791 )
1792);
1793
1794TRACE_EVENT(stop_queue,
1795 TP_PROTO(struct ieee80211_local *local, u16 queue,
1796 enum queue_stop_reason reason),
1797
1798 TP_ARGS(local, queue, reason),
1799
1800 TP_STRUCT__entry(
1801 LOCAL_ENTRY
1802 __field(u16, queue)
1803 __field(u32, reason)
1804 ),
1805
1806 TP_fast_assign(
1807 LOCAL_ASSIGN;
1808 __entry->queue = queue;
1809 __entry->reason = reason;
1810 ),
1811
1812 TP_printk(
1813 LOCAL_PR_FMT " queue:%d, reason:%d",
1814 LOCAL_PR_ARG, __entry->queue, __entry->reason
1815 )
1816);
Johannes Berg3fae0272012-06-22 13:36:25 +02001817
1818#ifdef CONFIG_MAC80211_MESSAGE_TRACING
1819#undef TRACE_SYSTEM
1820#define TRACE_SYSTEM mac80211_msg
1821
1822#define MAX_MSG_LEN 100
1823
1824DECLARE_EVENT_CLASS(mac80211_msg_event,
1825 TP_PROTO(struct va_format *vaf),
1826
1827 TP_ARGS(vaf),
1828
1829 TP_STRUCT__entry(
1830 __dynamic_array(char, msg, MAX_MSG_LEN)
1831 ),
1832
1833 TP_fast_assign(
1834 WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
1835 MAX_MSG_LEN, vaf->fmt,
1836 *vaf->va) >= MAX_MSG_LEN);
1837 ),
1838
1839 TP_printk("%s", __get_str(msg))
1840);
1841
1842DEFINE_EVENT(mac80211_msg_event, mac80211_info,
1843 TP_PROTO(struct va_format *vaf),
1844 TP_ARGS(vaf)
1845);
1846DEFINE_EVENT(mac80211_msg_event, mac80211_dbg,
1847 TP_PROTO(struct va_format *vaf),
1848 TP_ARGS(vaf)
1849);
1850DEFINE_EVENT(mac80211_msg_event, mac80211_err,
1851 TP_PROTO(struct va_format *vaf),
1852 TP_ARGS(vaf)
1853);
1854#endif
1855
Christian Lamparterf7428802009-07-19 23:21:07 +02001856#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001857
1858#undef TRACE_INCLUDE_PATH
1859#define TRACE_INCLUDE_PATH .
1860#undef TRACE_INCLUDE_FILE
Johannes Berg011ad0e2012-06-22 12:55:52 +02001861#define TRACE_INCLUDE_FILE trace
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001862#include <trace/define_trace.h>