blob: d97e4305cf1eef4200cfd5b8e459a441bc27ead4 [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
Alexander Bondar488b3662013-02-11 14:56:29 +0200434TRACE_EVENT(drv_set_multicast_list,
435 TP_PROTO(struct ieee80211_local *local,
436 struct ieee80211_sub_if_data *sdata, int mc_count),
437
438 TP_ARGS(local, sdata, mc_count),
439
440 TP_STRUCT__entry(
441 LOCAL_ENTRY
442 __field(bool, allmulti)
443 __field(int, mc_count)
444 ),
445
446 TP_fast_assign(
447 LOCAL_ASSIGN;
448 __entry->allmulti = sdata->flags & IEEE80211_SDATA_ALLMULTI;
449 __entry->mc_count = mc_count;
450 ),
451
452 TP_printk(
453 LOCAL_PR_FMT " configure mc filter, count=%d, allmulti=%d",
454 LOCAL_PR_ARG, __entry->mc_count, __entry->allmulti
455 )
456);
457
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200458TRACE_EVENT(drv_configure_filter,
459 TP_PROTO(struct ieee80211_local *local,
460 unsigned int changed_flags,
461 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200462 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200463
Johannes Berg3ac64be2009-08-17 16:16:53 +0200464 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200465
466 TP_STRUCT__entry(
467 LOCAL_ENTRY
468 __field(unsigned int, changed)
469 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200470 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200471 ),
472
473 TP_fast_assign(
474 LOCAL_ASSIGN;
475 __entry->changed = changed_flags;
476 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200477 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200478 ),
479
480 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200481 LOCAL_PR_FMT " changed:%#x total:%#x",
482 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200483 )
484);
485
486TRACE_EVENT(drv_set_tim,
487 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200488 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200489
Johannes Berg4efc76b2010-06-10 10:56:20 +0200490 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200491
492 TP_STRUCT__entry(
493 LOCAL_ENTRY
494 STA_ENTRY
495 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200496 ),
497
498 TP_fast_assign(
499 LOCAL_ASSIGN;
500 STA_ASSIGN;
501 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200502 ),
503
504 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200505 LOCAL_PR_FMT STA_PR_FMT " set:%d",
Seth Forshee15ac7c42013-02-15 13:15:48 -0600506 LOCAL_PR_ARG, STA_PR_ARG, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200507 )
508);
509
510TRACE_EVENT(drv_set_key,
511 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100512 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200513 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200514 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200515
Johannes Berg4efc76b2010-06-10 10:56:20 +0200516 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200517
518 TP_STRUCT__entry(
519 LOCAL_ENTRY
520 VIF_ENTRY
521 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200522 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200523 __field(u8, hw_key_idx)
524 __field(u8, flags)
525 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200526 ),
527
528 TP_fast_assign(
529 LOCAL_ASSIGN;
530 VIF_ASSIGN;
531 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200532 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200533 __entry->flags = key->flags;
534 __entry->keyidx = key->keyidx;
535 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200536 ),
537
538 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200539 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
540 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200541 )
542);
543
544TRACE_EVENT(drv_update_tkip_key,
545 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100546 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200547 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100548 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200549
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100550 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200551
552 TP_STRUCT__entry(
553 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100554 VIF_ENTRY
555 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200556 __field(u32, iv32)
557 ),
558
559 TP_fast_assign(
560 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100561 VIF_ASSIGN;
562 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200563 __entry->iv32 = iv32;
564 ),
565
566 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100567 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
568 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200569 )
570);
571
Luciano Coelho79f460c2011-05-11 17:09:36 +0300572DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200573 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300574 struct ieee80211_sub_if_data *sdata),
575 TP_ARGS(local, sdata)
576);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200577
Eliad Pellerb8564392011-06-13 12:47:30 +0300578DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
579 TP_PROTO(struct ieee80211_local *local,
580 struct ieee80211_sub_if_data *sdata),
581 TP_ARGS(local, sdata)
582);
583
Luciano Coelho79f460c2011-05-11 17:09:36 +0300584DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
585 TP_PROTO(struct ieee80211_local *local,
586 struct ieee80211_sub_if_data *sdata),
587 TP_ARGS(local, sdata)
588);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200589
Luciano Coelho79f460c2011-05-11 17:09:36 +0300590DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
591 TP_PROTO(struct ieee80211_local *local,
592 struct ieee80211_sub_if_data *sdata),
593 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200594);
595
Johannes Bergba99d932011-01-26 09:22:15 +0100596DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200597 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100598 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200599);
600
Johannes Bergba99d932011-01-26 09:22:15 +0100601DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200602 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100603 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200604);
605
606TRACE_EVENT(drv_get_stats,
607 TP_PROTO(struct ieee80211_local *local,
608 struct ieee80211_low_level_stats *stats,
609 int ret),
610
611 TP_ARGS(local, stats, ret),
612
613 TP_STRUCT__entry(
614 LOCAL_ENTRY
615 __field(int, ret)
616 __field(unsigned int, ackfail)
617 __field(unsigned int, rtsfail)
618 __field(unsigned int, fcserr)
619 __field(unsigned int, rtssucc)
620 ),
621
622 TP_fast_assign(
623 LOCAL_ASSIGN;
624 __entry->ret = ret;
625 __entry->ackfail = stats->dot11ACKFailureCount;
626 __entry->rtsfail = stats->dot11RTSFailureCount;
627 __entry->fcserr = stats->dot11FCSErrorCount;
628 __entry->rtssucc = stats->dot11RTSSuccessCount;
629 ),
630
631 TP_printk(
632 LOCAL_PR_FMT " ret:%d",
633 LOCAL_PR_ARG, __entry->ret
634 )
635);
636
637TRACE_EVENT(drv_get_tkip_seq,
638 TP_PROTO(struct ieee80211_local *local,
639 u8 hw_key_idx, u32 *iv32, u16 *iv16),
640
641 TP_ARGS(local, hw_key_idx, iv32, iv16),
642
643 TP_STRUCT__entry(
644 LOCAL_ENTRY
645 __field(u8, hw_key_idx)
646 __field(u32, iv32)
647 __field(u16, iv16)
648 ),
649
650 TP_fast_assign(
651 LOCAL_ASSIGN;
652 __entry->hw_key_idx = hw_key_idx;
653 __entry->iv32 = *iv32;
654 __entry->iv16 = *iv16;
655 ),
656
657 TP_printk(
658 LOCAL_PR_FMT, LOCAL_PR_ARG
659 )
660);
661
Luciano Coelho92ddc112011-05-09 14:40:06 +0300662DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200663 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300664 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200665);
666
Luciano Coelho92ddc112011-05-09 14:40:06 +0300667DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200668 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300669 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200670);
671
Lukáš Turek310bc672009-12-21 22:50:48 +0100672TRACE_EVENT(drv_set_coverage_class,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200673 TP_PROTO(struct ieee80211_local *local, u8 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100674
Johannes Berg4efc76b2010-06-10 10:56:20 +0200675 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100676
677 TP_STRUCT__entry(
678 LOCAL_ENTRY
679 __field(u8, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100680 ),
681
682 TP_fast_assign(
683 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100684 __entry->value = value;
685 ),
686
687 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200688 LOCAL_PR_FMT " value:%d",
689 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100690 )
691);
692
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200693TRACE_EVENT(drv_sta_notify,
694 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100695 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200696 enum sta_notify_cmd cmd,
697 struct ieee80211_sta *sta),
698
Johannes Berg12375ef2009-11-25 20:30:31 +0100699 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200700
701 TP_STRUCT__entry(
702 LOCAL_ENTRY
703 VIF_ENTRY
704 STA_ENTRY
705 __field(u32, cmd)
706 ),
707
708 TP_fast_assign(
709 LOCAL_ASSIGN;
710 VIF_ASSIGN;
711 STA_ASSIGN;
712 __entry->cmd = cmd;
713 ),
714
715 TP_printk(
716 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
717 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
718 )
719);
720
Johannes Bergf09603a2012-01-20 13:55:21 +0100721TRACE_EVENT(drv_sta_state,
722 TP_PROTO(struct ieee80211_local *local,
723 struct ieee80211_sub_if_data *sdata,
724 struct ieee80211_sta *sta,
725 enum ieee80211_sta_state old_state,
726 enum ieee80211_sta_state new_state),
727
728 TP_ARGS(local, sdata, sta, old_state, new_state),
729
730 TP_STRUCT__entry(
731 LOCAL_ENTRY
732 VIF_ENTRY
733 STA_ENTRY
734 __field(u32, old_state)
735 __field(u32, new_state)
736 ),
737
738 TP_fast_assign(
739 LOCAL_ASSIGN;
740 VIF_ASSIGN;
741 STA_ASSIGN;
742 __entry->old_state = old_state;
743 __entry->new_state = new_state;
744 ),
745
746 TP_printk(
747 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
748 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
749 __entry->old_state, __entry->new_state
750 )
751);
752
Johannes Berg8f727ef2012-03-30 08:43:32 +0200753TRACE_EVENT(drv_sta_rc_update,
754 TP_PROTO(struct ieee80211_local *local,
755 struct ieee80211_sub_if_data *sdata,
756 struct ieee80211_sta *sta,
757 u32 changed),
758
759 TP_ARGS(local, sdata, sta, changed),
760
761 TP_STRUCT__entry(
762 LOCAL_ENTRY
763 VIF_ENTRY
764 STA_ENTRY
765 __field(u32, changed)
766 ),
767
768 TP_fast_assign(
769 LOCAL_ASSIGN;
770 VIF_ASSIGN;
771 STA_ASSIGN;
772 __entry->changed = changed;
773 ),
774
775 TP_printk(
776 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
777 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
778 )
779);
780
Johannes Berg34e89502010-02-03 13:59:58 +0100781TRACE_EVENT(drv_sta_add,
782 TP_PROTO(struct ieee80211_local *local,
783 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200784 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100785
Johannes Berg4efc76b2010-06-10 10:56:20 +0200786 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100787
788 TP_STRUCT__entry(
789 LOCAL_ENTRY
790 VIF_ENTRY
791 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100792 ),
793
794 TP_fast_assign(
795 LOCAL_ASSIGN;
796 VIF_ASSIGN;
797 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100798 ),
799
800 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200801 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
802 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100803 )
804);
805
806TRACE_EVENT(drv_sta_remove,
807 TP_PROTO(struct ieee80211_local *local,
808 struct ieee80211_sub_if_data *sdata,
809 struct ieee80211_sta *sta),
810
811 TP_ARGS(local, sdata, sta),
812
813 TP_STRUCT__entry(
814 LOCAL_ENTRY
815 VIF_ENTRY
816 STA_ENTRY
817 ),
818
819 TP_fast_assign(
820 LOCAL_ASSIGN;
821 VIF_ASSIGN;
822 STA_ASSIGN;
823 ),
824
825 TP_printk(
826 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
827 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
828 )
829);
830
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200831TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300832 TP_PROTO(struct ieee80211_local *local,
833 struct ieee80211_sub_if_data *sdata,
Johannes Berga3304b02012-03-28 11:04:24 +0200834 u16 ac, const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200835
Johannes Berga3304b02012-03-28 11:04:24 +0200836 TP_ARGS(local, sdata, ac, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200837
838 TP_STRUCT__entry(
839 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300840 VIF_ENTRY
Johannes Berga3304b02012-03-28 11:04:24 +0200841 __field(u16, ac)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200842 __field(u16, txop)
843 __field(u16, cw_min)
844 __field(u16, cw_max)
845 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300846 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200847 ),
848
849 TP_fast_assign(
850 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300851 VIF_ASSIGN;
Johannes Berga3304b02012-03-28 11:04:24 +0200852 __entry->ac = ac;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200853 __entry->txop = params->txop;
854 __entry->cw_max = params->cw_max;
855 __entry->cw_min = params->cw_min;
856 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300857 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200858 ),
859
860 TP_printk(
Johannes Berga3304b02012-03-28 11:04:24 +0200861 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
862 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200863 )
864);
865
Eliad Peller37a41b42011-09-21 14:06:11 +0300866DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
867 TP_PROTO(struct ieee80211_local *local,
868 struct ieee80211_sub_if_data *sdata),
869 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200870);
871
872TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +0300873 TP_PROTO(struct ieee80211_local *local,
874 struct ieee80211_sub_if_data *sdata,
875 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200876
Eliad Peller37a41b42011-09-21 14:06:11 +0300877 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200878
879 TP_STRUCT__entry(
880 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +0300881 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200882 __field(u64, tsf)
883 ),
884
885 TP_fast_assign(
886 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +0300887 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200888 __entry->tsf = tsf;
889 ),
890
891 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +0300892 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
893 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200894 )
895);
896
Eliad Peller37a41b42011-09-21 14:06:11 +0300897DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
898 TP_PROTO(struct ieee80211_local *local,
899 struct ieee80211_sub_if_data *sdata),
900 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200901);
902
Johannes Bergba99d932011-01-26 09:22:15 +0100903DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200904 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100905 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200906);
907
908TRACE_EVENT(drv_ampdu_action,
909 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100910 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200911 enum ieee80211_ampdu_mlme_action action,
912 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100913 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200914
Johannes Berg0b01f032011-01-18 13:51:05 +0100915 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200916
917 TP_STRUCT__entry(
918 LOCAL_ENTRY
919 STA_ENTRY
920 __field(u32, action)
921 __field(u16, tid)
922 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100923 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100924 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200925 ),
926
927 TP_fast_assign(
928 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100929 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200930 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200931 __entry->action = action;
932 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800933 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100934 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200935 ),
936
937 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100938 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
939 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
940 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200941 )
942);
Johannes Berga80f7c02009-12-23 13:15:32 +0100943
John W. Linvillec466d4e2010-06-29 14:51:23 -0400944TRACE_EVENT(drv_get_survey,
945 TP_PROTO(struct ieee80211_local *local, int idx,
946 struct survey_info *survey),
947
948 TP_ARGS(local, idx, survey),
949
950 TP_STRUCT__entry(
951 LOCAL_ENTRY
952 __field(int, idx)
953 ),
954
955 TP_fast_assign(
956 LOCAL_ASSIGN;
957 __entry->idx = idx;
958 ),
959
960 TP_printk(
961 LOCAL_PR_FMT " idx:%d",
962 LOCAL_PR_ARG, __entry->idx
963 )
964);
965
Johannes Berga80f7c02009-12-23 13:15:32 +0100966TRACE_EVENT(drv_flush,
967 TP_PROTO(struct ieee80211_local *local, bool drop),
968
969 TP_ARGS(local, drop),
970
971 TP_STRUCT__entry(
972 LOCAL_ENTRY
973 __field(bool, drop)
974 ),
975
976 TP_fast_assign(
977 LOCAL_ASSIGN;
978 __entry->drop = drop;
979 ),
980
981 TP_printk(
982 LOCAL_PR_FMT " drop:%d",
983 LOCAL_PR_ARG, __entry->drop
984 )
985);
Johannes Bergb5878a22010-04-07 16:48:40 +0200986
Johannes Berg5ce6e432010-05-11 16:20:57 +0200987TRACE_EVENT(drv_channel_switch,
988 TP_PROTO(struct ieee80211_local *local,
989 struct ieee80211_channel_switch *ch_switch),
990
991 TP_ARGS(local, ch_switch),
992
993 TP_STRUCT__entry(
994 LOCAL_ENTRY
995 __field(u64, timestamp)
996 __field(bool, block_tx)
997 __field(u16, freq)
998 __field(u8, count)
999 ),
1000
1001 TP_fast_assign(
1002 LOCAL_ASSIGN;
1003 __entry->timestamp = ch_switch->timestamp;
1004 __entry->block_tx = ch_switch->block_tx;
1005 __entry->freq = ch_switch->channel->center_freq;
1006 __entry->count = ch_switch->count;
1007 ),
1008
1009 TP_printk(
1010 LOCAL_PR_FMT " new freq:%u count:%d",
1011 LOCAL_PR_ARG, __entry->freq, __entry->count
1012 )
1013);
1014
Bruno Randolf15d96752010-11-10 12:50:56 +09001015TRACE_EVENT(drv_set_antenna,
1016 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1017
1018 TP_ARGS(local, tx_ant, rx_ant, ret),
1019
1020 TP_STRUCT__entry(
1021 LOCAL_ENTRY
1022 __field(u32, tx_ant)
1023 __field(u32, rx_ant)
1024 __field(int, ret)
1025 ),
1026
1027 TP_fast_assign(
1028 LOCAL_ASSIGN;
1029 __entry->tx_ant = tx_ant;
1030 __entry->rx_ant = rx_ant;
1031 __entry->ret = ret;
1032 ),
1033
1034 TP_printk(
1035 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1036 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1037 )
1038);
1039
1040TRACE_EVENT(drv_get_antenna,
1041 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1042
1043 TP_ARGS(local, tx_ant, rx_ant, ret),
1044
1045 TP_STRUCT__entry(
1046 LOCAL_ENTRY
1047 __field(u32, tx_ant)
1048 __field(u32, rx_ant)
1049 __field(int, ret)
1050 ),
1051
1052 TP_fast_assign(
1053 LOCAL_ASSIGN;
1054 __entry->tx_ant = tx_ant;
1055 __entry->rx_ant = rx_ant;
1056 __entry->ret = ret;
1057 ),
1058
1059 TP_printk(
1060 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1061 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1062 )
1063);
1064
Johannes Berg21f83582010-12-18 17:20:47 +01001065TRACE_EVENT(drv_remain_on_channel,
Eliad Peller49884562012-11-19 17:05:09 +02001066 TP_PROTO(struct ieee80211_local *local,
1067 struct ieee80211_sub_if_data *sdata,
1068 struct ieee80211_channel *chan,
Ilan Peerd339d5c2013-02-12 09:34:13 +02001069 unsigned int duration,
1070 enum ieee80211_roc_type type),
Johannes Berg21f83582010-12-18 17:20:47 +01001071
Ilan Peerd339d5c2013-02-12 09:34:13 +02001072 TP_ARGS(local, sdata, chan, duration, type),
Johannes Berg21f83582010-12-18 17:20:47 +01001073
1074 TP_STRUCT__entry(
1075 LOCAL_ENTRY
Eliad Peller49884562012-11-19 17:05:09 +02001076 VIF_ENTRY
Johannes Berg21f83582010-12-18 17:20:47 +01001077 __field(int, center_freq)
Johannes Berg21f83582010-12-18 17:20:47 +01001078 __field(unsigned int, duration)
Ilan Peerd339d5c2013-02-12 09:34:13 +02001079 __field(u32, type)
Johannes Berg21f83582010-12-18 17:20:47 +01001080 ),
1081
1082 TP_fast_assign(
1083 LOCAL_ASSIGN;
Eliad Peller49884562012-11-19 17:05:09 +02001084 VIF_ASSIGN;
Johannes Berg21f83582010-12-18 17:20:47 +01001085 __entry->center_freq = chan->center_freq;
Johannes Berg21f83582010-12-18 17:20:47 +01001086 __entry->duration = duration;
Ilan Peerd339d5c2013-02-12 09:34:13 +02001087 __entry->type = type;
Johannes Berg21f83582010-12-18 17:20:47 +01001088 ),
1089
1090 TP_printk(
Ilan Peerd339d5c2013-02-12 09:34:13 +02001091 LOCAL_PR_FMT VIF_PR_FMT " freq:%dMHz duration:%dms type=%d",
Eliad Peller49884562012-11-19 17:05:09 +02001092 LOCAL_PR_ARG, VIF_PR_ARG,
Ilan Peerd339d5c2013-02-12 09:34:13 +02001093 __entry->center_freq, __entry->duration, __entry->type
Johannes Berg21f83582010-12-18 17:20:47 +01001094 )
1095);
1096
Johannes Bergba99d932011-01-26 09:22:15 +01001097DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001098 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001099 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001100);
1101
John W. Linville38c09152011-03-07 16:19:18 -05001102TRACE_EVENT(drv_set_ringparam,
1103 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1104
1105 TP_ARGS(local, tx, rx),
1106
1107 TP_STRUCT__entry(
1108 LOCAL_ENTRY
1109 __field(u32, tx)
1110 __field(u32, rx)
1111 ),
1112
1113 TP_fast_assign(
1114 LOCAL_ASSIGN;
1115 __entry->tx = tx;
1116 __entry->rx = rx;
1117 ),
1118
1119 TP_printk(
1120 LOCAL_PR_FMT " tx:%d rx %d",
1121 LOCAL_PR_ARG, __entry->tx, __entry->rx
1122 )
1123);
1124
1125TRACE_EVENT(drv_get_ringparam,
1126 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1127 u32 *rx, u32 *rx_max),
1128
1129 TP_ARGS(local, tx, tx_max, rx, rx_max),
1130
1131 TP_STRUCT__entry(
1132 LOCAL_ENTRY
1133 __field(u32, tx)
1134 __field(u32, tx_max)
1135 __field(u32, rx)
1136 __field(u32, rx_max)
1137 ),
1138
1139 TP_fast_assign(
1140 LOCAL_ASSIGN;
1141 __entry->tx = *tx;
1142 __entry->tx_max = *tx_max;
1143 __entry->rx = *rx;
1144 __entry->rx_max = *rx_max;
1145 ),
1146
1147 TP_printk(
1148 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1149 LOCAL_PR_ARG,
1150 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1151 )
1152);
1153
Vivek Natarajane8306f92011-04-06 11:41:10 +05301154DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1155 TP_PROTO(struct ieee80211_local *local),
1156 TP_ARGS(local)
1157);
1158
Johannes Berg5f16a432011-02-25 15:36:57 +01001159DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1160 TP_PROTO(struct ieee80211_local *local),
1161 TP_ARGS(local)
1162);
1163
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301164TRACE_EVENT(drv_set_bitrate_mask,
1165 TP_PROTO(struct ieee80211_local *local,
1166 struct ieee80211_sub_if_data *sdata,
1167 const struct cfg80211_bitrate_mask *mask),
1168
1169 TP_ARGS(local, sdata, mask),
1170
1171 TP_STRUCT__entry(
1172 LOCAL_ENTRY
1173 VIF_ENTRY
1174 __field(u32, legacy_2g)
1175 __field(u32, legacy_5g)
1176 ),
1177
1178 TP_fast_assign(
1179 LOCAL_ASSIGN;
1180 VIF_ASSIGN;
1181 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1182 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1183 ),
1184
1185 TP_printk(
1186 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1187 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1188 )
1189);
1190
Johannes Bergc68f4b82011-07-05 16:35:41 +02001191TRACE_EVENT(drv_set_rekey_data,
1192 TP_PROTO(struct ieee80211_local *local,
1193 struct ieee80211_sub_if_data *sdata,
1194 struct cfg80211_gtk_rekey_data *data),
1195
1196 TP_ARGS(local, sdata, data),
1197
1198 TP_STRUCT__entry(
1199 LOCAL_ENTRY
1200 VIF_ENTRY
1201 __array(u8, kek, NL80211_KEK_LEN)
1202 __array(u8, kck, NL80211_KCK_LEN)
1203 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1204 ),
1205
1206 TP_fast_assign(
1207 LOCAL_ASSIGN;
1208 VIF_ASSIGN;
1209 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1210 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1211 memcpy(__entry->replay_ctr, data->replay_ctr,
1212 NL80211_REPLAY_CTR_LEN);
1213 ),
1214
1215 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1216 LOCAL_PR_ARG, VIF_PR_ARG)
1217);
1218
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001219TRACE_EVENT(drv_rssi_callback,
1220 TP_PROTO(struct ieee80211_local *local,
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001221 struct ieee80211_sub_if_data *sdata,
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001222 enum ieee80211_rssi_event rssi_event),
1223
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001224 TP_ARGS(local, sdata, rssi_event),
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001225
1226 TP_STRUCT__entry(
1227 LOCAL_ENTRY
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001228 VIF_ENTRY
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001229 __field(u32, rssi_event)
1230 ),
1231
1232 TP_fast_assign(
1233 LOCAL_ASSIGN;
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001234 VIF_ASSIGN;
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001235 __entry->rssi_event = rssi_event;
1236 ),
1237
1238 TP_printk(
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001239 LOCAL_PR_FMT VIF_PR_FMT " rssi_event:%d",
1240 LOCAL_PR_ARG, VIF_PR_ARG, __entry->rssi_event
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001241 )
1242);
1243
Johannes Berg40b96402011-09-29 16:04:38 +02001244DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001245 TP_PROTO(struct ieee80211_local *local,
1246 struct ieee80211_sta *sta,
1247 u16 tids, int num_frames,
1248 enum ieee80211_frame_release_type reason,
1249 bool more_data),
1250
1251 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1252
1253 TP_STRUCT__entry(
1254 LOCAL_ENTRY
1255 STA_ENTRY
1256 __field(u16, tids)
1257 __field(int, num_frames)
1258 __field(int, reason)
1259 __field(bool, more_data)
1260 ),
1261
1262 TP_fast_assign(
1263 LOCAL_ASSIGN;
1264 STA_ASSIGN;
1265 __entry->tids = tids;
1266 __entry->num_frames = num_frames;
1267 __entry->reason = reason;
1268 __entry->more_data = more_data;
1269 ),
1270
1271 TP_printk(
1272 LOCAL_PR_FMT STA_PR_FMT
1273 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1274 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1275 __entry->reason, __entry->more_data
1276 )
1277);
1278
Johannes Berg40b96402011-09-29 16:04:38 +02001279DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1280 TP_PROTO(struct ieee80211_local *local,
1281 struct ieee80211_sta *sta,
1282 u16 tids, int num_frames,
1283 enum ieee80211_frame_release_type reason,
1284 bool more_data),
1285
1286 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1287);
1288
1289DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1290 TP_PROTO(struct ieee80211_local *local,
1291 struct ieee80211_sta *sta,
1292 u16 tids, int num_frames,
1293 enum ieee80211_frame_release_type reason,
1294 bool more_data),
1295
1296 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1297);
1298
Victor Goldenshtein66572cf2012-06-21 10:56:46 +03001299TRACE_EVENT(drv_get_rssi,
1300 TP_PROTO(struct ieee80211_local *local, struct ieee80211_sta *sta,
1301 s8 rssi, int ret),
1302
1303 TP_ARGS(local, sta, rssi, ret),
1304
1305 TP_STRUCT__entry(
1306 LOCAL_ENTRY
1307 STA_ENTRY
1308 __field(s8, rssi)
1309 __field(int, ret)
1310 ),
1311
1312 TP_fast_assign(
1313 LOCAL_ASSIGN;
1314 STA_ASSIGN;
1315 __entry->rssi = rssi;
1316 __entry->ret = ret;
1317 ),
1318
1319 TP_printk(
1320 LOCAL_PR_FMT STA_PR_FMT " rssi:%d ret:%d",
1321 LOCAL_PR_ARG, STA_PR_ARG, __entry->rssi, __entry->ret
1322 )
1323);
1324
Johannes Berga1845fc2012-06-27 13:18:36 +02001325DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
1326 TP_PROTO(struct ieee80211_local *local,
1327 struct ieee80211_sub_if_data *sdata),
1328
1329 TP_ARGS(local, sdata)
1330);
1331
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001332DECLARE_EVENT_CLASS(local_chanctx,
1333 TP_PROTO(struct ieee80211_local *local,
1334 struct ieee80211_chanctx *ctx),
1335
1336 TP_ARGS(local, ctx),
1337
1338 TP_STRUCT__entry(
1339 LOCAL_ENTRY
1340 CHANCTX_ENTRY
1341 ),
1342
1343 TP_fast_assign(
1344 LOCAL_ASSIGN;
1345 CHANCTX_ASSIGN;
1346 ),
1347
1348 TP_printk(
1349 LOCAL_PR_FMT CHANCTX_PR_FMT,
1350 LOCAL_PR_ARG, CHANCTX_PR_ARG
1351 )
1352);
1353
1354DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1355 TP_PROTO(struct ieee80211_local *local,
1356 struct ieee80211_chanctx *ctx),
1357 TP_ARGS(local, ctx)
1358);
1359
1360DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1361 TP_PROTO(struct ieee80211_local *local,
1362 struct ieee80211_chanctx *ctx),
1363 TP_ARGS(local, ctx)
1364);
1365
1366TRACE_EVENT(drv_change_chanctx,
1367 TP_PROTO(struct ieee80211_local *local,
1368 struct ieee80211_chanctx *ctx,
1369 u32 changed),
1370
1371 TP_ARGS(local, ctx, changed),
1372
1373 TP_STRUCT__entry(
1374 LOCAL_ENTRY
1375 CHANCTX_ENTRY
1376 __field(u32, changed)
1377 ),
1378
1379 TP_fast_assign(
1380 LOCAL_ASSIGN;
1381 CHANCTX_ASSIGN;
1382 __entry->changed = changed;
1383 ),
1384
1385 TP_printk(
1386 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1387 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1388 )
1389);
1390
1391DECLARE_EVENT_CLASS(local_sdata_chanctx,
1392 TP_PROTO(struct ieee80211_local *local,
1393 struct ieee80211_sub_if_data *sdata,
1394 struct ieee80211_chanctx *ctx),
1395
1396 TP_ARGS(local, sdata, ctx),
1397
1398 TP_STRUCT__entry(
1399 LOCAL_ENTRY
1400 VIF_ENTRY
1401 CHANCTX_ENTRY
1402 ),
1403
1404 TP_fast_assign(
1405 LOCAL_ASSIGN;
1406 VIF_ASSIGN;
1407 CHANCTX_ASSIGN;
1408 ),
1409
1410 TP_printk(
1411 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
1412 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
1413 )
1414);
1415
1416DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1417 TP_PROTO(struct ieee80211_local *local,
1418 struct ieee80211_sub_if_data *sdata,
1419 struct ieee80211_chanctx *ctx),
1420 TP_ARGS(local, sdata, ctx)
1421);
1422
1423DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1424 TP_PROTO(struct ieee80211_local *local,
1425 struct ieee80211_sub_if_data *sdata,
1426 struct ieee80211_chanctx *ctx),
1427 TP_ARGS(local, sdata, ctx)
1428);
1429
Johannes Berg10416382012-10-19 15:44:42 +02001430TRACE_EVENT(drv_start_ap,
1431 TP_PROTO(struct ieee80211_local *local,
1432 struct ieee80211_sub_if_data *sdata,
1433 struct ieee80211_bss_conf *info),
1434
1435 TP_ARGS(local, sdata, info),
1436
1437 TP_STRUCT__entry(
1438 LOCAL_ENTRY
1439 VIF_ENTRY
1440 __field(u8, dtimper)
1441 __field(u16, bcnint)
1442 __dynamic_array(u8, ssid, info->ssid_len);
1443 __field(bool, hidden_ssid);
1444 ),
1445
1446 TP_fast_assign(
1447 LOCAL_ASSIGN;
1448 VIF_ASSIGN;
1449 __entry->dtimper = info->dtim_period;
1450 __entry->bcnint = info->beacon_int;
1451 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1452 __entry->hidden_ssid = info->hidden_ssid;
1453 ),
1454
1455 TP_printk(
1456 LOCAL_PR_FMT VIF_PR_FMT,
1457 LOCAL_PR_ARG, VIF_PR_ARG
1458 )
1459);
1460
1461DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
1462 TP_PROTO(struct ieee80211_local *local,
1463 struct ieee80211_sub_if_data *sdata),
1464 TP_ARGS(local, sdata)
1465);
1466
Johannes Berg9214ad72012-11-06 19:18:13 +01001467DEFINE_EVENT(local_only_evt, drv_restart_complete,
1468 TP_PROTO(struct ieee80211_local *local),
1469 TP_ARGS(local)
1470);
1471
Johannes Berga65240c2013-01-14 15:14:34 +01001472#if IS_ENABLED(CONFIG_IPV6)
1473DEFINE_EVENT(local_sdata_evt, drv_ipv6_addr_change,
1474 TP_PROTO(struct ieee80211_local *local,
1475 struct ieee80211_sub_if_data *sdata),
1476 TP_ARGS(local, sdata)
1477);
1478#endif
1479
Johannes Bergb5878a22010-04-07 16:48:40 +02001480/*
1481 * Tracing for API calls that drivers call.
1482 */
1483
1484TRACE_EVENT(api_start_tx_ba_session,
1485 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1486
1487 TP_ARGS(sta, tid),
1488
1489 TP_STRUCT__entry(
1490 STA_ENTRY
1491 __field(u16, tid)
1492 ),
1493
1494 TP_fast_assign(
1495 STA_ASSIGN;
1496 __entry->tid = tid;
1497 ),
1498
1499 TP_printk(
1500 STA_PR_FMT " tid:%d",
1501 STA_PR_ARG, __entry->tid
1502 )
1503);
1504
1505TRACE_EVENT(api_start_tx_ba_cb,
1506 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1507
1508 TP_ARGS(sdata, ra, tid),
1509
1510 TP_STRUCT__entry(
1511 VIF_ENTRY
1512 __array(u8, ra, ETH_ALEN)
1513 __field(u16, tid)
1514 ),
1515
1516 TP_fast_assign(
1517 VIF_ASSIGN;
1518 memcpy(__entry->ra, ra, ETH_ALEN);
1519 __entry->tid = tid;
1520 ),
1521
1522 TP_printk(
1523 VIF_PR_FMT " ra:%pM tid:%d",
1524 VIF_PR_ARG, __entry->ra, __entry->tid
1525 )
1526);
1527
1528TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001529 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001530
Johannes Berg6a8579d2010-05-27 14:41:07 +02001531 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001532
1533 TP_STRUCT__entry(
1534 STA_ENTRY
1535 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001536 ),
1537
1538 TP_fast_assign(
1539 STA_ASSIGN;
1540 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001541 ),
1542
1543 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001544 STA_PR_FMT " tid:%d",
1545 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001546 )
1547);
1548
1549TRACE_EVENT(api_stop_tx_ba_cb,
1550 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1551
1552 TP_ARGS(sdata, ra, tid),
1553
1554 TP_STRUCT__entry(
1555 VIF_ENTRY
1556 __array(u8, ra, ETH_ALEN)
1557 __field(u16, tid)
1558 ),
1559
1560 TP_fast_assign(
1561 VIF_ASSIGN;
1562 memcpy(__entry->ra, ra, ETH_ALEN);
1563 __entry->tid = tid;
1564 ),
1565
1566 TP_printk(
1567 VIF_PR_FMT " ra:%pM tid:%d",
1568 VIF_PR_ARG, __entry->ra, __entry->tid
1569 )
1570);
1571
Johannes Bergba99d932011-01-26 09:22:15 +01001572DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001573 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001574 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001575);
1576
1577TRACE_EVENT(api_beacon_loss,
1578 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1579
1580 TP_ARGS(sdata),
1581
1582 TP_STRUCT__entry(
1583 VIF_ENTRY
1584 ),
1585
1586 TP_fast_assign(
1587 VIF_ASSIGN;
1588 ),
1589
1590 TP_printk(
1591 VIF_PR_FMT,
1592 VIF_PR_ARG
1593 )
1594);
1595
1596TRACE_EVENT(api_connection_loss,
1597 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1598
1599 TP_ARGS(sdata),
1600
1601 TP_STRUCT__entry(
1602 VIF_ENTRY
1603 ),
1604
1605 TP_fast_assign(
1606 VIF_ASSIGN;
1607 ),
1608
1609 TP_printk(
1610 VIF_PR_FMT,
1611 VIF_PR_ARG
1612 )
1613);
1614
1615TRACE_EVENT(api_cqm_rssi_notify,
1616 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1617 enum nl80211_cqm_rssi_threshold_event rssi_event),
1618
1619 TP_ARGS(sdata, rssi_event),
1620
1621 TP_STRUCT__entry(
1622 VIF_ENTRY
1623 __field(u32, rssi_event)
1624 ),
1625
1626 TP_fast_assign(
1627 VIF_ASSIGN;
1628 __entry->rssi_event = rssi_event;
1629 ),
1630
1631 TP_printk(
1632 VIF_PR_FMT " event:%d",
1633 VIF_PR_ARG, __entry->rssi_event
1634 )
1635);
1636
1637TRACE_EVENT(api_scan_completed,
1638 TP_PROTO(struct ieee80211_local *local, bool aborted),
1639
1640 TP_ARGS(local, aborted),
1641
1642 TP_STRUCT__entry(
1643 LOCAL_ENTRY
1644 __field(bool, aborted)
1645 ),
1646
1647 TP_fast_assign(
1648 LOCAL_ASSIGN;
1649 __entry->aborted = aborted;
1650 ),
1651
1652 TP_printk(
1653 LOCAL_PR_FMT " aborted:%d",
1654 LOCAL_PR_ARG, __entry->aborted
1655 )
1656);
1657
Luciano Coelho79f460c2011-05-11 17:09:36 +03001658TRACE_EVENT(api_sched_scan_results,
1659 TP_PROTO(struct ieee80211_local *local),
1660
1661 TP_ARGS(local),
1662
1663 TP_STRUCT__entry(
1664 LOCAL_ENTRY
1665 ),
1666
1667 TP_fast_assign(
1668 LOCAL_ASSIGN;
1669 ),
1670
1671 TP_printk(
1672 LOCAL_PR_FMT, LOCAL_PR_ARG
1673 )
1674);
1675
1676TRACE_EVENT(api_sched_scan_stopped,
1677 TP_PROTO(struct ieee80211_local *local),
1678
1679 TP_ARGS(local),
1680
1681 TP_STRUCT__entry(
1682 LOCAL_ENTRY
1683 ),
1684
1685 TP_fast_assign(
1686 LOCAL_ASSIGN;
1687 ),
1688
1689 TP_printk(
1690 LOCAL_PR_FMT, LOCAL_PR_ARG
1691 )
1692);
1693
Johannes Bergb5878a22010-04-07 16:48:40 +02001694TRACE_EVENT(api_sta_block_awake,
1695 TP_PROTO(struct ieee80211_local *local,
1696 struct ieee80211_sta *sta, bool block),
1697
1698 TP_ARGS(local, sta, block),
1699
1700 TP_STRUCT__entry(
1701 LOCAL_ENTRY
1702 STA_ENTRY
1703 __field(bool, block)
1704 ),
1705
1706 TP_fast_assign(
1707 LOCAL_ASSIGN;
1708 STA_ASSIGN;
1709 __entry->block = block;
1710 ),
1711
1712 TP_printk(
1713 LOCAL_PR_FMT STA_PR_FMT " block:%d",
Seth Forshee15ac7c42013-02-15 13:15:48 -06001714 LOCAL_PR_ARG, STA_PR_ARG, __entry->block
Johannes Bergb5878a22010-04-07 16:48:40 +02001715 )
1716);
1717
Johannes Berg5ce6e432010-05-11 16:20:57 +02001718TRACE_EVENT(api_chswitch_done,
1719 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1720
1721 TP_ARGS(sdata, success),
1722
1723 TP_STRUCT__entry(
1724 VIF_ENTRY
1725 __field(bool, success)
1726 ),
1727
1728 TP_fast_assign(
1729 VIF_ASSIGN;
1730 __entry->success = success;
1731 ),
1732
1733 TP_printk(
1734 VIF_PR_FMT " success=%d",
1735 VIF_PR_ARG, __entry->success
1736 )
1737);
1738
Johannes Bergba99d932011-01-26 09:22:15 +01001739DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001740 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001741 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001742);
1743
Johannes Bergba99d932011-01-26 09:22:15 +01001744DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001745 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001746 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001747);
1748
Johannes Bergc68f4b82011-07-05 16:35:41 +02001749TRACE_EVENT(api_gtk_rekey_notify,
1750 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1751 const u8 *bssid, const u8 *replay_ctr),
1752
1753 TP_ARGS(sdata, bssid, replay_ctr),
1754
1755 TP_STRUCT__entry(
1756 VIF_ENTRY
1757 __array(u8, bssid, ETH_ALEN)
1758 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1759 ),
1760
1761 TP_fast_assign(
1762 VIF_ASSIGN;
1763 memcpy(__entry->bssid, bssid, ETH_ALEN);
1764 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1765 ),
1766
1767 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1768);
1769
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001770TRACE_EVENT(api_enable_rssi_reports,
1771 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1772 int rssi_min_thold, int rssi_max_thold),
1773
1774 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1775
1776 TP_STRUCT__entry(
1777 VIF_ENTRY
1778 __field(int, rssi_min_thold)
1779 __field(int, rssi_max_thold)
1780 ),
1781
1782 TP_fast_assign(
1783 VIF_ASSIGN;
1784 __entry->rssi_min_thold = rssi_min_thold;
1785 __entry->rssi_max_thold = rssi_max_thold;
1786 ),
1787
1788 TP_printk(
1789 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
1790 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
1791 )
1792);
1793
Johannes Berg37fbd902011-09-29 16:04:39 +02001794TRACE_EVENT(api_eosp,
1795 TP_PROTO(struct ieee80211_local *local,
1796 struct ieee80211_sta *sta),
1797
1798 TP_ARGS(local, sta),
1799
1800 TP_STRUCT__entry(
1801 LOCAL_ENTRY
1802 STA_ENTRY
1803 ),
1804
1805 TP_fast_assign(
1806 LOCAL_ASSIGN;
1807 STA_ASSIGN;
1808 ),
1809
1810 TP_printk(
1811 LOCAL_PR_FMT STA_PR_FMT,
Seth Forshee15ac7c42013-02-15 13:15:48 -06001812 LOCAL_PR_ARG, STA_PR_ARG
Johannes Berg37fbd902011-09-29 16:04:39 +02001813 )
1814);
1815
Johannes Bergb5878a22010-04-07 16:48:40 +02001816/*
1817 * Tracing for internal functions
1818 * (which may also be called in response to driver calls)
1819 */
1820
1821TRACE_EVENT(wake_queue,
1822 TP_PROTO(struct ieee80211_local *local, u16 queue,
1823 enum queue_stop_reason reason),
1824
1825 TP_ARGS(local, queue, reason),
1826
1827 TP_STRUCT__entry(
1828 LOCAL_ENTRY
1829 __field(u16, queue)
1830 __field(u32, reason)
1831 ),
1832
1833 TP_fast_assign(
1834 LOCAL_ASSIGN;
1835 __entry->queue = queue;
1836 __entry->reason = reason;
1837 ),
1838
1839 TP_printk(
1840 LOCAL_PR_FMT " queue:%d, reason:%d",
1841 LOCAL_PR_ARG, __entry->queue, __entry->reason
1842 )
1843);
1844
1845TRACE_EVENT(stop_queue,
1846 TP_PROTO(struct ieee80211_local *local, u16 queue,
1847 enum queue_stop_reason reason),
1848
1849 TP_ARGS(local, queue, reason),
1850
1851 TP_STRUCT__entry(
1852 LOCAL_ENTRY
1853 __field(u16, queue)
1854 __field(u32, reason)
1855 ),
1856
1857 TP_fast_assign(
1858 LOCAL_ASSIGN;
1859 __entry->queue = queue;
1860 __entry->reason = reason;
1861 ),
1862
1863 TP_printk(
1864 LOCAL_PR_FMT " queue:%d, reason:%d",
1865 LOCAL_PR_ARG, __entry->queue, __entry->reason
1866 )
1867);
Johannes Berg3fae0272012-06-22 13:36:25 +02001868
Yoni Divinskyde5fad82012-05-30 11:36:39 +03001869TRACE_EVENT(drv_set_default_unicast_key,
1870 TP_PROTO(struct ieee80211_local *local,
1871 struct ieee80211_sub_if_data *sdata,
1872 int key_idx),
1873
1874 TP_ARGS(local, sdata, key_idx),
1875
1876 TP_STRUCT__entry(
1877 LOCAL_ENTRY
1878 VIF_ENTRY
1879 __field(int, key_idx)
1880 ),
1881
1882 TP_fast_assign(
1883 LOCAL_ASSIGN;
1884 VIF_ASSIGN;
1885 __entry->key_idx = key_idx;
1886 ),
1887
1888 TP_printk(LOCAL_PR_FMT VIF_PR_FMT " key_idx:%d",
1889 LOCAL_PR_ARG, VIF_PR_ARG, __entry->key_idx)
1890);
1891
Simon Wunderlich164eb022013-02-08 18:16:20 +01001892TRACE_EVENT(api_radar_detected,
1893 TP_PROTO(struct ieee80211_local *local),
1894
1895 TP_ARGS(local),
1896
1897 TP_STRUCT__entry(
1898 LOCAL_ENTRY
1899 ),
1900
1901 TP_fast_assign(
1902 LOCAL_ASSIGN;
1903 ),
1904
1905 TP_printk(
1906 LOCAL_PR_FMT " radar detected",
1907 LOCAL_PR_ARG
1908 )
1909);
1910
Johannes Berg3fae0272012-06-22 13:36:25 +02001911#ifdef CONFIG_MAC80211_MESSAGE_TRACING
1912#undef TRACE_SYSTEM
1913#define TRACE_SYSTEM mac80211_msg
1914
1915#define MAX_MSG_LEN 100
1916
1917DECLARE_EVENT_CLASS(mac80211_msg_event,
1918 TP_PROTO(struct va_format *vaf),
1919
1920 TP_ARGS(vaf),
1921
1922 TP_STRUCT__entry(
1923 __dynamic_array(char, msg, MAX_MSG_LEN)
1924 ),
1925
1926 TP_fast_assign(
1927 WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
1928 MAX_MSG_LEN, vaf->fmt,
1929 *vaf->va) >= MAX_MSG_LEN);
1930 ),
1931
1932 TP_printk("%s", __get_str(msg))
1933);
1934
1935DEFINE_EVENT(mac80211_msg_event, mac80211_info,
1936 TP_PROTO(struct va_format *vaf),
1937 TP_ARGS(vaf)
1938);
1939DEFINE_EVENT(mac80211_msg_event, mac80211_dbg,
1940 TP_PROTO(struct va_format *vaf),
1941 TP_ARGS(vaf)
1942);
1943DEFINE_EVENT(mac80211_msg_event, mac80211_err,
1944 TP_PROTO(struct va_format *vaf),
1945 TP_ARGS(vaf)
1946);
1947#endif
1948
Christian Lamparterf7428802009-07-19 23:21:07 +02001949#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001950
1951#undef TRACE_INCLUDE_PATH
1952#define TRACE_INCLUDE_PATH .
1953#undef TRACE_INCLUDE_FILE
Johannes Berg011ad0e2012-06-22 12:55:52 +02001954#define TRACE_INCLUDE_FILE trace
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001955#include <trace/define_trace.h>