From: Johannes Berg Date: Fri, 16 Nov 2007 00:49:11 +0000 (+0100) Subject: mac80211: fix ieee80211_set_multicast_list X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b52f2198ac889561d341c6990d669a671f93f450;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mac80211: fix ieee80211_set_multicast_list 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 Signed-off-by: John W. Linville --- diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index e0ee65a969bc..c38e2cd4f7a7 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c @@ -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)