diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-08-28 23:01:54 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-11 01:48:50 +0200 |
commit | 13262ffd4902805acad2618c12b41fcaa6c50791 (patch) | |
tree | 2c5c250435c8464aa4c36253b3a86804e3a54814 /net/mac80211/ieee80211.c | |
parent | [MAC80211]: Remove bitfields from struct ieee80211_if_sta (diff) | |
download | linux-13262ffd4902805acad2618c12b41fcaa6c50791.tar.xz linux-13262ffd4902805acad2618c12b41fcaa6c50791.zip |
[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) unsigned short flags; netif_tx_lock_nested(local->mdev, TX_LOCK_MASTER); - if (((dev->flags & IFF_ALLMULTI) != 0) ^ (sdata->allmulti != 0)) { - if (sdata->allmulti) { - sdata->allmulti = 0; + if (((dev->flags & IFF_ALLMULTI) != 0) ^ + ((sdata->flags & IEEE80211_SDATA_ALLMULTI) != 0)) { + if (sdata->flags & IEEE80211_SDATA_ALLMULTI) local->iff_allmultis--; - } else { - sdata->allmulti = 1; + else local->iff_allmultis++; - } + sdata->flags ^= IEEE80211_SDATA_ALLMULTI; } - if (((dev->flags & IFF_PROMISC) != 0) ^ (sdata->promisc != 0)) { - if (sdata->promisc) { - sdata->promisc = 0; + if (((dev->flags & IFF_PROMISC) != 0) ^ + ((sdata->flags & IEEE80211_SDATA_PROMISC) != 0)) { + if (sdata->flags & IEEE80211_SDATA_PROMISC) local->iff_promiscs--; - } else { - sdata->promisc = 1; + else local->iff_promiscs++; - } + sdata->flags ^= IEEE80211_SDATA_PROMISC; } if (dev->mc_count != sdata->mc_count) { 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) struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); if (local->ops->erp_ie_changed) local->ops->erp_ie_changed(local_to_hw(local), changes, - sdata->use_protection, - !sdata->short_preamble); + !!(sdata->flags & IEEE80211_SDATA_USE_PROTECTION), + !(sdata->flags & IEEE80211_SDATA_SHORT_PREAMBLE)); } void ieee80211_reset_erp_info(struct net_device *dev) { struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); - sdata->short_preamble = 0; - sdata->use_protection = 0; + sdata->flags &= ~(IEEE80211_SDATA_USE_PROTECTION | + IEEE80211_SDATA_SHORT_PREAMBLE); ieee80211_erp_info_change_notify(dev, IEEE80211_ERP_CHANGE_PROTECTION | IEEE80211_ERP_CHANGE_PREAMBLE); |