summaryrefslogtreecommitdiff
path: root/net/wireless/chan.c
diff options
context:
space:
mode:
authorBeni Lev <beni.lev@intel.com>2012-08-27 12:49:39 +0300
committerJohannes Berg <johannes.berg@intel.com>2012-10-18 10:53:38 +0200
commit4ee3e063f10acf6fd17c0ee6f1d0a95726e74cb2 (patch)
tree66b8846df1311155856710cabe811739451566ed /net/wireless/chan.c
parent14e8a3c47e808772a5ba8118ef1f9a8d604dbbe5 (diff)
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 <beni.lev@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/chan.c')
-rw-r--r--net/wireless/chan.c13
1 files changed, 10 insertions, 3 deletions
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);