Commit 50c4afb9 authored by John W. Linville's avatar John W. Linville

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: default avatarJohn W. Linville <linville@tuxdriver.com>
parent dd9e0dda
...@@ -350,14 +350,12 @@ static void ieee80211_sta_wmm_params(struct net_device *dev, ...@@ -350,14 +350,12 @@ static void ieee80211_sta_wmm_params(struct net_device *dev,
} }
} }
static u32 ieee80211_handle_protect_preamb(struct ieee80211_sub_if_data *sdata,
static u32 ieee80211_handle_erp_ie(struct ieee80211_sub_if_data *sdata, bool use_protection,
u8 erp_value) bool use_short_preamble)
{ {
struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf; struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf;
struct ieee80211_if_sta *ifsta = &sdata->u.sta; struct ieee80211_if_sta *ifsta = &sdata->u.sta;
bool use_protection = (erp_value & WLAN_ERP_USE_PROTECTION) != 0;
bool use_short_preamble = (erp_value & WLAN_ERP_BARKER_PREAMBLE) == 0;
DECLARE_MAC_BUF(mac); DECLARE_MAC_BUF(mac);
u32 changed = 0; u32 changed = 0;
...@@ -388,6 +386,32 @@ static u32 ieee80211_handle_erp_ie(struct ieee80211_sub_if_data *sdata, ...@@ -388,6 +386,32 @@ static u32 ieee80211_handle_erp_ie(struct ieee80211_sub_if_data *sdata,
return changed; return changed;
} }
static u32 ieee80211_handle_erp_ie(struct ieee80211_sub_if_data *sdata,
u8 erp_value)
{
bool use_protection = (erp_value & WLAN_ERP_USE_PROTECTION) != 0;
bool use_short_preamble = (erp_value & WLAN_ERP_BARKER_PREAMBLE) == 0;
return ieee80211_handle_protect_preamb(sdata,
use_protection, use_short_preamble);
}
static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata,
struct ieee80211_sta_bss *bss)
{
u32 changed = 0;
if (bss->has_erp_value)
changed |= ieee80211_handle_erp_ie(sdata, bss->erp_value);
else {
u16 capab = bss->capability;
changed |= ieee80211_handle_protect_preamb(sdata, false,
(capab & WLAN_CAPABILITY_SHORT_PREAMBLE) != 0);
}
return changed;
}
int ieee80211_ht_cap_ie_to_ht_info(struct ieee80211_ht_cap *ht_cap_ie, int ieee80211_ht_cap_ie_to_ht_info(struct ieee80211_ht_cap *ht_cap_ie,
struct ieee80211_ht_info *ht_info) struct ieee80211_ht_info *ht_info)
{ {
...@@ -511,9 +535,7 @@ static void ieee80211_set_associated(struct net_device *dev, ...@@ -511,9 +535,7 @@ static void ieee80211_set_associated(struct net_device *dev,
sdata->bss_conf.beacon_int = bss->beacon_int; sdata->bss_conf.beacon_int = bss->beacon_int;
sdata->bss_conf.timestamp = bss->timestamp; sdata->bss_conf.timestamp = bss->timestamp;
if (bss->has_erp_value) changed |= ieee80211_handle_bss_capability(sdata, bss);
changed |= ieee80211_handle_erp_ie(
sdata, bss->erp_value);
ieee80211_rx_bss_put(dev, bss); ieee80211_rx_bss_put(dev, bss);
} }
...@@ -2777,6 +2799,11 @@ static void ieee80211_rx_mgmt_beacon(struct net_device *dev, ...@@ -2777,6 +2799,11 @@ static void ieee80211_rx_mgmt_beacon(struct net_device *dev,
if (elems.erp_info && elems.erp_info_len >= 1) if (elems.erp_info && elems.erp_info_len >= 1)
changed |= ieee80211_handle_erp_ie(sdata, elems.erp_info[0]); changed |= ieee80211_handle_erp_ie(sdata, elems.erp_info[0]);
else {
u16 capab = le16_to_cpu(mgmt->u.beacon.capab_info);
changed |= ieee80211_handle_protect_preamb(sdata, false,
(capab & WLAN_CAPABILITY_SHORT_PREAMBLE) != 0);
}
if (elems.ht_cap_elem && elems.ht_info_elem && if (elems.ht_cap_elem && elems.ht_info_elem &&
elems.wmm_param && conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) { elems.wmm_param && conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment