diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-08-28 17:01:54 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:48:50 -0400 |
commit | 13262ffd4902805acad2618c12b41fcaa6c50791 (patch) | |
tree | 2c5c250435c8464aa4c36253b3a86804e3a54814 /net/mac80211/ieee80211.c | |
parent | d6f2da5b33911a31eb61e1790ef8e555e9605837 (diff) |
[MAC80211]: Remove bitfields from struct ieee80211_sub_if_data
mac80211, remove bitfields from struct ieee80211_sub_if_data
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/ieee80211.c')
-rw-r--r-- | net/mac80211/ieee80211.c | 30 |
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 | ||
747 | void ieee80211_reset_erp_info(struct net_device *dev) | 745 | void 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); |