Commit c1428b3f authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville
Browse files

mac80211: fix allmulti/promisc behaviour

When an interface with promisc/allmulti bit is taken down,
the mac80211 state can become confused. This fixes it by
making mac80211 keep track of all *active* interfaces that
have the promisc/allmulti bit set in the sdata, we sync
the interface bit into sdata at set_multicast_list() time
so this works.

Signed-off-by: default avatarJohannes Berg <>
Signed-off-by: default avatarJohn W. Linville <>
parent b52f2198
......@@ -267,6 +267,17 @@ static int ieee80211_open(struct net_device *dev)
* set_multicast_list will be invoked by the networking core
* which will check whether any increments here were done in
* error and sync them down to the hardware as filter flags.
if (sdata->flags & IEEE80211_SDATA_ALLMULTI)
if (sdata->flags & IEEE80211_SDATA_PROMISC)
......@@ -284,6 +295,18 @@ static int ieee80211_stop(struct net_device *dev)
* Don't count this interface for promisc/allmulti while it
* is down. dev_mc_unsync() will invoke set_multicast_list
* on the master interface which will sync these down to the
* hardware as filter flags.
if (sdata->flags & IEEE80211_SDATA_ALLMULTI)
if (sdata->flags & IEEE80211_SDATA_PROMISC)
dev_mc_unsync(local->mdev, dev);
/* down all dependent devices, that is VLANs */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment