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_sta.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_sta.c')
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 19 |
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) | |||
321 | int preamble_mode = (erp_value & WLAN_ERP_BARKER_PREAMBLE) != 0; | 321 | int preamble_mode = (erp_value & WLAN_ERP_BARKER_PREAMBLE) != 0; |
322 | u8 changes = 0; | 322 | u8 changes = 0; |
323 | 323 | ||
324 | if (use_protection != sdata->use_protection) { | 324 | if (use_protection != !!(sdata->flags & IEEE80211_SDATA_USE_PROTECTION)) { |
325 | if (net_ratelimit()) { | 325 | if (net_ratelimit()) { |
326 | printk(KERN_DEBUG "%s: CTS protection %s (BSSID=" | 326 | printk(KERN_DEBUG "%s: CTS protection %s (BSSID=" |
327 | MAC_FMT ")\n", | 327 | MAC_FMT ")\n", |
@@ -329,11 +329,14 @@ static void ieee80211_handle_erp_ie(struct net_device *dev, u8 erp_value) | |||
329 | use_protection ? "enabled" : "disabled", | 329 | use_protection ? "enabled" : "disabled", |
330 | MAC_ARG(ifsta->bssid)); | 330 | MAC_ARG(ifsta->bssid)); |
331 | } | 331 | } |
332 | sdata->use_protection = use_protection; | 332 | if (use_protection) |
333 | sdata->flags |= IEEE80211_SDATA_USE_PROTECTION; | ||
334 | else | ||
335 | sdata->flags &= ~IEEE80211_SDATA_USE_PROTECTION; | ||
333 | changes |= IEEE80211_ERP_CHANGE_PROTECTION; | 336 | changes |= IEEE80211_ERP_CHANGE_PROTECTION; |
334 | } | 337 | } |
335 | 338 | ||
336 | if (!preamble_mode != sdata->short_preamble) { | 339 | if (preamble_mode != !(sdata->flags & IEEE80211_SDATA_SHORT_PREAMBLE)) { |
337 | if (net_ratelimit()) { | 340 | if (net_ratelimit()) { |
338 | printk(KERN_DEBUG "%s: switched to %s barker preamble" | 341 | printk(KERN_DEBUG "%s: switched to %s barker preamble" |
339 | " (BSSID=" MAC_FMT ")\n", | 342 | " (BSSID=" MAC_FMT ")\n", |
@@ -342,7 +345,10 @@ static void ieee80211_handle_erp_ie(struct net_device *dev, u8 erp_value) | |||
342 | "short" : "long", | 345 | "short" : "long", |
343 | MAC_ARG(ifsta->bssid)); | 346 | MAC_ARG(ifsta->bssid)); |
344 | } | 347 | } |
345 | sdata->short_preamble = !preamble_mode; | 348 | if (preamble_mode) |
349 | sdata->flags &= ~IEEE80211_SDATA_SHORT_PREAMBLE; | ||
350 | else | ||
351 | sdata->flags |= IEEE80211_SDATA_SHORT_PREAMBLE; | ||
346 | changes |= IEEE80211_ERP_CHANGE_PREAMBLE; | 352 | changes |= IEEE80211_ERP_CHANGE_PREAMBLE; |
347 | } | 353 | } |
348 | 354 | ||
@@ -2307,8 +2313,9 @@ static int ieee80211_sta_join_ibss(struct net_device *dev, | |||
2307 | "for IBSS beacon\n", dev->name); | 2313 | "for IBSS beacon\n", dev->name); |
2308 | break; | 2314 | break; |
2309 | } | 2315 | } |
2310 | control.tx_rate = (sdata->short_preamble && | 2316 | control.tx_rate = |
2311 | (rate->flags & IEEE80211_RATE_PREAMBLE2)) ? | 2317 | ((sdata->flags & IEEE80211_SDATA_SHORT_PREAMBLE) && |
2318 | (rate->flags & IEEE80211_RATE_PREAMBLE2)) ? | ||
2312 | rate->val2 : rate->val; | 2319 | rate->val2 : rate->val; |
2313 | control.antenna_sel_tx = local->hw.conf.antenna_sel_tx; | 2320 | control.antenna_sel_tx = local->hw.conf.antenna_sel_tx; |
2314 | control.power_level = local->hw.conf.power_level; | 2321 | control.power_level = local->hw.conf.power_level; |