aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-05-16 23:50:18 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-06-05 15:32:16 -0400
commitaa430da41019c1694f6a8e3b8bef1d12ed52b0ad (patch)
tree086b60a5c6253cad2c78f5a976d0608f375f2b03 /net/mac80211/cfg.c
parentcfg80211: simplify cfg80211_can_beacon_sec_chan API (diff)
downloadlinux-dev-aa430da41019c1694f6a8e3b8bef1d12ed52b0ad.tar.xz
linux-dev-aa430da41019c1694f6a8e3b8bef1d12ed52b0ad.zip
cfg80211: provide channel to start_ap function
Instead of setting the channel first and then starting the AP, let cfg80211 store the channel and provide it as one of the AP settings. This means that now you have to set the channel before you can start an AP interface, but since hostapd/wpa_supplicant always do that we're OK with this change. Alternatively, it's now possible to give the channel as an attribute to the start-ap nl80211 command, overriding any preset channel. Cc: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 9aab849fd6cf..8e9d525c4653 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -823,6 +823,11 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
if (old)
return -EALREADY;
+ err = ieee80211_set_channel(wiphy, dev, params->channel,
+ params->channel_type);
+ if (err)
+ return err;
+
/*
* Apply control port protocol, this allows us to
* not encrypt dynamic WEP control frames.