mac80211: rename bss_conf timestamp to last_tsf
[firefly-linux-kernel-4.4.55.git] / net / mac80211 / driver-trace.h
index 2af4fca553371f3c4a6a7263ade75f9f6342002a..21d6f5290a1c67883d004ab5c2215bd9ebdafc54 100644 (file)
@@ -5,17 +5,6 @@
 #include <net/mac80211.h>
 #include "ieee80211_i.h"
 
-#if !defined(CONFIG_MAC80211_DRIVER_API_TRACER) || defined(__CHECKER__)
-#undef TRACE_EVENT
-#define TRACE_EVENT(name, proto, ...) \
-static inline void trace_ ## name(proto) {}
-#undef DECLARE_EVENT_CLASS
-#define DECLARE_EVENT_CLASS(...)
-#undef DEFINE_EVENT
-#define DEFINE_EVENT(evt_class, name, proto, ...) \
-static inline void trace_ ## name(proto) {}
-#endif
-
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM mac80211
 
@@ -307,7 +296,7 @@ TRACE_EVENT(drv_bss_info_changed,
                __entry->dtimper = info->dtim_period;
                __entry->bcnint = info->beacon_int;
                __entry->assoc_cap = info->assoc_capability;
-               __entry->timestamp = info->timestamp;
+               __entry->timestamp = info->last_tsf;
                __entry->basic_rates = info->basic_rates;
                __entry->enable_beacon = info->enable_beacon;
                __entry->ht_operation_mode = info->ht_operation_mode;
@@ -319,49 +308,6 @@ TRACE_EVENT(drv_bss_info_changed,
        )
 );
 
-DECLARE_EVENT_CLASS(tx_sync_evt,
-       TP_PROTO(struct ieee80211_local *local,
-                struct ieee80211_sub_if_data *sdata,
-                const u8 *bssid,
-                enum ieee80211_tx_sync_type type),
-       TP_ARGS(local, sdata, bssid, type),
-
-       TP_STRUCT__entry(
-               LOCAL_ENTRY
-               VIF_ENTRY
-               __array(char, bssid, ETH_ALEN)
-               __field(u32, sync_type)
-       ),
-
-       TP_fast_assign(
-               LOCAL_ASSIGN;
-               VIF_ASSIGN;
-               memcpy(__entry->bssid, bssid, ETH_ALEN);
-               __entry->sync_type = type;
-       ),
-
-       TP_printk(
-               LOCAL_PR_FMT  VIF_PR_FMT " bssid:%pM type:%d",
-               LOCAL_PR_ARG, VIF_PR_ARG, __entry->bssid, __entry->sync_type
-       )
-);
-
-DEFINE_EVENT(tx_sync_evt, drv_tx_sync,
-       TP_PROTO(struct ieee80211_local *local,
-                struct ieee80211_sub_if_data *sdata,
-                const u8 *bssid,
-                enum ieee80211_tx_sync_type type),
-       TP_ARGS(local, sdata, bssid, type)
-);
-
-DEFINE_EVENT(tx_sync_evt, drv_finish_tx_sync,
-       TP_PROTO(struct ieee80211_local *local,
-                struct ieee80211_sub_if_data *sdata,
-                const u8 *bssid,
-                enum ieee80211_tx_sync_type type),
-       TP_ARGS(local, sdata, bssid, type)
-);
-
 TRACE_EVENT(drv_prepare_multicast,
        TP_PROTO(struct ieee80211_local *local, int mc_count),
 
@@ -646,6 +592,38 @@ TRACE_EVENT(drv_sta_notify,
        )
 );
 
+TRACE_EVENT(drv_sta_state,
+       TP_PROTO(struct ieee80211_local *local,
+                struct ieee80211_sub_if_data *sdata,
+                struct ieee80211_sta *sta,
+                enum ieee80211_sta_state old_state,
+                enum ieee80211_sta_state new_state),
+
+       TP_ARGS(local, sdata, sta, old_state, new_state),
+
+       TP_STRUCT__entry(
+               LOCAL_ENTRY
+               VIF_ENTRY
+               STA_ENTRY
+               __field(u32, old_state)
+               __field(u32, new_state)
+       ),
+
+       TP_fast_assign(
+               LOCAL_ASSIGN;
+               VIF_ASSIGN;
+               STA_ASSIGN;
+               __entry->old_state = old_state;
+               __entry->new_state = new_state;
+       ),
+
+       TP_printk(
+               LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT " state: %d->%d",
+               LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
+               __entry->old_state, __entry->new_state
+       )
+);
+
 TRACE_EVENT(drv_sta_add,
        TP_PROTO(struct ieee80211_local *local,
                 struct ieee80211_sub_if_data *sdata,