blob: 3d7cd2a0582f4e467504d296c8150b258cc7dd91 [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 Berg5a32aff2012-12-21 12:36:33 +010031#define CHANDEF_ENTRY __field(u32, control_freq) \
Johannes Berg4bf88532012-11-09 11:39:59 +010032 __field(u32, chan_width) \
33 __field(u32, center_freq1) \
Johannes Berg5a32aff2012-12-21 12:36:33 +010034 __field(u32, center_freq2)
35#define CHANDEF_ASSIGN(c) \
36 __entry->control_freq = (c)->chan->center_freq; \
37 __entry->chan_width = (c)->width; \
38 __entry->center_freq1 = (c)->center_freq1; \
Johannes Berg757af6f2013-02-08 21:29:59 +010039 __entry->center_freq2 = (c)->center_freq2;
Johannes Berg5a32aff2012-12-21 12:36:33 +010040#define CHANDEF_PR_FMT " control:%d MHz width:%d center: %d/%d MHz"
41#define CHANDEF_PR_ARG __entry->control_freq, __entry->chan_width, \
42 __entry->center_freq1, __entry->center_freq2
43
44#define CHANCTX_ENTRY CHANDEF_ENTRY \
Johannes Berg04ecd252012-09-11 14:34:12 +020045 __field(u8, rx_chains_static) \
46 __field(u8, rx_chains_dynamic)
Johannes Berg5a32aff2012-12-21 12:36:33 +010047#define CHANCTX_ASSIGN CHANDEF_ASSIGN(&ctx->conf.def) \
Johannes Berg04ecd252012-09-11 14:34:12 +020048 __entry->rx_chains_static = ctx->conf.rx_chains_static; \
49 __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic
Johannes Berg5a32aff2012-12-21 12:36:33 +010050#define CHANCTX_PR_FMT CHANDEF_PR_FMT " chains:%d/%d"
51#define CHANCTX_PR_ARG CHANDEF_PR_ARG, \
Johannes Berg04ecd252012-09-11 14:34:12 +020052 __entry->rx_chains_static, __entry->rx_chains_dynamic
Michal Kaziorc3645ea2012-06-26 14:37:17 +020053
54
55
Johannes Bergb5878a22010-04-07 16:48:40 +020056/*
57 * Tracing for driver callbacks.
58 */
59
Johannes Bergba99d932011-01-26 09:22:15 +010060DECLARE_EVENT_CLASS(local_only_evt,
Johannes Berg4efc76b2010-06-10 10:56:20 +020061 TP_PROTO(struct ieee80211_local *local),
62 TP_ARGS(local),
63 TP_STRUCT__entry(
64 LOCAL_ENTRY
65 ),
66 TP_fast_assign(
67 LOCAL_ASSIGN;
68 ),
69 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
70);
71
Luciano Coelho92ddc112011-05-09 14:40:06 +030072DECLARE_EVENT_CLASS(local_sdata_addr_evt,
73 TP_PROTO(struct ieee80211_local *local,
74 struct ieee80211_sub_if_data *sdata),
75 TP_ARGS(local, sdata),
76
77 TP_STRUCT__entry(
78 LOCAL_ENTRY
79 VIF_ENTRY
80 __array(char, addr, 6)
81 ),
82
83 TP_fast_assign(
84 LOCAL_ASSIGN;
85 VIF_ASSIGN;
86 memcpy(__entry->addr, sdata->vif.addr, 6);
87 ),
88
89 TP_printk(
90 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
91 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
92 )
93);
94
95DECLARE_EVENT_CLASS(local_u32_evt,
96 TP_PROTO(struct ieee80211_local *local, u32 value),
97 TP_ARGS(local, value),
98
99 TP_STRUCT__entry(
100 LOCAL_ENTRY
101 __field(u32, value)
102 ),
103
104 TP_fast_assign(
105 LOCAL_ASSIGN;
106 __entry->value = value;
107 ),
108
109 TP_printk(
110 LOCAL_PR_FMT " value:%d",
111 LOCAL_PR_ARG, __entry->value
112 )
113);
114
Luciano Coelho79f460c2011-05-11 17:09:36 +0300115DECLARE_EVENT_CLASS(local_sdata_evt,
116 TP_PROTO(struct ieee80211_local *local,
117 struct ieee80211_sub_if_data *sdata),
118 TP_ARGS(local, sdata),
119
120 TP_STRUCT__entry(
121 LOCAL_ENTRY
122 VIF_ENTRY
123 ),
124
125 TP_fast_assign(
126 LOCAL_ASSIGN;
127 VIF_ASSIGN;
128 ),
129
130 TP_printk(
131 LOCAL_PR_FMT VIF_PR_FMT,
132 LOCAL_PR_ARG, VIF_PR_ARG
133 )
134);
135
Johannes Bergba99d932011-01-26 09:22:15 +0100136DEFINE_EVENT(local_only_evt, drv_return_void,
137 TP_PROTO(struct ieee80211_local *local),
138 TP_ARGS(local)
139);
140
Johannes Berg4efc76b2010-06-10 10:56:20 +0200141TRACE_EVENT(drv_return_int,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200142 TP_PROTO(struct ieee80211_local *local, int ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200143 TP_ARGS(local, ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200144 TP_STRUCT__entry(
145 LOCAL_ENTRY
146 __field(int, ret)
147 ),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200148 TP_fast_assign(
149 LOCAL_ASSIGN;
150 __entry->ret = ret;
151 ),
Johannes Berg4efc76b2010-06-10 10:56:20 +0200152 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
153);
154
Vivek Natarajane8306f92011-04-06 11:41:10 +0530155TRACE_EVENT(drv_return_bool,
156 TP_PROTO(struct ieee80211_local *local, bool ret),
157 TP_ARGS(local, ret),
158 TP_STRUCT__entry(
159 LOCAL_ENTRY
160 __field(bool, ret)
161 ),
162 TP_fast_assign(
163 LOCAL_ASSIGN;
164 __entry->ret = ret;
165 ),
166 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
167 "true" : "false")
168);
169
Johannes Berg4efc76b2010-06-10 10:56:20 +0200170TRACE_EVENT(drv_return_u64,
171 TP_PROTO(struct ieee80211_local *local, u64 ret),
172 TP_ARGS(local, ret),
173 TP_STRUCT__entry(
174 LOCAL_ENTRY
175 __field(u64, ret)
176 ),
177 TP_fast_assign(
178 LOCAL_ASSIGN;
179 __entry->ret = ret;
180 ),
181 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
182);
183
Johannes Bergba99d932011-01-26 09:22:15 +0100184DEFINE_EVENT(local_only_evt, drv_start,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200185 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100186 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200187);
188
Ben Greeare3521142012-04-23 12:50:31 -0700189DEFINE_EVENT(local_u32_evt, drv_get_et_strings,
190 TP_PROTO(struct ieee80211_local *local, u32 sset),
191 TP_ARGS(local, sset)
192);
193
194DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count,
195 TP_PROTO(struct ieee80211_local *local, u32 sset),
196 TP_ARGS(local, sset)
197);
198
199DEFINE_EVENT(local_only_evt, drv_get_et_stats,
200 TP_PROTO(struct ieee80211_local *local),
201 TP_ARGS(local)
202);
203
Johannes Bergeecc4802011-05-04 15:37:29 +0200204DEFINE_EVENT(local_only_evt, drv_suspend,
205 TP_PROTO(struct ieee80211_local *local),
206 TP_ARGS(local)
207);
208
209DEFINE_EVENT(local_only_evt, drv_resume,
210 TP_PROTO(struct ieee80211_local *local),
211 TP_ARGS(local)
212);
213
Johannes Berg6d525632012-04-04 15:05:25 +0200214TRACE_EVENT(drv_set_wakeup,
215 TP_PROTO(struct ieee80211_local *local, bool enabled),
216 TP_ARGS(local, enabled),
217 TP_STRUCT__entry(
218 LOCAL_ENTRY
219 __field(bool, enabled)
220 ),
221 TP_fast_assign(
222 LOCAL_ASSIGN;
223 __entry->enabled = enabled;
224 ),
225 TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
226);
227
Johannes Bergba99d932011-01-26 09:22:15 +0100228DEFINE_EVENT(local_only_evt, drv_stop,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200229 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100230 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200231);
232
Luciano Coelho92ddc112011-05-09 14:40:06 +0300233DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200234 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200235 struct ieee80211_sub_if_data *sdata),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300236 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200237);
238
Johannes Berg34d4bc42010-08-27 12:35:58 +0200239TRACE_EVENT(drv_change_interface,
240 TP_PROTO(struct ieee80211_local *local,
241 struct ieee80211_sub_if_data *sdata,
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200242 enum nl80211_iftype type, bool p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200243
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200244 TP_ARGS(local, sdata, type, p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200245
246 TP_STRUCT__entry(
247 LOCAL_ENTRY
248 VIF_ENTRY
249 __field(u32, new_type)
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200250 __field(bool, new_p2p)
Johannes Berg34d4bc42010-08-27 12:35:58 +0200251 ),
252
253 TP_fast_assign(
254 LOCAL_ASSIGN;
255 VIF_ASSIGN;
256 __entry->new_type = type;
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200257 __entry->new_p2p = p2p;
Johannes Berg34d4bc42010-08-27 12:35:58 +0200258 ),
259
260 TP_printk(
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200261 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
262 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
263 __entry->new_p2p ? "/p2p" : ""
Johannes Berg34d4bc42010-08-27 12:35:58 +0200264 )
265);
266
Luciano Coelho92ddc112011-05-09 14:40:06 +0300267DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
268 TP_PROTO(struct ieee80211_local *local,
269 struct ieee80211_sub_if_data *sdata),
270 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200271);
272
273TRACE_EVENT(drv_config,
274 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200275 u32 changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200276
Johannes Berg4efc76b2010-06-10 10:56:20 +0200277 TP_ARGS(local, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200278
279 TP_STRUCT__entry(
280 LOCAL_ENTRY
281 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100282 __field(u32, flags)
283 __field(int, power_level)
284 __field(int, dynamic_ps_timeout)
285 __field(int, max_sleep_period)
286 __field(u16, listen_interval)
287 __field(u8, long_frame_max_tx_count)
288 __field(u8, short_frame_max_tx_count)
289 __field(int, center_freq)
290 __field(int, channel_type)
Johannes Berg0f782312009-12-01 13:37:02 +0100291 __field(int, smps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200292 ),
293
294 TP_fast_assign(
295 LOCAL_ASSIGN;
296 __entry->changed = changed;
Johannes Bergf911ab82009-11-25 19:07:20 +0100297 __entry->flags = local->hw.conf.flags;
298 __entry->power_level = local->hw.conf.power_level;
299 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
300 __entry->max_sleep_period = local->hw.conf.max_sleep_period;
301 __entry->listen_interval = local->hw.conf.listen_interval;
Johannes Berg3d01be72012-07-26 14:27:39 +0200302 __entry->long_frame_max_tx_count =
303 local->hw.conf.long_frame_max_tx_count;
304 __entry->short_frame_max_tx_count =
305 local->hw.conf.short_frame_max_tx_count;
306 __entry->center_freq = local->hw.conf.channel ?
307 local->hw.conf.channel->center_freq : 0;
Johannes Bergf911ab82009-11-25 19:07:20 +0100308 __entry->channel_type = local->hw.conf.channel_type;
Johannes Berg0f782312009-12-01 13:37:02 +0100309 __entry->smps = local->hw.conf.smps_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200310 ),
311
312 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200313 LOCAL_PR_FMT " ch:%#x freq:%d",
314 LOCAL_PR_ARG, __entry->changed, __entry->center_freq
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200315 )
316);
317
318TRACE_EVENT(drv_bss_info_changed,
319 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100320 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200321 struct ieee80211_bss_conf *info,
322 u32 changed),
323
Johannes Berg12375ef2009-11-25 20:30:31 +0100324 TP_ARGS(local, sdata, info, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200325
326 TP_STRUCT__entry(
327 LOCAL_ENTRY
328 VIF_ENTRY
Johannes Berg1724ffb2012-10-24 11:38:30 +0200329 __field(u32, changed)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200330 __field(bool, assoc)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200331 __field(bool, ibss_joined)
332 __field(bool, ibss_creator)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200333 __field(u16, aid)
334 __field(bool, cts)
335 __field(bool, shortpre)
336 __field(bool, shortslot)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200337 __field(bool, enable_beacon)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200338 __field(u8, dtimper)
339 __field(u16, bcnint)
340 __field(u16, assoc_cap)
Johannes Berg8c358bc2012-05-22 22:13:05 +0200341 __field(u64, sync_tsf)
342 __field(u32, sync_device_ts)
Johannes Bergef429da2013-02-05 17:48:40 +0100343 __field(u8, sync_dtim_count)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200344 __field(u32, basic_rates)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200345 __array(int, mcast_rate, IEEE80211_NUM_BANDS)
Johannes Bergf911ab82009-11-25 19:07:20 +0100346 __field(u16, ht_operation_mode)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200347 __field(s32, cqm_rssi_thold);
348 __field(s32, cqm_rssi_hyst);
Johannes Berg4bf88532012-11-09 11:39:59 +0100349 __field(u32, channel_width);
350 __field(u32, channel_cfreq1);
Johannes Berg0f19b412013-01-14 16:39:07 +0100351 __dynamic_array(u32, arp_addr_list,
352 info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
353 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
354 info->arp_addr_cnt);
355 __field(int, arp_addr_cnt);
Johannes Berg1724ffb2012-10-24 11:38:30 +0200356 __field(bool, qos);
357 __field(bool, idle);
358 __field(bool, ps);
359 __dynamic_array(u8, ssid, info->ssid_len);
360 __field(bool, hidden_ssid);
Johannes Berg1ea6f9c2012-10-24 10:59:25 +0200361 __field(int, txpower)
Johannes Berg488dd7b2012-10-29 20:08:01 +0100362 __field(u8, p2p_ctwindow)
363 __field(bool, p2p_oppps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200364 ),
365
366 TP_fast_assign(
367 LOCAL_ASSIGN;
368 VIF_ASSIGN;
369 __entry->changed = changed;
370 __entry->aid = info->aid;
371 __entry->assoc = info->assoc;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200372 __entry->ibss_joined = info->ibss_joined;
373 __entry->ibss_creator = info->ibss_creator;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200374 __entry->shortpre = info->use_short_preamble;
375 __entry->cts = info->use_cts_prot;
376 __entry->shortslot = info->use_short_slot;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200377 __entry->enable_beacon = info->enable_beacon;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200378 __entry->dtimper = info->dtim_period;
379 __entry->bcnint = info->beacon_int;
380 __entry->assoc_cap = info->assoc_capability;
Johannes Berg8c358bc2012-05-22 22:13:05 +0200381 __entry->sync_tsf = info->sync_tsf;
382 __entry->sync_device_ts = info->sync_device_ts;
Johannes Bergef429da2013-02-05 17:48:40 +0100383 __entry->sync_dtim_count = info->sync_dtim_count;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200384 __entry->basic_rates = info->basic_rates;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200385 memcpy(__entry->mcast_rate, info->mcast_rate,
386 sizeof(__entry->mcast_rate));
Johannes Bergf911ab82009-11-25 19:07:20 +0100387 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200388 __entry->cqm_rssi_thold = info->cqm_rssi_thold;
389 __entry->cqm_rssi_hyst = info->cqm_rssi_hyst;
Johannes Berg4bf88532012-11-09 11:39:59 +0100390 __entry->channel_width = info->chandef.width;
391 __entry->channel_cfreq1 = info->chandef.center_freq1;
Johannes Berg0f19b412013-01-14 16:39:07 +0100392 __entry->arp_addr_cnt = info->arp_addr_cnt;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200393 memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list,
Johannes Berg0f19b412013-01-14 16:39:07 +0100394 sizeof(u32) * (info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
395 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
396 info->arp_addr_cnt));
Johannes Berg1724ffb2012-10-24 11:38:30 +0200397 __entry->qos = info->qos;
398 __entry->idle = info->idle;
399 __entry->ps = info->ps;
400 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
401 __entry->hidden_ssid = info->hidden_ssid;
Johannes Berg1ea6f9c2012-10-24 10:59:25 +0200402 __entry->txpower = info->txpower;
Johannes Berg488dd7b2012-10-29 20:08:01 +0100403 __entry->p2p_ctwindow = info->p2p_ctwindow;
404 __entry->p2p_oppps = info->p2p_oppps;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200405 ),
406
407 TP_printk(
408 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
409 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
410 )
411);
412
Johannes Berg3ac64be2009-08-17 16:16:53 +0200413TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200414 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200415
Johannes Berg4efc76b2010-06-10 10:56:20 +0200416 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200417
418 TP_STRUCT__entry(
419 LOCAL_ENTRY
420 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200421 ),
422
423 TP_fast_assign(
424 LOCAL_ASSIGN;
425 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200426 ),
427
428 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200429 LOCAL_PR_FMT " prepare mc (%d)",
430 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200431 )
432);
433
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200434TRACE_EVENT(drv_configure_filter,
435 TP_PROTO(struct ieee80211_local *local,
436 unsigned int changed_flags,
437 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200438 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200439
Johannes Berg3ac64be2009-08-17 16:16:53 +0200440 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200441
442 TP_STRUCT__entry(
443 LOCAL_ENTRY
444 __field(unsigned int, changed)
445 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200446 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200447 ),
448
449 TP_fast_assign(
450 LOCAL_ASSIGN;
451 __entry->changed = changed_flags;
452 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200453 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200454 ),
455
456 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200457 LOCAL_PR_FMT " changed:%#x total:%#x",
458 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200459 )
460);
461
462TRACE_EVENT(drv_set_tim,
463 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200464 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200465
Johannes Berg4efc76b2010-06-10 10:56:20 +0200466 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200467
468 TP_STRUCT__entry(
469 LOCAL_ENTRY
470 STA_ENTRY
471 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200472 ),
473
474 TP_fast_assign(
475 LOCAL_ASSIGN;
476 STA_ASSIGN;
477 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200478 ),
479
480 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200481 LOCAL_PR_FMT STA_PR_FMT " set:%d",
Seth Forshee15ac7c42013-02-15 13:15:48 -0600482 LOCAL_PR_ARG, STA_PR_ARG, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200483 )
484);
485
486TRACE_EVENT(drv_set_key,
487 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100488 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200489 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200490 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200491
Johannes Berg4efc76b2010-06-10 10:56:20 +0200492 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200493
494 TP_STRUCT__entry(
495 LOCAL_ENTRY
496 VIF_ENTRY
497 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200498 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200499 __field(u8, hw_key_idx)
500 __field(u8, flags)
501 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200502 ),
503
504 TP_fast_assign(
505 LOCAL_ASSIGN;
506 VIF_ASSIGN;
507 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200508 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200509 __entry->flags = key->flags;
510 __entry->keyidx = key->keyidx;
511 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200512 ),
513
514 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200515 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
516 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200517 )
518);
519
520TRACE_EVENT(drv_update_tkip_key,
521 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100522 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200523 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100524 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200525
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100526 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200527
528 TP_STRUCT__entry(
529 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100530 VIF_ENTRY
531 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200532 __field(u32, iv32)
533 ),
534
535 TP_fast_assign(
536 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100537 VIF_ASSIGN;
538 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200539 __entry->iv32 = iv32;
540 ),
541
542 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100543 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
544 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200545 )
546);
547
Luciano Coelho79f460c2011-05-11 17:09:36 +0300548DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200549 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300550 struct ieee80211_sub_if_data *sdata),
551 TP_ARGS(local, sdata)
552);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200553
Eliad Pellerb8564392011-06-13 12:47:30 +0300554DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
555 TP_PROTO(struct ieee80211_local *local,
556 struct ieee80211_sub_if_data *sdata),
557 TP_ARGS(local, sdata)
558);
559
Luciano Coelho79f460c2011-05-11 17:09:36 +0300560DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
561 TP_PROTO(struct ieee80211_local *local,
562 struct ieee80211_sub_if_data *sdata),
563 TP_ARGS(local, sdata)
564);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200565
Luciano Coelho79f460c2011-05-11 17:09:36 +0300566DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
567 TP_PROTO(struct ieee80211_local *local,
568 struct ieee80211_sub_if_data *sdata),
569 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200570);
571
Johannes Bergba99d932011-01-26 09:22:15 +0100572DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200573 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100574 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200575);
576
Johannes Bergba99d932011-01-26 09:22:15 +0100577DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200578 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100579 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200580);
581
582TRACE_EVENT(drv_get_stats,
583 TP_PROTO(struct ieee80211_local *local,
584 struct ieee80211_low_level_stats *stats,
585 int ret),
586
587 TP_ARGS(local, stats, ret),
588
589 TP_STRUCT__entry(
590 LOCAL_ENTRY
591 __field(int, ret)
592 __field(unsigned int, ackfail)
593 __field(unsigned int, rtsfail)
594 __field(unsigned int, fcserr)
595 __field(unsigned int, rtssucc)
596 ),
597
598 TP_fast_assign(
599 LOCAL_ASSIGN;
600 __entry->ret = ret;
601 __entry->ackfail = stats->dot11ACKFailureCount;
602 __entry->rtsfail = stats->dot11RTSFailureCount;
603 __entry->fcserr = stats->dot11FCSErrorCount;
604 __entry->rtssucc = stats->dot11RTSSuccessCount;
605 ),
606
607 TP_printk(
608 LOCAL_PR_FMT " ret:%d",
609 LOCAL_PR_ARG, __entry->ret
610 )
611);
612
613TRACE_EVENT(drv_get_tkip_seq,
614 TP_PROTO(struct ieee80211_local *local,
615 u8 hw_key_idx, u32 *iv32, u16 *iv16),
616
617 TP_ARGS(local, hw_key_idx, iv32, iv16),
618
619 TP_STRUCT__entry(
620 LOCAL_ENTRY
621 __field(u8, hw_key_idx)
622 __field(u32, iv32)
623 __field(u16, iv16)
624 ),
625
626 TP_fast_assign(
627 LOCAL_ASSIGN;
628 __entry->hw_key_idx = hw_key_idx;
629 __entry->iv32 = *iv32;
630 __entry->iv16 = *iv16;
631 ),
632
633 TP_printk(
634 LOCAL_PR_FMT, LOCAL_PR_ARG
635 )
636);
637
Luciano Coelho92ddc112011-05-09 14:40:06 +0300638DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200639 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300640 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200641);
642
Luciano Coelho92ddc112011-05-09 14:40:06 +0300643DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200644 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300645 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200646);
647
Lukáš Turek310bc672009-12-21 22:50:48 +0100648TRACE_EVENT(drv_set_coverage_class,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200649 TP_PROTO(struct ieee80211_local *local, u8 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100650
Johannes Berg4efc76b2010-06-10 10:56:20 +0200651 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100652
653 TP_STRUCT__entry(
654 LOCAL_ENTRY
655 __field(u8, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100656 ),
657
658 TP_fast_assign(
659 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100660 __entry->value = value;
661 ),
662
663 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200664 LOCAL_PR_FMT " value:%d",
665 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100666 )
667);
668
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200669TRACE_EVENT(drv_sta_notify,
670 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100671 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200672 enum sta_notify_cmd cmd,
673 struct ieee80211_sta *sta),
674
Johannes Berg12375ef2009-11-25 20:30:31 +0100675 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200676
677 TP_STRUCT__entry(
678 LOCAL_ENTRY
679 VIF_ENTRY
680 STA_ENTRY
681 __field(u32, cmd)
682 ),
683
684 TP_fast_assign(
685 LOCAL_ASSIGN;
686 VIF_ASSIGN;
687 STA_ASSIGN;
688 __entry->cmd = cmd;
689 ),
690
691 TP_printk(
692 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
693 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
694 )
695);
696
Johannes Bergf09603a2012-01-20 13:55:21 +0100697TRACE_EVENT(drv_sta_state,
698 TP_PROTO(struct ieee80211_local *local,
699 struct ieee80211_sub_if_data *sdata,
700 struct ieee80211_sta *sta,
701 enum ieee80211_sta_state old_state,
702 enum ieee80211_sta_state new_state),
703
704 TP_ARGS(local, sdata, sta, old_state, new_state),
705
706 TP_STRUCT__entry(
707 LOCAL_ENTRY
708 VIF_ENTRY
709 STA_ENTRY
710 __field(u32, old_state)
711 __field(u32, new_state)
712 ),
713
714 TP_fast_assign(
715 LOCAL_ASSIGN;
716 VIF_ASSIGN;
717 STA_ASSIGN;
718 __entry->old_state = old_state;
719 __entry->new_state = new_state;
720 ),
721
722 TP_printk(
723 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
724 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
725 __entry->old_state, __entry->new_state
726 )
727);
728
Johannes Berg8f727ef2012-03-30 08:43:32 +0200729TRACE_EVENT(drv_sta_rc_update,
730 TP_PROTO(struct ieee80211_local *local,
731 struct ieee80211_sub_if_data *sdata,
732 struct ieee80211_sta *sta,
733 u32 changed),
734
735 TP_ARGS(local, sdata, sta, changed),
736
737 TP_STRUCT__entry(
738 LOCAL_ENTRY
739 VIF_ENTRY
740 STA_ENTRY
741 __field(u32, changed)
742 ),
743
744 TP_fast_assign(
745 LOCAL_ASSIGN;
746 VIF_ASSIGN;
747 STA_ASSIGN;
748 __entry->changed = changed;
749 ),
750
751 TP_printk(
752 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
753 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
754 )
755);
756
Johannes Berg34e89502010-02-03 13:59:58 +0100757TRACE_EVENT(drv_sta_add,
758 TP_PROTO(struct ieee80211_local *local,
759 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200760 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100761
Johannes Berg4efc76b2010-06-10 10:56:20 +0200762 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100763
764 TP_STRUCT__entry(
765 LOCAL_ENTRY
766 VIF_ENTRY
767 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100768 ),
769
770 TP_fast_assign(
771 LOCAL_ASSIGN;
772 VIF_ASSIGN;
773 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100774 ),
775
776 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200777 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
778 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100779 )
780);
781
782TRACE_EVENT(drv_sta_remove,
783 TP_PROTO(struct ieee80211_local *local,
784 struct ieee80211_sub_if_data *sdata,
785 struct ieee80211_sta *sta),
786
787 TP_ARGS(local, sdata, sta),
788
789 TP_STRUCT__entry(
790 LOCAL_ENTRY
791 VIF_ENTRY
792 STA_ENTRY
793 ),
794
795 TP_fast_assign(
796 LOCAL_ASSIGN;
797 VIF_ASSIGN;
798 STA_ASSIGN;
799 ),
800
801 TP_printk(
802 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
803 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
804 )
805);
806
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200807TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300808 TP_PROTO(struct ieee80211_local *local,
809 struct ieee80211_sub_if_data *sdata,
Johannes Berga3304b02012-03-28 11:04:24 +0200810 u16 ac, const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200811
Johannes Berga3304b02012-03-28 11:04:24 +0200812 TP_ARGS(local, sdata, ac, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200813
814 TP_STRUCT__entry(
815 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300816 VIF_ENTRY
Johannes Berga3304b02012-03-28 11:04:24 +0200817 __field(u16, ac)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200818 __field(u16, txop)
819 __field(u16, cw_min)
820 __field(u16, cw_max)
821 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300822 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200823 ),
824
825 TP_fast_assign(
826 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300827 VIF_ASSIGN;
Johannes Berga3304b02012-03-28 11:04:24 +0200828 __entry->ac = ac;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200829 __entry->txop = params->txop;
830 __entry->cw_max = params->cw_max;
831 __entry->cw_min = params->cw_min;
832 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300833 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200834 ),
835
836 TP_printk(
Johannes Berga3304b02012-03-28 11:04:24 +0200837 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
838 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200839 )
840);
841
Eliad Peller37a41b42011-09-21 14:06:11 +0300842DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
843 TP_PROTO(struct ieee80211_local *local,
844 struct ieee80211_sub_if_data *sdata),
845 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200846);
847
848TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +0300849 TP_PROTO(struct ieee80211_local *local,
850 struct ieee80211_sub_if_data *sdata,
851 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200852
Eliad Peller37a41b42011-09-21 14:06:11 +0300853 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200854
855 TP_STRUCT__entry(
856 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +0300857 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200858 __field(u64, tsf)
859 ),
860
861 TP_fast_assign(
862 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +0300863 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200864 __entry->tsf = tsf;
865 ),
866
867 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +0300868 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
869 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200870 )
871);
872
Eliad Peller37a41b42011-09-21 14:06:11 +0300873DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
874 TP_PROTO(struct ieee80211_local *local,
875 struct ieee80211_sub_if_data *sdata),
876 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200877);
878
Johannes Bergba99d932011-01-26 09:22:15 +0100879DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200880 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100881 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200882);
883
884TRACE_EVENT(drv_ampdu_action,
885 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100886 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200887 enum ieee80211_ampdu_mlme_action action,
888 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100889 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200890
Johannes Berg0b01f032011-01-18 13:51:05 +0100891 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200892
893 TP_STRUCT__entry(
894 LOCAL_ENTRY
895 STA_ENTRY
896 __field(u32, action)
897 __field(u16, tid)
898 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100899 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100900 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200901 ),
902
903 TP_fast_assign(
904 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100905 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200906 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200907 __entry->action = action;
908 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800909 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100910 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200911 ),
912
913 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100914 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
915 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
916 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200917 )
918);
Johannes Berga80f7c02009-12-23 13:15:32 +0100919
John W. Linvillec466d4e2010-06-29 14:51:23 -0400920TRACE_EVENT(drv_get_survey,
921 TP_PROTO(struct ieee80211_local *local, int idx,
922 struct survey_info *survey),
923
924 TP_ARGS(local, idx, survey),
925
926 TP_STRUCT__entry(
927 LOCAL_ENTRY
928 __field(int, idx)
929 ),
930
931 TP_fast_assign(
932 LOCAL_ASSIGN;
933 __entry->idx = idx;
934 ),
935
936 TP_printk(
937 LOCAL_PR_FMT " idx:%d",
938 LOCAL_PR_ARG, __entry->idx
939 )
940);
941
Johannes Berga80f7c02009-12-23 13:15:32 +0100942TRACE_EVENT(drv_flush,
943 TP_PROTO(struct ieee80211_local *local, bool drop),
944
945 TP_ARGS(local, drop),
946
947 TP_STRUCT__entry(
948 LOCAL_ENTRY
949 __field(bool, drop)
950 ),
951
952 TP_fast_assign(
953 LOCAL_ASSIGN;
954 __entry->drop = drop;
955 ),
956
957 TP_printk(
958 LOCAL_PR_FMT " drop:%d",
959 LOCAL_PR_ARG, __entry->drop
960 )
961);
Johannes Bergb5878a22010-04-07 16:48:40 +0200962
Johannes Berg5ce6e432010-05-11 16:20:57 +0200963TRACE_EVENT(drv_channel_switch,
964 TP_PROTO(struct ieee80211_local *local,
965 struct ieee80211_channel_switch *ch_switch),
966
967 TP_ARGS(local, ch_switch),
968
969 TP_STRUCT__entry(
970 LOCAL_ENTRY
971 __field(u64, timestamp)
972 __field(bool, block_tx)
973 __field(u16, freq)
974 __field(u8, count)
975 ),
976
977 TP_fast_assign(
978 LOCAL_ASSIGN;
979 __entry->timestamp = ch_switch->timestamp;
980 __entry->block_tx = ch_switch->block_tx;
981 __entry->freq = ch_switch->channel->center_freq;
982 __entry->count = ch_switch->count;
983 ),
984
985 TP_printk(
986 LOCAL_PR_FMT " new freq:%u count:%d",
987 LOCAL_PR_ARG, __entry->freq, __entry->count
988 )
989);
990
Bruno Randolf15d96752010-11-10 12:50:56 +0900991TRACE_EVENT(drv_set_antenna,
992 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
993
994 TP_ARGS(local, tx_ant, rx_ant, ret),
995
996 TP_STRUCT__entry(
997 LOCAL_ENTRY
998 __field(u32, tx_ant)
999 __field(u32, rx_ant)
1000 __field(int, ret)
1001 ),
1002
1003 TP_fast_assign(
1004 LOCAL_ASSIGN;
1005 __entry->tx_ant = tx_ant;
1006 __entry->rx_ant = rx_ant;
1007 __entry->ret = ret;
1008 ),
1009
1010 TP_printk(
1011 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1012 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1013 )
1014);
1015
1016TRACE_EVENT(drv_get_antenna,
1017 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1018
1019 TP_ARGS(local, tx_ant, rx_ant, ret),
1020
1021 TP_STRUCT__entry(
1022 LOCAL_ENTRY
1023 __field(u32, tx_ant)
1024 __field(u32, rx_ant)
1025 __field(int, ret)
1026 ),
1027
1028 TP_fast_assign(
1029 LOCAL_ASSIGN;
1030 __entry->tx_ant = tx_ant;
1031 __entry->rx_ant = rx_ant;
1032 __entry->ret = ret;
1033 ),
1034
1035 TP_printk(
1036 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1037 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1038 )
1039);
1040
Johannes Berg21f83582010-12-18 17:20:47 +01001041TRACE_EVENT(drv_remain_on_channel,
Eliad Peller49884562012-11-19 17:05:09 +02001042 TP_PROTO(struct ieee80211_local *local,
1043 struct ieee80211_sub_if_data *sdata,
1044 struct ieee80211_channel *chan,
Johannes Berg42d97a52012-11-08 18:31:02 +01001045 unsigned int duration),
Johannes Berg21f83582010-12-18 17:20:47 +01001046
Johannes Berg42d97a52012-11-08 18:31:02 +01001047 TP_ARGS(local, sdata, chan, duration),
Johannes Berg21f83582010-12-18 17:20:47 +01001048
1049 TP_STRUCT__entry(
1050 LOCAL_ENTRY
Eliad Peller49884562012-11-19 17:05:09 +02001051 VIF_ENTRY
Johannes Berg21f83582010-12-18 17:20:47 +01001052 __field(int, center_freq)
Johannes Berg21f83582010-12-18 17:20:47 +01001053 __field(unsigned int, duration)
1054 ),
1055
1056 TP_fast_assign(
1057 LOCAL_ASSIGN;
Eliad Peller49884562012-11-19 17:05:09 +02001058 VIF_ASSIGN;
Johannes Berg21f83582010-12-18 17:20:47 +01001059 __entry->center_freq = chan->center_freq;
Johannes Berg21f83582010-12-18 17:20:47 +01001060 __entry->duration = duration;
1061 ),
1062
1063 TP_printk(
Eliad Peller49884562012-11-19 17:05:09 +02001064 LOCAL_PR_FMT VIF_PR_FMT " freq:%dMHz duration:%dms",
1065 LOCAL_PR_ARG, VIF_PR_ARG,
1066 __entry->center_freq, __entry->duration
Johannes Berg21f83582010-12-18 17:20:47 +01001067 )
1068);
1069
Johannes Bergba99d932011-01-26 09:22:15 +01001070DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001071 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001072 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001073);
1074
John W. Linville38c09152011-03-07 16:19:18 -05001075TRACE_EVENT(drv_set_ringparam,
1076 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1077
1078 TP_ARGS(local, tx, rx),
1079
1080 TP_STRUCT__entry(
1081 LOCAL_ENTRY
1082 __field(u32, tx)
1083 __field(u32, rx)
1084 ),
1085
1086 TP_fast_assign(
1087 LOCAL_ASSIGN;
1088 __entry->tx = tx;
1089 __entry->rx = rx;
1090 ),
1091
1092 TP_printk(
1093 LOCAL_PR_FMT " tx:%d rx %d",
1094 LOCAL_PR_ARG, __entry->tx, __entry->rx
1095 )
1096);
1097
1098TRACE_EVENT(drv_get_ringparam,
1099 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1100 u32 *rx, u32 *rx_max),
1101
1102 TP_ARGS(local, tx, tx_max, rx, rx_max),
1103
1104 TP_STRUCT__entry(
1105 LOCAL_ENTRY
1106 __field(u32, tx)
1107 __field(u32, tx_max)
1108 __field(u32, rx)
1109 __field(u32, rx_max)
1110 ),
1111
1112 TP_fast_assign(
1113 LOCAL_ASSIGN;
1114 __entry->tx = *tx;
1115 __entry->tx_max = *tx_max;
1116 __entry->rx = *rx;
1117 __entry->rx_max = *rx_max;
1118 ),
1119
1120 TP_printk(
1121 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1122 LOCAL_PR_ARG,
1123 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1124 )
1125);
1126
Vivek Natarajane8306f92011-04-06 11:41:10 +05301127DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1128 TP_PROTO(struct ieee80211_local *local),
1129 TP_ARGS(local)
1130);
1131
Johannes Berg5f16a432011-02-25 15:36:57 +01001132DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1133 TP_PROTO(struct ieee80211_local *local),
1134 TP_ARGS(local)
1135);
1136
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301137TRACE_EVENT(drv_set_bitrate_mask,
1138 TP_PROTO(struct ieee80211_local *local,
1139 struct ieee80211_sub_if_data *sdata,
1140 const struct cfg80211_bitrate_mask *mask),
1141
1142 TP_ARGS(local, sdata, mask),
1143
1144 TP_STRUCT__entry(
1145 LOCAL_ENTRY
1146 VIF_ENTRY
1147 __field(u32, legacy_2g)
1148 __field(u32, legacy_5g)
1149 ),
1150
1151 TP_fast_assign(
1152 LOCAL_ASSIGN;
1153 VIF_ASSIGN;
1154 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1155 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1156 ),
1157
1158 TP_printk(
1159 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1160 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1161 )
1162);
1163
Johannes Bergc68f4b82011-07-05 16:35:41 +02001164TRACE_EVENT(drv_set_rekey_data,
1165 TP_PROTO(struct ieee80211_local *local,
1166 struct ieee80211_sub_if_data *sdata,
1167 struct cfg80211_gtk_rekey_data *data),
1168
1169 TP_ARGS(local, sdata, data),
1170
1171 TP_STRUCT__entry(
1172 LOCAL_ENTRY
1173 VIF_ENTRY
1174 __array(u8, kek, NL80211_KEK_LEN)
1175 __array(u8, kck, NL80211_KCK_LEN)
1176 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1177 ),
1178
1179 TP_fast_assign(
1180 LOCAL_ASSIGN;
1181 VIF_ASSIGN;
1182 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1183 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1184 memcpy(__entry->replay_ctr, data->replay_ctr,
1185 NL80211_REPLAY_CTR_LEN);
1186 ),
1187
1188 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1189 LOCAL_PR_ARG, VIF_PR_ARG)
1190);
1191
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001192TRACE_EVENT(drv_rssi_callback,
1193 TP_PROTO(struct ieee80211_local *local,
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001194 struct ieee80211_sub_if_data *sdata,
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001195 enum ieee80211_rssi_event rssi_event),
1196
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001197 TP_ARGS(local, sdata, rssi_event),
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001198
1199 TP_STRUCT__entry(
1200 LOCAL_ENTRY
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001201 VIF_ENTRY
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001202 __field(u32, rssi_event)
1203 ),
1204
1205 TP_fast_assign(
1206 LOCAL_ASSIGN;
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001207 VIF_ASSIGN;
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001208 __entry->rssi_event = rssi_event;
1209 ),
1210
1211 TP_printk(
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001212 LOCAL_PR_FMT VIF_PR_FMT " rssi_event:%d",
1213 LOCAL_PR_ARG, VIF_PR_ARG, __entry->rssi_event
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001214 )
1215);
1216
Johannes Berg40b96402011-09-29 16:04:38 +02001217DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001218 TP_PROTO(struct ieee80211_local *local,
1219 struct ieee80211_sta *sta,
1220 u16 tids, int num_frames,
1221 enum ieee80211_frame_release_type reason,
1222 bool more_data),
1223
1224 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1225
1226 TP_STRUCT__entry(
1227 LOCAL_ENTRY
1228 STA_ENTRY
1229 __field(u16, tids)
1230 __field(int, num_frames)
1231 __field(int, reason)
1232 __field(bool, more_data)
1233 ),
1234
1235 TP_fast_assign(
1236 LOCAL_ASSIGN;
1237 STA_ASSIGN;
1238 __entry->tids = tids;
1239 __entry->num_frames = num_frames;
1240 __entry->reason = reason;
1241 __entry->more_data = more_data;
1242 ),
1243
1244 TP_printk(
1245 LOCAL_PR_FMT STA_PR_FMT
1246 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1247 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1248 __entry->reason, __entry->more_data
1249 )
1250);
1251
Johannes Berg40b96402011-09-29 16:04:38 +02001252DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1253 TP_PROTO(struct ieee80211_local *local,
1254 struct ieee80211_sta *sta,
1255 u16 tids, int num_frames,
1256 enum ieee80211_frame_release_type reason,
1257 bool more_data),
1258
1259 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1260);
1261
1262DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1263 TP_PROTO(struct ieee80211_local *local,
1264 struct ieee80211_sta *sta,
1265 u16 tids, int num_frames,
1266 enum ieee80211_frame_release_type reason,
1267 bool more_data),
1268
1269 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1270);
1271
Victor Goldenshtein66572cf2012-06-21 10:56:46 +03001272TRACE_EVENT(drv_get_rssi,
1273 TP_PROTO(struct ieee80211_local *local, struct ieee80211_sta *sta,
1274 s8 rssi, int ret),
1275
1276 TP_ARGS(local, sta, rssi, ret),
1277
1278 TP_STRUCT__entry(
1279 LOCAL_ENTRY
1280 STA_ENTRY
1281 __field(s8, rssi)
1282 __field(int, ret)
1283 ),
1284
1285 TP_fast_assign(
1286 LOCAL_ASSIGN;
1287 STA_ASSIGN;
1288 __entry->rssi = rssi;
1289 __entry->ret = ret;
1290 ),
1291
1292 TP_printk(
1293 LOCAL_PR_FMT STA_PR_FMT " rssi:%d ret:%d",
1294 LOCAL_PR_ARG, STA_PR_ARG, __entry->rssi, __entry->ret
1295 )
1296);
1297
Johannes Berga1845fc2012-06-27 13:18:36 +02001298DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
1299 TP_PROTO(struct ieee80211_local *local,
1300 struct ieee80211_sub_if_data *sdata),
1301
1302 TP_ARGS(local, sdata)
1303);
1304
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001305DECLARE_EVENT_CLASS(local_chanctx,
1306 TP_PROTO(struct ieee80211_local *local,
1307 struct ieee80211_chanctx *ctx),
1308
1309 TP_ARGS(local, ctx),
1310
1311 TP_STRUCT__entry(
1312 LOCAL_ENTRY
1313 CHANCTX_ENTRY
1314 ),
1315
1316 TP_fast_assign(
1317 LOCAL_ASSIGN;
1318 CHANCTX_ASSIGN;
1319 ),
1320
1321 TP_printk(
1322 LOCAL_PR_FMT CHANCTX_PR_FMT,
1323 LOCAL_PR_ARG, CHANCTX_PR_ARG
1324 )
1325);
1326
1327DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1328 TP_PROTO(struct ieee80211_local *local,
1329 struct ieee80211_chanctx *ctx),
1330 TP_ARGS(local, ctx)
1331);
1332
1333DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1334 TP_PROTO(struct ieee80211_local *local,
1335 struct ieee80211_chanctx *ctx),
1336 TP_ARGS(local, ctx)
1337);
1338
1339TRACE_EVENT(drv_change_chanctx,
1340 TP_PROTO(struct ieee80211_local *local,
1341 struct ieee80211_chanctx *ctx,
1342 u32 changed),
1343
1344 TP_ARGS(local, ctx, changed),
1345
1346 TP_STRUCT__entry(
1347 LOCAL_ENTRY
1348 CHANCTX_ENTRY
1349 __field(u32, changed)
1350 ),
1351
1352 TP_fast_assign(
1353 LOCAL_ASSIGN;
1354 CHANCTX_ASSIGN;
1355 __entry->changed = changed;
1356 ),
1357
1358 TP_printk(
1359 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1360 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1361 )
1362);
1363
1364DECLARE_EVENT_CLASS(local_sdata_chanctx,
1365 TP_PROTO(struct ieee80211_local *local,
1366 struct ieee80211_sub_if_data *sdata,
1367 struct ieee80211_chanctx *ctx),
1368
1369 TP_ARGS(local, sdata, ctx),
1370
1371 TP_STRUCT__entry(
1372 LOCAL_ENTRY
1373 VIF_ENTRY
1374 CHANCTX_ENTRY
1375 ),
1376
1377 TP_fast_assign(
1378 LOCAL_ASSIGN;
1379 VIF_ASSIGN;
1380 CHANCTX_ASSIGN;
1381 ),
1382
1383 TP_printk(
1384 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
1385 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
1386 )
1387);
1388
1389DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1390 TP_PROTO(struct ieee80211_local *local,
1391 struct ieee80211_sub_if_data *sdata,
1392 struct ieee80211_chanctx *ctx),
1393 TP_ARGS(local, sdata, ctx)
1394);
1395
1396DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1397 TP_PROTO(struct ieee80211_local *local,
1398 struct ieee80211_sub_if_data *sdata,
1399 struct ieee80211_chanctx *ctx),
1400 TP_ARGS(local, sdata, ctx)
1401);
1402
Johannes Berg10416382012-10-19 15:44:42 +02001403TRACE_EVENT(drv_start_ap,
1404 TP_PROTO(struct ieee80211_local *local,
1405 struct ieee80211_sub_if_data *sdata,
1406 struct ieee80211_bss_conf *info),
1407
1408 TP_ARGS(local, sdata, info),
1409
1410 TP_STRUCT__entry(
1411 LOCAL_ENTRY
1412 VIF_ENTRY
1413 __field(u8, dtimper)
1414 __field(u16, bcnint)
1415 __dynamic_array(u8, ssid, info->ssid_len);
1416 __field(bool, hidden_ssid);
1417 ),
1418
1419 TP_fast_assign(
1420 LOCAL_ASSIGN;
1421 VIF_ASSIGN;
1422 __entry->dtimper = info->dtim_period;
1423 __entry->bcnint = info->beacon_int;
1424 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1425 __entry->hidden_ssid = info->hidden_ssid;
1426 ),
1427
1428 TP_printk(
1429 LOCAL_PR_FMT VIF_PR_FMT,
1430 LOCAL_PR_ARG, VIF_PR_ARG
1431 )
1432);
1433
1434DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
1435 TP_PROTO(struct ieee80211_local *local,
1436 struct ieee80211_sub_if_data *sdata),
1437 TP_ARGS(local, sdata)
1438);
1439
Johannes Berg9214ad72012-11-06 19:18:13 +01001440DEFINE_EVENT(local_only_evt, drv_restart_complete,
1441 TP_PROTO(struct ieee80211_local *local),
1442 TP_ARGS(local)
1443);
1444
Johannes Berga65240c2013-01-14 15:14:34 +01001445#if IS_ENABLED(CONFIG_IPV6)
1446DEFINE_EVENT(local_sdata_evt, drv_ipv6_addr_change,
1447 TP_PROTO(struct ieee80211_local *local,
1448 struct ieee80211_sub_if_data *sdata),
1449 TP_ARGS(local, sdata)
1450);
1451#endif
1452
Johannes Bergb5878a22010-04-07 16:48:40 +02001453/*
1454 * Tracing for API calls that drivers call.
1455 */
1456
1457TRACE_EVENT(api_start_tx_ba_session,
1458 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1459
1460 TP_ARGS(sta, tid),
1461
1462 TP_STRUCT__entry(
1463 STA_ENTRY
1464 __field(u16, tid)
1465 ),
1466
1467 TP_fast_assign(
1468 STA_ASSIGN;
1469 __entry->tid = tid;
1470 ),
1471
1472 TP_printk(
1473 STA_PR_FMT " tid:%d",
1474 STA_PR_ARG, __entry->tid
1475 )
1476);
1477
1478TRACE_EVENT(api_start_tx_ba_cb,
1479 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1480
1481 TP_ARGS(sdata, ra, tid),
1482
1483 TP_STRUCT__entry(
1484 VIF_ENTRY
1485 __array(u8, ra, ETH_ALEN)
1486 __field(u16, tid)
1487 ),
1488
1489 TP_fast_assign(
1490 VIF_ASSIGN;
1491 memcpy(__entry->ra, ra, ETH_ALEN);
1492 __entry->tid = tid;
1493 ),
1494
1495 TP_printk(
1496 VIF_PR_FMT " ra:%pM tid:%d",
1497 VIF_PR_ARG, __entry->ra, __entry->tid
1498 )
1499);
1500
1501TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001502 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001503
Johannes Berg6a8579d2010-05-27 14:41:07 +02001504 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001505
1506 TP_STRUCT__entry(
1507 STA_ENTRY
1508 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001509 ),
1510
1511 TP_fast_assign(
1512 STA_ASSIGN;
1513 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001514 ),
1515
1516 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001517 STA_PR_FMT " tid:%d",
1518 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001519 )
1520);
1521
1522TRACE_EVENT(api_stop_tx_ba_cb,
1523 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1524
1525 TP_ARGS(sdata, ra, tid),
1526
1527 TP_STRUCT__entry(
1528 VIF_ENTRY
1529 __array(u8, ra, ETH_ALEN)
1530 __field(u16, tid)
1531 ),
1532
1533 TP_fast_assign(
1534 VIF_ASSIGN;
1535 memcpy(__entry->ra, ra, ETH_ALEN);
1536 __entry->tid = tid;
1537 ),
1538
1539 TP_printk(
1540 VIF_PR_FMT " ra:%pM tid:%d",
1541 VIF_PR_ARG, __entry->ra, __entry->tid
1542 )
1543);
1544
Johannes Bergba99d932011-01-26 09:22:15 +01001545DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001546 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001547 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001548);
1549
1550TRACE_EVENT(api_beacon_loss,
1551 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1552
1553 TP_ARGS(sdata),
1554
1555 TP_STRUCT__entry(
1556 VIF_ENTRY
1557 ),
1558
1559 TP_fast_assign(
1560 VIF_ASSIGN;
1561 ),
1562
1563 TP_printk(
1564 VIF_PR_FMT,
1565 VIF_PR_ARG
1566 )
1567);
1568
1569TRACE_EVENT(api_connection_loss,
1570 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1571
1572 TP_ARGS(sdata),
1573
1574 TP_STRUCT__entry(
1575 VIF_ENTRY
1576 ),
1577
1578 TP_fast_assign(
1579 VIF_ASSIGN;
1580 ),
1581
1582 TP_printk(
1583 VIF_PR_FMT,
1584 VIF_PR_ARG
1585 )
1586);
1587
1588TRACE_EVENT(api_cqm_rssi_notify,
1589 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1590 enum nl80211_cqm_rssi_threshold_event rssi_event),
1591
1592 TP_ARGS(sdata, rssi_event),
1593
1594 TP_STRUCT__entry(
1595 VIF_ENTRY
1596 __field(u32, rssi_event)
1597 ),
1598
1599 TP_fast_assign(
1600 VIF_ASSIGN;
1601 __entry->rssi_event = rssi_event;
1602 ),
1603
1604 TP_printk(
1605 VIF_PR_FMT " event:%d",
1606 VIF_PR_ARG, __entry->rssi_event
1607 )
1608);
1609
1610TRACE_EVENT(api_scan_completed,
1611 TP_PROTO(struct ieee80211_local *local, bool aborted),
1612
1613 TP_ARGS(local, aborted),
1614
1615 TP_STRUCT__entry(
1616 LOCAL_ENTRY
1617 __field(bool, aborted)
1618 ),
1619
1620 TP_fast_assign(
1621 LOCAL_ASSIGN;
1622 __entry->aborted = aborted;
1623 ),
1624
1625 TP_printk(
1626 LOCAL_PR_FMT " aborted:%d",
1627 LOCAL_PR_ARG, __entry->aborted
1628 )
1629);
1630
Luciano Coelho79f460c2011-05-11 17:09:36 +03001631TRACE_EVENT(api_sched_scan_results,
1632 TP_PROTO(struct ieee80211_local *local),
1633
1634 TP_ARGS(local),
1635
1636 TP_STRUCT__entry(
1637 LOCAL_ENTRY
1638 ),
1639
1640 TP_fast_assign(
1641 LOCAL_ASSIGN;
1642 ),
1643
1644 TP_printk(
1645 LOCAL_PR_FMT, LOCAL_PR_ARG
1646 )
1647);
1648
1649TRACE_EVENT(api_sched_scan_stopped,
1650 TP_PROTO(struct ieee80211_local *local),
1651
1652 TP_ARGS(local),
1653
1654 TP_STRUCT__entry(
1655 LOCAL_ENTRY
1656 ),
1657
1658 TP_fast_assign(
1659 LOCAL_ASSIGN;
1660 ),
1661
1662 TP_printk(
1663 LOCAL_PR_FMT, LOCAL_PR_ARG
1664 )
1665);
1666
Johannes Bergb5878a22010-04-07 16:48:40 +02001667TRACE_EVENT(api_sta_block_awake,
1668 TP_PROTO(struct ieee80211_local *local,
1669 struct ieee80211_sta *sta, bool block),
1670
1671 TP_ARGS(local, sta, block),
1672
1673 TP_STRUCT__entry(
1674 LOCAL_ENTRY
1675 STA_ENTRY
1676 __field(bool, block)
1677 ),
1678
1679 TP_fast_assign(
1680 LOCAL_ASSIGN;
1681 STA_ASSIGN;
1682 __entry->block = block;
1683 ),
1684
1685 TP_printk(
1686 LOCAL_PR_FMT STA_PR_FMT " block:%d",
Seth Forshee15ac7c42013-02-15 13:15:48 -06001687 LOCAL_PR_ARG, STA_PR_ARG, __entry->block
Johannes Bergb5878a22010-04-07 16:48:40 +02001688 )
1689);
1690
Johannes Berg5ce6e432010-05-11 16:20:57 +02001691TRACE_EVENT(api_chswitch_done,
1692 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1693
1694 TP_ARGS(sdata, success),
1695
1696 TP_STRUCT__entry(
1697 VIF_ENTRY
1698 __field(bool, success)
1699 ),
1700
1701 TP_fast_assign(
1702 VIF_ASSIGN;
1703 __entry->success = success;
1704 ),
1705
1706 TP_printk(
1707 VIF_PR_FMT " success=%d",
1708 VIF_PR_ARG, __entry->success
1709 )
1710);
1711
Johannes Bergba99d932011-01-26 09:22:15 +01001712DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001713 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001714 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001715);
1716
Johannes Bergba99d932011-01-26 09:22:15 +01001717DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001718 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001719 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001720);
1721
Johannes Bergc68f4b82011-07-05 16:35:41 +02001722TRACE_EVENT(api_gtk_rekey_notify,
1723 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1724 const u8 *bssid, const u8 *replay_ctr),
1725
1726 TP_ARGS(sdata, bssid, replay_ctr),
1727
1728 TP_STRUCT__entry(
1729 VIF_ENTRY
1730 __array(u8, bssid, ETH_ALEN)
1731 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1732 ),
1733
1734 TP_fast_assign(
1735 VIF_ASSIGN;
1736 memcpy(__entry->bssid, bssid, ETH_ALEN);
1737 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1738 ),
1739
1740 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1741);
1742
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001743TRACE_EVENT(api_enable_rssi_reports,
1744 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1745 int rssi_min_thold, int rssi_max_thold),
1746
1747 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1748
1749 TP_STRUCT__entry(
1750 VIF_ENTRY
1751 __field(int, rssi_min_thold)
1752 __field(int, rssi_max_thold)
1753 ),
1754
1755 TP_fast_assign(
1756 VIF_ASSIGN;
1757 __entry->rssi_min_thold = rssi_min_thold;
1758 __entry->rssi_max_thold = rssi_max_thold;
1759 ),
1760
1761 TP_printk(
1762 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
1763 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
1764 )
1765);
1766
Johannes Berg37fbd902011-09-29 16:04:39 +02001767TRACE_EVENT(api_eosp,
1768 TP_PROTO(struct ieee80211_local *local,
1769 struct ieee80211_sta *sta),
1770
1771 TP_ARGS(local, sta),
1772
1773 TP_STRUCT__entry(
1774 LOCAL_ENTRY
1775 STA_ENTRY
1776 ),
1777
1778 TP_fast_assign(
1779 LOCAL_ASSIGN;
1780 STA_ASSIGN;
1781 ),
1782
1783 TP_printk(
1784 LOCAL_PR_FMT STA_PR_FMT,
Seth Forshee15ac7c42013-02-15 13:15:48 -06001785 LOCAL_PR_ARG, STA_PR_ARG
Johannes Berg37fbd902011-09-29 16:04:39 +02001786 )
1787);
1788
Johannes Bergb5878a22010-04-07 16:48:40 +02001789/*
1790 * Tracing for internal functions
1791 * (which may also be called in response to driver calls)
1792 */
1793
1794TRACE_EVENT(wake_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);
1817
1818TRACE_EVENT(stop_queue,
1819 TP_PROTO(struct ieee80211_local *local, u16 queue,
1820 enum queue_stop_reason reason),
1821
1822 TP_ARGS(local, queue, reason),
1823
1824 TP_STRUCT__entry(
1825 LOCAL_ENTRY
1826 __field(u16, queue)
1827 __field(u32, reason)
1828 ),
1829
1830 TP_fast_assign(
1831 LOCAL_ASSIGN;
1832 __entry->queue = queue;
1833 __entry->reason = reason;
1834 ),
1835
1836 TP_printk(
1837 LOCAL_PR_FMT " queue:%d, reason:%d",
1838 LOCAL_PR_ARG, __entry->queue, __entry->reason
1839 )
1840);
Johannes Berg3fae0272012-06-22 13:36:25 +02001841
Yoni Divinskyde5fad82012-05-30 11:36:39 +03001842TRACE_EVENT(drv_set_default_unicast_key,
1843 TP_PROTO(struct ieee80211_local *local,
1844 struct ieee80211_sub_if_data *sdata,
1845 int key_idx),
1846
1847 TP_ARGS(local, sdata, key_idx),
1848
1849 TP_STRUCT__entry(
1850 LOCAL_ENTRY
1851 VIF_ENTRY
1852 __field(int, key_idx)
1853 ),
1854
1855 TP_fast_assign(
1856 LOCAL_ASSIGN;
1857 VIF_ASSIGN;
1858 __entry->key_idx = key_idx;
1859 ),
1860
1861 TP_printk(LOCAL_PR_FMT VIF_PR_FMT " key_idx:%d",
1862 LOCAL_PR_ARG, VIF_PR_ARG, __entry->key_idx)
1863);
1864
Simon Wunderlich164eb022013-02-08 18:16:20 +01001865TRACE_EVENT(api_radar_detected,
1866 TP_PROTO(struct ieee80211_local *local),
1867
1868 TP_ARGS(local),
1869
1870 TP_STRUCT__entry(
1871 LOCAL_ENTRY
1872 ),
1873
1874 TP_fast_assign(
1875 LOCAL_ASSIGN;
1876 ),
1877
1878 TP_printk(
1879 LOCAL_PR_FMT " radar detected",
1880 LOCAL_PR_ARG
1881 )
1882);
1883
Johannes Berg3fae0272012-06-22 13:36:25 +02001884#ifdef CONFIG_MAC80211_MESSAGE_TRACING
1885#undef TRACE_SYSTEM
1886#define TRACE_SYSTEM mac80211_msg
1887
1888#define MAX_MSG_LEN 100
1889
1890DECLARE_EVENT_CLASS(mac80211_msg_event,
1891 TP_PROTO(struct va_format *vaf),
1892
1893 TP_ARGS(vaf),
1894
1895 TP_STRUCT__entry(
1896 __dynamic_array(char, msg, MAX_MSG_LEN)
1897 ),
1898
1899 TP_fast_assign(
1900 WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
1901 MAX_MSG_LEN, vaf->fmt,
1902 *vaf->va) >= MAX_MSG_LEN);
1903 ),
1904
1905 TP_printk("%s", __get_str(msg))
1906);
1907
1908DEFINE_EVENT(mac80211_msg_event, mac80211_info,
1909 TP_PROTO(struct va_format *vaf),
1910 TP_ARGS(vaf)
1911);
1912DEFINE_EVENT(mac80211_msg_event, mac80211_dbg,
1913 TP_PROTO(struct va_format *vaf),
1914 TP_ARGS(vaf)
1915);
1916DEFINE_EVENT(mac80211_msg_event, mac80211_err,
1917 TP_PROTO(struct va_format *vaf),
1918 TP_ARGS(vaf)
1919);
1920#endif
1921
Christian Lamparterf7428802009-07-19 23:21:07 +02001922#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001923
1924#undef TRACE_INCLUDE_PATH
1925#define TRACE_INCLUDE_PATH .
1926#undef TRACE_INCLUDE_FILE
Johannes Berg011ad0e2012-06-22 12:55:52 +02001927#define TRACE_INCLUDE_FILE trace
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001928#include <trace/define_trace.h>