Merge branch 'linus' into perf/core
[linux-2.6/cjktty.git] / net / mac80211 / driver-trace.h
blob6a9b2342a9c2d3982c83d235149762271a4f9c83
1 #if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
2 #define __MAC80211_DRIVER_TRACE
4 #include <linux/tracepoint.h>
5 #include <net/mac80211.h>
6 #include "ieee80211_i.h"
8 #if !defined(CONFIG_MAC80211_DRIVER_API_TRACER) || defined(__CHECKER__)
9 #undef TRACE_EVENT
10 #define TRACE_EVENT(name, proto, ...) \
11 static inline void trace_ ## name(proto) {}
12 #endif
14 #undef TRACE_SYSTEM
15 #define TRACE_SYSTEM mac80211
17 #define MAXNAME 32
18 #define LOCAL_ENTRY __array(char, wiphy_name, 32)
19 #define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME)
20 #define LOCAL_PR_FMT "%s"
21 #define LOCAL_PR_ARG __entry->wiphy_name
23 #define STA_ENTRY __array(char, sta_addr, ETH_ALEN)
24 #define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN))
25 #define STA_PR_FMT " sta:%pM"
26 #define STA_PR_ARG __entry->sta_addr
28 #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
29 __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
30 #define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
31 __assign_str(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
32 #define VIF_PR_FMT " vif:%s(%d)"
33 #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type
36 * Tracing for driver callbacks.
39 TRACE_EVENT(drv_start,
40 TP_PROTO(struct ieee80211_local *local, int ret),
42 TP_ARGS(local, ret),
44 TP_STRUCT__entry(
45 LOCAL_ENTRY
46 __field(int, ret)
49 TP_fast_assign(
50 LOCAL_ASSIGN;
51 __entry->ret = ret;
54 TP_printk(
55 LOCAL_PR_FMT, LOCAL_PR_ARG
59 TRACE_EVENT(drv_stop,
60 TP_PROTO(struct ieee80211_local *local),
62 TP_ARGS(local),
64 TP_STRUCT__entry(
65 LOCAL_ENTRY
68 TP_fast_assign(
69 LOCAL_ASSIGN;
72 TP_printk(
73 LOCAL_PR_FMT, LOCAL_PR_ARG
77 TRACE_EVENT(drv_add_interface,
78 TP_PROTO(struct ieee80211_local *local,
79 struct ieee80211_sub_if_data *sdata,
80 int ret),
82 TP_ARGS(local, sdata, ret),
84 TP_STRUCT__entry(
85 LOCAL_ENTRY
86 VIF_ENTRY
87 __array(char, addr, 6)
88 __field(int, ret)
91 TP_fast_assign(
92 LOCAL_ASSIGN;
93 VIF_ASSIGN;
94 memcpy(__entry->addr, sdata->vif.addr, 6);
95 __entry->ret = ret;
98 TP_printk(
99 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM ret:%d",
100 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr, __entry->ret
104 TRACE_EVENT(drv_remove_interface,
105 TP_PROTO(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata),
107 TP_ARGS(local, sdata),
109 TP_STRUCT__entry(
110 LOCAL_ENTRY
111 VIF_ENTRY
112 __array(char, addr, 6)
115 TP_fast_assign(
116 LOCAL_ASSIGN;
117 VIF_ASSIGN;
118 memcpy(__entry->addr, sdata->vif.addr, 6);
121 TP_printk(
122 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
123 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
127 TRACE_EVENT(drv_config,
128 TP_PROTO(struct ieee80211_local *local,
129 u32 changed,
130 int ret),
132 TP_ARGS(local, changed, ret),
134 TP_STRUCT__entry(
135 LOCAL_ENTRY
136 __field(u32, changed)
137 __field(int, ret)
138 __field(u32, flags)
139 __field(int, power_level)
140 __field(int, dynamic_ps_timeout)
141 __field(int, max_sleep_period)
142 __field(u16, listen_interval)
143 __field(u8, long_frame_max_tx_count)
144 __field(u8, short_frame_max_tx_count)
145 __field(int, center_freq)
146 __field(int, channel_type)
147 __field(int, smps)
150 TP_fast_assign(
151 LOCAL_ASSIGN;
152 __entry->changed = changed;
153 __entry->ret = ret;
154 __entry->flags = local->hw.conf.flags;
155 __entry->power_level = local->hw.conf.power_level;
156 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
157 __entry->max_sleep_period = local->hw.conf.max_sleep_period;
158 __entry->listen_interval = local->hw.conf.listen_interval;
159 __entry->long_frame_max_tx_count = local->hw.conf.long_frame_max_tx_count;
160 __entry->short_frame_max_tx_count = local->hw.conf.short_frame_max_tx_count;
161 __entry->center_freq = local->hw.conf.channel->center_freq;
162 __entry->channel_type = local->hw.conf.channel_type;
163 __entry->smps = local->hw.conf.smps_mode;
166 TP_printk(
167 LOCAL_PR_FMT " ch:%#x freq:%d ret:%d",
168 LOCAL_PR_ARG, __entry->changed, __entry->center_freq, __entry->ret
172 TRACE_EVENT(drv_bss_info_changed,
173 TP_PROTO(struct ieee80211_local *local,
174 struct ieee80211_sub_if_data *sdata,
175 struct ieee80211_bss_conf *info,
176 u32 changed),
178 TP_ARGS(local, sdata, info, changed),
180 TP_STRUCT__entry(
181 LOCAL_ENTRY
182 VIF_ENTRY
183 __field(bool, assoc)
184 __field(u16, aid)
185 __field(bool, cts)
186 __field(bool, shortpre)
187 __field(bool, shortslot)
188 __field(u8, dtimper)
189 __field(u16, bcnint)
190 __field(u16, assoc_cap)
191 __field(u64, timestamp)
192 __field(u32, basic_rates)
193 __field(u32, changed)
194 __field(bool, enable_beacon)
195 __field(u16, ht_operation_mode)
198 TP_fast_assign(
199 LOCAL_ASSIGN;
200 VIF_ASSIGN;
201 __entry->changed = changed;
202 __entry->aid = info->aid;
203 __entry->assoc = info->assoc;
204 __entry->shortpre = info->use_short_preamble;
205 __entry->cts = info->use_cts_prot;
206 __entry->shortslot = info->use_short_slot;
207 __entry->dtimper = info->dtim_period;
208 __entry->bcnint = info->beacon_int;
209 __entry->assoc_cap = info->assoc_capability;
210 __entry->timestamp = info->timestamp;
211 __entry->basic_rates = info->basic_rates;
212 __entry->enable_beacon = info->enable_beacon;
213 __entry->ht_operation_mode = info->ht_operation_mode;
216 TP_printk(
217 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
218 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
222 TRACE_EVENT(drv_prepare_multicast,
223 TP_PROTO(struct ieee80211_local *local, int mc_count, u64 ret),
225 TP_ARGS(local, mc_count, ret),
227 TP_STRUCT__entry(
228 LOCAL_ENTRY
229 __field(int, mc_count)
230 __field(u64, ret)
233 TP_fast_assign(
234 LOCAL_ASSIGN;
235 __entry->mc_count = mc_count;
236 __entry->ret = ret;
239 TP_printk(
240 LOCAL_PR_FMT " prepare mc (%d): %llx",
241 LOCAL_PR_ARG, __entry->mc_count,
242 (unsigned long long) __entry->ret
246 TRACE_EVENT(drv_configure_filter,
247 TP_PROTO(struct ieee80211_local *local,
248 unsigned int changed_flags,
249 unsigned int *total_flags,
250 u64 multicast),
252 TP_ARGS(local, changed_flags, total_flags, multicast),
254 TP_STRUCT__entry(
255 LOCAL_ENTRY
256 __field(unsigned int, changed)
257 __field(unsigned int, total)
258 __field(u64, multicast)
261 TP_fast_assign(
262 LOCAL_ASSIGN;
263 __entry->changed = changed_flags;
264 __entry->total = *total_flags;
265 __entry->multicast = multicast;
268 TP_printk(
269 LOCAL_PR_FMT " changed:%#x total:%#x",
270 LOCAL_PR_ARG, __entry->changed, __entry->total
274 TRACE_EVENT(drv_set_tim,
275 TP_PROTO(struct ieee80211_local *local,
276 struct ieee80211_sta *sta, bool set, int ret),
278 TP_ARGS(local, sta, set, ret),
280 TP_STRUCT__entry(
281 LOCAL_ENTRY
282 STA_ENTRY
283 __field(bool, set)
284 __field(int, ret)
287 TP_fast_assign(
288 LOCAL_ASSIGN;
289 STA_ASSIGN;
290 __entry->set = set;
291 __entry->ret = ret;
294 TP_printk(
295 LOCAL_PR_FMT STA_PR_FMT " set:%d ret:%d",
296 LOCAL_PR_ARG, STA_PR_FMT, __entry->set, __entry->ret
300 TRACE_EVENT(drv_set_key,
301 TP_PROTO(struct ieee80211_local *local,
302 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
303 struct ieee80211_sta *sta,
304 struct ieee80211_key_conf *key, int ret),
306 TP_ARGS(local, cmd, sdata, sta, key, ret),
308 TP_STRUCT__entry(
309 LOCAL_ENTRY
310 VIF_ENTRY
311 STA_ENTRY
312 __field(enum ieee80211_key_alg, alg)
313 __field(u8, hw_key_idx)
314 __field(u8, flags)
315 __field(s8, keyidx)
316 __field(int, ret)
319 TP_fast_assign(
320 LOCAL_ASSIGN;
321 VIF_ASSIGN;
322 STA_ASSIGN;
323 __entry->alg = key->alg;
324 __entry->flags = key->flags;
325 __entry->keyidx = key->keyidx;
326 __entry->hw_key_idx = key->hw_key_idx;
327 __entry->ret = ret;
330 TP_printk(
331 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ret:%d",
332 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ret
336 TRACE_EVENT(drv_update_tkip_key,
337 TP_PROTO(struct ieee80211_local *local,
338 struct ieee80211_sub_if_data *sdata,
339 struct ieee80211_key_conf *conf,
340 struct ieee80211_sta *sta, u32 iv32),
342 TP_ARGS(local, sdata, conf, sta, iv32),
344 TP_STRUCT__entry(
345 LOCAL_ENTRY
346 VIF_ENTRY
347 STA_ENTRY
348 __field(u32, iv32)
351 TP_fast_assign(
352 LOCAL_ASSIGN;
353 VIF_ASSIGN;
354 STA_ASSIGN;
355 __entry->iv32 = iv32;
358 TP_printk(
359 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
360 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
364 TRACE_EVENT(drv_hw_scan,
365 TP_PROTO(struct ieee80211_local *local,
366 struct ieee80211_sub_if_data *sdata,
367 struct cfg80211_scan_request *req, int ret),
369 TP_ARGS(local, sdata, req, ret),
371 TP_STRUCT__entry(
372 LOCAL_ENTRY
373 VIF_ENTRY
374 __field(int, ret)
377 TP_fast_assign(
378 LOCAL_ASSIGN;
379 VIF_ASSIGN;
380 __entry->ret = ret;
383 TP_printk(
384 LOCAL_PR_FMT VIF_PR_FMT " ret:%d",
385 LOCAL_PR_ARG,VIF_PR_ARG, __entry->ret
389 TRACE_EVENT(drv_sw_scan_start,
390 TP_PROTO(struct ieee80211_local *local),
392 TP_ARGS(local),
394 TP_STRUCT__entry(
395 LOCAL_ENTRY
398 TP_fast_assign(
399 LOCAL_ASSIGN;
402 TP_printk(
403 LOCAL_PR_FMT, LOCAL_PR_ARG
407 TRACE_EVENT(drv_sw_scan_complete,
408 TP_PROTO(struct ieee80211_local *local),
410 TP_ARGS(local),
412 TP_STRUCT__entry(
413 LOCAL_ENTRY
416 TP_fast_assign(
417 LOCAL_ASSIGN;
420 TP_printk(
421 LOCAL_PR_FMT, LOCAL_PR_ARG
425 TRACE_EVENT(drv_get_stats,
426 TP_PROTO(struct ieee80211_local *local,
427 struct ieee80211_low_level_stats *stats,
428 int ret),
430 TP_ARGS(local, stats, ret),
432 TP_STRUCT__entry(
433 LOCAL_ENTRY
434 __field(int, ret)
435 __field(unsigned int, ackfail)
436 __field(unsigned int, rtsfail)
437 __field(unsigned int, fcserr)
438 __field(unsigned int, rtssucc)
441 TP_fast_assign(
442 LOCAL_ASSIGN;
443 __entry->ret = ret;
444 __entry->ackfail = stats->dot11ACKFailureCount;
445 __entry->rtsfail = stats->dot11RTSFailureCount;
446 __entry->fcserr = stats->dot11FCSErrorCount;
447 __entry->rtssucc = stats->dot11RTSSuccessCount;
450 TP_printk(
451 LOCAL_PR_FMT " ret:%d",
452 LOCAL_PR_ARG, __entry->ret
456 TRACE_EVENT(drv_get_tkip_seq,
457 TP_PROTO(struct ieee80211_local *local,
458 u8 hw_key_idx, u32 *iv32, u16 *iv16),
460 TP_ARGS(local, hw_key_idx, iv32, iv16),
462 TP_STRUCT__entry(
463 LOCAL_ENTRY
464 __field(u8, hw_key_idx)
465 __field(u32, iv32)
466 __field(u16, iv16)
469 TP_fast_assign(
470 LOCAL_ASSIGN;
471 __entry->hw_key_idx = hw_key_idx;
472 __entry->iv32 = *iv32;
473 __entry->iv16 = *iv16;
476 TP_printk(
477 LOCAL_PR_FMT, LOCAL_PR_ARG
481 TRACE_EVENT(drv_set_rts_threshold,
482 TP_PROTO(struct ieee80211_local *local, u32 value, int ret),
484 TP_ARGS(local, value, ret),
486 TP_STRUCT__entry(
487 LOCAL_ENTRY
488 __field(u32, value)
489 __field(int, ret)
492 TP_fast_assign(
493 LOCAL_ASSIGN;
494 __entry->ret = ret;
495 __entry->value = value;
498 TP_printk(
499 LOCAL_PR_FMT " value:%d ret:%d",
500 LOCAL_PR_ARG, __entry->value, __entry->ret
504 TRACE_EVENT(drv_set_coverage_class,
505 TP_PROTO(struct ieee80211_local *local, u8 value, int ret),
507 TP_ARGS(local, value, ret),
509 TP_STRUCT__entry(
510 LOCAL_ENTRY
511 __field(u8, value)
512 __field(int, ret)
515 TP_fast_assign(
516 LOCAL_ASSIGN;
517 __entry->ret = ret;
518 __entry->value = value;
521 TP_printk(
522 LOCAL_PR_FMT " value:%d ret:%d",
523 LOCAL_PR_ARG, __entry->value, __entry->ret
527 TRACE_EVENT(drv_sta_notify,
528 TP_PROTO(struct ieee80211_local *local,
529 struct ieee80211_sub_if_data *sdata,
530 enum sta_notify_cmd cmd,
531 struct ieee80211_sta *sta),
533 TP_ARGS(local, sdata, cmd, sta),
535 TP_STRUCT__entry(
536 LOCAL_ENTRY
537 VIF_ENTRY
538 STA_ENTRY
539 __field(u32, cmd)
542 TP_fast_assign(
543 LOCAL_ASSIGN;
544 VIF_ASSIGN;
545 STA_ASSIGN;
546 __entry->cmd = cmd;
549 TP_printk(
550 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
551 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
555 TRACE_EVENT(drv_sta_add,
556 TP_PROTO(struct ieee80211_local *local,
557 struct ieee80211_sub_if_data *sdata,
558 struct ieee80211_sta *sta, int ret),
560 TP_ARGS(local, sdata, sta, ret),
562 TP_STRUCT__entry(
563 LOCAL_ENTRY
564 VIF_ENTRY
565 STA_ENTRY
566 __field(int, ret)
569 TP_fast_assign(
570 LOCAL_ASSIGN;
571 VIF_ASSIGN;
572 STA_ASSIGN;
573 __entry->ret = ret;
576 TP_printk(
577 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ret:%d",
578 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ret
582 TRACE_EVENT(drv_sta_remove,
583 TP_PROTO(struct ieee80211_local *local,
584 struct ieee80211_sub_if_data *sdata,
585 struct ieee80211_sta *sta),
587 TP_ARGS(local, sdata, sta),
589 TP_STRUCT__entry(
590 LOCAL_ENTRY
591 VIF_ENTRY
592 STA_ENTRY
595 TP_fast_assign(
596 LOCAL_ASSIGN;
597 VIF_ASSIGN;
598 STA_ASSIGN;
601 TP_printk(
602 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
603 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
607 TRACE_EVENT(drv_conf_tx,
608 TP_PROTO(struct ieee80211_local *local, u16 queue,
609 const struct ieee80211_tx_queue_params *params,
610 int ret),
612 TP_ARGS(local, queue, params, ret),
614 TP_STRUCT__entry(
615 LOCAL_ENTRY
616 __field(u16, queue)
617 __field(u16, txop)
618 __field(u16, cw_min)
619 __field(u16, cw_max)
620 __field(u8, aifs)
621 __field(int, ret)
624 TP_fast_assign(
625 LOCAL_ASSIGN;
626 __entry->queue = queue;
627 __entry->ret = ret;
628 __entry->txop = params->txop;
629 __entry->cw_max = params->cw_max;
630 __entry->cw_min = params->cw_min;
631 __entry->aifs = params->aifs;
634 TP_printk(
635 LOCAL_PR_FMT " queue:%d ret:%d",
636 LOCAL_PR_ARG, __entry->queue, __entry->ret
640 TRACE_EVENT(drv_get_tsf,
641 TP_PROTO(struct ieee80211_local *local, u64 ret),
643 TP_ARGS(local, ret),
645 TP_STRUCT__entry(
646 LOCAL_ENTRY
647 __field(u64, ret)
650 TP_fast_assign(
651 LOCAL_ASSIGN;
652 __entry->ret = ret;
655 TP_printk(
656 LOCAL_PR_FMT " ret:%llu",
657 LOCAL_PR_ARG, (unsigned long long)__entry->ret
661 TRACE_EVENT(drv_set_tsf,
662 TP_PROTO(struct ieee80211_local *local, u64 tsf),
664 TP_ARGS(local, tsf),
666 TP_STRUCT__entry(
667 LOCAL_ENTRY
668 __field(u64, tsf)
671 TP_fast_assign(
672 LOCAL_ASSIGN;
673 __entry->tsf = tsf;
676 TP_printk(
677 LOCAL_PR_FMT " tsf:%llu",
678 LOCAL_PR_ARG, (unsigned long long)__entry->tsf
682 TRACE_EVENT(drv_reset_tsf,
683 TP_PROTO(struct ieee80211_local *local),
685 TP_ARGS(local),
687 TP_STRUCT__entry(
688 LOCAL_ENTRY
691 TP_fast_assign(
692 LOCAL_ASSIGN;
695 TP_printk(
696 LOCAL_PR_FMT, LOCAL_PR_ARG
700 TRACE_EVENT(drv_tx_last_beacon,
701 TP_PROTO(struct ieee80211_local *local, int ret),
703 TP_ARGS(local, ret),
705 TP_STRUCT__entry(
706 LOCAL_ENTRY
707 __field(int, ret)
710 TP_fast_assign(
711 LOCAL_ASSIGN;
712 __entry->ret = ret;
715 TP_printk(
716 LOCAL_PR_FMT " ret:%d",
717 LOCAL_PR_ARG, __entry->ret
721 TRACE_EVENT(drv_ampdu_action,
722 TP_PROTO(struct ieee80211_local *local,
723 struct ieee80211_sub_if_data *sdata,
724 enum ieee80211_ampdu_mlme_action action,
725 struct ieee80211_sta *sta, u16 tid,
726 u16 *ssn, int ret),
728 TP_ARGS(local, sdata, action, sta, tid, ssn, ret),
730 TP_STRUCT__entry(
731 LOCAL_ENTRY
732 STA_ENTRY
733 __field(u32, action)
734 __field(u16, tid)
735 __field(u16, ssn)
736 __field(int, ret)
737 VIF_ENTRY
740 TP_fast_assign(
741 LOCAL_ASSIGN;
742 VIF_ASSIGN;
743 STA_ASSIGN;
744 __entry->ret = ret;
745 __entry->action = action;
746 __entry->tid = tid;
747 __entry->ssn = ssn ? *ssn : 0;
750 TP_printk(
751 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d ret:%d",
752 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action, __entry->tid, __entry->ret
756 TRACE_EVENT(drv_flush,
757 TP_PROTO(struct ieee80211_local *local, bool drop),
759 TP_ARGS(local, drop),
761 TP_STRUCT__entry(
762 LOCAL_ENTRY
763 __field(bool, drop)
766 TP_fast_assign(
767 LOCAL_ASSIGN;
768 __entry->drop = drop;
771 TP_printk(
772 LOCAL_PR_FMT " drop:%d",
773 LOCAL_PR_ARG, __entry->drop
777 TRACE_EVENT(drv_channel_switch,
778 TP_PROTO(struct ieee80211_local *local,
779 struct ieee80211_channel_switch *ch_switch),
781 TP_ARGS(local, ch_switch),
783 TP_STRUCT__entry(
784 LOCAL_ENTRY
785 __field(u64, timestamp)
786 __field(bool, block_tx)
787 __field(u16, freq)
788 __field(u8, count)
791 TP_fast_assign(
792 LOCAL_ASSIGN;
793 __entry->timestamp = ch_switch->timestamp;
794 __entry->block_tx = ch_switch->block_tx;
795 __entry->freq = ch_switch->channel->center_freq;
796 __entry->count = ch_switch->count;
799 TP_printk(
800 LOCAL_PR_FMT " new freq:%u count:%d",
801 LOCAL_PR_ARG, __entry->freq, __entry->count
806 * Tracing for API calls that drivers call.
809 TRACE_EVENT(api_start_tx_ba_session,
810 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
812 TP_ARGS(sta, tid),
814 TP_STRUCT__entry(
815 STA_ENTRY
816 __field(u16, tid)
819 TP_fast_assign(
820 STA_ASSIGN;
821 __entry->tid = tid;
824 TP_printk(
825 STA_PR_FMT " tid:%d",
826 STA_PR_ARG, __entry->tid
830 TRACE_EVENT(api_start_tx_ba_cb,
831 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
833 TP_ARGS(sdata, ra, tid),
835 TP_STRUCT__entry(
836 VIF_ENTRY
837 __array(u8, ra, ETH_ALEN)
838 __field(u16, tid)
841 TP_fast_assign(
842 VIF_ASSIGN;
843 memcpy(__entry->ra, ra, ETH_ALEN);
844 __entry->tid = tid;
847 TP_printk(
848 VIF_PR_FMT " ra:%pM tid:%d",
849 VIF_PR_ARG, __entry->ra, __entry->tid
853 TRACE_EVENT(api_stop_tx_ba_session,
854 TP_PROTO(struct ieee80211_sta *sta, u16 tid, u16 initiator),
856 TP_ARGS(sta, tid, initiator),
858 TP_STRUCT__entry(
859 STA_ENTRY
860 __field(u16, tid)
861 __field(u16, initiator)
864 TP_fast_assign(
865 STA_ASSIGN;
866 __entry->tid = tid;
867 __entry->initiator = initiator;
870 TP_printk(
871 STA_PR_FMT " tid:%d initiator:%d",
872 STA_PR_ARG, __entry->tid, __entry->initiator
876 TRACE_EVENT(api_stop_tx_ba_cb,
877 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
879 TP_ARGS(sdata, ra, tid),
881 TP_STRUCT__entry(
882 VIF_ENTRY
883 __array(u8, ra, ETH_ALEN)
884 __field(u16, tid)
887 TP_fast_assign(
888 VIF_ASSIGN;
889 memcpy(__entry->ra, ra, ETH_ALEN);
890 __entry->tid = tid;
893 TP_printk(
894 VIF_PR_FMT " ra:%pM tid:%d",
895 VIF_PR_ARG, __entry->ra, __entry->tid
899 TRACE_EVENT(api_restart_hw,
900 TP_PROTO(struct ieee80211_local *local),
902 TP_ARGS(local),
904 TP_STRUCT__entry(
905 LOCAL_ENTRY
908 TP_fast_assign(
909 LOCAL_ASSIGN;
912 TP_printk(
913 LOCAL_PR_FMT,
914 LOCAL_PR_ARG
918 TRACE_EVENT(api_beacon_loss,
919 TP_PROTO(struct ieee80211_sub_if_data *sdata),
921 TP_ARGS(sdata),
923 TP_STRUCT__entry(
924 VIF_ENTRY
927 TP_fast_assign(
928 VIF_ASSIGN;
931 TP_printk(
932 VIF_PR_FMT,
933 VIF_PR_ARG
937 TRACE_EVENT(api_connection_loss,
938 TP_PROTO(struct ieee80211_sub_if_data *sdata),
940 TP_ARGS(sdata),
942 TP_STRUCT__entry(
943 VIF_ENTRY
946 TP_fast_assign(
947 VIF_ASSIGN;
950 TP_printk(
951 VIF_PR_FMT,
952 VIF_PR_ARG
956 TRACE_EVENT(api_cqm_rssi_notify,
957 TP_PROTO(struct ieee80211_sub_if_data *sdata,
958 enum nl80211_cqm_rssi_threshold_event rssi_event),
960 TP_ARGS(sdata, rssi_event),
962 TP_STRUCT__entry(
963 VIF_ENTRY
964 __field(u32, rssi_event)
967 TP_fast_assign(
968 VIF_ASSIGN;
969 __entry->rssi_event = rssi_event;
972 TP_printk(
973 VIF_PR_FMT " event:%d",
974 VIF_PR_ARG, __entry->rssi_event
978 TRACE_EVENT(api_scan_completed,
979 TP_PROTO(struct ieee80211_local *local, bool aborted),
981 TP_ARGS(local, aborted),
983 TP_STRUCT__entry(
984 LOCAL_ENTRY
985 __field(bool, aborted)
988 TP_fast_assign(
989 LOCAL_ASSIGN;
990 __entry->aborted = aborted;
993 TP_printk(
994 LOCAL_PR_FMT " aborted:%d",
995 LOCAL_PR_ARG, __entry->aborted
999 TRACE_EVENT(api_sta_block_awake,
1000 TP_PROTO(struct ieee80211_local *local,
1001 struct ieee80211_sta *sta, bool block),
1003 TP_ARGS(local, sta, block),
1005 TP_STRUCT__entry(
1006 LOCAL_ENTRY
1007 STA_ENTRY
1008 __field(bool, block)
1011 TP_fast_assign(
1012 LOCAL_ASSIGN;
1013 STA_ASSIGN;
1014 __entry->block = block;
1017 TP_printk(
1018 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1019 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
1023 TRACE_EVENT(api_chswitch_done,
1024 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1026 TP_ARGS(sdata, success),
1028 TP_STRUCT__entry(
1029 VIF_ENTRY
1030 __field(bool, success)
1033 TP_fast_assign(
1034 VIF_ASSIGN;
1035 __entry->success = success;
1038 TP_printk(
1039 VIF_PR_FMT " success=%d",
1040 VIF_PR_ARG, __entry->success
1045 * Tracing for internal functions
1046 * (which may also be called in response to driver calls)
1049 TRACE_EVENT(wake_queue,
1050 TP_PROTO(struct ieee80211_local *local, u16 queue,
1051 enum queue_stop_reason reason),
1053 TP_ARGS(local, queue, reason),
1055 TP_STRUCT__entry(
1056 LOCAL_ENTRY
1057 __field(u16, queue)
1058 __field(u32, reason)
1061 TP_fast_assign(
1062 LOCAL_ASSIGN;
1063 __entry->queue = queue;
1064 __entry->reason = reason;
1067 TP_printk(
1068 LOCAL_PR_FMT " queue:%d, reason:%d",
1069 LOCAL_PR_ARG, __entry->queue, __entry->reason
1073 TRACE_EVENT(stop_queue,
1074 TP_PROTO(struct ieee80211_local *local, u16 queue,
1075 enum queue_stop_reason reason),
1077 TP_ARGS(local, queue, reason),
1079 TP_STRUCT__entry(
1080 LOCAL_ENTRY
1081 __field(u16, queue)
1082 __field(u32, reason)
1085 TP_fast_assign(
1086 LOCAL_ASSIGN;
1087 __entry->queue = queue;
1088 __entry->reason = reason;
1091 TP_printk(
1092 LOCAL_PR_FMT " queue:%d, reason:%d",
1093 LOCAL_PR_ARG, __entry->queue, __entry->reason
1096 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
1098 #undef TRACE_INCLUDE_PATH
1099 #define TRACE_INCLUDE_PATH .
1100 #undef TRACE_INCLUDE_FILE
1101 #define TRACE_INCLUDE_FILE driver-trace
1102 #include <trace/define_trace.h>