cfg80211: Add TDLS event to allow drivers to request operations
[deliverable/linux.git] / net / mac80211 / trace.h
index 18d9c8a52e9e72d98686778bb7bcab974119e638..758836c85a8010e8eeae237ccab5e1b44197eeda 100644 (file)
 #define VIF_PR_FMT     " vif:%s(%d%s)"
 #define VIF_PR_ARG     __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
 
+#define CHANCTX_ENTRY  __field(int, freq)                                      \
+                       __field(int, chantype)                                  \
+                       __field(u8, rx_chains_static)                           \
+                       __field(u8, rx_chains_dynamic)
+#define CHANCTX_ASSIGN __entry->freq = ctx->conf.channel->center_freq;         \
+                       __entry->chantype = ctx->conf.channel_type;             \
+                       __entry->rx_chains_static = ctx->conf.rx_chains_static; \
+                       __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic
+#define CHANCTX_PR_FMT " freq:%d MHz chantype:%d chains:%d/%d"
+#define CHANCTX_PR_ARG __entry->freq, __entry->chantype,                       \
+                       __entry->rx_chains_static, __entry->rx_chains_dynamic
+
+
+
 /*
  * Tracing for driver callbacks.
  */
@@ -301,20 +315,36 @@ TRACE_EVENT(drv_bss_info_changed,
        TP_STRUCT__entry(
                LOCAL_ENTRY
                VIF_ENTRY
+               __field(u32, changed)
                __field(bool, assoc)
+               __field(bool, ibss_joined)
+               __field(bool, ibss_creator)
                __field(u16, aid)
                __field(bool, cts)
                __field(bool, shortpre)
                __field(bool, shortslot)
+               __field(bool, enable_beacon)
                __field(u8, dtimper)
                __field(u16, bcnint)
                __field(u16, assoc_cap)
                __field(u64, sync_tsf)
                __field(u32, sync_device_ts)
                __field(u32, basic_rates)
-               __field(u32, changed)
-               __field(bool, enable_beacon)
+               __array(int, mcast_rate, IEEE80211_NUM_BANDS)
                __field(u16, ht_operation_mode)
+               __field(s32, cqm_rssi_thold);
+               __field(s32, cqm_rssi_hyst);
+               __field(u32, channel_type);
+               __dynamic_array(u32, arp_addr_list, info->arp_addr_cnt);
+               __field(bool, arp_filter_enabled);
+               __field(bool, qos);
+               __field(bool, idle);
+               __field(bool, ps);
+               __dynamic_array(u8, ssid, info->ssid_len);
+               __field(bool, hidden_ssid);
+               __field(int, txpower)
+               __field(u8, p2p_ctwindow)
+               __field(bool, p2p_oppps)
        ),
 
        TP_fast_assign(
@@ -323,17 +353,35 @@ TRACE_EVENT(drv_bss_info_changed,
                __entry->changed = changed;
                __entry->aid = info->aid;
                __entry->assoc = info->assoc;
+               __entry->ibss_joined = info->ibss_joined;
+               __entry->ibss_creator = info->ibss_creator;
                __entry->shortpre = info->use_short_preamble;
                __entry->cts = info->use_cts_prot;
                __entry->shortslot = info->use_short_slot;
+               __entry->enable_beacon = info->enable_beacon;
                __entry->dtimper = info->dtim_period;
                __entry->bcnint = info->beacon_int;
                __entry->assoc_cap = info->assoc_capability;
                __entry->sync_tsf = info->sync_tsf;
                __entry->sync_device_ts = info->sync_device_ts;
                __entry->basic_rates = info->basic_rates;
-               __entry->enable_beacon = info->enable_beacon;
+               memcpy(__entry->mcast_rate, info->mcast_rate,
+                      sizeof(__entry->mcast_rate));
                __entry->ht_operation_mode = info->ht_operation_mode;
+               __entry->cqm_rssi_thold = info->cqm_rssi_thold;
+               __entry->cqm_rssi_hyst = info->cqm_rssi_hyst;
+               __entry->channel_type = info->channel_type;
+               memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list,
+                      sizeof(u32) * info->arp_addr_cnt);
+               __entry->arp_filter_enabled = info->arp_filter_enabled;
+               __entry->qos = info->qos;
+               __entry->idle = info->idle;
+               __entry->ps = info->ps;
+               memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
+               __entry->hidden_ssid = info->hidden_ssid;
+               __entry->txpower = info->txpower;
+               __entry->p2p_ctwindow = info->p2p_ctwindow;
+               __entry->p2p_oppps = info->p2p_oppps;
        ),
 
        TP_printk(
@@ -1001,34 +1049,6 @@ DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
        TP_ARGS(local)
 );
 
-TRACE_EVENT(drv_offchannel_tx,
-       TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
-                struct ieee80211_channel *chan,
-                enum nl80211_channel_type channel_type,
-                unsigned int wait),
-
-       TP_ARGS(local, skb, chan, channel_type, wait),
-
-       TP_STRUCT__entry(
-               LOCAL_ENTRY
-               __field(int, center_freq)
-               __field(int, channel_type)
-               __field(unsigned int, wait)
-       ),
-
-       TP_fast_assign(
-               LOCAL_ASSIGN;
-               __entry->center_freq = chan->center_freq;
-               __entry->channel_type = channel_type;
-               __entry->wait = wait;
-       ),
-
-       TP_printk(
-               LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
-               LOCAL_PR_ARG, __entry->center_freq, __entry->wait
-       )
-);
-
 TRACE_EVENT(drv_set_ringparam,
        TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
 
@@ -1256,6 +1276,146 @@ DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx,
        TP_ARGS(local, sdata)
 );
 
+DECLARE_EVENT_CLASS(local_chanctx,
+       TP_PROTO(struct ieee80211_local *local,
+                struct ieee80211_chanctx *ctx),
+
+       TP_ARGS(local, ctx),
+
+       TP_STRUCT__entry(
+               LOCAL_ENTRY
+               CHANCTX_ENTRY
+       ),
+
+       TP_fast_assign(
+               LOCAL_ASSIGN;
+               CHANCTX_ASSIGN;
+       ),
+
+       TP_printk(
+               LOCAL_PR_FMT CHANCTX_PR_FMT,
+               LOCAL_PR_ARG, CHANCTX_PR_ARG
+       )
+);
+
+DEFINE_EVENT(local_chanctx, drv_add_chanctx,
+       TP_PROTO(struct ieee80211_local *local,
+                struct ieee80211_chanctx *ctx),
+       TP_ARGS(local, ctx)
+);
+
+DEFINE_EVENT(local_chanctx, drv_remove_chanctx,
+       TP_PROTO(struct ieee80211_local *local,
+                struct ieee80211_chanctx *ctx),
+       TP_ARGS(local, ctx)
+);
+
+TRACE_EVENT(drv_change_chanctx,
+       TP_PROTO(struct ieee80211_local *local,
+                struct ieee80211_chanctx *ctx,
+                u32 changed),
+
+       TP_ARGS(local, ctx, changed),
+
+       TP_STRUCT__entry(
+               LOCAL_ENTRY
+               CHANCTX_ENTRY
+               __field(u32, changed)
+       ),
+
+       TP_fast_assign(
+               LOCAL_ASSIGN;
+               CHANCTX_ASSIGN;
+               __entry->changed = changed;
+       ),
+
+       TP_printk(
+               LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x",
+               LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed
+       )
+);
+
+DECLARE_EVENT_CLASS(local_sdata_chanctx,
+       TP_PROTO(struct ieee80211_local *local,
+                struct ieee80211_sub_if_data *sdata,
+                struct ieee80211_chanctx *ctx),
+
+       TP_ARGS(local, sdata, ctx),
+
+       TP_STRUCT__entry(
+               LOCAL_ENTRY
+               VIF_ENTRY
+               CHANCTX_ENTRY
+       ),
+
+       TP_fast_assign(
+               LOCAL_ASSIGN;
+               VIF_ASSIGN;
+               CHANCTX_ASSIGN;
+       ),
+
+       TP_printk(
+               LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT,
+               LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG
+       )
+);
+
+DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx,
+       TP_PROTO(struct ieee80211_local *local,
+                struct ieee80211_sub_if_data *sdata,
+                struct ieee80211_chanctx *ctx),
+       TP_ARGS(local, sdata, ctx)
+);
+
+DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx,
+       TP_PROTO(struct ieee80211_local *local,
+                struct ieee80211_sub_if_data *sdata,
+                struct ieee80211_chanctx *ctx),
+       TP_ARGS(local, sdata, ctx)
+);
+
+TRACE_EVENT(drv_start_ap,
+       TP_PROTO(struct ieee80211_local *local,
+                struct ieee80211_sub_if_data *sdata,
+                struct ieee80211_bss_conf *info),
+
+       TP_ARGS(local, sdata, info),
+
+       TP_STRUCT__entry(
+               LOCAL_ENTRY
+               VIF_ENTRY
+               __field(u8, dtimper)
+               __field(u16, bcnint)
+               __dynamic_array(u8, ssid, info->ssid_len);
+               __field(bool, hidden_ssid);
+       ),
+
+       TP_fast_assign(
+               LOCAL_ASSIGN;
+               VIF_ASSIGN;
+               __entry->dtimper = info->dtim_period;
+               __entry->bcnint = info->beacon_int;
+               memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len);
+               __entry->hidden_ssid = info->hidden_ssid;
+       ),
+
+       TP_printk(
+               LOCAL_PR_FMT  VIF_PR_FMT,
+               LOCAL_PR_ARG, VIF_PR_ARG
+       )
+);
+
+DEFINE_EVENT(local_sdata_evt, drv_stop_ap,
+       TP_PROTO(struct ieee80211_local *local,
+                struct ieee80211_sub_if_data *sdata),
+       TP_ARGS(local, sdata)
+);
+
+DEFINE_EVENT(local_only_evt, drv_restart_complete,
+       TP_PROTO(struct ieee80211_local *local),
+       TP_ARGS(local)
+);
+
 /*
  * Tracing for API calls that drivers call.
  */
This page took 0.026663 seconds and 5 git commands to generate.