]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
mac80211: fix ieee80211_set_multicast_list
authorJohannes Berg <johannes@sipsolutions.net>
Fri, 16 Nov 2007 00:49:11 +0000 (01:49 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 20 Nov 2007 21:20:30 +0000 (16:20 -0500)
I recently experienced unexplainable behaviour with the b43
driver when I had broken firmware uploaded. The cause may have
been that promisc mode was not correctly enabled or disabled
and this bug may have been the cause.

Note how the values are compared later in the function so
just doing the & will result in the wrong thing being
compared and the test being false almost always.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/ieee80211.c

index e0ee65a969bc4537d5bccc35fb94d9a636e7a2d0..c38e2cd4f7a74db57f9fa9655805fc64b0b99e55 100644 (file)
@@ -366,8 +366,8 @@ static void ieee80211_set_multicast_list(struct net_device *dev)
 
        allmulti = !!(dev->flags & IFF_ALLMULTI);
        promisc = !!(dev->flags & IFF_PROMISC);
-       sdata_allmulti = sdata->flags & IEEE80211_SDATA_ALLMULTI;
-       sdata_promisc = sdata->flags & IEEE80211_SDATA_PROMISC;
+       sdata_allmulti = !!(sdata->flags & IEEE80211_SDATA_ALLMULTI);
+       sdata_promisc = !!(sdata->flags & IEEE80211_SDATA_PROMISC);
 
        if (allmulti != sdata_allmulti) {
                if (dev->flags & IFF_ALLMULTI)