blob: 38fae7ebe984a621540328b6bdad28dcd632fccb [file] [log] [blame]
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02001#if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
2#define __MAC80211_DRIVER_TRACE
3
4#include <linux/tracepoint.h>
5#include <net/mac80211.h>
6#include "ieee80211_i.h"
7
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02008#undef TRACE_SYSTEM
9#define TRACE_SYSTEM mac80211
10
11#define MAXNAME 32
12#define LOCAL_ENTRY __array(char, wiphy_name, 32)
13#define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME)
14#define LOCAL_PR_FMT "%s"
15#define LOCAL_PR_ARG __entry->wiphy_name
16
17#define STA_ENTRY __array(char, sta_addr, ETH_ALEN)
18#define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN))
19#define STA_PR_FMT " sta:%pM"
20#define STA_PR_ARG __entry->sta_addr
21
Johannes Berg2ca27bc2010-09-16 14:58:23 +020022#define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
23 __field(bool, p2p) \
Eliad Pellerf9ac71b2014-02-26 14:46:35 +020024 __string(vif_name, sdata->name)
Johannes Berg2ca27bc2010-09-16 14:58:23 +020025#define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
26 __entry->p2p = sdata->vif.p2p; \
Eliad Pellerf9ac71b2014-02-26 14:46:35 +020027 __assign_str(vif_name, sdata->name)
Johannes Berg2ca27bc2010-09-16 14:58:23 +020028#define VIF_PR_FMT " vif:%s(%d%s)"
29#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
Johannes Berg0a2b8bb2009-07-07 13:46:22 +020030
Karl Beldan675a0b02013-03-25 16:26:57 +010031#define CHANDEF_ENTRY __field(u32, control_freq) \
32 __field(u32, chan_width) \
33 __field(u32, center_freq1) \
Johannes Berg5a32aff2012-12-21 12:36:33 +010034 __field(u32, center_freq2)
Karl Beldan675a0b02013-03-25 16:26:57 +010035#define CHANDEF_ASSIGN(c) \
36 __entry->control_freq = (c)->chan ? (c)->chan->center_freq : 0; \
37 __entry->chan_width = (c)->width; \
38 __entry->center_freq1 = (c)->center_freq1; \
Johannes Berg757af6f2013-02-08 21:29:59 +010039 __entry->center_freq2 = (c)->center_freq2;
Johannes Berg5a32aff2012-12-21 12:36:33 +010040#define CHANDEF_PR_FMT " control:%d MHz width:%d center: %d/%d MHz"
Karl Beldan675a0b02013-03-25 16:26:57 +010041#define CHANDEF_PR_ARG __entry->control_freq, __entry->chan_width, \
Johannes Berg5a32aff2012-12-21 12:36:33 +010042 __entry->center_freq1, __entry->center_freq2
43
Eliad Peller21f659b2013-11-11 20:14:01 +020044#define MIN_CHANDEF_ENTRY \
45 __field(u32, min_control_freq) \
46 __field(u32, min_chan_width) \
47 __field(u32, min_center_freq1) \
48 __field(u32, min_center_freq2)
49
50#define MIN_CHANDEF_ASSIGN(c) \
51 __entry->min_control_freq = (c)->chan ? (c)->chan->center_freq : 0; \
52 __entry->min_chan_width = (c)->width; \
53 __entry->min_center_freq1 = (c)->center_freq1; \
54 __entry->min_center_freq2 = (c)->center_freq2;
55#define MIN_CHANDEF_PR_FMT " min_control:%d MHz min_width:%d min_center: %d/%d MHz"
56#define MIN_CHANDEF_PR_ARG __entry->min_control_freq, __entry->min_chan_width, \
57 __entry->min_center_freq1, __entry->min_center_freq2
58
Karl Beldan675a0b02013-03-25 16:26:57 +010059#define CHANCTX_ENTRY CHANDEF_ENTRY \
Eliad Peller21f659b2013-11-11 20:14:01 +020060 MIN_CHANDEF_ENTRY \
Karl Beldan675a0b02013-03-25 16:26:57 +010061 __field(u8, rx_chains_static) \
Johannes Berg04ecd252012-09-11 14:34:12 +020062 __field(u8, rx_chains_dynamic)
Karl Beldan675a0b02013-03-25 16:26:57 +010063#define CHANCTX_ASSIGN CHANDEF_ASSIGN(&ctx->conf.def) \
Eliad Peller21f659b2013-11-11 20:14:01 +020064 MIN_CHANDEF_ASSIGN(&ctx->conf.min_def) \
Karl Beldan675a0b02013-03-25 16:26:57 +010065 __entry->rx_chains_static = ctx->conf.rx_chains_static; \
Johannes Berg04ecd252012-09-11 14:34:12 +020066 __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic
Eliad Peller21f659b2013-11-11 20:14:01 +020067#define CHANCTX_PR_FMT CHANDEF_PR_FMT MIN_CHANDEF_PR_FMT " chains:%d/%d"
68#define CHANCTX_PR_ARG CHANDEF_PR_ARG, MIN_CHANDEF_PR_ARG, \
Johannes Berg04ecd252012-09-11 14:34:12 +020069 __entry->rx_chains_static, __entry->rx_chains_dynamic
Michal Kaziorc3645ea2012-06-26 14:37:17 +020070
71
72
Johannes Bergb5878a22010-04-07 16:48:40 +020073/*
74 * Tracing for driver callbacks.
75 */
76
Johannes Bergba99d932011-01-26 09:22:15 +010077DECLARE_EVENT_CLASS(local_only_evt,
Johannes Berg4efc76b2010-06-10 10:56:20 +020078 TP_PROTO(struct ieee80211_local *local),
79 TP_ARGS(local),
80 TP_STRUCT__entry(
81 LOCAL_ENTRY
82 ),
83 TP_fast_assign(
84 LOCAL_ASSIGN;
85 ),
86 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
87);
88
Luciano Coelho92ddc112011-05-09 14:40:06 +030089DECLARE_EVENT_CLASS(local_sdata_addr_evt,
90 TP_PROTO(struct ieee80211_local *local,
91 struct ieee80211_sub_if_data *sdata),
92 TP_ARGS(local, sdata),
93
94 TP_STRUCT__entry(
95 LOCAL_ENTRY
96 VIF_ENTRY
Joe Perchesd458cdf2013-10-01 19:04:40 -070097 __array(char, addr, ETH_ALEN)
Luciano Coelho92ddc112011-05-09 14:40:06 +030098 ),
99
100 TP_fast_assign(
101 LOCAL_ASSIGN;
102 VIF_ASSIGN;
Joe Perchesd458cdf2013-10-01 19:04:40 -0700103 memcpy(__entry->addr, sdata->vif.addr, ETH_ALEN);
Luciano Coelho92ddc112011-05-09 14:40:06 +0300104 ),
105
106 TP_printk(
107 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
108 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
109 )
110);
111
112DECLARE_EVENT_CLASS(local_u32_evt,
113 TP_PROTO(struct ieee80211_local *local, u32 value),
114 TP_ARGS(local, value),
115
116 TP_STRUCT__entry(
117 LOCAL_ENTRY
118 __field(u32, value)
119 ),
120
121 TP_fast_assign(
122 LOCAL_ASSIGN;
123 __entry->value = value;
124 ),
125
126 TP_printk(
127 LOCAL_PR_FMT " value:%d",
128 LOCAL_PR_ARG, __entry->value
129 )
130);
131
Luciano Coelho79f460c2011-05-11 17:09:36 +0300132DECLARE_EVENT_CLASS(local_sdata_evt,
133 TP_PROTO(struct ieee80211_local *local,
134 struct ieee80211_sub_if_data *sdata),
135 TP_ARGS(local, sdata),
136
137 TP_STRUCT__entry(
138 LOCAL_ENTRY
139 VIF_ENTRY
140 ),
141
142 TP_fast_assign(
143 LOCAL_ASSIGN;
144 VIF_ASSIGN;
145 ),
146
147 TP_printk(
148 LOCAL_PR_FMT VIF_PR_FMT,
149 LOCAL_PR_ARG, VIF_PR_ARG
150 )
151);
152
Johannes Bergba99d932011-01-26 09:22:15 +0100153DEFINE_EVENT(local_only_evt, drv_return_void,
154 TP_PROTO(struct ieee80211_local *local),
155 TP_ARGS(local)
156);
157
Johannes Berg4efc76b2010-06-10 10:56:20 +0200158TRACE_EVENT(drv_return_int,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200159 TP_PROTO(struct ieee80211_local *local, int ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200160 TP_ARGS(local, ret),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200161 TP_STRUCT__entry(
162 LOCAL_ENTRY
163 __field(int, ret)
164 ),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200165 TP_fast_assign(
166 LOCAL_ASSIGN;
167 __entry->ret = ret;
168 ),
Johannes Berg4efc76b2010-06-10 10:56:20 +0200169 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
170);
171
Vivek Natarajane8306f92011-04-06 11:41:10 +0530172TRACE_EVENT(drv_return_bool,
173 TP_PROTO(struct ieee80211_local *local, bool ret),
174 TP_ARGS(local, ret),
175 TP_STRUCT__entry(
176 LOCAL_ENTRY
177 __field(bool, ret)
178 ),
179 TP_fast_assign(
180 LOCAL_ASSIGN;
181 __entry->ret = ret;
182 ),
183 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
184 "true" : "false")
185);
186
Antonio Quartullicca674d2014-05-19 21:53:20 +0200187TRACE_EVENT(drv_return_u32,
188 TP_PROTO(struct ieee80211_local *local, u32 ret),
189 TP_ARGS(local, ret),
190 TP_STRUCT__entry(
191 LOCAL_ENTRY
192 __field(u32, ret)
193 ),
194 TP_fast_assign(
195 LOCAL_ASSIGN;
196 __entry->ret = ret;
197 ),
198 TP_printk(LOCAL_PR_FMT " - %u", LOCAL_PR_ARG, __entry->ret)
199);
200
Johannes Berg4efc76b2010-06-10 10:56:20 +0200201TRACE_EVENT(drv_return_u64,
202 TP_PROTO(struct ieee80211_local *local, u64 ret),
203 TP_ARGS(local, ret),
204 TP_STRUCT__entry(
205 LOCAL_ENTRY
206 __field(u64, ret)
207 ),
208 TP_fast_assign(
209 LOCAL_ASSIGN;
210 __entry->ret = ret;
211 ),
212 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
213);
214
Johannes Bergba99d932011-01-26 09:22:15 +0100215DEFINE_EVENT(local_only_evt, drv_start,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200216 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100217 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200218);
219
Ben Greeare3521142012-04-23 12:50:31 -0700220DEFINE_EVENT(local_u32_evt, drv_get_et_strings,
221 TP_PROTO(struct ieee80211_local *local, u32 sset),
222 TP_ARGS(local, sset)
223);
224
225DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count,
226 TP_PROTO(struct ieee80211_local *local, u32 sset),
227 TP_ARGS(local, sset)
228);
229
230DEFINE_EVENT(local_only_evt, drv_get_et_stats,
231 TP_PROTO(struct ieee80211_local *local),
232 TP_ARGS(local)
233);
234
Johannes Bergeecc4802011-05-04 15:37:29 +0200235DEFINE_EVENT(local_only_evt, drv_suspend,
236 TP_PROTO(struct ieee80211_local *local),
237 TP_ARGS(local)
238);
239
240DEFINE_EVENT(local_only_evt, drv_resume,
241 TP_PROTO(struct ieee80211_local *local),
242 TP_ARGS(local)
243);
244
Johannes Berg6d525632012-04-04 15:05:25 +0200245TRACE_EVENT(drv_set_wakeup,
246 TP_PROTO(struct ieee80211_local *local, bool enabled),
247 TP_ARGS(local, enabled),
248 TP_STRUCT__entry(
249 LOCAL_ENTRY
250 __field(bool, enabled)
251 ),
252 TP_fast_assign(
253 LOCAL_ASSIGN;
254 __entry->enabled = enabled;
255 ),
256 TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
257);
258
Johannes Bergba99d932011-01-26 09:22:15 +0100259DEFINE_EVENT(local_only_evt, drv_stop,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200260 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100261 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200262);
263
Luciano Coelho92ddc112011-05-09 14:40:06 +0300264DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200265 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200266 struct ieee80211_sub_if_data *sdata),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300267 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200268);
269
Johannes Berg34d4bc42010-08-27 12:35:58 +0200270TRACE_EVENT(drv_change_interface,
271 TP_PROTO(struct ieee80211_local *local,
272 struct ieee80211_sub_if_data *sdata,
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200273 enum nl80211_iftype type, bool p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200274
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200275 TP_ARGS(local, sdata, type, p2p),
Johannes Berg34d4bc42010-08-27 12:35:58 +0200276
277 TP_STRUCT__entry(
278 LOCAL_ENTRY
279 VIF_ENTRY
280 __field(u32, new_type)
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200281 __field(bool, new_p2p)
Johannes Berg34d4bc42010-08-27 12:35:58 +0200282 ),
283
284 TP_fast_assign(
285 LOCAL_ASSIGN;
286 VIF_ASSIGN;
287 __entry->new_type = type;
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200288 __entry->new_p2p = p2p;
Johannes Berg34d4bc42010-08-27 12:35:58 +0200289 ),
290
291 TP_printk(
Johannes Berg2ca27bc2010-09-16 14:58:23 +0200292 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
293 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
294 __entry->new_p2p ? "/p2p" : ""
Johannes Berg34d4bc42010-08-27 12:35:58 +0200295 )
296);
297
Luciano Coelho92ddc112011-05-09 14:40:06 +0300298DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
299 TP_PROTO(struct ieee80211_local *local,
300 struct ieee80211_sub_if_data *sdata),
301 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200302);
303
304TRACE_EVENT(drv_config,
305 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200306 u32 changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200307
Johannes Berg4efc76b2010-06-10 10:56:20 +0200308 TP_ARGS(local, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200309
310 TP_STRUCT__entry(
311 LOCAL_ENTRY
312 __field(u32, changed)
Johannes Bergf911ab82009-11-25 19:07:20 +0100313 __field(u32, flags)
314 __field(int, power_level)
315 __field(int, dynamic_ps_timeout)
316 __field(int, max_sleep_period)
317 __field(u16, listen_interval)
318 __field(u8, long_frame_max_tx_count)
319 __field(u8, short_frame_max_tx_count)
Karl Beldan675a0b02013-03-25 16:26:57 +0100320 CHANDEF_ENTRY
Johannes Berg0f782312009-12-01 13:37:02 +0100321 __field(int, smps)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200322 ),
323
324 TP_fast_assign(
325 LOCAL_ASSIGN;
326 __entry->changed = changed;
Johannes Bergf911ab82009-11-25 19:07:20 +0100327 __entry->flags = local->hw.conf.flags;
328 __entry->power_level = local->hw.conf.power_level;
329 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
330 __entry->max_sleep_period = local->hw.conf.max_sleep_period;
331 __entry->listen_interval = local->hw.conf.listen_interval;
Johannes Berg3d01be72012-07-26 14:27:39 +0200332 __entry->long_frame_max_tx_count =
333 local->hw.conf.long_frame_max_tx_count;
334 __entry->short_frame_max_tx_count =
335 local->hw.conf.short_frame_max_tx_count;
Karl Beldan675a0b02013-03-25 16:26:57 +0100336 CHANDEF_ASSIGN(&local->hw.conf.chandef)
Johannes Berg0f782312009-12-01 13:37:02 +0100337 __entry->smps = local->hw.conf.smps_mode;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200338 ),
339
340 TP_printk(
Karl Beldan675a0b02013-03-25 16:26:57 +0100341 LOCAL_PR_FMT " ch:%#x" CHANDEF_PR_FMT,
342 LOCAL_PR_ARG, __entry->changed, CHANDEF_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200343 )
344);
345
346TRACE_EVENT(drv_bss_info_changed,
347 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100348 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200349 struct ieee80211_bss_conf *info,
350 u32 changed),
351
Johannes Berg12375ef2009-11-25 20:30:31 +0100352 TP_ARGS(local, sdata, info, changed),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200353
354 TP_STRUCT__entry(
355 LOCAL_ENTRY
356 VIF_ENTRY
Johannes Berg1724ffb2012-10-24 11:38:30 +0200357 __field(u32, changed)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200358 __field(bool, assoc)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200359 __field(bool, ibss_joined)
360 __field(bool, ibss_creator)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200361 __field(u16, aid)
362 __field(bool, cts)
363 __field(bool, shortpre)
364 __field(bool, shortslot)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200365 __field(bool, enable_beacon)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200366 __field(u8, dtimper)
367 __field(u16, bcnint)
368 __field(u16, assoc_cap)
Johannes Berg8c358bc2012-05-22 22:13:05 +0200369 __field(u64, sync_tsf)
370 __field(u32, sync_device_ts)
Johannes Bergef429da2013-02-05 17:48:40 +0100371 __field(u8, sync_dtim_count)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200372 __field(u32, basic_rates)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200373 __array(int, mcast_rate, IEEE80211_NUM_BANDS)
Johannes Bergf911ab82009-11-25 19:07:20 +0100374 __field(u16, ht_operation_mode)
Johannes Berg1724ffb2012-10-24 11:38:30 +0200375 __field(s32, cqm_rssi_thold);
376 __field(s32, cqm_rssi_hyst);
Johannes Berg4bf88532012-11-09 11:39:59 +0100377 __field(u32, channel_width);
378 __field(u32, channel_cfreq1);
Johannes Berg0f19b412013-01-14 16:39:07 +0100379 __dynamic_array(u32, arp_addr_list,
380 info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
381 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
382 info->arp_addr_cnt);
383 __field(int, arp_addr_cnt);
Johannes Berg1724ffb2012-10-24 11:38:30 +0200384 __field(bool, qos);
385 __field(bool, idle);
386 __field(bool, ps);
387 __dynamic_array(u8, ssid, info->ssid_len);
388 __field(bool, hidden_ssid);
Johannes Berg1ea6f9c2012-10-24 10:59:25 +0200389 __field(int, txpower)
Janusz Dziedzic67baf662013-03-21 15:47:56 +0100390 __field(u8, p2p_oppps_ctwindow)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200391 ),
392
393 TP_fast_assign(
394 LOCAL_ASSIGN;
395 VIF_ASSIGN;
396 __entry->changed = changed;
397 __entry->aid = info->aid;
398 __entry->assoc = info->assoc;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200399 __entry->ibss_joined = info->ibss_joined;
400 __entry->ibss_creator = info->ibss_creator;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200401 __entry->shortpre = info->use_short_preamble;
402 __entry->cts = info->use_cts_prot;
403 __entry->shortslot = info->use_short_slot;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200404 __entry->enable_beacon = info->enable_beacon;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200405 __entry->dtimper = info->dtim_period;
406 __entry->bcnint = info->beacon_int;
407 __entry->assoc_cap = info->assoc_capability;
Johannes Berg8c358bc2012-05-22 22:13:05 +0200408 __entry->sync_tsf = info->sync_tsf;
409 __entry->sync_device_ts = info->sync_device_ts;
Johannes Bergef429da2013-02-05 17:48:40 +0100410 __entry->sync_dtim_count = info->sync_dtim_count;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200411 __entry->basic_rates = info->basic_rates;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200412 memcpy(__entry->mcast_rate, info->mcast_rate,
413 sizeof(__entry->mcast_rate));
Johannes Bergf911ab82009-11-25 19:07:20 +0100414 __entry->ht_operation_mode = info->ht_operation_mode;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200415 __entry->cqm_rssi_thold = info->cqm_rssi_thold;
416 __entry->cqm_rssi_hyst = info->cqm_rssi_hyst;
Johannes Berg4bf88532012-11-09 11:39:59 +0100417 __entry->channel_width = info->chandef.width;
418 __entry->channel_cfreq1 = info->chandef.center_freq1;
Johannes Berg0f19b412013-01-14 16:39:07 +0100419 __entry->arp_addr_cnt = info->arp_addr_cnt;
Johannes Berg1724ffb2012-10-24 11:38:30 +0200420 memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list,
Johannes Berg0f19b412013-01-14 16:39:07 +0100421 sizeof(u32) * (info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ?
422 IEEE80211_BSS_ARP_ADDR_LIST_LEN :
423 info->arp_addr_cnt));
Johannes Berg1724ffb2012-10-24 11:38:30 +0200424 __entry->qos = info->qos;
425 __entry->idle = info->idle;
426 __entry->ps = info->ps;
427 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
428 __entry->hidden_ssid = info->hidden_ssid;
Johannes Berg1ea6f9c2012-10-24 10:59:25 +0200429 __entry->txpower = info->txpower;
Janusz Dziedzic67baf662013-03-21 15:47:56 +0100430 __entry->p2p_oppps_ctwindow = info->p2p_noa_attr.oppps_ctwindow;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200431 ),
432
433 TP_printk(
434 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
435 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
436 )
437);
438
Johannes Berg3ac64be2009-08-17 16:16:53 +0200439TRACE_EVENT(drv_prepare_multicast,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200440 TP_PROTO(struct ieee80211_local *local, int mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200441
Johannes Berg4efc76b2010-06-10 10:56:20 +0200442 TP_ARGS(local, mc_count),
Johannes Berg3ac64be2009-08-17 16:16:53 +0200443
444 TP_STRUCT__entry(
445 LOCAL_ENTRY
446 __field(int, mc_count)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200447 ),
448
449 TP_fast_assign(
450 LOCAL_ASSIGN;
451 __entry->mc_count = mc_count;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200452 ),
453
454 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200455 LOCAL_PR_FMT " prepare mc (%d)",
456 LOCAL_PR_ARG, __entry->mc_count
Johannes Berg3ac64be2009-08-17 16:16:53 +0200457 )
458);
459
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200460TRACE_EVENT(drv_configure_filter,
461 TP_PROTO(struct ieee80211_local *local,
462 unsigned int changed_flags,
463 unsigned int *total_flags,
Johannes Berg3ac64be2009-08-17 16:16:53 +0200464 u64 multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200465
Johannes Berg3ac64be2009-08-17 16:16:53 +0200466 TP_ARGS(local, changed_flags, total_flags, multicast),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200467
468 TP_STRUCT__entry(
469 LOCAL_ENTRY
470 __field(unsigned int, changed)
471 __field(unsigned int, total)
Johannes Berg3ac64be2009-08-17 16:16:53 +0200472 __field(u64, multicast)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200473 ),
474
475 TP_fast_assign(
476 LOCAL_ASSIGN;
477 __entry->changed = changed_flags;
478 __entry->total = *total_flags;
Johannes Berg3ac64be2009-08-17 16:16:53 +0200479 __entry->multicast = multicast;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200480 ),
481
482 TP_printk(
Johannes Berg3ac64be2009-08-17 16:16:53 +0200483 LOCAL_PR_FMT " changed:%#x total:%#x",
484 LOCAL_PR_ARG, __entry->changed, __entry->total
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200485 )
486);
487
488TRACE_EVENT(drv_set_tim,
489 TP_PROTO(struct ieee80211_local *local,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200490 struct ieee80211_sta *sta, bool set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200491
Johannes Berg4efc76b2010-06-10 10:56:20 +0200492 TP_ARGS(local, sta, set),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200493
494 TP_STRUCT__entry(
495 LOCAL_ENTRY
496 STA_ENTRY
497 __field(bool, set)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200498 ),
499
500 TP_fast_assign(
501 LOCAL_ASSIGN;
502 STA_ASSIGN;
503 __entry->set = set;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200504 ),
505
506 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200507 LOCAL_PR_FMT STA_PR_FMT " set:%d",
Seth Forshee15ac7c42013-02-15 13:15:48 -0600508 LOCAL_PR_ARG, STA_PR_ARG, __entry->set
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200509 )
510);
511
512TRACE_EVENT(drv_set_key,
513 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100514 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200515 struct ieee80211_sta *sta,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200516 struct ieee80211_key_conf *key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200517
Johannes Berg4efc76b2010-06-10 10:56:20 +0200518 TP_ARGS(local, cmd, sdata, sta, key),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200519
520 TP_STRUCT__entry(
521 LOCAL_ENTRY
522 VIF_ENTRY
523 STA_ENTRY
Johannes Berg97359d12010-08-10 09:46:38 +0200524 __field(u32, cipher)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200525 __field(u8, hw_key_idx)
526 __field(u8, flags)
527 __field(s8, keyidx)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200528 ),
529
530 TP_fast_assign(
531 LOCAL_ASSIGN;
532 VIF_ASSIGN;
533 STA_ASSIGN;
Johannes Berg97359d12010-08-10 09:46:38 +0200534 __entry->cipher = key->cipher;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200535 __entry->flags = key->flags;
536 __entry->keyidx = key->keyidx;
537 __entry->hw_key_idx = key->hw_key_idx;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200538 ),
539
540 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200541 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
542 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200543 )
544);
545
546TRACE_EVENT(drv_update_tkip_key,
547 TP_PROTO(struct ieee80211_local *local,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100548 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200549 struct ieee80211_key_conf *conf,
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100550 struct ieee80211_sta *sta, u32 iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200551
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100552 TP_ARGS(local, sdata, conf, sta, iv32),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200553
554 TP_STRUCT__entry(
555 LOCAL_ENTRY
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100556 VIF_ENTRY
557 STA_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200558 __field(u32, iv32)
559 ),
560
561 TP_fast_assign(
562 LOCAL_ASSIGN;
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100563 VIF_ASSIGN;
564 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200565 __entry->iv32 = iv32;
566 ),
567
568 TP_printk(
Johannes Bergb3fbdcf2010-01-21 11:40:47 +0100569 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
Weilong Chenf359d3f2013-12-18 15:44:16 +0800570 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->iv32
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200571 )
572);
573
Luciano Coelho79f460c2011-05-11 17:09:36 +0300574DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200575 TP_PROTO(struct ieee80211_local *local,
Luciano Coelho79f460c2011-05-11 17:09:36 +0300576 struct ieee80211_sub_if_data *sdata),
577 TP_ARGS(local, sdata)
578);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200579
Eliad Pellerb8564392011-06-13 12:47:30 +0300580DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
581 TP_PROTO(struct ieee80211_local *local,
582 struct ieee80211_sub_if_data *sdata),
583 TP_ARGS(local, sdata)
584);
585
Luciano Coelho79f460c2011-05-11 17:09:36 +0300586DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
587 TP_PROTO(struct ieee80211_local *local,
588 struct ieee80211_sub_if_data *sdata),
589 TP_ARGS(local, sdata)
590);
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200591
Luciano Coelho79f460c2011-05-11 17:09:36 +0300592DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
593 TP_PROTO(struct ieee80211_local *local,
594 struct ieee80211_sub_if_data *sdata),
595 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200596);
597
Johannes Bergba99d932011-01-26 09:22:15 +0100598DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200599 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100600 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200601);
602
Johannes Bergba99d932011-01-26 09:22:15 +0100603DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200604 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100605 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200606);
607
608TRACE_EVENT(drv_get_stats,
609 TP_PROTO(struct ieee80211_local *local,
610 struct ieee80211_low_level_stats *stats,
611 int ret),
612
613 TP_ARGS(local, stats, ret),
614
615 TP_STRUCT__entry(
616 LOCAL_ENTRY
617 __field(int, ret)
618 __field(unsigned int, ackfail)
619 __field(unsigned int, rtsfail)
620 __field(unsigned int, fcserr)
621 __field(unsigned int, rtssucc)
622 ),
623
624 TP_fast_assign(
625 LOCAL_ASSIGN;
626 __entry->ret = ret;
627 __entry->ackfail = stats->dot11ACKFailureCount;
628 __entry->rtsfail = stats->dot11RTSFailureCount;
629 __entry->fcserr = stats->dot11FCSErrorCount;
630 __entry->rtssucc = stats->dot11RTSSuccessCount;
631 ),
632
633 TP_printk(
634 LOCAL_PR_FMT " ret:%d",
635 LOCAL_PR_ARG, __entry->ret
636 )
637);
638
639TRACE_EVENT(drv_get_tkip_seq,
640 TP_PROTO(struct ieee80211_local *local,
641 u8 hw_key_idx, u32 *iv32, u16 *iv16),
642
643 TP_ARGS(local, hw_key_idx, iv32, iv16),
644
645 TP_STRUCT__entry(
646 LOCAL_ENTRY
647 __field(u8, hw_key_idx)
648 __field(u32, iv32)
649 __field(u16, iv16)
650 ),
651
652 TP_fast_assign(
653 LOCAL_ASSIGN;
654 __entry->hw_key_idx = hw_key_idx;
655 __entry->iv32 = *iv32;
656 __entry->iv16 = *iv16;
657 ),
658
659 TP_printk(
660 LOCAL_PR_FMT, LOCAL_PR_ARG
661 )
662);
663
Luciano Coelho92ddc112011-05-09 14:40:06 +0300664DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200665 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300666 TP_ARGS(local, value)
Arik Nemtsovf23a4782010-11-08 11:51:06 +0200667);
668
Luciano Coelho92ddc112011-05-09 14:40:06 +0300669DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200670 TP_PROTO(struct ieee80211_local *local, u32 value),
Luciano Coelho92ddc112011-05-09 14:40:06 +0300671 TP_ARGS(local, value)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200672);
673
Lukáš Turek310bc672009-12-21 22:50:48 +0100674TRACE_EVENT(drv_set_coverage_class,
Lorenzo Bianconia4bcaf52014-09-04 23:57:41 +0200675 TP_PROTO(struct ieee80211_local *local, s16 value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100676
Johannes Berg4efc76b2010-06-10 10:56:20 +0200677 TP_ARGS(local, value),
Lukáš Turek310bc672009-12-21 22:50:48 +0100678
679 TP_STRUCT__entry(
680 LOCAL_ENTRY
Lorenzo Bianconia4bcaf52014-09-04 23:57:41 +0200681 __field(s16, value)
Lukáš Turek310bc672009-12-21 22:50:48 +0100682 ),
683
684 TP_fast_assign(
685 LOCAL_ASSIGN;
Lukáš Turek310bc672009-12-21 22:50:48 +0100686 __entry->value = value;
687 ),
688
689 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200690 LOCAL_PR_FMT " value:%d",
691 LOCAL_PR_ARG, __entry->value
Lukáš Turek310bc672009-12-21 22:50:48 +0100692 )
693);
694
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200695TRACE_EVENT(drv_sta_notify,
696 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100697 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200698 enum sta_notify_cmd cmd,
699 struct ieee80211_sta *sta),
700
Johannes Berg12375ef2009-11-25 20:30:31 +0100701 TP_ARGS(local, sdata, cmd, sta),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200702
703 TP_STRUCT__entry(
704 LOCAL_ENTRY
705 VIF_ENTRY
706 STA_ENTRY
707 __field(u32, cmd)
708 ),
709
710 TP_fast_assign(
711 LOCAL_ASSIGN;
712 VIF_ASSIGN;
713 STA_ASSIGN;
714 __entry->cmd = cmd;
715 ),
716
717 TP_printk(
718 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
719 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
720 )
721);
722
Johannes Bergf09603a2012-01-20 13:55:21 +0100723TRACE_EVENT(drv_sta_state,
724 TP_PROTO(struct ieee80211_local *local,
725 struct ieee80211_sub_if_data *sdata,
726 struct ieee80211_sta *sta,
727 enum ieee80211_sta_state old_state,
728 enum ieee80211_sta_state new_state),
729
730 TP_ARGS(local, sdata, sta, old_state, new_state),
731
732 TP_STRUCT__entry(
733 LOCAL_ENTRY
734 VIF_ENTRY
735 STA_ENTRY
736 __field(u32, old_state)
737 __field(u32, new_state)
738 ),
739
740 TP_fast_assign(
741 LOCAL_ASSIGN;
742 VIF_ASSIGN;
743 STA_ASSIGN;
744 __entry->old_state = old_state;
745 __entry->new_state = new_state;
746 ),
747
748 TP_printk(
749 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
750 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
751 __entry->old_state, __entry->new_state
752 )
753);
754
Johannes Berg8f727ef2012-03-30 08:43:32 +0200755TRACE_EVENT(drv_sta_rc_update,
756 TP_PROTO(struct ieee80211_local *local,
757 struct ieee80211_sub_if_data *sdata,
758 struct ieee80211_sta *sta,
759 u32 changed),
760
761 TP_ARGS(local, sdata, sta, changed),
762
763 TP_STRUCT__entry(
764 LOCAL_ENTRY
765 VIF_ENTRY
766 STA_ENTRY
767 __field(u32, changed)
768 ),
769
770 TP_fast_assign(
771 LOCAL_ASSIGN;
772 VIF_ASSIGN;
773 STA_ASSIGN;
774 __entry->changed = changed;
775 ),
776
777 TP_printk(
778 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
779 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
780 )
781);
782
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100783DECLARE_EVENT_CLASS(sta_event,
Johannes Berg34e89502010-02-03 13:59:58 +0100784 TP_PROTO(struct ieee80211_local *local,
785 struct ieee80211_sub_if_data *sdata,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200786 struct ieee80211_sta *sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100787
Johannes Berg4efc76b2010-06-10 10:56:20 +0200788 TP_ARGS(local, sdata, sta),
Johannes Berg34e89502010-02-03 13:59:58 +0100789
790 TP_STRUCT__entry(
791 LOCAL_ENTRY
792 VIF_ENTRY
793 STA_ENTRY
Johannes Berg34e89502010-02-03 13:59:58 +0100794 ),
795
796 TP_fast_assign(
797 LOCAL_ASSIGN;
798 VIF_ASSIGN;
799 STA_ASSIGN;
Johannes Berg34e89502010-02-03 13:59:58 +0100800 ),
801
802 TP_printk(
Johannes Berg4efc76b2010-06-10 10:56:20 +0200803 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
804 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
Johannes Berg34e89502010-02-03 13:59:58 +0100805 )
806);
807
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100808DEFINE_EVENT(sta_event, drv_sta_add,
Johannes Berg34e89502010-02-03 13:59:58 +0100809 TP_PROTO(struct ieee80211_local *local,
810 struct ieee80211_sub_if_data *sdata,
811 struct ieee80211_sta *sta),
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100812 TP_ARGS(local, sdata, sta)
813);
Johannes Berg34e89502010-02-03 13:59:58 +0100814
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100815DEFINE_EVENT(sta_event, drv_sta_remove,
816 TP_PROTO(struct ieee80211_local *local,
817 struct ieee80211_sub_if_data *sdata,
818 struct ieee80211_sta *sta),
819 TP_ARGS(local, sdata, sta)
820);
Johannes Berg34e89502010-02-03 13:59:58 +0100821
Johannes Berg6a9d1b92013-12-04 22:39:17 +0100822DEFINE_EVENT(sta_event, drv_sta_pre_rcu_remove,
823 TP_PROTO(struct ieee80211_local *local,
824 struct ieee80211_sub_if_data *sdata,
825 struct ieee80211_sta *sta),
826 TP_ARGS(local, sdata, sta)
Johannes Berg34e89502010-02-03 13:59:58 +0100827);
828
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200829TRACE_EVENT(drv_conf_tx,
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300830 TP_PROTO(struct ieee80211_local *local,
831 struct ieee80211_sub_if_data *sdata,
Johannes Berga3304b02012-03-28 11:04:24 +0200832 u16 ac, const struct ieee80211_tx_queue_params *params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200833
Johannes Berga3304b02012-03-28 11:04:24 +0200834 TP_ARGS(local, sdata, ac, params),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200835
836 TP_STRUCT__entry(
837 LOCAL_ENTRY
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300838 VIF_ENTRY
Johannes Berga3304b02012-03-28 11:04:24 +0200839 __field(u16, ac)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200840 __field(u16, txop)
841 __field(u16, cw_min)
842 __field(u16, cw_max)
843 __field(u8, aifs)
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300844 __field(bool, uapsd)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200845 ),
846
847 TP_fast_assign(
848 LOCAL_ASSIGN;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300849 VIF_ASSIGN;
Johannes Berga3304b02012-03-28 11:04:24 +0200850 __entry->ac = ac;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200851 __entry->txop = params->txop;
852 __entry->cw_max = params->cw_max;
853 __entry->cw_min = params->cw_min;
854 __entry->aifs = params->aifs;
Eliad Pellerf6f3def2011-09-25 20:06:54 +0300855 __entry->uapsd = params->uapsd;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200856 ),
857
858 TP_printk(
Johannes Berga3304b02012-03-28 11:04:24 +0200859 LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
860 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200861 )
862);
863
Eliad Peller37a41b42011-09-21 14:06:11 +0300864DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
865 TP_PROTO(struct ieee80211_local *local,
866 struct ieee80211_sub_if_data *sdata),
867 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200868);
869
870TRACE_EVENT(drv_set_tsf,
Eliad Peller37a41b42011-09-21 14:06:11 +0300871 TP_PROTO(struct ieee80211_local *local,
872 struct ieee80211_sub_if_data *sdata,
873 u64 tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200874
Eliad Peller37a41b42011-09-21 14:06:11 +0300875 TP_ARGS(local, sdata, tsf),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200876
877 TP_STRUCT__entry(
878 LOCAL_ENTRY
Eliad Peller37a41b42011-09-21 14:06:11 +0300879 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200880 __field(u64, tsf)
881 ),
882
883 TP_fast_assign(
884 LOCAL_ASSIGN;
Eliad Peller37a41b42011-09-21 14:06:11 +0300885 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200886 __entry->tsf = tsf;
887 ),
888
889 TP_printk(
Eliad Peller37a41b42011-09-21 14:06:11 +0300890 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
891 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200892 )
893);
894
Eliad Peller37a41b42011-09-21 14:06:11 +0300895DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
896 TP_PROTO(struct ieee80211_local *local,
897 struct ieee80211_sub_if_data *sdata),
898 TP_ARGS(local, sdata)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200899);
900
Johannes Bergba99d932011-01-26 09:22:15 +0100901DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
Johannes Berg4efc76b2010-06-10 10:56:20 +0200902 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +0100903 TP_ARGS(local)
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200904);
905
906TRACE_EVENT(drv_ampdu_action,
907 TP_PROTO(struct ieee80211_local *local,
Johannes Berg12375ef2009-11-25 20:30:31 +0100908 struct ieee80211_sub_if_data *sdata,
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200909 enum ieee80211_ampdu_mlme_action action,
910 struct ieee80211_sta *sta, u16 tid,
Johannes Berg0b01f032011-01-18 13:51:05 +0100911 u16 *ssn, u8 buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200912
Johannes Berg0b01f032011-01-18 13:51:05 +0100913 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200914
915 TP_STRUCT__entry(
916 LOCAL_ENTRY
917 STA_ENTRY
918 __field(u32, action)
919 __field(u16, tid)
920 __field(u16, ssn)
Johannes Berg0b01f032011-01-18 13:51:05 +0100921 __field(u8, buf_size)
Johannes Bergc951ad32009-11-16 12:00:38 +0100922 VIF_ENTRY
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200923 ),
924
925 TP_fast_assign(
926 LOCAL_ASSIGN;
Johannes Bergc951ad32009-11-16 12:00:38 +0100927 VIF_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200928 STA_ASSIGN;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200929 __entry->action = action;
930 __entry->tid = tid;
Zhu Yi3092ad02010-01-26 15:58:57 +0800931 __entry->ssn = ssn ? *ssn : 0;
Johannes Berg0b01f032011-01-18 13:51:05 +0100932 __entry->buf_size = buf_size;
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200933 ),
934
935 TP_printk(
Johannes Berg0b01f032011-01-18 13:51:05 +0100936 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
937 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
938 __entry->tid, __entry->buf_size
Johannes Berg0a2b8bb2009-07-07 13:46:22 +0200939 )
940);
Johannes Berga80f7c02009-12-23 13:15:32 +0100941
John W. Linvillec466d4e2010-06-29 14:51:23 -0400942TRACE_EVENT(drv_get_survey,
943 TP_PROTO(struct ieee80211_local *local, int idx,
944 struct survey_info *survey),
945
946 TP_ARGS(local, idx, survey),
947
948 TP_STRUCT__entry(
949 LOCAL_ENTRY
950 __field(int, idx)
951 ),
952
953 TP_fast_assign(
954 LOCAL_ASSIGN;
955 __entry->idx = idx;
956 ),
957
958 TP_printk(
959 LOCAL_PR_FMT " idx:%d",
960 LOCAL_PR_ARG, __entry->idx
961 )
962);
963
Johannes Berga80f7c02009-12-23 13:15:32 +0100964TRACE_EVENT(drv_flush,
Johannes Berg39ecc012013-02-13 12:11:00 +0100965 TP_PROTO(struct ieee80211_local *local,
966 u32 queues, bool drop),
Johannes Berga80f7c02009-12-23 13:15:32 +0100967
Johannes Berg39ecc012013-02-13 12:11:00 +0100968 TP_ARGS(local, queues, drop),
Johannes Berga80f7c02009-12-23 13:15:32 +0100969
970 TP_STRUCT__entry(
971 LOCAL_ENTRY
972 __field(bool, drop)
Johannes Berg39ecc012013-02-13 12:11:00 +0100973 __field(u32, queues)
Johannes Berga80f7c02009-12-23 13:15:32 +0100974 ),
975
976 TP_fast_assign(
977 LOCAL_ASSIGN;
978 __entry->drop = drop;
Johannes Berg39ecc012013-02-13 12:11:00 +0100979 __entry->queues = queues;
Johannes Berga80f7c02009-12-23 13:15:32 +0100980 ),
981
982 TP_printk(
Johannes Berg39ecc012013-02-13 12:11:00 +0100983 LOCAL_PR_FMT " queues:0x%x drop:%d",
984 LOCAL_PR_ARG, __entry->queues, __entry->drop
Johannes Berga80f7c02009-12-23 13:15:32 +0100985 )
986);
Johannes Bergb5878a22010-04-07 16:48:40 +0200987
Johannes Berg5ce6e432010-05-11 16:20:57 +0200988TRACE_EVENT(drv_channel_switch,
989 TP_PROTO(struct ieee80211_local *local,
990 struct ieee80211_channel_switch *ch_switch),
991
992 TP_ARGS(local, ch_switch),
993
994 TP_STRUCT__entry(
995 LOCAL_ENTRY
Johannes Berg85220d72013-03-25 18:29:27 +0100996 CHANDEF_ENTRY
Johannes Berg5ce6e432010-05-11 16:20:57 +0200997 __field(u64, timestamp)
998 __field(bool, block_tx)
Johannes Berg5ce6e432010-05-11 16:20:57 +0200999 __field(u8, count)
1000 ),
1001
1002 TP_fast_assign(
1003 LOCAL_ASSIGN;
Johannes Berg85220d72013-03-25 18:29:27 +01001004 CHANDEF_ASSIGN(&ch_switch->chandef)
Johannes Berg5ce6e432010-05-11 16:20:57 +02001005 __entry->timestamp = ch_switch->timestamp;
1006 __entry->block_tx = ch_switch->block_tx;
Johannes Berg5ce6e432010-05-11 16:20:57 +02001007 __entry->count = ch_switch->count;
1008 ),
1009
1010 TP_printk(
Johannes Berg85220d72013-03-25 18:29:27 +01001011 LOCAL_PR_FMT " new " CHANDEF_PR_FMT " count:%d",
1012 LOCAL_PR_ARG, CHANDEF_PR_ARG, __entry->count
Johannes Berg5ce6e432010-05-11 16:20:57 +02001013 )
1014);
1015
Bruno Randolf15d96752010-11-10 12:50:56 +09001016TRACE_EVENT(drv_set_antenna,
1017 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1018
1019 TP_ARGS(local, tx_ant, rx_ant, ret),
1020
1021 TP_STRUCT__entry(
1022 LOCAL_ENTRY
1023 __field(u32, tx_ant)
1024 __field(u32, rx_ant)
1025 __field(int, ret)
1026 ),
1027
1028 TP_fast_assign(
1029 LOCAL_ASSIGN;
1030 __entry->tx_ant = tx_ant;
1031 __entry->rx_ant = rx_ant;
1032 __entry->ret = ret;
1033 ),
1034
1035 TP_printk(
1036 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1037 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1038 )
1039);
1040
1041TRACE_EVENT(drv_get_antenna,
1042 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
1043
1044 TP_ARGS(local, tx_ant, rx_ant, ret),
1045
1046 TP_STRUCT__entry(
1047 LOCAL_ENTRY
1048 __field(u32, tx_ant)
1049 __field(u32, rx_ant)
1050 __field(int, ret)
1051 ),
1052
1053 TP_fast_assign(
1054 LOCAL_ASSIGN;
1055 __entry->tx_ant = tx_ant;
1056 __entry->rx_ant = rx_ant;
1057 __entry->ret = ret;
1058 ),
1059
1060 TP_printk(
1061 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
1062 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
1063 )
1064);
1065
Johannes Berg21f83582010-12-18 17:20:47 +01001066TRACE_EVENT(drv_remain_on_channel,
Eliad Peller49884562012-11-19 17:05:09 +02001067 TP_PROTO(struct ieee80211_local *local,
1068 struct ieee80211_sub_if_data *sdata,
1069 struct ieee80211_channel *chan,
Ilan Peerd339d5c2013-02-12 09:34:13 +02001070 unsigned int duration,
1071 enum ieee80211_roc_type type),
Johannes Berg21f83582010-12-18 17:20:47 +01001072
Ilan Peerd339d5c2013-02-12 09:34:13 +02001073 TP_ARGS(local, sdata, chan, duration, type),
Johannes Berg21f83582010-12-18 17:20:47 +01001074
1075 TP_STRUCT__entry(
1076 LOCAL_ENTRY
Eliad Peller49884562012-11-19 17:05:09 +02001077 VIF_ENTRY
Johannes Berg21f83582010-12-18 17:20:47 +01001078 __field(int, center_freq)
Johannes Berg21f83582010-12-18 17:20:47 +01001079 __field(unsigned int, duration)
Ilan Peerd339d5c2013-02-12 09:34:13 +02001080 __field(u32, type)
Johannes Berg21f83582010-12-18 17:20:47 +01001081 ),
1082
1083 TP_fast_assign(
1084 LOCAL_ASSIGN;
Eliad Peller49884562012-11-19 17:05:09 +02001085 VIF_ASSIGN;
Johannes Berg21f83582010-12-18 17:20:47 +01001086 __entry->center_freq = chan->center_freq;
Johannes Berg21f83582010-12-18 17:20:47 +01001087 __entry->duration = duration;
Ilan Peerd339d5c2013-02-12 09:34:13 +02001088 __entry->type = type;
Johannes Berg21f83582010-12-18 17:20:47 +01001089 ),
1090
1091 TP_printk(
Ilan Peerd339d5c2013-02-12 09:34:13 +02001092 LOCAL_PR_FMT VIF_PR_FMT " freq:%dMHz duration:%dms type=%d",
Eliad Peller49884562012-11-19 17:05:09 +02001093 LOCAL_PR_ARG, VIF_PR_ARG,
Ilan Peerd339d5c2013-02-12 09:34:13 +02001094 __entry->center_freq, __entry->duration, __entry->type
Johannes Berg21f83582010-12-18 17:20:47 +01001095 )
1096);
1097
Johannes Bergba99d932011-01-26 09:22:15 +01001098DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001099 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001100 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001101);
1102
John W. Linville38c09152011-03-07 16:19:18 -05001103TRACE_EVENT(drv_set_ringparam,
1104 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
1105
1106 TP_ARGS(local, tx, rx),
1107
1108 TP_STRUCT__entry(
1109 LOCAL_ENTRY
1110 __field(u32, tx)
1111 __field(u32, rx)
1112 ),
1113
1114 TP_fast_assign(
1115 LOCAL_ASSIGN;
1116 __entry->tx = tx;
1117 __entry->rx = rx;
1118 ),
1119
1120 TP_printk(
1121 LOCAL_PR_FMT " tx:%d rx %d",
1122 LOCAL_PR_ARG, __entry->tx, __entry->rx
1123 )
1124);
1125
1126TRACE_EVENT(drv_get_ringparam,
1127 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
1128 u32 *rx, u32 *rx_max),
1129
1130 TP_ARGS(local, tx, tx_max, rx, rx_max),
1131
1132 TP_STRUCT__entry(
1133 LOCAL_ENTRY
1134 __field(u32, tx)
1135 __field(u32, tx_max)
1136 __field(u32, rx)
1137 __field(u32, rx_max)
1138 ),
1139
1140 TP_fast_assign(
1141 LOCAL_ASSIGN;
1142 __entry->tx = *tx;
1143 __entry->tx_max = *tx_max;
1144 __entry->rx = *rx;
1145 __entry->rx_max = *rx_max;
1146 ),
1147
1148 TP_printk(
1149 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1150 LOCAL_PR_ARG,
1151 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1152 )
1153);
1154
Vivek Natarajane8306f92011-04-06 11:41:10 +05301155DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1156 TP_PROTO(struct ieee80211_local *local),
1157 TP_ARGS(local)
1158);
1159
Johannes Berg5f16a432011-02-25 15:36:57 +01001160DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1161 TP_PROTO(struct ieee80211_local *local),
1162 TP_ARGS(local)
1163);
1164
Sujith Manoharanbdbfd6b2011-04-27 16:56:51 +05301165TRACE_EVENT(drv_set_bitrate_mask,
1166 TP_PROTO(struct ieee80211_local *local,
1167 struct ieee80211_sub_if_data *sdata,
1168 const struct cfg80211_bitrate_mask *mask),
1169
1170 TP_ARGS(local, sdata, mask),
1171
1172 TP_STRUCT__entry(
1173 LOCAL_ENTRY
1174 VIF_ENTRY
1175 __field(u32, legacy_2g)
1176 __field(u32, legacy_5g)
1177 ),
1178
1179 TP_fast_assign(
1180 LOCAL_ASSIGN;
1181 VIF_ASSIGN;
1182 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1183 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1184 ),
1185
1186 TP_printk(
1187 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
1188 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
1189 )
1190);
1191
Johannes Bergc68f4b82011-07-05 16:35:41 +02001192TRACE_EVENT(drv_set_rekey_data,
1193 TP_PROTO(struct ieee80211_local *local,
1194 struct ieee80211_sub_if_data *sdata,
1195 struct cfg80211_gtk_rekey_data *data),
1196
1197 TP_ARGS(local, sdata, data),
1198
1199 TP_STRUCT__entry(
1200 LOCAL_ENTRY
1201 VIF_ENTRY
1202 __array(u8, kek, NL80211_KEK_LEN)
1203 __array(u8, kck, NL80211_KCK_LEN)
1204 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1205 ),
1206
1207 TP_fast_assign(
1208 LOCAL_ASSIGN;
1209 VIF_ASSIGN;
1210 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
1211 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
1212 memcpy(__entry->replay_ctr, data->replay_ctr,
1213 NL80211_REPLAY_CTR_LEN);
1214 ),
1215
1216 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1217 LOCAL_PR_ARG, VIF_PR_ARG)
1218);
1219
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001220TRACE_EVENT(drv_rssi_callback,
1221 TP_PROTO(struct ieee80211_local *local,
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001222 struct ieee80211_sub_if_data *sdata,
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001223 enum ieee80211_rssi_event rssi_event),
1224
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001225 TP_ARGS(local, sdata, rssi_event),
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001226
1227 TP_STRUCT__entry(
1228 LOCAL_ENTRY
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001229 VIF_ENTRY
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001230 __field(u32, rssi_event)
1231 ),
1232
1233 TP_fast_assign(
1234 LOCAL_ASSIGN;
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001235 VIF_ASSIGN;
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001236 __entry->rssi_event = rssi_event;
1237 ),
1238
1239 TP_printk(
Emmanuel Grumbach887da912013-01-20 17:32:41 +02001240 LOCAL_PR_FMT VIF_PR_FMT " rssi_event:%d",
1241 LOCAL_PR_ARG, VIF_PR_ARG, __entry->rssi_event
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001242 )
1243);
1244
Johannes Berg40b96402011-09-29 16:04:38 +02001245DECLARE_EVENT_CLASS(release_evt,
Johannes Berg4049e092011-09-29 16:04:32 +02001246 TP_PROTO(struct ieee80211_local *local,
1247 struct ieee80211_sta *sta,
1248 u16 tids, int num_frames,
1249 enum ieee80211_frame_release_type reason,
1250 bool more_data),
1251
1252 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1253
1254 TP_STRUCT__entry(
1255 LOCAL_ENTRY
1256 STA_ENTRY
1257 __field(u16, tids)
1258 __field(int, num_frames)
1259 __field(int, reason)
1260 __field(bool, more_data)
1261 ),
1262
1263 TP_fast_assign(
1264 LOCAL_ASSIGN;
1265 STA_ASSIGN;
1266 __entry->tids = tids;
1267 __entry->num_frames = num_frames;
1268 __entry->reason = reason;
1269 __entry->more_data = more_data;
1270 ),
1271
1272 TP_printk(
1273 LOCAL_PR_FMT STA_PR_FMT
1274 " TIDs:0x%.4x frames:%d reason:%d more:%d",
1275 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
1276 __entry->reason, __entry->more_data
1277 )
1278);
1279
Johannes Berg40b96402011-09-29 16:04:38 +02001280DEFINE_EVENT(release_evt, drv_release_buffered_frames,
1281 TP_PROTO(struct ieee80211_local *local,
1282 struct ieee80211_sta *sta,
1283 u16 tids, int num_frames,
1284 enum ieee80211_frame_release_type reason,
1285 bool more_data),
1286
1287 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1288);
1289
1290DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
1291 TP_PROTO(struct ieee80211_local *local,
1292 struct ieee80211_sta *sta,
1293 u16 tids, int num_frames,
1294 enum ieee80211_frame_release_type reason,
1295 bool more_data),
1296
1297 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1298);
1299
Victor Goldenshtein66572cf2012-06-21 10:56:46 +03001300TRACE_EVENT(drv_get_rssi,
1301 TP_PROTO(struct ieee80211_local *local, struct ieee80211_sta *sta,
1302 s8 rssi, int ret),
1303
1304 TP_ARGS(local, sta, rssi, ret),
1305
1306 TP_STRUCT__entry(
1307 LOCAL_ENTRY
1308 STA_ENTRY
1309 __field(s8, rssi)
1310 __field(int, ret)
1311 ),
1312
1313 TP_fast_assign(
1314 LOCAL_ASSIGN;
1315 STA_ASSIGN;
1316 __entry->rssi = rssi;
1317 __entry->ret = ret;
1318 ),
1319
1320 TP_printk(
1321 LOCAL_PR_FMT STA_PR_FMT " rssi:%d ret:%d",
1322 LOCAL_PR_ARG, STA_PR_ARG, __entry->rssi, __entry->ret
1323 )
1324);
1325
Johannes Berga1845fc2012-06-27 13:18:36 +02001326DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
1327 TP_PROTO(struct ieee80211_local *local,
1328 struct ieee80211_sub_if_data *sdata),
1329
1330 TP_ARGS(local, sdata)
1331);
1332
Arik Nemtsovee10f2c2014-06-11 17:18:27 +03001333DEFINE_EVENT(local_sdata_evt, drv_mgd_protect_tdls_discover,
1334 TP_PROTO(struct ieee80211_local *local,
1335 struct ieee80211_sub_if_data *sdata),
1336
1337 TP_ARGS(local, sdata)
1338);
1339
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001340DECLARE_EVENT_CLASS(local_chanctx,
1341 TP_PROTO(struct ieee80211_local *local,
1342 struct ieee80211_chanctx *ctx),
1343
1344 TP_ARGS(local, ctx),
1345
1346 TP_STRUCT__entry(
1347 LOCAL_ENTRY
1348 CHANCTX_ENTRY
1349 ),
1350
1351 TP_fast_assign(
1352 LOCAL_ASSIGN;
1353 CHANCTX_ASSIGN;
1354 ),
1355
1356 TP_printk(
1357 LOCAL_PR_FMT CHANCTX_PR_FMT,
1358 LOCAL_PR_ARG, CHANCTX_PR_ARG
1359 )
1360);
1361
1362DEFINE_EVENT(local_chanctx, drv_add_chanctx,
1363 TP_PROTO(struct ieee80211_local *local,
1364 struct ieee80211_chanctx *ctx),
1365 TP_ARGS(local, ctx)
1366);
1367
1368DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
1369 TP_PROTO(struct ieee80211_local *local,
1370 struct ieee80211_chanctx *ctx),
1371 TP_ARGS(local, ctx)
1372);
1373
1374TRACE_EVENT(drv_change_chanctx,
1375 TP_PROTO(struct ieee80211_local *local,
1376 struct ieee80211_chanctx *ctx,
1377 u32 changed),
1378
1379 TP_ARGS(local, ctx, changed),
1380
1381 TP_STRUCT__entry(
1382 LOCAL_ENTRY
1383 CHANCTX_ENTRY
1384 __field(u32, changed)
1385 ),
1386
1387 TP_fast_assign(
1388 LOCAL_ASSIGN;
1389 CHANCTX_ASSIGN;
1390 __entry->changed = changed;
1391 ),
1392
1393 TP_printk(
1394 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
1395 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
1396 )
1397);
1398
Luciano Coelho1a5f0c12014-05-23 14:33:12 +03001399#if !defined(__TRACE_VIF_ENTRY)
1400#define __TRACE_VIF_ENTRY
1401struct trace_vif_entry {
1402 enum nl80211_iftype vif_type;
1403 bool p2p;
1404 char vif_name[IFNAMSIZ];
1405} __packed;
1406
1407struct trace_chandef_entry {
1408 u32 control_freq;
1409 u32 chan_width;
1410 u32 center_freq1;
1411 u32 center_freq2;
1412} __packed;
1413
1414struct trace_switch_entry {
1415 struct trace_vif_entry vif;
1416 struct trace_chandef_entry old_chandef;
1417 struct trace_chandef_entry new_chandef;
1418} __packed;
1419
1420#define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from
1421#endif
1422
1423TRACE_EVENT(drv_switch_vif_chanctx,
1424 TP_PROTO(struct ieee80211_local *local,
1425 struct ieee80211_vif_chanctx_switch *vifs,
1426 int n_vifs, enum ieee80211_chanctx_switch_mode mode),
1427 TP_ARGS(local, vifs, n_vifs, mode),
1428
1429 TP_STRUCT__entry(
1430 LOCAL_ENTRY
1431 __field(int, n_vifs)
1432 __field(u32, mode)
1433 __dynamic_array(u8, vifs,
1434 sizeof(struct trace_switch_entry) * n_vifs)
1435 ),
1436
1437 TP_fast_assign(
1438 LOCAL_ASSIGN;
1439 __entry->n_vifs = n_vifs;
1440 __entry->mode = mode;
1441 {
1442 struct trace_switch_entry *local_vifs =
1443 __get_dynamic_array(vifs);
1444 int i;
1445
1446 for (i = 0; i < n_vifs; i++) {
1447 struct ieee80211_sub_if_data *sdata;
1448
1449 sdata = container_of(vifs[i].vif,
1450 struct ieee80211_sub_if_data,
1451 vif);
1452
1453 SWITCH_ENTRY_ASSIGN(vif.vif_type, vif->type);
1454 SWITCH_ENTRY_ASSIGN(vif.p2p, vif->p2p);
1455 strncpy(local_vifs[i].vif.vif_name,
1456 sdata->name,
1457 sizeof(local_vifs[i].vif.vif_name));
1458 SWITCH_ENTRY_ASSIGN(old_chandef.control_freq,
1459 old_ctx->def.chan->center_freq);
1460 SWITCH_ENTRY_ASSIGN(old_chandef.chan_width,
1461 old_ctx->def.width);
1462 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq1,
1463 old_ctx->def.center_freq1);
1464 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq2,
1465 old_ctx->def.center_freq2);
1466 SWITCH_ENTRY_ASSIGN(new_chandef.control_freq,
1467 new_ctx->def.chan->center_freq);
1468 SWITCH_ENTRY_ASSIGN(new_chandef.chan_width,
1469 new_ctx->def.width);
1470 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq1,
1471 new_ctx->def.center_freq1);
1472 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq2,
1473 new_ctx->def.center_freq2);
1474 }
1475 }
1476 ),
1477
1478 TP_printk(
1479 LOCAL_PR_FMT " n_vifs:%d mode:%d",
1480 LOCAL_PR_ARG, __entry->n_vifs, __entry->mode
1481 )
1482);
1483
Michal Kaziorc3645ea2012-06-26 14:37:17 +02001484DECLARE_EVENT_CLASS(local_sdata_chanctx,
1485 TP_PROTO(struct ieee80211_local *local,
1486 struct ieee80211_sub_if_data *sdata,
1487 struct ieee80211_chanctx *ctx),
1488
1489 TP_ARGS(local, sdata, ctx),
1490
1491 TP_STRUCT__entry(
1492 LOCAL_ENTRY
1493 VIF_ENTRY
1494 CHANCTX_ENTRY
1495 ),
1496
1497 TP_fast_assign(
1498 LOCAL_ASSIGN;
1499 VIF_ASSIGN;
1500 CHANCTX_ASSIGN;
1501 ),
1502
1503 TP_printk(
1504 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
1505 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
1506 )
1507);
1508
1509DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
1510 TP_PROTO(struct ieee80211_local *local,
1511 struct ieee80211_sub_if_data *sdata,
1512 struct ieee80211_chanctx *ctx),
1513 TP_ARGS(local, sdata, ctx)
1514);
1515
1516DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
1517 TP_PROTO(struct ieee80211_local *local,
1518 struct ieee80211_sub_if_data *sdata,
1519 struct ieee80211_chanctx *ctx),
1520 TP_ARGS(local, sdata, ctx)
1521);
1522
Johannes Berg10416382012-10-19 15:44:42 +02001523TRACE_EVENT(drv_start_ap,
1524 TP_PROTO(struct ieee80211_local *local,
1525 struct ieee80211_sub_if_data *sdata,
1526 struct ieee80211_bss_conf *info),
1527
1528 TP_ARGS(local, sdata, info),
1529
1530 TP_STRUCT__entry(
1531 LOCAL_ENTRY
1532 VIF_ENTRY
1533 __field(u8, dtimper)
1534 __field(u16, bcnint)
1535 __dynamic_array(u8, ssid, info->ssid_len);
1536 __field(bool, hidden_ssid);
1537 ),
1538
1539 TP_fast_assign(
1540 LOCAL_ASSIGN;
1541 VIF_ASSIGN;
1542 __entry->dtimper = info->dtim_period;
1543 __entry->bcnint = info->beacon_int;
1544 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1545 __entry->hidden_ssid = info->hidden_ssid;
1546 ),
1547
1548 TP_printk(
1549 LOCAL_PR_FMT VIF_PR_FMT,
1550 LOCAL_PR_ARG, VIF_PR_ARG
1551 )
1552);
1553
1554DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
1555 TP_PROTO(struct ieee80211_local *local,
1556 struct ieee80211_sub_if_data *sdata),
1557 TP_ARGS(local, sdata)
1558);
1559
Johannes Berg9214ad72012-11-06 19:18:13 +01001560DEFINE_EVENT(local_only_evt, drv_restart_complete,
1561 TP_PROTO(struct ieee80211_local *local),
1562 TP_ARGS(local)
1563);
1564
Johannes Berga65240c2013-01-14 15:14:34 +01001565#if IS_ENABLED(CONFIG_IPV6)
1566DEFINE_EVENT(local_sdata_evt, drv_ipv6_addr_change,
1567 TP_PROTO(struct ieee80211_local *local,
1568 struct ieee80211_sub_if_data *sdata),
1569 TP_ARGS(local, sdata)
1570);
1571#endif
1572
Johannes Berg55fff502013-08-19 18:48:41 +02001573TRACE_EVENT(drv_join_ibss,
1574 TP_PROTO(struct ieee80211_local *local,
1575 struct ieee80211_sub_if_data *sdata,
1576 struct ieee80211_bss_conf *info),
1577
1578 TP_ARGS(local, sdata, info),
1579
1580 TP_STRUCT__entry(
1581 LOCAL_ENTRY
1582 VIF_ENTRY
1583 __field(u8, dtimper)
1584 __field(u16, bcnint)
1585 __dynamic_array(u8, ssid, info->ssid_len);
1586 ),
1587
1588 TP_fast_assign(
1589 LOCAL_ASSIGN;
1590 VIF_ASSIGN;
1591 __entry->dtimper = info->dtim_period;
1592 __entry->bcnint = info->beacon_int;
1593 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
1594 ),
1595
1596 TP_printk(
1597 LOCAL_PR_FMT VIF_PR_FMT,
1598 LOCAL_PR_ARG, VIF_PR_ARG
1599 )
1600);
1601
1602DEFINE_EVENT(local_sdata_evt, drv_leave_ibss,
1603 TP_PROTO(struct ieee80211_local *local,
1604 struct ieee80211_sub_if_data *sdata),
1605 TP_ARGS(local, sdata)
1606);
1607
Antonio Quartullicca674d2014-05-19 21:53:20 +02001608TRACE_EVENT(drv_get_expected_throughput,
1609 TP_PROTO(struct ieee80211_sta *sta),
1610
1611 TP_ARGS(sta),
1612
1613 TP_STRUCT__entry(
1614 STA_ENTRY
1615 ),
1616
1617 TP_fast_assign(
1618 STA_ASSIGN;
1619 ),
1620
1621 TP_printk(
1622 STA_PR_FMT, STA_PR_ARG
1623 )
1624);
1625
Johannes Bergb5878a22010-04-07 16:48:40 +02001626/*
1627 * Tracing for API calls that drivers call.
1628 */
1629
1630TRACE_EVENT(api_start_tx_ba_session,
1631 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1632
1633 TP_ARGS(sta, tid),
1634
1635 TP_STRUCT__entry(
1636 STA_ENTRY
1637 __field(u16, tid)
1638 ),
1639
1640 TP_fast_assign(
1641 STA_ASSIGN;
1642 __entry->tid = tid;
1643 ),
1644
1645 TP_printk(
1646 STA_PR_FMT " tid:%d",
1647 STA_PR_ARG, __entry->tid
1648 )
1649);
1650
1651TRACE_EVENT(api_start_tx_ba_cb,
1652 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1653
1654 TP_ARGS(sdata, ra, tid),
1655
1656 TP_STRUCT__entry(
1657 VIF_ENTRY
1658 __array(u8, ra, ETH_ALEN)
1659 __field(u16, tid)
1660 ),
1661
1662 TP_fast_assign(
1663 VIF_ASSIGN;
1664 memcpy(__entry->ra, ra, ETH_ALEN);
1665 __entry->tid = tid;
1666 ),
1667
1668 TP_printk(
1669 VIF_PR_FMT " ra:%pM tid:%d",
1670 VIF_PR_ARG, __entry->ra, __entry->tid
1671 )
1672);
1673
1674TRACE_EVENT(api_stop_tx_ba_session,
Johannes Berg6a8579d2010-05-27 14:41:07 +02001675 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001676
Johannes Berg6a8579d2010-05-27 14:41:07 +02001677 TP_ARGS(sta, tid),
Johannes Bergb5878a22010-04-07 16:48:40 +02001678
1679 TP_STRUCT__entry(
1680 STA_ENTRY
1681 __field(u16, tid)
Johannes Bergb5878a22010-04-07 16:48:40 +02001682 ),
1683
1684 TP_fast_assign(
1685 STA_ASSIGN;
1686 __entry->tid = tid;
Johannes Bergb5878a22010-04-07 16:48:40 +02001687 ),
1688
1689 TP_printk(
Johannes Berg6a8579d2010-05-27 14:41:07 +02001690 STA_PR_FMT " tid:%d",
1691 STA_PR_ARG, __entry->tid
Johannes Bergb5878a22010-04-07 16:48:40 +02001692 )
1693);
1694
1695TRACE_EVENT(api_stop_tx_ba_cb,
1696 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1697
1698 TP_ARGS(sdata, ra, tid),
1699
1700 TP_STRUCT__entry(
1701 VIF_ENTRY
1702 __array(u8, ra, ETH_ALEN)
1703 __field(u16, tid)
1704 ),
1705
1706 TP_fast_assign(
1707 VIF_ASSIGN;
1708 memcpy(__entry->ra, ra, ETH_ALEN);
1709 __entry->tid = tid;
1710 ),
1711
1712 TP_printk(
1713 VIF_PR_FMT " ra:%pM tid:%d",
1714 VIF_PR_ARG, __entry->ra, __entry->tid
1715 )
1716);
1717
Johannes Bergba99d932011-01-26 09:22:15 +01001718DEFINE_EVENT(local_only_evt, api_restart_hw,
Johannes Bergb5878a22010-04-07 16:48:40 +02001719 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001720 TP_ARGS(local)
Johannes Bergb5878a22010-04-07 16:48:40 +02001721);
1722
1723TRACE_EVENT(api_beacon_loss,
1724 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1725
1726 TP_ARGS(sdata),
1727
1728 TP_STRUCT__entry(
1729 VIF_ENTRY
1730 ),
1731
1732 TP_fast_assign(
1733 VIF_ASSIGN;
1734 ),
1735
1736 TP_printk(
1737 VIF_PR_FMT,
1738 VIF_PR_ARG
1739 )
1740);
1741
1742TRACE_EVENT(api_connection_loss,
1743 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1744
1745 TP_ARGS(sdata),
1746
1747 TP_STRUCT__entry(
1748 VIF_ENTRY
1749 ),
1750
1751 TP_fast_assign(
1752 VIF_ASSIGN;
1753 ),
1754
1755 TP_printk(
1756 VIF_PR_FMT,
1757 VIF_PR_ARG
1758 )
1759);
1760
1761TRACE_EVENT(api_cqm_rssi_notify,
1762 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1763 enum nl80211_cqm_rssi_threshold_event rssi_event),
1764
1765 TP_ARGS(sdata, rssi_event),
1766
1767 TP_STRUCT__entry(
1768 VIF_ENTRY
1769 __field(u32, rssi_event)
1770 ),
1771
1772 TP_fast_assign(
1773 VIF_ASSIGN;
1774 __entry->rssi_event = rssi_event;
1775 ),
1776
1777 TP_printk(
1778 VIF_PR_FMT " event:%d",
1779 VIF_PR_ARG, __entry->rssi_event
1780 )
1781);
1782
1783TRACE_EVENT(api_scan_completed,
1784 TP_PROTO(struct ieee80211_local *local, bool aborted),
1785
1786 TP_ARGS(local, aborted),
1787
1788 TP_STRUCT__entry(
1789 LOCAL_ENTRY
1790 __field(bool, aborted)
1791 ),
1792
1793 TP_fast_assign(
1794 LOCAL_ASSIGN;
1795 __entry->aborted = aborted;
1796 ),
1797
1798 TP_printk(
1799 LOCAL_PR_FMT " aborted:%d",
1800 LOCAL_PR_ARG, __entry->aborted
1801 )
1802);
1803
Luciano Coelho79f460c2011-05-11 17:09:36 +03001804TRACE_EVENT(api_sched_scan_results,
1805 TP_PROTO(struct ieee80211_local *local),
1806
1807 TP_ARGS(local),
1808
1809 TP_STRUCT__entry(
1810 LOCAL_ENTRY
1811 ),
1812
1813 TP_fast_assign(
1814 LOCAL_ASSIGN;
1815 ),
1816
1817 TP_printk(
1818 LOCAL_PR_FMT, LOCAL_PR_ARG
1819 )
1820);
1821
1822TRACE_EVENT(api_sched_scan_stopped,
1823 TP_PROTO(struct ieee80211_local *local),
1824
1825 TP_ARGS(local),
1826
1827 TP_STRUCT__entry(
1828 LOCAL_ENTRY
1829 ),
1830
1831 TP_fast_assign(
1832 LOCAL_ASSIGN;
1833 ),
1834
1835 TP_printk(
1836 LOCAL_PR_FMT, LOCAL_PR_ARG
1837 )
1838);
1839
Johannes Bergb5878a22010-04-07 16:48:40 +02001840TRACE_EVENT(api_sta_block_awake,
1841 TP_PROTO(struct ieee80211_local *local,
1842 struct ieee80211_sta *sta, bool block),
1843
1844 TP_ARGS(local, sta, block),
1845
1846 TP_STRUCT__entry(
1847 LOCAL_ENTRY
1848 STA_ENTRY
1849 __field(bool, block)
1850 ),
1851
1852 TP_fast_assign(
1853 LOCAL_ASSIGN;
1854 STA_ASSIGN;
1855 __entry->block = block;
1856 ),
1857
1858 TP_printk(
1859 LOCAL_PR_FMT STA_PR_FMT " block:%d",
Seth Forshee15ac7c42013-02-15 13:15:48 -06001860 LOCAL_PR_ARG, STA_PR_ARG, __entry->block
Johannes Bergb5878a22010-04-07 16:48:40 +02001861 )
1862);
1863
Johannes Berg5ce6e432010-05-11 16:20:57 +02001864TRACE_EVENT(api_chswitch_done,
1865 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1866
1867 TP_ARGS(sdata, success),
1868
1869 TP_STRUCT__entry(
1870 VIF_ENTRY
1871 __field(bool, success)
1872 ),
1873
1874 TP_fast_assign(
1875 VIF_ASSIGN;
1876 __entry->success = success;
1877 ),
1878
1879 TP_printk(
1880 VIF_PR_FMT " success=%d",
1881 VIF_PR_ARG, __entry->success
1882 )
1883);
1884
Johannes Bergba99d932011-01-26 09:22:15 +01001885DEFINE_EVENT(local_only_evt, api_ready_on_channel,
Johannes Berg21f83582010-12-18 17:20:47 +01001886 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001887 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001888);
1889
Johannes Bergba99d932011-01-26 09:22:15 +01001890DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
Johannes Berg21f83582010-12-18 17:20:47 +01001891 TP_PROTO(struct ieee80211_local *local),
Johannes Bergba99d932011-01-26 09:22:15 +01001892 TP_ARGS(local)
Johannes Berg21f83582010-12-18 17:20:47 +01001893);
1894
Johannes Bergc68f4b82011-07-05 16:35:41 +02001895TRACE_EVENT(api_gtk_rekey_notify,
1896 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1897 const u8 *bssid, const u8 *replay_ctr),
1898
1899 TP_ARGS(sdata, bssid, replay_ctr),
1900
1901 TP_STRUCT__entry(
1902 VIF_ENTRY
1903 __array(u8, bssid, ETH_ALEN)
1904 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1905 ),
1906
1907 TP_fast_assign(
1908 VIF_ASSIGN;
1909 memcpy(__entry->bssid, bssid, ETH_ALEN);
1910 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1911 ),
1912
1913 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
1914);
1915
Meenakshi Venkataraman615f7b92011-07-08 08:46:22 -07001916TRACE_EVENT(api_enable_rssi_reports,
1917 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1918 int rssi_min_thold, int rssi_max_thold),
1919
1920 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1921
1922 TP_STRUCT__entry(
1923 VIF_ENTRY
1924 __field(int, rssi_min_thold)
1925 __field(int, rssi_max_thold)
1926 ),
1927
1928 TP_fast_assign(
1929 VIF_ASSIGN;
1930 __entry->rssi_min_thold = rssi_min_thold;
1931 __entry->rssi_max_thold = rssi_max_thold;
1932 ),
1933
1934 TP_printk(
1935 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
1936 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
1937 )
1938);
1939
Johannes Berg37fbd902011-09-29 16:04:39 +02001940TRACE_EVENT(api_eosp,
1941 TP_PROTO(struct ieee80211_local *local,
1942 struct ieee80211_sta *sta),
1943
1944 TP_ARGS(local, sta),
1945
1946 TP_STRUCT__entry(
1947 LOCAL_ENTRY
1948 STA_ENTRY
1949 ),
1950
1951 TP_fast_assign(
1952 LOCAL_ASSIGN;
1953 STA_ASSIGN;
1954 ),
1955
1956 TP_printk(
1957 LOCAL_PR_FMT STA_PR_FMT,
Seth Forshee15ac7c42013-02-15 13:15:48 -06001958 LOCAL_PR_ARG, STA_PR_ARG
Johannes Berg37fbd902011-09-29 16:04:39 +02001959 )
1960);
1961
Johannes Berg1b000782013-12-19 10:47:48 +01001962TRACE_EVENT(api_sta_set_buffered,
1963 TP_PROTO(struct ieee80211_local *local,
1964 struct ieee80211_sta *sta,
1965 u8 tid, bool buffered),
1966
1967 TP_ARGS(local, sta, tid, buffered),
1968
1969 TP_STRUCT__entry(
1970 LOCAL_ENTRY
1971 STA_ENTRY
1972 __field(u8, tid)
1973 __field(bool, buffered)
1974 ),
1975
1976 TP_fast_assign(
1977 LOCAL_ASSIGN;
1978 STA_ASSIGN;
1979 __entry->tid = tid;
1980 __entry->buffered = buffered;
1981 ),
1982
1983 TP_printk(
1984 LOCAL_PR_FMT STA_PR_FMT " tid:%d buffered:%d",
1985 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid, __entry->buffered
1986 )
1987);
1988
Johannes Bergb5878a22010-04-07 16:48:40 +02001989/*
1990 * Tracing for internal functions
1991 * (which may also be called in response to driver calls)
1992 */
1993
1994TRACE_EVENT(wake_queue,
1995 TP_PROTO(struct ieee80211_local *local, u16 queue,
1996 enum queue_stop_reason reason),
1997
1998 TP_ARGS(local, queue, reason),
1999
2000 TP_STRUCT__entry(
2001 LOCAL_ENTRY
2002 __field(u16, queue)
2003 __field(u32, reason)
2004 ),
2005
2006 TP_fast_assign(
2007 LOCAL_ASSIGN;
2008 __entry->queue = queue;
2009 __entry->reason = reason;
2010 ),
2011
2012 TP_printk(
2013 LOCAL_PR_FMT " queue:%d, reason:%d",
2014 LOCAL_PR_ARG, __entry->queue, __entry->reason
2015 )
2016);
2017
2018TRACE_EVENT(stop_queue,
2019 TP_PROTO(struct ieee80211_local *local, u16 queue,
2020 enum queue_stop_reason reason),
2021
2022 TP_ARGS(local, queue, reason),
2023
2024 TP_STRUCT__entry(
2025 LOCAL_ENTRY
2026 __field(u16, queue)
2027 __field(u32, reason)
2028 ),
2029
2030 TP_fast_assign(
2031 LOCAL_ASSIGN;
2032 __entry->queue = queue;
2033 __entry->reason = reason;
2034 ),
2035
2036 TP_printk(
2037 LOCAL_PR_FMT " queue:%d, reason:%d",
2038 LOCAL_PR_ARG, __entry->queue, __entry->reason
2039 )
2040);
Johannes Berg3fae0272012-06-22 13:36:25 +02002041
Yoni Divinskyde5fad82012-05-30 11:36:39 +03002042TRACE_EVENT(drv_set_default_unicast_key,
2043 TP_PROTO(struct ieee80211_local *local,
2044 struct ieee80211_sub_if_data *sdata,
2045 int key_idx),
2046
2047 TP_ARGS(local, sdata, key_idx),
2048
2049 TP_STRUCT__entry(
2050 LOCAL_ENTRY
2051 VIF_ENTRY
2052 __field(int, key_idx)
2053 ),
2054
2055 TP_fast_assign(
2056 LOCAL_ASSIGN;
2057 VIF_ASSIGN;
2058 __entry->key_idx = key_idx;
2059 ),
2060
2061 TP_printk(LOCAL_PR_FMT VIF_PR_FMT " key_idx:%d",
2062 LOCAL_PR_ARG, VIF_PR_ARG, __entry->key_idx)
2063);
2064
Simon Wunderlich164eb022013-02-08 18:16:20 +01002065TRACE_EVENT(api_radar_detected,
2066 TP_PROTO(struct ieee80211_local *local),
2067
2068 TP_ARGS(local),
2069
2070 TP_STRUCT__entry(
2071 LOCAL_ENTRY
2072 ),
2073
2074 TP_fast_assign(
2075 LOCAL_ASSIGN;
2076 ),
2077
2078 TP_printk(
2079 LOCAL_PR_FMT " radar detected",
2080 LOCAL_PR_ARG
2081 )
2082);
2083
Simon Wunderlich73da7d52013-07-11 16:09:06 +02002084TRACE_EVENT(drv_channel_switch_beacon,
2085 TP_PROTO(struct ieee80211_local *local,
2086 struct ieee80211_sub_if_data *sdata,
2087 struct cfg80211_chan_def *chandef),
2088
2089 TP_ARGS(local, sdata, chandef),
2090
2091 TP_STRUCT__entry(
2092 LOCAL_ENTRY
2093 VIF_ENTRY
2094 CHANDEF_ENTRY
2095 ),
2096
2097 TP_fast_assign(
2098 LOCAL_ASSIGN;
2099 VIF_ASSIGN;
2100 CHANDEF_ASSIGN(chandef);
2101 ),
2102
2103 TP_printk(
2104 LOCAL_PR_FMT VIF_PR_FMT " channel switch to " CHANDEF_PR_FMT,
2105 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG
2106 )
2107);
2108
2109
Johannes Berg3fae0272012-06-22 13:36:25 +02002110#ifdef CONFIG_MAC80211_MESSAGE_TRACING
2111#undef TRACE_SYSTEM
2112#define TRACE_SYSTEM mac80211_msg
2113
2114#define MAX_MSG_LEN 100
2115
2116DECLARE_EVENT_CLASS(mac80211_msg_event,
2117 TP_PROTO(struct va_format *vaf),
2118
2119 TP_ARGS(vaf),
2120
2121 TP_STRUCT__entry(
2122 __dynamic_array(char, msg, MAX_MSG_LEN)
2123 ),
2124
2125 TP_fast_assign(
2126 WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
2127 MAX_MSG_LEN, vaf->fmt,
2128 *vaf->va) >= MAX_MSG_LEN);
2129 ),
2130
2131 TP_printk("%s", __get_str(msg))
2132);
2133
2134DEFINE_EVENT(mac80211_msg_event, mac80211_info,
2135 TP_PROTO(struct va_format *vaf),
2136 TP_ARGS(vaf)
2137);
2138DEFINE_EVENT(mac80211_msg_event, mac80211_dbg,
2139 TP_PROTO(struct va_format *vaf),
2140 TP_ARGS(vaf)
2141);
2142DEFINE_EVENT(mac80211_msg_event, mac80211_err,
2143 TP_PROTO(struct va_format *vaf),
2144 TP_ARGS(vaf)
2145);
2146#endif
2147
Christian Lamparterf7428802009-07-19 23:21:07 +02002148#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02002149
2150#undef TRACE_INCLUDE_PATH
2151#define TRACE_INCLUDE_PATH .
2152#undef TRACE_INCLUDE_FILE
Johannes Berg011ad0e2012-06-22 12:55:52 +02002153#define TRACE_INCLUDE_FILE trace
Johannes Berg0a2b8bb2009-07-07 13:46:22 +02002154#include <trace/define_trace.h>