From 4ee3e063f10acf6fd17c0ee6f1d0a95726e74cb2 Mon Sep 17 00:00:00 2001 From: Beni Lev Date: Mon, 27 Aug 2012 12:49:39 +0300 Subject: cfg80211: add cfg80211 exported function tracing Also add tracing to the API functions that drivers (and mac80211) can call in cfg80211. Signed-off-by: Beni Lev Reviewed-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Signed-off-by: Johannes Berg --- net/wireless/chan.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'net/wireless/chan.c') diff --git a/net/wireless/chan.c b/net/wireless/chan.c index 71c362587965..48febd2160ba 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -53,6 +53,8 @@ bool cfg80211_can_beacon_sec_chan(struct wiphy *wiphy, struct ieee80211_channel *sec_chan; int diff; + trace_cfg80211_can_beacon_sec_chan(wiphy, chan, channel_type); + switch (channel_type) { case NL80211_CHAN_HT40PLUS: diff = 20; @@ -61,20 +63,25 @@ bool cfg80211_can_beacon_sec_chan(struct wiphy *wiphy, diff = -20; break; default: + trace_cfg80211_return_bool(true); return true; } sec_chan = ieee80211_get_channel(wiphy, chan->center_freq + diff); - if (!sec_chan) + if (!sec_chan) { + trace_cfg80211_return_bool(false); return false; + } /* we'll need a DFS capability later */ if (sec_chan->flags & (IEEE80211_CHAN_DISABLED | IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_IBSS | - IEEE80211_CHAN_RADAR)) + IEEE80211_CHAN_RADAR)) { + trace_cfg80211_return_bool(false); return false; - + } + trace_cfg80211_return_bool(true); return true; } EXPORT_SYMBOL(cfg80211_can_beacon_sec_chan); -- cgit v1.2.3