Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74206
b: refs/heads/master
c: c1428b3
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Nov 20, 2007
1 parent 16ece69 commit 8d57953
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b52f2198ac889561d341c6990d669a671f93f450
refs/heads/master: c1428b3f45d152a300e4f18638ebf30ceafda6c3
23 changes: 23 additions & 0 deletions trunk/net/mac80211/ieee80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,17 @@ static int ieee80211_open(struct net_device *dev)
tasklet_enable(&local->tasklet);
}

/*
* 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)
atomic_inc(&local->iff_allmultis);

if (sdata->flags & IEEE80211_SDATA_PROMISC)
atomic_inc(&local->iff_promiscs);

local->open_count++;

netif_start_queue(dev);
Expand All @@ -284,6 +295,18 @@ static int ieee80211_stop(struct net_device *dev)

netif_stop_queue(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)
atomic_dec(&local->iff_allmultis);

if (sdata->flags & IEEE80211_SDATA_PROMISC)
atomic_dec(&local->iff_promiscs);

dev_mc_unsync(local->mdev, dev);

/* down all dependent devices, that is VLANs */
Expand Down

0 comments on commit 8d57953

Please sign in to comment.