aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/ieee80211.c')
-rw-r--r--net/mac80211/ieee80211.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index be678c61afa5..50d7af3018ea 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -555,23 +555,21 @@ static void ieee80211_set_multicast_list(struct net_device *dev)
555 unsigned short flags; 555 unsigned short flags;
556 556
557 netif_tx_lock_nested(local->mdev, TX_LOCK_MASTER); 557 netif_tx_lock_nested(local->mdev, TX_LOCK_MASTER);
558 if (((dev->flags & IFF_ALLMULTI) != 0) ^ (sdata->allmulti != 0)) { 558 if (((dev->flags & IFF_ALLMULTI) != 0) ^
559 if (sdata->allmulti) { 559 ((sdata->flags & IEEE80211_SDATA_ALLMULTI) != 0)) {
560 sdata->allmulti = 0; 560 if (sdata->flags & IEEE80211_SDATA_ALLMULTI)
561 local->iff_allmultis--; 561 local->iff_allmultis--;
562 } else { 562 else
563 sdata->allmulti = 1;
564 local->iff_allmultis++; 563 local->iff_allmultis++;
565 } 564 sdata->flags ^= IEEE80211_SDATA_ALLMULTI;
566 } 565 }
567 if (((dev->flags & IFF_PROMISC) != 0) ^ (sdata->promisc != 0)) { 566 if (((dev->flags & IFF_PROMISC) != 0) ^
568 if (sdata->promisc) { 567 ((sdata->flags & IEEE80211_SDATA_PROMISC) != 0)) {
569 sdata->promisc = 0; 568 if (sdata->flags & IEEE80211_SDATA_PROMISC)
570 local->iff_promiscs--; 569 local->iff_promiscs--;
571 } else { 570 else
572 sdata->promisc = 1;
573 local->iff_promiscs++; 571 local->iff_promiscs++;
574 } 572 sdata->flags ^= IEEE80211_SDATA_PROMISC;
575 } 573 }
576 if (dev->mc_count != sdata->mc_count) { 574 if (dev->mc_count != sdata->mc_count) {
577 local->mc_count = local->mc_count - sdata->mc_count + 575 local->mc_count = local->mc_count - sdata->mc_count +
@@ -740,16 +738,16 @@ void ieee80211_erp_info_change_notify(struct net_device *dev, u8 changes)
740 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 738 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
741 if (local->ops->erp_ie_changed) 739 if (local->ops->erp_ie_changed)
742 local->ops->erp_ie_changed(local_to_hw(local), changes, 740 local->ops->erp_ie_changed(local_to_hw(local), changes,
743 sdata->use_protection, 741 !!(sdata->flags & IEEE80211_SDATA_USE_PROTECTION),
744 !sdata->short_preamble); 742 !(sdata->flags & IEEE80211_SDATA_SHORT_PREAMBLE));
745} 743}
746 744
747void ieee80211_reset_erp_info(struct net_device *dev) 745void ieee80211_reset_erp_info(struct net_device *dev)
748{ 746{
749 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 747 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
750 748
751 sdata->short_preamble = 0; 749 sdata->flags &= ~(IEEE80211_SDATA_USE_PROTECTION |
752 sdata->use_protection = 0; 750 IEEE80211_SDATA_SHORT_PREAMBLE);
753 ieee80211_erp_info_change_notify(dev, 751 ieee80211_erp_info_change_notify(dev,
754 IEEE80211_ERP_CHANGE_PROTECTION | 752 IEEE80211_ERP_CHANGE_PROTECTION |
755 IEEE80211_ERP_CHANGE_PREAMBLE); 753 IEEE80211_ERP_CHANGE_PREAMBLE);