blob: d79e374e129aea226eb13875a29016565db1983b [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)
Janusz Dziedzic67baf662013-03-21 15:47:56 +0100362 __field(u8, p2p_oppps_ctwindow)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200363 ),
364
365 TP_fast_assign(
366 LOCAL_ASSIGN;
367 VIF_ASSIGN;
368 __entry->changed = changed;
369 __entry->aid = info->aid;
370 __entry->assoc = info->assoc;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200371 __entry->ibss_joined = info->ibss_joined;
372 __entry->ibss_creator = info->ibss_creator;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200373 __entry->shortpre = info->use_short_preamble;
374 __entry->cts = info->use_cts_prot;
375 __entry->shortslot = info->use_short_slot;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200376 __entry->enable_beacon = info->enable_beacon;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200377 __entry->dtimper = info->dtim_period;
378 __entry->bcnint = info->beacon_int;
379 __entry->assoc_cap = info->assoc_capability;
Johannes Berg8c358bc2012-05-22 22:13:05 +0200380 __entry->sync_tsf = info->sync_tsf;
381 __entry->sync_device_ts = info->sync_device_ts;
Johannes Bergef429da2013-02-05 17:48:40 +0100382 __entry->sync_dtim_count = info->sync_dtim_count;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200383 __entry->basic_rates = info->basic_rates;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200384 memcpy(__entry->mcast_rate, info->mcast_rate,
385 sizeof(__entry->mcast_rate));
Johannes Bergf911ab82009-11-25 19:07:20 +0100386 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200387 __entry->cqm_rssi_thold = info->cqm_rssi_thold;
388 __entry->cqm_rssi_hyst = info->cqm_rssi_hyst;
Johannes Berg4bf88532012-11-09 11:39:59 +0100389 __entry->channel_width = info->chandef.width;
390 __entry->channel_cfreq1 = info->chandef.center_freq1;
Johannes Berg0f19b412013-01-14 16:39:07 +0100391 __entry->arp_addr_cnt = info->arp_addr_cnt;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200392 memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list,
Johannes Berg0f19b412013-01-14 16:39:07 +0100393 sizeof(u32) * (info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
394 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
395 info->arp_addr_cnt));
Johannes Berg1724ffb2012-10-24 11:38:30 +0200396 __entry->qos = info->qos;
397 __entry->idle = info->idle;
398 __entry->ps = info->ps;
399 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
400 __entry->hidden_ssid = info->hidden_ssid;
Johannes Berg1ea6f9c2012-10-24 10:59:25 +0200401 __entry->txpower = info->txpower;
Janusz Dziedzic67baf662013-03-21 15:47:56 +0100402 __entry->p2p_oppps_ctwindow = info->p2p_noa_attr.oppps_ctwindow;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200403 ),
404
405 TP_printk(
406 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
407 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
408 )
409);
410
Johannes Berg3ac64be2009-08-17 16:16:53 +0200411TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200412 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200413
Johannes Berg4efc76b2010-06-10 10:56:20 +0200414 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200415
416 TP_STRUCT__entry(
417 LOCAL_ENTRY
418 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200419 ),
420
421 TP_fast_assign(
422 LOCAL_ASSIGN;
423 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200424 ),
425
426 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200427 LOCAL_PR_FMT " prepare mc (%d)",
428 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200429 )
430);
431
Alexander Bondar488b3662013-02-11 14:56:29 +0200432TRACE_EVENT(drv_set_multicast_list,
433 TP_PROTO(struct ieee80211_local *local,
434 struct ieee80211_sub_if_data *sdata, int mc_count),
435
436 TP_ARGS(local, sdata, mc_count),
437
438 TP_STRUCT__entry(
439 LOCAL_ENTRY
440 __field(bool, allmulti)
441 __field(int, mc_count)
442 ),
443
444 TP_fast_assign(
445 LOCAL_ASSIGN;
446 __entry->allmulti = sdata->flags & IEEE80211_SDATA_ALLMULTI;
447 __entry->mc_count = mc_count;
448 ),
449
450 TP_printk(
451 LOCAL_PR_FMT " configure mc filter, count=%d, allmulti=%d",
452 LOCAL_PR_ARG, __entry->mc_count, __entry->allmulti
453 )
454);
455
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200456TRACE_EVENT(drv_configure_filter,
457 TP_PROTO(struct ieee80211_local *local,
458 unsigned int changed_flags,
459 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200460 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200461
Johannes Berg3ac64be2009-08-17 16:16:53 +0200462 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200463
464 TP_STRUCT__entry(
465 LOCAL_ENTRY
466 __field(unsigned int, changed)
467 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200468 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200469 ),
470
471 TP_fast_assign(
472 LOCAL_ASSIGN;
473 __entry->changed = changed_flags;
474 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200475 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200476 ),
477
478 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200479 LOCAL_PR_FMT " changed:%#x total:%#x",
480 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200481 )
482);
483
484TRACE_EVENT(drv_set_tim,
485 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200486 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200487
Johannes Berg4efc76b2010-06-10 10:56:20 +0200488 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200489
490 TP_STRUCT__entry(
491 LOCAL_ENTRY
492 STA_ENTRY
493 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200494 ),
495
496 TP_fast_assign(
497 LOCAL_ASSIGN;
498 STA_ASSIGN;
499 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200500 ),
501
502 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200503 LOCAL_PR_FMT STA_PR_FMT " set:%d",
Seth Forshee15ac7c42013-02-15 13:15:48 -0600504 LOCAL_PR_ARG, STA_PR_ARG, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200505 )
506);
507
508TRACE_EVENT(drv_set_key,
509 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100510 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200511 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200512 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200513
Johannes Berg4efc76b2010-06-10 10:56:20 +0200514 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200515
516 TP_STRUCT__entry(
517 LOCAL_ENTRY
518 VIF_ENTRY
519 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200520 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200521 __field(u8, hw_key_idx)
522 __field(u8, flags)
523 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200524 ),
525
526 TP_fast_assign(
527 LOCAL_ASSIGN;
528 VIF_ASSIGN;
529 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200530 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200531 __entry->flags = key->flags;
532 __entry->keyidx = key->keyidx;
533 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200534 ),
535
536 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200537 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
538 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200539 )
540);
541
542TRACE_EVENT(drv_update_tkip_key,
543 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100544 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200545 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100546 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200547
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100548 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200549
550 TP_STRUCT__entry(
551 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100552 VIF_ENTRY
553 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200554 __field(u32, iv32)
555 ),
556
557 TP_fast_assign(
558 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100559 VIF_ASSIGN;
560 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200561 __entry->iv32 = iv32;
562 ),
563
564 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100565 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
566 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200567 )
568);
569
Luciano Coelho79f460c2011-05-11 17:09:36 +0300570DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200571 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300572 struct ieee80211_sub_if_data *sdata),
573 TP_ARGS(local, sdata)
574);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200575
Eliad Pellerb8564392011-06-13 12:47:30 +0300576DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
577 TP_PROTO(struct ieee80211_local *local,
578 struct ieee80211_sub_if_data *sdata),
579 TP_ARGS(local, sdata)
580);
581
Luciano Coelho79f460c2011-05-11 17:09:36 +0300582DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
583 TP_PROTO(struct ieee80211_local *local,
584 struct ieee80211_sub_if_data *sdata),
585 TP_ARGS(local, sdata)
586);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200587
Luciano Coelho79f460c2011-05-11 17:09:36 +0300588DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
589 TP_PROTO(struct ieee80211_local *local,
590 struct ieee80211_sub_if_data *sdata),
591 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200592);
593
Johannes Bergba99d932011-01-26 09:22:15 +0100594DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200595 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100596 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200597);
598
Johannes Bergba99d932011-01-26 09:22:15 +0100599DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200600 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100601 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200602);
603
604TRACE_EVENT(drv_get_stats,
605 TP_PROTO(struct ieee80211_local *local,
606 struct ieee80211_low_level_stats *stats,
607 int ret),
608
609 TP_ARGS(local, stats, ret),
610
611 TP_STRUCT__entry(
612 LOCAL_ENTRY
613 __field(int, ret)
614 __field(unsigned int, ackfail)
615 __field(unsigned int, rtsfail)
616 __field(unsigned int, fcserr)
617 __field(unsigned int, rtssucc)
618 ),
619
620 TP_fast_assign(
621 LOCAL_ASSIGN;
622 __entry->ret = ret;
623 __entry->ackfail = stats->dot11ACKFailureCount;
624 __entry->rtsfail = stats->dot11RTSFailureCount;
625 __entry->fcserr = stats->dot11FCSErrorCount;
626 __entry->rtssucc = stats->dot11RTSSuccessCount;
627 ),
628
629 TP_printk(
630 LOCAL_PR_FMT " ret:%d",
631 LOCAL_PR_ARG, __entry->ret
632 )
633);
634
635TRACE_EVENT(drv_get_tkip_seq,
636 TP_PROTO(struct ieee80211_local *local,
637 u8 hw_key_idx, u32 *iv32, u16 *iv16),
638
639 TP_ARGS(local, hw_key_idx, iv32, iv16),
640
641 TP_STRUCT__entry(
642 LOCAL_ENTRY
643 __field(u8, hw_key_idx)
644 __field(u32, iv32)
645 __field(u16, iv16)
646 ),
647
648 TP_fast_assign(
649 LOCAL_ASSIGN;
650 __entry->hw_key_idx = hw_key_idx;
651 __entry->iv32 = *iv32;
652 __entry->iv16 = *iv16;
653 ),
654
655 TP_printk(
656 LOCAL_PR_FMT, LOCAL_PR_ARG
657 )
658);
659
Luciano Coelho92ddc112011-05-09 14:40:06 +0300660DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200661 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300662 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200663);
664
Luciano Coelho92ddc112011-05-09 14:40:06 +0300665DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200666 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300667 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200668);
669
Lukáš Turek310bc672009-12-21 22:50:48 +0100670TRACE_EVENT(drv_set_coverage_class,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200671 TP_PROTO(struct ieee80211_local *local, u8 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100672
Johannes Berg4efc76b2010-06-10 10:56:20 +0200673 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100674
675 TP_STRUCT__entry(
676 LOCAL_ENTRY
677 __field(u8, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100678 ),
679
680 TP_fast_assign(
681 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100682 __entry->value = value;
683 ),
684
685 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200686 LOCAL_PR_FMT " value:%d",
687 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100688 )
689);
690
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200691TRACE_EVENT(drv_sta_notify,
692 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100693 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200694 enum sta_notify_cmd cmd,
695 struct ieee80211_sta *sta),
696
Johannes Berg12375ef2009-11-25 20:30:31 +0100697 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200698
699 TP_STRUCT__entry(
700 LOCAL_ENTRY
701 VIF_ENTRY
702 STA_ENTRY
703 __field(u32, cmd)
704 ),
705
706 TP_fast_assign(
707 LOCAL_ASSIGN;
708 VIF_ASSIGN;
709 STA_ASSIGN;
710 __entry->cmd = cmd;
711 ),
712
713 TP_printk(
714 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
715 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
716 )
717);
718
Johannes Bergf09603a2012-01-20 13:55:21 +0100719TRACE_EVENT(drv_sta_state,
720 TP_PROTO(struct ieee80211_local *local,
721 struct ieee80211_sub_if_data *sdata,
722 struct ieee80211_sta *sta,
723 enum ieee80211_sta_state old_state,
724 enum ieee80211_sta_state new_state),
725
726 TP_ARGS(local, sdata, sta, old_state, new_state),
727
728 TP_STRUCT__entry(
729 LOCAL_ENTRY
730 VIF_ENTRY
731 STA_ENTRY
732 __field(u32, old_state)
733 __field(u32, new_state)
734 ),
735
736 TP_fast_assign(
737 LOCAL_ASSIGN;
738 VIF_ASSIGN;
739 STA_ASSIGN;
740 __entry->old_state = old_state;
741 __entry->new_state = new_state;
742 ),
743
744 TP_printk(
745 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
746 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
747 __entry->old_state, __entry->new_state
748 )
749);
750
Johannes Berg8f727ef2012-03-30 08:43:32 +0200751TRACE_EVENT(drv_sta_rc_update,
752 TP_PROTO(struct ieee80211_local *local,
753 struct ieee80211_sub_if_data *sdata,
754 struct ieee80211_sta *sta,
755 u32 changed),
756
757 TP_ARGS(local, sdata, sta, changed),
758
759 TP_STRUCT__entry(
760 LOCAL_ENTRY
761 VIF_ENTRY
762 STA_ENTRY
763 __field(u32, changed)
764 ),
765
766 TP_fast_assign(
767 LOCAL_ASSIGN;
768 VIF_ASSIGN;
769 STA_ASSIGN;
770 __entry->changed = changed;
771 ),
772
773 TP_printk(
774 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
775 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
776 )
777);
778
Johannes Berg34e89502010-02-03 13:59:58 +0100779TRACE_EVENT(drv_sta_add,
780 TP_PROTO(struct ieee80211_local *local,
781 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200782 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100783
Johannes Berg4efc76b2010-06-10 10:56:20 +0200784 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100785
786 TP_STRUCT__entry(
787 LOCAL_ENTRY
788 VIF_ENTRY
789 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100790 ),
791
792 TP_fast_assign(
793 LOCAL_ASSIGN;
794 VIF_ASSIGN;
795 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100796 ),
797
798 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200799 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
800 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100801 )
802);
803
804TRACE_EVENT(drv_sta_remove,
805 TP_PROTO(struct ieee80211_local *local,
806 struct ieee80211_sub_if_data *sdata,
807 struct ieee80211_sta *sta),
808
809 TP_ARGS(local, sdata, sta),
810
811 TP_STRUCT__entry(
812 LOCAL_ENTRY
813 VIF_ENTRY
814 STA_ENTRY
815 ),
816
817 TP_fast_assign(
818 LOCAL_ASSIGN;
819 VIF_ASSIGN;
820 STA_ASSIGN;
821 ),
822
823 TP_printk(
824 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
825 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
826 )
827);
828
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200829TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300830 TP_PROTO(struct ieee80211_local *local,
831 struct ieee80211_sub_if_data *sdata,
Johannes Berga3304b02012-03-28 11:04:24 +0200832 u16 ac, const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200833
Johannes Berga3304b02012-03-28 11:04:24 +0200834 TP_ARGS(local, sdata, ac, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200835
836 TP_STRUCT__entry(
837 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300838 VIF_ENTRY
Johannes Berga3304b02012-03-28 11:04:24 +0200839 __field(u16, ac)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200840 __field(u16, txop)
841 __field(u16, cw_min)
842 __field(u16, cw_max)
843 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300844 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200845 ),
846
847 TP_fast_assign(
848 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300849 VIF_ASSIGN;
Johannes Berga3304b02012-03-28 11:04:24 +0200850 __entry->ac = ac;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200851 __entry->txop = params->txop;
852 __entry->cw_max = params->cw_max;
853 __entry->cw_min = params->cw_min;
854 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300855 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200856 ),
857
858 TP_printk(
Johannes Berga3304b02012-03-28 11:04:24 +0200859 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
860 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200861 )
862);
863
Eliad Peller37a41b42011-09-21 14:06:11 +0300864DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
865 TP_PROTO(struct ieee80211_local *local,
866 struct ieee80211_sub_if_data *sdata),
867 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200868);
869
870TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +0300871 TP_PROTO(struct ieee80211_local *local,
872 struct ieee80211_sub_if_data *sdata,
873 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200874
Eliad Peller37a41b42011-09-21 14:06:11 +0300875 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200876
877 TP_STRUCT__entry(
878 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +0300879 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200880 __field(u64, tsf)
881 ),
882
883 TP_fast_assign(
884 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +0300885 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200886 __entry->tsf = tsf;
887 ),
888
889 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +0300890 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
891 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200892 )
893);
894
Eliad Peller37a41b42011-09-21 14:06:11 +0300895DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
896 TP_PROTO(struct ieee80211_local *local,
897 struct ieee80211_sub_if_data *sdata),
898 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200899);
900
Johannes Bergba99d932011-01-26 09:22:15 +0100901DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200902 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100903 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200904);
905
906TRACE_EVENT(drv_ampdu_action,
907 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100908 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200909 enum ieee80211_ampdu_mlme_action action,
910 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100911 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200912
Johannes Berg0b01f032011-01-18 13:51:05 +0100913 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200914
915 TP_STRUCT__entry(
916 LOCAL_ENTRY
917 STA_ENTRY
918 __field(u32, action)
919 __field(u16, tid)
920 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100921 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100922 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200923 ),
924
925 TP_fast_assign(
926 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100927 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200928 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200929 __entry->action = action;
930 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800931 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100932 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200933 ),
934
935 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100936 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
937 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
938 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200939 )
940);
Johannes Berga80f7c02009-12-23 13:15:32 +0100941
John W. Linvillec466d4e2010-06-29 14:51:23 -0400942TRACE_EVENT(drv_get_survey,
943 TP_PROTO(struct ieee80211_local *local, int idx,
944 struct survey_info *survey),
945
946 TP_ARGS(local, idx, survey),
947
948 TP_STRUCT__entry(
949 LOCAL_ENTRY
950 __field(int, idx)
951 ),
952
953 TP_fast_assign(
954 LOCAL_ASSIGN;
955 __entry->idx = idx;
956 ),
957
958 TP_printk(
959 LOCAL_PR_FMT " idx:%d",
960 LOCAL_PR_ARG, __entry->idx
961 )
962);
963
Johannes Berga80f7c02009-12-23 13:15:32 +0100964TRACE_EVENT(drv_flush,
Johannes Berg39ecc012013-02-13 12:11:00 +0100965 TP_PROTO(struct ieee80211_local *local,
966 u32 queues, bool drop),
Johannes Berga80f7c02009-12-23 13:15:32 +0100967
Johannes Berg39ecc012013-02-13 12:11:00 +0100968 TP_ARGS(local, queues, drop),
Johannes Berga80f7c02009-12-23 13:15:32 +0100969
970 TP_STRUCT__entry(
971 LOCAL_ENTRY
972 __field(bool, drop)
Johannes Berg39ecc012013-02-13 12:11:00 +0100973 __field(u32, queues)
Johannes Berga80f7c02009-12-23 13:15:32 +0100974 ),
975
976 TP_fast_assign(
977 LOCAL_ASSIGN;
978 __entry->drop = drop;
Johannes Berg39ecc012013-02-13 12:11:00 +0100979 __entry->queues = queues;
Johannes Berga80f7c02009-12-23 13:15:32 +0100980 ),
981
982 TP_printk(
Johannes Berg39ecc012013-02-13 12:11:00 +0100983 LOCAL_PR_FMT " queues:0x%x drop:%d",
984 LOCAL_PR_ARG, __entry->queues, __entry->drop
Johannes Berga80f7c02009-12-23 13:15:32 +0100985 )
986);
Johannes Bergb5878a22010-04-07 16:48:40 +0200987
Johannes Berg5ce6e432010-05-11 16:20:57 +0200988TRACE_EVENT(drv_channel_switch,
989 TP_PROTO(struct ieee80211_local *local,
990 struct ieee80211_channel_switch *ch_switch),
991
992 TP_ARGS(local, ch_switch),
993
994 TP_STRUCT__entry(
995 LOCAL_ENTRY
996 __field(u64, timestamp)
997 __field(bool, block_tx)
998 __field(u16, freq)
999 __field(u8, count)
1000 ),
1001
1002 TP_fast_assign(
1003 LOCAL_ASSIGN;
1004 __entry->timestamp = ch_switch->timestamp;
1005 __entry->block_tx = ch_switch->block_tx;
1006 __entry->freq = ch_switch->channel->center_freq;
1007 __entry->count = ch_switch->count;
1008 ),
1009
1010 TP_printk(
1011 LOCAL_PR_FMT " new freq:%u count:%d",
1012 LOCAL_PR_ARG, __entry->freq, __entry->count
1013 )
1014);
1015
Bruno Randolf15d96752010-11-10 12:50:56 +09001016TRACE_EVENT(drv_set_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
1041TRACE_EVENT(drv_get_antenna,
1042 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1043
1044 TP_ARGS(local, tx_ant, rx_ant, ret),
1045
1046 TP_STRUCT__entry(
1047 LOCAL_ENTRY
1048 __field(u32, tx_ant)
1049 __field(u32, rx_ant)
1050 __field(int, ret)
1051 ),
1052
1053 TP_fast_assign(
1054 LOCAL_ASSIGN;
1055 __entry->tx_ant = tx_ant;
1056 __entry->rx_ant = rx_ant;
1057 __entry->ret = ret;
1058 ),
1059
1060 TP_printk(
1061 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1062 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1063 )
1064);
1065
Johannes Berg21f83582010-12-18 17:20:47 +01001066TRACE_EVENT(drv_remain_on_channel,
Eliad Peller49884562012-11-19 17:05:09 +02001067 TP_PROTO(struct ieee80211_local *local,
1068 struct ieee80211_sub_if_data *sdata,
1069 struct ieee80211_channel *chan,
Ilan Peerd339d5c2013-02-12 09:34:13 +02001070 unsigned int duration,
1071 enum ieee80211_roc_type type),
Johannes Berg21f83582010-12-18 17:20:47 +01001072
Ilan Peerd339d5c2013-02-12 09:34:13 +02001073 TP_ARGS(local, sdata, chan, duration, type),
Johannes Berg21f83582010-12-18 17:20:47 +01001074
1075 TP_STRUCT__entry(
1076 LOCAL_ENTRY
Eliad Peller49884562012-11-19 17:05:09 +02001077 VIF_ENTRY
Johannes Berg21f83582010-12-18 17:20:47 +01001078 __field(int, center_freq)
Johannes Berg21f83582010-12-18 17:20:47 +01001079 __field(unsigned int, duration)
Ilan Peerd339d5c2013-02-12 09:34:13 +02001080 __field(u32, type)
Johannes Berg21f83582010-12-18 17:20:47 +01001081 ),
1082
1083 TP_fast_assign(
1084 LOCAL_ASSIGN;
Eliad Peller49884562012-11-19 17:05:09 +02001085 VIF_ASSIGN;
Johannes Berg21f83582010-12-18 17:20:47 +01001086 __entry->center_freq = chan->center_freq;
Johannes Berg21f83582010-12-18 17:20:47 +01001087 __entry->duration = duration;
Ilan Peerd339d5c2013-02-12 09:34:13 +02001088 __entry->type = type;
Johannes Berg21f83582010-12-18 17:20:47 +01001089 ),
1090
1091 TP_printk(
Ilan Peerd339d5c2013-02-12 09:34:13 +02001092 LOCAL_PR_FMT VIF_PR_FMT " freq:%dMHz duration:%dms type=%d",
Eliad Peller49884562012-11-19 17:05:09 +02001093 LOCAL_PR_ARG, VIF_PR_ARG,
Ilan Peerd339d5c2013-02-12 09:34:13 +02001094 __entry->center_freq, __entry->duration, __entry->type
Johannes Berg21f83582010-12-18 17:20:47 +01001095 )
1096);
1097
Johannes Bergba99d932011-01-26 09:22:15 +01001098DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001099 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001100 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001101);
1102
John W. Linville38c09152011-03-07 16:19:18 -05001103TRACE_EVENT(drv_set_ringparam,
1104 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1105
1106 TP_ARGS(local, tx, rx),
1107
1108 TP_STRUCT__entry(
1109 LOCAL_ENTRY
1110 __field(u32, tx)
1111 __field(u32, rx)
1112 ),
1113
1114 TP_fast_assign(
1115 LOCAL_ASSIGN;
1116 __entry->tx = tx;
1117 __entry->rx = rx;
1118 ),
1119
1120 TP_printk(
1121 LOCAL_PR_FMT " tx:%d rx %d",
1122 LOCAL_PR_ARG, __entry->tx, __entry->rx
1123 )
1124);
1125
1126TRACE_EVENT(drv_get_ringparam,
1127 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1128 u32 *rx, u32 *rx_max),
1129
1130 TP_ARGS(local, tx, tx_max, rx, rx_max),
1131
1132 TP_STRUCT__entry(
1133 LOCAL_ENTRY
1134 __field(u32, tx)
1135 __field(u32, tx_max)
1136 __field(u32, rx)
1137 __field(u32, rx_max)
1138 ),
1139
1140 TP_fast_assign(
1141 LOCAL_ASSIGN;
1142 __entry->tx = *tx;
1143 __entry->tx_max = *tx_max;
1144 __entry->rx = *rx;
1145 __entry->rx_max = *rx_max;
1146 ),
1147
1148 TP_printk(
1149 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1150 LOCAL_PR_ARG,
1151 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1152 )
1153);
1154
Vivek Natarajane8306f92011-04-06 11:41:10 +05301155DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1156 TP_PROTO(struct ieee80211_local *local),
1157 TP_ARGS(local)
1158);
1159
Johannes Berg5f16a432011-02-25 15:36:57 +01001160DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1161 TP_PROTO(struct ieee80211_local *local),
1162 TP_ARGS(local)
1163);
1164
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301165TRACE_EVENT(drv_set_bitrate_mask,
1166 TP_PROTO(struct ieee80211_local *local,
1167 struct ieee80211_sub_if_data *sdata,
1168 const struct cfg80211_bitrate_mask *mask),
1169
1170 TP_ARGS(local, sdata, mask),
1171
1172 TP_STRUCT__entry(
1173 LOCAL_ENTRY
1174 VIF_ENTRY
1175 __field(u32, legacy_2g)
1176 __field(u32, legacy_5g)
1177 ),
1178
1179 TP_fast_assign(
1180 LOCAL_ASSIGN;
1181 VIF_ASSIGN;
1182 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1183 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1184 ),
1185
1186 TP_printk(
1187 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1188 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1189 )
1190);
1191
Johannes Bergc68f4b82011-07-05 16:35:41 +02001192TRACE_EVENT(drv_set_rekey_data,
1193 TP_PROTO(struct ieee80211_local *local,
1194 struct ieee80211_sub_if_data *sdata,
1195 struct cfg80211_gtk_rekey_data *data),
1196
1197 TP_ARGS(local, sdata, data),
1198
1199 TP_STRUCT__entry(
1200 LOCAL_ENTRY
1201 VIF_ENTRY
1202 __array(u8, kek, NL80211_KEK_LEN)
1203 __array(u8, kck, NL80211_KCK_LEN)
1204 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1205 ),
1206
1207 TP_fast_assign(
1208 LOCAL_ASSIGN;
1209 VIF_ASSIGN;
1210 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1211 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1212 memcpy(__entry->replay_ctr, data->replay_ctr,
1213 NL80211_REPLAY_CTR_LEN);
1214 ),
1215
1216 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1217 LOCAL_PR_ARG, VIF_PR_ARG)
1218);
1219
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001220TRACE_EVENT(drv_rssi_callback,
1221 TP_PROTO(struct ieee80211_local *local,
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001222 struct ieee80211_sub_if_data *sdata,
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001223 enum ieee80211_rssi_event rssi_event),
1224
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001225 TP_ARGS(local, sdata, rssi_event),
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001226
1227 TP_STRUCT__entry(
1228 LOCAL_ENTRY
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001229 VIF_ENTRY
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001230 __field(u32, rssi_event)
1231 ),
1232
1233 TP_fast_assign(
1234 LOCAL_ASSIGN;
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001235 VIF_ASSIGN;
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001236 __entry->rssi_event = rssi_event;
1237 ),
1238
1239 TP_printk(
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001240 LOCAL_PR_FMT VIF_PR_FMT " rssi_event:%d",
1241 LOCAL_PR_ARG, VIF_PR_ARG, __entry->rssi_event
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001242 )
1243);
1244
Johannes Berg40b96402011-09-29 16:04:38 +02001245DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001246 TP_PROTO(struct ieee80211_local *local,
1247 struct ieee80211_sta *sta,
1248 u16 tids, int num_frames,
1249 enum ieee80211_frame_release_type reason,
1250 bool more_data),
1251
1252 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1253
1254 TP_STRUCT__entry(
1255 LOCAL_ENTRY
1256 STA_ENTRY
1257 __field(u16, tids)
1258 __field(int, num_frames)
1259 __field(int, reason)
1260 __field(bool, more_data)
1261 ),
1262
1263 TP_fast_assign(
1264 LOCAL_ASSIGN;
1265 STA_ASSIGN;
1266 __entry->tids = tids;
1267 __entry->num_frames = num_frames;
1268 __entry->reason = reason;
1269 __entry->more_data = more_data;
1270 ),
1271
1272 TP_printk(
1273 LOCAL_PR_FMT STA_PR_FMT
1274 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1275 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1276 __entry->reason, __entry->more_data
1277 )
1278);
1279
Johannes Berg40b96402011-09-29 16:04:38 +02001280DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1281 TP_PROTO(struct ieee80211_local *local,
1282 struct ieee80211_sta *sta,
1283 u16 tids, int num_frames,
1284 enum ieee80211_frame_release_type reason,
1285 bool more_data),
1286
1287 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1288);
1289
1290DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1291 TP_PROTO(struct ieee80211_local *local,
1292 struct ieee80211_sta *sta,
1293 u16 tids, int num_frames,
1294 enum ieee80211_frame_release_type reason,
1295 bool more_data),
1296
1297 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1298);
1299
Victor Goldenshtein66572cf2012-06-21 10:56:46 +03001300TRACE_EVENT(drv_get_rssi,
1301 TP_PROTO(struct ieee80211_local *local, struct ieee80211_sta *sta,
1302 s8 rssi, int ret),
1303
1304 TP_ARGS(local, sta, rssi, ret),
1305
1306 TP_STRUCT__entry(
1307 LOCAL_ENTRY
1308 STA_ENTRY
1309 __field(s8, rssi)
1310 __field(int, ret)
1311 ),
1312
1313 TP_fast_assign(
1314 LOCAL_ASSIGN;
1315 STA_ASSIGN;
1316 __entry->rssi = rssi;
1317 __entry->ret = ret;
1318 ),
1319
1320 TP_printk(
1321 LOCAL_PR_FMT STA_PR_FMT " rssi:%d ret:%d",
1322 LOCAL_PR_ARG, STA_PR_ARG, __entry->rssi, __entry->ret
1323 )
1324);
1325
Johannes Berga1845fc2012-06-27 13:18:36 +02001326DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
1327 TP_PROTO(struct ieee80211_local *local,
1328 struct ieee80211_sub_if_data *sdata),
1329
1330 TP_ARGS(local, sdata)
1331);
1332
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001333DECLARE_EVENT_CLASS(local_chanctx,
1334 TP_PROTO(struct ieee80211_local *local,
1335 struct ieee80211_chanctx *ctx),
1336
1337 TP_ARGS(local, ctx),
1338
1339 TP_STRUCT__entry(
1340 LOCAL_ENTRY
1341 CHANCTX_ENTRY
1342 ),
1343
1344 TP_fast_assign(
1345 LOCAL_ASSIGN;
1346 CHANCTX_ASSIGN;
1347 ),
1348
1349 TP_printk(
1350 LOCAL_PR_FMT CHANCTX_PR_FMT,
1351 LOCAL_PR_ARG, CHANCTX_PR_ARG
1352 )
1353);
1354
1355DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1356 TP_PROTO(struct ieee80211_local *local,
1357 struct ieee80211_chanctx *ctx),
1358 TP_ARGS(local, ctx)
1359);
1360
1361DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1362 TP_PROTO(struct ieee80211_local *local,
1363 struct ieee80211_chanctx *ctx),
1364 TP_ARGS(local, ctx)
1365);
1366
1367TRACE_EVENT(drv_change_chanctx,
1368 TP_PROTO(struct ieee80211_local *local,
1369 struct ieee80211_chanctx *ctx,
1370 u32 changed),
1371
1372 TP_ARGS(local, ctx, changed),
1373
1374 TP_STRUCT__entry(
1375 LOCAL_ENTRY
1376 CHANCTX_ENTRY
1377 __field(u32, changed)
1378 ),
1379
1380 TP_fast_assign(
1381 LOCAL_ASSIGN;
1382 CHANCTX_ASSIGN;
1383 __entry->changed = changed;
1384 ),
1385
1386 TP_printk(
1387 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1388 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1389 )
1390);
1391
1392DECLARE_EVENT_CLASS(local_sdata_chanctx,
1393 TP_PROTO(struct ieee80211_local *local,
1394 struct ieee80211_sub_if_data *sdata,
1395 struct ieee80211_chanctx *ctx),
1396
1397 TP_ARGS(local, sdata, ctx),
1398
1399 TP_STRUCT__entry(
1400 LOCAL_ENTRY
1401 VIF_ENTRY
1402 CHANCTX_ENTRY
1403 ),
1404
1405 TP_fast_assign(
1406 LOCAL_ASSIGN;
1407 VIF_ASSIGN;
1408 CHANCTX_ASSIGN;
1409 ),
1410
1411 TP_printk(
1412 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
1413 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
1414 )
1415);
1416
1417DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1418 TP_PROTO(struct ieee80211_local *local,
1419 struct ieee80211_sub_if_data *sdata,
1420 struct ieee80211_chanctx *ctx),
1421 TP_ARGS(local, sdata, ctx)
1422);
1423
1424DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1425 TP_PROTO(struct ieee80211_local *local,
1426 struct ieee80211_sub_if_data *sdata,
1427 struct ieee80211_chanctx *ctx),
1428 TP_ARGS(local, sdata, ctx)
1429);
1430
Johannes Berg10416382012-10-19 15:44:42 +02001431TRACE_EVENT(drv_start_ap,
1432 TP_PROTO(struct ieee80211_local *local,
1433 struct ieee80211_sub_if_data *sdata,
1434 struct ieee80211_bss_conf *info),
1435
1436 TP_ARGS(local, sdata, info),
1437
1438 TP_STRUCT__entry(
1439 LOCAL_ENTRY
1440 VIF_ENTRY
1441 __field(u8, dtimper)
1442 __field(u16, bcnint)
1443 __dynamic_array(u8, ssid, info->ssid_len);
1444 __field(bool, hidden_ssid);
1445 ),
1446
1447 TP_fast_assign(
1448 LOCAL_ASSIGN;
1449 VIF_ASSIGN;
1450 __entry->dtimper = info->dtim_period;
1451 __entry->bcnint = info->beacon_int;
1452 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1453 __entry->hidden_ssid = info->hidden_ssid;
1454 ),
1455
1456 TP_printk(
1457 LOCAL_PR_FMT VIF_PR_FMT,
1458 LOCAL_PR_ARG, VIF_PR_ARG
1459 )
1460);
1461
1462DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
1463 TP_PROTO(struct ieee80211_local *local,
1464 struct ieee80211_sub_if_data *sdata),
1465 TP_ARGS(local, sdata)
1466);
1467
Johannes Berg9214ad72012-11-06 19:18:13 +01001468DEFINE_EVENT(local_only_evt, drv_restart_complete,
1469 TP_PROTO(struct ieee80211_local *local),
1470 TP_ARGS(local)
1471);
1472
Johannes Berga65240c2013-01-14 15:14:34 +01001473#if IS_ENABLED(CONFIG_IPV6)
1474DEFINE_EVENT(local_sdata_evt, drv_ipv6_addr_change,
1475 TP_PROTO(struct ieee80211_local *local,
1476 struct ieee80211_sub_if_data *sdata),
1477 TP_ARGS(local, sdata)
1478);
1479#endif
1480
Johannes Bergb5878a22010-04-07 16:48:40 +02001481/*
1482 * Tracing for API calls that drivers call.
1483 */
1484
1485TRACE_EVENT(api_start_tx_ba_session,
1486 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1487
1488 TP_ARGS(sta, tid),
1489
1490 TP_STRUCT__entry(
1491 STA_ENTRY
1492 __field(u16, tid)
1493 ),
1494
1495 TP_fast_assign(
1496 STA_ASSIGN;
1497 __entry->tid = tid;
1498 ),
1499
1500 TP_printk(
1501 STA_PR_FMT " tid:%d",
1502 STA_PR_ARG, __entry->tid
1503 )
1504);
1505
1506TRACE_EVENT(api_start_tx_ba_cb,
1507 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1508
1509 TP_ARGS(sdata, ra, tid),
1510
1511 TP_STRUCT__entry(
1512 VIF_ENTRY
1513 __array(u8, ra, ETH_ALEN)
1514 __field(u16, tid)
1515 ),
1516
1517 TP_fast_assign(
1518 VIF_ASSIGN;
1519 memcpy(__entry->ra, ra, ETH_ALEN);
1520 __entry->tid = tid;
1521 ),
1522
1523 TP_printk(
1524 VIF_PR_FMT " ra:%pM tid:%d",
1525 VIF_PR_ARG, __entry->ra, __entry->tid
1526 )
1527);
1528
1529TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001530 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001531
Johannes Berg6a8579d2010-05-27 14:41:07 +02001532 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001533
1534 TP_STRUCT__entry(
1535 STA_ENTRY
1536 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001537 ),
1538
1539 TP_fast_assign(
1540 STA_ASSIGN;
1541 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001542 ),
1543
1544 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001545 STA_PR_FMT " tid:%d",
1546 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001547 )
1548);
1549
1550TRACE_EVENT(api_stop_tx_ba_cb,
1551 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1552
1553 TP_ARGS(sdata, ra, tid),
1554
1555 TP_STRUCT__entry(
1556 VIF_ENTRY
1557 __array(u8, ra, ETH_ALEN)
1558 __field(u16, tid)
1559 ),
1560
1561 TP_fast_assign(
1562 VIF_ASSIGN;
1563 memcpy(__entry->ra, ra, ETH_ALEN);
1564 __entry->tid = tid;
1565 ),
1566
1567 TP_printk(
1568 VIF_PR_FMT " ra:%pM tid:%d",
1569 VIF_PR_ARG, __entry->ra, __entry->tid
1570 )
1571);
1572
Johannes Bergba99d932011-01-26 09:22:15 +01001573DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001574 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001575 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001576);
1577
1578TRACE_EVENT(api_beacon_loss,
1579 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1580
1581 TP_ARGS(sdata),
1582
1583 TP_STRUCT__entry(
1584 VIF_ENTRY
1585 ),
1586
1587 TP_fast_assign(
1588 VIF_ASSIGN;
1589 ),
1590
1591 TP_printk(
1592 VIF_PR_FMT,
1593 VIF_PR_ARG
1594 )
1595);
1596
1597TRACE_EVENT(api_connection_loss,
1598 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1599
1600 TP_ARGS(sdata),
1601
1602 TP_STRUCT__entry(
1603 VIF_ENTRY
1604 ),
1605
1606 TP_fast_assign(
1607 VIF_ASSIGN;
1608 ),
1609
1610 TP_printk(
1611 VIF_PR_FMT,
1612 VIF_PR_ARG
1613 )
1614);
1615
1616TRACE_EVENT(api_cqm_rssi_notify,
1617 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1618 enum nl80211_cqm_rssi_threshold_event rssi_event),
1619
1620 TP_ARGS(sdata, rssi_event),
1621
1622 TP_STRUCT__entry(
1623 VIF_ENTRY
1624 __field(u32, rssi_event)
1625 ),
1626
1627 TP_fast_assign(
1628 VIF_ASSIGN;
1629 __entry->rssi_event = rssi_event;
1630 ),
1631
1632 TP_printk(
1633 VIF_PR_FMT " event:%d",
1634 VIF_PR_ARG, __entry->rssi_event
1635 )
1636);
1637
1638TRACE_EVENT(api_scan_completed,
1639 TP_PROTO(struct ieee80211_local *local, bool aborted),
1640
1641 TP_ARGS(local, aborted),
1642
1643 TP_STRUCT__entry(
1644 LOCAL_ENTRY
1645 __field(bool, aborted)
1646 ),
1647
1648 TP_fast_assign(
1649 LOCAL_ASSIGN;
1650 __entry->aborted = aborted;
1651 ),
1652
1653 TP_printk(
1654 LOCAL_PR_FMT " aborted:%d",
1655 LOCAL_PR_ARG, __entry->aborted
1656 )
1657);
1658
Luciano Coelho79f460c2011-05-11 17:09:36 +03001659TRACE_EVENT(api_sched_scan_results,
1660 TP_PROTO(struct ieee80211_local *local),
1661
1662 TP_ARGS(local),
1663
1664 TP_STRUCT__entry(
1665 LOCAL_ENTRY
1666 ),
1667
1668 TP_fast_assign(
1669 LOCAL_ASSIGN;
1670 ),
1671
1672 TP_printk(
1673 LOCAL_PR_FMT, LOCAL_PR_ARG
1674 )
1675);
1676
1677TRACE_EVENT(api_sched_scan_stopped,
1678 TP_PROTO(struct ieee80211_local *local),
1679
1680 TP_ARGS(local),
1681
1682 TP_STRUCT__entry(
1683 LOCAL_ENTRY
1684 ),
1685
1686 TP_fast_assign(
1687 LOCAL_ASSIGN;
1688 ),
1689
1690 TP_printk(
1691 LOCAL_PR_FMT, LOCAL_PR_ARG
1692 )
1693);
1694
Johannes Bergb5878a22010-04-07 16:48:40 +02001695TRACE_EVENT(api_sta_block_awake,
1696 TP_PROTO(struct ieee80211_local *local,
1697 struct ieee80211_sta *sta, bool block),
1698
1699 TP_ARGS(local, sta, block),
1700
1701 TP_STRUCT__entry(
1702 LOCAL_ENTRY
1703 STA_ENTRY
1704 __field(bool, block)
1705 ),
1706
1707 TP_fast_assign(
1708 LOCAL_ASSIGN;
1709 STA_ASSIGN;
1710 __entry->block = block;
1711 ),
1712
1713 TP_printk(
1714 LOCAL_PR_FMT STA_PR_FMT " block:%d",
Seth Forshee15ac7c42013-02-15 13:15:48 -06001715 LOCAL_PR_ARG, STA_PR_ARG, __entry->block
Johannes Bergb5878a22010-04-07 16:48:40 +02001716 )
1717);
1718
Johannes Berg5ce6e432010-05-11 16:20:57 +02001719TRACE_EVENT(api_chswitch_done,
1720 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1721
1722 TP_ARGS(sdata, success),
1723
1724 TP_STRUCT__entry(
1725 VIF_ENTRY
1726 __field(bool, success)
1727 ),
1728
1729 TP_fast_assign(
1730 VIF_ASSIGN;
1731 __entry->success = success;
1732 ),
1733
1734 TP_printk(
1735 VIF_PR_FMT " success=%d",
1736 VIF_PR_ARG, __entry->success
1737 )
1738);
1739
Johannes Bergba99d932011-01-26 09:22:15 +01001740DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001741 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001742 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001743);
1744
Johannes Bergba99d932011-01-26 09:22:15 +01001745DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001746 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001747 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001748);
1749
Johannes Bergc68f4b82011-07-05 16:35:41 +02001750TRACE_EVENT(api_gtk_rekey_notify,
1751 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1752 const u8 *bssid, const u8 *replay_ctr),
1753
1754 TP_ARGS(sdata, bssid, replay_ctr),
1755
1756 TP_STRUCT__entry(
1757 VIF_ENTRY
1758 __array(u8, bssid, ETH_ALEN)
1759 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1760 ),
1761
1762 TP_fast_assign(
1763 VIF_ASSIGN;
1764 memcpy(__entry->bssid, bssid, ETH_ALEN);
1765 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1766 ),
1767
1768 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1769);
1770
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001771TRACE_EVENT(api_enable_rssi_reports,
1772 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1773 int rssi_min_thold, int rssi_max_thold),
1774
1775 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1776
1777 TP_STRUCT__entry(
1778 VIF_ENTRY
1779 __field(int, rssi_min_thold)
1780 __field(int, rssi_max_thold)
1781 ),
1782
1783 TP_fast_assign(
1784 VIF_ASSIGN;
1785 __entry->rssi_min_thold = rssi_min_thold;
1786 __entry->rssi_max_thold = rssi_max_thold;
1787 ),
1788
1789 TP_printk(
1790 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
1791 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
1792 )
1793);
1794
Johannes Berg37fbd902011-09-29 16:04:39 +02001795TRACE_EVENT(api_eosp,
1796 TP_PROTO(struct ieee80211_local *local,
1797 struct ieee80211_sta *sta),
1798
1799 TP_ARGS(local, sta),
1800
1801 TP_STRUCT__entry(
1802 LOCAL_ENTRY
1803 STA_ENTRY
1804 ),
1805
1806 TP_fast_assign(
1807 LOCAL_ASSIGN;
1808 STA_ASSIGN;
1809 ),
1810
1811 TP_printk(
1812 LOCAL_PR_FMT STA_PR_FMT,
Seth Forshee15ac7c42013-02-15 13:15:48 -06001813 LOCAL_PR_ARG, STA_PR_ARG
Johannes Berg37fbd902011-09-29 16:04:39 +02001814 )
1815);
1816
Johannes Bergb5878a22010-04-07 16:48:40 +02001817/*
1818 * Tracing for internal functions
1819 * (which may also be called in response to driver calls)
1820 */
1821
1822TRACE_EVENT(wake_queue,
1823 TP_PROTO(struct ieee80211_local *local, u16 queue,
1824 enum queue_stop_reason reason),
1825
1826 TP_ARGS(local, queue, reason),
1827
1828 TP_STRUCT__entry(
1829 LOCAL_ENTRY
1830 __field(u16, queue)
1831 __field(u32, reason)
1832 ),
1833
1834 TP_fast_assign(
1835 LOCAL_ASSIGN;
1836 __entry->queue = queue;
1837 __entry->reason = reason;
1838 ),
1839
1840 TP_printk(
1841 LOCAL_PR_FMT " queue:%d, reason:%d",
1842 LOCAL_PR_ARG, __entry->queue, __entry->reason
1843 )
1844);
1845
1846TRACE_EVENT(stop_queue,
1847 TP_PROTO(struct ieee80211_local *local, u16 queue,
1848 enum queue_stop_reason reason),
1849
1850 TP_ARGS(local, queue, reason),
1851
1852 TP_STRUCT__entry(
1853 LOCAL_ENTRY
1854 __field(u16, queue)
1855 __field(u32, reason)
1856 ),
1857
1858 TP_fast_assign(
1859 LOCAL_ASSIGN;
1860 __entry->queue = queue;
1861 __entry->reason = reason;
1862 ),
1863
1864 TP_printk(
1865 LOCAL_PR_FMT " queue:%d, reason:%d",
1866 LOCAL_PR_ARG, __entry->queue, __entry->reason
1867 )
1868);
Johannes Berg3fae0272012-06-22 13:36:25 +02001869
Yoni Divinskyde5fad82012-05-30 11:36:39 +03001870TRACE_EVENT(drv_set_default_unicast_key,
1871 TP_PROTO(struct ieee80211_local *local,
1872 struct ieee80211_sub_if_data *sdata,
1873 int key_idx),
1874
1875 TP_ARGS(local, sdata, key_idx),
1876
1877 TP_STRUCT__entry(
1878 LOCAL_ENTRY
1879 VIF_ENTRY
1880 __field(int, key_idx)
1881 ),
1882
1883 TP_fast_assign(
1884 LOCAL_ASSIGN;
1885 VIF_ASSIGN;
1886 __entry->key_idx = key_idx;
1887 ),
1888
1889 TP_printk(LOCAL_PR_FMT VIF_PR_FMT " key_idx:%d",
1890 LOCAL_PR_ARG, VIF_PR_ARG, __entry->key_idx)
1891);
1892
Simon Wunderlich164eb022013-02-08 18:16:20 +01001893TRACE_EVENT(api_radar_detected,
1894 TP_PROTO(struct ieee80211_local *local),
1895
1896 TP_ARGS(local),
1897
1898 TP_STRUCT__entry(
1899 LOCAL_ENTRY
1900 ),
1901
1902 TP_fast_assign(
1903 LOCAL_ASSIGN;
1904 ),
1905
1906 TP_printk(
1907 LOCAL_PR_FMT " radar detected",
1908 LOCAL_PR_ARG
1909 )
1910);
1911
Johannes Berg3fae0272012-06-22 13:36:25 +02001912#ifdef CONFIG_MAC80211_MESSAGE_TRACING
1913#undef TRACE_SYSTEM
1914#define TRACE_SYSTEM mac80211_msg
1915
1916#define MAX_MSG_LEN 100
1917
1918DECLARE_EVENT_CLASS(mac80211_msg_event,
1919 TP_PROTO(struct va_format *vaf),
1920
1921 TP_ARGS(vaf),
1922
1923 TP_STRUCT__entry(
1924 __dynamic_array(char, msg, MAX_MSG_LEN)
1925 ),
1926
1927 TP_fast_assign(
1928 WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
1929 MAX_MSG_LEN, vaf->fmt,
1930 *vaf->va) >= MAX_MSG_LEN);
1931 ),
1932
1933 TP_printk("%s", __get_str(msg))
1934);
1935
1936DEFINE_EVENT(mac80211_msg_event, mac80211_info,
1937 TP_PROTO(struct va_format *vaf),
1938 TP_ARGS(vaf)
1939);
1940DEFINE_EVENT(mac80211_msg_event, mac80211_dbg,
1941 TP_PROTO(struct va_format *vaf),
1942 TP_ARGS(vaf)
1943);
1944DEFINE_EVENT(mac80211_msg_event, mac80211_err,
1945 TP_PROTO(struct va_format *vaf),
1946 TP_ARGS(vaf)
1947);
1948#endif
1949
Christian Lamparterf7428802009-07-19 23:21:07 +02001950#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001951
1952#undef TRACE_INCLUDE_PATH
1953#define TRACE_INCLUDE_PATH .
1954#undef TRACE_INCLUDE_FILE
Johannes Berg011ad0e2012-06-22 12:55:52 +02001955#define TRACE_INCLUDE_FILE trace
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001956#include <trace/define_trace.h>