summaryrefslogtreecommitdiffstats
path: root/net/mac80211/wext.c
diff options
context:
space:
mode:
authorAlina Friedrichsen2009-01-06 03:15:23 +0100
committerJohn W. Linville2009-01-29 21:59:49 +0100
commitb522ed56ef90f5078a2a1253e390299723510a89 (patch)
tree41a5211fcdf03addf7f63bc7783ef9c16a63b9dd /net/mac80211/wext.c
parentmac80211: Don't merge if BSSID is set manually (diff)
downloadkernel-qcow2-linux-b522ed56ef90f5078a2a1253e390299723510a89.tar.gz
kernel-qcow2-linux-b522ed56ef90f5078a2a1253e390299723510a89.tar.xz
kernel-qcow2-linux-b522ed56ef90f5078a2a1253e390299723510a89.zip
mac80211: Allow to set channel in adhoc properly
The last patch fixes a bug that it was not possible to set the channel manually in the ad hoc mode properly. Please commit this patches so that we don't need the proprietary Broadcom driver in the near future anymore. Signed-off-by: Alina Friedrichsen <x-alina@gmx.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/wext.c')
-rw-r--r--net/mac80211/wext.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index 654041b93736..bb2c7135a1c8 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -230,13 +230,15 @@ static int ieee80211_ioctl_siwfreq(struct net_device *dev,
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- if (sdata->vif.type == NL80211_IFTYPE_STATION)
+ if (sdata->vif.type == NL80211_IFTYPE_ADHOC ||
+ sdata->vif.type == NL80211_IFTYPE_STATION)
sdata->u.sta.flags &= ~IEEE80211_STA_AUTO_CHANNEL_SEL;
/* freq->e == 0: freq->m = channel; otherwise freq = m * 10^e */
if (freq->e == 0) {
if (freq->m < 0) {
- if (sdata->vif.type == NL80211_IFTYPE_STATION)
+ if (sdata->vif.type == NL80211_IFTYPE_ADHOC ||
+ sdata->vif.type == NL80211_IFTYPE_STATION)
sdata->u.sta.flags |=
IEEE80211_STA_AUTO_CHANNEL_SEL;
return 0;