parisc: Convert irq namespace
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / net / mac80211 / driver-trace.h
blob45aab80738e272c3b9b1a25c71bb14201b643c14
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 #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) {}
17 #endif
19 #undef TRACE_SYSTEM
20 #define TRACE_SYSTEM mac80211
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
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
33 #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
34 __field(bool, p2p) \
35 __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
36 #define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
37 __entry->p2p = sdata->vif.p2p; \
38 __assign_str(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
39 #define VIF_PR_FMT " vif:%s(%d%s)"
40 #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
43 * Tracing for driver callbacks.
46 DECLARE_EVENT_CLASS(local_only_evt,
47 TP_PROTO(struct ieee80211_local *local),
48 TP_ARGS(local),
49 TP_STRUCT__entry(
50 LOCAL_ENTRY
52 TP_fast_assign(
53 LOCAL_ASSIGN;
55 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
58 DEFINE_EVENT(local_only_evt, drv_return_void,
59 TP_PROTO(struct ieee80211_local *local),
60 TP_ARGS(local)
63 TRACE_EVENT(drv_return_int,
64 TP_PROTO(struct ieee80211_local *local, int ret),
65 TP_ARGS(local, ret),
66 TP_STRUCT__entry(
67 LOCAL_ENTRY
68 __field(int, ret)
70 TP_fast_assign(
71 LOCAL_ASSIGN;
72 __entry->ret = ret;
74 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
77 TRACE_EVENT(drv_return_u64,
78 TP_PROTO(struct ieee80211_local *local, u64 ret),
79 TP_ARGS(local, ret),
80 TP_STRUCT__entry(
81 LOCAL_ENTRY
82 __field(u64, ret)
84 TP_fast_assign(
85 LOCAL_ASSIGN;
86 __entry->ret = ret;
88 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
91 DEFINE_EVENT(local_only_evt, drv_start,
92 TP_PROTO(struct ieee80211_local *local),
93 TP_ARGS(local)
96 DEFINE_EVENT(local_only_evt, drv_stop,
97 TP_PROTO(struct ieee80211_local *local),
98 TP_ARGS(local)
101 TRACE_EVENT(drv_add_interface,
102 TP_PROTO(struct ieee80211_local *local,
103 struct ieee80211_sub_if_data *sdata),
105 TP_ARGS(local, sdata),
107 TP_STRUCT__entry(
108 LOCAL_ENTRY
109 VIF_ENTRY
110 __array(char, addr, 6)
113 TP_fast_assign(
114 LOCAL_ASSIGN;
115 VIF_ASSIGN;
116 memcpy(__entry->addr, sdata->vif.addr, 6);
119 TP_printk(
120 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
121 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
125 TRACE_EVENT(drv_change_interface,
126 TP_PROTO(struct ieee80211_local *local,
127 struct ieee80211_sub_if_data *sdata,
128 enum nl80211_iftype type, bool p2p),
130 TP_ARGS(local, sdata, type, p2p),
132 TP_STRUCT__entry(
133 LOCAL_ENTRY
134 VIF_ENTRY
135 __field(u32, new_type)
136 __field(bool, new_p2p)
139 TP_fast_assign(
140 LOCAL_ASSIGN;
141 VIF_ASSIGN;
142 __entry->new_type = type;
143 __entry->new_p2p = p2p;
146 TP_printk(
147 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s",
148 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
149 __entry->new_p2p ? "/p2p" : ""
153 TRACE_EVENT(drv_remove_interface,
154 TP_PROTO(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata),
156 TP_ARGS(local, sdata),
158 TP_STRUCT__entry(
159 LOCAL_ENTRY
160 VIF_ENTRY
161 __array(char, addr, 6)
164 TP_fast_assign(
165 LOCAL_ASSIGN;
166 VIF_ASSIGN;
167 memcpy(__entry->addr, sdata->vif.addr, 6);
170 TP_printk(
171 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
172 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
176 TRACE_EVENT(drv_config,
177 TP_PROTO(struct ieee80211_local *local,
178 u32 changed),
180 TP_ARGS(local, changed),
182 TP_STRUCT__entry(
183 LOCAL_ENTRY
184 __field(u32, changed)
185 __field(u32, flags)
186 __field(int, power_level)
187 __field(int, dynamic_ps_timeout)
188 __field(int, max_sleep_period)
189 __field(u16, listen_interval)
190 __field(u8, long_frame_max_tx_count)
191 __field(u8, short_frame_max_tx_count)
192 __field(int, center_freq)
193 __field(int, channel_type)
194 __field(int, smps)
197 TP_fast_assign(
198 LOCAL_ASSIGN;
199 __entry->changed = changed;
200 __entry->flags = local->hw.conf.flags;
201 __entry->power_level = local->hw.conf.power_level;
202 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
203 __entry->max_sleep_period = local->hw.conf.max_sleep_period;
204 __entry->listen_interval = local->hw.conf.listen_interval;
205 __entry->long_frame_max_tx_count = local->hw.conf.long_frame_max_tx_count;
206 __entry->short_frame_max_tx_count = local->hw.conf.short_frame_max_tx_count;
207 __entry->center_freq = local->hw.conf.channel->center_freq;
208 __entry->channel_type = local->hw.conf.channel_type;
209 __entry->smps = local->hw.conf.smps_mode;
212 TP_printk(
213 LOCAL_PR_FMT " ch:%#x freq:%d",
214 LOCAL_PR_ARG, __entry->changed, __entry->center_freq
218 TRACE_EVENT(drv_bss_info_changed,
219 TP_PROTO(struct ieee80211_local *local,
220 struct ieee80211_sub_if_data *sdata,
221 struct ieee80211_bss_conf *info,
222 u32 changed),
224 TP_ARGS(local, sdata, info, changed),
226 TP_STRUCT__entry(
227 LOCAL_ENTRY
228 VIF_ENTRY
229 __field(bool, assoc)
230 __field(u16, aid)
231 __field(bool, cts)
232 __field(bool, shortpre)
233 __field(bool, shortslot)
234 __field(u8, dtimper)
235 __field(u16, bcnint)
236 __field(u16, assoc_cap)
237 __field(u64, timestamp)
238 __field(u32, basic_rates)
239 __field(u32, changed)
240 __field(bool, enable_beacon)
241 __field(u16, ht_operation_mode)
244 TP_fast_assign(
245 LOCAL_ASSIGN;
246 VIF_ASSIGN;
247 __entry->changed = changed;
248 __entry->aid = info->aid;
249 __entry->assoc = info->assoc;
250 __entry->shortpre = info->use_short_preamble;
251 __entry->cts = info->use_cts_prot;
252 __entry->shortslot = info->use_short_slot;
253 __entry->dtimper = info->dtim_period;
254 __entry->bcnint = info->beacon_int;
255 __entry->assoc_cap = info->assoc_capability;
256 __entry->timestamp = info->timestamp;
257 __entry->basic_rates = info->basic_rates;
258 __entry->enable_beacon = info->enable_beacon;
259 __entry->ht_operation_mode = info->ht_operation_mode;
262 TP_printk(
263 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
264 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
268 TRACE_EVENT(drv_prepare_multicast,
269 TP_PROTO(struct ieee80211_local *local, int mc_count),
271 TP_ARGS(local, mc_count),
273 TP_STRUCT__entry(
274 LOCAL_ENTRY
275 __field(int, mc_count)
278 TP_fast_assign(
279 LOCAL_ASSIGN;
280 __entry->mc_count = mc_count;
283 TP_printk(
284 LOCAL_PR_FMT " prepare mc (%d)",
285 LOCAL_PR_ARG, __entry->mc_count
289 TRACE_EVENT(drv_configure_filter,
290 TP_PROTO(struct ieee80211_local *local,
291 unsigned int changed_flags,
292 unsigned int *total_flags,
293 u64 multicast),
295 TP_ARGS(local, changed_flags, total_flags, multicast),
297 TP_STRUCT__entry(
298 LOCAL_ENTRY
299 __field(unsigned int, changed)
300 __field(unsigned int, total)
301 __field(u64, multicast)
304 TP_fast_assign(
305 LOCAL_ASSIGN;
306 __entry->changed = changed_flags;
307 __entry->total = *total_flags;
308 __entry->multicast = multicast;
311 TP_printk(
312 LOCAL_PR_FMT " changed:%#x total:%#x",
313 LOCAL_PR_ARG, __entry->changed, __entry->total
317 TRACE_EVENT(drv_set_tim,
318 TP_PROTO(struct ieee80211_local *local,
319 struct ieee80211_sta *sta, bool set),
321 TP_ARGS(local, sta, set),
323 TP_STRUCT__entry(
324 LOCAL_ENTRY
325 STA_ENTRY
326 __field(bool, set)
329 TP_fast_assign(
330 LOCAL_ASSIGN;
331 STA_ASSIGN;
332 __entry->set = set;
335 TP_printk(
336 LOCAL_PR_FMT STA_PR_FMT " set:%d",
337 LOCAL_PR_ARG, STA_PR_FMT, __entry->set
341 TRACE_EVENT(drv_set_key,
342 TP_PROTO(struct ieee80211_local *local,
343 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
344 struct ieee80211_sta *sta,
345 struct ieee80211_key_conf *key),
347 TP_ARGS(local, cmd, sdata, sta, key),
349 TP_STRUCT__entry(
350 LOCAL_ENTRY
351 VIF_ENTRY
352 STA_ENTRY
353 __field(u32, cipher)
354 __field(u8, hw_key_idx)
355 __field(u8, flags)
356 __field(s8, keyidx)
359 TP_fast_assign(
360 LOCAL_ASSIGN;
361 VIF_ASSIGN;
362 STA_ASSIGN;
363 __entry->cipher = key->cipher;
364 __entry->flags = key->flags;
365 __entry->keyidx = key->keyidx;
366 __entry->hw_key_idx = key->hw_key_idx;
369 TP_printk(
370 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
371 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
375 TRACE_EVENT(drv_update_tkip_key,
376 TP_PROTO(struct ieee80211_local *local,
377 struct ieee80211_sub_if_data *sdata,
378 struct ieee80211_key_conf *conf,
379 struct ieee80211_sta *sta, u32 iv32),
381 TP_ARGS(local, sdata, conf, sta, iv32),
383 TP_STRUCT__entry(
384 LOCAL_ENTRY
385 VIF_ENTRY
386 STA_ENTRY
387 __field(u32, iv32)
390 TP_fast_assign(
391 LOCAL_ASSIGN;
392 VIF_ASSIGN;
393 STA_ASSIGN;
394 __entry->iv32 = iv32;
397 TP_printk(
398 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
399 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
403 TRACE_EVENT(drv_hw_scan,
404 TP_PROTO(struct ieee80211_local *local,
405 struct ieee80211_sub_if_data *sdata,
406 struct cfg80211_scan_request *req),
408 TP_ARGS(local, sdata, req),
410 TP_STRUCT__entry(
411 LOCAL_ENTRY
412 VIF_ENTRY
415 TP_fast_assign(
416 LOCAL_ASSIGN;
417 VIF_ASSIGN;
420 TP_printk(
421 LOCAL_PR_FMT VIF_PR_FMT,
422 LOCAL_PR_ARG,VIF_PR_ARG
426 DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
427 TP_PROTO(struct ieee80211_local *local),
428 TP_ARGS(local)
431 DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
432 TP_PROTO(struct ieee80211_local *local),
433 TP_ARGS(local)
436 TRACE_EVENT(drv_get_stats,
437 TP_PROTO(struct ieee80211_local *local,
438 struct ieee80211_low_level_stats *stats,
439 int ret),
441 TP_ARGS(local, stats, ret),
443 TP_STRUCT__entry(
444 LOCAL_ENTRY
445 __field(int, ret)
446 __field(unsigned int, ackfail)
447 __field(unsigned int, rtsfail)
448 __field(unsigned int, fcserr)
449 __field(unsigned int, rtssucc)
452 TP_fast_assign(
453 LOCAL_ASSIGN;
454 __entry->ret = ret;
455 __entry->ackfail = stats->dot11ACKFailureCount;
456 __entry->rtsfail = stats->dot11RTSFailureCount;
457 __entry->fcserr = stats->dot11FCSErrorCount;
458 __entry->rtssucc = stats->dot11RTSSuccessCount;
461 TP_printk(
462 LOCAL_PR_FMT " ret:%d",
463 LOCAL_PR_ARG, __entry->ret
467 TRACE_EVENT(drv_get_tkip_seq,
468 TP_PROTO(struct ieee80211_local *local,
469 u8 hw_key_idx, u32 *iv32, u16 *iv16),
471 TP_ARGS(local, hw_key_idx, iv32, iv16),
473 TP_STRUCT__entry(
474 LOCAL_ENTRY
475 __field(u8, hw_key_idx)
476 __field(u32, iv32)
477 __field(u16, iv16)
480 TP_fast_assign(
481 LOCAL_ASSIGN;
482 __entry->hw_key_idx = hw_key_idx;
483 __entry->iv32 = *iv32;
484 __entry->iv16 = *iv16;
487 TP_printk(
488 LOCAL_PR_FMT, LOCAL_PR_ARG
492 TRACE_EVENT(drv_set_frag_threshold,
493 TP_PROTO(struct ieee80211_local *local, u32 value),
495 TP_ARGS(local, value),
497 TP_STRUCT__entry(
498 LOCAL_ENTRY
499 __field(u32, value)
502 TP_fast_assign(
503 LOCAL_ASSIGN;
504 __entry->value = value;
507 TP_printk(
508 LOCAL_PR_FMT " value:%d",
509 LOCAL_PR_ARG, __entry->value
513 TRACE_EVENT(drv_set_rts_threshold,
514 TP_PROTO(struct ieee80211_local *local, u32 value),
516 TP_ARGS(local, value),
518 TP_STRUCT__entry(
519 LOCAL_ENTRY
520 __field(u32, value)
523 TP_fast_assign(
524 LOCAL_ASSIGN;
525 __entry->value = value;
528 TP_printk(
529 LOCAL_PR_FMT " value:%d",
530 LOCAL_PR_ARG, __entry->value
534 TRACE_EVENT(drv_set_coverage_class,
535 TP_PROTO(struct ieee80211_local *local, u8 value),
537 TP_ARGS(local, value),
539 TP_STRUCT__entry(
540 LOCAL_ENTRY
541 __field(u8, value)
544 TP_fast_assign(
545 LOCAL_ASSIGN;
546 __entry->value = value;
549 TP_printk(
550 LOCAL_PR_FMT " value:%d",
551 LOCAL_PR_ARG, __entry->value
555 TRACE_EVENT(drv_sta_notify,
556 TP_PROTO(struct ieee80211_local *local,
557 struct ieee80211_sub_if_data *sdata,
558 enum sta_notify_cmd cmd,
559 struct ieee80211_sta *sta),
561 TP_ARGS(local, sdata, cmd, sta),
563 TP_STRUCT__entry(
564 LOCAL_ENTRY
565 VIF_ENTRY
566 STA_ENTRY
567 __field(u32, cmd)
570 TP_fast_assign(
571 LOCAL_ASSIGN;
572 VIF_ASSIGN;
573 STA_ASSIGN;
574 __entry->cmd = cmd;
577 TP_printk(
578 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
579 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
583 TRACE_EVENT(drv_sta_add,
584 TP_PROTO(struct ieee80211_local *local,
585 struct ieee80211_sub_if_data *sdata,
586 struct ieee80211_sta *sta),
588 TP_ARGS(local, sdata, sta),
590 TP_STRUCT__entry(
591 LOCAL_ENTRY
592 VIF_ENTRY
593 STA_ENTRY
596 TP_fast_assign(
597 LOCAL_ASSIGN;
598 VIF_ASSIGN;
599 STA_ASSIGN;
602 TP_printk(
603 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
604 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
608 TRACE_EVENT(drv_sta_remove,
609 TP_PROTO(struct ieee80211_local *local,
610 struct ieee80211_sub_if_data *sdata,
611 struct ieee80211_sta *sta),
613 TP_ARGS(local, sdata, sta),
615 TP_STRUCT__entry(
616 LOCAL_ENTRY
617 VIF_ENTRY
618 STA_ENTRY
621 TP_fast_assign(
622 LOCAL_ASSIGN;
623 VIF_ASSIGN;
624 STA_ASSIGN;
627 TP_printk(
628 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
629 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
633 TRACE_EVENT(drv_conf_tx,
634 TP_PROTO(struct ieee80211_local *local, u16 queue,
635 const struct ieee80211_tx_queue_params *params),
637 TP_ARGS(local, queue, params),
639 TP_STRUCT__entry(
640 LOCAL_ENTRY
641 __field(u16, queue)
642 __field(u16, txop)
643 __field(u16, cw_min)
644 __field(u16, cw_max)
645 __field(u8, aifs)
648 TP_fast_assign(
649 LOCAL_ASSIGN;
650 __entry->queue = queue;
651 __entry->txop = params->txop;
652 __entry->cw_max = params->cw_max;
653 __entry->cw_min = params->cw_min;
654 __entry->aifs = params->aifs;
657 TP_printk(
658 LOCAL_PR_FMT " queue:%d",
659 LOCAL_PR_ARG, __entry->queue
663 DEFINE_EVENT(local_only_evt, drv_get_tsf,
664 TP_PROTO(struct ieee80211_local *local),
665 TP_ARGS(local)
668 TRACE_EVENT(drv_set_tsf,
669 TP_PROTO(struct ieee80211_local *local, u64 tsf),
671 TP_ARGS(local, tsf),
673 TP_STRUCT__entry(
674 LOCAL_ENTRY
675 __field(u64, tsf)
678 TP_fast_assign(
679 LOCAL_ASSIGN;
680 __entry->tsf = tsf;
683 TP_printk(
684 LOCAL_PR_FMT " tsf:%llu",
685 LOCAL_PR_ARG, (unsigned long long)__entry->tsf
689 DEFINE_EVENT(local_only_evt, drv_reset_tsf,
690 TP_PROTO(struct ieee80211_local *local),
691 TP_ARGS(local)
694 DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
695 TP_PROTO(struct ieee80211_local *local),
696 TP_ARGS(local)
699 TRACE_EVENT(drv_ampdu_action,
700 TP_PROTO(struct ieee80211_local *local,
701 struct ieee80211_sub_if_data *sdata,
702 enum ieee80211_ampdu_mlme_action action,
703 struct ieee80211_sta *sta, u16 tid,
704 u16 *ssn, u8 buf_size),
706 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
708 TP_STRUCT__entry(
709 LOCAL_ENTRY
710 STA_ENTRY
711 __field(u32, action)
712 __field(u16, tid)
713 __field(u16, ssn)
714 __field(u8, buf_size)
715 VIF_ENTRY
718 TP_fast_assign(
719 LOCAL_ASSIGN;
720 VIF_ASSIGN;
721 STA_ASSIGN;
722 __entry->action = action;
723 __entry->tid = tid;
724 __entry->ssn = ssn ? *ssn : 0;
725 __entry->buf_size = buf_size;
728 TP_printk(
729 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
730 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
731 __entry->tid, __entry->buf_size
735 TRACE_EVENT(drv_get_survey,
736 TP_PROTO(struct ieee80211_local *local, int idx,
737 struct survey_info *survey),
739 TP_ARGS(local, idx, survey),
741 TP_STRUCT__entry(
742 LOCAL_ENTRY
743 __field(int, idx)
746 TP_fast_assign(
747 LOCAL_ASSIGN;
748 __entry->idx = idx;
751 TP_printk(
752 LOCAL_PR_FMT " idx:%d",
753 LOCAL_PR_ARG, __entry->idx
757 TRACE_EVENT(drv_flush,
758 TP_PROTO(struct ieee80211_local *local, bool drop),
760 TP_ARGS(local, drop),
762 TP_STRUCT__entry(
763 LOCAL_ENTRY
764 __field(bool, drop)
767 TP_fast_assign(
768 LOCAL_ASSIGN;
769 __entry->drop = drop;
772 TP_printk(
773 LOCAL_PR_FMT " drop:%d",
774 LOCAL_PR_ARG, __entry->drop
778 TRACE_EVENT(drv_channel_switch,
779 TP_PROTO(struct ieee80211_local *local,
780 struct ieee80211_channel_switch *ch_switch),
782 TP_ARGS(local, ch_switch),
784 TP_STRUCT__entry(
785 LOCAL_ENTRY
786 __field(u64, timestamp)
787 __field(bool, block_tx)
788 __field(u16, freq)
789 __field(u8, count)
792 TP_fast_assign(
793 LOCAL_ASSIGN;
794 __entry->timestamp = ch_switch->timestamp;
795 __entry->block_tx = ch_switch->block_tx;
796 __entry->freq = ch_switch->channel->center_freq;
797 __entry->count = ch_switch->count;
800 TP_printk(
801 LOCAL_PR_FMT " new freq:%u count:%d",
802 LOCAL_PR_ARG, __entry->freq, __entry->count
806 TRACE_EVENT(drv_set_antenna,
807 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
809 TP_ARGS(local, tx_ant, rx_ant, ret),
811 TP_STRUCT__entry(
812 LOCAL_ENTRY
813 __field(u32, tx_ant)
814 __field(u32, rx_ant)
815 __field(int, ret)
818 TP_fast_assign(
819 LOCAL_ASSIGN;
820 __entry->tx_ant = tx_ant;
821 __entry->rx_ant = rx_ant;
822 __entry->ret = ret;
825 TP_printk(
826 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
827 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
831 TRACE_EVENT(drv_get_antenna,
832 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
834 TP_ARGS(local, tx_ant, rx_ant, ret),
836 TP_STRUCT__entry(
837 LOCAL_ENTRY
838 __field(u32, tx_ant)
839 __field(u32, rx_ant)
840 __field(int, ret)
843 TP_fast_assign(
844 LOCAL_ASSIGN;
845 __entry->tx_ant = tx_ant;
846 __entry->rx_ant = rx_ant;
847 __entry->ret = ret;
850 TP_printk(
851 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
852 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
856 TRACE_EVENT(drv_remain_on_channel,
857 TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
858 enum nl80211_channel_type chantype, unsigned int duration),
860 TP_ARGS(local, chan, chantype, duration),
862 TP_STRUCT__entry(
863 LOCAL_ENTRY
864 __field(int, center_freq)
865 __field(int, channel_type)
866 __field(unsigned int, duration)
869 TP_fast_assign(
870 LOCAL_ASSIGN;
871 __entry->center_freq = chan->center_freq;
872 __entry->channel_type = chantype;
873 __entry->duration = duration;
876 TP_printk(
877 LOCAL_PR_FMT " freq:%dMHz duration:%dms",
878 LOCAL_PR_ARG, __entry->center_freq, __entry->duration
882 DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
883 TP_PROTO(struct ieee80211_local *local),
884 TP_ARGS(local)
887 TRACE_EVENT(drv_offchannel_tx,
888 TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
889 struct ieee80211_channel *chan,
890 enum nl80211_channel_type channel_type,
891 unsigned int wait),
893 TP_ARGS(local, skb, chan, channel_type, wait),
895 TP_STRUCT__entry(
896 LOCAL_ENTRY
897 __field(int, center_freq)
898 __field(int, channel_type)
899 __field(unsigned int, wait)
902 TP_fast_assign(
903 LOCAL_ASSIGN;
904 __entry->center_freq = chan->center_freq;
905 __entry->channel_type = channel_type;
906 __entry->wait = wait;
909 TP_printk(
910 LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
911 LOCAL_PR_ARG, __entry->center_freq, __entry->wait
915 TRACE_EVENT(drv_set_ringparam,
916 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
918 TP_ARGS(local, tx, rx),
920 TP_STRUCT__entry(
921 LOCAL_ENTRY
922 __field(u32, tx)
923 __field(u32, rx)
926 TP_fast_assign(
927 LOCAL_ASSIGN;
928 __entry->tx = tx;
929 __entry->rx = rx;
932 TP_printk(
933 LOCAL_PR_FMT " tx:%d rx %d",
934 LOCAL_PR_ARG, __entry->tx, __entry->rx
938 TRACE_EVENT(drv_get_ringparam,
939 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
940 u32 *rx, u32 *rx_max),
942 TP_ARGS(local, tx, tx_max, rx, rx_max),
944 TP_STRUCT__entry(
945 LOCAL_ENTRY
946 __field(u32, tx)
947 __field(u32, tx_max)
948 __field(u32, rx)
949 __field(u32, rx_max)
952 TP_fast_assign(
953 LOCAL_ASSIGN;
954 __entry->tx = *tx;
955 __entry->tx_max = *tx_max;
956 __entry->rx = *rx;
957 __entry->rx_max = *rx_max;
960 TP_printk(
961 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
962 LOCAL_PR_ARG,
963 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
967 DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
968 TP_PROTO(struct ieee80211_local *local),
969 TP_ARGS(local)
973 * Tracing for API calls that drivers call.
976 TRACE_EVENT(api_start_tx_ba_session,
977 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
979 TP_ARGS(sta, tid),
981 TP_STRUCT__entry(
982 STA_ENTRY
983 __field(u16, tid)
986 TP_fast_assign(
987 STA_ASSIGN;
988 __entry->tid = tid;
991 TP_printk(
992 STA_PR_FMT " tid:%d",
993 STA_PR_ARG, __entry->tid
997 TRACE_EVENT(api_start_tx_ba_cb,
998 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1000 TP_ARGS(sdata, ra, tid),
1002 TP_STRUCT__entry(
1003 VIF_ENTRY
1004 __array(u8, ra, ETH_ALEN)
1005 __field(u16, tid)
1008 TP_fast_assign(
1009 VIF_ASSIGN;
1010 memcpy(__entry->ra, ra, ETH_ALEN);
1011 __entry->tid = tid;
1014 TP_printk(
1015 VIF_PR_FMT " ra:%pM tid:%d",
1016 VIF_PR_ARG, __entry->ra, __entry->tid
1020 TRACE_EVENT(api_stop_tx_ba_session,
1021 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1023 TP_ARGS(sta, tid),
1025 TP_STRUCT__entry(
1026 STA_ENTRY
1027 __field(u16, tid)
1030 TP_fast_assign(
1031 STA_ASSIGN;
1032 __entry->tid = tid;
1035 TP_printk(
1036 STA_PR_FMT " tid:%d",
1037 STA_PR_ARG, __entry->tid
1041 TRACE_EVENT(api_stop_tx_ba_cb,
1042 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1044 TP_ARGS(sdata, ra, tid),
1046 TP_STRUCT__entry(
1047 VIF_ENTRY
1048 __array(u8, ra, ETH_ALEN)
1049 __field(u16, tid)
1052 TP_fast_assign(
1053 VIF_ASSIGN;
1054 memcpy(__entry->ra, ra, ETH_ALEN);
1055 __entry->tid = tid;
1058 TP_printk(
1059 VIF_PR_FMT " ra:%pM tid:%d",
1060 VIF_PR_ARG, __entry->ra, __entry->tid
1064 DEFINE_EVENT(local_only_evt, api_restart_hw,
1065 TP_PROTO(struct ieee80211_local *local),
1066 TP_ARGS(local)
1069 TRACE_EVENT(api_beacon_loss,
1070 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1072 TP_ARGS(sdata),
1074 TP_STRUCT__entry(
1075 VIF_ENTRY
1078 TP_fast_assign(
1079 VIF_ASSIGN;
1082 TP_printk(
1083 VIF_PR_FMT,
1084 VIF_PR_ARG
1088 TRACE_EVENT(api_connection_loss,
1089 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1091 TP_ARGS(sdata),
1093 TP_STRUCT__entry(
1094 VIF_ENTRY
1097 TP_fast_assign(
1098 VIF_ASSIGN;
1101 TP_printk(
1102 VIF_PR_FMT,
1103 VIF_PR_ARG
1107 TRACE_EVENT(api_cqm_rssi_notify,
1108 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1109 enum nl80211_cqm_rssi_threshold_event rssi_event),
1111 TP_ARGS(sdata, rssi_event),
1113 TP_STRUCT__entry(
1114 VIF_ENTRY
1115 __field(u32, rssi_event)
1118 TP_fast_assign(
1119 VIF_ASSIGN;
1120 __entry->rssi_event = rssi_event;
1123 TP_printk(
1124 VIF_PR_FMT " event:%d",
1125 VIF_PR_ARG, __entry->rssi_event
1129 TRACE_EVENT(api_scan_completed,
1130 TP_PROTO(struct ieee80211_local *local, bool aborted),
1132 TP_ARGS(local, aborted),
1134 TP_STRUCT__entry(
1135 LOCAL_ENTRY
1136 __field(bool, aborted)
1139 TP_fast_assign(
1140 LOCAL_ASSIGN;
1141 __entry->aborted = aborted;
1144 TP_printk(
1145 LOCAL_PR_FMT " aborted:%d",
1146 LOCAL_PR_ARG, __entry->aborted
1150 TRACE_EVENT(api_sta_block_awake,
1151 TP_PROTO(struct ieee80211_local *local,
1152 struct ieee80211_sta *sta, bool block),
1154 TP_ARGS(local, sta, block),
1156 TP_STRUCT__entry(
1157 LOCAL_ENTRY
1158 STA_ENTRY
1159 __field(bool, block)
1162 TP_fast_assign(
1163 LOCAL_ASSIGN;
1164 STA_ASSIGN;
1165 __entry->block = block;
1168 TP_printk(
1169 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1170 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
1174 TRACE_EVENT(api_chswitch_done,
1175 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1177 TP_ARGS(sdata, success),
1179 TP_STRUCT__entry(
1180 VIF_ENTRY
1181 __field(bool, success)
1184 TP_fast_assign(
1185 VIF_ASSIGN;
1186 __entry->success = success;
1189 TP_printk(
1190 VIF_PR_FMT " success=%d",
1191 VIF_PR_ARG, __entry->success
1195 DEFINE_EVENT(local_only_evt, api_ready_on_channel,
1196 TP_PROTO(struct ieee80211_local *local),
1197 TP_ARGS(local)
1200 DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
1201 TP_PROTO(struct ieee80211_local *local),
1202 TP_ARGS(local)
1206 * Tracing for internal functions
1207 * (which may also be called in response to driver calls)
1210 TRACE_EVENT(wake_queue,
1211 TP_PROTO(struct ieee80211_local *local, u16 queue,
1212 enum queue_stop_reason reason),
1214 TP_ARGS(local, queue, reason),
1216 TP_STRUCT__entry(
1217 LOCAL_ENTRY
1218 __field(u16, queue)
1219 __field(u32, reason)
1222 TP_fast_assign(
1223 LOCAL_ASSIGN;
1224 __entry->queue = queue;
1225 __entry->reason = reason;
1228 TP_printk(
1229 LOCAL_PR_FMT " queue:%d, reason:%d",
1230 LOCAL_PR_ARG, __entry->queue, __entry->reason
1234 TRACE_EVENT(stop_queue,
1235 TP_PROTO(struct ieee80211_local *local, u16 queue,
1236 enum queue_stop_reason reason),
1238 TP_ARGS(local, queue, reason),
1240 TP_STRUCT__entry(
1241 LOCAL_ENTRY
1242 __field(u16, queue)
1243 __field(u32, reason)
1246 TP_fast_assign(
1247 LOCAL_ASSIGN;
1248 __entry->queue = queue;
1249 __entry->reason = reason;
1252 TP_printk(
1253 LOCAL_PR_FMT " queue:%d, reason:%d",
1254 LOCAL_PR_ARG, __entry->queue, __entry->reason
1257 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
1259 #undef TRACE_INCLUDE_PATH
1260 #define TRACE_INCLUDE_PATH .
1261 #undef TRACE_INCLUDE_FILE
1262 #define TRACE_INCLUDE_FILE driver-trace
1263 #include <trace/define_trace.h>