]>
Commit | Line | Data |
---|---|---|
0a2b8bb2 JB |
1 | #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 | ||
f742880c | 8 | #if !defined(CONFIG_MAC80211_DRIVER_API_TRACER) || defined(__CHECKER__) |
0a2b8bb2 JB |
9 | #undef TRACE_EVENT |
10 | #define TRACE_EVENT(name, proto, ...) \ | |
11 | static inline void trace_ ## name(proto) {} | |
ba99d93b JB |
12 | #undef DECLARE_EVENT_CLASS |
13 | #define DECLARE_EVENT_CLASS(...) | |
14 | #undef DEFINE_EVENT | |
15 | #define DEFINE_EVENT(evt_class, name, proto, ...) \ | |
16 | static inline void trace_ ## name(proto) {} | |
0a2b8bb2 JB |
17 | #endif |
18 | ||
19 | #undef TRACE_SYSTEM | |
20 | #define TRACE_SYSTEM mac80211 | |
21 | ||
22 | #define MAXNAME 32 | |
23 | #define LOCAL_ENTRY __array(char, wiphy_name, 32) | |
24 | #define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME) | |
25 | #define LOCAL_PR_FMT "%s" | |
26 | #define LOCAL_PR_ARG __entry->wiphy_name | |
27 | ||
28 | #define STA_ENTRY __array(char, sta_addr, ETH_ALEN) | |
29 | #define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN)) | |
30 | #define STA_PR_FMT " sta:%pM" | |
31 | #define STA_PR_ARG __entry->sta_addr | |
32 | ||
2ca27bcf JB |
33 | #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \ |
34 | __field(bool, p2p) \ | |
12375ef9 | 35 | __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>") |
2ca27bcf JB |
36 | #define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \ |
37 | __entry->p2p = sdata->vif.p2p; \ | |
12375ef9 | 38 | __assign_str(vif_name, sdata->dev ? sdata->dev->name : "<nodev>") |
2ca27bcf JB |
39 | #define VIF_PR_FMT " vif:%s(%d%s)" |
40 | #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : "" | |
0a2b8bb2 | 41 | |
b5878a2d JB |
42 | /* |
43 | * Tracing for driver callbacks. | |
44 | */ | |
45 | ||
ba99d93b | 46 | DECLARE_EVENT_CLASS(local_only_evt, |
4efc76bd JB |
47 | TP_PROTO(struct ieee80211_local *local), |
48 | TP_ARGS(local), | |
49 | TP_STRUCT__entry( | |
50 | LOCAL_ENTRY | |
51 | ), | |
52 | TP_fast_assign( | |
53 | LOCAL_ASSIGN; | |
54 | ), | |
55 | TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG) | |
56 | ); | |
0a2b8bb2 | 57 | |
92ddc111 LC |
58 | DECLARE_EVENT_CLASS(local_sdata_addr_evt, |
59 | TP_PROTO(struct ieee80211_local *local, | |
60 | struct ieee80211_sub_if_data *sdata), | |
61 | TP_ARGS(local, sdata), | |
62 | ||
63 | TP_STRUCT__entry( | |
64 | LOCAL_ENTRY | |
65 | VIF_ENTRY | |
66 | __array(char, addr, 6) | |
67 | ), | |
68 | ||
69 | TP_fast_assign( | |
70 | LOCAL_ASSIGN; | |
71 | VIF_ASSIGN; | |
72 | memcpy(__entry->addr, sdata->vif.addr, 6); | |
73 | ), | |
74 | ||
75 | TP_printk( | |
76 | LOCAL_PR_FMT VIF_PR_FMT " addr:%pM", | |
77 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr | |
78 | ) | |
79 | ); | |
80 | ||
81 | DECLARE_EVENT_CLASS(local_u32_evt, | |
82 | TP_PROTO(struct ieee80211_local *local, u32 value), | |
83 | TP_ARGS(local, value), | |
84 | ||
85 | TP_STRUCT__entry( | |
86 | LOCAL_ENTRY | |
87 | __field(u32, value) | |
88 | ), | |
89 | ||
90 | TP_fast_assign( | |
91 | LOCAL_ASSIGN; | |
92 | __entry->value = value; | |
93 | ), | |
94 | ||
95 | TP_printk( | |
96 | LOCAL_PR_FMT " value:%d", | |
97 | LOCAL_PR_ARG, __entry->value | |
98 | ) | |
99 | ); | |
100 | ||
79f460ca LC |
101 | DECLARE_EVENT_CLASS(local_sdata_evt, |
102 | TP_PROTO(struct ieee80211_local *local, | |
103 | struct ieee80211_sub_if_data *sdata), | |
104 | TP_ARGS(local, sdata), | |
105 | ||
106 | TP_STRUCT__entry( | |
107 | LOCAL_ENTRY | |
108 | VIF_ENTRY | |
109 | ), | |
110 | ||
111 | TP_fast_assign( | |
112 | LOCAL_ASSIGN; | |
113 | VIF_ASSIGN; | |
114 | ), | |
115 | ||
116 | TP_printk( | |
117 | LOCAL_PR_FMT VIF_PR_FMT, | |
118 | LOCAL_PR_ARG, VIF_PR_ARG | |
119 | ) | |
120 | ); | |
121 | ||
ba99d93b JB |
122 | DEFINE_EVENT(local_only_evt, drv_return_void, |
123 | TP_PROTO(struct ieee80211_local *local), | |
124 | TP_ARGS(local) | |
125 | ); | |
126 | ||
4efc76bd JB |
127 | TRACE_EVENT(drv_return_int, |
128 | TP_PROTO(struct ieee80211_local *local, int ret), | |
0a2b8bb2 | 129 | TP_ARGS(local, ret), |
0a2b8bb2 JB |
130 | TP_STRUCT__entry( |
131 | LOCAL_ENTRY | |
132 | __field(int, ret) | |
133 | ), | |
4efc76bd JB |
134 | TP_fast_assign( |
135 | LOCAL_ASSIGN; | |
136 | __entry->ret = ret; | |
137 | ), | |
138 | TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret) | |
139 | ); | |
0a2b8bb2 | 140 | |
e8306f98 VN |
141 | TRACE_EVENT(drv_return_bool, |
142 | TP_PROTO(struct ieee80211_local *local, bool ret), | |
143 | TP_ARGS(local, ret), | |
144 | TP_STRUCT__entry( | |
145 | LOCAL_ENTRY | |
146 | __field(bool, ret) | |
147 | ), | |
148 | TP_fast_assign( | |
149 | LOCAL_ASSIGN; | |
150 | __entry->ret = ret; | |
151 | ), | |
152 | TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ? | |
153 | "true" : "false") | |
154 | ); | |
155 | ||
4efc76bd JB |
156 | TRACE_EVENT(drv_return_u64, |
157 | TP_PROTO(struct ieee80211_local *local, u64 ret), | |
158 | TP_ARGS(local, ret), | |
159 | TP_STRUCT__entry( | |
160 | LOCAL_ENTRY | |
161 | __field(u64, ret) | |
162 | ), | |
0a2b8bb2 JB |
163 | TP_fast_assign( |
164 | LOCAL_ASSIGN; | |
165 | __entry->ret = ret; | |
166 | ), | |
4efc76bd JB |
167 | TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret) |
168 | ); | |
169 | ||
ba99d93b | 170 | DEFINE_EVENT(local_only_evt, drv_start, |
4efc76bd | 171 | TP_PROTO(struct ieee80211_local *local), |
ba99d93b | 172 | TP_ARGS(local) |
0a2b8bb2 JB |
173 | ); |
174 | ||
eecc4800 JB |
175 | DEFINE_EVENT(local_only_evt, drv_suspend, |
176 | TP_PROTO(struct ieee80211_local *local), | |
177 | TP_ARGS(local) | |
178 | ); | |
179 | ||
180 | DEFINE_EVENT(local_only_evt, drv_resume, | |
181 | TP_PROTO(struct ieee80211_local *local), | |
182 | TP_ARGS(local) | |
183 | ); | |
184 | ||
ba99d93b | 185 | DEFINE_EVENT(local_only_evt, drv_stop, |
0a2b8bb2 | 186 | TP_PROTO(struct ieee80211_local *local), |
ba99d93b | 187 | TP_ARGS(local) |
0a2b8bb2 JB |
188 | ); |
189 | ||
92ddc111 | 190 | DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface, |
0a2b8bb2 | 191 | TP_PROTO(struct ieee80211_local *local, |
4efc76bd | 192 | struct ieee80211_sub_if_data *sdata), |
92ddc111 | 193 | TP_ARGS(local, sdata) |
0a2b8bb2 JB |
194 | ); |
195 | ||
34d4bc4d JB |
196 | TRACE_EVENT(drv_change_interface, |
197 | TP_PROTO(struct ieee80211_local *local, | |
198 | struct ieee80211_sub_if_data *sdata, | |
2ca27bcf | 199 | enum nl80211_iftype type, bool p2p), |
34d4bc4d | 200 | |
2ca27bcf | 201 | TP_ARGS(local, sdata, type, p2p), |
34d4bc4d JB |
202 | |
203 | TP_STRUCT__entry( | |
204 | LOCAL_ENTRY | |
205 | VIF_ENTRY | |
206 | __field(u32, new_type) | |
2ca27bcf | 207 | __field(bool, new_p2p) |
34d4bc4d JB |
208 | ), |
209 | ||
210 | TP_fast_assign( | |
211 | LOCAL_ASSIGN; | |
212 | VIF_ASSIGN; | |
213 | __entry->new_type = type; | |
2ca27bcf | 214 | __entry->new_p2p = p2p; |
34d4bc4d JB |
215 | ), |
216 | ||
217 | TP_printk( | |
2ca27bcf JB |
218 | LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s", |
219 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type, | |
220 | __entry->new_p2p ? "/p2p" : "" | |
34d4bc4d JB |
221 | ) |
222 | ); | |
223 | ||
92ddc111 LC |
224 | DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface, |
225 | TP_PROTO(struct ieee80211_local *local, | |
226 | struct ieee80211_sub_if_data *sdata), | |
227 | TP_ARGS(local, sdata) | |
0a2b8bb2 JB |
228 | ); |
229 | ||
230 | TRACE_EVENT(drv_config, | |
231 | TP_PROTO(struct ieee80211_local *local, | |
4efc76bd | 232 | u32 changed), |
0a2b8bb2 | 233 | |
4efc76bd | 234 | TP_ARGS(local, changed), |
0a2b8bb2 JB |
235 | |
236 | TP_STRUCT__entry( | |
237 | LOCAL_ENTRY | |
238 | __field(u32, changed) | |
f911ab83 JB |
239 | __field(u32, flags) |
240 | __field(int, power_level) | |
241 | __field(int, dynamic_ps_timeout) | |
242 | __field(int, max_sleep_period) | |
243 | __field(u16, listen_interval) | |
244 | __field(u8, long_frame_max_tx_count) | |
245 | __field(u8, short_frame_max_tx_count) | |
246 | __field(int, center_freq) | |
247 | __field(int, channel_type) | |
0f78231b | 248 | __field(int, smps) |
0a2b8bb2 JB |
249 | ), |
250 | ||
251 | TP_fast_assign( | |
252 | LOCAL_ASSIGN; | |
253 | __entry->changed = changed; | |
f911ab83 JB |
254 | __entry->flags = local->hw.conf.flags; |
255 | __entry->power_level = local->hw.conf.power_level; | |
256 | __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout; | |
257 | __entry->max_sleep_period = local->hw.conf.max_sleep_period; | |
258 | __entry->listen_interval = local->hw.conf.listen_interval; | |
259 | __entry->long_frame_max_tx_count = local->hw.conf.long_frame_max_tx_count; | |
260 | __entry->short_frame_max_tx_count = local->hw.conf.short_frame_max_tx_count; | |
261 | __entry->center_freq = local->hw.conf.channel->center_freq; | |
262 | __entry->channel_type = local->hw.conf.channel_type; | |
0f78231b | 263 | __entry->smps = local->hw.conf.smps_mode; |
0a2b8bb2 JB |
264 | ), |
265 | ||
266 | TP_printk( | |
4efc76bd JB |
267 | LOCAL_PR_FMT " ch:%#x freq:%d", |
268 | LOCAL_PR_ARG, __entry->changed, __entry->center_freq | |
0a2b8bb2 JB |
269 | ) |
270 | ); | |
271 | ||
272 | TRACE_EVENT(drv_bss_info_changed, | |
273 | TP_PROTO(struct ieee80211_local *local, | |
12375ef9 | 274 | struct ieee80211_sub_if_data *sdata, |
0a2b8bb2 JB |
275 | struct ieee80211_bss_conf *info, |
276 | u32 changed), | |
277 | ||
12375ef9 | 278 | TP_ARGS(local, sdata, info, changed), |
0a2b8bb2 JB |
279 | |
280 | TP_STRUCT__entry( | |
281 | LOCAL_ENTRY | |
282 | VIF_ENTRY | |
283 | __field(bool, assoc) | |
284 | __field(u16, aid) | |
285 | __field(bool, cts) | |
286 | __field(bool, shortpre) | |
287 | __field(bool, shortslot) | |
288 | __field(u8, dtimper) | |
289 | __field(u16, bcnint) | |
290 | __field(u16, assoc_cap) | |
291 | __field(u64, timestamp) | |
292 | __field(u32, basic_rates) | |
293 | __field(u32, changed) | |
f911ab83 JB |
294 | __field(bool, enable_beacon) |
295 | __field(u16, ht_operation_mode) | |
0a2b8bb2 JB |
296 | ), |
297 | ||
298 | TP_fast_assign( | |
299 | LOCAL_ASSIGN; | |
300 | VIF_ASSIGN; | |
301 | __entry->changed = changed; | |
302 | __entry->aid = info->aid; | |
303 | __entry->assoc = info->assoc; | |
304 | __entry->shortpre = info->use_short_preamble; | |
305 | __entry->cts = info->use_cts_prot; | |
306 | __entry->shortslot = info->use_short_slot; | |
307 | __entry->dtimper = info->dtim_period; | |
308 | __entry->bcnint = info->beacon_int; | |
309 | __entry->assoc_cap = info->assoc_capability; | |
310 | __entry->timestamp = info->timestamp; | |
311 | __entry->basic_rates = info->basic_rates; | |
f911ab83 JB |
312 | __entry->enable_beacon = info->enable_beacon; |
313 | __entry->ht_operation_mode = info->ht_operation_mode; | |
0a2b8bb2 JB |
314 | ), |
315 | ||
316 | TP_printk( | |
317 | LOCAL_PR_FMT VIF_PR_FMT " changed:%#x", | |
318 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed | |
319 | ) | |
320 | ); | |
321 | ||
b2abb6e2 JB |
322 | DECLARE_EVENT_CLASS(tx_sync_evt, |
323 | TP_PROTO(struct ieee80211_local *local, | |
324 | struct ieee80211_sub_if_data *sdata, | |
325 | const u8 *bssid, | |
326 | enum ieee80211_tx_sync_type type), | |
327 | TP_ARGS(local, sdata, bssid, type), | |
328 | ||
329 | TP_STRUCT__entry( | |
330 | LOCAL_ENTRY | |
331 | VIF_ENTRY | |
332 | __array(char, bssid, ETH_ALEN) | |
333 | __field(u32, sync_type) | |
334 | ), | |
335 | ||
336 | TP_fast_assign( | |
337 | LOCAL_ASSIGN; | |
338 | VIF_ASSIGN; | |
339 | memcpy(__entry->bssid, bssid, ETH_ALEN); | |
340 | __entry->sync_type = type; | |
341 | ), | |
342 | ||
343 | TP_printk( | |
344 | LOCAL_PR_FMT VIF_PR_FMT " bssid:%pM type:%d", | |
345 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->bssid, __entry->sync_type | |
346 | ) | |
347 | ); | |
348 | ||
349 | DEFINE_EVENT(tx_sync_evt, drv_tx_sync, | |
350 | TP_PROTO(struct ieee80211_local *local, | |
351 | struct ieee80211_sub_if_data *sdata, | |
352 | const u8 *bssid, | |
353 | enum ieee80211_tx_sync_type type), | |
354 | TP_ARGS(local, sdata, bssid, type) | |
355 | ); | |
356 | ||
357 | DEFINE_EVENT(tx_sync_evt, drv_finish_tx_sync, | |
358 | TP_PROTO(struct ieee80211_local *local, | |
359 | struct ieee80211_sub_if_data *sdata, | |
360 | const u8 *bssid, | |
361 | enum ieee80211_tx_sync_type type), | |
362 | TP_ARGS(local, sdata, bssid, type) | |
363 | ); | |
364 | ||
3ac64bee | 365 | TRACE_EVENT(drv_prepare_multicast, |
4efc76bd | 366 | TP_PROTO(struct ieee80211_local *local, int mc_count), |
3ac64bee | 367 | |
4efc76bd | 368 | TP_ARGS(local, mc_count), |
3ac64bee JB |
369 | |
370 | TP_STRUCT__entry( | |
371 | LOCAL_ENTRY | |
372 | __field(int, mc_count) | |
3ac64bee JB |
373 | ), |
374 | ||
375 | TP_fast_assign( | |
376 | LOCAL_ASSIGN; | |
377 | __entry->mc_count = mc_count; | |
3ac64bee JB |
378 | ), |
379 | ||
380 | TP_printk( | |
4efc76bd JB |
381 | LOCAL_PR_FMT " prepare mc (%d)", |
382 | LOCAL_PR_ARG, __entry->mc_count | |
3ac64bee JB |
383 | ) |
384 | ); | |
385 | ||
0a2b8bb2 JB |
386 | TRACE_EVENT(drv_configure_filter, |
387 | TP_PROTO(struct ieee80211_local *local, | |
388 | unsigned int changed_flags, | |
389 | unsigned int *total_flags, | |
3ac64bee | 390 | u64 multicast), |
0a2b8bb2 | 391 | |
3ac64bee | 392 | TP_ARGS(local, changed_flags, total_flags, multicast), |
0a2b8bb2 JB |
393 | |
394 | TP_STRUCT__entry( | |
395 | LOCAL_ENTRY | |
396 | __field(unsigned int, changed) | |
397 | __field(unsigned int, total) | |
3ac64bee | 398 | __field(u64, multicast) |
0a2b8bb2 JB |
399 | ), |
400 | ||
401 | TP_fast_assign( | |
402 | LOCAL_ASSIGN; | |
403 | __entry->changed = changed_flags; | |
404 | __entry->total = *total_flags; | |
3ac64bee | 405 | __entry->multicast = multicast; |
0a2b8bb2 JB |
406 | ), |
407 | ||
408 | TP_printk( | |
3ac64bee JB |
409 | LOCAL_PR_FMT " changed:%#x total:%#x", |
410 | LOCAL_PR_ARG, __entry->changed, __entry->total | |
0a2b8bb2 JB |
411 | ) |
412 | ); | |
413 | ||
414 | TRACE_EVENT(drv_set_tim, | |
415 | TP_PROTO(struct ieee80211_local *local, | |
4efc76bd | 416 | struct ieee80211_sta *sta, bool set), |
0a2b8bb2 | 417 | |
4efc76bd | 418 | TP_ARGS(local, sta, set), |
0a2b8bb2 JB |
419 | |
420 | TP_STRUCT__entry( | |
421 | LOCAL_ENTRY | |
422 | STA_ENTRY | |
423 | __field(bool, set) | |
0a2b8bb2 JB |
424 | ), |
425 | ||
426 | TP_fast_assign( | |
427 | LOCAL_ASSIGN; | |
428 | STA_ASSIGN; | |
429 | __entry->set = set; | |
0a2b8bb2 JB |
430 | ), |
431 | ||
432 | TP_printk( | |
4efc76bd JB |
433 | LOCAL_PR_FMT STA_PR_FMT " set:%d", |
434 | LOCAL_PR_ARG, STA_PR_FMT, __entry->set | |
0a2b8bb2 JB |
435 | ) |
436 | ); | |
437 | ||
438 | TRACE_EVENT(drv_set_key, | |
439 | TP_PROTO(struct ieee80211_local *local, | |
12375ef9 | 440 | enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata, |
0a2b8bb2 | 441 | struct ieee80211_sta *sta, |
4efc76bd | 442 | struct ieee80211_key_conf *key), |
0a2b8bb2 | 443 | |
4efc76bd | 444 | TP_ARGS(local, cmd, sdata, sta, key), |
0a2b8bb2 JB |
445 | |
446 | TP_STRUCT__entry( | |
447 | LOCAL_ENTRY | |
448 | VIF_ENTRY | |
449 | STA_ENTRY | |
97359d12 | 450 | __field(u32, cipher) |
0a2b8bb2 JB |
451 | __field(u8, hw_key_idx) |
452 | __field(u8, flags) | |
453 | __field(s8, keyidx) | |
0a2b8bb2 JB |
454 | ), |
455 | ||
456 | TP_fast_assign( | |
457 | LOCAL_ASSIGN; | |
458 | VIF_ASSIGN; | |
459 | STA_ASSIGN; | |
97359d12 | 460 | __entry->cipher = key->cipher; |
0a2b8bb2 JB |
461 | __entry->flags = key->flags; |
462 | __entry->keyidx = key->keyidx; | |
463 | __entry->hw_key_idx = key->hw_key_idx; | |
0a2b8bb2 JB |
464 | ), |
465 | ||
466 | TP_printk( | |
4efc76bd JB |
467 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT, |
468 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG | |
0a2b8bb2 JB |
469 | ) |
470 | ); | |
471 | ||
472 | TRACE_EVENT(drv_update_tkip_key, | |
473 | TP_PROTO(struct ieee80211_local *local, | |
b3fbdcf4 | 474 | struct ieee80211_sub_if_data *sdata, |
0a2b8bb2 | 475 | struct ieee80211_key_conf *conf, |
b3fbdcf4 | 476 | struct ieee80211_sta *sta, u32 iv32), |
0a2b8bb2 | 477 | |
b3fbdcf4 | 478 | TP_ARGS(local, sdata, conf, sta, iv32), |
0a2b8bb2 JB |
479 | |
480 | TP_STRUCT__entry( | |
481 | LOCAL_ENTRY | |
b3fbdcf4 JB |
482 | VIF_ENTRY |
483 | STA_ENTRY | |
0a2b8bb2 JB |
484 | __field(u32, iv32) |
485 | ), | |
486 | ||
487 | TP_fast_assign( | |
488 | LOCAL_ASSIGN; | |
b3fbdcf4 JB |
489 | VIF_ASSIGN; |
490 | STA_ASSIGN; | |
0a2b8bb2 JB |
491 | __entry->iv32 = iv32; |
492 | ), | |
493 | ||
494 | TP_printk( | |
b3fbdcf4 JB |
495 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x", |
496 | LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32 | |
0a2b8bb2 JB |
497 | ) |
498 | ); | |
499 | ||
79f460ca | 500 | DEFINE_EVENT(local_sdata_evt, drv_hw_scan, |
0a2b8bb2 | 501 | TP_PROTO(struct ieee80211_local *local, |
79f460ca LC |
502 | struct ieee80211_sub_if_data *sdata), |
503 | TP_ARGS(local, sdata) | |
504 | ); | |
0a2b8bb2 | 505 | |
b856439b EP |
506 | DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan, |
507 | TP_PROTO(struct ieee80211_local *local, | |
508 | struct ieee80211_sub_if_data *sdata), | |
509 | TP_ARGS(local, sdata) | |
510 | ); | |
511 | ||
79f460ca LC |
512 | DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start, |
513 | TP_PROTO(struct ieee80211_local *local, | |
514 | struct ieee80211_sub_if_data *sdata), | |
515 | TP_ARGS(local, sdata) | |
516 | ); | |
0a2b8bb2 | 517 | |
79f460ca LC |
518 | DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop, |
519 | TP_PROTO(struct ieee80211_local *local, | |
520 | struct ieee80211_sub_if_data *sdata), | |
521 | TP_ARGS(local, sdata) | |
0a2b8bb2 JB |
522 | ); |
523 | ||
ba99d93b | 524 | DEFINE_EVENT(local_only_evt, drv_sw_scan_start, |
0a2b8bb2 | 525 | TP_PROTO(struct ieee80211_local *local), |
ba99d93b | 526 | TP_ARGS(local) |
0a2b8bb2 JB |
527 | ); |
528 | ||
ba99d93b | 529 | DEFINE_EVENT(local_only_evt, drv_sw_scan_complete, |
0a2b8bb2 | 530 | TP_PROTO(struct ieee80211_local *local), |
ba99d93b | 531 | TP_ARGS(local) |
0a2b8bb2 JB |
532 | ); |
533 | ||
534 | TRACE_EVENT(drv_get_stats, | |
535 | TP_PROTO(struct ieee80211_local *local, | |
536 | struct ieee80211_low_level_stats *stats, | |
537 | int ret), | |
538 | ||
539 | TP_ARGS(local, stats, ret), | |
540 | ||
541 | TP_STRUCT__entry( | |
542 | LOCAL_ENTRY | |
543 | __field(int, ret) | |
544 | __field(unsigned int, ackfail) | |
545 | __field(unsigned int, rtsfail) | |
546 | __field(unsigned int, fcserr) | |
547 | __field(unsigned int, rtssucc) | |
548 | ), | |
549 | ||
550 | TP_fast_assign( | |
551 | LOCAL_ASSIGN; | |
552 | __entry->ret = ret; | |
553 | __entry->ackfail = stats->dot11ACKFailureCount; | |
554 | __entry->rtsfail = stats->dot11RTSFailureCount; | |
555 | __entry->fcserr = stats->dot11FCSErrorCount; | |
556 | __entry->rtssucc = stats->dot11RTSSuccessCount; | |
557 | ), | |
558 | ||
559 | TP_printk( | |
560 | LOCAL_PR_FMT " ret:%d", | |
561 | LOCAL_PR_ARG, __entry->ret | |
562 | ) | |
563 | ); | |
564 | ||
565 | TRACE_EVENT(drv_get_tkip_seq, | |
566 | TP_PROTO(struct ieee80211_local *local, | |
567 | u8 hw_key_idx, u32 *iv32, u16 *iv16), | |
568 | ||
569 | TP_ARGS(local, hw_key_idx, iv32, iv16), | |
570 | ||
571 | TP_STRUCT__entry( | |
572 | LOCAL_ENTRY | |
573 | __field(u8, hw_key_idx) | |
574 | __field(u32, iv32) | |
575 | __field(u16, iv16) | |
576 | ), | |
577 | ||
578 | TP_fast_assign( | |
579 | LOCAL_ASSIGN; | |
580 | __entry->hw_key_idx = hw_key_idx; | |
581 | __entry->iv32 = *iv32; | |
582 | __entry->iv16 = *iv16; | |
583 | ), | |
584 | ||
585 | TP_printk( | |
586 | LOCAL_PR_FMT, LOCAL_PR_ARG | |
587 | ) | |
588 | ); | |
589 | ||
92ddc111 | 590 | DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold, |
f23a4780 | 591 | TP_PROTO(struct ieee80211_local *local, u32 value), |
92ddc111 | 592 | TP_ARGS(local, value) |
f23a4780 AN |
593 | ); |
594 | ||
92ddc111 | 595 | DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold, |
4efc76bd | 596 | TP_PROTO(struct ieee80211_local *local, u32 value), |
92ddc111 | 597 | TP_ARGS(local, value) |
310bc676 LT |
598 | ); |
599 | ||
600 | TRACE_EVENT(drv_set_coverage_class, | |
4efc76bd | 601 | TP_PROTO(struct ieee80211_local *local, u8 value), |
310bc676 | 602 | |
4efc76bd | 603 | TP_ARGS(local, value), |
310bc676 LT |
604 | |
605 | TP_STRUCT__entry( | |
606 | LOCAL_ENTRY | |
607 | __field(u8, value) | |
310bc676 LT |
608 | ), |
609 | ||
610 | TP_fast_assign( | |
0a2b8bb2 | 611 | LOCAL_ASSIGN; |
0a2b8bb2 JB |
612 | __entry->value = value; |
613 | ), | |
614 | ||
615 | TP_printk( | |
4efc76bd JB |
616 | LOCAL_PR_FMT " value:%d", |
617 | LOCAL_PR_ARG, __entry->value | |
0a2b8bb2 JB |
618 | ) |
619 | ); | |
620 | ||
621 | TRACE_EVENT(drv_sta_notify, | |
622 | TP_PROTO(struct ieee80211_local *local, | |
12375ef9 | 623 | struct ieee80211_sub_if_data *sdata, |
0a2b8bb2 JB |
624 | enum sta_notify_cmd cmd, |
625 | struct ieee80211_sta *sta), | |
626 | ||
12375ef9 | 627 | TP_ARGS(local, sdata, cmd, sta), |
0a2b8bb2 JB |
628 | |
629 | TP_STRUCT__entry( | |
630 | LOCAL_ENTRY | |
631 | VIF_ENTRY | |
632 | STA_ENTRY | |
633 | __field(u32, cmd) | |
634 | ), | |
635 | ||
636 | TP_fast_assign( | |
637 | LOCAL_ASSIGN; | |
638 | VIF_ASSIGN; | |
639 | STA_ASSIGN; | |
640 | __entry->cmd = cmd; | |
641 | ), | |
642 | ||
643 | TP_printk( | |
644 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d", | |
645 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd | |
646 | ) | |
647 | ); | |
648 | ||
34e89507 JB |
649 | TRACE_EVENT(drv_sta_add, |
650 | TP_PROTO(struct ieee80211_local *local, | |
651 | struct ieee80211_sub_if_data *sdata, | |
4efc76bd | 652 | struct ieee80211_sta *sta), |
34e89507 | 653 | |
4efc76bd | 654 | TP_ARGS(local, sdata, sta), |
34e89507 JB |
655 | |
656 | TP_STRUCT__entry( | |
657 | LOCAL_ENTRY | |
658 | VIF_ENTRY | |
659 | STA_ENTRY | |
34e89507 JB |
660 | ), |
661 | ||
662 | TP_fast_assign( | |
663 | LOCAL_ASSIGN; | |
664 | VIF_ASSIGN; | |
665 | STA_ASSIGN; | |
34e89507 JB |
666 | ), |
667 | ||
668 | TP_printk( | |
4efc76bd JB |
669 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT, |
670 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG | |
34e89507 JB |
671 | ) |
672 | ); | |
673 | ||
674 | TRACE_EVENT(drv_sta_remove, | |
675 | TP_PROTO(struct ieee80211_local *local, | |
676 | struct ieee80211_sub_if_data *sdata, | |
677 | struct ieee80211_sta *sta), | |
678 | ||
679 | TP_ARGS(local, sdata, sta), | |
680 | ||
681 | TP_STRUCT__entry( | |
682 | LOCAL_ENTRY | |
683 | VIF_ENTRY | |
684 | STA_ENTRY | |
685 | ), | |
686 | ||
687 | TP_fast_assign( | |
688 | LOCAL_ASSIGN; | |
689 | VIF_ASSIGN; | |
690 | STA_ASSIGN; | |
691 | ), | |
692 | ||
693 | TP_printk( | |
694 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT, | |
695 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG | |
696 | ) | |
697 | ); | |
698 | ||
0a2b8bb2 JB |
699 | TRACE_EVENT(drv_conf_tx, |
700 | TP_PROTO(struct ieee80211_local *local, u16 queue, | |
4efc76bd | 701 | const struct ieee80211_tx_queue_params *params), |
0a2b8bb2 | 702 | |
4efc76bd | 703 | TP_ARGS(local, queue, params), |
0a2b8bb2 JB |
704 | |
705 | TP_STRUCT__entry( | |
706 | LOCAL_ENTRY | |
707 | __field(u16, queue) | |
708 | __field(u16, txop) | |
709 | __field(u16, cw_min) | |
710 | __field(u16, cw_max) | |
711 | __field(u8, aifs) | |
0a2b8bb2 JB |
712 | ), |
713 | ||
714 | TP_fast_assign( | |
715 | LOCAL_ASSIGN; | |
716 | __entry->queue = queue; | |
0a2b8bb2 JB |
717 | __entry->txop = params->txop; |
718 | __entry->cw_max = params->cw_max; | |
719 | __entry->cw_min = params->cw_min; | |
720 | __entry->aifs = params->aifs; | |
721 | ), | |
722 | ||
723 | TP_printk( | |
4efc76bd JB |
724 | LOCAL_PR_FMT " queue:%d", |
725 | LOCAL_PR_ARG, __entry->queue | |
0a2b8bb2 JB |
726 | ) |
727 | ); | |
728 | ||
37a41b4a EP |
729 | DEFINE_EVENT(local_sdata_evt, drv_get_tsf, |
730 | TP_PROTO(struct ieee80211_local *local, | |
731 | struct ieee80211_sub_if_data *sdata), | |
732 | TP_ARGS(local, sdata) | |
0a2b8bb2 JB |
733 | ); |
734 | ||
735 | TRACE_EVENT(drv_set_tsf, | |
37a41b4a EP |
736 | TP_PROTO(struct ieee80211_local *local, |
737 | struct ieee80211_sub_if_data *sdata, | |
738 | u64 tsf), | |
0a2b8bb2 | 739 | |
37a41b4a | 740 | TP_ARGS(local, sdata, tsf), |
0a2b8bb2 JB |
741 | |
742 | TP_STRUCT__entry( | |
743 | LOCAL_ENTRY | |
37a41b4a | 744 | VIF_ENTRY |
0a2b8bb2 JB |
745 | __field(u64, tsf) |
746 | ), | |
747 | ||
748 | TP_fast_assign( | |
749 | LOCAL_ASSIGN; | |
37a41b4a | 750 | VIF_ASSIGN; |
0a2b8bb2 JB |
751 | __entry->tsf = tsf; |
752 | ), | |
753 | ||
754 | TP_printk( | |
37a41b4a EP |
755 | LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu", |
756 | LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf | |
0a2b8bb2 JB |
757 | ) |
758 | ); | |
759 | ||
37a41b4a EP |
760 | DEFINE_EVENT(local_sdata_evt, drv_reset_tsf, |
761 | TP_PROTO(struct ieee80211_local *local, | |
762 | struct ieee80211_sub_if_data *sdata), | |
763 | TP_ARGS(local, sdata) | |
0a2b8bb2 JB |
764 | ); |
765 | ||
ba99d93b | 766 | DEFINE_EVENT(local_only_evt, drv_tx_last_beacon, |
4efc76bd | 767 | TP_PROTO(struct ieee80211_local *local), |
ba99d93b | 768 | TP_ARGS(local) |
0a2b8bb2 JB |
769 | ); |
770 | ||
771 | TRACE_EVENT(drv_ampdu_action, | |
772 | TP_PROTO(struct ieee80211_local *local, | |
12375ef9 | 773 | struct ieee80211_sub_if_data *sdata, |
0a2b8bb2 JB |
774 | enum ieee80211_ampdu_mlme_action action, |
775 | struct ieee80211_sta *sta, u16 tid, | |
0b01f030 | 776 | u16 *ssn, u8 buf_size), |
0a2b8bb2 | 777 | |
0b01f030 | 778 | TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size), |
0a2b8bb2 JB |
779 | |
780 | TP_STRUCT__entry( | |
781 | LOCAL_ENTRY | |
782 | STA_ENTRY | |
783 | __field(u32, action) | |
784 | __field(u16, tid) | |
785 | __field(u16, ssn) | |
0b01f030 | 786 | __field(u8, buf_size) |
c951ad35 | 787 | VIF_ENTRY |
0a2b8bb2 JB |
788 | ), |
789 | ||
790 | TP_fast_assign( | |
791 | LOCAL_ASSIGN; | |
c951ad35 | 792 | VIF_ASSIGN; |
0a2b8bb2 | 793 | STA_ASSIGN; |
0a2b8bb2 JB |
794 | __entry->action = action; |
795 | __entry->tid = tid; | |
3092ad05 | 796 | __entry->ssn = ssn ? *ssn : 0; |
0b01f030 | 797 | __entry->buf_size = buf_size; |
0a2b8bb2 JB |
798 | ), |
799 | ||
800 | TP_printk( | |
0b01f030 JB |
801 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d", |
802 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action, | |
803 | __entry->tid, __entry->buf_size | |
0a2b8bb2 JB |
804 | ) |
805 | ); | |
a80f7c0b | 806 | |
c466d4ef JL |
807 | TRACE_EVENT(drv_get_survey, |
808 | TP_PROTO(struct ieee80211_local *local, int idx, | |
809 | struct survey_info *survey), | |
810 | ||
811 | TP_ARGS(local, idx, survey), | |
812 | ||
813 | TP_STRUCT__entry( | |
814 | LOCAL_ENTRY | |
815 | __field(int, idx) | |
816 | ), | |
817 | ||
818 | TP_fast_assign( | |
819 | LOCAL_ASSIGN; | |
820 | __entry->idx = idx; | |
821 | ), | |
822 | ||
823 | TP_printk( | |
824 | LOCAL_PR_FMT " idx:%d", | |
825 | LOCAL_PR_ARG, __entry->idx | |
826 | ) | |
827 | ); | |
828 | ||
a80f7c0b JB |
829 | TRACE_EVENT(drv_flush, |
830 | TP_PROTO(struct ieee80211_local *local, bool drop), | |
831 | ||
832 | TP_ARGS(local, drop), | |
833 | ||
834 | TP_STRUCT__entry( | |
835 | LOCAL_ENTRY | |
836 | __field(bool, drop) | |
837 | ), | |
838 | ||
839 | TP_fast_assign( | |
840 | LOCAL_ASSIGN; | |
841 | __entry->drop = drop; | |
842 | ), | |
843 | ||
844 | TP_printk( | |
845 | LOCAL_PR_FMT " drop:%d", | |
846 | LOCAL_PR_ARG, __entry->drop | |
847 | ) | |
848 | ); | |
b5878a2d | 849 | |
5ce6e438 JB |
850 | TRACE_EVENT(drv_channel_switch, |
851 | TP_PROTO(struct ieee80211_local *local, | |
852 | struct ieee80211_channel_switch *ch_switch), | |
853 | ||
854 | TP_ARGS(local, ch_switch), | |
855 | ||
856 | TP_STRUCT__entry( | |
857 | LOCAL_ENTRY | |
858 | __field(u64, timestamp) | |
859 | __field(bool, block_tx) | |
860 | __field(u16, freq) | |
861 | __field(u8, count) | |
862 | ), | |
863 | ||
864 | TP_fast_assign( | |
865 | LOCAL_ASSIGN; | |
866 | __entry->timestamp = ch_switch->timestamp; | |
867 | __entry->block_tx = ch_switch->block_tx; | |
868 | __entry->freq = ch_switch->channel->center_freq; | |
869 | __entry->count = ch_switch->count; | |
870 | ), | |
871 | ||
872 | TP_printk( | |
873 | LOCAL_PR_FMT " new freq:%u count:%d", | |
874 | LOCAL_PR_ARG, __entry->freq, __entry->count | |
875 | ) | |
876 | ); | |
877 | ||
15d96753 BR |
878 | TRACE_EVENT(drv_set_antenna, |
879 | TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret), | |
880 | ||
881 | TP_ARGS(local, tx_ant, rx_ant, ret), | |
882 | ||
883 | TP_STRUCT__entry( | |
884 | LOCAL_ENTRY | |
885 | __field(u32, tx_ant) | |
886 | __field(u32, rx_ant) | |
887 | __field(int, ret) | |
888 | ), | |
889 | ||
890 | TP_fast_assign( | |
891 | LOCAL_ASSIGN; | |
892 | __entry->tx_ant = tx_ant; | |
893 | __entry->rx_ant = rx_ant; | |
894 | __entry->ret = ret; | |
895 | ), | |
896 | ||
897 | TP_printk( | |
898 | LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d", | |
899 | LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret | |
900 | ) | |
901 | ); | |
902 | ||
903 | TRACE_EVENT(drv_get_antenna, | |
904 | TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret), | |
905 | ||
906 | TP_ARGS(local, tx_ant, rx_ant, ret), | |
907 | ||
908 | TP_STRUCT__entry( | |
909 | LOCAL_ENTRY | |
910 | __field(u32, tx_ant) | |
911 | __field(u32, rx_ant) | |
912 | __field(int, ret) | |
913 | ), | |
914 | ||
915 | TP_fast_assign( | |
916 | LOCAL_ASSIGN; | |
917 | __entry->tx_ant = tx_ant; | |
918 | __entry->rx_ant = rx_ant; | |
919 | __entry->ret = ret; | |
920 | ), | |
921 | ||
922 | TP_printk( | |
923 | LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d", | |
924 | LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret | |
925 | ) | |
926 | ); | |
927 | ||
21f83589 JB |
928 | TRACE_EVENT(drv_remain_on_channel, |
929 | TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan, | |
930 | enum nl80211_channel_type chantype, unsigned int duration), | |
931 | ||
932 | TP_ARGS(local, chan, chantype, duration), | |
933 | ||
934 | TP_STRUCT__entry( | |
935 | LOCAL_ENTRY | |
936 | __field(int, center_freq) | |
937 | __field(int, channel_type) | |
938 | __field(unsigned int, duration) | |
939 | ), | |
940 | ||
941 | TP_fast_assign( | |
942 | LOCAL_ASSIGN; | |
943 | __entry->center_freq = chan->center_freq; | |
944 | __entry->channel_type = chantype; | |
945 | __entry->duration = duration; | |
946 | ), | |
947 | ||
948 | TP_printk( | |
949 | LOCAL_PR_FMT " freq:%dMHz duration:%dms", | |
950 | LOCAL_PR_ARG, __entry->center_freq, __entry->duration | |
951 | ) | |
952 | ); | |
953 | ||
ba99d93b | 954 | DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel, |
21f83589 | 955 | TP_PROTO(struct ieee80211_local *local), |
ba99d93b | 956 | TP_ARGS(local) |
21f83589 JB |
957 | ); |
958 | ||
5f16a436 JB |
959 | TRACE_EVENT(drv_offchannel_tx, |
960 | TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb, | |
961 | struct ieee80211_channel *chan, | |
962 | enum nl80211_channel_type channel_type, | |
963 | unsigned int wait), | |
964 | ||
965 | TP_ARGS(local, skb, chan, channel_type, wait), | |
966 | ||
967 | TP_STRUCT__entry( | |
968 | LOCAL_ENTRY | |
969 | __field(int, center_freq) | |
970 | __field(int, channel_type) | |
971 | __field(unsigned int, wait) | |
972 | ), | |
973 | ||
974 | TP_fast_assign( | |
975 | LOCAL_ASSIGN; | |
976 | __entry->center_freq = chan->center_freq; | |
977 | __entry->channel_type = channel_type; | |
978 | __entry->wait = wait; | |
979 | ), | |
980 | ||
981 | TP_printk( | |
982 | LOCAL_PR_FMT " freq:%dMHz, wait:%dms", | |
983 | LOCAL_PR_ARG, __entry->center_freq, __entry->wait | |
984 | ) | |
985 | ); | |
986 | ||
38c09159 JL |
987 | TRACE_EVENT(drv_set_ringparam, |
988 | TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx), | |
989 | ||
990 | TP_ARGS(local, tx, rx), | |
991 | ||
992 | TP_STRUCT__entry( | |
993 | LOCAL_ENTRY | |
994 | __field(u32, tx) | |
995 | __field(u32, rx) | |
996 | ), | |
997 | ||
998 | TP_fast_assign( | |
999 | LOCAL_ASSIGN; | |
1000 | __entry->tx = tx; | |
1001 | __entry->rx = rx; | |
1002 | ), | |
1003 | ||
1004 | TP_printk( | |
1005 | LOCAL_PR_FMT " tx:%d rx %d", | |
1006 | LOCAL_PR_ARG, __entry->tx, __entry->rx | |
1007 | ) | |
1008 | ); | |
1009 | ||
1010 | TRACE_EVENT(drv_get_ringparam, | |
1011 | TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max, | |
1012 | u32 *rx, u32 *rx_max), | |
1013 | ||
1014 | TP_ARGS(local, tx, tx_max, rx, rx_max), | |
1015 | ||
1016 | TP_STRUCT__entry( | |
1017 | LOCAL_ENTRY | |
1018 | __field(u32, tx) | |
1019 | __field(u32, tx_max) | |
1020 | __field(u32, rx) | |
1021 | __field(u32, rx_max) | |
1022 | ), | |
1023 | ||
1024 | TP_fast_assign( | |
1025 | LOCAL_ASSIGN; | |
1026 | __entry->tx = *tx; | |
1027 | __entry->tx_max = *tx_max; | |
1028 | __entry->rx = *rx; | |
1029 | __entry->rx_max = *rx_max; | |
1030 | ), | |
1031 | ||
1032 | TP_printk( | |
1033 | LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d", | |
1034 | LOCAL_PR_ARG, | |
1035 | __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max | |
1036 | ) | |
1037 | ); | |
1038 | ||
e8306f98 VN |
1039 | DEFINE_EVENT(local_only_evt, drv_tx_frames_pending, |
1040 | TP_PROTO(struct ieee80211_local *local), | |
1041 | TP_ARGS(local) | |
1042 | ); | |
1043 | ||
5f16a436 JB |
1044 | DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait, |
1045 | TP_PROTO(struct ieee80211_local *local), | |
1046 | TP_ARGS(local) | |
1047 | ); | |
1048 | ||
bdbfd6b5 SM |
1049 | TRACE_EVENT(drv_set_bitrate_mask, |
1050 | TP_PROTO(struct ieee80211_local *local, | |
1051 | struct ieee80211_sub_if_data *sdata, | |
1052 | const struct cfg80211_bitrate_mask *mask), | |
1053 | ||
1054 | TP_ARGS(local, sdata, mask), | |
1055 | ||
1056 | TP_STRUCT__entry( | |
1057 | LOCAL_ENTRY | |
1058 | VIF_ENTRY | |
1059 | __field(u32, legacy_2g) | |
1060 | __field(u32, legacy_5g) | |
1061 | ), | |
1062 | ||
1063 | TP_fast_assign( | |
1064 | LOCAL_ASSIGN; | |
1065 | VIF_ASSIGN; | |
1066 | __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy; | |
1067 | __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy; | |
1068 | ), | |
1069 | ||
1070 | TP_printk( | |
1071 | LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x", | |
1072 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g | |
1073 | ) | |
1074 | ); | |
1075 | ||
c68f4b89 JB |
1076 | TRACE_EVENT(drv_set_rekey_data, |
1077 | TP_PROTO(struct ieee80211_local *local, | |
1078 | struct ieee80211_sub_if_data *sdata, | |
1079 | struct cfg80211_gtk_rekey_data *data), | |
1080 | ||
1081 | TP_ARGS(local, sdata, data), | |
1082 | ||
1083 | TP_STRUCT__entry( | |
1084 | LOCAL_ENTRY | |
1085 | VIF_ENTRY | |
1086 | __array(u8, kek, NL80211_KEK_LEN) | |
1087 | __array(u8, kck, NL80211_KCK_LEN) | |
1088 | __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN) | |
1089 | ), | |
1090 | ||
1091 | TP_fast_assign( | |
1092 | LOCAL_ASSIGN; | |
1093 | VIF_ASSIGN; | |
1094 | memcpy(__entry->kek, data->kek, NL80211_KEK_LEN); | |
1095 | memcpy(__entry->kck, data->kck, NL80211_KCK_LEN); | |
1096 | memcpy(__entry->replay_ctr, data->replay_ctr, | |
1097 | NL80211_REPLAY_CTR_LEN); | |
1098 | ), | |
1099 | ||
1100 | TP_printk(LOCAL_PR_FMT VIF_PR_FMT, | |
1101 | LOCAL_PR_ARG, VIF_PR_ARG) | |
1102 | ); | |
1103 | ||
615f7b9b MV |
1104 | TRACE_EVENT(drv_rssi_callback, |
1105 | TP_PROTO(struct ieee80211_local *local, | |
1106 | enum ieee80211_rssi_event rssi_event), | |
1107 | ||
1108 | TP_ARGS(local, rssi_event), | |
1109 | ||
1110 | TP_STRUCT__entry( | |
1111 | LOCAL_ENTRY | |
1112 | __field(u32, rssi_event) | |
1113 | ), | |
1114 | ||
1115 | TP_fast_assign( | |
1116 | LOCAL_ASSIGN; | |
1117 | __entry->rssi_event = rssi_event; | |
1118 | ), | |
1119 | ||
1120 | TP_printk( | |
1121 | LOCAL_PR_FMT " rssi_event:%d", | |
1122 | LOCAL_PR_ARG, __entry->rssi_event | |
1123 | ) | |
1124 | ); | |
1125 | ||
b5878a2d JB |
1126 | /* |
1127 | * Tracing for API calls that drivers call. | |
1128 | */ | |
1129 | ||
1130 | TRACE_EVENT(api_start_tx_ba_session, | |
1131 | TP_PROTO(struct ieee80211_sta *sta, u16 tid), | |
1132 | ||
1133 | TP_ARGS(sta, tid), | |
1134 | ||
1135 | TP_STRUCT__entry( | |
1136 | STA_ENTRY | |
1137 | __field(u16, tid) | |
1138 | ), | |
1139 | ||
1140 | TP_fast_assign( | |
1141 | STA_ASSIGN; | |
1142 | __entry->tid = tid; | |
1143 | ), | |
1144 | ||
1145 | TP_printk( | |
1146 | STA_PR_FMT " tid:%d", | |
1147 | STA_PR_ARG, __entry->tid | |
1148 | ) | |
1149 | ); | |
1150 | ||
1151 | TRACE_EVENT(api_start_tx_ba_cb, | |
1152 | TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid), | |
1153 | ||
1154 | TP_ARGS(sdata, ra, tid), | |
1155 | ||
1156 | TP_STRUCT__entry( | |
1157 | VIF_ENTRY | |
1158 | __array(u8, ra, ETH_ALEN) | |
1159 | __field(u16, tid) | |
1160 | ), | |
1161 | ||
1162 | TP_fast_assign( | |
1163 | VIF_ASSIGN; | |
1164 | memcpy(__entry->ra, ra, ETH_ALEN); | |
1165 | __entry->tid = tid; | |
1166 | ), | |
1167 | ||
1168 | TP_printk( | |
1169 | VIF_PR_FMT " ra:%pM tid:%d", | |
1170 | VIF_PR_ARG, __entry->ra, __entry->tid | |
1171 | ) | |
1172 | ); | |
1173 | ||
1174 | TRACE_EVENT(api_stop_tx_ba_session, | |
6a8579d0 | 1175 | TP_PROTO(struct ieee80211_sta *sta, u16 tid), |
b5878a2d | 1176 | |
6a8579d0 | 1177 | TP_ARGS(sta, tid), |
b5878a2d JB |
1178 | |
1179 | TP_STRUCT__entry( | |
1180 | STA_ENTRY | |
1181 | __field(u16, tid) | |
b5878a2d JB |
1182 | ), |
1183 | ||
1184 | TP_fast_assign( | |
1185 | STA_ASSIGN; | |
1186 | __entry->tid = tid; | |
b5878a2d JB |
1187 | ), |
1188 | ||
1189 | TP_printk( | |
6a8579d0 JB |
1190 | STA_PR_FMT " tid:%d", |
1191 | STA_PR_ARG, __entry->tid | |
b5878a2d JB |
1192 | ) |
1193 | ); | |
1194 | ||
1195 | TRACE_EVENT(api_stop_tx_ba_cb, | |
1196 | TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid), | |
1197 | ||
1198 | TP_ARGS(sdata, ra, tid), | |
1199 | ||
1200 | TP_STRUCT__entry( | |
1201 | VIF_ENTRY | |
1202 | __array(u8, ra, ETH_ALEN) | |
1203 | __field(u16, tid) | |
1204 | ), | |
1205 | ||
1206 | TP_fast_assign( | |
1207 | VIF_ASSIGN; | |
1208 | memcpy(__entry->ra, ra, ETH_ALEN); | |
1209 | __entry->tid = tid; | |
1210 | ), | |
1211 | ||
1212 | TP_printk( | |
1213 | VIF_PR_FMT " ra:%pM tid:%d", | |
1214 | VIF_PR_ARG, __entry->ra, __entry->tid | |
1215 | ) | |
1216 | ); | |
1217 | ||
ba99d93b | 1218 | DEFINE_EVENT(local_only_evt, api_restart_hw, |
b5878a2d | 1219 | TP_PROTO(struct ieee80211_local *local), |
ba99d93b | 1220 | TP_ARGS(local) |
b5878a2d JB |
1221 | ); |
1222 | ||
1223 | TRACE_EVENT(api_beacon_loss, | |
1224 | TP_PROTO(struct ieee80211_sub_if_data *sdata), | |
1225 | ||
1226 | TP_ARGS(sdata), | |
1227 | ||
1228 | TP_STRUCT__entry( | |
1229 | VIF_ENTRY | |
1230 | ), | |
1231 | ||
1232 | TP_fast_assign( | |
1233 | VIF_ASSIGN; | |
1234 | ), | |
1235 | ||
1236 | TP_printk( | |
1237 | VIF_PR_FMT, | |
1238 | VIF_PR_ARG | |
1239 | ) | |
1240 | ); | |
1241 | ||
1242 | TRACE_EVENT(api_connection_loss, | |
1243 | TP_PROTO(struct ieee80211_sub_if_data *sdata), | |
1244 | ||
1245 | TP_ARGS(sdata), | |
1246 | ||
1247 | TP_STRUCT__entry( | |
1248 | VIF_ENTRY | |
1249 | ), | |
1250 | ||
1251 | TP_fast_assign( | |
1252 | VIF_ASSIGN; | |
1253 | ), | |
1254 | ||
1255 | TP_printk( | |
1256 | VIF_PR_FMT, | |
1257 | VIF_PR_ARG | |
1258 | ) | |
1259 | ); | |
1260 | ||
1261 | TRACE_EVENT(api_cqm_rssi_notify, | |
1262 | TP_PROTO(struct ieee80211_sub_if_data *sdata, | |
1263 | enum nl80211_cqm_rssi_threshold_event rssi_event), | |
1264 | ||
1265 | TP_ARGS(sdata, rssi_event), | |
1266 | ||
1267 | TP_STRUCT__entry( | |
1268 | VIF_ENTRY | |
1269 | __field(u32, rssi_event) | |
1270 | ), | |
1271 | ||
1272 | TP_fast_assign( | |
1273 | VIF_ASSIGN; | |
1274 | __entry->rssi_event = rssi_event; | |
1275 | ), | |
1276 | ||
1277 | TP_printk( | |
1278 | VIF_PR_FMT " event:%d", | |
1279 | VIF_PR_ARG, __entry->rssi_event | |
1280 | ) | |
1281 | ); | |
1282 | ||
1283 | TRACE_EVENT(api_scan_completed, | |
1284 | TP_PROTO(struct ieee80211_local *local, bool aborted), | |
1285 | ||
1286 | TP_ARGS(local, aborted), | |
1287 | ||
1288 | TP_STRUCT__entry( | |
1289 | LOCAL_ENTRY | |
1290 | __field(bool, aborted) | |
1291 | ), | |
1292 | ||
1293 | TP_fast_assign( | |
1294 | LOCAL_ASSIGN; | |
1295 | __entry->aborted = aborted; | |
1296 | ), | |
1297 | ||
1298 | TP_printk( | |
1299 | LOCAL_PR_FMT " aborted:%d", | |
1300 | LOCAL_PR_ARG, __entry->aborted | |
1301 | ) | |
1302 | ); | |
1303 | ||
79f460ca LC |
1304 | TRACE_EVENT(api_sched_scan_results, |
1305 | TP_PROTO(struct ieee80211_local *local), | |
1306 | ||
1307 | TP_ARGS(local), | |
1308 | ||
1309 | TP_STRUCT__entry( | |
1310 | LOCAL_ENTRY | |
1311 | ), | |
1312 | ||
1313 | TP_fast_assign( | |
1314 | LOCAL_ASSIGN; | |
1315 | ), | |
1316 | ||
1317 | TP_printk( | |
1318 | LOCAL_PR_FMT, LOCAL_PR_ARG | |
1319 | ) | |
1320 | ); | |
1321 | ||
1322 | TRACE_EVENT(api_sched_scan_stopped, | |
1323 | TP_PROTO(struct ieee80211_local *local), | |
1324 | ||
1325 | TP_ARGS(local), | |
1326 | ||
1327 | TP_STRUCT__entry( | |
1328 | LOCAL_ENTRY | |
1329 | ), | |
1330 | ||
1331 | TP_fast_assign( | |
1332 | LOCAL_ASSIGN; | |
1333 | ), | |
1334 | ||
1335 | TP_printk( | |
1336 | LOCAL_PR_FMT, LOCAL_PR_ARG | |
1337 | ) | |
1338 | ); | |
1339 | ||
b5878a2d JB |
1340 | TRACE_EVENT(api_sta_block_awake, |
1341 | TP_PROTO(struct ieee80211_local *local, | |
1342 | struct ieee80211_sta *sta, bool block), | |
1343 | ||
1344 | TP_ARGS(local, sta, block), | |
1345 | ||
1346 | TP_STRUCT__entry( | |
1347 | LOCAL_ENTRY | |
1348 | STA_ENTRY | |
1349 | __field(bool, block) | |
1350 | ), | |
1351 | ||
1352 | TP_fast_assign( | |
1353 | LOCAL_ASSIGN; | |
1354 | STA_ASSIGN; | |
1355 | __entry->block = block; | |
1356 | ), | |
1357 | ||
1358 | TP_printk( | |
1359 | LOCAL_PR_FMT STA_PR_FMT " block:%d", | |
1360 | LOCAL_PR_ARG, STA_PR_FMT, __entry->block | |
1361 | ) | |
1362 | ); | |
1363 | ||
5ce6e438 JB |
1364 | TRACE_EVENT(api_chswitch_done, |
1365 | TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success), | |
1366 | ||
1367 | TP_ARGS(sdata, success), | |
1368 | ||
1369 | TP_STRUCT__entry( | |
1370 | VIF_ENTRY | |
1371 | __field(bool, success) | |
1372 | ), | |
1373 | ||
1374 | TP_fast_assign( | |
1375 | VIF_ASSIGN; | |
1376 | __entry->success = success; | |
1377 | ), | |
1378 | ||
1379 | TP_printk( | |
1380 | VIF_PR_FMT " success=%d", | |
1381 | VIF_PR_ARG, __entry->success | |
1382 | ) | |
1383 | ); | |
1384 | ||
ba99d93b | 1385 | DEFINE_EVENT(local_only_evt, api_ready_on_channel, |
21f83589 | 1386 | TP_PROTO(struct ieee80211_local *local), |
ba99d93b | 1387 | TP_ARGS(local) |
21f83589 JB |
1388 | ); |
1389 | ||
ba99d93b | 1390 | DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired, |
21f83589 | 1391 | TP_PROTO(struct ieee80211_local *local), |
ba99d93b | 1392 | TP_ARGS(local) |
21f83589 JB |
1393 | ); |
1394 | ||
c68f4b89 JB |
1395 | TRACE_EVENT(api_gtk_rekey_notify, |
1396 | TP_PROTO(struct ieee80211_sub_if_data *sdata, | |
1397 | const u8 *bssid, const u8 *replay_ctr), | |
1398 | ||
1399 | TP_ARGS(sdata, bssid, replay_ctr), | |
1400 | ||
1401 | TP_STRUCT__entry( | |
1402 | VIF_ENTRY | |
1403 | __array(u8, bssid, ETH_ALEN) | |
1404 | __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN) | |
1405 | ), | |
1406 | ||
1407 | TP_fast_assign( | |
1408 | VIF_ASSIGN; | |
1409 | memcpy(__entry->bssid, bssid, ETH_ALEN); | |
1410 | memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN); | |
1411 | ), | |
1412 | ||
1413 | TP_printk(VIF_PR_FMT, VIF_PR_ARG) | |
1414 | ); | |
1415 | ||
615f7b9b MV |
1416 | TRACE_EVENT(api_enable_rssi_reports, |
1417 | TP_PROTO(struct ieee80211_sub_if_data *sdata, | |
1418 | int rssi_min_thold, int rssi_max_thold), | |
1419 | ||
1420 | TP_ARGS(sdata, rssi_min_thold, rssi_max_thold), | |
1421 | ||
1422 | TP_STRUCT__entry( | |
1423 | VIF_ENTRY | |
1424 | __field(int, rssi_min_thold) | |
1425 | __field(int, rssi_max_thold) | |
1426 | ), | |
1427 | ||
1428 | TP_fast_assign( | |
1429 | VIF_ASSIGN; | |
1430 | __entry->rssi_min_thold = rssi_min_thold; | |
1431 | __entry->rssi_max_thold = rssi_max_thold; | |
1432 | ), | |
1433 | ||
1434 | TP_printk( | |
1435 | VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d", | |
1436 | VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold | |
1437 | ) | |
1438 | ); | |
1439 | ||
b5878a2d JB |
1440 | /* |
1441 | * Tracing for internal functions | |
1442 | * (which may also be called in response to driver calls) | |
1443 | */ | |
1444 | ||
1445 | TRACE_EVENT(wake_queue, | |
1446 | TP_PROTO(struct ieee80211_local *local, u16 queue, | |
1447 | enum queue_stop_reason reason), | |
1448 | ||
1449 | TP_ARGS(local, queue, reason), | |
1450 | ||
1451 | TP_STRUCT__entry( | |
1452 | LOCAL_ENTRY | |
1453 | __field(u16, queue) | |
1454 | __field(u32, reason) | |
1455 | ), | |
1456 | ||
1457 | TP_fast_assign( | |
1458 | LOCAL_ASSIGN; | |
1459 | __entry->queue = queue; | |
1460 | __entry->reason = reason; | |
1461 | ), | |
1462 | ||
1463 | TP_printk( | |
1464 | LOCAL_PR_FMT " queue:%d, reason:%d", | |
1465 | LOCAL_PR_ARG, __entry->queue, __entry->reason | |
1466 | ) | |
1467 | ); | |
1468 | ||
1469 | TRACE_EVENT(stop_queue, | |
1470 | TP_PROTO(struct ieee80211_local *local, u16 queue, | |
1471 | enum queue_stop_reason reason), | |
1472 | ||
1473 | TP_ARGS(local, queue, reason), | |
1474 | ||
1475 | TP_STRUCT__entry( | |
1476 | LOCAL_ENTRY | |
1477 | __field(u16, queue) | |
1478 | __field(u32, reason) | |
1479 | ), | |
1480 | ||
1481 | TP_fast_assign( | |
1482 | LOCAL_ASSIGN; | |
1483 | __entry->queue = queue; | |
1484 | __entry->reason = reason; | |
1485 | ), | |
1486 | ||
1487 | TP_printk( | |
1488 | LOCAL_PR_FMT " queue:%d, reason:%d", | |
1489 | LOCAL_PR_ARG, __entry->queue, __entry->reason | |
1490 | ) | |
1491 | ); | |
f742880c | 1492 | #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ |
0a2b8bb2 JB |
1493 | |
1494 | #undef TRACE_INCLUDE_PATH | |
1495 | #define TRACE_INCLUDE_PATH . | |
1496 | #undef TRACE_INCLUDE_FILE | |
1497 | #define TRACE_INCLUDE_FILE driver-trace | |
1498 | #include <trace/define_trace.h> |