diff options
Diffstat (limited to 'net/mac80211/driver-trace.h')
-rw-r--r-- | net/mac80211/driver-trace.h | 333 |
1 files changed, 330 insertions, 3 deletions
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h index 41baf730a5c7..6a9b2342a9c2 100644 --- a/net/mac80211/driver-trace.h +++ b/net/mac80211/driver-trace.h | |||
@@ -32,6 +32,10 @@ static inline void trace_ ## name(proto) {} | |||
32 | #define VIF_PR_FMT " vif:%s(%d)" | 32 | #define VIF_PR_FMT " vif:%s(%d)" |
33 | #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type | 33 | #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type |
34 | 34 | ||
35 | /* | ||
36 | * Tracing for driver callbacks. | ||
37 | */ | ||
38 | |||
35 | TRACE_EVENT(drv_start, | 39 | TRACE_EVENT(drv_start, |
36 | TP_PROTO(struct ieee80211_local *local, int ret), | 40 | TP_PROTO(struct ieee80211_local *local, int ret), |
37 | 41 | ||
@@ -359,23 +363,26 @@ TRACE_EVENT(drv_update_tkip_key, | |||
359 | 363 | ||
360 | TRACE_EVENT(drv_hw_scan, | 364 | TRACE_EVENT(drv_hw_scan, |
361 | TP_PROTO(struct ieee80211_local *local, | 365 | TP_PROTO(struct ieee80211_local *local, |
366 | struct ieee80211_sub_if_data *sdata, | ||
362 | struct cfg80211_scan_request *req, int ret), | 367 | struct cfg80211_scan_request *req, int ret), |
363 | 368 | ||
364 | TP_ARGS(local, req, ret), | 369 | TP_ARGS(local, sdata, req, ret), |
365 | 370 | ||
366 | TP_STRUCT__entry( | 371 | TP_STRUCT__entry( |
367 | LOCAL_ENTRY | 372 | LOCAL_ENTRY |
373 | VIF_ENTRY | ||
368 | __field(int, ret) | 374 | __field(int, ret) |
369 | ), | 375 | ), |
370 | 376 | ||
371 | TP_fast_assign( | 377 | TP_fast_assign( |
372 | LOCAL_ASSIGN; | 378 | LOCAL_ASSIGN; |
379 | VIF_ASSIGN; | ||
373 | __entry->ret = ret; | 380 | __entry->ret = ret; |
374 | ), | 381 | ), |
375 | 382 | ||
376 | TP_printk( | 383 | TP_printk( |
377 | LOCAL_PR_FMT " ret:%d", | 384 | LOCAL_PR_FMT VIF_PR_FMT " ret:%d", |
378 | LOCAL_PR_ARG, __entry->ret | 385 | LOCAL_PR_ARG,VIF_PR_ARG, __entry->ret |
379 | ) | 386 | ) |
380 | ); | 387 | ); |
381 | 388 | ||
@@ -766,6 +773,326 @@ TRACE_EVENT(drv_flush, | |||
766 | LOCAL_PR_ARG, __entry->drop | 773 | LOCAL_PR_ARG, __entry->drop |
767 | ) | 774 | ) |
768 | ); | 775 | ); |
776 | |||
777 | TRACE_EVENT(drv_channel_switch, | ||
778 | TP_PROTO(struct ieee80211_local *local, | ||
779 | struct ieee80211_channel_switch *ch_switch), | ||
780 | |||
781 | TP_ARGS(local, ch_switch), | ||
782 | |||
783 | TP_STRUCT__entry( | ||
784 | LOCAL_ENTRY | ||
785 | __field(u64, timestamp) | ||
786 | __field(bool, block_tx) | ||
787 | __field(u16, freq) | ||
788 | __field(u8, count) | ||
789 | ), | ||
790 | |||
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; | ||
797 | ), | ||
798 | |||
799 | TP_printk( | ||
800 | LOCAL_PR_FMT " new freq:%u count:%d", | ||
801 | LOCAL_PR_ARG, __entry->freq, __entry->count | ||
802 | ) | ||
803 | ); | ||
804 | |||
805 | /* | ||
806 | * Tracing for API calls that drivers call. | ||
807 | */ | ||
808 | |||
809 | TRACE_EVENT(api_start_tx_ba_session, | ||
810 | TP_PROTO(struct ieee80211_sta *sta, u16 tid), | ||
811 | |||
812 | TP_ARGS(sta, tid), | ||
813 | |||
814 | TP_STRUCT__entry( | ||
815 | STA_ENTRY | ||
816 | __field(u16, tid) | ||
817 | ), | ||
818 | |||
819 | TP_fast_assign( | ||
820 | STA_ASSIGN; | ||
821 | __entry->tid = tid; | ||
822 | ), | ||
823 | |||
824 | TP_printk( | ||
825 | STA_PR_FMT " tid:%d", | ||
826 | STA_PR_ARG, __entry->tid | ||
827 | ) | ||
828 | ); | ||
829 | |||
830 | TRACE_EVENT(api_start_tx_ba_cb, | ||
831 | TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid), | ||
832 | |||
833 | TP_ARGS(sdata, ra, tid), | ||
834 | |||
835 | TP_STRUCT__entry( | ||
836 | VIF_ENTRY | ||
837 | __array(u8, ra, ETH_ALEN) | ||
838 | __field(u16, tid) | ||
839 | ), | ||
840 | |||
841 | TP_fast_assign( | ||
842 | VIF_ASSIGN; | ||
843 | memcpy(__entry->ra, ra, ETH_ALEN); | ||
844 | __entry->tid = tid; | ||
845 | ), | ||
846 | |||
847 | TP_printk( | ||
848 | VIF_PR_FMT " ra:%pM tid:%d", | ||
849 | VIF_PR_ARG, __entry->ra, __entry->tid | ||
850 | ) | ||
851 | ); | ||
852 | |||
853 | TRACE_EVENT(api_stop_tx_ba_session, | ||
854 | TP_PROTO(struct ieee80211_sta *sta, u16 tid, u16 initiator), | ||
855 | |||
856 | TP_ARGS(sta, tid, initiator), | ||
857 | |||
858 | TP_STRUCT__entry( | ||
859 | STA_ENTRY | ||
860 | __field(u16, tid) | ||
861 | __field(u16, initiator) | ||
862 | ), | ||
863 | |||
864 | TP_fast_assign( | ||
865 | STA_ASSIGN; | ||
866 | __entry->tid = tid; | ||
867 | __entry->initiator = initiator; | ||
868 | ), | ||
869 | |||
870 | TP_printk( | ||
871 | STA_PR_FMT " tid:%d initiator:%d", | ||
872 | STA_PR_ARG, __entry->tid, __entry->initiator | ||
873 | ) | ||
874 | ); | ||
875 | |||
876 | TRACE_EVENT(api_stop_tx_ba_cb, | ||
877 | TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid), | ||
878 | |||
879 | TP_ARGS(sdata, ra, tid), | ||
880 | |||
881 | TP_STRUCT__entry( | ||
882 | VIF_ENTRY | ||
883 | __array(u8, ra, ETH_ALEN) | ||
884 | __field(u16, tid) | ||
885 | ), | ||
886 | |||
887 | TP_fast_assign( | ||
888 | VIF_ASSIGN; | ||
889 | memcpy(__entry->ra, ra, ETH_ALEN); | ||
890 | __entry->tid = tid; | ||
891 | ), | ||
892 | |||
893 | TP_printk( | ||
894 | VIF_PR_FMT " ra:%pM tid:%d", | ||
895 | VIF_PR_ARG, __entry->ra, __entry->tid | ||
896 | ) | ||
897 | ); | ||
898 | |||
899 | TRACE_EVENT(api_restart_hw, | ||
900 | TP_PROTO(struct ieee80211_local *local), | ||
901 | |||
902 | TP_ARGS(local), | ||
903 | |||
904 | TP_STRUCT__entry( | ||
905 | LOCAL_ENTRY | ||
906 | ), | ||
907 | |||
908 | TP_fast_assign( | ||
909 | LOCAL_ASSIGN; | ||
910 | ), | ||
911 | |||
912 | TP_printk( | ||
913 | LOCAL_PR_FMT, | ||
914 | LOCAL_PR_ARG | ||
915 | ) | ||
916 | ); | ||
917 | |||
918 | TRACE_EVENT(api_beacon_loss, | ||
919 | TP_PROTO(struct ieee80211_sub_if_data *sdata), | ||
920 | |||
921 | TP_ARGS(sdata), | ||
922 | |||
923 | TP_STRUCT__entry( | ||
924 | VIF_ENTRY | ||
925 | ), | ||
926 | |||
927 | TP_fast_assign( | ||
928 | VIF_ASSIGN; | ||
929 | ), | ||
930 | |||
931 | TP_printk( | ||
932 | VIF_PR_FMT, | ||
933 | VIF_PR_ARG | ||
934 | ) | ||
935 | ); | ||
936 | |||
937 | TRACE_EVENT(api_connection_loss, | ||
938 | TP_PROTO(struct ieee80211_sub_if_data *sdata), | ||
939 | |||
940 | TP_ARGS(sdata), | ||
941 | |||
942 | TP_STRUCT__entry( | ||
943 | VIF_ENTRY | ||
944 | ), | ||
945 | |||
946 | TP_fast_assign( | ||
947 | VIF_ASSIGN; | ||
948 | ), | ||
949 | |||
950 | TP_printk( | ||
951 | VIF_PR_FMT, | ||
952 | VIF_PR_ARG | ||
953 | ) | ||
954 | ); | ||
955 | |||
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), | ||
959 | |||
960 | TP_ARGS(sdata, rssi_event), | ||
961 | |||
962 | TP_STRUCT__entry( | ||
963 | VIF_ENTRY | ||
964 | __field(u32, rssi_event) | ||
965 | ), | ||
966 | |||
967 | TP_fast_assign( | ||
968 | VIF_ASSIGN; | ||
969 | __entry->rssi_event = rssi_event; | ||
970 | ), | ||
971 | |||
972 | TP_printk( | ||
973 | VIF_PR_FMT " event:%d", | ||
974 | VIF_PR_ARG, __entry->rssi_event | ||
975 | ) | ||
976 | ); | ||
977 | |||
978 | TRACE_EVENT(api_scan_completed, | ||
979 | TP_PROTO(struct ieee80211_local *local, bool aborted), | ||
980 | |||
981 | TP_ARGS(local, aborted), | ||
982 | |||
983 | TP_STRUCT__entry( | ||
984 | LOCAL_ENTRY | ||
985 | __field(bool, aborted) | ||
986 | ), | ||
987 | |||
988 | TP_fast_assign( | ||
989 | LOCAL_ASSIGN; | ||
990 | __entry->aborted = aborted; | ||
991 | ), | ||
992 | |||
993 | TP_printk( | ||
994 | LOCAL_PR_FMT " aborted:%d", | ||
995 | LOCAL_PR_ARG, __entry->aborted | ||
996 | ) | ||
997 | ); | ||
998 | |||
999 | TRACE_EVENT(api_sta_block_awake, | ||
1000 | TP_PROTO(struct ieee80211_local *local, | ||
1001 | struct ieee80211_sta *sta, bool block), | ||
1002 | |||
1003 | TP_ARGS(local, sta, block), | ||
1004 | |||
1005 | TP_STRUCT__entry( | ||
1006 | LOCAL_ENTRY | ||
1007 | STA_ENTRY | ||
1008 | __field(bool, block) | ||
1009 | ), | ||
1010 | |||
1011 | TP_fast_assign( | ||
1012 | LOCAL_ASSIGN; | ||
1013 | STA_ASSIGN; | ||
1014 | __entry->block = block; | ||
1015 | ), | ||
1016 | |||
1017 | TP_printk( | ||
1018 | LOCAL_PR_FMT STA_PR_FMT " block:%d", | ||
1019 | LOCAL_PR_ARG, STA_PR_FMT, __entry->block | ||
1020 | ) | ||
1021 | ); | ||
1022 | |||
1023 | TRACE_EVENT(api_chswitch_done, | ||
1024 | TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success), | ||
1025 | |||
1026 | TP_ARGS(sdata, success), | ||
1027 | |||
1028 | TP_STRUCT__entry( | ||
1029 | VIF_ENTRY | ||
1030 | __field(bool, success) | ||
1031 | ), | ||
1032 | |||
1033 | TP_fast_assign( | ||
1034 | VIF_ASSIGN; | ||
1035 | __entry->success = success; | ||
1036 | ), | ||
1037 | |||
1038 | TP_printk( | ||
1039 | VIF_PR_FMT " success=%d", | ||
1040 | VIF_PR_ARG, __entry->success | ||
1041 | ) | ||
1042 | ); | ||
1043 | |||
1044 | /* | ||
1045 | * Tracing for internal functions | ||
1046 | * (which may also be called in response to driver calls) | ||
1047 | */ | ||
1048 | |||
1049 | TRACE_EVENT(wake_queue, | ||
1050 | TP_PROTO(struct ieee80211_local *local, u16 queue, | ||
1051 | enum queue_stop_reason reason), | ||
1052 | |||
1053 | TP_ARGS(local, queue, reason), | ||
1054 | |||
1055 | TP_STRUCT__entry( | ||
1056 | LOCAL_ENTRY | ||
1057 | __field(u16, queue) | ||
1058 | __field(u32, reason) | ||
1059 | ), | ||
1060 | |||
1061 | TP_fast_assign( | ||
1062 | LOCAL_ASSIGN; | ||
1063 | __entry->queue = queue; | ||
1064 | __entry->reason = reason; | ||
1065 | ), | ||
1066 | |||
1067 | TP_printk( | ||
1068 | LOCAL_PR_FMT " queue:%d, reason:%d", | ||
1069 | LOCAL_PR_ARG, __entry->queue, __entry->reason | ||
1070 | ) | ||
1071 | ); | ||
1072 | |||
1073 | TRACE_EVENT(stop_queue, | ||
1074 | TP_PROTO(struct ieee80211_local *local, u16 queue, | ||
1075 | enum queue_stop_reason reason), | ||
1076 | |||
1077 | TP_ARGS(local, queue, reason), | ||
1078 | |||
1079 | TP_STRUCT__entry( | ||
1080 | LOCAL_ENTRY | ||
1081 | __field(u16, queue) | ||
1082 | __field(u32, reason) | ||
1083 | ), | ||
1084 | |||
1085 | TP_fast_assign( | ||
1086 | LOCAL_ASSIGN; | ||
1087 | __entry->queue = queue; | ||
1088 | __entry->reason = reason; | ||
1089 | ), | ||
1090 | |||
1091 | TP_printk( | ||
1092 | LOCAL_PR_FMT " queue:%d, reason:%d", | ||
1093 | LOCAL_PR_ARG, __entry->queue, __entry->reason | ||
1094 | ) | ||
1095 | ); | ||
769 | #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ | 1096 | #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ |
770 | 1097 | ||
771 | #undef TRACE_INCLUDE_PATH | 1098 | #undef TRACE_INCLUDE_PATH |