[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>
This commit is contained in:
Johannes Berg 2007-10-12 21:24:07 +02:00 коммит произвёл John W. Linville
Родитель e797aa1b7d
Коммит 58a9ac17ed
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -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) {