summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-10-12 21:24:07 +0200
committerJohn W. Linville <linville@tuxdriver.com>2007-10-16 20:58:12 -0400
commit58a9ac17ed7a78958d03f3b4af107f0ef075cbed (patch)
treea320ca97161ad4ce6bd2d25654284a6ae9b5ceed /net/mac80211
parente797aa1b7da6bfcb2e19a10ae5ead9aa7aea732b (diff)
downloadlinux-58a9ac17ed7a78958d03f3b4af107f0ef075cbed.tar.bz2
[PATCH] mac80211: fix set_channel regression
Adam Baker reported that the prism2 ioctl removal changed behaviour in that now the selection order was the other way around as before. New API is planned but not done yet, so for now just use the first matching channel in any mode as was previous behaviour with an unset next_mode. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/ieee80211_ioctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c
index f0224c2311d2..6b4b0d5880db 100644
--- a/net/mac80211/ieee80211_ioctl.c
+++ b/net/mac80211/ieee80211_ioctl.c
@@ -306,9 +306,12 @@ int ieee80211_set_channel(struct ieee80211_local *local, int channel, int freq)
((chan->chan == channel) || (chan->freq == freq))) {
local->oper_channel = chan;
local->oper_hw_mode = mode;
- set++;
+ set = 1;
+ break;
}
}
+ if (set)
+ break;
}
if (set) {