aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/driver-trace.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/driver-trace.h')
-rw-r--r--net/mac80211/driver-trace.h274
1 files changed, 113 insertions, 161 deletions
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h
index 49c84218b2f..45aab80738e 100644
--- a/net/mac80211/driver-trace.h
+++ b/net/mac80211/driver-trace.h
@@ -9,6 +9,11 @@
9#undef TRACE_EVENT 9#undef TRACE_EVENT
10#define TRACE_EVENT(name, proto, ...) \ 10#define TRACE_EVENT(name, proto, ...) \
11static inline void trace_ ## name(proto) {} 11static 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, ...) \
16static inline void trace_ ## name(proto) {}
12#endif 17#endif
13 18
14#undef TRACE_SYSTEM 19#undef TRACE_SYSTEM
@@ -38,7 +43,7 @@ static inline void trace_ ## name(proto) {}
38 * Tracing for driver callbacks. 43 * Tracing for driver callbacks.
39 */ 44 */
40 45
41TRACE_EVENT(drv_return_void, 46DECLARE_EVENT_CLASS(local_only_evt,
42 TP_PROTO(struct ieee80211_local *local), 47 TP_PROTO(struct ieee80211_local *local),
43 TP_ARGS(local), 48 TP_ARGS(local),
44 TP_STRUCT__entry( 49 TP_STRUCT__entry(
@@ -50,6 +55,11 @@ TRACE_EVENT(drv_return_void,
50 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG) 55 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
51); 56);
52 57
58DEFINE_EVENT(local_only_evt, drv_return_void,
59 TP_PROTO(struct ieee80211_local *local),
60 TP_ARGS(local)
61);
62
53TRACE_EVENT(drv_return_int, 63TRACE_EVENT(drv_return_int,
54 TP_PROTO(struct ieee80211_local *local, int ret), 64 TP_PROTO(struct ieee80211_local *local, int ret),
55 TP_ARGS(local, ret), 65 TP_ARGS(local, ret),
@@ -78,40 +88,14 @@ TRACE_EVENT(drv_return_u64,
78 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret) 88 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
79); 89);
80 90
81TRACE_EVENT(drv_start, 91DEFINE_EVENT(local_only_evt, drv_start,
82 TP_PROTO(struct ieee80211_local *local), 92 TP_PROTO(struct ieee80211_local *local),
83 93 TP_ARGS(local)
84 TP_ARGS(local),
85
86 TP_STRUCT__entry(
87 LOCAL_ENTRY
88 ),
89
90 TP_fast_assign(
91 LOCAL_ASSIGN;
92 ),
93
94 TP_printk(
95 LOCAL_PR_FMT, LOCAL_PR_ARG
96 )
97); 94);
98 95
99TRACE_EVENT(drv_stop, 96DEFINE_EVENT(local_only_evt, drv_stop,
100 TP_PROTO(struct ieee80211_local *local), 97 TP_PROTO(struct ieee80211_local *local),
101 98 TP_ARGS(local)
102 TP_ARGS(local),
103
104 TP_STRUCT__entry(
105 LOCAL_ENTRY
106 ),
107
108 TP_fast_assign(
109 LOCAL_ASSIGN;
110 ),
111
112 TP_printk(
113 LOCAL_PR_FMT, LOCAL_PR_ARG
114 )
115); 99);
116 100
117TRACE_EVENT(drv_add_interface, 101TRACE_EVENT(drv_add_interface,
@@ -439,40 +423,14 @@ TRACE_EVENT(drv_hw_scan,
439 ) 423 )
440); 424);
441 425
442TRACE_EVENT(drv_sw_scan_start, 426DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
443 TP_PROTO(struct ieee80211_local *local), 427 TP_PROTO(struct ieee80211_local *local),
444 428 TP_ARGS(local)
445 TP_ARGS(local),
446
447 TP_STRUCT__entry(
448 LOCAL_ENTRY
449 ),
450
451 TP_fast_assign(
452 LOCAL_ASSIGN;
453 ),
454
455 TP_printk(
456 LOCAL_PR_FMT, LOCAL_PR_ARG
457 )
458); 429);
459 430
460TRACE_EVENT(drv_sw_scan_complete, 431DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
461 TP_PROTO(struct ieee80211_local *local), 432 TP_PROTO(struct ieee80211_local *local),
462 433 TP_ARGS(local)
463 TP_ARGS(local),
464
465 TP_STRUCT__entry(
466 LOCAL_ENTRY
467 ),
468
469 TP_fast_assign(
470 LOCAL_ASSIGN;
471 ),
472
473 TP_printk(
474 LOCAL_PR_FMT, LOCAL_PR_ARG
475 )
476); 434);
477 435
478TRACE_EVENT(drv_get_stats, 436TRACE_EVENT(drv_get_stats,
@@ -702,23 +660,9 @@ TRACE_EVENT(drv_conf_tx,
702 ) 660 )
703); 661);
704 662
705TRACE_EVENT(drv_get_tsf, 663DEFINE_EVENT(local_only_evt, drv_get_tsf,
706 TP_PROTO(struct ieee80211_local *local), 664 TP_PROTO(struct ieee80211_local *local),
707 665 TP_ARGS(local)
708 TP_ARGS(local),
709
710 TP_STRUCT__entry(
711 LOCAL_ENTRY
712 ),
713
714 TP_fast_assign(
715 LOCAL_ASSIGN;
716 ),
717
718 TP_printk(
719 LOCAL_PR_FMT,
720 LOCAL_PR_ARG
721 )
722); 666);
723 667
724TRACE_EVENT(drv_set_tsf, 668TRACE_EVENT(drv_set_tsf,
@@ -742,41 +686,14 @@ TRACE_EVENT(drv_set_tsf,
742 ) 686 )
743); 687);
744 688
745TRACE_EVENT(drv_reset_tsf, 689DEFINE_EVENT(local_only_evt, drv_reset_tsf,
746 TP_PROTO(struct ieee80211_local *local), 690 TP_PROTO(struct ieee80211_local *local),
747 691 TP_ARGS(local)
748 TP_ARGS(local),
749
750 TP_STRUCT__entry(
751 LOCAL_ENTRY
752 ),
753
754 TP_fast_assign(
755 LOCAL_ASSIGN;
756 ),
757
758 TP_printk(
759 LOCAL_PR_FMT, LOCAL_PR_ARG
760 )
761); 692);
762 693
763TRACE_EVENT(drv_tx_last_beacon, 694DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
764 TP_PROTO(struct ieee80211_local *local), 695 TP_PROTO(struct ieee80211_local *local),
765 696 TP_ARGS(local)
766 TP_ARGS(local),
767
768 TP_STRUCT__entry(
769 LOCAL_ENTRY
770 ),
771
772 TP_fast_assign(
773 LOCAL_ASSIGN;
774 ),
775
776 TP_printk(
777 LOCAL_PR_FMT,
778 LOCAL_PR_ARG
779 )
780); 697);
781 698
782TRACE_EVENT(drv_ampdu_action, 699TRACE_EVENT(drv_ampdu_action,
@@ -784,9 +701,9 @@ TRACE_EVENT(drv_ampdu_action,
784 struct ieee80211_sub_if_data *sdata, 701 struct ieee80211_sub_if_data *sdata,
785 enum ieee80211_ampdu_mlme_action action, 702 enum ieee80211_ampdu_mlme_action action,
786 struct ieee80211_sta *sta, u16 tid, 703 struct ieee80211_sta *sta, u16 tid,
787 u16 *ssn), 704 u16 *ssn, u8 buf_size),
788 705
789 TP_ARGS(local, sdata, action, sta, tid, ssn), 706 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
790 707
791 TP_STRUCT__entry( 708 TP_STRUCT__entry(
792 LOCAL_ENTRY 709 LOCAL_ENTRY
@@ -794,6 +711,7 @@ TRACE_EVENT(drv_ampdu_action,
794 __field(u32, action) 711 __field(u32, action)
795 __field(u16, tid) 712 __field(u16, tid)
796 __field(u16, ssn) 713 __field(u16, ssn)
714 __field(u8, buf_size)
797 VIF_ENTRY 715 VIF_ENTRY
798 ), 716 ),
799 717
@@ -804,11 +722,13 @@ TRACE_EVENT(drv_ampdu_action,
804 __entry->action = action; 722 __entry->action = action;
805 __entry->tid = tid; 723 __entry->tid = tid;
806 __entry->ssn = ssn ? *ssn : 0; 724 __entry->ssn = ssn ? *ssn : 0;
725 __entry->buf_size = buf_size;
807 ), 726 ),
808 727
809 TP_printk( 728 TP_printk(
810 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d", 729 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
811 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action, __entry->tid 730 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
731 __entry->tid, __entry->buf_size
812 ) 732 )
813); 733);
814 734
@@ -959,24 +879,96 @@ TRACE_EVENT(drv_remain_on_channel,
959 ) 879 )
960); 880);
961 881
962TRACE_EVENT(drv_cancel_remain_on_channel, 882DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
963 TP_PROTO(struct ieee80211_local *local), 883 TP_PROTO(struct ieee80211_local *local),
884 TP_ARGS(local)
885);
964 886
965 TP_ARGS(local), 887TRACE_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),
892
893 TP_ARGS(local, skb, chan, channel_type, wait),
966 894
967 TP_STRUCT__entry( 895 TP_STRUCT__entry(
968 LOCAL_ENTRY 896 LOCAL_ENTRY
897 __field(int, center_freq)
898 __field(int, channel_type)
899 __field(unsigned int, wait)
969 ), 900 ),
970 901
971 TP_fast_assign( 902 TP_fast_assign(
972 LOCAL_ASSIGN; 903 LOCAL_ASSIGN;
904 __entry->center_freq = chan->center_freq;
905 __entry->channel_type = channel_type;
906 __entry->wait = wait;
973 ), 907 ),
974 908
975 TP_printk( 909 TP_printk(
976 LOCAL_PR_FMT, LOCAL_PR_ARG 910 LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
911 LOCAL_PR_ARG, __entry->center_freq, __entry->wait
912 )
913);
914
915TRACE_EVENT(drv_set_ringparam,
916 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
917
918 TP_ARGS(local, tx, rx),
919
920 TP_STRUCT__entry(
921 LOCAL_ENTRY
922 __field(u32, tx)
923 __field(u32, rx)
924 ),
925
926 TP_fast_assign(
927 LOCAL_ASSIGN;
928 __entry->tx = tx;
929 __entry->rx = rx;
930 ),
931
932 TP_printk(
933 LOCAL_PR_FMT " tx:%d rx %d",
934 LOCAL_PR_ARG, __entry->tx, __entry->rx
935 )
936);
937
938TRACE_EVENT(drv_get_ringparam,
939 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
940 u32 *rx, u32 *rx_max),
941
942 TP_ARGS(local, tx, tx_max, rx, rx_max),
943
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)
950 ),
951
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;
958 ),
959
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
977 ) 964 )
978); 965);
979 966
967DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
968 TP_PROTO(struct ieee80211_local *local),
969 TP_ARGS(local)
970);
971
980/* 972/*
981 * Tracing for API calls that drivers call. 973 * Tracing for API calls that drivers call.
982 */ 974 */
@@ -1069,23 +1061,9 @@ TRACE_EVENT(api_stop_tx_ba_cb,
1069 ) 1061 )
1070); 1062);
1071 1063
1072TRACE_EVENT(api_restart_hw, 1064DEFINE_EVENT(local_only_evt, api_restart_hw,
1073 TP_PROTO(struct ieee80211_local *local), 1065 TP_PROTO(struct ieee80211_local *local),
1074 1066 TP_ARGS(local)
1075 TP_ARGS(local),
1076
1077 TP_STRUCT__entry(
1078 LOCAL_ENTRY
1079 ),
1080
1081 TP_fast_assign(
1082 LOCAL_ASSIGN;
1083 ),
1084
1085 TP_printk(
1086 LOCAL_PR_FMT,
1087 LOCAL_PR_ARG
1088 )
1089); 1067);
1090 1068
1091TRACE_EVENT(api_beacon_loss, 1069TRACE_EVENT(api_beacon_loss,
@@ -1214,40 +1192,14 @@ TRACE_EVENT(api_chswitch_done,
1214 ) 1192 )
1215); 1193);
1216 1194
1217TRACE_EVENT(api_ready_on_channel, 1195DEFINE_EVENT(local_only_evt, api_ready_on_channel,
1218 TP_PROTO(struct ieee80211_local *local), 1196 TP_PROTO(struct ieee80211_local *local),
1219 1197 TP_ARGS(local)
1220 TP_ARGS(local),
1221
1222 TP_STRUCT__entry(
1223 LOCAL_ENTRY
1224 ),
1225
1226 TP_fast_assign(
1227 LOCAL_ASSIGN;
1228 ),
1229
1230 TP_printk(
1231 LOCAL_PR_FMT, LOCAL_PR_ARG
1232 )
1233); 1198);
1234 1199
1235TRACE_EVENT(api_remain_on_channel_expired, 1200DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
1236 TP_PROTO(struct ieee80211_local *local), 1201 TP_PROTO(struct ieee80211_local *local),
1237 1202 TP_ARGS(local)
1238 TP_ARGS(local),
1239
1240 TP_STRUCT__entry(
1241 LOCAL_ENTRY
1242 ),
1243
1244 TP_fast_assign(
1245 LOCAL_ASSIGN;
1246 ),
1247
1248 TP_printk(
1249 LOCAL_PR_FMT, LOCAL_PR_ARG
1250 )
1251); 1203);
1252 1204
1253/* 1205/*