diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/ieee80211.c | 27 | ||||
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 2 |
2 files changed, 26 insertions, 3 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index 0dc114c4ef2b..505af1f067ab 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c | |||
@@ -267,6 +267,17 @@ static int ieee80211_open(struct net_device *dev) | |||
267 | tasklet_enable(&local->tasklet); | 267 | tasklet_enable(&local->tasklet); |
268 | } | 268 | } |
269 | 269 | ||
270 | /* | ||
271 | * set_multicast_list will be invoked by the networking core | ||
272 | * which will check whether any increments here were done in | ||
273 | * error and sync them down to the hardware as filter flags. | ||
274 | */ | ||
275 | if (sdata->flags & IEEE80211_SDATA_ALLMULTI) | ||
276 | atomic_inc(&local->iff_allmultis); | ||
277 | |||
278 | if (sdata->flags & IEEE80211_SDATA_PROMISC) | ||
279 | atomic_inc(&local->iff_promiscs); | ||
280 | |||
270 | local->open_count++; | 281 | local->open_count++; |
271 | 282 | ||
272 | netif_start_queue(dev); | 283 | netif_start_queue(dev); |
@@ -284,6 +295,18 @@ static int ieee80211_stop(struct net_device *dev) | |||
284 | 295 | ||
285 | netif_stop_queue(dev); | 296 | netif_stop_queue(dev); |
286 | 297 | ||
298 | /* | ||
299 | * Don't count this interface for promisc/allmulti while it | ||
300 | * is down. dev_mc_unsync() will invoke set_multicast_list | ||
301 | * on the master interface which will sync these down to the | ||
302 | * hardware as filter flags. | ||
303 | */ | ||
304 | if (sdata->flags & IEEE80211_SDATA_ALLMULTI) | ||
305 | atomic_dec(&local->iff_allmultis); | ||
306 | |||
307 | if (sdata->flags & IEEE80211_SDATA_PROMISC) | ||
308 | atomic_dec(&local->iff_promiscs); | ||
309 | |||
287 | dev_mc_unsync(local->mdev, dev); | 310 | dev_mc_unsync(local->mdev, dev); |
288 | 311 | ||
289 | /* down all dependent devices, that is VLANs */ | 312 | /* down all dependent devices, that is VLANs */ |
@@ -370,8 +393,8 @@ static void ieee80211_set_multicast_list(struct net_device *dev) | |||
370 | 393 | ||
371 | allmulti = !!(dev->flags & IFF_ALLMULTI); | 394 | allmulti = !!(dev->flags & IFF_ALLMULTI); |
372 | promisc = !!(dev->flags & IFF_PROMISC); | 395 | promisc = !!(dev->flags & IFF_PROMISC); |
373 | sdata_allmulti = sdata->flags & IEEE80211_SDATA_ALLMULTI; | 396 | sdata_allmulti = !!(sdata->flags & IEEE80211_SDATA_ALLMULTI); |
374 | sdata_promisc = sdata->flags & IEEE80211_SDATA_PROMISC; | 397 | sdata_promisc = !!(sdata->flags & IEEE80211_SDATA_PROMISC); |
375 | 398 | ||
376 | if (allmulti != sdata_allmulti) { | 399 | if (allmulti != sdata_allmulti) { |
377 | if (dev->flags & IFF_ALLMULTI) | 400 | if (dev->flags & IFF_ALLMULTI) |
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 015b3f879aa9..16afd24d4f6b 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -2647,7 +2647,7 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw) | |||
2647 | local->sta_scanning = 0; | 2647 | local->sta_scanning = 0; |
2648 | 2648 | ||
2649 | if (ieee80211_hw_config(local)) | 2649 | if (ieee80211_hw_config(local)) |
2650 | printk(KERN_DEBUG "%s: failed to restore operational" | 2650 | printk(KERN_DEBUG "%s: failed to restore operational " |
2651 | "channel after scan\n", dev->name); | 2651 | "channel after scan\n", dev->name); |
2652 | 2652 | ||
2653 | 2653 | ||