Skip to content

Commit

Permalink
mac80211: fix ieee80211_set_multicast_list
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Nov 20, 2007
1 parent d9f8bcb commit b52f219
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/mac80211/ieee80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b52f219

Please sign in to comment.