aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ibss.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-05-16 23:50:17 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-06-05 15:32:16 -0400
commitd58e7e37aac0465b08527adadc8016421bd4060e (patch)
treee0a06894e131012e97a892704970ab0b8b1141f2 /net/mac80211/ibss.c
parent3d9e6e12077d2611749ba3145bc4934aae461425 (diff)
downloadkernel_goldelico_gta04-d58e7e37aac0465b08527adadc8016421bd4060e.zip
kernel_goldelico_gta04-d58e7e37aac0465b08527adadc8016421bd4060e.tar.gz
kernel_goldelico_gta04-d58e7e37aac0465b08527adadc8016421bd4060e.tar.bz2
cfg80211: simplify cfg80211_can_beacon_sec_chan API
Change cfg80211_can_beacon_sec_chan() to return true if there is no secondary channel to simplify all the current users of it. They all check the channel type before calling the function because it returns false if there's no secondary channel. Also actually document the return value. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ibss.c')
-rw-r--r--net/mac80211/ibss.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 0bc47a8..725cb4b 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -82,8 +82,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
local->oper_channel = chan;
channel_type = ifibss->channel_type;
- if (channel_type > NL80211_CHAN_HT20 &&
- !cfg80211_can_beacon_sec_chan(local->hw.wiphy, chan, channel_type))
+ if (!cfg80211_can_beacon_sec_chan(local->hw.wiphy, chan, channel_type))
channel_type = NL80211_CHAN_HT20;
if (!ieee80211_set_channel_type(local, sdata, channel_type)) {
/* can only fail due to HT40+/- mismatch */