Blame view

net/mac80211/driver-trace.h 25.9 KB
0a2b8bb24   Johannes Berg   mac80211: driver ...
1
2
3
4
5
6
  #if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
  #define __MAC80211_DRIVER_TRACE
  
  #include <linux/tracepoint.h>
  #include <net/mac80211.h>
  #include "ieee80211_i.h"
f742880c9   Christian Lamparter   mac80211: fix spa...
7
  #if !defined(CONFIG_MAC80211_DRIVER_API_TRACER) || defined(__CHECKER__)
0a2b8bb24   Johannes Berg   mac80211: driver ...
8
9
10
  #undef TRACE_EVENT
  #define TRACE_EVENT(name, proto, ...) \
  static inline void trace_ ## name(proto) {}
ba99d93b3   Johannes Berg   mac80211: use DEC...
11
12
13
14
15
  #undef DECLARE_EVENT_CLASS
  #define DECLARE_EVENT_CLASS(...)
  #undef DEFINE_EVENT
  #define DEFINE_EVENT(evt_class, name, proto, ...) \
  static inline void trace_ ## name(proto) {}
0a2b8bb24   Johannes Berg   mac80211: driver ...
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  #endif
  
  #undef TRACE_SYSTEM
  #define TRACE_SYSTEM mac80211
  
  #define MAXNAME		32
  #define LOCAL_ENTRY	__array(char, wiphy_name, 32)
  #define LOCAL_ASSIGN	strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME)
  #define LOCAL_PR_FMT	"%s"
  #define LOCAL_PR_ARG	__entry->wiphy_name
  
  #define STA_ENTRY	__array(char, sta_addr, ETH_ALEN)
  #define STA_ASSIGN	(sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN))
  #define STA_PR_FMT	" sta:%pM"
  #define STA_PR_ARG	__entry->sta_addr
2ca27bcff   Johannes Berg   mac80211: add p2p...
31
32
  #define VIF_ENTRY	__field(enum nl80211_iftype, vif_type) __field(void *, sdata)	\
  			__field(bool, p2p)						\
12375ef93   Johannes Berg   mac80211: trace i...
33
  			__string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
2ca27bcff   Johannes Berg   mac80211: add p2p...
34
35
  #define VIF_ASSIGN	__entry->vif_type = sdata->vif.type; __entry->sdata = sdata;	\
  			__entry->p2p = sdata->vif.p2p;					\
12375ef93   Johannes Berg   mac80211: trace i...
36
  			__assign_str(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
2ca27bcff   Johannes Berg   mac80211: add p2p...
37
38
  #define VIF_PR_FMT	" vif:%s(%d%s)"
  #define VIF_PR_ARG	__get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
0a2b8bb24   Johannes Berg   mac80211: driver ...
39

b5878a2dc   Johannes Berg   mac80211: enhance...
40
41
42
  /*
   * Tracing for driver callbacks.
   */
ba99d93b3   Johannes Berg   mac80211: use DEC...
43
  DECLARE_EVENT_CLASS(local_only_evt,
4efc76bdb   Johannes Berg   mac80211: bracket...
44
45
46
47
48
49
50
51
52
53
  	TP_PROTO(struct ieee80211_local *local),
  	TP_ARGS(local),
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  	),
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  	),
  	TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
  );
0a2b8bb24   Johannes Berg   mac80211: driver ...
54

92ddc111c   Luciano Coelho   mac80211: add a c...
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
  DECLARE_EVENT_CLASS(local_sdata_addr_evt,
  	TP_PROTO(struct ieee80211_local *local,
  		 struct ieee80211_sub_if_data *sdata),
  	TP_ARGS(local, sdata),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		VIF_ENTRY
  		__array(char, addr, 6)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		VIF_ASSIGN;
  		memcpy(__entry->addr, sdata->vif.addr, 6);
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT  VIF_PR_FMT " addr:%pM",
  		LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
  	)
  );
  
  DECLARE_EVENT_CLASS(local_u32_evt,
  	TP_PROTO(struct ieee80211_local *local, u32 value),
  	TP_ARGS(local, value),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(u32, value)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->value = value;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT " value:%d",
  		LOCAL_PR_ARG, __entry->value
  	)
  );
79f460ca4   Luciano Coelho   mac80211: add sup...
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
  DECLARE_EVENT_CLASS(local_sdata_evt,
  	TP_PROTO(struct ieee80211_local *local,
  		 struct ieee80211_sub_if_data *sdata),
  	TP_ARGS(local, sdata),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		VIF_ENTRY
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		VIF_ASSIGN;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT VIF_PR_FMT,
  		LOCAL_PR_ARG, VIF_PR_ARG
  	)
  );
ba99d93b3   Johannes Berg   mac80211: use DEC...
117
118
119
120
  DEFINE_EVENT(local_only_evt, drv_return_void,
  	TP_PROTO(struct ieee80211_local *local),
  	TP_ARGS(local)
  );
4efc76bdb   Johannes Berg   mac80211: bracket...
121
122
  TRACE_EVENT(drv_return_int,
  	TP_PROTO(struct ieee80211_local *local, int ret),
0a2b8bb24   Johannes Berg   mac80211: driver ...
123
  	TP_ARGS(local, ret),
0a2b8bb24   Johannes Berg   mac80211: driver ...
124
125
126
127
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(int, ret)
  	),
4efc76bdb   Johannes Berg   mac80211: bracket...
128
129
130
131
132
133
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->ret = ret;
  	),
  	TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
  );
0a2b8bb24   Johannes Berg   mac80211: driver ...
134

e8306f989   Vivek Natarajan   mac80211: Check f...
135
136
137
138
139
140
141
142
143
144
145
146
147
148
  TRACE_EVENT(drv_return_bool,
  	TP_PROTO(struct ieee80211_local *local, bool ret),
  	TP_ARGS(local, ret),
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(bool, ret)
  	),
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->ret = ret;
  	),
  	TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
  		  "true" : "false")
  );
4efc76bdb   Johannes Berg   mac80211: bracket...
149
150
151
152
153
154
155
  TRACE_EVENT(drv_return_u64,
  	TP_PROTO(struct ieee80211_local *local, u64 ret),
  	TP_ARGS(local, ret),
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(u64, ret)
  	),
0a2b8bb24   Johannes Berg   mac80211: driver ...
156
157
158
159
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->ret = ret;
  	),
4efc76bdb   Johannes Berg   mac80211: bracket...
160
161
  	TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
  );
ba99d93b3   Johannes Berg   mac80211: use DEC...
162
  DEFINE_EVENT(local_only_evt, drv_start,
4efc76bdb   Johannes Berg   mac80211: bracket...
163
  	TP_PROTO(struct ieee80211_local *local),
ba99d93b3   Johannes Berg   mac80211: use DEC...
164
  	TP_ARGS(local)
0a2b8bb24   Johannes Berg   mac80211: driver ...
165
  );
eecc48000   Johannes Berg   mac80211: add bas...
166
167
168
169
170
171
172
173
174
  DEFINE_EVENT(local_only_evt, drv_suspend,
  	TP_PROTO(struct ieee80211_local *local),
  	TP_ARGS(local)
  );
  
  DEFINE_EVENT(local_only_evt, drv_resume,
  	TP_PROTO(struct ieee80211_local *local),
  	TP_ARGS(local)
  );
ba99d93b3   Johannes Berg   mac80211: use DEC...
175
  DEFINE_EVENT(local_only_evt, drv_stop,
0a2b8bb24   Johannes Berg   mac80211: driver ...
176
  	TP_PROTO(struct ieee80211_local *local),
ba99d93b3   Johannes Berg   mac80211: use DEC...
177
  	TP_ARGS(local)
0a2b8bb24   Johannes Berg   mac80211: driver ...
178
  );
92ddc111c   Luciano Coelho   mac80211: add a c...
179
  DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
0a2b8bb24   Johannes Berg   mac80211: driver ...
180
  	TP_PROTO(struct ieee80211_local *local,
4efc76bdb   Johannes Berg   mac80211: bracket...
181
  		 struct ieee80211_sub_if_data *sdata),
92ddc111c   Luciano Coelho   mac80211: add a c...
182
  	TP_ARGS(local, sdata)
0a2b8bb24   Johannes Berg   mac80211: driver ...
183
  );
34d4bc4d4   Johannes Berg   mac80211: support...
184
185
186
  TRACE_EVENT(drv_change_interface,
  	TP_PROTO(struct ieee80211_local *local,
  		 struct ieee80211_sub_if_data *sdata,
2ca27bcff   Johannes Berg   mac80211: add p2p...
187
  		 enum nl80211_iftype type, bool p2p),
34d4bc4d4   Johannes Berg   mac80211: support...
188

2ca27bcff   Johannes Berg   mac80211: add p2p...
189
  	TP_ARGS(local, sdata, type, p2p),
34d4bc4d4   Johannes Berg   mac80211: support...
190
191
192
193
194
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		VIF_ENTRY
  		__field(u32, new_type)
2ca27bcff   Johannes Berg   mac80211: add p2p...
195
  		__field(bool, new_p2p)
34d4bc4d4   Johannes Berg   mac80211: support...
196
197
198
199
200
201
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		VIF_ASSIGN;
  		__entry->new_type = type;
2ca27bcff   Johannes Berg   mac80211: add p2p...
202
  		__entry->new_p2p = p2p;
34d4bc4d4   Johannes Berg   mac80211: support...
203
204
205
  	),
  
  	TP_printk(
2ca27bcff   Johannes Berg   mac80211: add p2p...
206
207
208
  		LOCAL_PR_FMT  VIF_PR_FMT " new type:%d%s",
  		LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
  		__entry->new_p2p ? "/p2p" : ""
34d4bc4d4   Johannes Berg   mac80211: support...
209
210
  	)
  );
92ddc111c   Luciano Coelho   mac80211: add a c...
211
212
213
214
  DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
  	TP_PROTO(struct ieee80211_local *local,
  		 struct ieee80211_sub_if_data *sdata),
  	TP_ARGS(local, sdata)
0a2b8bb24   Johannes Berg   mac80211: driver ...
215
216
217
218
  );
  
  TRACE_EVENT(drv_config,
  	TP_PROTO(struct ieee80211_local *local,
4efc76bdb   Johannes Berg   mac80211: bracket...
219
  		 u32 changed),
0a2b8bb24   Johannes Berg   mac80211: driver ...
220

4efc76bdb   Johannes Berg   mac80211: bracket...
221
  	TP_ARGS(local, changed),
0a2b8bb24   Johannes Berg   mac80211: driver ...
222
223
224
225
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(u32, changed)
f911ab83a   Johannes Berg   mac80211: log mor...
226
227
228
229
230
231
232
233
234
  		__field(u32, flags)
  		__field(int, power_level)
  		__field(int, dynamic_ps_timeout)
  		__field(int, max_sleep_period)
  		__field(u16, listen_interval)
  		__field(u8, long_frame_max_tx_count)
  		__field(u8, short_frame_max_tx_count)
  		__field(int, center_freq)
  		__field(int, channel_type)
0f78231bf   Johannes Berg   mac80211: enable ...
235
  		__field(int, smps)
0a2b8bb24   Johannes Berg   mac80211: driver ...
236
237
238
239
240
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->changed = changed;
f911ab83a   Johannes Berg   mac80211: log mor...
241
242
243
244
245
246
247
248
249
  		__entry->flags = local->hw.conf.flags;
  		__entry->power_level = local->hw.conf.power_level;
  		__entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
  		__entry->max_sleep_period = local->hw.conf.max_sleep_period;
  		__entry->listen_interval = local->hw.conf.listen_interval;
  		__entry->long_frame_max_tx_count = local->hw.conf.long_frame_max_tx_count;
  		__entry->short_frame_max_tx_count = local->hw.conf.short_frame_max_tx_count;
  		__entry->center_freq = local->hw.conf.channel->center_freq;
  		__entry->channel_type = local->hw.conf.channel_type;
0f78231bf   Johannes Berg   mac80211: enable ...
250
  		__entry->smps = local->hw.conf.smps_mode;
0a2b8bb24   Johannes Berg   mac80211: driver ...
251
252
253
  	),
  
  	TP_printk(
4efc76bdb   Johannes Berg   mac80211: bracket...
254
255
  		LOCAL_PR_FMT " ch:%#x freq:%d",
  		LOCAL_PR_ARG, __entry->changed, __entry->center_freq
0a2b8bb24   Johannes Berg   mac80211: driver ...
256
257
258
259
260
  	)
  );
  
  TRACE_EVENT(drv_bss_info_changed,
  	TP_PROTO(struct ieee80211_local *local,
12375ef93   Johannes Berg   mac80211: trace i...
261
  		 struct ieee80211_sub_if_data *sdata,
0a2b8bb24   Johannes Berg   mac80211: driver ...
262
263
  		 struct ieee80211_bss_conf *info,
  		 u32 changed),
12375ef93   Johannes Berg   mac80211: trace i...
264
  	TP_ARGS(local, sdata, info, changed),
0a2b8bb24   Johannes Berg   mac80211: driver ...
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		VIF_ENTRY
  		__field(bool, assoc)
  		__field(u16, aid)
  		__field(bool, cts)
  		__field(bool, shortpre)
  		__field(bool, shortslot)
  		__field(u8, dtimper)
  		__field(u16, bcnint)
  		__field(u16, assoc_cap)
  		__field(u64, timestamp)
  		__field(u32, basic_rates)
  		__field(u32, changed)
f911ab83a   Johannes Berg   mac80211: log mor...
280
281
  		__field(bool, enable_beacon)
  		__field(u16, ht_operation_mode)
0a2b8bb24   Johannes Berg   mac80211: driver ...
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		VIF_ASSIGN;
  		__entry->changed = changed;
  		__entry->aid = info->aid;
  		__entry->assoc = info->assoc;
  		__entry->shortpre = info->use_short_preamble;
  		__entry->cts = info->use_cts_prot;
  		__entry->shortslot = info->use_short_slot;
  		__entry->dtimper = info->dtim_period;
  		__entry->bcnint = info->beacon_int;
  		__entry->assoc_cap = info->assoc_capability;
  		__entry->timestamp = info->timestamp;
  		__entry->basic_rates = info->basic_rates;
f911ab83a   Johannes Berg   mac80211: log mor...
298
299
  		__entry->enable_beacon = info->enable_beacon;
  		__entry->ht_operation_mode = info->ht_operation_mode;
0a2b8bb24   Johannes Berg   mac80211: driver ...
300
301
302
303
304
305
306
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT  VIF_PR_FMT " changed:%#x",
  		LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
  	)
  );
3ac64beec   Johannes Berg   mac80211: allow c...
307
  TRACE_EVENT(drv_prepare_multicast,
4efc76bdb   Johannes Berg   mac80211: bracket...
308
  	TP_PROTO(struct ieee80211_local *local, int mc_count),
3ac64beec   Johannes Berg   mac80211: allow c...
309

4efc76bdb   Johannes Berg   mac80211: bracket...
310
  	TP_ARGS(local, mc_count),
3ac64beec   Johannes Berg   mac80211: allow c...
311
312
313
314
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(int, mc_count)
3ac64beec   Johannes Berg   mac80211: allow c...
315
316
317
318
319
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->mc_count = mc_count;
3ac64beec   Johannes Berg   mac80211: allow c...
320
321
322
  	),
  
  	TP_printk(
4efc76bdb   Johannes Berg   mac80211: bracket...
323
324
  		LOCAL_PR_FMT " prepare mc (%d)",
  		LOCAL_PR_ARG, __entry->mc_count
3ac64beec   Johannes Berg   mac80211: allow c...
325
326
  	)
  );
0a2b8bb24   Johannes Berg   mac80211: driver ...
327
328
329
330
  TRACE_EVENT(drv_configure_filter,
  	TP_PROTO(struct ieee80211_local *local,
  		 unsigned int changed_flags,
  		 unsigned int *total_flags,
3ac64beec   Johannes Berg   mac80211: allow c...
331
  		 u64 multicast),
0a2b8bb24   Johannes Berg   mac80211: driver ...
332

3ac64beec   Johannes Berg   mac80211: allow c...
333
  	TP_ARGS(local, changed_flags, total_flags, multicast),
0a2b8bb24   Johannes Berg   mac80211: driver ...
334
335
336
337
338
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(unsigned int, changed)
  		__field(unsigned int, total)
3ac64beec   Johannes Berg   mac80211: allow c...
339
  		__field(u64, multicast)
0a2b8bb24   Johannes Berg   mac80211: driver ...
340
341
342
343
344
345
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->changed = changed_flags;
  		__entry->total = *total_flags;
3ac64beec   Johannes Berg   mac80211: allow c...
346
  		__entry->multicast = multicast;
0a2b8bb24   Johannes Berg   mac80211: driver ...
347
348
349
  	),
  
  	TP_printk(
3ac64beec   Johannes Berg   mac80211: allow c...
350
351
  		LOCAL_PR_FMT " changed:%#x total:%#x",
  		LOCAL_PR_ARG, __entry->changed, __entry->total
0a2b8bb24   Johannes Berg   mac80211: driver ...
352
353
354
355
356
  	)
  );
  
  TRACE_EVENT(drv_set_tim,
  	TP_PROTO(struct ieee80211_local *local,
4efc76bdb   Johannes Berg   mac80211: bracket...
357
  		 struct ieee80211_sta *sta, bool set),
0a2b8bb24   Johannes Berg   mac80211: driver ...
358

4efc76bdb   Johannes Berg   mac80211: bracket...
359
  	TP_ARGS(local, sta, set),
0a2b8bb24   Johannes Berg   mac80211: driver ...
360
361
362
363
364
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		STA_ENTRY
  		__field(bool, set)
0a2b8bb24   Johannes Berg   mac80211: driver ...
365
366
367
368
369
370
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		STA_ASSIGN;
  		__entry->set = set;
0a2b8bb24   Johannes Berg   mac80211: driver ...
371
372
373
  	),
  
  	TP_printk(
4efc76bdb   Johannes Berg   mac80211: bracket...
374
375
  		LOCAL_PR_FMT STA_PR_FMT " set:%d",
  		LOCAL_PR_ARG, STA_PR_FMT, __entry->set
0a2b8bb24   Johannes Berg   mac80211: driver ...
376
377
378
379
380
  	)
  );
  
  TRACE_EVENT(drv_set_key,
  	TP_PROTO(struct ieee80211_local *local,
12375ef93   Johannes Berg   mac80211: trace i...
381
  		 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
0a2b8bb24   Johannes Berg   mac80211: driver ...
382
  		 struct ieee80211_sta *sta,
4efc76bdb   Johannes Berg   mac80211: bracket...
383
  		 struct ieee80211_key_conf *key),
0a2b8bb24   Johannes Berg   mac80211: driver ...
384

4efc76bdb   Johannes Berg   mac80211: bracket...
385
  	TP_ARGS(local, cmd, sdata, sta, key),
0a2b8bb24   Johannes Berg   mac80211: driver ...
386
387
388
389
390
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		VIF_ENTRY
  		STA_ENTRY
97359d123   Johannes Berg   mac80211: use cip...
391
  		__field(u32, cipher)
0a2b8bb24   Johannes Berg   mac80211: driver ...
392
393
394
  		__field(u8, hw_key_idx)
  		__field(u8, flags)
  		__field(s8, keyidx)
0a2b8bb24   Johannes Berg   mac80211: driver ...
395
396
397
398
399
400
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		VIF_ASSIGN;
  		STA_ASSIGN;
97359d123   Johannes Berg   mac80211: use cip...
401
  		__entry->cipher = key->cipher;
0a2b8bb24   Johannes Berg   mac80211: driver ...
402
403
404
  		__entry->flags = key->flags;
  		__entry->keyidx = key->keyidx;
  		__entry->hw_key_idx = key->hw_key_idx;
0a2b8bb24   Johannes Berg   mac80211: driver ...
405
406
407
  	),
  
  	TP_printk(
4efc76bdb   Johannes Berg   mac80211: bracket...
408
409
  		LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT,
  		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
0a2b8bb24   Johannes Berg   mac80211: driver ...
410
411
412
413
414
  	)
  );
  
  TRACE_EVENT(drv_update_tkip_key,
  	TP_PROTO(struct ieee80211_local *local,
b3fbdcf49   Johannes Berg   mac80211: pass vi...
415
  		 struct ieee80211_sub_if_data *sdata,
0a2b8bb24   Johannes Berg   mac80211: driver ...
416
  		 struct ieee80211_key_conf *conf,
b3fbdcf49   Johannes Berg   mac80211: pass vi...
417
  		 struct ieee80211_sta *sta, u32 iv32),
0a2b8bb24   Johannes Berg   mac80211: driver ...
418

b3fbdcf49   Johannes Berg   mac80211: pass vi...
419
  	TP_ARGS(local, sdata, conf, sta, iv32),
0a2b8bb24   Johannes Berg   mac80211: driver ...
420
421
422
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
b3fbdcf49   Johannes Berg   mac80211: pass vi...
423
424
  		VIF_ENTRY
  		STA_ENTRY
0a2b8bb24   Johannes Berg   mac80211: driver ...
425
426
427
428
429
  		__field(u32, iv32)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
b3fbdcf49   Johannes Berg   mac80211: pass vi...
430
431
  		VIF_ASSIGN;
  		STA_ASSIGN;
0a2b8bb24   Johannes Berg   mac80211: driver ...
432
433
434
435
  		__entry->iv32 = iv32;
  	),
  
  	TP_printk(
b3fbdcf49   Johannes Berg   mac80211: pass vi...
436
437
  		LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
  		LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
0a2b8bb24   Johannes Berg   mac80211: driver ...
438
439
  	)
  );
79f460ca4   Luciano Coelho   mac80211: add sup...
440
  DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
0a2b8bb24   Johannes Berg   mac80211: driver ...
441
  	TP_PROTO(struct ieee80211_local *local,
79f460ca4   Luciano Coelho   mac80211: add sup...
442
443
444
  		 struct ieee80211_sub_if_data *sdata),
  	TP_ARGS(local, sdata)
  );
0a2b8bb24   Johannes Berg   mac80211: driver ...
445

79f460ca4   Luciano Coelho   mac80211: add sup...
446
447
448
449
450
  DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
  	TP_PROTO(struct ieee80211_local *local,
  		 struct ieee80211_sub_if_data *sdata),
  	TP_ARGS(local, sdata)
  );
0a2b8bb24   Johannes Berg   mac80211: driver ...
451

79f460ca4   Luciano Coelho   mac80211: add sup...
452
453
454
455
  DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
  	TP_PROTO(struct ieee80211_local *local,
  		 struct ieee80211_sub_if_data *sdata),
  	TP_ARGS(local, sdata)
0a2b8bb24   Johannes Berg   mac80211: driver ...
456
  );
ba99d93b3   Johannes Berg   mac80211: use DEC...
457
  DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
0a2b8bb24   Johannes Berg   mac80211: driver ...
458
  	TP_PROTO(struct ieee80211_local *local),
ba99d93b3   Johannes Berg   mac80211: use DEC...
459
  	TP_ARGS(local)
0a2b8bb24   Johannes Berg   mac80211: driver ...
460
  );
ba99d93b3   Johannes Berg   mac80211: use DEC...
461
  DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
0a2b8bb24   Johannes Berg   mac80211: driver ...
462
  	TP_PROTO(struct ieee80211_local *local),
ba99d93b3   Johannes Berg   mac80211: use DEC...
463
  	TP_ARGS(local)
0a2b8bb24   Johannes Berg   mac80211: driver ...
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
  );
  
  TRACE_EVENT(drv_get_stats,
  	TP_PROTO(struct ieee80211_local *local,
  		 struct ieee80211_low_level_stats *stats,
  		 int ret),
  
  	TP_ARGS(local, stats, ret),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(int, ret)
  		__field(unsigned int, ackfail)
  		__field(unsigned int, rtsfail)
  		__field(unsigned int, fcserr)
  		__field(unsigned int, rtssucc)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->ret = ret;
  		__entry->ackfail = stats->dot11ACKFailureCount;
  		__entry->rtsfail = stats->dot11RTSFailureCount;
  		__entry->fcserr = stats->dot11FCSErrorCount;
  		__entry->rtssucc = stats->dot11RTSSuccessCount;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT " ret:%d",
  		LOCAL_PR_ARG, __entry->ret
  	)
  );
  
  TRACE_EVENT(drv_get_tkip_seq,
  	TP_PROTO(struct ieee80211_local *local,
  		 u8 hw_key_idx, u32 *iv32, u16 *iv16),
  
  	TP_ARGS(local, hw_key_idx, iv32, iv16),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(u8, hw_key_idx)
  		__field(u32, iv32)
  		__field(u16, iv16)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->hw_key_idx = hw_key_idx;
  		__entry->iv32 = *iv32;
  		__entry->iv16 = *iv16;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT, LOCAL_PR_ARG
  	)
  );
92ddc111c   Luciano Coelho   mac80211: add a c...
521
  DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
f23a47807   Arik Nemtsov   mac80211: support...
522
  	TP_PROTO(struct ieee80211_local *local, u32 value),
92ddc111c   Luciano Coelho   mac80211: add a c...
523
  	TP_ARGS(local, value)
f23a47807   Arik Nemtsov   mac80211: support...
524
  );
92ddc111c   Luciano Coelho   mac80211: add a c...
525
  DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
4efc76bdb   Johannes Berg   mac80211: bracket...
526
  	TP_PROTO(struct ieee80211_local *local, u32 value),
92ddc111c   Luciano Coelho   mac80211: add a c...
527
  	TP_ARGS(local, value)
310bc676e   Lukáš Turek   mac80211: Add new...
528
529
530
  );
  
  TRACE_EVENT(drv_set_coverage_class,
4efc76bdb   Johannes Berg   mac80211: bracket...
531
  	TP_PROTO(struct ieee80211_local *local, u8 value),
310bc676e   Lukáš Turek   mac80211: Add new...
532

4efc76bdb   Johannes Berg   mac80211: bracket...
533
  	TP_ARGS(local, value),
310bc676e   Lukáš Turek   mac80211: Add new...
534
535
536
537
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(u8, value)
310bc676e   Lukáš Turek   mac80211: Add new...
538
539
540
  	),
  
  	TP_fast_assign(
0a2b8bb24   Johannes Berg   mac80211: driver ...
541
  		LOCAL_ASSIGN;
0a2b8bb24   Johannes Berg   mac80211: driver ...
542
543
544
545
  		__entry->value = value;
  	),
  
  	TP_printk(
4efc76bdb   Johannes Berg   mac80211: bracket...
546
547
  		LOCAL_PR_FMT " value:%d",
  		LOCAL_PR_ARG, __entry->value
0a2b8bb24   Johannes Berg   mac80211: driver ...
548
549
550
551
552
  	)
  );
  
  TRACE_EVENT(drv_sta_notify,
  	TP_PROTO(struct ieee80211_local *local,
12375ef93   Johannes Berg   mac80211: trace i...
553
  		 struct ieee80211_sub_if_data *sdata,
0a2b8bb24   Johannes Berg   mac80211: driver ...
554
555
  		 enum sta_notify_cmd cmd,
  		 struct ieee80211_sta *sta),
12375ef93   Johannes Berg   mac80211: trace i...
556
  	TP_ARGS(local, sdata, cmd, sta),
0a2b8bb24   Johannes Berg   mac80211: driver ...
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		VIF_ENTRY
  		STA_ENTRY
  		__field(u32, cmd)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		VIF_ASSIGN;
  		STA_ASSIGN;
  		__entry->cmd = cmd;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT " cmd:%d",
  		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
  	)
  );
34e895075   Johannes Berg   mac80211: allow s...
577
578
579
  TRACE_EVENT(drv_sta_add,
  	TP_PROTO(struct ieee80211_local *local,
  		 struct ieee80211_sub_if_data *sdata,
4efc76bdb   Johannes Berg   mac80211: bracket...
580
  		 struct ieee80211_sta *sta),
34e895075   Johannes Berg   mac80211: allow s...
581

4efc76bdb   Johannes Berg   mac80211: bracket...
582
  	TP_ARGS(local, sdata, sta),
34e895075   Johannes Berg   mac80211: allow s...
583
584
585
586
587
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		VIF_ENTRY
  		STA_ENTRY
34e895075   Johannes Berg   mac80211: allow s...
588
589
590
591
592
593
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		VIF_ASSIGN;
  		STA_ASSIGN;
34e895075   Johannes Berg   mac80211: allow s...
594
595
596
  	),
  
  	TP_printk(
4efc76bdb   Johannes Berg   mac80211: bracket...
597
598
  		LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT,
  		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
34e895075   Johannes Berg   mac80211: allow s...
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
  	)
  );
  
  TRACE_EVENT(drv_sta_remove,
  	TP_PROTO(struct ieee80211_local *local,
  		 struct ieee80211_sub_if_data *sdata,
  		 struct ieee80211_sta *sta),
  
  	TP_ARGS(local, sdata, sta),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		VIF_ENTRY
  		STA_ENTRY
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		VIF_ASSIGN;
  		STA_ASSIGN;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT,
  		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
  	)
  );
0a2b8bb24   Johannes Berg   mac80211: driver ...
626
627
  TRACE_EVENT(drv_conf_tx,
  	TP_PROTO(struct ieee80211_local *local, u16 queue,
4efc76bdb   Johannes Berg   mac80211: bracket...
628
  		 const struct ieee80211_tx_queue_params *params),
0a2b8bb24   Johannes Berg   mac80211: driver ...
629

4efc76bdb   Johannes Berg   mac80211: bracket...
630
  	TP_ARGS(local, queue, params),
0a2b8bb24   Johannes Berg   mac80211: driver ...
631
632
633
634
635
636
637
638
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(u16, queue)
  		__field(u16, txop)
  		__field(u16, cw_min)
  		__field(u16, cw_max)
  		__field(u8, aifs)
0a2b8bb24   Johannes Berg   mac80211: driver ...
639
640
641
642
643
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->queue = queue;
0a2b8bb24   Johannes Berg   mac80211: driver ...
644
645
646
647
648
649
650
  		__entry->txop = params->txop;
  		__entry->cw_max = params->cw_max;
  		__entry->cw_min = params->cw_min;
  		__entry->aifs = params->aifs;
  	),
  
  	TP_printk(
4efc76bdb   Johannes Berg   mac80211: bracket...
651
652
  		LOCAL_PR_FMT " queue:%d",
  		LOCAL_PR_ARG, __entry->queue
0a2b8bb24   Johannes Berg   mac80211: driver ...
653
654
  	)
  );
ba99d93b3   Johannes Berg   mac80211: use DEC...
655
  DEFINE_EVENT(local_only_evt, drv_get_tsf,
4efc76bdb   Johannes Berg   mac80211: bracket...
656
  	TP_PROTO(struct ieee80211_local *local),
ba99d93b3   Johannes Berg   mac80211: use DEC...
657
  	TP_ARGS(local)
0a2b8bb24   Johannes Berg   mac80211: driver ...
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
  );
  
  TRACE_EVENT(drv_set_tsf,
  	TP_PROTO(struct ieee80211_local *local, u64 tsf),
  
  	TP_ARGS(local, tsf),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(u64, tsf)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->tsf = tsf;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT " tsf:%llu",
  		LOCAL_PR_ARG, (unsigned long long)__entry->tsf
  	)
  );
ba99d93b3   Johannes Berg   mac80211: use DEC...
680
  DEFINE_EVENT(local_only_evt, drv_reset_tsf,
0a2b8bb24   Johannes Berg   mac80211: driver ...
681
  	TP_PROTO(struct ieee80211_local *local),
ba99d93b3   Johannes Berg   mac80211: use DEC...
682
  	TP_ARGS(local)
0a2b8bb24   Johannes Berg   mac80211: driver ...
683
  );
ba99d93b3   Johannes Berg   mac80211: use DEC...
684
  DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
4efc76bdb   Johannes Berg   mac80211: bracket...
685
  	TP_PROTO(struct ieee80211_local *local),
ba99d93b3   Johannes Berg   mac80211: use DEC...
686
  	TP_ARGS(local)
0a2b8bb24   Johannes Berg   mac80211: driver ...
687
688
689
690
  );
  
  TRACE_EVENT(drv_ampdu_action,
  	TP_PROTO(struct ieee80211_local *local,
12375ef93   Johannes Berg   mac80211: trace i...
691
  		 struct ieee80211_sub_if_data *sdata,
0a2b8bb24   Johannes Berg   mac80211: driver ...
692
693
  		 enum ieee80211_ampdu_mlme_action action,
  		 struct ieee80211_sta *sta, u16 tid,
0b01f030d   Johannes Berg   mac80211: track r...
694
  		 u16 *ssn, u8 buf_size),
0a2b8bb24   Johannes Berg   mac80211: driver ...
695

0b01f030d   Johannes Berg   mac80211: track r...
696
  	TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
0a2b8bb24   Johannes Berg   mac80211: driver ...
697
698
699
700
701
702
703
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		STA_ENTRY
  		__field(u32, action)
  		__field(u16, tid)
  		__field(u16, ssn)
0b01f030d   Johannes Berg   mac80211: track r...
704
  		__field(u8, buf_size)
c951ad355   Johannes Berg   mac80211: convert...
705
  		VIF_ENTRY
0a2b8bb24   Johannes Berg   mac80211: driver ...
706
707
708
709
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
c951ad355   Johannes Berg   mac80211: convert...
710
  		VIF_ASSIGN;
0a2b8bb24   Johannes Berg   mac80211: driver ...
711
  		STA_ASSIGN;
0a2b8bb24   Johannes Berg   mac80211: driver ...
712
713
  		__entry->action = action;
  		__entry->tid = tid;
3092ad054   Zhu Yi   mac80211: fix NUL...
714
  		__entry->ssn = ssn ? *ssn : 0;
0b01f030d   Johannes Berg   mac80211: track r...
715
  		__entry->buf_size = buf_size;
0a2b8bb24   Johannes Berg   mac80211: driver ...
716
717
718
  	),
  
  	TP_printk(
0b01f030d   Johannes Berg   mac80211: track r...
719
720
721
  		LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
  		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
  		__entry->tid, __entry->buf_size
0a2b8bb24   Johannes Berg   mac80211: driver ...
722
723
  	)
  );
a80f7c0b0   Johannes Berg   mac80211: introdu...
724

c466d4efb   John W. Linville   mac80211: add bas...
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
  TRACE_EVENT(drv_get_survey,
  	TP_PROTO(struct ieee80211_local *local, int idx,
  		 struct survey_info *survey),
  
  	TP_ARGS(local, idx, survey),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(int, idx)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->idx = idx;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT " idx:%d",
  		LOCAL_PR_ARG, __entry->idx
  	)
  );
a80f7c0b0   Johannes Berg   mac80211: introdu...
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
  TRACE_EVENT(drv_flush,
  	TP_PROTO(struct ieee80211_local *local, bool drop),
  
  	TP_ARGS(local, drop),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(bool, drop)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->drop = drop;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT " drop:%d",
  		LOCAL_PR_ARG, __entry->drop
  	)
  );
b5878a2dc   Johannes Berg   mac80211: enhance...
766

5ce6e438d   Johannes Berg   mac80211: add off...
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
  TRACE_EVENT(drv_channel_switch,
  	TP_PROTO(struct ieee80211_local *local,
  		 struct ieee80211_channel_switch *ch_switch),
  
  	TP_ARGS(local, ch_switch),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(u64, timestamp)
  		__field(bool, block_tx)
  		__field(u16, freq)
  		__field(u8, count)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->timestamp = ch_switch->timestamp;
  		__entry->block_tx = ch_switch->block_tx;
  		__entry->freq = ch_switch->channel->center_freq;
  		__entry->count = ch_switch->count;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT " new freq:%u count:%d",
  		LOCAL_PR_ARG, __entry->freq, __entry->count
  	)
  );
15d967532   Bruno Randolf   mac80211: Add ant...
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
  TRACE_EVENT(drv_set_antenna,
  	TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
  
  	TP_ARGS(local, tx_ant, rx_ant, ret),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(u32, tx_ant)
  		__field(u32, rx_ant)
  		__field(int, ret)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->tx_ant = tx_ant;
  		__entry->rx_ant = rx_ant;
  		__entry->ret = ret;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
  		LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
  	)
  );
  
  TRACE_EVENT(drv_get_antenna,
  	TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
  
  	TP_ARGS(local, tx_ant, rx_ant, ret),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(u32, tx_ant)
  		__field(u32, rx_ant)
  		__field(int, ret)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->tx_ant = tx_ant;
  		__entry->rx_ant = rx_ant;
  		__entry->ret = ret;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
  		LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
  	)
  );
21f835896   Johannes Berg   mac80211: impleme...
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
  TRACE_EVENT(drv_remain_on_channel,
  	TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
  		 enum nl80211_channel_type chantype, unsigned int duration),
  
  	TP_ARGS(local, chan, chantype, duration),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(int, center_freq)
  		__field(int, channel_type)
  		__field(unsigned int, duration)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->center_freq = chan->center_freq;
  		__entry->channel_type = chantype;
  		__entry->duration = duration;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT " freq:%dMHz duration:%dms",
  		LOCAL_PR_ARG, __entry->center_freq, __entry->duration
  	)
  );
ba99d93b3   Johannes Berg   mac80211: use DEC...
868
  DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
21f835896   Johannes Berg   mac80211: impleme...
869
  	TP_PROTO(struct ieee80211_local *local),
ba99d93b3   Johannes Berg   mac80211: use DEC...
870
  	TP_ARGS(local)
21f835896   Johannes Berg   mac80211: impleme...
871
  );
5f16a4361   Johannes Berg   mac80211: support...
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
  TRACE_EVENT(drv_offchannel_tx,
  	TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
  		 struct ieee80211_channel *chan,
  		 enum nl80211_channel_type channel_type,
  		 unsigned int wait),
  
  	TP_ARGS(local, skb, chan, channel_type, wait),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(int, center_freq)
  		__field(int, channel_type)
  		__field(unsigned int, wait)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->center_freq = chan->center_freq;
  		__entry->channel_type = channel_type;
  		__entry->wait = wait;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
  		LOCAL_PR_ARG, __entry->center_freq, __entry->wait
  	)
  );
38c091590   John W. Linville   mac80211: impleme...
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
  TRACE_EVENT(drv_set_ringparam,
  	TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
  
  	TP_ARGS(local, tx, rx),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(u32, tx)
  		__field(u32, rx)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->tx = tx;
  		__entry->rx = rx;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT " tx:%d rx %d",
  		LOCAL_PR_ARG, __entry->tx, __entry->rx
  	)
  );
  
  TRACE_EVENT(drv_get_ringparam,
  	TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
  		 u32 *rx, u32 *rx_max),
  
  	TP_ARGS(local, tx, tx_max, rx, rx_max),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(u32, tx)
  		__field(u32, tx_max)
  		__field(u32, rx)
  		__field(u32, rx_max)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->tx = *tx;
  		__entry->tx_max = *tx_max;
  		__entry->rx = *rx;
  		__entry->rx_max = *rx_max;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
  		LOCAL_PR_ARG,
  		__entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
  	)
  );
e8306f989   Vivek Natarajan   mac80211: Check f...
950
951
952
953
  DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
  	TP_PROTO(struct ieee80211_local *local),
  	TP_ARGS(local)
  );
5f16a4361   Johannes Berg   mac80211: support...
954
955
956
957
  DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
  	TP_PROTO(struct ieee80211_local *local),
  	TP_ARGS(local)
  );
bdbfd6b58   Sujith Manoharan   mac80211: Add new...
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
  TRACE_EVENT(drv_set_bitrate_mask,
  	TP_PROTO(struct ieee80211_local *local,
  		 struct ieee80211_sub_if_data *sdata,
  		 const struct cfg80211_bitrate_mask *mask),
  
  	TP_ARGS(local, sdata, mask),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		VIF_ENTRY
  		__field(u32, legacy_2g)
  		__field(u32, legacy_5g)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		VIF_ASSIGN;
  		__entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
  		__entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT  VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
  		LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
  	)
  );
b5878a2dc   Johannes Berg   mac80211: enhance...
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
  /*
   * Tracing for API calls that drivers call.
   */
  
  TRACE_EVENT(api_start_tx_ba_session,
  	TP_PROTO(struct ieee80211_sta *sta, u16 tid),
  
  	TP_ARGS(sta, tid),
  
  	TP_STRUCT__entry(
  		STA_ENTRY
  		__field(u16, tid)
  	),
  
  	TP_fast_assign(
  		STA_ASSIGN;
  		__entry->tid = tid;
  	),
  
  	TP_printk(
  		STA_PR_FMT " tid:%d",
  		STA_PR_ARG, __entry->tid
  	)
  );
  
  TRACE_EVENT(api_start_tx_ba_cb,
  	TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
  
  	TP_ARGS(sdata, ra, tid),
  
  	TP_STRUCT__entry(
  		VIF_ENTRY
  		__array(u8, ra, ETH_ALEN)
  		__field(u16, tid)
  	),
  
  	TP_fast_assign(
  		VIF_ASSIGN;
  		memcpy(__entry->ra, ra, ETH_ALEN);
  		__entry->tid = tid;
  	),
  
  	TP_printk(
  		VIF_PR_FMT " ra:%pM tid:%d",
  		VIF_PR_ARG, __entry->ra, __entry->tid
  	)
  );
  
  TRACE_EVENT(api_stop_tx_ba_session,
6a8579d0e   Johannes Berg   mac80211: clean u...
1033
  	TP_PROTO(struct ieee80211_sta *sta, u16 tid),
b5878a2dc   Johannes Berg   mac80211: enhance...
1034

6a8579d0e   Johannes Berg   mac80211: clean u...
1035
  	TP_ARGS(sta, tid),
b5878a2dc   Johannes Berg   mac80211: enhance...
1036
1037
1038
1039
  
  	TP_STRUCT__entry(
  		STA_ENTRY
  		__field(u16, tid)
b5878a2dc   Johannes Berg   mac80211: enhance...
1040
1041
1042
1043
1044
  	),
  
  	TP_fast_assign(
  		STA_ASSIGN;
  		__entry->tid = tid;
b5878a2dc   Johannes Berg   mac80211: enhance...
1045
1046
1047
  	),
  
  	TP_printk(
6a8579d0e   Johannes Berg   mac80211: clean u...
1048
1049
  		STA_PR_FMT " tid:%d",
  		STA_PR_ARG, __entry->tid
b5878a2dc   Johannes Berg   mac80211: enhance...
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
  	)
  );
  
  TRACE_EVENT(api_stop_tx_ba_cb,
  	TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
  
  	TP_ARGS(sdata, ra, tid),
  
  	TP_STRUCT__entry(
  		VIF_ENTRY
  		__array(u8, ra, ETH_ALEN)
  		__field(u16, tid)
  	),
  
  	TP_fast_assign(
  		VIF_ASSIGN;
  		memcpy(__entry->ra, ra, ETH_ALEN);
  		__entry->tid = tid;
  	),
  
  	TP_printk(
  		VIF_PR_FMT " ra:%pM tid:%d",
  		VIF_PR_ARG, __entry->ra, __entry->tid
  	)
  );
ba99d93b3   Johannes Berg   mac80211: use DEC...
1075
  DEFINE_EVENT(local_only_evt, api_restart_hw,
b5878a2dc   Johannes Berg   mac80211: enhance...
1076
  	TP_PROTO(struct ieee80211_local *local),
ba99d93b3   Johannes Berg   mac80211: use DEC...
1077
  	TP_ARGS(local)
b5878a2dc   Johannes Berg   mac80211: enhance...
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
  );
  
  TRACE_EVENT(api_beacon_loss,
  	TP_PROTO(struct ieee80211_sub_if_data *sdata),
  
  	TP_ARGS(sdata),
  
  	TP_STRUCT__entry(
  		VIF_ENTRY
  	),
  
  	TP_fast_assign(
  		VIF_ASSIGN;
  	),
  
  	TP_printk(
  		VIF_PR_FMT,
  		VIF_PR_ARG
  	)
  );
  
  TRACE_EVENT(api_connection_loss,
  	TP_PROTO(struct ieee80211_sub_if_data *sdata),
  
  	TP_ARGS(sdata),
  
  	TP_STRUCT__entry(
  		VIF_ENTRY
  	),
  
  	TP_fast_assign(
  		VIF_ASSIGN;
  	),
  
  	TP_printk(
  		VIF_PR_FMT,
  		VIF_PR_ARG
  	)
  );
  
  TRACE_EVENT(api_cqm_rssi_notify,
  	TP_PROTO(struct ieee80211_sub_if_data *sdata,
  		 enum nl80211_cqm_rssi_threshold_event rssi_event),
  
  	TP_ARGS(sdata, rssi_event),
  
  	TP_STRUCT__entry(
  		VIF_ENTRY
  		__field(u32, rssi_event)
  	),
  
  	TP_fast_assign(
  		VIF_ASSIGN;
  		__entry->rssi_event = rssi_event;
  	),
  
  	TP_printk(
  		VIF_PR_FMT " event:%d",
  		VIF_PR_ARG, __entry->rssi_event
  	)
  );
  
  TRACE_EVENT(api_scan_completed,
  	TP_PROTO(struct ieee80211_local *local, bool aborted),
  
  	TP_ARGS(local, aborted),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(bool, aborted)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->aborted = aborted;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT " aborted:%d",
  		LOCAL_PR_ARG, __entry->aborted
  	)
  );
79f460ca4   Luciano Coelho   mac80211: add sup...
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
  TRACE_EVENT(api_sched_scan_results,
  	TP_PROTO(struct ieee80211_local *local),
  
  	TP_ARGS(local),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT, LOCAL_PR_ARG
  	)
  );
  
  TRACE_EVENT(api_sched_scan_stopped,
  	TP_PROTO(struct ieee80211_local *local),
  
  	TP_ARGS(local),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT, LOCAL_PR_ARG
  	)
  );
b5878a2dc   Johannes Berg   mac80211: enhance...
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
  TRACE_EVENT(api_sta_block_awake,
  	TP_PROTO(struct ieee80211_local *local,
  		 struct ieee80211_sta *sta, bool block),
  
  	TP_ARGS(local, sta, block),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		STA_ENTRY
  		__field(bool, block)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		STA_ASSIGN;
  		__entry->block = block;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT STA_PR_FMT " block:%d",
  		LOCAL_PR_ARG, STA_PR_FMT, __entry->block
  	)
  );
5ce6e438d   Johannes Berg   mac80211: add off...
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
  TRACE_EVENT(api_chswitch_done,
  	TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
  
  	TP_ARGS(sdata, success),
  
  	TP_STRUCT__entry(
  		VIF_ENTRY
  		__field(bool, success)
  	),
  
  	TP_fast_assign(
  		VIF_ASSIGN;
  		__entry->success = success;
  	),
  
  	TP_printk(
  		VIF_PR_FMT " success=%d",
  		VIF_PR_ARG, __entry->success
  	)
  );
ba99d93b3   Johannes Berg   mac80211: use DEC...
1238
  DEFINE_EVENT(local_only_evt, api_ready_on_channel,
21f835896   Johannes Berg   mac80211: impleme...
1239
  	TP_PROTO(struct ieee80211_local *local),
ba99d93b3   Johannes Berg   mac80211: use DEC...
1240
  	TP_ARGS(local)
21f835896   Johannes Berg   mac80211: impleme...
1241
  );
ba99d93b3   Johannes Berg   mac80211: use DEC...
1242
  DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
21f835896   Johannes Berg   mac80211: impleme...
1243
  	TP_PROTO(struct ieee80211_local *local),
ba99d93b3   Johannes Berg   mac80211: use DEC...
1244
  	TP_ARGS(local)
21f835896   Johannes Berg   mac80211: impleme...
1245
  );
b5878a2dc   Johannes Berg   mac80211: enhance...
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
  /*
   * Tracing for internal functions
   * (which may also be called in response to driver calls)
   */
  
  TRACE_EVENT(wake_queue,
  	TP_PROTO(struct ieee80211_local *local, u16 queue,
  		 enum queue_stop_reason reason),
  
  	TP_ARGS(local, queue, reason),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(u16, queue)
  		__field(u32, reason)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->queue = queue;
  		__entry->reason = reason;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT " queue:%d, reason:%d",
  		LOCAL_PR_ARG, __entry->queue, __entry->reason
  	)
  );
  
  TRACE_EVENT(stop_queue,
  	TP_PROTO(struct ieee80211_local *local, u16 queue,
  		 enum queue_stop_reason reason),
  
  	TP_ARGS(local, queue, reason),
  
  	TP_STRUCT__entry(
  		LOCAL_ENTRY
  		__field(u16, queue)
  		__field(u32, reason)
  	),
  
  	TP_fast_assign(
  		LOCAL_ASSIGN;
  		__entry->queue = queue;
  		__entry->reason = reason;
  	),
  
  	TP_printk(
  		LOCAL_PR_FMT " queue:%d, reason:%d",
  		LOCAL_PR_ARG, __entry->queue, __entry->reason
  	)
  );
f742880c9   Christian Lamparter   mac80211: fix spa...
1298
  #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
0a2b8bb24   Johannes Berg   mac80211: driver ...
1299
1300
1301
1302
1303
1304
  
  #undef TRACE_INCLUDE_PATH
  #define TRACE_INCLUDE_PATH .
  #undef TRACE_INCLUDE_FILE
  #define TRACE_INCLUDE_FILE driver-trace
  #include <trace/define_trace.h>