Search Linux Wireless

[PATCH v2] mac80211: fix set_channel regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>

---
Michael Wu just pointed out the error in my previous patch. I missed the
outer loop, we need to break from it as well.

 net/mac80211/ieee80211_ioctl.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- wireless-dev.orig/net/mac80211/ieee80211_ioctl.c	2007-10-10 12:29:49.330680979 +0200
+++ wireless-dev/net/mac80211/ieee80211_ioctl.c	2007-10-12 21:22:20.838530346 +0200
@@ -305,9 +305,12 @@ int ieee80211_set_channel(struct ieee802
 			    ((chan->chan == channel) || (chan->freq == freq))) {
 				local->oper_channel = chan;
 				local->oper_hw_mode = mode;
-				set++;
+				set = 1;
+				break;
 			}
 		}
+		if (set)
+			break;
 	}
 
 	if (set) {


-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux