From 1041638f2bba0f1de75e66086d50fb1251d64dcf Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 19 Oct 2012 15:44:42 +0200 Subject: mac80211: add explicit AP/GO driver operations Depending on the driver, a lot of setup may be necessary to start operating as an AP, some of which may fail. Add an explicit AP start driver method to make such failures easier to handle, and add an AP stop driver method for symmetry. Signed-off-by: Johannes Berg --- net/mac80211/trace.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'net/mac80211/trace.h') diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h index 0638541b625f..5e74e77cba9a 100644 --- a/net/mac80211/trace.h +++ b/net/mac80211/trace.h @@ -1396,6 +1396,43 @@ DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx, 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) +); + /* * Tracing for API calls that drivers call. */ -- cgit v1.2.3