summaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_sta.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2007-08-28 17:01:54 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:48:50 -0700
commit13262ffd4902805acad2618c12b41fcaa6c50791 (patch)
tree2c5c250435c8464aa4c36253b3a86804e3a54814 /net/mac80211/ieee80211_sta.c
parentd6f2da5b33911a31eb61e1790ef8e555e9605837 (diff)
downloadtalos-op-linux-13262ffd4902805acad2618c12b41fcaa6c50791.tar.gz
talos-op-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_sta.c')
-rw-r--r--net/mac80211/ieee80211_sta.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 6a57333dc75c..fe94ebfcb157 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -321,7 +321,7 @@ static void ieee80211_handle_erp_ie(struct net_device *dev, u8 erp_value)
int preamble_mode = (erp_value & WLAN_ERP_BARKER_PREAMBLE) != 0;
u8 changes = 0;
- if (use_protection != sdata->use_protection) {
+ if (use_protection != !!(sdata->flags & IEEE80211_SDATA_USE_PROTECTION)) {
if (net_ratelimit()) {
printk(KERN_DEBUG "%s: CTS protection %s (BSSID="
MAC_FMT ")\n",
@@ -329,11 +329,14 @@ static void ieee80211_handle_erp_ie(struct net_device *dev, u8 erp_value)
use_protection ? "enabled" : "disabled",
MAC_ARG(ifsta->bssid));
}
- sdata->use_protection = use_protection;
+ if (use_protection)
+ sdata->flags |= IEEE80211_SDATA_USE_PROTECTION;
+ else
+ sdata->flags &= ~IEEE80211_SDATA_USE_PROTECTION;
changes |= IEEE80211_ERP_CHANGE_PROTECTION;
}
- if (!preamble_mode != sdata->short_preamble) {
+ if (preamble_mode != !(sdata->flags & IEEE80211_SDATA_SHORT_PREAMBLE)) {
if (net_ratelimit()) {
printk(KERN_DEBUG "%s: switched to %s barker preamble"
" (BSSID=" MAC_FMT ")\n",
@@ -342,7 +345,10 @@ static void ieee80211_handle_erp_ie(struct net_device *dev, u8 erp_value)
"short" : "long",
MAC_ARG(ifsta->bssid));
}
- sdata->short_preamble = !preamble_mode;
+ if (preamble_mode)
+ sdata->flags &= ~IEEE80211_SDATA_SHORT_PREAMBLE;
+ else
+ sdata->flags |= IEEE80211_SDATA_SHORT_PREAMBLE;
changes |= IEEE80211_ERP_CHANGE_PREAMBLE;
}
@@ -2307,8 +2313,9 @@ static int ieee80211_sta_join_ibss(struct net_device *dev,
"for IBSS beacon\n", dev->name);
break;
}
- control.tx_rate = (sdata->short_preamble &&
- (rate->flags & IEEE80211_RATE_PREAMBLE2)) ?
+ control.tx_rate =
+ ((sdata->flags & IEEE80211_SDATA_SHORT_PREAMBLE) &&
+ (rate->flags & IEEE80211_RATE_PREAMBLE2)) ?
rate->val2 : rate->val;
control.antenna_sel_tx = local->hw.conf.antenna_sel_tx;
control.power_level = local->hw.conf.power_level;
OpenPOWER on IntegriCloud