aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2008-04-15 14:09:27 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-16 11:42:59 -0400
commit50c4afb99166dc0d2e8a0b063fe83befaa426a44 (patch)
tree8aa6e7ba463bfd286e683b8b5ea0980d46c9953a
parentdd9e0dda66ba38a2ddd1405ac279894260dc5c36 (diff)
mlme.c: fixup some merge damage
This one got renamed, complicating the merge a bit...this should restore it to its intended state. Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/mlme.c43
1 files changed, 35 insertions, 8 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index bdaab1391d4e..83e8b497e6db 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -350,14 +350,12 @@ static void ieee80211_sta_wmm_params(struct net_device *dev,
350 } 350 }
351} 351}
352 352
353 353static u32 ieee80211_handle_protect_preamb(struct ieee80211_sub_if_data *sdata,
354static u32 ieee80211_handle_erp_ie(struct ieee80211_sub_if_data *sdata, 354 bool use_protection,
355 u8 erp_value) 355 bool use_short_preamble)
356{ 356{
357 struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf; 357 struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf;
358 struct ieee80211_if_sta *ifsta = &sdata->u.sta; 358 struct ieee80211_if_sta *ifsta = &sdata->u.sta;
359 bool use_protection = (erp_value & WLAN_ERP_USE_PROTECTION) != 0;
360 bool use_short_preamble = (erp_value & WLAN_ERP_BARKER_PREAMBLE) == 0;
361 DECLARE_MAC_BUF(mac); 359 DECLARE_MAC_BUF(mac);
362 u32 changed = 0; 360 u32 changed = 0;
363 361
@@ -388,6 +386,32 @@ static u32 ieee80211_handle_erp_ie(struct ieee80211_sub_if_data *sdata,
388 return changed; 386 return changed;
389} 387}
390 388
389static u32 ieee80211_handle_erp_ie(struct ieee80211_sub_if_data *sdata,
390 u8 erp_value)
391{
392 bool use_protection = (erp_value & WLAN_ERP_USE_PROTECTION) != 0;
393 bool use_short_preamble = (erp_value & WLAN_ERP_BARKER_PREAMBLE) == 0;
394
395 return ieee80211_handle_protect_preamb(sdata,
396 use_protection, use_short_preamble);
397}
398
399static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata,
400 struct ieee80211_sta_bss *bss)
401{
402 u32 changed = 0;
403
404 if (bss->has_erp_value)
405 changed |= ieee80211_handle_erp_ie(sdata, bss->erp_value);
406 else {
407 u16 capab = bss->capability;
408 changed |= ieee80211_handle_protect_preamb(sdata, false,
409 (capab & WLAN_CAPABILITY_SHORT_PREAMBLE) != 0);
410 }
411
412 return changed;
413}
414
391int ieee80211_ht_cap_ie_to_ht_info(struct ieee80211_ht_cap *ht_cap_ie, 415int ieee80211_ht_cap_ie_to_ht_info(struct ieee80211_ht_cap *ht_cap_ie,
392 struct ieee80211_ht_info *ht_info) 416 struct ieee80211_ht_info *ht_info)
393{ 417{
@@ -511,9 +535,7 @@ static void ieee80211_set_associated(struct net_device *dev,
511 sdata->bss_conf.beacon_int = bss->beacon_int; 535 sdata->bss_conf.beacon_int = bss->beacon_int;
512 sdata->bss_conf.timestamp = bss->timestamp; 536 sdata->bss_conf.timestamp = bss->timestamp;
513 537
514 if (bss->has_erp_value) 538 changed |= ieee80211_handle_bss_capability(sdata, bss);
515 changed |= ieee80211_handle_erp_ie(
516 sdata, bss->erp_value);
517 539
518 ieee80211_rx_bss_put(dev, bss); 540 ieee80211_rx_bss_put(dev, bss);
519 } 541 }
@@ -2777,6 +2799,11 @@ static void ieee80211_rx_mgmt_beacon(struct net_device *dev,
2777 2799
2778 if (elems.erp_info && elems.erp_info_len >= 1) 2800 if (elems.erp_info && elems.erp_info_len >= 1)
2779 changed |= ieee80211_handle_erp_ie(sdata, elems.erp_info[0]); 2801 changed |= ieee80211_handle_erp_ie(sdata, elems.erp_info[0]);
2802 else {
2803 u16 capab = le16_to_cpu(mgmt->u.beacon.capab_info);
2804 changed |= ieee80211_handle_protect_preamb(sdata, false,
2805 (capab & WLAN_CAPABILITY_SHORT_PREAMBLE) != 0);
2806 }
2780 2807
2781 if (elems.ht_cap_elem && elems.ht_info_elem && 2808 if (elems.ht_cap_elem && elems.ht_info_elem &&
2782 elems.wmm_param && conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) { 2809 elems.wmm_param && conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) {