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