blob: 6f14591d8ca9eb7a356f54cf0a16e96f87480246 [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)
Karl Beldan675a0b02013-03-25 16:26:57 +010036#define CHANDEF_ASSIGN(c) \
37 __entry->control_freq = (c)->chan ? (c)->chan->center_freq : 0; \
38 __entry->chan_width = (c)->width; \
39 __entry->center_freq1 = (c)->center_freq1; \
Johannes Berg757af6f2013-02-08 21:29:59 +010040 __entry->center_freq2 = (c)->center_freq2;
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)
328 __field(int, max_sleep_period)
329 __field(u16, listen_interval)
330 __field(u8, long_frame_max_tx_count)
331 __field(u8, short_frame_max_tx_count)
Karl Beldan675a0b02013-03-25 16:26:57 +0100332 CHANDEF_ENTRY
Johannes Berg0f782312009-12-01 13:37:02 +0100333 __field(int, smps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200334 ),
335
336 TP_fast_assign(
337 LOCAL_ASSIGN;
338 __entry->changed = changed;
Johannes Bergf911ab82009-11-25 19:07:20 +0100339 __entry->flags = local->hw.conf.flags;
340 __entry->power_level = local->hw.conf.power_level;
341 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
342 __entry->max_sleep_period = local->hw.conf.max_sleep_period;
343 __entry->listen_interval = local->hw.conf.listen_interval;
Johannes Berg3d01be72012-07-26 14:27:39 +0200344 __entry->long_frame_max_tx_count =
345 local->hw.conf.long_frame_max_tx_count;
346 __entry->short_frame_max_tx_count =
347 local->hw.conf.short_frame_max_tx_count;
Karl Beldan675a0b02013-03-25 16:26:57 +0100348 CHANDEF_ASSIGN(&local->hw.conf.chandef)
Johannes Berg0f782312009-12-01 13:37:02 +0100349 __entry->smps = local->hw.conf.smps_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200350 ),
351
352 TP_printk(
Karl Beldan675a0b02013-03-25 16:26:57 +0100353 LOCAL_PR_FMT " ch:%#x" CHANDEF_PR_FMT,
354 LOCAL_PR_ARG, __entry->changed, CHANDEF_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200355 )
356);
357
358TRACE_EVENT(drv_bss_info_changed,
359 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100360 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200361 struct ieee80211_bss_conf *info,
362 u32 changed),
363
Johannes Berg12375ef2009-11-25 20:30:31 +0100364 TP_ARGS(local, sdata, info, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200365
366 TP_STRUCT__entry(
367 LOCAL_ENTRY
368 VIF_ENTRY
Johannes Berg1724ffb2012-10-24 11:38:30 +0200369 __field(u32, changed)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200370 __field(bool, assoc)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200371 __field(bool, ibss_joined)
372 __field(bool, ibss_creator)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200373 __field(u16, aid)
374 __field(bool, cts)
375 __field(bool, shortpre)
376 __field(bool, shortslot)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200377 __field(bool, enable_beacon)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200378 __field(u8, dtimper)
379 __field(u16, bcnint)
380 __field(u16, assoc_cap)
Johannes Berg8c358bc2012-05-22 22:13:05 +0200381 __field(u64, sync_tsf)
382 __field(u32, sync_device_ts)
Johannes Bergef429da2013-02-05 17:48:40 +0100383 __field(u8, sync_dtim_count)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200384 __field(u32, basic_rates)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200385 __array(int, mcast_rate, IEEE80211_NUM_BANDS)
Johannes Bergf911ab82009-11-25 19:07:20 +0100386 __field(u16, ht_operation_mode)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200387 __field(s32, cqm_rssi_thold);
388 __field(s32, cqm_rssi_hyst);
Johannes Berg4bf88532012-11-09 11:39:59 +0100389 __field(u32, channel_width);
390 __field(u32, channel_cfreq1);
Johannes Berg0f19b412013-01-14 16:39:07 +0100391 __dynamic_array(u32, arp_addr_list,
392 info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
393 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
394 info->arp_addr_cnt);
395 __field(int, arp_addr_cnt);
Johannes Berg1724ffb2012-10-24 11:38:30 +0200396 __field(bool, qos);
397 __field(bool, idle);
398 __field(bool, ps);
399 __dynamic_array(u8, ssid, info->ssid_len);
400 __field(bool, hidden_ssid);
Johannes Berg1ea6f9c2012-10-24 10:59:25 +0200401 __field(int, txpower)
Janusz Dziedzic67baf662013-03-21 15:47:56 +0100402 __field(u8, p2p_oppps_ctwindow)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200403 ),
404
405 TP_fast_assign(
406 LOCAL_ASSIGN;
407 VIF_ASSIGN;
408 __entry->changed = changed;
409 __entry->aid = info->aid;
410 __entry->assoc = info->assoc;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200411 __entry->ibss_joined = info->ibss_joined;
412 __entry->ibss_creator = info->ibss_creator;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200413 __entry->shortpre = info->use_short_preamble;
414 __entry->cts = info->use_cts_prot;
415 __entry->shortslot = info->use_short_slot;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200416 __entry->enable_beacon = info->enable_beacon;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200417 __entry->dtimper = info->dtim_period;
418 __entry->bcnint = info->beacon_int;
419 __entry->assoc_cap = info->assoc_capability;
Johannes Berg8c358bc2012-05-22 22:13:05 +0200420 __entry->sync_tsf = info->sync_tsf;
421 __entry->sync_device_ts = info->sync_device_ts;
Johannes Bergef429da2013-02-05 17:48:40 +0100422 __entry->sync_dtim_count = info->sync_dtim_count;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200423 __entry->basic_rates = info->basic_rates;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200424 memcpy(__entry->mcast_rate, info->mcast_rate,
425 sizeof(__entry->mcast_rate));
Johannes Bergf911ab82009-11-25 19:07:20 +0100426 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200427 __entry->cqm_rssi_thold = info->cqm_rssi_thold;
428 __entry->cqm_rssi_hyst = info->cqm_rssi_hyst;
Johannes Berg4bf88532012-11-09 11:39:59 +0100429 __entry->channel_width = info->chandef.width;
430 __entry->channel_cfreq1 = info->chandef.center_freq1;
Johannes Berg0f19b412013-01-14 16:39:07 +0100431 __entry->arp_addr_cnt = info->arp_addr_cnt;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200432 memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list,
Johannes Berg0f19b412013-01-14 16:39:07 +0100433 sizeof(u32) * (info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
434 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
435 info->arp_addr_cnt));
Johannes Berg1724ffb2012-10-24 11:38:30 +0200436 __entry->qos = info->qos;
437 __entry->idle = info->idle;
438 __entry->ps = info->ps;
439 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
440 __entry->hidden_ssid = info->hidden_ssid;
Johannes Berg1ea6f9c2012-10-24 10:59:25 +0200441 __entry->txpower = info->txpower;
Janusz Dziedzic67baf662013-03-21 15:47:56 +0100442 __entry->p2p_oppps_ctwindow = info->p2p_noa_attr.oppps_ctwindow;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200443 ),
444
445 TP_printk(
446 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
447 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
448 )
449);
450
Johannes Berg3ac64be2009-08-17 16:16:53 +0200451TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200452 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200453
Johannes Berg4efc76b2010-06-10 10:56:20 +0200454 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200455
456 TP_STRUCT__entry(
457 LOCAL_ENTRY
458 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200459 ),
460
461 TP_fast_assign(
462 LOCAL_ASSIGN;
463 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200464 ),
465
466 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200467 LOCAL_PR_FMT " prepare mc (%d)",
468 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200469 )
470);
471
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200472TRACE_EVENT(drv_configure_filter,
473 TP_PROTO(struct ieee80211_local *local,
474 unsigned int changed_flags,
475 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200476 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200477
Johannes Berg3ac64be2009-08-17 16:16:53 +0200478 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200479
480 TP_STRUCT__entry(
481 LOCAL_ENTRY
482 __field(unsigned int, changed)
483 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200484 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200485 ),
486
487 TP_fast_assign(
488 LOCAL_ASSIGN;
489 __entry->changed = changed_flags;
490 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200491 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200492 ),
493
494 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200495 LOCAL_PR_FMT " changed:%#x total:%#x",
496 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200497 )
498);
499
500TRACE_EVENT(drv_set_tim,
501 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200502 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200503
Johannes Berg4efc76b2010-06-10 10:56:20 +0200504 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200505
506 TP_STRUCT__entry(
507 LOCAL_ENTRY
508 STA_ENTRY
509 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200510 ),
511
512 TP_fast_assign(
513 LOCAL_ASSIGN;
514 STA_ASSIGN;
515 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200516 ),
517
518 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200519 LOCAL_PR_FMT STA_PR_FMT " set:%d",
Seth Forshee15ac7c42013-02-15 13:15:48 -0600520 LOCAL_PR_ARG, STA_PR_ARG, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200521 )
522);
523
524TRACE_EVENT(drv_set_key,
525 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100526 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200527 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200528 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200529
Johannes Berg4efc76b2010-06-10 10:56:20 +0200530 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200531
532 TP_STRUCT__entry(
533 LOCAL_ENTRY
534 VIF_ENTRY
535 STA_ENTRY
Johannes Berg9352c192015-04-20 18:12:41 +0200536 KEY_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200537 ),
538
539 TP_fast_assign(
540 LOCAL_ASSIGN;
541 VIF_ASSIGN;
542 STA_ASSIGN;
Johannes Berg9352c192015-04-20 18:12:41 +0200543 KEY_ASSIGN(key);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200544 ),
545
546 TP_printk(
Johannes Berg9352c192015-04-20 18:12:41 +0200547 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT KEY_PR_FMT,
548 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, KEY_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200549 )
550);
551
552TRACE_EVENT(drv_update_tkip_key,
553 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100554 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200555 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100556 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200557
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100558 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200559
560 TP_STRUCT__entry(
561 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100562 VIF_ENTRY
563 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200564 __field(u32, iv32)
565 ),
566
567 TP_fast_assign(
568 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100569 VIF_ASSIGN;
570 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200571 __entry->iv32 = iv32;
572 ),
573
574 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100575 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
Weilong Chenf359d3f2013-12-18 15:44:16 +0800576 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200577 )
578);
579
Luciano Coelho79f460c2011-05-11 17:09:36 +0300580DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200581 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300582 struct ieee80211_sub_if_data *sdata),
583 TP_ARGS(local, sdata)
584);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200585
Eliad Pellerb8564392011-06-13 12:47:30 +0300586DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
587 TP_PROTO(struct ieee80211_local *local,
588 struct ieee80211_sub_if_data *sdata),
589 TP_ARGS(local, sdata)
590);
591
Luciano Coelho79f460c2011-05-11 17:09:36 +0300592DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
593 TP_PROTO(struct ieee80211_local *local,
594 struct ieee80211_sub_if_data *sdata),
595 TP_ARGS(local, sdata)
596);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200597
Luciano Coelho79f460c2011-05-11 17:09:36 +0300598DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
599 TP_PROTO(struct ieee80211_local *local,
600 struct ieee80211_sub_if_data *sdata),
601 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200602);
603
Johannes Berga344d672014-06-12 22:24:31 +0200604TRACE_EVENT(drv_sw_scan_start,
605 TP_PROTO(struct ieee80211_local *local,
606 struct ieee80211_sub_if_data *sdata,
607 const u8 *mac_addr),
608
609 TP_ARGS(local, sdata, mac_addr),
610
611 TP_STRUCT__entry(
612 LOCAL_ENTRY
613 VIF_ENTRY
614 __array(char, mac_addr, ETH_ALEN)
615 ),
616
617 TP_fast_assign(
618 LOCAL_ASSIGN;
619 VIF_ASSIGN;
620 memcpy(__entry->mac_addr, mac_addr, ETH_ALEN);
621 ),
622
623 TP_printk(LOCAL_PR_FMT ", " VIF_PR_FMT ", addr:%pM",
624 LOCAL_PR_ARG, VIF_PR_ARG, __entry->mac_addr)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200625);
626
Johannes Berga344d672014-06-12 22:24:31 +0200627DEFINE_EVENT(local_sdata_evt, drv_sw_scan_complete,
628 TP_PROTO(struct ieee80211_local *local,
629 struct ieee80211_sub_if_data *sdata),
630 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200631);
632
633TRACE_EVENT(drv_get_stats,
634 TP_PROTO(struct ieee80211_local *local,
635 struct ieee80211_low_level_stats *stats,
636 int ret),
637
638 TP_ARGS(local, stats, ret),
639
640 TP_STRUCT__entry(
641 LOCAL_ENTRY
642 __field(int, ret)
643 __field(unsigned int, ackfail)
644 __field(unsigned int, rtsfail)
645 __field(unsigned int, fcserr)
646 __field(unsigned int, rtssucc)
647 ),
648
649 TP_fast_assign(
650 LOCAL_ASSIGN;
651 __entry->ret = ret;
652 __entry->ackfail = stats->dot11ACKFailureCount;
653 __entry->rtsfail = stats->dot11RTSFailureCount;
654 __entry->fcserr = stats->dot11FCSErrorCount;
655 __entry->rtssucc = stats->dot11RTSSuccessCount;
656 ),
657
658 TP_printk(
659 LOCAL_PR_FMT " ret:%d",
660 LOCAL_PR_ARG, __entry->ret
661 )
662);
663
Johannes Berg9352c192015-04-20 18:12:41 +0200664TRACE_EVENT(drv_get_key_seq,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200665 TP_PROTO(struct ieee80211_local *local,
Johannes Berg9352c192015-04-20 18:12:41 +0200666 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200667
Johannes Berg9352c192015-04-20 18:12:41 +0200668 TP_ARGS(local, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200669
670 TP_STRUCT__entry(
671 LOCAL_ENTRY
Johannes Berg9352c192015-04-20 18:12:41 +0200672 KEY_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200673 ),
674
675 TP_fast_assign(
676 LOCAL_ASSIGN;
Johannes Berg9352c192015-04-20 18:12:41 +0200677 KEY_ASSIGN(key);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200678 ),
679
680 TP_printk(
Johannes Berg9352c192015-04-20 18:12:41 +0200681 LOCAL_PR_FMT KEY_PR_FMT,
682 LOCAL_PR_ARG, KEY_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200683 )
684);
685
Luciano Coelho92ddc112011-05-09 14:40:06 +0300686DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200687 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300688 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200689);
690
Luciano Coelho92ddc112011-05-09 14:40:06 +0300691DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200692 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300693 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200694);
695
Lukáš Turek310bc672009-12-21 22:50:48 +0100696TRACE_EVENT(drv_set_coverage_class,
Lorenzo Bianconia4bcaf52014-09-04 23:57:41 +0200697 TP_PROTO(struct ieee80211_local *local, s16 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100698
Johannes Berg4efc76b2010-06-10 10:56:20 +0200699 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100700
701 TP_STRUCT__entry(
702 LOCAL_ENTRY
Lorenzo Bianconia4bcaf52014-09-04 23:57:41 +0200703 __field(s16, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100704 ),
705
706 TP_fast_assign(
707 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100708 __entry->value = value;
709 ),
710
711 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200712 LOCAL_PR_FMT " value:%d",
713 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100714 )
715);
716
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200717TRACE_EVENT(drv_sta_notify,
718 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100719 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200720 enum sta_notify_cmd cmd,
721 struct ieee80211_sta *sta),
722
Johannes Berg12375ef2009-11-25 20:30:31 +0100723 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200724
725 TP_STRUCT__entry(
726 LOCAL_ENTRY
727 VIF_ENTRY
728 STA_ENTRY
729 __field(u32, cmd)
730 ),
731
732 TP_fast_assign(
733 LOCAL_ASSIGN;
734 VIF_ASSIGN;
735 STA_ASSIGN;
736 __entry->cmd = cmd;
737 ),
738
739 TP_printk(
740 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
741 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
742 )
743);
744
Johannes Bergf09603a2012-01-20 13:55:21 +0100745TRACE_EVENT(drv_sta_state,
746 TP_PROTO(struct ieee80211_local *local,
747 struct ieee80211_sub_if_data *sdata,
748 struct ieee80211_sta *sta,
749 enum ieee80211_sta_state old_state,
750 enum ieee80211_sta_state new_state),
751
752 TP_ARGS(local, sdata, sta, old_state, new_state),
753
754 TP_STRUCT__entry(
755 LOCAL_ENTRY
756 VIF_ENTRY
757 STA_ENTRY
758 __field(u32, old_state)
759 __field(u32, new_state)
760 ),
761
762 TP_fast_assign(
763 LOCAL_ASSIGN;
764 VIF_ASSIGN;
765 STA_ASSIGN;
766 __entry->old_state = old_state;
767 __entry->new_state = new_state;
768 ),
769
770 TP_printk(
771 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
772 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
773 __entry->old_state, __entry->new_state
774 )
775);
776
Johannes Berg8f727ef2012-03-30 08:43:32 +0200777TRACE_EVENT(drv_sta_rc_update,
778 TP_PROTO(struct ieee80211_local *local,
779 struct ieee80211_sub_if_data *sdata,
780 struct ieee80211_sta *sta,
781 u32 changed),
782
783 TP_ARGS(local, sdata, sta, changed),
784
785 TP_STRUCT__entry(
786 LOCAL_ENTRY
787 VIF_ENTRY
788 STA_ENTRY
789 __field(u32, changed)
790 ),
791
792 TP_fast_assign(
793 LOCAL_ASSIGN;
794 VIF_ASSIGN;
795 STA_ASSIGN;
796 __entry->changed = changed;
797 ),
798
799 TP_printk(
800 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
801 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
802 )
803);
804
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100805DECLARE_EVENT_CLASS(sta_event,
Johannes Berg34e89502010-02-03 13:59:58 +0100806 TP_PROTO(struct ieee80211_local *local,
807 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200808 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100809
Johannes Berg4efc76b2010-06-10 10:56:20 +0200810 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100811
812 TP_STRUCT__entry(
813 LOCAL_ENTRY
814 VIF_ENTRY
815 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100816 ),
817
818 TP_fast_assign(
819 LOCAL_ASSIGN;
820 VIF_ASSIGN;
821 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100822 ),
823
824 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200825 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
826 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100827 )
828);
829
Johannes Berg2b9a7e12014-11-17 11:35:23 +0100830DEFINE_EVENT(sta_event, drv_sta_statistics,
831 TP_PROTO(struct ieee80211_local *local,
832 struct ieee80211_sub_if_data *sdata,
833 struct ieee80211_sta *sta),
834 TP_ARGS(local, sdata, sta)
835);
836
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100837DEFINE_EVENT(sta_event, drv_sta_add,
Johannes Berg34e89502010-02-03 13:59:58 +0100838 TP_PROTO(struct ieee80211_local *local,
839 struct ieee80211_sub_if_data *sdata,
840 struct ieee80211_sta *sta),
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100841 TP_ARGS(local, sdata, sta)
842);
Johannes Berg34e89502010-02-03 13:59:58 +0100843
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100844DEFINE_EVENT(sta_event, drv_sta_remove,
845 TP_PROTO(struct ieee80211_local *local,
846 struct ieee80211_sub_if_data *sdata,
847 struct ieee80211_sta *sta),
848 TP_ARGS(local, sdata, sta)
849);
Johannes Berg34e89502010-02-03 13:59:58 +0100850
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100851DEFINE_EVENT(sta_event, drv_sta_pre_rcu_remove,
852 TP_PROTO(struct ieee80211_local *local,
853 struct ieee80211_sub_if_data *sdata,
854 struct ieee80211_sta *sta),
855 TP_ARGS(local, sdata, sta)
Johannes Berg34e89502010-02-03 13:59:58 +0100856);
857
Johannes Bergf815e2b2014-11-19 00:10:42 +0100858DEFINE_EVENT(sta_event, drv_sta_rate_tbl_update,
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 Berg0a2b8bb2009-07-07 13:46:22 +0200865TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300866 TP_PROTO(struct ieee80211_local *local,
867 struct ieee80211_sub_if_data *sdata,
Johannes Berga3304b02012-03-28 11:04:24 +0200868 u16 ac, const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200869
Johannes Berga3304b02012-03-28 11:04:24 +0200870 TP_ARGS(local, sdata, ac, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200871
872 TP_STRUCT__entry(
873 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300874 VIF_ENTRY
Johannes Berga3304b02012-03-28 11:04:24 +0200875 __field(u16, ac)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200876 __field(u16, txop)
877 __field(u16, cw_min)
878 __field(u16, cw_max)
879 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300880 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200881 ),
882
883 TP_fast_assign(
884 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300885 VIF_ASSIGN;
Johannes Berga3304b02012-03-28 11:04:24 +0200886 __entry->ac = ac;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200887 __entry->txop = params->txop;
888 __entry->cw_max = params->cw_max;
889 __entry->cw_min = params->cw_min;
890 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300891 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200892 ),
893
894 TP_printk(
Johannes Berga3304b02012-03-28 11:04:24 +0200895 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
896 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200897 )
898);
899
Eliad Peller37a41b42011-09-21 14:06:11 +0300900DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
901 TP_PROTO(struct ieee80211_local *local,
902 struct ieee80211_sub_if_data *sdata),
903 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200904);
905
906TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +0300907 TP_PROTO(struct ieee80211_local *local,
908 struct ieee80211_sub_if_data *sdata,
909 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200910
Eliad Peller37a41b42011-09-21 14:06:11 +0300911 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200912
913 TP_STRUCT__entry(
914 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +0300915 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200916 __field(u64, tsf)
917 ),
918
919 TP_fast_assign(
920 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +0300921 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200922 __entry->tsf = tsf;
923 ),
924
925 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +0300926 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
927 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200928 )
929);
930
Eliad Peller37a41b42011-09-21 14:06:11 +0300931DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
932 TP_PROTO(struct ieee80211_local *local,
933 struct ieee80211_sub_if_data *sdata),
934 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200935);
936
Johannes Bergba99d932011-01-26 09:22:15 +0100937DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200938 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100939 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200940);
941
942TRACE_EVENT(drv_ampdu_action,
943 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100944 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200945 enum ieee80211_ampdu_mlme_action action,
946 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100947 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200948
Johannes Berg0b01f032011-01-18 13:51:05 +0100949 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200950
951 TP_STRUCT__entry(
952 LOCAL_ENTRY
953 STA_ENTRY
954 __field(u32, action)
955 __field(u16, tid)
956 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100957 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100958 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200959 ),
960
961 TP_fast_assign(
962 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100963 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200964 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200965 __entry->action = action;
966 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800967 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100968 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200969 ),
970
971 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100972 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
973 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
974 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200975 )
976);
Johannes Berga80f7c02009-12-23 13:15:32 +0100977
John W. Linvillec466d4e2010-06-29 14:51:23 -0400978TRACE_EVENT(drv_get_survey,
979 TP_PROTO(struct ieee80211_local *local, int idx,
980 struct survey_info *survey),
981
982 TP_ARGS(local, idx, survey),
983
984 TP_STRUCT__entry(
985 LOCAL_ENTRY
986 __field(int, idx)
987 ),
988
989 TP_fast_assign(
990 LOCAL_ASSIGN;
991 __entry->idx = idx;
992 ),
993
994 TP_printk(
995 LOCAL_PR_FMT " idx:%d",
996 LOCAL_PR_ARG, __entry->idx
997 )
998);
999
Johannes Berga80f7c02009-12-23 13:15:32 +01001000TRACE_EVENT(drv_flush,
Johannes Berg39ecc012013-02-13 12:11:00 +01001001 TP_PROTO(struct ieee80211_local *local,
1002 u32 queues, bool drop),
Johannes Berga80f7c02009-12-23 13:15:32 +01001003
Johannes Berg39ecc012013-02-13 12:11:00 +01001004 TP_ARGS(local, queues, drop),
Johannes Berga80f7c02009-12-23 13:15:32 +01001005
1006 TP_STRUCT__entry(
1007 LOCAL_ENTRY
1008 __field(bool, drop)
Johannes Berg39ecc012013-02-13 12:11:00 +01001009 __field(u32, queues)
Johannes Berga80f7c02009-12-23 13:15:32 +01001010 ),
1011
1012 TP_fast_assign(
1013 LOCAL_ASSIGN;
1014 __entry->drop = drop;
Johannes Berg39ecc012013-02-13 12:11:00 +01001015 __entry->queues = queues;
Johannes Berga80f7c02009-12-23 13:15:32 +01001016 ),
1017
1018 TP_printk(
Johannes Berg39ecc012013-02-13 12:11:00 +01001019 LOCAL_PR_FMT " queues:0x%x drop:%d",
1020 LOCAL_PR_ARG, __entry->queues, __entry->drop
Johannes Berga80f7c02009-12-23 13:15:32 +01001021 )
1022);
Johannes Bergb5878a22010-04-07 16:48:40 +02001023
Johannes Berg5ce6e432010-05-11 16:20:57 +02001024TRACE_EVENT(drv_channel_switch,
1025 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001026 struct ieee80211_sub_if_data *sdata,
Johannes Berg5ce6e432010-05-11 16:20:57 +02001027 struct ieee80211_channel_switch *ch_switch),
1028
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001029 TP_ARGS(local, sdata, ch_switch),
Johannes Berg5ce6e432010-05-11 16:20:57 +02001030
1031 TP_STRUCT__entry(
1032 LOCAL_ENTRY
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001033 VIF_ENTRY
Johannes Berg85220d72013-03-25 18:29:27 +01001034 CHANDEF_ENTRY
Johannes Berg5ce6e432010-05-11 16:20:57 +02001035 __field(u64, timestamp)
Luciano Coelho2ba45382014-10-08 09:48:35 +03001036 __field(u32, device_timestamp)
Johannes Berg5ce6e432010-05-11 16:20:57 +02001037 __field(bool, block_tx)
Johannes Berg5ce6e432010-05-11 16:20:57 +02001038 __field(u8, count)
1039 ),
1040
1041 TP_fast_assign(
1042 LOCAL_ASSIGN;
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001043 VIF_ASSIGN;
Johannes Berg85220d72013-03-25 18:29:27 +01001044 CHANDEF_ASSIGN(&ch_switch->chandef)
Johannes Berg5ce6e432010-05-11 16:20:57 +02001045 __entry->timestamp = ch_switch->timestamp;
Luciano Coelho2ba45382014-10-08 09:48:35 +03001046 __entry->device_timestamp = ch_switch->device_timestamp;
Johannes Berg5ce6e432010-05-11 16:20:57 +02001047 __entry->block_tx = ch_switch->block_tx;
Johannes Berg5ce6e432010-05-11 16:20:57 +02001048 __entry->count = ch_switch->count;
1049 ),
1050
1051 TP_printk(
Luciano Coelho0f791eb42014-10-08 09:48:40 +03001052 LOCAL_PR_FMT VIF_PR_FMT " new " CHANDEF_PR_FMT " count:%d",
1053 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count
Johannes Berg5ce6e432010-05-11 16:20:57 +02001054 )
1055);
1056
Bruno Randolf15d96752010-11-10 12:50:56 +09001057TRACE_EVENT(drv_set_antenna,
1058 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1059
1060 TP_ARGS(local, tx_ant, rx_ant, ret),
1061
1062 TP_STRUCT__entry(
1063 LOCAL_ENTRY
1064 __field(u32, tx_ant)
1065 __field(u32, rx_ant)
1066 __field(int, ret)
1067 ),
1068
1069 TP_fast_assign(
1070 LOCAL_ASSIGN;
1071 __entry->tx_ant = tx_ant;
1072 __entry->rx_ant = rx_ant;
1073 __entry->ret = ret;
1074 ),
1075
1076 TP_printk(
1077 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1078 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1079 )
1080);
1081
1082TRACE_EVENT(drv_get_antenna,
1083 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1084
1085 TP_ARGS(local, tx_ant, rx_ant, ret),
1086
1087 TP_STRUCT__entry(
1088 LOCAL_ENTRY
1089 __field(u32, tx_ant)
1090 __field(u32, rx_ant)
1091 __field(int, ret)
1092 ),
1093
1094 TP_fast_assign(
1095 LOCAL_ASSIGN;
1096 __entry->tx_ant = tx_ant;
1097 __entry->rx_ant = rx_ant;
1098 __entry->ret = ret;
1099 ),
1100
1101 TP_printk(
1102 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1103 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1104 )
1105);
1106
Johannes Berg21f83582010-12-18 17:20:47 +01001107TRACE_EVENT(drv_remain_on_channel,
Eliad Peller49884562012-11-19 17:05:09 +02001108 TP_PROTO(struct ieee80211_local *local,
1109 struct ieee80211_sub_if_data *sdata,
1110 struct ieee80211_channel *chan,
Ilan Peerd339d5c2013-02-12 09:34:13 +02001111 unsigned int duration,
1112 enum ieee80211_roc_type type),
Johannes Berg21f83582010-12-18 17:20:47 +01001113
Ilan Peerd339d5c2013-02-12 09:34:13 +02001114 TP_ARGS(local, sdata, chan, duration, type),
Johannes Berg21f83582010-12-18 17:20:47 +01001115
1116 TP_STRUCT__entry(
1117 LOCAL_ENTRY
Eliad Peller49884562012-11-19 17:05:09 +02001118 VIF_ENTRY
Johannes Berg21f83582010-12-18 17:20:47 +01001119 __field(int, center_freq)
Johannes Berg21f83582010-12-18 17:20:47 +01001120 __field(unsigned int, duration)
Ilan Peerd339d5c2013-02-12 09:34:13 +02001121 __field(u32, type)
Johannes Berg21f83582010-12-18 17:20:47 +01001122 ),
1123
1124 TP_fast_assign(
1125 LOCAL_ASSIGN;
Eliad Peller49884562012-11-19 17:05:09 +02001126 VIF_ASSIGN;
Johannes Berg21f83582010-12-18 17:20:47 +01001127 __entry->center_freq = chan->center_freq;
Johannes Berg21f83582010-12-18 17:20:47 +01001128 __entry->duration = duration;
Ilan Peerd339d5c2013-02-12 09:34:13 +02001129 __entry->type = type;
Johannes Berg21f83582010-12-18 17:20:47 +01001130 ),
1131
1132 TP_printk(
Ilan Peerd339d5c2013-02-12 09:34:13 +02001133 LOCAL_PR_FMT VIF_PR_FMT " freq:%dMHz duration:%dms type=%d",
Eliad Peller49884562012-11-19 17:05:09 +02001134 LOCAL_PR_ARG, VIF_PR_ARG,
Ilan Peerd339d5c2013-02-12 09:34:13 +02001135 __entry->center_freq, __entry->duration, __entry->type
Johannes Berg21f83582010-12-18 17:20:47 +01001136 )
1137);
1138
Johannes Bergba99d932011-01-26 09:22:15 +01001139DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001140 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001141 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001142);
1143
John W. Linville38c09152011-03-07 16:19:18 -05001144TRACE_EVENT(drv_set_ringparam,
1145 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1146
1147 TP_ARGS(local, tx, rx),
1148
1149 TP_STRUCT__entry(
1150 LOCAL_ENTRY
1151 __field(u32, tx)
1152 __field(u32, rx)
1153 ),
1154
1155 TP_fast_assign(
1156 LOCAL_ASSIGN;
1157 __entry->tx = tx;
1158 __entry->rx = rx;
1159 ),
1160
1161 TP_printk(
1162 LOCAL_PR_FMT " tx:%d rx %d",
1163 LOCAL_PR_ARG, __entry->tx, __entry->rx
1164 )
1165);
1166
1167TRACE_EVENT(drv_get_ringparam,
1168 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1169 u32 *rx, u32 *rx_max),
1170
1171 TP_ARGS(local, tx, tx_max, rx, rx_max),
1172
1173 TP_STRUCT__entry(
1174 LOCAL_ENTRY
1175 __field(u32, tx)
1176 __field(u32, tx_max)
1177 __field(u32, rx)
1178 __field(u32, rx_max)
1179 ),
1180
1181 TP_fast_assign(
1182 LOCAL_ASSIGN;
1183 __entry->tx = *tx;
1184 __entry->tx_max = *tx_max;
1185 __entry->rx = *rx;
1186 __entry->rx_max = *rx_max;
1187 ),
1188
1189 TP_printk(
1190 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1191 LOCAL_PR_ARG,
1192 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1193 )
1194);
1195
Vivek Natarajane8306f92011-04-06 11:41:10 +05301196DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1197 TP_PROTO(struct ieee80211_local *local),
1198 TP_ARGS(local)
1199);
1200
Johannes Berg5f16a432011-02-25 15:36:57 +01001201DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1202 TP_PROTO(struct ieee80211_local *local),
1203 TP_ARGS(local)
1204);
1205
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301206TRACE_EVENT(drv_set_bitrate_mask,
1207 TP_PROTO(struct ieee80211_local *local,
1208 struct ieee80211_sub_if_data *sdata,
1209 const struct cfg80211_bitrate_mask *mask),
1210
1211 TP_ARGS(local, sdata, mask),
1212
1213 TP_STRUCT__entry(
1214 LOCAL_ENTRY
1215 VIF_ENTRY
1216 __field(u32, legacy_2g)
1217 __field(u32, legacy_5g)
1218 ),
1219
1220 TP_fast_assign(
1221 LOCAL_ASSIGN;
1222 VIF_ASSIGN;
1223 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1224 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1225 ),
1226
1227 TP_printk(
1228 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1229 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1230 )
1231);
1232
Johannes Bergc68f4b82011-07-05 16:35:41 +02001233TRACE_EVENT(drv_set_rekey_data,
1234 TP_PROTO(struct ieee80211_local *local,
1235 struct ieee80211_sub_if_data *sdata,
1236 struct cfg80211_gtk_rekey_data *data),
1237
1238 TP_ARGS(local, sdata, data),
1239
1240 TP_STRUCT__entry(
1241 LOCAL_ENTRY
1242 VIF_ENTRY
1243 __array(u8, kek, NL80211_KEK_LEN)
1244 __array(u8, kck, NL80211_KCK_LEN)
1245 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1246 ),
1247
1248 TP_fast_assign(
1249 LOCAL_ASSIGN;
1250 VIF_ASSIGN;
1251 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1252 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1253 memcpy(__entry->replay_ctr, data->replay_ctr,
1254 NL80211_REPLAY_CTR_LEN);
1255 ),
1256
1257 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1258 LOCAL_PR_ARG, VIF_PR_ARG)
1259);
1260
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001261TRACE_EVENT(drv_event_callback,
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001262 TP_PROTO(struct ieee80211_local *local,
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001263 struct ieee80211_sub_if_data *sdata,
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001264 const struct ieee80211_event *_event),
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001265
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001266 TP_ARGS(local, sdata, _event),
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001267
1268 TP_STRUCT__entry(
1269 LOCAL_ENTRY
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001270 VIF_ENTRY
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001271 __field(u32, type)
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001272 ),
1273
1274 TP_fast_assign(
1275 LOCAL_ASSIGN;
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001276 VIF_ASSIGN;
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001277 __entry->type = _event->type;
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001278 ),
1279
1280 TP_printk(
Emmanuel Grumbacha8182922015-03-16 23:23:34 +02001281 LOCAL_PR_FMT VIF_PR_FMT " event:%d",
1282 LOCAL_PR_ARG, VIF_PR_ARG, __entry->type
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001283 )
1284);
1285
Johannes Berg40b96402011-09-29 16:04:38 +02001286DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001287 TP_PROTO(struct ieee80211_local *local,
1288 struct ieee80211_sta *sta,
1289 u16 tids, int num_frames,
1290 enum ieee80211_frame_release_type reason,
1291 bool more_data),
1292
1293 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1294
1295 TP_STRUCT__entry(
1296 LOCAL_ENTRY
1297 STA_ENTRY
1298 __field(u16, tids)
1299 __field(int, num_frames)
1300 __field(int, reason)
1301 __field(bool, more_data)
1302 ),
1303
1304 TP_fast_assign(
1305 LOCAL_ASSIGN;
1306 STA_ASSIGN;
1307 __entry->tids = tids;
1308 __entry->num_frames = num_frames;
1309 __entry->reason = reason;
1310 __entry->more_data = more_data;
1311 ),
1312
1313 TP_printk(
1314 LOCAL_PR_FMT STA_PR_FMT
1315 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1316 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1317 __entry->reason, __entry->more_data
1318 )
1319);
1320
Johannes Berg40b96402011-09-29 16:04:38 +02001321DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1322 TP_PROTO(struct ieee80211_local *local,
1323 struct ieee80211_sta *sta,
1324 u16 tids, int num_frames,
1325 enum ieee80211_frame_release_type reason,
1326 bool more_data),
1327
1328 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1329);
1330
1331DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1332 TP_PROTO(struct ieee80211_local *local,
1333 struct ieee80211_sta *sta,
1334 u16 tids, int num_frames,
1335 enum ieee80211_frame_release_type reason,
1336 bool more_data),
1337
1338 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1339);
1340
Johannes Berga1845fc2012-06-27 13:18:36 +02001341DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
1342 TP_PROTO(struct ieee80211_local *local,
1343 struct ieee80211_sub_if_data *sdata),
1344
1345 TP_ARGS(local, sdata)
1346);
1347
Arik Nemtsovee10f2c2014-06-11 17:18:27 +03001348DEFINE_EVENT(local_sdata_evt, drv_mgd_protect_tdls_discover,
1349 TP_PROTO(struct ieee80211_local *local,
1350 struct ieee80211_sub_if_data *sdata),
1351
1352 TP_ARGS(local, sdata)
1353);
1354
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001355DECLARE_EVENT_CLASS(local_chanctx,
1356 TP_PROTO(struct ieee80211_local *local,
1357 struct ieee80211_chanctx *ctx),
1358
1359 TP_ARGS(local, ctx),
1360
1361 TP_STRUCT__entry(
1362 LOCAL_ENTRY
1363 CHANCTX_ENTRY
1364 ),
1365
1366 TP_fast_assign(
1367 LOCAL_ASSIGN;
1368 CHANCTX_ASSIGN;
1369 ),
1370
1371 TP_printk(
1372 LOCAL_PR_FMT CHANCTX_PR_FMT,
1373 LOCAL_PR_ARG, CHANCTX_PR_ARG
1374 )
1375);
1376
1377DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1378 TP_PROTO(struct ieee80211_local *local,
1379 struct ieee80211_chanctx *ctx),
1380 TP_ARGS(local, ctx)
1381);
1382
1383DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1384 TP_PROTO(struct ieee80211_local *local,
1385 struct ieee80211_chanctx *ctx),
1386 TP_ARGS(local, ctx)
1387);
1388
1389TRACE_EVENT(drv_change_chanctx,
1390 TP_PROTO(struct ieee80211_local *local,
1391 struct ieee80211_chanctx *ctx,
1392 u32 changed),
1393
1394 TP_ARGS(local, ctx, changed),
1395
1396 TP_STRUCT__entry(
1397 LOCAL_ENTRY
1398 CHANCTX_ENTRY
1399 __field(u32, changed)
1400 ),
1401
1402 TP_fast_assign(
1403 LOCAL_ASSIGN;
1404 CHANCTX_ASSIGN;
1405 __entry->changed = changed;
1406 ),
1407
1408 TP_printk(
1409 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1410 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1411 )
1412);
1413
Luciano Coelho1a5f0c12014-05-23 14:33:12 +03001414#if !defined(__TRACE_VIF_ENTRY)
1415#define __TRACE_VIF_ENTRY
1416struct trace_vif_entry {
1417 enum nl80211_iftype vif_type;
1418 bool p2p;
1419 char vif_name[IFNAMSIZ];
1420} __packed;
1421
1422struct trace_chandef_entry {
1423 u32 control_freq;
1424 u32 chan_width;
1425 u32 center_freq1;
1426 u32 center_freq2;
1427} __packed;
1428
1429struct trace_switch_entry {
1430 struct trace_vif_entry vif;
1431 struct trace_chandef_entry old_chandef;
1432 struct trace_chandef_entry new_chandef;
1433} __packed;
1434
1435#define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
1436#endif
1437
1438TRACE_EVENT(drv_switch_vif_chanctx,
1439 TP_PROTO(struct ieee80211_local *local,
1440 struct ieee80211_vif_chanctx_switch *vifs,
1441 int n_vifs, enum ieee80211_chanctx_switch_mode mode),
1442 TP_ARGS(local, vifs, n_vifs, mode),
1443
1444 TP_STRUCT__entry(
1445 LOCAL_ENTRY
1446 __field(int, n_vifs)
1447 __field(u32, mode)
1448 __dynamic_array(u8, vifs,
1449 sizeof(struct trace_switch_entry) * n_vifs)
1450 ),
1451
1452 TP_fast_assign(
1453 LOCAL_ASSIGN;
1454 __entry->n_vifs = n_vifs;
1455 __entry->mode = mode;
1456 {
1457 struct trace_switch_entry *local_vifs =
1458 __get_dynamic_array(vifs);
1459 int i;
1460
1461 for (i = 0; i < n_vifs; i++) {
1462 struct ieee80211_sub_if_data *sdata;
1463
1464 sdata = container_of(vifs[i].vif,
1465 struct ieee80211_sub_if_data,
1466 vif);
1467
1468 SWITCH_ENTRY_ASSIGN(vif.vif_type, vif->type);
1469 SWITCH_ENTRY_ASSIGN(vif.p2p, vif->p2p);
1470 strncpy(local_vifs[i].vif.vif_name,
1471 sdata->name,
1472 sizeof(local_vifs[i].vif.vif_name));
1473 SWITCH_ENTRY_ASSIGN(old_chandef.control_freq,
1474 old_ctx->def.chan->center_freq);
1475 SWITCH_ENTRY_ASSIGN(old_chandef.chan_width,
1476 old_ctx->def.width);
1477 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq1,
1478 old_ctx->def.center_freq1);
1479 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq2,
1480 old_ctx->def.center_freq2);
1481 SWITCH_ENTRY_ASSIGN(new_chandef.control_freq,
1482 new_ctx->def.chan->center_freq);
1483 SWITCH_ENTRY_ASSIGN(new_chandef.chan_width,
1484 new_ctx->def.width);
1485 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq1,
1486 new_ctx->def.center_freq1);
1487 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq2,
1488 new_ctx->def.center_freq2);
1489 }
1490 }
1491 ),
1492
1493 TP_printk(
1494 LOCAL_PR_FMT " n_vifs:%d mode:%d",
1495 LOCAL_PR_ARG, __entry->n_vifs, __entry->mode
1496 )
1497);
1498
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001499DECLARE_EVENT_CLASS(local_sdata_chanctx,
1500 TP_PROTO(struct ieee80211_local *local,
1501 struct ieee80211_sub_if_data *sdata,
1502 struct ieee80211_chanctx *ctx),
1503
1504 TP_ARGS(local, sdata, ctx),
1505
1506 TP_STRUCT__entry(
1507 LOCAL_ENTRY
1508 VIF_ENTRY
1509 CHANCTX_ENTRY
1510 ),
1511
1512 TP_fast_assign(
1513 LOCAL_ASSIGN;
1514 VIF_ASSIGN;
1515 CHANCTX_ASSIGN;
1516 ),
1517
1518 TP_printk(
1519 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
1520 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
1521 )
1522);
1523
1524DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1525 TP_PROTO(struct ieee80211_local *local,
1526 struct ieee80211_sub_if_data *sdata,
1527 struct ieee80211_chanctx *ctx),
1528 TP_ARGS(local, sdata, ctx)
1529);
1530
1531DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1532 TP_PROTO(struct ieee80211_local *local,
1533 struct ieee80211_sub_if_data *sdata,
1534 struct ieee80211_chanctx *ctx),
1535 TP_ARGS(local, sdata, ctx)
1536);
1537
Johannes Berg10416382012-10-19 15:44:42 +02001538TRACE_EVENT(drv_start_ap,
1539 TP_PROTO(struct ieee80211_local *local,
1540 struct ieee80211_sub_if_data *sdata,
1541 struct ieee80211_bss_conf *info),
1542
1543 TP_ARGS(local, sdata, info),
1544
1545 TP_STRUCT__entry(
1546 LOCAL_ENTRY
1547 VIF_ENTRY
1548 __field(u8, dtimper)
1549 __field(u16, bcnint)
1550 __dynamic_array(u8, ssid, info->ssid_len);
1551 __field(bool, hidden_ssid);
1552 ),
1553
1554 TP_fast_assign(
1555 LOCAL_ASSIGN;
1556 VIF_ASSIGN;
1557 __entry->dtimper = info->dtim_period;
1558 __entry->bcnint = info->beacon_int;
1559 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1560 __entry->hidden_ssid = info->hidden_ssid;
1561 ),
1562
1563 TP_printk(
1564 LOCAL_PR_FMT VIF_PR_FMT,
1565 LOCAL_PR_ARG, VIF_PR_ARG
1566 )
1567);
1568
1569DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
1570 TP_PROTO(struct ieee80211_local *local,
1571 struct ieee80211_sub_if_data *sdata),
1572 TP_ARGS(local, sdata)
1573);
1574
Eliad Pellercf2c92d2014-11-04 11:43:54 +02001575TRACE_EVENT(drv_reconfig_complete,
1576 TP_PROTO(struct ieee80211_local *local,
1577 enum ieee80211_reconfig_type reconfig_type),
1578 TP_ARGS(local, reconfig_type),
1579
1580 TP_STRUCT__entry(
1581 LOCAL_ENTRY
1582 __field(u8, reconfig_type)
1583 ),
1584
1585 TP_fast_assign(
1586 LOCAL_ASSIGN;
1587 __entry->reconfig_type = reconfig_type;
1588 ),
1589
1590 TP_printk(
1591 LOCAL_PR_FMT " reconfig_type:%d",
1592 LOCAL_PR_ARG, __entry->reconfig_type
1593 )
1594
Johannes Berg9214ad72012-11-06 19:18:13 +01001595);
1596
Johannes Berga65240c2013-01-14 15:14:34 +01001597#if IS_ENABLED(CONFIG_IPV6)
1598DEFINE_EVENT(local_sdata_evt, drv_ipv6_addr_change,
1599 TP_PROTO(struct ieee80211_local *local,
1600 struct ieee80211_sub_if_data *sdata),
1601 TP_ARGS(local, sdata)
1602);
1603#endif
1604
Johannes Berg55fff502013-08-19 18:48:41 +02001605TRACE_EVENT(drv_join_ibss,
1606 TP_PROTO(struct ieee80211_local *local,
1607 struct ieee80211_sub_if_data *sdata,
1608 struct ieee80211_bss_conf *info),
1609
1610 TP_ARGS(local, sdata, info),
1611
1612 TP_STRUCT__entry(
1613 LOCAL_ENTRY
1614 VIF_ENTRY
1615 __field(u8, dtimper)
1616 __field(u16, bcnint)
1617 __dynamic_array(u8, ssid, info->ssid_len);
1618 ),
1619
1620 TP_fast_assign(
1621 LOCAL_ASSIGN;
1622 VIF_ASSIGN;
1623 __entry->dtimper = info->dtim_period;
1624 __entry->bcnint = info->beacon_int;
1625 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1626 ),
1627
1628 TP_printk(
1629 LOCAL_PR_FMT VIF_PR_FMT,
1630 LOCAL_PR_ARG, VIF_PR_ARG
1631 )
1632);
1633
1634DEFINE_EVENT(local_sdata_evt, drv_leave_ibss,
1635 TP_PROTO(struct ieee80211_local *local,
1636 struct ieee80211_sub_if_data *sdata),
1637 TP_ARGS(local, sdata)
1638);
1639
Antonio Quartullicca674d2014-05-19 21:53:20 +02001640TRACE_EVENT(drv_get_expected_throughput,
1641 TP_PROTO(struct ieee80211_sta *sta),
1642
1643 TP_ARGS(sta),
1644
1645 TP_STRUCT__entry(
1646 STA_ENTRY
1647 ),
1648
1649 TP_fast_assign(
1650 STA_ASSIGN;
1651 ),
1652
1653 TP_printk(
1654 STA_PR_FMT, STA_PR_ARG
1655 )
1656);
1657
Johannes Bergb5878a22010-04-07 16:48:40 +02001658/*
1659 * Tracing for API calls that drivers call.
1660 */
1661
1662TRACE_EVENT(api_start_tx_ba_session,
1663 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1664
1665 TP_ARGS(sta, tid),
1666
1667 TP_STRUCT__entry(
1668 STA_ENTRY
1669 __field(u16, tid)
1670 ),
1671
1672 TP_fast_assign(
1673 STA_ASSIGN;
1674 __entry->tid = tid;
1675 ),
1676
1677 TP_printk(
1678 STA_PR_FMT " tid:%d",
1679 STA_PR_ARG, __entry->tid
1680 )
1681);
1682
1683TRACE_EVENT(api_start_tx_ba_cb,
1684 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1685
1686 TP_ARGS(sdata, ra, tid),
1687
1688 TP_STRUCT__entry(
1689 VIF_ENTRY
1690 __array(u8, ra, ETH_ALEN)
1691 __field(u16, tid)
1692 ),
1693
1694 TP_fast_assign(
1695 VIF_ASSIGN;
1696 memcpy(__entry->ra, ra, ETH_ALEN);
1697 __entry->tid = tid;
1698 ),
1699
1700 TP_printk(
1701 VIF_PR_FMT " ra:%pM tid:%d",
1702 VIF_PR_ARG, __entry->ra, __entry->tid
1703 )
1704);
1705
1706TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001707 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001708
Johannes Berg6a8579d2010-05-27 14:41:07 +02001709 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001710
1711 TP_STRUCT__entry(
1712 STA_ENTRY
1713 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001714 ),
1715
1716 TP_fast_assign(
1717 STA_ASSIGN;
1718 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001719 ),
1720
1721 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001722 STA_PR_FMT " tid:%d",
1723 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001724 )
1725);
1726
1727TRACE_EVENT(api_stop_tx_ba_cb,
1728 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1729
1730 TP_ARGS(sdata, ra, tid),
1731
1732 TP_STRUCT__entry(
1733 VIF_ENTRY
1734 __array(u8, ra, ETH_ALEN)
1735 __field(u16, tid)
1736 ),
1737
1738 TP_fast_assign(
1739 VIF_ASSIGN;
1740 memcpy(__entry->ra, ra, ETH_ALEN);
1741 __entry->tid = tid;
1742 ),
1743
1744 TP_printk(
1745 VIF_PR_FMT " ra:%pM tid:%d",
1746 VIF_PR_ARG, __entry->ra, __entry->tid
1747 )
1748);
1749
Johannes Bergba99d932011-01-26 09:22:15 +01001750DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001751 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001752 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001753);
1754
1755TRACE_EVENT(api_beacon_loss,
1756 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1757
1758 TP_ARGS(sdata),
1759
1760 TP_STRUCT__entry(
1761 VIF_ENTRY
1762 ),
1763
1764 TP_fast_assign(
1765 VIF_ASSIGN;
1766 ),
1767
1768 TP_printk(
1769 VIF_PR_FMT,
1770 VIF_PR_ARG
1771 )
1772);
1773
1774TRACE_EVENT(api_connection_loss,
1775 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1776
1777 TP_ARGS(sdata),
1778
1779 TP_STRUCT__entry(
1780 VIF_ENTRY
1781 ),
1782
1783 TP_fast_assign(
1784 VIF_ASSIGN;
1785 ),
1786
1787 TP_printk(
1788 VIF_PR_FMT,
1789 VIF_PR_ARG
1790 )
1791);
1792
1793TRACE_EVENT(api_cqm_rssi_notify,
1794 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1795 enum nl80211_cqm_rssi_threshold_event rssi_event),
1796
1797 TP_ARGS(sdata, rssi_event),
1798
1799 TP_STRUCT__entry(
1800 VIF_ENTRY
1801 __field(u32, rssi_event)
1802 ),
1803
1804 TP_fast_assign(
1805 VIF_ASSIGN;
1806 __entry->rssi_event = rssi_event;
1807 ),
1808
1809 TP_printk(
1810 VIF_PR_FMT " event:%d",
1811 VIF_PR_ARG, __entry->rssi_event
1812 )
1813);
1814
Johannes Berg98f03342014-11-26 12:42:02 +01001815DEFINE_EVENT(local_sdata_evt, api_cqm_beacon_loss_notify,
1816 TP_PROTO(struct ieee80211_local *local,
1817 struct ieee80211_sub_if_data *sdata),
1818 TP_ARGS(local, sdata)
1819);
1820
Johannes Bergb5878a22010-04-07 16:48:40 +02001821TRACE_EVENT(api_scan_completed,
1822 TP_PROTO(struct ieee80211_local *local, bool aborted),
1823
1824 TP_ARGS(local, aborted),
1825
1826 TP_STRUCT__entry(
1827 LOCAL_ENTRY
1828 __field(bool, aborted)
1829 ),
1830
1831 TP_fast_assign(
1832 LOCAL_ASSIGN;
1833 __entry->aborted = aborted;
1834 ),
1835
1836 TP_printk(
1837 LOCAL_PR_FMT " aborted:%d",
1838 LOCAL_PR_ARG, __entry->aborted
1839 )
1840);
1841
Luciano Coelho79f460c2011-05-11 17:09:36 +03001842TRACE_EVENT(api_sched_scan_results,
1843 TP_PROTO(struct ieee80211_local *local),
1844
1845 TP_ARGS(local),
1846
1847 TP_STRUCT__entry(
1848 LOCAL_ENTRY
1849 ),
1850
1851 TP_fast_assign(
1852 LOCAL_ASSIGN;
1853 ),
1854
1855 TP_printk(
1856 LOCAL_PR_FMT, LOCAL_PR_ARG
1857 )
1858);
1859
1860TRACE_EVENT(api_sched_scan_stopped,
1861 TP_PROTO(struct ieee80211_local *local),
1862
1863 TP_ARGS(local),
1864
1865 TP_STRUCT__entry(
1866 LOCAL_ENTRY
1867 ),
1868
1869 TP_fast_assign(
1870 LOCAL_ASSIGN;
1871 ),
1872
1873 TP_printk(
1874 LOCAL_PR_FMT, LOCAL_PR_ARG
1875 )
1876);
1877
Johannes Bergb5878a22010-04-07 16:48:40 +02001878TRACE_EVENT(api_sta_block_awake,
1879 TP_PROTO(struct ieee80211_local *local,
1880 struct ieee80211_sta *sta, bool block),
1881
1882 TP_ARGS(local, sta, block),
1883
1884 TP_STRUCT__entry(
1885 LOCAL_ENTRY
1886 STA_ENTRY
1887 __field(bool, block)
1888 ),
1889
1890 TP_fast_assign(
1891 LOCAL_ASSIGN;
1892 STA_ASSIGN;
1893 __entry->block = block;
1894 ),
1895
1896 TP_printk(
1897 LOCAL_PR_FMT STA_PR_FMT " block:%d",
Seth Forshee15ac7c42013-02-15 13:15:48 -06001898 LOCAL_PR_ARG, STA_PR_ARG, __entry->block
Johannes Bergb5878a22010-04-07 16:48:40 +02001899 )
1900);
1901
Johannes Berg5ce6e432010-05-11 16:20:57 +02001902TRACE_EVENT(api_chswitch_done,
1903 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1904
1905 TP_ARGS(sdata, success),
1906
1907 TP_STRUCT__entry(
1908 VIF_ENTRY
1909 __field(bool, success)
1910 ),
1911
1912 TP_fast_assign(
1913 VIF_ASSIGN;
1914 __entry->success = success;
1915 ),
1916
1917 TP_printk(
1918 VIF_PR_FMT " success=%d",
1919 VIF_PR_ARG, __entry->success
1920 )
1921);
1922
Johannes Bergba99d932011-01-26 09:22:15 +01001923DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001924 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001925 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001926);
1927
Johannes Bergba99d932011-01-26 09:22:15 +01001928DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001929 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001930 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001931);
1932
Johannes Bergc68f4b82011-07-05 16:35:41 +02001933TRACE_EVENT(api_gtk_rekey_notify,
1934 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1935 const u8 *bssid, const u8 *replay_ctr),
1936
1937 TP_ARGS(sdata, bssid, replay_ctr),
1938
1939 TP_STRUCT__entry(
1940 VIF_ENTRY
1941 __array(u8, bssid, ETH_ALEN)
1942 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1943 ),
1944
1945 TP_fast_assign(
1946 VIF_ASSIGN;
1947 memcpy(__entry->bssid, bssid, ETH_ALEN);
1948 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1949 ),
1950
1951 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1952);
1953
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001954TRACE_EVENT(api_enable_rssi_reports,
1955 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1956 int rssi_min_thold, int rssi_max_thold),
1957
1958 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1959
1960 TP_STRUCT__entry(
1961 VIF_ENTRY
1962 __field(int, rssi_min_thold)
1963 __field(int, rssi_max_thold)
1964 ),
1965
1966 TP_fast_assign(
1967 VIF_ASSIGN;
1968 __entry->rssi_min_thold = rssi_min_thold;
1969 __entry->rssi_max_thold = rssi_max_thold;
1970 ),
1971
1972 TP_printk(
1973 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
1974 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
1975 )
1976);
1977
Johannes Berg37fbd902011-09-29 16:04:39 +02001978TRACE_EVENT(api_eosp,
1979 TP_PROTO(struct ieee80211_local *local,
1980 struct ieee80211_sta *sta),
1981
1982 TP_ARGS(local, sta),
1983
1984 TP_STRUCT__entry(
1985 LOCAL_ENTRY
1986 STA_ENTRY
1987 ),
1988
1989 TP_fast_assign(
1990 LOCAL_ASSIGN;
1991 STA_ASSIGN;
1992 ),
1993
1994 TP_printk(
1995 LOCAL_PR_FMT STA_PR_FMT,
Seth Forshee15ac7c42013-02-15 13:15:48 -06001996 LOCAL_PR_ARG, STA_PR_ARG
Johannes Berg37fbd902011-09-29 16:04:39 +02001997 )
1998);
1999
Johannes Berg1b000782013-12-19 10:47:48 +01002000TRACE_EVENT(api_sta_set_buffered,
2001 TP_PROTO(struct ieee80211_local *local,
2002 struct ieee80211_sta *sta,
2003 u8 tid, bool buffered),
2004
2005 TP_ARGS(local, sta, tid, buffered),
2006
2007 TP_STRUCT__entry(
2008 LOCAL_ENTRY
2009 STA_ENTRY
2010 __field(u8, tid)
2011 __field(bool, buffered)
2012 ),
2013
2014 TP_fast_assign(
2015 LOCAL_ASSIGN;
2016 STA_ASSIGN;
2017 __entry->tid = tid;
2018 __entry->buffered = buffered;
2019 ),
2020
2021 TP_printk(
2022 LOCAL_PR_FMT STA_PR_FMT " tid:%d buffered:%d",
2023 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid, __entry->buffered
2024 )
2025);
2026
Johannes Bergb5878a22010-04-07 16:48:40 +02002027/*
2028 * Tracing for internal functions
2029 * (which may also be called in response to driver calls)
2030 */
2031
2032TRACE_EVENT(wake_queue,
2033 TP_PROTO(struct ieee80211_local *local, u16 queue,
2034 enum queue_stop_reason reason),
2035
2036 TP_ARGS(local, queue, reason),
2037
2038 TP_STRUCT__entry(
2039 LOCAL_ENTRY
2040 __field(u16, queue)
2041 __field(u32, reason)
2042 ),
2043
2044 TP_fast_assign(
2045 LOCAL_ASSIGN;
2046 __entry->queue = queue;
2047 __entry->reason = reason;
2048 ),
2049
2050 TP_printk(
2051 LOCAL_PR_FMT " queue:%d, reason:%d",
2052 LOCAL_PR_ARG, __entry->queue, __entry->reason
2053 )
2054);
2055
2056TRACE_EVENT(stop_queue,
2057 TP_PROTO(struct ieee80211_local *local, u16 queue,
2058 enum queue_stop_reason reason),
2059
2060 TP_ARGS(local, queue, reason),
2061
2062 TP_STRUCT__entry(
2063 LOCAL_ENTRY
2064 __field(u16, queue)
2065 __field(u32, reason)
2066 ),
2067
2068 TP_fast_assign(
2069 LOCAL_ASSIGN;
2070 __entry->queue = queue;
2071 __entry->reason = reason;
2072 ),
2073
2074 TP_printk(
2075 LOCAL_PR_FMT " queue:%d, reason:%d",
2076 LOCAL_PR_ARG, __entry->queue, __entry->reason
2077 )
2078);
Johannes Berg3fae0272012-06-22 13:36:25 +02002079
Yoni Divinskyde5fad82012-05-30 11:36:39 +03002080TRACE_EVENT(drv_set_default_unicast_key,
2081 TP_PROTO(struct ieee80211_local *local,
2082 struct ieee80211_sub_if_data *sdata,
2083 int key_idx),
2084
2085 TP_ARGS(local, sdata, key_idx),
2086
2087 TP_STRUCT__entry(
2088 LOCAL_ENTRY
2089 VIF_ENTRY
2090 __field(int, key_idx)
2091 ),
2092
2093 TP_fast_assign(
2094 LOCAL_ASSIGN;
2095 VIF_ASSIGN;
2096 __entry->key_idx = key_idx;
2097 ),
2098
2099 TP_printk(LOCAL_PR_FMT VIF_PR_FMT " key_idx:%d",
2100 LOCAL_PR_ARG, VIF_PR_ARG, __entry->key_idx)
2101);
2102
Simon Wunderlich164eb022013-02-08 18:16:20 +01002103TRACE_EVENT(api_radar_detected,
2104 TP_PROTO(struct ieee80211_local *local),
2105
2106 TP_ARGS(local),
2107
2108 TP_STRUCT__entry(
2109 LOCAL_ENTRY
2110 ),
2111
2112 TP_fast_assign(
2113 LOCAL_ASSIGN;
2114 ),
2115
2116 TP_printk(
2117 LOCAL_PR_FMT " radar detected",
2118 LOCAL_PR_ARG
2119 )
2120);
2121
Simon Wunderlich73da7d52013-07-11 16:09:06 +02002122TRACE_EVENT(drv_channel_switch_beacon,
2123 TP_PROTO(struct ieee80211_local *local,
2124 struct ieee80211_sub_if_data *sdata,
2125 struct cfg80211_chan_def *chandef),
2126
2127 TP_ARGS(local, sdata, chandef),
2128
2129 TP_STRUCT__entry(
2130 LOCAL_ENTRY
2131 VIF_ENTRY
2132 CHANDEF_ENTRY
2133 ),
2134
2135 TP_fast_assign(
2136 LOCAL_ASSIGN;
2137 VIF_ASSIGN;
2138 CHANDEF_ASSIGN(chandef);
2139 ),
2140
2141 TP_printk(
2142 LOCAL_PR_FMT VIF_PR_FMT " channel switch to " CHANDEF_PR_FMT,
2143 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG
2144 )
2145);
2146
Luciano Coelho6d027bc2014-10-08 09:48:37 +03002147TRACE_EVENT(drv_pre_channel_switch,
2148 TP_PROTO(struct ieee80211_local *local,
2149 struct ieee80211_sub_if_data *sdata,
2150 struct ieee80211_channel_switch *ch_switch),
2151
2152 TP_ARGS(local, sdata, ch_switch),
2153
2154 TP_STRUCT__entry(
2155 LOCAL_ENTRY
2156 VIF_ENTRY
2157 CHANDEF_ENTRY
2158 __field(u64, timestamp)
Luciano Coelho127f10e2014-11-07 15:28:34 +02002159 __field(u32, device_timestamp)
Luciano Coelho6d027bc2014-10-08 09:48:37 +03002160 __field(bool, block_tx)
2161 __field(u8, count)
2162 ),
2163
2164 TP_fast_assign(
2165 LOCAL_ASSIGN;
2166 VIF_ASSIGN;
2167 CHANDEF_ASSIGN(&ch_switch->chandef)
2168 __entry->timestamp = ch_switch->timestamp;
Luciano Coelho127f10e2014-11-07 15:28:34 +02002169 __entry->device_timestamp = ch_switch->device_timestamp;
Luciano Coelho6d027bc2014-10-08 09:48:37 +03002170 __entry->block_tx = ch_switch->block_tx;
2171 __entry->count = ch_switch->count;
2172 ),
2173
2174 TP_printk(
2175 LOCAL_PR_FMT VIF_PR_FMT " prepare channel switch to "
2176 CHANDEF_PR_FMT " count:%d block_tx:%d timestamp:%llu",
2177 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count,
2178 __entry->block_tx, __entry->timestamp
2179 )
2180);
2181
Luciano Coelhof1d65582014-10-08 09:48:38 +03002182DEFINE_EVENT(local_sdata_evt, drv_post_channel_switch,
2183 TP_PROTO(struct ieee80211_local *local,
2184 struct ieee80211_sub_if_data *sdata),
2185 TP_ARGS(local, sdata)
2186);
2187
Felix Fietkau5b3dc422014-10-26 00:32:53 +02002188TRACE_EVENT(drv_get_txpower,
2189 TP_PROTO(struct ieee80211_local *local,
2190 struct ieee80211_sub_if_data *sdata,
2191 int dbm, int ret),
2192
2193 TP_ARGS(local, sdata, dbm, ret),
2194
2195 TP_STRUCT__entry(
2196 LOCAL_ENTRY
2197 VIF_ENTRY
2198 __field(int, dbm)
2199 __field(int, ret)
2200 ),
2201
2202 TP_fast_assign(
2203 LOCAL_ASSIGN;
2204 VIF_ASSIGN;
2205 __entry->dbm = dbm;
2206 __entry->ret = ret;
2207 ),
2208
2209 TP_printk(
2210 LOCAL_PR_FMT VIF_PR_FMT " dbm:%d ret:%d",
2211 LOCAL_PR_ARG, VIF_PR_ARG, __entry->dbm, __entry->ret
2212 )
2213);
2214
Arik Nemtsova7a6bdd2014-11-09 18:50:19 +02002215TRACE_EVENT(drv_tdls_channel_switch,
2216 TP_PROTO(struct ieee80211_local *local,
2217 struct ieee80211_sub_if_data *sdata,
2218 struct ieee80211_sta *sta, u8 oper_class,
2219 struct cfg80211_chan_def *chandef),
2220
2221 TP_ARGS(local, sdata, sta, oper_class, chandef),
2222
2223 TP_STRUCT__entry(
2224 LOCAL_ENTRY
2225 VIF_ENTRY
2226 STA_ENTRY
2227 __field(u8, oper_class)
2228 CHANDEF_ENTRY
2229 ),
2230
2231 TP_fast_assign(
2232 LOCAL_ASSIGN;
2233 VIF_ASSIGN;
2234 STA_ASSIGN;
2235 __entry->oper_class = oper_class;
2236 CHANDEF_ASSIGN(chandef)
2237 ),
2238
2239 TP_printk(
2240 LOCAL_PR_FMT VIF_PR_FMT " tdls channel switch to"
2241 CHANDEF_PR_FMT " oper_class:%d " STA_PR_FMT,
2242 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->oper_class,
2243 STA_PR_ARG
2244 )
2245);
2246
2247TRACE_EVENT(drv_tdls_cancel_channel_switch,
2248 TP_PROTO(struct ieee80211_local *local,
2249 struct ieee80211_sub_if_data *sdata,
2250 struct ieee80211_sta *sta),
2251
2252 TP_ARGS(local, sdata, sta),
2253
2254 TP_STRUCT__entry(
2255 LOCAL_ENTRY
2256 VIF_ENTRY
2257 STA_ENTRY
2258 ),
2259
2260 TP_fast_assign(
2261 LOCAL_ASSIGN;
2262 VIF_ASSIGN;
2263 STA_ASSIGN;
2264 ),
2265
2266 TP_printk(
2267 LOCAL_PR_FMT VIF_PR_FMT
2268 " tdls cancel channel switch with " STA_PR_FMT,
2269 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
2270 )
2271);
Simon Wunderlich73da7d52013-07-11 16:09:06 +02002272
Arik Nemtsov8a4d32f2014-11-09 18:50:20 +02002273TRACE_EVENT(drv_tdls_recv_channel_switch,
2274 TP_PROTO(struct ieee80211_local *local,
2275 struct ieee80211_sub_if_data *sdata,
2276 struct ieee80211_tdls_ch_sw_params *params),
2277
2278 TP_ARGS(local, sdata, params),
2279
2280 TP_STRUCT__entry(
2281 LOCAL_ENTRY
2282 VIF_ENTRY
2283 __field(u8, action_code)
2284 STA_ENTRY
2285 CHANDEF_ENTRY
2286 __field(u32, status)
2287 __field(bool, peer_initiator)
2288 __field(u32, timestamp)
2289 __field(u16, switch_time)
2290 __field(u16, switch_timeout)
2291 ),
2292
2293 TP_fast_assign(
2294 LOCAL_ASSIGN;
2295 VIF_ASSIGN;
2296 STA_NAMED_ASSIGN(params->sta);
2297 CHANDEF_ASSIGN(params->chandef)
2298 __entry->peer_initiator = params->sta->tdls_initiator;
2299 __entry->action_code = params->action_code;
2300 __entry->status = params->status;
2301 __entry->timestamp = params->timestamp;
2302 __entry->switch_time = params->switch_time;
2303 __entry->switch_timeout = params->switch_timeout;
2304 ),
2305
2306 TP_printk(
2307 LOCAL_PR_FMT VIF_PR_FMT " received tdls channel switch packet"
2308 " action:%d status:%d time:%d switch time:%d switch"
2309 " timeout:%d initiator: %d chan:" CHANDEF_PR_FMT STA_PR_FMT,
2310 LOCAL_PR_ARG, VIF_PR_ARG, __entry->action_code, __entry->status,
2311 __entry->timestamp, __entry->switch_time,
2312 __entry->switch_timeout, __entry->peer_initiator,
2313 CHANDEF_PR_ARG, STA_PR_ARG
2314 )
2315);
2316
Felix Fietkauba8c3d62015-03-27 21:30:37 +01002317TRACE_EVENT(drv_wake_tx_queue,
2318 TP_PROTO(struct ieee80211_local *local,
2319 struct ieee80211_sub_if_data *sdata,
2320 struct txq_info *txq),
2321
2322 TP_ARGS(local, sdata, txq),
2323
2324 TP_STRUCT__entry(
2325 LOCAL_ENTRY
2326 VIF_ENTRY
2327 STA_ENTRY
2328 __field(u8, ac)
2329 __field(u8, tid)
2330 ),
2331
2332 TP_fast_assign(
2333 struct ieee80211_sta *sta = txq->txq.sta;
2334
2335 LOCAL_ASSIGN;
2336 VIF_ASSIGN;
2337 STA_ASSIGN;
2338 __entry->ac = txq->txq.ac;
2339 __entry->tid = txq->txq.tid;
2340 ),
2341
2342 TP_printk(
2343 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ac:%d tid:%d",
2344 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ac, __entry->tid
2345 )
2346);
2347
Christian Lamparterf7428802009-07-19 23:21:07 +02002348#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02002349
2350#undef TRACE_INCLUDE_PATH
2351#define TRACE_INCLUDE_PATH .
2352#undef TRACE_INCLUDE_FILE
Johannes Berg011ad0e2012-06-22 12:55:52 +02002353#define TRACE_INCLUDE_FILE trace
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02002354#include <trace/define_trace.h>