5
5
#include <net/mac80211.h>
6
6
#include "ieee80211_i.h"
8
#if !defined(CONFIG_MAC80211_DRIVER_API_TRACER) || defined(__CHECKER__)
10
#define TRACE_EVENT(name, proto, ...) \
11
static inline void trace_ ## name(proto) {}
12
#undef DECLARE_EVENT_CLASS
13
#define DECLARE_EVENT_CLASS(...)
15
#define DEFINE_EVENT(evt_class, name, proto, ...) \
16
static inline void trace_ ## name(proto) {}
20
9
#define TRACE_SYSTEM mac80211
164
DEFINE_EVENT(local_u32_evt, drv_get_et_strings,
165
TP_PROTO(struct ieee80211_local *local, u32 sset),
169
DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count,
170
TP_PROTO(struct ieee80211_local *local, u32 sset),
174
DEFINE_EVENT(local_only_evt, drv_get_et_stats,
175
TP_PROTO(struct ieee80211_local *local),
175
179
DEFINE_EVENT(local_only_evt, drv_suspend,
176
180
TP_PROTO(struct ieee80211_local *local),
189
TRACE_EVENT(drv_set_wakeup,
190
TP_PROTO(struct ieee80211_local *local, bool enabled),
191
TP_ARGS(local, enabled),
194
__field(bool, enabled)
198
__entry->enabled = enabled;
200
TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
185
203
DEFINE_EVENT(local_only_evt, drv_stop,
186
204
TP_PROTO(struct ieee80211_local *local),
307
325
__entry->dtimper = info->dtim_period;
308
326
__entry->bcnint = info->beacon_int;
309
327
__entry->assoc_cap = info->assoc_capability;
310
__entry->timestamp = info->timestamp;
328
__entry->timestamp = info->last_tsf;
311
329
__entry->basic_rates = info->basic_rates;
312
330
__entry->enable_beacon = info->enable_beacon;
313
331
__entry->ht_operation_mode = info->ht_operation_mode;
322
DECLARE_EVENT_CLASS(tx_sync_evt,
323
TP_PROTO(struct ieee80211_local *local,
324
struct ieee80211_sub_if_data *sdata,
326
enum ieee80211_tx_sync_type type),
327
TP_ARGS(local, sdata, bssid, type),
332
__array(char, bssid, ETH_ALEN)
333
__field(u32, sync_type)
339
memcpy(__entry->bssid, bssid, ETH_ALEN);
340
__entry->sync_type = type;
344
LOCAL_PR_FMT VIF_PR_FMT " bssid:%pM type:%d",
345
LOCAL_PR_ARG, VIF_PR_ARG, __entry->bssid, __entry->sync_type
349
DEFINE_EVENT(tx_sync_evt, drv_tx_sync,
350
TP_PROTO(struct ieee80211_local *local,
351
struct ieee80211_sub_if_data *sdata,
353
enum ieee80211_tx_sync_type type),
354
TP_ARGS(local, sdata, bssid, type)
357
DEFINE_EVENT(tx_sync_evt, drv_finish_tx_sync,
358
TP_PROTO(struct ieee80211_local *local,
359
struct ieee80211_sub_if_data *sdata,
361
enum ieee80211_tx_sync_type type),
362
TP_ARGS(local, sdata, bssid, type)
365
340
TRACE_EVENT(drv_prepare_multicast,
366
341
TP_PROTO(struct ieee80211_local *local, int mc_count),
624
TRACE_EVENT(drv_sta_state,
625
TP_PROTO(struct ieee80211_local *local,
626
struct ieee80211_sub_if_data *sdata,
627
struct ieee80211_sta *sta,
628
enum ieee80211_sta_state old_state,
629
enum ieee80211_sta_state new_state),
631
TP_ARGS(local, sdata, sta, old_state, new_state),
637
__field(u32, old_state)
638
__field(u32, new_state)
645
__entry->old_state = old_state;
646
__entry->new_state = new_state;
650
LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d",
651
LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG,
652
__entry->old_state, __entry->new_state
656
TRACE_EVENT(drv_sta_rc_update,
657
TP_PROTO(struct ieee80211_local *local,
658
struct ieee80211_sub_if_data *sdata,
659
struct ieee80211_sta *sta,
662
TP_ARGS(local, sdata, sta, changed),
668
__field(u32, changed)
675
__entry->changed = changed;
679
LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x",
680
LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed
649
684
TRACE_EVENT(drv_sta_add,
650
685
TP_PROTO(struct ieee80211_local *local,
651
686
struct ieee80211_sub_if_data *sdata,
699
734
TRACE_EVENT(drv_conf_tx,
700
735
TP_PROTO(struct ieee80211_local *local,
701
736
struct ieee80211_sub_if_data *sdata,
703
const struct ieee80211_tx_queue_params *params),
737
u16 ac, const struct ieee80211_tx_queue_params *params),
705
TP_ARGS(local, sdata, queue, params),
739
TP_ARGS(local, sdata, ac, params),
707
741
TP_STRUCT__entry(
711
745
__field(u16, txop)
712
746
__field(u16, cw_min)
713
747
__field(u16, cw_max)
730
LOCAL_PR_FMT VIF_PR_FMT " queue:%d",
731
LOCAL_PR_ARG, VIF_PR_ARG, __entry->queue
764
LOCAL_PR_FMT VIF_PR_FMT " AC:%d",
765
LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac