blob: a6b4442776a0519251b1a7650007343a3541181e [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))
Arik Nemtsov8a4d32f2014-11-09 18:50:20 +020019#define STA_NAMED_ASSIGN(s) memcpy(__entry->sta_addr, (s)->addr, ETH_ALEN)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020020#define STA_PR_FMT " sta:%pM"
21#define STA_PR_ARG __entry->sta_addr
22
Johannes Berg2ca27bc2010-09-16 14:58:23 +020023#define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
24 __field(bool, p2p) \
Eliad Pellerf9ac71b2014-02-26 14:46:35 +020025 __string(vif_name, sdata->name)
Johannes Berg2ca27bc2010-09-16 14:58:23 +020026#define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
27 __entry->p2p = sdata->vif.p2p; \
Eliad Pellerf9ac71b2014-02-26 14:46:35 +020028 __assign_str(vif_name, sdata->name)
Johannes Berg2ca27bc2010-09-16 14:58:23 +020029#define VIF_PR_FMT " vif:%s(%d%s)"
30#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020031
Karl Beldan675a0b02013-03-25 16:26:57 +010032#define CHANDEF_ENTRY __field(u32, control_freq) \
33 __field(u32, chan_width) \
34 __field(u32, center_freq1) \
Johannes Berg5a32aff2012-12-21 12:36:33 +010035 __field(u32, center_freq2)
Arik Nemtsov254d3df2015-10-25 10:59:41 +020036#define CHANDEF_ASSIGN(c) \
37 __entry->control_freq = (c) ? ((c)->chan ? (c)->chan->center_freq : 0) : 0; \
38 __entry->chan_width = (c) ? (c)->width : 0; \
39 __entry->center_freq1 = (c) ? (c)->center_freq1 : 0; \
40 __entry->center_freq2 = (c) ? (c)->center_freq2 : 0;
Johannes Berg5a32aff2012-12-21 12:36:33 +010041#define CHANDEF_PR_FMT " control:%d MHz width:%d center: %d/%d MHz"
Karl Beldan675a0b02013-03-25 16:26:57 +010042#define CHANDEF_PR_ARG __entry->control_freq, __entry->chan_width, \
Johannes Berg5a32aff2012-12-21 12:36:33 +010043 __entry->center_freq1, __entry->center_freq2
44
Eliad Peller21f659b2013-11-11 20:14:01 +020045#define MIN_CHANDEF_ENTRY \
46 __field(u32, min_control_freq) \
47 __field(u32, min_chan_width) \
48 __field(u32, min_center_freq1) \
49 __field(u32, min_center_freq2)
50
51#define MIN_CHANDEF_ASSIGN(c) \
52 __entry->min_control_freq = (c)->chan ? (c)->chan->center_freq : 0; \
53 __entry->min_chan_width = (c)->width; \
54 __entry->min_center_freq1 = (c)->center_freq1; \
55 __entry->min_center_freq2 = (c)->center_freq2;
56#define MIN_CHANDEF_PR_FMT " min_control:%d MHz min_width:%d min_center: %d/%d MHz"
57#define MIN_CHANDEF_PR_ARG __entry->min_control_freq, __entry->min_chan_width, \
58 __entry->min_center_freq1, __entry->min_center_freq2
59
Karl Beldan675a0b02013-03-25 16:26:57 +010060#define CHANCTX_ENTRY CHANDEF_ENTRY \
Eliad Peller21f659b2013-11-11 20:14:01 +020061 MIN_CHANDEF_ENTRY \
Karl Beldan675a0b02013-03-25 16:26:57 +010062 __field(u8, rx_chains_static) \
Johannes Berg04ecd252012-09-11 14:34:12 +020063 __field(u8, rx_chains_dynamic)
Karl Beldan675a0b02013-03-25 16:26:57 +010064#define CHANCTX_ASSIGN CHANDEF_ASSIGN(&ctx->conf.def) \
Eliad Peller21f659b2013-11-11 20:14:01 +020065 MIN_CHANDEF_ASSIGN(&ctx->conf.min_def) \
Karl Beldan675a0b02013-03-25 16:26:57 +010066 __entry->rx_chains_static = ctx->conf.rx_chains_static; \
Johannes Berg04ecd252012-09-11 14:34:12 +020067 __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic
Eliad Peller21f659b2013-11-11 20:14:01 +020068#define CHANCTX_PR_FMT CHANDEF_PR_FMT MIN_CHANDEF_PR_FMT " chains:%d/%d"
69#define CHANCTX_PR_ARG CHANDEF_PR_ARG, MIN_CHANDEF_PR_ARG, \
Johannes Berg04ecd252012-09-11 14:34:12 +020070 __entry->rx_chains_static, __entry->rx_chains_dynamic
Michal Kaziorc3645ea2012-06-26 14:37:17 +020071
Johannes Berg9352c192015-04-20 18:12:41 +020072#define KEY_ENTRY __field(u32, cipher) \
73 __field(u8, hw_key_idx) \
74 __field(u8, flags) \
75 __field(s8, keyidx)
76#define KEY_ASSIGN(k) __entry->cipher = (k)->cipher; \
77 __entry->flags = (k)->flags; \
78 __entry->keyidx = (k)->keyidx; \
79 __entry->hw_key_idx = (k)->hw_key_idx;
80#define KEY_PR_FMT " cipher:0x%x, flags=%#x, keyidx=%d, hw_key_idx=%d"
81#define KEY_PR_ARG __entry->cipher, __entry->flags, __entry->keyidx, __entry->hw_key_idx
82
Michal Kaziorc3645ea2012-06-26 14:37:17 +020083
84
Johannes Bergb5878a22010-04-07 16:48:40 +020085/*
86 * Tracing for driver callbacks.
87 */
88
Johannes Bergba99d932011-01-26 09:22:15 +010089DECLARE_EVENT_CLASS(local_only_evt,
Johannes Berg4efc76b2010-06-10 10:56:20 +020090 TP_PROTO(struct ieee80211_local *local),
91 TP_ARGS(local),
92 TP_STRUCT__entry(
93 LOCAL_ENTRY
94 ),
95 TP_fast_assign(
96 LOCAL_ASSIGN;
97 ),
98 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
99);
100
Luciano Coelho92ddc112011-05-09 14:40:06 +0300101DECLARE_EVENT_CLASS(local_sdata_addr_evt,
102 TP_PROTO(struct ieee80211_local *local,
103 struct ieee80211_sub_if_data *sdata),
104 TP_ARGS(local, sdata),
105
106 TP_STRUCT__entry(
107 LOCAL_ENTRY
108 VIF_ENTRY
Joe Perchesd458cdf2013-10-01 19:04:40 -0700109 __array(char, addr, ETH_ALEN)
Luciano Coelho92ddc112011-05-09 14:40:06 +0300110 ),
111
112 TP_fast_assign(
113 LOCAL_ASSIGN;
114 VIF_ASSIGN;
Joe Perchesd458cdf2013-10-01 19:04:40 -0700115 memcpy(__entry->addr, sdata->vif.addr, ETH_ALEN);
Luciano Coelho92ddc112011-05-09 14:40:06 +0300116 ),
117
118 TP_printk(
119 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
120 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
121 )
122);
123
124DECLARE_EVENT_CLASS(local_u32_evt,
125 TP_PROTO(struct ieee80211_local *local, u32 value),
126 TP_ARGS(local, value),
127
128 TP_STRUCT__entry(
129 LOCAL_ENTRY
130 __field(u32, value)
131 ),
132
133 TP_fast_assign(
134 LOCAL_ASSIGN;
135 __entry->value = value;
136 ),
137
138 TP_printk(
139 LOCAL_PR_FMT " value:%d",
140 LOCAL_PR_ARG, __entry->value
141 )
142);
143
Luciano Coelho79f460c2011-05-11 17:09:36 +0300144DECLARE_EVENT_CLASS(local_sdata_evt,
145 TP_PROTO(struct ieee80211_local *local,
146 struct ieee80211_sub_if_data *sdata),
147 TP_ARGS(local, sdata),
148
149 TP_STRUCT__entry(
150 LOCAL_ENTRY
151 VIF_ENTRY
152 ),
153
154 TP_fast_assign(
155 LOCAL_ASSIGN;
156 VIF_ASSIGN;
157 ),
158
159 TP_printk(
160 LOCAL_PR_FMT VIF_PR_FMT,
161 LOCAL_PR_ARG, VIF_PR_ARG
162 )
163);
164
Johannes Bergba99d932011-01-26 09:22:15 +0100165DEFINE_EVENT(local_only_evt, drv_return_void,
166 TP_PROTO(struct ieee80211_local *local),
167 TP_ARGS(local)
168);
169
Johannes Berg4efc76b2010-06-10 10:56:20 +0200170TRACE_EVENT(drv_return_int,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200171 TP_PROTO(struct ieee80211_local *local, int ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200172 TP_ARGS(local, ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200173 TP_STRUCT__entry(
174 LOCAL_ENTRY
175 __field(int, ret)
176 ),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200177 TP_fast_assign(
178 LOCAL_ASSIGN;
179 __entry->ret = ret;
180 ),
Johannes Berg4efc76b2010-06-10 10:56:20 +0200181 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
182);
183
Vivek Natarajane8306f92011-04-06 11:41:10 +0530184TRACE_EVENT(drv_return_bool,
185 TP_PROTO(struct ieee80211_local *local, bool ret),
186 TP_ARGS(local, ret),
187 TP_STRUCT__entry(
188 LOCAL_ENTRY
189 __field(bool, ret)
190 ),
191 TP_fast_assign(
192 LOCAL_ASSIGN;
193 __entry->ret = ret;
194 ),
195 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
196 "true" : "false")
197);
198
Antonio Quartullicca674d2014-05-19 21:53:20 +0200199TRACE_EVENT(drv_return_u32,
200 TP_PROTO(struct ieee80211_local *local, u32 ret),
201 TP_ARGS(local, ret),
202 TP_STRUCT__entry(
203 LOCAL_ENTRY
204 __field(u32, ret)
205 ),
206 TP_fast_assign(
207 LOCAL_ASSIGN;
208 __entry->ret = ret;
209 ),
210 TP_printk(LOCAL_PR_FMT " - %u", LOCAL_PR_ARG, __entry->ret)
211);
212
Johannes Berg4efc76b2010-06-10 10:56:20 +0200213TRACE_EVENT(drv_return_u64,
214 TP_PROTO(struct ieee80211_local *local, u64 ret),
215 TP_ARGS(local, ret),
216 TP_STRUCT__entry(
217 LOCAL_ENTRY
218 __field(u64, ret)
219 ),
220 TP_fast_assign(
221 LOCAL_ASSIGN;
222 __entry->ret = ret;
223 ),
224 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
225);
226
Johannes Bergba99d932011-01-26 09:22:15 +0100227DEFINE_EVENT(local_only_evt, drv_start,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200228 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100229 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200230);
231
Ben Greeare3521142012-04-23 12:50:31 -0700232DEFINE_EVENT(local_u32_evt, drv_get_et_strings,
233 TP_PROTO(struct ieee80211_local *local, u32 sset),
234 TP_ARGS(local, sset)
235);
236
237DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count,
238 TP_PROTO(struct ieee80211_local *local, u32 sset),
239 TP_ARGS(local, sset)
240);
241
242DEFINE_EVENT(local_only_evt, drv_get_et_stats,
243 TP_PROTO(struct ieee80211_local *local),
244 TP_ARGS(local)
245);
246
Johannes Bergeecc4802011-05-04 15:37:29 +0200247DEFINE_EVENT(local_only_evt, drv_suspend,
248 TP_PROTO(struct ieee80211_local *local),
249 TP_ARGS(local)
250);
251
252DEFINE_EVENT(local_only_evt, drv_resume,
253 TP_PROTO(struct ieee80211_local *local),
254 TP_ARGS(local)
255);
256
Johannes Berg6d525632012-04-04 15:05:25 +0200257TRACE_EVENT(drv_set_wakeup,
258 TP_PROTO(struct ieee80211_local *local, bool enabled),
259 TP_ARGS(local, enabled),
260 TP_STRUCT__entry(
261 LOCAL_ENTRY
262 __field(bool, enabled)
263 ),
264 TP_fast_assign(
265 LOCAL_ASSIGN;
266 __entry->enabled = enabled;
267 ),
268 TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
269);
270
Johannes Bergba99d932011-01-26 09:22:15 +0100271DEFINE_EVENT(local_only_evt, drv_stop,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200272 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100273 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200274);
275
Luciano Coelho92ddc112011-05-09 14:40:06 +0300276DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200277 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200278 struct ieee80211_sub_if_data *sdata),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300279 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200280);
281
Johannes Berg34d4bc42010-08-27 12:35:58 +0200282TRACE_EVENT(drv_change_interface,
283 TP_PROTO(struct ieee80211_local *local,
284 struct ieee80211_sub_if_data *sdata,
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200285 enum nl80211_iftype type, bool p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200286
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200287 TP_ARGS(local, sdata, type, p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200288
289 TP_STRUCT__entry(
290 LOCAL_ENTRY
291 VIF_ENTRY
292 __field(u32, new_type)
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200293 __field(bool, new_p2p)
Johannes Berg34d4bc42010-08-27 12:35:58 +0200294 ),
295
296 TP_fast_assign(
297 LOCAL_ASSIGN;
298 VIF_ASSIGN;
299 __entry->new_type = type;
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200300 __entry->new_p2p = p2p;
Johannes Berg34d4bc42010-08-27 12:35:58 +0200301 ),
302
303 TP_printk(
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200304 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
305 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
306 __entry->new_p2p ? "/p2p" : ""
Johannes Berg34d4bc42010-08-27 12:35:58 +0200307 )
308);
309
Luciano Coelho92ddc112011-05-09 14:40:06 +0300310DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
311 TP_PROTO(struct ieee80211_local *local,
312 struct ieee80211_sub_if_data *sdata),
313 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200314);
315
316TRACE_EVENT(drv_config,
317 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200318 u32 changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200319
Johannes Berg4efc76b2010-06-10 10:56:20 +0200320 TP_ARGS(local, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200321
322 TP_STRUCT__entry(
323 LOCAL_ENTRY
324 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100325 __field(u32, flags)
326 __field(int, power_level)
327 __field(int, dynamic_ps_timeout)
Johannes Bergf911ab82009-11-25 19:07:20 +0100328 __field(u16, listen_interval)
329 __field(u8, long_frame_max_tx_count)
330 __field(u8, short_frame_max_tx_count)
Karl Beldan675a0b02013-03-25 16:26:57 +0100331 CHANDEF_ENTRY
Johannes Berg0f782312009-12-01 13:37:02 +0100332 __field(int, smps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200333 ),
334
335 TP_fast_assign(
336 LOCAL_ASSIGN;
337 __entry->changed = changed;
Johannes Bergf911ab82009-11-25 19:07:20 +0100338 __entry->flags = local->hw.conf.flags;
339 __entry->power_level = local->hw.conf.power_level;
340 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
Johannes Bergf911ab82009-11-25 19:07:20 +0100341 __entry->listen_interval = local->hw.conf.listen_interval;
Johannes Berg3d01be72012-07-26 14:27:39 +0200342 __entry->long_frame_max_tx_count =
343 local->hw.conf.long_frame_max_tx_count;
344 __entry->short_frame_max_tx_count =
345 local->hw.conf.short_frame_max_tx_count;
Karl Beldan675a0b02013-03-25 16:26:57 +0100346 CHANDEF_ASSIGN(&local->hw.conf.chandef)
Johannes Berg0f782312009-12-01 13:37:02 +0100347 __entry->smps = local->hw.conf.smps_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200348 ),
349
350 TP_printk(
Karl Beldan675a0b02013-03-25 16:26:57 +0100351 LOCAL_PR_FMT " ch:%#x" CHANDEF_PR_FMT,
352 LOCAL_PR_ARG, __entry->changed, CHANDEF_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200353 )
354);
355
356TRACE_EVENT(drv_bss_info_changed,
357 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100358 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200359 struct ieee80211_bss_conf *info,
360 u32 changed),
361
Johannes Berg12375ef2009-11-25 20:30:31 +0100362 TP_ARGS(local, sdata, info, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200363
364 TP_STRUCT__entry(
365 LOCAL_ENTRY
366 VIF_ENTRY
Johannes Berg1724ffb2012-10-24 11:38:30 +0200367 __field(u32, changed)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200368 __field(bool, assoc)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200369 __field(bool, ibss_joined)
370 __field(bool, ibss_creator)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200371 __field(u16, aid)
372 __field(bool, cts)
373 __field(bool, shortpre)
374 __field(bool, shortslot)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200375 __field(bool, enable_beacon)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200376 __field(u8, dtimper)
377 __field(u16, bcnint)
378 __field(u16, assoc_cap)
Johannes Berg8c358bc2012-05-22 22:13:05 +0200379 __field(u64, sync_tsf)
380 __field(u32, sync_device_ts)
Johannes Bergef429da2013-02-05 17:48:40 +0100381 __field(u8, sync_dtim_count)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200382 __field(u32, basic_rates)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200383 __array(int, mcast_rate, IEEE80211_NUM_BANDS)
Johannes Bergf911ab82009-11-25 19:07:20 +0100384 __field(u16, ht_operation_mode)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200385 __field(s32, cqm_rssi_thold);
386 __field(s32, cqm_rssi_hyst);
Johannes Berg4bf88532012-11-09 11:39:59 +0100387 __field(u32, channel_width);
388 __field(u32, channel_cfreq1);
Johannes Berg0f19b412013-01-14 16:39:07 +0100389 __dynamic_array(u32, arp_addr_list,
390 info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
391 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
392 info->arp_addr_cnt);
393 __field(int, arp_addr_cnt);
Johannes Berg1724ffb2012-10-24 11:38:30 +0200394 __field(bool, qos);
395 __field(bool, idle);
396 __field(bool, ps);
397 __dynamic_array(u8, ssid, info->ssid_len);
398 __field(bool, hidden_ssid);
Johannes Berg1ea6f9c2012-10-24 10:59:25 +0200399 __field(int, txpower)
Janusz Dziedzic67baf662013-03-21 15:47:56 +0100400 __field(u8, p2p_oppps_ctwindow)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200401 ),
402
403 TP_fast_assign(
404 LOCAL_ASSIGN;
405 VIF_ASSIGN;
406 __entry->changed = changed;
407 __entry->aid = info->aid;
408 __entry->assoc = info->assoc;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200409 __entry->ibss_joined = info->ibss_joined;
410 __entry->ibss_creator = info->ibss_creator;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200411 __entry->shortpre = info->use_short_preamble;
412 __entry->cts = info->use_cts_prot;
413 __entry->shortslot = info->use_short_slot;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200414 __entry->enable_beacon = info->enable_beacon;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200415 __entry->dtimper = info->dtim_period;
416 __entry->bcnint = info->beacon_int;
417 __entry->assoc_cap = info->assoc_capability;
Johannes Berg8c358bc2012-05-22 22:13:05 +0200418 __entry->sync_tsf = info->sync_tsf;
419 __entry->sync_device_ts = info->sync_device_ts;
Johannes Bergef429da2013-02-05 17:48:40 +0100420 __entry->sync_dtim_count = info->sync_dtim_count;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200421 __entry->basic_rates = info->basic_rates;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200422 memcpy(__entry->mcast_rate, info->mcast_rate,
423 sizeof(__entry->mcast_rate));
Johannes Bergf911ab82009-11-25 19:07:20 +0100424 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200425 __entry->cqm_rssi_thold = info->cqm_rssi_thold;
426 __entry->cqm_rssi_hyst = info->cqm_rssi_hyst;
Johannes Berg4bf88532012-11-09 11:39:59 +0100427 __entry->channel_width = info->chandef.width;
428 __entry->channel_cfreq1 = info->chandef.center_freq1;
Johannes Berg0f19b412013-01-14 16:39:07 +0100429 __entry->arp_addr_cnt = info->arp_addr_cnt;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200430 memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list,
Johannes Berg0f19b412013-01-14 16:39:07 +0100431 sizeof(u32) * (info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
432 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
433 info->arp_addr_cnt));
Johannes Berg1724ffb2012-10-24 11:38:30 +0200434 __entry->qos = info->qos;
435 __entry->idle = info->idle;
436 __entry->ps = info->ps;
437 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
438 __entry->hidden_ssid = info->hidden_ssid;
Johannes Berg1ea6f9c2012-10-24 10:59:25 +0200439 __entry->txpower = info->txpower;
Janusz Dziedzic67baf662013-03-21 15:47:56 +0100440 __entry->p2p_oppps_ctwindow = info->p2p_noa_attr.oppps_ctwindow;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200441 ),
442
443 TP_printk(
444 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
445 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
446 )
447);
448
Johannes Berg3ac64be2009-08-17 16:16:53 +0200449TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200450 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200451
Johannes Berg4efc76b2010-06-10 10:56:20 +0200452 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200453
454 TP_STRUCT__entry(
455 LOCAL_ENTRY
456 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200457 ),
458
459 TP_fast_assign(
460 LOCAL_ASSIGN;
461 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200462 ),
463
464 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200465 LOCAL_PR_FMT " prepare mc (%d)",
466 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200467 )
468);
469
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200470TRACE_EVENT(drv_configure_filter,
471 TP_PROTO(struct ieee80211_local *local,
472 unsigned int changed_flags,
473 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200474 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200475
Johannes Berg3ac64be2009-08-17 16:16:53 +0200476 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200477
478 TP_STRUCT__entry(
479 LOCAL_ENTRY
480 __field(unsigned int, changed)
481 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200482 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200483 ),
484
485 TP_fast_assign(
486 LOCAL_ASSIGN;
487 __entry->changed = changed_flags;
488 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200489 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200490 ),
491
492 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200493 LOCAL_PR_FMT " changed:%#x total:%#x",
494 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200495 )
496);
497
Andrei Otcheretianski1b09b552015-08-15 22:39:50 +0300498TRACE_EVENT(drv_config_iface_filter,
499 TP_PROTO(struct ieee80211_local *local,
500 struct ieee80211_sub_if_data *sdata,
501 unsigned int filter_flags,
502 unsigned int changed_flags),
503
504 TP_ARGS(local, sdata, filter_flags, changed_flags),
505
506 TP_STRUCT__entry(
507 LOCAL_ENTRY
508 VIF_ENTRY
509 __field(unsigned int, filter_flags)
510 __field(unsigned int, changed_flags)
511 ),
512
513 TP_fast_assign(
514 LOCAL_ASSIGN;
515 VIF_ASSIGN;
516 __entry->filter_flags = filter_flags;
517 __entry->changed_flags = changed_flags;
518 ),
519
520 TP_printk(
521 LOCAL_PR_FMT VIF_PR_FMT
522 " filter_flags: %#x changed_flags: %#x",
523 LOCAL_PR_ARG, VIF_PR_ARG, __entry->filter_flags,
524 __entry->changed_flags
525 )
526);
527
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200528TRACE_EVENT(drv_set_tim,
529 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200530 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200531
Johannes Berg4efc76b2010-06-10 10:56:20 +0200532 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200533
534 TP_STRUCT__entry(
535 LOCAL_ENTRY
536 STA_ENTRY
537 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200538 ),
539
540 TP_fast_assign(
541 LOCAL_ASSIGN;
542 STA_ASSIGN;
543 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200544 ),
545
546 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200547 LOCAL_PR_FMT STA_PR_FMT " set:%d",
Seth Forshee15ac7c42013-02-15 13:15:48 -0600548 LOCAL_PR_ARG, STA_PR_ARG, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200549 )
550);
551
552TRACE_EVENT(drv_set_key,
553 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100554 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200555 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200556 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200557
Johannes Berg4efc76b2010-06-10 10:56:20 +0200558 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200559
560 TP_STRUCT__entry(
561 LOCAL_ENTRY
562 VIF_ENTRY
563 STA_ENTRY
Johannes Berg9352c192015-04-20 18:12:41 +0200564 KEY_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200565 ),
566
567 TP_fast_assign(
568 LOCAL_ASSIGN;
569 VIF_ASSIGN;
570 STA_ASSIGN;
Johannes Berg9352c192015-04-20 18:12:41 +0200571 KEY_ASSIGN(key);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200572 ),
573
574 TP_printk(
Johannes Berg9352c192015-04-20 18:12:41 +0200575 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT KEY_PR_FMT,
576 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, KEY_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200577 )
578);
579
580TRACE_EVENT(drv_update_tkip_key,
581 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100582 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200583 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100584 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200585
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100586 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200587
588 TP_STRUCT__entry(
589 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100590 VIF_ENTRY
591 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200592 __field(u32, iv32)
593 ),
594
595 TP_fast_assign(
596 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100597 VIF_ASSIGN;
598 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200599 __entry->iv32 = iv32;
600 ),
601
602 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100603 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
Weilong Chenf359d3f2013-12-18 15:44:16 +0800604 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200605 )
606);
607
Luciano Coelho79f460c2011-05-11 17:09:36 +0300608DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200609 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300610 struct ieee80211_sub_if_data *sdata),
611 TP_ARGS(local, sdata)
612);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200613
Eliad Pellerb8564392011-06-13 12:47:30 +0300614DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
615 TP_PROTO(struct ieee80211_local *local,
616 struct ieee80211_sub_if_data *sdata),
617 TP_ARGS(local, sdata)
618);
619
Luciano Coelho79f460c2011-05-11 17:09:36 +0300620DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
621 TP_PROTO(struct ieee80211_local *local,
622 struct ieee80211_sub_if_data *sdata),
623 TP_ARGS(local, sdata)
624);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200625
Luciano Coelho79f460c2011-05-11 17:09:36 +0300626DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
627 TP_PROTO(struct ieee80211_local *local,
628 struct ieee80211_sub_if_data *sdata),
629 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200630);
631
Johannes Berga344d672014-06-12 22:24:31 +0200632TRACE_EVENT(drv_sw_scan_start,
633 TP_PROTO(struct ieee80211_local *local,
634 struct ieee80211_sub_if_data *sdata,
635 const u8 *mac_addr),
636
637 TP_ARGS(local, sdata, mac_addr),
638
639 TP_STRUCT__entry(
640 LOCAL_ENTRY
641 VIF_ENTRY
642 __array(char, mac_addr, ETH_ALEN)
643 ),
644
645 TP_fast_assign(
646 LOCAL_ASSIGN;
647 VIF_ASSIGN;
648 memcpy(__entry->mac_addr, mac_addr, ETH_ALEN);
649 ),
650
651 TP_printk(LOCAL_PR_FMT ", " VIF_PR_FMT ", addr:%pM",
652 LOCAL_PR_ARG, VIF_PR_ARG, __entry->mac_addr)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200653);
654
Johannes Berga344d672014-06-12 22:24:31 +0200655DEFINE_EVENT(local_sdata_evt, drv_sw_scan_complete,
656 TP_PROTO(struct ieee80211_local *local,
657 struct ieee80211_sub_if_data *sdata),
658 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200659);
660
661TRACE_EVENT(drv_get_stats,
662 TP_PROTO(struct ieee80211_local *local,
663 struct ieee80211_low_level_stats *stats,
664 int ret),
665
666 TP_ARGS(local, stats, ret),
667
668 TP_STRUCT__entry(
669 LOCAL_ENTRY
670 __field(int, ret)
671 __field(unsigned int, ackfail)
672 __field(unsigned int, rtsfail)
673 __field(unsigned int, fcserr)
674 __field(unsigned int, rtssucc)
675 ),
676
677 TP_fast_assign(
678 LOCAL_ASSIGN;
679 __entry->ret = ret;
680 __entry->ackfail = stats->dot11ACKFailureCount;
681 __entry->rtsfail = stats->dot11RTSFailureCount;
682 __entry->fcserr = stats->dot11FCSErrorCount;
683 __entry->rtssucc = stats->dot11RTSSuccessCount;
684 ),
685
686 TP_printk(
687 LOCAL_PR_FMT " ret:%d",
688 LOCAL_PR_ARG, __entry->ret
689 )
690);
691
Johannes Berg9352c192015-04-20 18:12:41 +0200692TRACE_EVENT(drv_get_key_seq,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200693 TP_PROTO(struct ieee80211_local *local,
Johannes Berg9352c192015-04-20 18:12:41 +0200694 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200695
Johannes Berg9352c192015-04-20 18:12:41 +0200696 TP_ARGS(local, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200697
698 TP_STRUCT__entry(
699 LOCAL_ENTRY
Johannes Berg9352c192015-04-20 18:12:41 +0200700 KEY_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200701 ),
702
703 TP_fast_assign(
704 LOCAL_ASSIGN;
Johannes Berg9352c192015-04-20 18:12:41 +0200705 KEY_ASSIGN(key);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200706 ),
707
708 TP_printk(
Johannes Berg9352c192015-04-20 18:12:41 +0200709 LOCAL_PR_FMT KEY_PR_FMT,
710 LOCAL_PR_ARG, KEY_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200711 )
712);
713
Luciano Coelho92ddc112011-05-09 14:40:06 +0300714DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200715 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300716 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200717);
718
Luciano Coelho92ddc112011-05-09 14:40:06 +0300719DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200720 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300721 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200722);
723
Lukáš Turek310bc672009-12-21 22:50:48 +0100724TRACE_EVENT(drv_set_coverage_class,
Lorenzo Bianconia4bcaf52014-09-04 23:57:41 +0200725 TP_PROTO(struct ieee80211_local *local, s16 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100726
Johannes Berg4efc76b2010-06-10 10:56:20 +0200727 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100728
729 TP_STRUCT__entry(
730 LOCAL_ENTRY
Lorenzo Bianconia4bcaf52014-09-04 23:57:41 +0200731 __field(s16, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100732 ),
733
734 TP_fast_assign(
735 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100736 __entry->value = value;
737 ),
738
739 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200740 LOCAL_PR_FMT " value:%d",
741 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100742 )
743);
744
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200745TRACE_EVENT(drv_sta_notify,
746 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100747 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200748 enum sta_notify_cmd cmd,
749 struct ieee80211_sta *sta),
750
Johannes Berg12375ef2009-11-25 20:30:31 +0100751 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200752
753 TP_STRUCT__entry(
754 LOCAL_ENTRY
755 VIF_ENTRY
756 STA_ENTRY
757 __field(u32, cmd)
758 ),
759
760 TP_fast_assign(
761 LOCAL_ASSIGN;
762 VIF_ASSIGN;
763 STA_ASSIGN;
764 __entry->cmd = cmd;
765 ),
766
767 TP_printk(
768 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
769 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
770 )
771);
772
Johannes Bergf09603a2012-01-20 13:55:21 +0100773TRACE_EVENT(drv_sta_state,
774 TP_PROTO(struct ieee80211_local *local,
775 struct ieee80211_sub_if_data *sdata,
776 struct ieee80211_sta *sta,
777 enum ieee80211_sta_state old_state,
778 enum ieee80211_sta_state new_state),
779
780 TP_ARGS(local, sdata, sta, old_state, new_state),
781
782 TP_STRUCT__entry(
783 LOCAL_ENTRY
784 VIF_ENTRY
785 STA_ENTRY
786 __field(u32, old_state)
787 __field(u32, new_state)
788 ),
789
790 TP_fast_assign(
791 LOCAL_ASSIGN;
792 VIF_ASSIGN;
793 STA_ASSIGN;
794 __entry->old_state = old_state;
795 __entry->new_state = new_state;
796 ),
797
798 TP_printk(
799 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
800 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
801 __entry->old_state, __entry->new_state
802 )
803);
804
Johannes Berg8f727ef2012-03-30 08:43:32 +0200805TRACE_EVENT(drv_sta_rc_update,
806 TP_PROTO(struct ieee80211_local *local,
807 struct ieee80211_sub_if_data *sdata,
808 struct ieee80211_sta *sta,
809 u32 changed),
810
811 TP_ARGS(local, sdata, sta, changed),
812
813 TP_STRUCT__entry(
814 LOCAL_ENTRY
815 VIF_ENTRY
816 STA_ENTRY
817 __field(u32, changed)
818 ),
819
820 TP_fast_assign(
821 LOCAL_ASSIGN;
822 VIF_ASSIGN;
823 STA_ASSIGN;
824 __entry->changed = changed;
825 ),
826
827 TP_printk(
828 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
829 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
830 )
831);
832
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100833DECLARE_EVENT_CLASS(sta_event,
Johannes Berg34e89502010-02-03 13:59:58 +0100834 TP_PROTO(struct ieee80211_local *local,
835 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200836 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100837
Johannes Berg4efc76b2010-06-10 10:56:20 +0200838 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100839
840 TP_STRUCT__entry(
841 LOCAL_ENTRY
842 VIF_ENTRY
843 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100844 ),
845
846 TP_fast_assign(
847 LOCAL_ASSIGN;
848 VIF_ASSIGN;
849 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100850 ),
851
852 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200853 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
854 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100855 )
856);
857
Johannes Berg2b9a7e12014-11-17 11:35:23 +0100858DEFINE_EVENT(sta_event, drv_sta_statistics,
859 TP_PROTO(struct ieee80211_local *local,
860 struct ieee80211_sub_if_data *sdata,
861 struct ieee80211_sta *sta),
862 TP_ARGS(local, sdata, sta)
863);
864
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100865DEFINE_EVENT(sta_event, drv_sta_add,
Johannes Berg34e89502010-02-03 13:59:58 +0100866 TP_PROTO(struct ieee80211_local *local,
867 struct ieee80211_sub_if_data *sdata,
868 struct ieee80211_sta *sta),
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100869 TP_ARGS(local, sdata, sta)
870);
Johannes Berg34e89502010-02-03 13:59:58 +0100871
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100872DEFINE_EVENT(sta_event, drv_sta_remove,
873 TP_PROTO(struct ieee80211_local *local,
874 struct ieee80211_sub_if_data *sdata,
875 struct ieee80211_sta *sta),
876 TP_ARGS(local, sdata, sta)
877);
Johannes Berg34e89502010-02-03 13:59:58 +0100878
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100879DEFINE_EVENT(sta_event, drv_sta_pre_rcu_remove,
880 TP_PROTO(struct ieee80211_local *local,
881 struct ieee80211_sub_if_data *sdata,
882 struct ieee80211_sta *sta),
883 TP_ARGS(local, sdata, sta)
Johannes Berg34e89502010-02-03 13:59:58 +0100884);
885
Johannes Bergf815e2b2014-11-19 00:10:42 +0100886DEFINE_EVENT(sta_event, drv_sta_rate_tbl_update,
887 TP_PROTO(struct ieee80211_local *local,
888 struct ieee80211_sub_if_data *sdata,
889 struct ieee80211_sta *sta),
890 TP_ARGS(local, sdata, sta)
891);
892
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200893TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300894 TP_PROTO(struct ieee80211_local *local,
895 struct ieee80211_sub_if_data *sdata,
Johannes Berga3304b02012-03-28 11:04:24 +0200896 u16 ac, const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200897
Johannes Berga3304b02012-03-28 11:04:24 +0200898 TP_ARGS(local, sdata, ac, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200899
900 TP_STRUCT__entry(
901 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300902 VIF_ENTRY
Johannes Berga3304b02012-03-28 11:04:24 +0200903 __field(u16, ac)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200904 __field(u16, txop)
905 __field(u16, cw_min)
906 __field(u16, cw_max)
907 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300908 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200909 ),
910
911 TP_fast_assign(
912 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300913 VIF_ASSIGN;
Johannes Berga3304b02012-03-28 11:04:24 +0200914 __entry->ac = ac;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200915 __entry->txop = params->txop;
916 __entry->cw_max = params->cw_max;
917 __entry->cw_min = params->cw_min;
918 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300919 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200920 ),
921
922 TP_printk(
Johannes Berga3304b02012-03-28 11:04:24 +0200923 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
924 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200925 )
926);
927
Eliad Peller37a41b42011-09-21 14:06:11 +0300928DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
929 TP_PROTO(struct ieee80211_local *local,
930 struct ieee80211_sub_if_data *sdata),
931 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200932);
933
934TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +0300935 TP_PROTO(struct ieee80211_local *local,
936 struct ieee80211_sub_if_data *sdata,
937 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200938
Eliad Peller37a41b42011-09-21 14:06:11 +0300939 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200940
941 TP_STRUCT__entry(
942 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +0300943 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200944 __field(u64, tsf)
945 ),
946
947 TP_fast_assign(
948 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +0300949 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200950 __entry->tsf = tsf;
951 ),
952
953 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +0300954 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
955 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200956 )
957);
958
Eliad Peller37a41b42011-09-21 14:06:11 +0300959DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
960 TP_PROTO(struct ieee80211_local *local,
961 struct ieee80211_sub_if_data *sdata),
962 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200963);
964
Johannes Bergba99d932011-01-26 09:22:15 +0100965DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200966 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100967 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200968);
969
970TRACE_EVENT(drv_ampdu_action,
971 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100972 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200973 enum ieee80211_ampdu_mlme_action action,
974 struct ieee80211_sta *sta, u16 tid,
Emmanuel Grumbache3abc8f2015-08-16 11:13:22 +0300975 u16 *ssn, u8 buf_size, bool amsdu),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200976
Emmanuel Grumbache3abc8f2015-08-16 11:13:22 +0300977 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size, amsdu),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200978
979 TP_STRUCT__entry(
980 LOCAL_ENTRY
981 STA_ENTRY
982 __field(u32, action)
983 __field(u16, tid)
984 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100985 __field(u8, buf_size)
Emmanuel Grumbache3abc8f2015-08-16 11:13:22 +0300986 __field(bool, amsdu)
Johannes Bergc951ad32009-11-16 12:00:38 +0100987 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200988 ),
989
990 TP_fast_assign(
991 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100992 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200993 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200994 __entry->action = action;
995 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800996 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100997 __entry->buf_size = buf_size;
Emmanuel Grumbache3abc8f2015-08-16 11:13:22 +0300998 __entry->amsdu = amsdu;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200999 ),
1000
1001 TP_printk(
Emmanuel Grumbache3abc8f2015-08-16 11:13:22 +03001002 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d amsdu:%d",
Johannes Berg0b01f032011-01-18 13:51:05 +01001003 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
Emmanuel Grumbache3abc8f2015-08-16 11:13:22 +03001004 __entry->tid, __entry->buf_size, __entry->amsdu
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001005 )
1006);
Johannes Berga80f7c02009-12-23 13:15:32 +01001007
John W. Linvillec466d4e2010-06-29 14:51:23 -04001008TRACE_EVENT(drv_get_survey,
1009 TP_PROTO(struct ieee80211_local *local, int idx,
1010 struct survey_info *survey),
1011
1012 TP_ARGS(local, idx, survey),
1013
1014 TP_STRUCT__entry(
1015 LOCAL_ENTRY
1016 __field(int, idx)
1017 ),
1018
1019 TP_fast_assign(
1020 LOCAL_ASSIGN;
1021 __entry->idx = idx;
1022 ),
1023
1024 TP_printk(
1025 LOCAL_PR_FMT " idx:%d",
1026 LOCAL_PR_ARG, __entry->idx
1027 )
1028);
1029
Johannes Berga80f7c02009-12-23 13:15:32 +01001030TRACE_EVENT(drv_flush,
Johannes Berg39ecc012013-02-13 12:11:00 +01001031 TP_PROTO(struct ieee80211_local *local,
1032 u32 queues, bool drop),
Johannes Berga80f7c02009-12-23 13:15:32 +01001033
Johannes Berg39ecc012013-02-13 12:11:00 +01001034 TP_ARGS(local, queues, drop),
Johannes Berga80f7c02009-12-23 13:15:32 +01001035
1036 TP_STRUCT__entry(
1037 LOCAL_ENTRY
1038 __field(bool, drop)
Johannes Berg39ecc012013-02-13 12:11:00 +01001039 __field(u32, queues)
Johannes Berga80f7c02009-12-23 13:15:32 +01001040 ),
1041
1042 TP_fast_assign(
1043 LOCAL_ASSIGN;
1044 __entry->drop = drop;
Johannes Berg39ecc012013-02-13 12:11:00 +01001045 __entry->queues = queues;
Johannes Berga80f7c02009-12-23 13:15:32 +01001046 ),
1047
1048 TP_printk(
Johannes Berg39ecc012013-02-13 12:11:00 +01001049 LOCAL_PR_FMT " queues:0x%x drop:%d",
1050 LOCAL_PR_ARG, __entry->queues, __entry->drop
Johannes Berga80f7c02009-12-23 13:15:32 +01001051 )
1052);
Johannes Bergb5878a22010-04-07 16:48:40 +02001053
Johannes Berg5ce6e432010-05-11 16:20:57 +02001054TRACE_EVENT(drv_channel_switch,
1055 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001056 struct ieee80211_sub_if_data *sdata,
Johannes Berg5ce6e432010-05-11 16:20:57 +02001057 struct ieee80211_channel_switch *ch_switch),
1058
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001059 TP_ARGS(local, sdata, ch_switch),
Johannes Berg5ce6e432010-05-11 16:20:57 +02001060
1061 TP_STRUCT__entry(
1062 LOCAL_ENTRY
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001063 VIF_ENTRY
Johannes Berg85220d72013-03-25 18:29:27 +01001064 CHANDEF_ENTRY
Johannes Berg5ce6e432010-05-11 16:20:57 +02001065 __field(u64, timestamp)
Luciano Coelho2ba45382014-10-08 09:48:35 +03001066 __field(u32, device_timestamp)
Johannes Berg5ce6e432010-05-11 16:20:57 +02001067 __field(bool, block_tx)
Johannes Berg5ce6e432010-05-11 16:20:57 +02001068 __field(u8, count)
1069 ),
1070
1071 TP_fast_assign(
1072 LOCAL_ASSIGN;
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001073 VIF_ASSIGN;
Johannes Berg85220d72013-03-25 18:29:27 +01001074 CHANDEF_ASSIGN(&ch_switch->chandef)
Johannes Berg5ce6e432010-05-11 16:20:57 +02001075 __entry->timestamp = ch_switch->timestamp;
Luciano Coelho2ba45382014-10-08 09:48:35 +03001076 __entry->device_timestamp = ch_switch->device_timestamp;
Johannes Berg5ce6e432010-05-11 16:20:57 +02001077 __entry->block_tx = ch_switch->block_tx;
Johannes Berg5ce6e432010-05-11 16:20:57 +02001078 __entry->count = ch_switch->count;
1079 ),
1080
1081 TP_printk(
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001082 LOCAL_PR_FMT VIF_PR_FMT " new " CHANDEF_PR_FMT " count:%d",
1083 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count
Johannes Berg5ce6e432010-05-11 16:20:57 +02001084 )
1085);
1086
Bruno Randolf15d96752010-11-10 12:50:56 +09001087TRACE_EVENT(drv_set_antenna,
1088 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1089
1090 TP_ARGS(local, tx_ant, rx_ant, ret),
1091
1092 TP_STRUCT__entry(
1093 LOCAL_ENTRY
1094 __field(u32, tx_ant)
1095 __field(u32, rx_ant)
1096 __field(int, ret)
1097 ),
1098
1099 TP_fast_assign(
1100 LOCAL_ASSIGN;
1101 __entry->tx_ant = tx_ant;
1102 __entry->rx_ant = rx_ant;
1103 __entry->ret = ret;
1104 ),
1105
1106 TP_printk(
1107 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1108 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1109 )
1110);
1111
1112TRACE_EVENT(drv_get_antenna,
1113 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1114
1115 TP_ARGS(local, tx_ant, rx_ant, ret),
1116
1117 TP_STRUCT__entry(
1118 LOCAL_ENTRY
1119 __field(u32, tx_ant)
1120 __field(u32, rx_ant)
1121 __field(int, ret)
1122 ),
1123
1124 TP_fast_assign(
1125 LOCAL_ASSIGN;
1126 __entry->tx_ant = tx_ant;
1127 __entry->rx_ant = rx_ant;
1128 __entry->ret = ret;
1129 ),
1130
1131 TP_printk(
1132 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1133 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1134 )
1135);
1136
Johannes Berg21f83582010-12-18 17:20:47 +01001137TRACE_EVENT(drv_remain_on_channel,
Eliad Peller49884562012-11-19 17:05:09 +02001138 TP_PROTO(struct ieee80211_local *local,
1139 struct ieee80211_sub_if_data *sdata,
1140 struct ieee80211_channel *chan,
Ilan Peerd339d5c2013-02-12 09:34:13 +02001141 unsigned int duration,
1142 enum ieee80211_roc_type type),
Johannes Berg21f83582010-12-18 17:20:47 +01001143
Ilan Peerd339d5c2013-02-12 09:34:13 +02001144 TP_ARGS(local, sdata, chan, duration, type),
Johannes Berg21f83582010-12-18 17:20:47 +01001145
1146 TP_STRUCT__entry(
1147 LOCAL_ENTRY
Eliad Peller49884562012-11-19 17:05:09 +02001148 VIF_ENTRY
Johannes Berg21f83582010-12-18 17:20:47 +01001149 __field(int, center_freq)
Johannes Berg21f83582010-12-18 17:20:47 +01001150 __field(unsigned int, duration)
Ilan Peerd339d5c2013-02-12 09:34:13 +02001151 __field(u32, type)
Johannes Berg21f83582010-12-18 17:20:47 +01001152 ),
1153
1154 TP_fast_assign(
1155 LOCAL_ASSIGN;
Eliad Peller49884562012-11-19 17:05:09 +02001156 VIF_ASSIGN;
Johannes Berg21f83582010-12-18 17:20:47 +01001157 __entry->center_freq = chan->center_freq;
Johannes Berg21f83582010-12-18 17:20:47 +01001158 __entry->duration = duration;
Ilan Peerd339d5c2013-02-12 09:34:13 +02001159 __entry->type = type;
Johannes Berg21f83582010-12-18 17:20:47 +01001160 ),
1161
1162 TP_printk(
Ilan Peerd339d5c2013-02-12 09:34:13 +02001163 LOCAL_PR_FMT VIF_PR_FMT " freq:%dMHz duration:%dms type=%d",
Eliad Peller49884562012-11-19 17:05:09 +02001164 LOCAL_PR_ARG, VIF_PR_ARG,
Ilan Peerd339d5c2013-02-12 09:34:13 +02001165 __entry->center_freq, __entry->duration, __entry->type
Johannes Berg21f83582010-12-18 17:20:47 +01001166 )
1167);
1168
Johannes Bergba99d932011-01-26 09:22:15 +01001169DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001170 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001171 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001172);
1173
John W. Linville38c09152011-03-07 16:19:18 -05001174TRACE_EVENT(drv_set_ringparam,
1175 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1176
1177 TP_ARGS(local, tx, rx),
1178
1179 TP_STRUCT__entry(
1180 LOCAL_ENTRY
1181 __field(u32, tx)
1182 __field(u32, rx)
1183 ),
1184
1185 TP_fast_assign(
1186 LOCAL_ASSIGN;
1187 __entry->tx = tx;
1188 __entry->rx = rx;
1189 ),
1190
1191 TP_printk(
1192 LOCAL_PR_FMT " tx:%d rx %d",
1193 LOCAL_PR_ARG, __entry->tx, __entry->rx
1194 )
1195);
1196
1197TRACE_EVENT(drv_get_ringparam,
1198 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1199 u32 *rx, u32 *rx_max),
1200
1201 TP_ARGS(local, tx, tx_max, rx, rx_max),
1202
1203 TP_STRUCT__entry(
1204 LOCAL_ENTRY
1205 __field(u32, tx)
1206 __field(u32, tx_max)
1207 __field(u32, rx)
1208 __field(u32, rx_max)
1209 ),
1210
1211 TP_fast_assign(
1212 LOCAL_ASSIGN;
1213 __entry->tx = *tx;
1214 __entry->tx_max = *tx_max;
1215 __entry->rx = *rx;
1216 __entry->rx_max = *rx_max;
1217 ),
1218
1219 TP_printk(
1220 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1221 LOCAL_PR_ARG,
1222 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1223 )
1224);
1225
Vivek Natarajane8306f92011-04-06 11:41:10 +05301226DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1227 TP_PROTO(struct ieee80211_local *local),
1228 TP_ARGS(local)
1229);
1230
Johannes Berg5f16a432011-02-25 15:36:57 +01001231DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1232 TP_PROTO(struct ieee80211_local *local),
1233 TP_ARGS(local)
1234);
1235
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301236TRACE_EVENT(drv_set_bitrate_mask,
1237 TP_PROTO(struct ieee80211_local *local,
1238 struct ieee80211_sub_if_data *sdata,
1239 const struct cfg80211_bitrate_mask *mask),
1240
1241 TP_ARGS(local, sdata, mask),
1242
1243 TP_STRUCT__entry(
1244 LOCAL_ENTRY
1245 VIF_ENTRY
1246 __field(u32, legacy_2g)
1247 __field(u32, legacy_5g)
1248 ),
1249
1250 TP_fast_assign(
1251 LOCAL_ASSIGN;
1252 VIF_ASSIGN;
1253 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1254 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1255 ),
1256
1257 TP_printk(
1258 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1259 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1260 )
1261);
1262
Johannes Bergc68f4b82011-07-05 16:35:41 +02001263TRACE_EVENT(drv_set_rekey_data,
1264 TP_PROTO(struct ieee80211_local *local,
1265 struct ieee80211_sub_if_data *sdata,
1266 struct cfg80211_gtk_rekey_data *data),
1267
1268 TP_ARGS(local, sdata, data),
1269
1270 TP_STRUCT__entry(
1271 LOCAL_ENTRY
1272 VIF_ENTRY
1273 __array(u8, kek, NL80211_KEK_LEN)
1274 __array(u8, kck, NL80211_KCK_LEN)
1275 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1276 ),
1277
1278 TP_fast_assign(
1279 LOCAL_ASSIGN;
1280 VIF_ASSIGN;
1281 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1282 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1283 memcpy(__entry->replay_ctr, data->replay_ctr,
1284 NL80211_REPLAY_CTR_LEN);
1285 ),
1286
1287 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1288 LOCAL_PR_ARG, VIF_PR_ARG)
1289);
1290
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001291TRACE_EVENT(drv_event_callback,
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001292 TP_PROTO(struct ieee80211_local *local,
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001293 struct ieee80211_sub_if_data *sdata,
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001294 const struct ieee80211_event *_event),
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001295
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001296 TP_ARGS(local, sdata, _event),
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001297
1298 TP_STRUCT__entry(
1299 LOCAL_ENTRY
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001300 VIF_ENTRY
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001301 __field(u32, type)
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001302 ),
1303
1304 TP_fast_assign(
1305 LOCAL_ASSIGN;
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001306 VIF_ASSIGN;
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001307 __entry->type = _event->type;
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001308 ),
1309
1310 TP_printk(
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001311 LOCAL_PR_FMT VIF_PR_FMT " event:%d",
1312 LOCAL_PR_ARG, VIF_PR_ARG, __entry->type
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001313 )
1314);
1315
Johannes Berg40b96402011-09-29 16:04:38 +02001316DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001317 TP_PROTO(struct ieee80211_local *local,
1318 struct ieee80211_sta *sta,
1319 u16 tids, int num_frames,
1320 enum ieee80211_frame_release_type reason,
1321 bool more_data),
1322
1323 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1324
1325 TP_STRUCT__entry(
1326 LOCAL_ENTRY
1327 STA_ENTRY
1328 __field(u16, tids)
1329 __field(int, num_frames)
1330 __field(int, reason)
1331 __field(bool, more_data)
1332 ),
1333
1334 TP_fast_assign(
1335 LOCAL_ASSIGN;
1336 STA_ASSIGN;
1337 __entry->tids = tids;
1338 __entry->num_frames = num_frames;
1339 __entry->reason = reason;
1340 __entry->more_data = more_data;
1341 ),
1342
1343 TP_printk(
1344 LOCAL_PR_FMT STA_PR_FMT
1345 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1346 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1347 __entry->reason, __entry->more_data
1348 )
1349);
1350
Johannes Berg40b96402011-09-29 16:04:38 +02001351DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1352 TP_PROTO(struct ieee80211_local *local,
1353 struct ieee80211_sta *sta,
1354 u16 tids, int num_frames,
1355 enum ieee80211_frame_release_type reason,
1356 bool more_data),
1357
1358 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1359);
1360
1361DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1362 TP_PROTO(struct ieee80211_local *local,
1363 struct ieee80211_sta *sta,
1364 u16 tids, int num_frames,
1365 enum ieee80211_frame_release_type reason,
1366 bool more_data),
1367
1368 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1369);
1370
Johannes Berga1845fc2012-06-27 13:18:36 +02001371DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
1372 TP_PROTO(struct ieee80211_local *local,
1373 struct ieee80211_sub_if_data *sdata),
1374
1375 TP_ARGS(local, sdata)
1376);
1377
Arik Nemtsovee10f2c2014-06-11 17:18:27 +03001378DEFINE_EVENT(local_sdata_evt, drv_mgd_protect_tdls_discover,
1379 TP_PROTO(struct ieee80211_local *local,
1380 struct ieee80211_sub_if_data *sdata),
1381
1382 TP_ARGS(local, sdata)
1383);
1384
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001385DECLARE_EVENT_CLASS(local_chanctx,
1386 TP_PROTO(struct ieee80211_local *local,
1387 struct ieee80211_chanctx *ctx),
1388
1389 TP_ARGS(local, ctx),
1390
1391 TP_STRUCT__entry(
1392 LOCAL_ENTRY
1393 CHANCTX_ENTRY
1394 ),
1395
1396 TP_fast_assign(
1397 LOCAL_ASSIGN;
1398 CHANCTX_ASSIGN;
1399 ),
1400
1401 TP_printk(
1402 LOCAL_PR_FMT CHANCTX_PR_FMT,
1403 LOCAL_PR_ARG, CHANCTX_PR_ARG
1404 )
1405);
1406
1407DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1408 TP_PROTO(struct ieee80211_local *local,
1409 struct ieee80211_chanctx *ctx),
1410 TP_ARGS(local, ctx)
1411);
1412
1413DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1414 TP_PROTO(struct ieee80211_local *local,
1415 struct ieee80211_chanctx *ctx),
1416 TP_ARGS(local, ctx)
1417);
1418
1419TRACE_EVENT(drv_change_chanctx,
1420 TP_PROTO(struct ieee80211_local *local,
1421 struct ieee80211_chanctx *ctx,
1422 u32 changed),
1423
1424 TP_ARGS(local, ctx, changed),
1425
1426 TP_STRUCT__entry(
1427 LOCAL_ENTRY
1428 CHANCTX_ENTRY
1429 __field(u32, changed)
1430 ),
1431
1432 TP_fast_assign(
1433 LOCAL_ASSIGN;
1434 CHANCTX_ASSIGN;
1435 __entry->changed = changed;
1436 ),
1437
1438 TP_printk(
1439 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1440 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1441 )
1442);
1443
Luciano Coelho1a5f0c12014-05-23 14:33:12 +03001444#if !defined(__TRACE_VIF_ENTRY)
1445#define __TRACE_VIF_ENTRY
1446struct trace_vif_entry {
1447 enum nl80211_iftype vif_type;
1448 bool p2p;
1449 char vif_name[IFNAMSIZ];
1450} __packed;
1451
1452struct trace_chandef_entry {
1453 u32 control_freq;
1454 u32 chan_width;
1455 u32 center_freq1;
1456 u32 center_freq2;
1457} __packed;
1458
1459struct trace_switch_entry {
1460 struct trace_vif_entry vif;
1461 struct trace_chandef_entry old_chandef;
1462 struct trace_chandef_entry new_chandef;
1463} __packed;
1464
1465#define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
1466#endif
1467
1468TRACE_EVENT(drv_switch_vif_chanctx,
1469 TP_PROTO(struct ieee80211_local *local,
1470 struct ieee80211_vif_chanctx_switch *vifs,
1471 int n_vifs, enum ieee80211_chanctx_switch_mode mode),
1472 TP_ARGS(local, vifs, n_vifs, mode),
1473
1474 TP_STRUCT__entry(
1475 LOCAL_ENTRY
1476 __field(int, n_vifs)
1477 __field(u32, mode)
1478 __dynamic_array(u8, vifs,
1479 sizeof(struct trace_switch_entry) * n_vifs)
1480 ),
1481
1482 TP_fast_assign(
1483 LOCAL_ASSIGN;
1484 __entry->n_vifs = n_vifs;
1485 __entry->mode = mode;
1486 {
1487 struct trace_switch_entry *local_vifs =
1488 __get_dynamic_array(vifs);
1489 int i;
1490
1491 for (i = 0; i < n_vifs; i++) {
1492 struct ieee80211_sub_if_data *sdata;
1493
1494 sdata = container_of(vifs[i].vif,
1495 struct ieee80211_sub_if_data,
1496 vif);
1497
1498 SWITCH_ENTRY_ASSIGN(vif.vif_type, vif->type);
1499 SWITCH_ENTRY_ASSIGN(vif.p2p, vif->p2p);
1500 strncpy(local_vifs[i].vif.vif_name,
1501 sdata->name,
1502 sizeof(local_vifs[i].vif.vif_name));
1503 SWITCH_ENTRY_ASSIGN(old_chandef.control_freq,
1504 old_ctx->def.chan->center_freq);
1505 SWITCH_ENTRY_ASSIGN(old_chandef.chan_width,
1506 old_ctx->def.width);
1507 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq1,
1508 old_ctx->def.center_freq1);
1509 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq2,
1510 old_ctx->def.center_freq2);
1511 SWITCH_ENTRY_ASSIGN(new_chandef.control_freq,
1512 new_ctx->def.chan->center_freq);
1513 SWITCH_ENTRY_ASSIGN(new_chandef.chan_width,
1514 new_ctx->def.width);
1515 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq1,
1516 new_ctx->def.center_freq1);
1517 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq2,
1518 new_ctx->def.center_freq2);
1519 }
1520 }
1521 ),
1522
1523 TP_printk(
1524 LOCAL_PR_FMT " n_vifs:%d mode:%d",
1525 LOCAL_PR_ARG, __entry->n_vifs, __entry->mode
1526 )
1527);
1528
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001529DECLARE_EVENT_CLASS(local_sdata_chanctx,
1530 TP_PROTO(struct ieee80211_local *local,
1531 struct ieee80211_sub_if_data *sdata,
1532 struct ieee80211_chanctx *ctx),
1533
1534 TP_ARGS(local, sdata, ctx),
1535
1536 TP_STRUCT__entry(
1537 LOCAL_ENTRY
1538 VIF_ENTRY
1539 CHANCTX_ENTRY
1540 ),
1541
1542 TP_fast_assign(
1543 LOCAL_ASSIGN;
1544 VIF_ASSIGN;
1545 CHANCTX_ASSIGN;
1546 ),
1547
1548 TP_printk(
1549 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
1550 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
1551 )
1552);
1553
1554DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1555 TP_PROTO(struct ieee80211_local *local,
1556 struct ieee80211_sub_if_data *sdata,
1557 struct ieee80211_chanctx *ctx),
1558 TP_ARGS(local, sdata, ctx)
1559);
1560
1561DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1562 TP_PROTO(struct ieee80211_local *local,
1563 struct ieee80211_sub_if_data *sdata,
1564 struct ieee80211_chanctx *ctx),
1565 TP_ARGS(local, sdata, ctx)
1566);
1567
Johannes Berg10416382012-10-19 15:44:42 +02001568TRACE_EVENT(drv_start_ap,
1569 TP_PROTO(struct ieee80211_local *local,
1570 struct ieee80211_sub_if_data *sdata,
1571 struct ieee80211_bss_conf *info),
1572
1573 TP_ARGS(local, sdata, info),
1574
1575 TP_STRUCT__entry(
1576 LOCAL_ENTRY
1577 VIF_ENTRY
1578 __field(u8, dtimper)
1579 __field(u16, bcnint)
1580 __dynamic_array(u8, ssid, info->ssid_len);
1581 __field(bool, hidden_ssid);
1582 ),
1583
1584 TP_fast_assign(
1585 LOCAL_ASSIGN;
1586 VIF_ASSIGN;
1587 __entry->dtimper = info->dtim_period;
1588 __entry->bcnint = info->beacon_int;
1589 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1590 __entry->hidden_ssid = info->hidden_ssid;
1591 ),
1592
1593 TP_printk(
1594 LOCAL_PR_FMT VIF_PR_FMT,
1595 LOCAL_PR_ARG, VIF_PR_ARG
1596 )
1597);
1598
1599DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
1600 TP_PROTO(struct ieee80211_local *local,
1601 struct ieee80211_sub_if_data *sdata),
1602 TP_ARGS(local, sdata)
1603);
1604
Eliad Pellercf2c92d2014-11-04 11:43:54 +02001605TRACE_EVENT(drv_reconfig_complete,
1606 TP_PROTO(struct ieee80211_local *local,
1607 enum ieee80211_reconfig_type reconfig_type),
1608 TP_ARGS(local, reconfig_type),
1609
1610 TP_STRUCT__entry(
1611 LOCAL_ENTRY
1612 __field(u8, reconfig_type)
1613 ),
1614
1615 TP_fast_assign(
1616 LOCAL_ASSIGN;
1617 __entry->reconfig_type = reconfig_type;
1618 ),
1619
1620 TP_printk(
1621 LOCAL_PR_FMT " reconfig_type:%d",
1622 LOCAL_PR_ARG, __entry->reconfig_type
1623 )
1624
Johannes Berg9214ad72012-11-06 19:18:13 +01001625);
1626
Johannes Berga65240c2013-01-14 15:14:34 +01001627#if IS_ENABLED(CONFIG_IPV6)
1628DEFINE_EVENT(local_sdata_evt, drv_ipv6_addr_change,
1629 TP_PROTO(struct ieee80211_local *local,
1630 struct ieee80211_sub_if_data *sdata),
1631 TP_ARGS(local, sdata)
1632);
1633#endif
1634
Johannes Berg55fff502013-08-19 18:48:41 +02001635TRACE_EVENT(drv_join_ibss,
1636 TP_PROTO(struct ieee80211_local *local,
1637 struct ieee80211_sub_if_data *sdata,
1638 struct ieee80211_bss_conf *info),
1639
1640 TP_ARGS(local, sdata, info),
1641
1642 TP_STRUCT__entry(
1643 LOCAL_ENTRY
1644 VIF_ENTRY
1645 __field(u8, dtimper)
1646 __field(u16, bcnint)
1647 __dynamic_array(u8, ssid, info->ssid_len);
1648 ),
1649
1650 TP_fast_assign(
1651 LOCAL_ASSIGN;
1652 VIF_ASSIGN;
1653 __entry->dtimper = info->dtim_period;
1654 __entry->bcnint = info->beacon_int;
1655 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1656 ),
1657
1658 TP_printk(
1659 LOCAL_PR_FMT VIF_PR_FMT,
1660 LOCAL_PR_ARG, VIF_PR_ARG
1661 )
1662);
1663
1664DEFINE_EVENT(local_sdata_evt, drv_leave_ibss,
1665 TP_PROTO(struct ieee80211_local *local,
1666 struct ieee80211_sub_if_data *sdata),
1667 TP_ARGS(local, sdata)
1668);
1669
Antonio Quartullicca674d2014-05-19 21:53:20 +02001670TRACE_EVENT(drv_get_expected_throughput,
1671 TP_PROTO(struct ieee80211_sta *sta),
1672
1673 TP_ARGS(sta),
1674
1675 TP_STRUCT__entry(
1676 STA_ENTRY
1677 ),
1678
1679 TP_fast_assign(
1680 STA_ASSIGN;
1681 ),
1682
1683 TP_printk(
1684 STA_PR_FMT, STA_PR_ARG
1685 )
1686);
1687
Johannes Bergb5878a22010-04-07 16:48:40 +02001688/*
1689 * Tracing for API calls that drivers call.
1690 */
1691
1692TRACE_EVENT(api_start_tx_ba_session,
1693 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1694
1695 TP_ARGS(sta, tid),
1696
1697 TP_STRUCT__entry(
1698 STA_ENTRY
1699 __field(u16, tid)
1700 ),
1701
1702 TP_fast_assign(
1703 STA_ASSIGN;
1704 __entry->tid = tid;
1705 ),
1706
1707 TP_printk(
1708 STA_PR_FMT " tid:%d",
1709 STA_PR_ARG, __entry->tid
1710 )
1711);
1712
1713TRACE_EVENT(api_start_tx_ba_cb,
1714 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1715
1716 TP_ARGS(sdata, ra, tid),
1717
1718 TP_STRUCT__entry(
1719 VIF_ENTRY
1720 __array(u8, ra, ETH_ALEN)
1721 __field(u16, tid)
1722 ),
1723
1724 TP_fast_assign(
1725 VIF_ASSIGN;
1726 memcpy(__entry->ra, ra, ETH_ALEN);
1727 __entry->tid = tid;
1728 ),
1729
1730 TP_printk(
1731 VIF_PR_FMT " ra:%pM tid:%d",
1732 VIF_PR_ARG, __entry->ra, __entry->tid
1733 )
1734);
1735
1736TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001737 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001738
Johannes Berg6a8579d2010-05-27 14:41:07 +02001739 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001740
1741 TP_STRUCT__entry(
1742 STA_ENTRY
1743 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001744 ),
1745
1746 TP_fast_assign(
1747 STA_ASSIGN;
1748 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001749 ),
1750
1751 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001752 STA_PR_FMT " tid:%d",
1753 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001754 )
1755);
1756
1757TRACE_EVENT(api_stop_tx_ba_cb,
1758 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1759
1760 TP_ARGS(sdata, ra, tid),
1761
1762 TP_STRUCT__entry(
1763 VIF_ENTRY
1764 __array(u8, ra, ETH_ALEN)
1765 __field(u16, tid)
1766 ),
1767
1768 TP_fast_assign(
1769 VIF_ASSIGN;
1770 memcpy(__entry->ra, ra, ETH_ALEN);
1771 __entry->tid = tid;
1772 ),
1773
1774 TP_printk(
1775 VIF_PR_FMT " ra:%pM tid:%d",
1776 VIF_PR_ARG, __entry->ra, __entry->tid
1777 )
1778);
1779
Johannes Bergba99d932011-01-26 09:22:15 +01001780DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001781 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001782 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001783);
1784
1785TRACE_EVENT(api_beacon_loss,
1786 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1787
1788 TP_ARGS(sdata),
1789
1790 TP_STRUCT__entry(
1791 VIF_ENTRY
1792 ),
1793
1794 TP_fast_assign(
1795 VIF_ASSIGN;
1796 ),
1797
1798 TP_printk(
1799 VIF_PR_FMT,
1800 VIF_PR_ARG
1801 )
1802);
1803
1804TRACE_EVENT(api_connection_loss,
1805 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1806
1807 TP_ARGS(sdata),
1808
1809 TP_STRUCT__entry(
1810 VIF_ENTRY
1811 ),
1812
1813 TP_fast_assign(
1814 VIF_ASSIGN;
1815 ),
1816
1817 TP_printk(
1818 VIF_PR_FMT,
1819 VIF_PR_ARG
1820 )
1821);
1822
1823TRACE_EVENT(api_cqm_rssi_notify,
1824 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1825 enum nl80211_cqm_rssi_threshold_event rssi_event),
1826
1827 TP_ARGS(sdata, rssi_event),
1828
1829 TP_STRUCT__entry(
1830 VIF_ENTRY
1831 __field(u32, rssi_event)
1832 ),
1833
1834 TP_fast_assign(
1835 VIF_ASSIGN;
1836 __entry->rssi_event = rssi_event;
1837 ),
1838
1839 TP_printk(
1840 VIF_PR_FMT " event:%d",
1841 VIF_PR_ARG, __entry->rssi_event
1842 )
1843);
1844
Johannes Berg98f03342014-11-26 12:42:02 +01001845DEFINE_EVENT(local_sdata_evt, api_cqm_beacon_loss_notify,
1846 TP_PROTO(struct ieee80211_local *local,
1847 struct ieee80211_sub_if_data *sdata),
1848 TP_ARGS(local, sdata)
1849);
1850
Johannes Bergb5878a22010-04-07 16:48:40 +02001851TRACE_EVENT(api_scan_completed,
1852 TP_PROTO(struct ieee80211_local *local, bool aborted),
1853
1854 TP_ARGS(local, aborted),
1855
1856 TP_STRUCT__entry(
1857 LOCAL_ENTRY
1858 __field(bool, aborted)
1859 ),
1860
1861 TP_fast_assign(
1862 LOCAL_ASSIGN;
1863 __entry->aborted = aborted;
1864 ),
1865
1866 TP_printk(
1867 LOCAL_PR_FMT " aborted:%d",
1868 LOCAL_PR_ARG, __entry->aborted
1869 )
1870);
1871
Luciano Coelho79f460c2011-05-11 17:09:36 +03001872TRACE_EVENT(api_sched_scan_results,
1873 TP_PROTO(struct ieee80211_local *local),
1874
1875 TP_ARGS(local),
1876
1877 TP_STRUCT__entry(
1878 LOCAL_ENTRY
1879 ),
1880
1881 TP_fast_assign(
1882 LOCAL_ASSIGN;
1883 ),
1884
1885 TP_printk(
1886 LOCAL_PR_FMT, LOCAL_PR_ARG
1887 )
1888);
1889
1890TRACE_EVENT(api_sched_scan_stopped,
1891 TP_PROTO(struct ieee80211_local *local),
1892
1893 TP_ARGS(local),
1894
1895 TP_STRUCT__entry(
1896 LOCAL_ENTRY
1897 ),
1898
1899 TP_fast_assign(
1900 LOCAL_ASSIGN;
1901 ),
1902
1903 TP_printk(
1904 LOCAL_PR_FMT, LOCAL_PR_ARG
1905 )
1906);
1907
Johannes Bergb5878a22010-04-07 16:48:40 +02001908TRACE_EVENT(api_sta_block_awake,
1909 TP_PROTO(struct ieee80211_local *local,
1910 struct ieee80211_sta *sta, bool block),
1911
1912 TP_ARGS(local, sta, block),
1913
1914 TP_STRUCT__entry(
1915 LOCAL_ENTRY
1916 STA_ENTRY
1917 __field(bool, block)
1918 ),
1919
1920 TP_fast_assign(
1921 LOCAL_ASSIGN;
1922 STA_ASSIGN;
1923 __entry->block = block;
1924 ),
1925
1926 TP_printk(
1927 LOCAL_PR_FMT STA_PR_FMT " block:%d",
Seth Forshee15ac7c42013-02-15 13:15:48 -06001928 LOCAL_PR_ARG, STA_PR_ARG, __entry->block
Johannes Bergb5878a22010-04-07 16:48:40 +02001929 )
1930);
1931
Johannes Berg5ce6e432010-05-11 16:20:57 +02001932TRACE_EVENT(api_chswitch_done,
1933 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1934
1935 TP_ARGS(sdata, success),
1936
1937 TP_STRUCT__entry(
1938 VIF_ENTRY
1939 __field(bool, success)
1940 ),
1941
1942 TP_fast_assign(
1943 VIF_ASSIGN;
1944 __entry->success = success;
1945 ),
1946
1947 TP_printk(
1948 VIF_PR_FMT " success=%d",
1949 VIF_PR_ARG, __entry->success
1950 )
1951);
1952
Johannes Bergba99d932011-01-26 09:22:15 +01001953DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001954 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001955 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001956);
1957
Johannes Bergba99d932011-01-26 09:22:15 +01001958DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001959 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001960 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001961);
1962
Johannes Bergc68f4b82011-07-05 16:35:41 +02001963TRACE_EVENT(api_gtk_rekey_notify,
1964 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1965 const u8 *bssid, const u8 *replay_ctr),
1966
1967 TP_ARGS(sdata, bssid, replay_ctr),
1968
1969 TP_STRUCT__entry(
1970 VIF_ENTRY
1971 __array(u8, bssid, ETH_ALEN)
1972 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1973 ),
1974
1975 TP_fast_assign(
1976 VIF_ASSIGN;
1977 memcpy(__entry->bssid, bssid, ETH_ALEN);
1978 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1979 ),
1980
1981 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1982);
1983
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001984TRACE_EVENT(api_enable_rssi_reports,
1985 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1986 int rssi_min_thold, int rssi_max_thold),
1987
1988 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1989
1990 TP_STRUCT__entry(
1991 VIF_ENTRY
1992 __field(int, rssi_min_thold)
1993 __field(int, rssi_max_thold)
1994 ),
1995
1996 TP_fast_assign(
1997 VIF_ASSIGN;
1998 __entry->rssi_min_thold = rssi_min_thold;
1999 __entry->rssi_max_thold = rssi_max_thold;
2000 ),
2001
2002 TP_printk(
2003 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
2004 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
2005 )
2006);
2007
Johannes Berg37fbd902011-09-29 16:04:39 +02002008TRACE_EVENT(api_eosp,
2009 TP_PROTO(struct ieee80211_local *local,
2010 struct ieee80211_sta *sta),
2011
2012 TP_ARGS(local, sta),
2013
2014 TP_STRUCT__entry(
2015 LOCAL_ENTRY
2016 STA_ENTRY
2017 ),
2018
2019 TP_fast_assign(
2020 LOCAL_ASSIGN;
2021 STA_ASSIGN;
2022 ),
2023
2024 TP_printk(
2025 LOCAL_PR_FMT STA_PR_FMT,
Seth Forshee15ac7c42013-02-15 13:15:48 -06002026 LOCAL_PR_ARG, STA_PR_ARG
Johannes Berg37fbd902011-09-29 16:04:39 +02002027 )
2028);
2029
Emmanuel Grumbach0ead2512015-11-17 10:24:36 +02002030TRACE_EVENT(api_send_eosp_nullfunc,
2031 TP_PROTO(struct ieee80211_local *local,
2032 struct ieee80211_sta *sta,
2033 u8 tid),
2034
2035 TP_ARGS(local, sta, tid),
2036
2037 TP_STRUCT__entry(
2038 LOCAL_ENTRY
2039 STA_ENTRY
2040 __field(u8, tid)
2041 ),
2042
2043 TP_fast_assign(
2044 LOCAL_ASSIGN;
2045 STA_ASSIGN;
2046 __entry->tid = tid;
2047 ),
2048
2049 TP_printk(
2050 LOCAL_PR_FMT STA_PR_FMT " tid:%d",
2051 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid
2052 )
2053);
2054
Johannes Berg1b000782013-12-19 10:47:48 +01002055TRACE_EVENT(api_sta_set_buffered,
2056 TP_PROTO(struct ieee80211_local *local,
2057 struct ieee80211_sta *sta,
2058 u8 tid, bool buffered),
2059
2060 TP_ARGS(local, sta, tid, buffered),
2061
2062 TP_STRUCT__entry(
2063 LOCAL_ENTRY
2064 STA_ENTRY
2065 __field(u8, tid)
2066 __field(bool, buffered)
2067 ),
2068
2069 TP_fast_assign(
2070 LOCAL_ASSIGN;
2071 STA_ASSIGN;
2072 __entry->tid = tid;
2073 __entry->buffered = buffered;
2074 ),
2075
2076 TP_printk(
2077 LOCAL_PR_FMT STA_PR_FMT " tid:%d buffered:%d",
2078 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid, __entry->buffered
2079 )
2080);
2081
Johannes Bergb5878a22010-04-07 16:48:40 +02002082/*
2083 * Tracing for internal functions
2084 * (which may also be called in response to driver calls)
2085 */
2086
2087TRACE_EVENT(wake_queue,
2088 TP_PROTO(struct ieee80211_local *local, u16 queue,
2089 enum queue_stop_reason reason),
2090
2091 TP_ARGS(local, queue, reason),
2092
2093 TP_STRUCT__entry(
2094 LOCAL_ENTRY
2095 __field(u16, queue)
2096 __field(u32, reason)
2097 ),
2098
2099 TP_fast_assign(
2100 LOCAL_ASSIGN;
2101 __entry->queue = queue;
2102 __entry->reason = reason;
2103 ),
2104
2105 TP_printk(
2106 LOCAL_PR_FMT " queue:%d, reason:%d",
2107 LOCAL_PR_ARG, __entry->queue, __entry->reason
2108 )
2109);
2110
2111TRACE_EVENT(stop_queue,
2112 TP_PROTO(struct ieee80211_local *local, u16 queue,
2113 enum queue_stop_reason reason),
2114
2115 TP_ARGS(local, queue, reason),
2116
2117 TP_STRUCT__entry(
2118 LOCAL_ENTRY
2119 __field(u16, queue)
2120 __field(u32, reason)
2121 ),
2122
2123 TP_fast_assign(
2124 LOCAL_ASSIGN;
2125 __entry->queue = queue;
2126 __entry->reason = reason;
2127 ),
2128
2129 TP_printk(
2130 LOCAL_PR_FMT " queue:%d, reason:%d",
2131 LOCAL_PR_ARG, __entry->queue, __entry->reason
2132 )
2133);
Johannes Berg3fae0272012-06-22 13:36:25 +02002134
Yoni Divinskyde5fad82012-05-30 11:36:39 +03002135TRACE_EVENT(drv_set_default_unicast_key,
2136 TP_PROTO(struct ieee80211_local *local,
2137 struct ieee80211_sub_if_data *sdata,
2138 int key_idx),
2139
2140 TP_ARGS(local, sdata, key_idx),
2141
2142 TP_STRUCT__entry(
2143 LOCAL_ENTRY
2144 VIF_ENTRY
2145 __field(int, key_idx)
2146 ),
2147
2148 TP_fast_assign(
2149 LOCAL_ASSIGN;
2150 VIF_ASSIGN;
2151 __entry->key_idx = key_idx;
2152 ),
2153
2154 TP_printk(LOCAL_PR_FMT VIF_PR_FMT " key_idx:%d",
2155 LOCAL_PR_ARG, VIF_PR_ARG, __entry->key_idx)
2156);
2157
Simon Wunderlich164eb022013-02-08 18:16:20 +01002158TRACE_EVENT(api_radar_detected,
2159 TP_PROTO(struct ieee80211_local *local),
2160
2161 TP_ARGS(local),
2162
2163 TP_STRUCT__entry(
2164 LOCAL_ENTRY
2165 ),
2166
2167 TP_fast_assign(
2168 LOCAL_ASSIGN;
2169 ),
2170
2171 TP_printk(
2172 LOCAL_PR_FMT " radar detected",
2173 LOCAL_PR_ARG
2174 )
2175);
2176
Simon Wunderlich73da7d52013-07-11 16:09:06 +02002177TRACE_EVENT(drv_channel_switch_beacon,
2178 TP_PROTO(struct ieee80211_local *local,
2179 struct ieee80211_sub_if_data *sdata,
2180 struct cfg80211_chan_def *chandef),
2181
2182 TP_ARGS(local, sdata, chandef),
2183
2184 TP_STRUCT__entry(
2185 LOCAL_ENTRY
2186 VIF_ENTRY
2187 CHANDEF_ENTRY
2188 ),
2189
2190 TP_fast_assign(
2191 LOCAL_ASSIGN;
2192 VIF_ASSIGN;
2193 CHANDEF_ASSIGN(chandef);
2194 ),
2195
2196 TP_printk(
2197 LOCAL_PR_FMT VIF_PR_FMT " channel switch to " CHANDEF_PR_FMT,
2198 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG
2199 )
2200);
2201
Luciano Coelho6d027bc2014-10-08 09:48:37 +03002202TRACE_EVENT(drv_pre_channel_switch,
2203 TP_PROTO(struct ieee80211_local *local,
2204 struct ieee80211_sub_if_data *sdata,
2205 struct ieee80211_channel_switch *ch_switch),
2206
2207 TP_ARGS(local, sdata, ch_switch),
2208
2209 TP_STRUCT__entry(
2210 LOCAL_ENTRY
2211 VIF_ENTRY
2212 CHANDEF_ENTRY
2213 __field(u64, timestamp)
Luciano Coelho127f10e2014-11-07 15:28:34 +02002214 __field(u32, device_timestamp)
Luciano Coelho6d027bc2014-10-08 09:48:37 +03002215 __field(bool, block_tx)
2216 __field(u8, count)
2217 ),
2218
2219 TP_fast_assign(
2220 LOCAL_ASSIGN;
2221 VIF_ASSIGN;
2222 CHANDEF_ASSIGN(&ch_switch->chandef)
2223 __entry->timestamp = ch_switch->timestamp;
Luciano Coelho127f10e2014-11-07 15:28:34 +02002224 __entry->device_timestamp = ch_switch->device_timestamp;
Luciano Coelho6d027bc2014-10-08 09:48:37 +03002225 __entry->block_tx = ch_switch->block_tx;
2226 __entry->count = ch_switch->count;
2227 ),
2228
2229 TP_printk(
2230 LOCAL_PR_FMT VIF_PR_FMT " prepare channel switch to "
2231 CHANDEF_PR_FMT " count:%d block_tx:%d timestamp:%llu",
2232 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count,
2233 __entry->block_tx, __entry->timestamp
2234 )
2235);
2236
Luciano Coelhof1d65582014-10-08 09:48:38 +03002237DEFINE_EVENT(local_sdata_evt, drv_post_channel_switch,
2238 TP_PROTO(struct ieee80211_local *local,
2239 struct ieee80211_sub_if_data *sdata),
2240 TP_ARGS(local, sdata)
2241);
2242
Felix Fietkau5b3dc422014-10-26 00:32:53 +02002243TRACE_EVENT(drv_get_txpower,
2244 TP_PROTO(struct ieee80211_local *local,
2245 struct ieee80211_sub_if_data *sdata,
2246 int dbm, int ret),
2247
2248 TP_ARGS(local, sdata, dbm, ret),
2249
2250 TP_STRUCT__entry(
2251 LOCAL_ENTRY
2252 VIF_ENTRY
2253 __field(int, dbm)
2254 __field(int, ret)
2255 ),
2256
2257 TP_fast_assign(
2258 LOCAL_ASSIGN;
2259 VIF_ASSIGN;
2260 __entry->dbm = dbm;
2261 __entry->ret = ret;
2262 ),
2263
2264 TP_printk(
2265 LOCAL_PR_FMT VIF_PR_FMT " dbm:%d ret:%d",
2266 LOCAL_PR_ARG, VIF_PR_ARG, __entry->dbm, __entry->ret
2267 )
2268);
2269
Arik Nemtsova7a6bdd2014-11-09 18:50:19 +02002270TRACE_EVENT(drv_tdls_channel_switch,
2271 TP_PROTO(struct ieee80211_local *local,
2272 struct ieee80211_sub_if_data *sdata,
2273 struct ieee80211_sta *sta, u8 oper_class,
2274 struct cfg80211_chan_def *chandef),
2275
2276 TP_ARGS(local, sdata, sta, oper_class, chandef),
2277
2278 TP_STRUCT__entry(
2279 LOCAL_ENTRY
2280 VIF_ENTRY
2281 STA_ENTRY
2282 __field(u8, oper_class)
2283 CHANDEF_ENTRY
2284 ),
2285
2286 TP_fast_assign(
2287 LOCAL_ASSIGN;
2288 VIF_ASSIGN;
2289 STA_ASSIGN;
2290 __entry->oper_class = oper_class;
2291 CHANDEF_ASSIGN(chandef)
2292 ),
2293
2294 TP_printk(
2295 LOCAL_PR_FMT VIF_PR_FMT " tdls channel switch to"
2296 CHANDEF_PR_FMT " oper_class:%d " STA_PR_FMT,
2297 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->oper_class,
2298 STA_PR_ARG
2299 )
2300);
2301
2302TRACE_EVENT(drv_tdls_cancel_channel_switch,
2303 TP_PROTO(struct ieee80211_local *local,
2304 struct ieee80211_sub_if_data *sdata,
2305 struct ieee80211_sta *sta),
2306
2307 TP_ARGS(local, sdata, sta),
2308
2309 TP_STRUCT__entry(
2310 LOCAL_ENTRY
2311 VIF_ENTRY
2312 STA_ENTRY
2313 ),
2314
2315 TP_fast_assign(
2316 LOCAL_ASSIGN;
2317 VIF_ASSIGN;
2318 STA_ASSIGN;
2319 ),
2320
2321 TP_printk(
2322 LOCAL_PR_FMT VIF_PR_FMT
2323 " tdls cancel channel switch with " STA_PR_FMT,
2324 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
2325 )
2326);
Simon Wunderlich73da7d52013-07-11 16:09:06 +02002327
Arik Nemtsov8a4d32f2014-11-09 18:50:20 +02002328TRACE_EVENT(drv_tdls_recv_channel_switch,
2329 TP_PROTO(struct ieee80211_local *local,
2330 struct ieee80211_sub_if_data *sdata,
2331 struct ieee80211_tdls_ch_sw_params *params),
2332
2333 TP_ARGS(local, sdata, params),
2334
2335 TP_STRUCT__entry(
2336 LOCAL_ENTRY
2337 VIF_ENTRY
2338 __field(u8, action_code)
2339 STA_ENTRY
2340 CHANDEF_ENTRY
2341 __field(u32, status)
2342 __field(bool, peer_initiator)
2343 __field(u32, timestamp)
2344 __field(u16, switch_time)
2345 __field(u16, switch_timeout)
2346 ),
2347
2348 TP_fast_assign(
2349 LOCAL_ASSIGN;
2350 VIF_ASSIGN;
2351 STA_NAMED_ASSIGN(params->sta);
2352 CHANDEF_ASSIGN(params->chandef)
2353 __entry->peer_initiator = params->sta->tdls_initiator;
2354 __entry->action_code = params->action_code;
2355 __entry->status = params->status;
2356 __entry->timestamp = params->timestamp;
2357 __entry->switch_time = params->switch_time;
2358 __entry->switch_timeout = params->switch_timeout;
2359 ),
2360
2361 TP_printk(
2362 LOCAL_PR_FMT VIF_PR_FMT " received tdls channel switch packet"
2363 " action:%d status:%d time:%d switch time:%d switch"
2364 " timeout:%d initiator: %d chan:" CHANDEF_PR_FMT STA_PR_FMT,
2365 LOCAL_PR_ARG, VIF_PR_ARG, __entry->action_code, __entry->status,
2366 __entry->timestamp, __entry->switch_time,
2367 __entry->switch_timeout, __entry->peer_initiator,
2368 CHANDEF_PR_ARG, STA_PR_ARG
2369 )
2370);
2371
Felix Fietkauba8c3d62015-03-27 21:30:37 +01002372TRACE_EVENT(drv_wake_tx_queue,
2373 TP_PROTO(struct ieee80211_local *local,
2374 struct ieee80211_sub_if_data *sdata,
2375 struct txq_info *txq),
2376
2377 TP_ARGS(local, sdata, txq),
2378
2379 TP_STRUCT__entry(
2380 LOCAL_ENTRY
2381 VIF_ENTRY
2382 STA_ENTRY
2383 __field(u8, ac)
2384 __field(u8, tid)
2385 ),
2386
2387 TP_fast_assign(
2388 struct ieee80211_sta *sta = txq->txq.sta;
2389
2390 LOCAL_ASSIGN;
2391 VIF_ASSIGN;
2392 STA_ASSIGN;
2393 __entry->ac = txq->txq.ac;
2394 __entry->tid = txq->txq.tid;
2395 ),
2396
2397 TP_printk(
2398 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ac:%d tid:%d",
2399 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ac, __entry->tid
2400 )
2401);
2402
Christian Lamparterf7428802009-07-19 23:21:07 +02002403#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02002404
2405#undef TRACE_INCLUDE_PATH
2406#define TRACE_INCLUDE_PATH .
2407#undef TRACE_INCLUDE_FILE
Johannes Berg011ad0e2012-06-22 12:55:52 +02002408#define TRACE_INCLUDE_FILE trace
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02002409#include <trace/define_trace.h>