diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-10-12 15:24:07 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-10-16 20:58:12 -0400 |
commit | 58a9ac17ed7a78958d03f3b4af107f0ef075cbed (patch) | |
tree | a320ca97161ad4ce6bd2d25654284a6ae9b5ceed /net | |
parent | e797aa1b7da6bfcb2e19a10ae5ead9aa7aea732b (diff) |
[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')
-rw-r--r-- | net/mac80211/ieee80211_ioctl.c | 5 |
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) | |||
306 | ((chan->chan == channel) || (chan->freq == freq))) { | 306 | ((chan->chan == channel) || (chan->freq == freq))) { |
307 | local->oper_channel = chan; | 307 | local->oper_channel = chan; |
308 | local->oper_hw_mode = mode; | 308 | local->oper_hw_mode = mode; |
309 | set++; | 309 | set = 1; |
310 | break; | ||
310 | } | 311 | } |
311 | } | 312 | } |
313 | if (set) | ||
314 | break; | ||
312 | } | 315 | } |
313 | 316 | ||
314 | if (set) { | 317 | if (set) { |