diff options
Diffstat (limited to 'net/mac80211/ieee80211_sta.c')
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 8e6548974a9f..0f5f8131bd71 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -318,6 +318,7 @@ static void ieee80211_handle_erp_ie(struct net_device *dev, u8 erp_value) | |||
318 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 318 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
319 | struct ieee80211_if_sta *ifsta = &sdata->u.sta; | 319 | struct ieee80211_if_sta *ifsta = &sdata->u.sta; |
320 | int use_protection = (erp_value & WLAN_ERP_USE_PROTECTION) != 0; | 320 | int use_protection = (erp_value & WLAN_ERP_USE_PROTECTION) != 0; |
321 | int preamble_mode = (erp_value & WLAN_ERP_BARKER_PREAMBLE) != 0; | ||
321 | 322 | ||
322 | if (use_protection != sdata->use_protection) { | 323 | if (use_protection != sdata->use_protection) { |
323 | if (net_ratelimit()) { | 324 | if (net_ratelimit()) { |
@@ -329,6 +330,18 @@ static void ieee80211_handle_erp_ie(struct net_device *dev, u8 erp_value) | |||
329 | } | 330 | } |
330 | sdata->use_protection = use_protection; | 331 | sdata->use_protection = use_protection; |
331 | } | 332 | } |
333 | |||
334 | if (!preamble_mode != sdata->short_preamble) { | ||
335 | if (net_ratelimit()) { | ||
336 | printk(KERN_DEBUG "%s: switched to %s barker preamble" | ||
337 | " (BSSID=" MAC_FMT ")\n", | ||
338 | dev->name, | ||
339 | (preamble_mode == WLAN_ERP_PREAMBLE_SHORT) ? | ||
340 | "short" : "long", | ||
341 | MAC_ARG(ifsta->bssid)); | ||
342 | } | ||
343 | sdata->short_preamble = !preamble_mode; | ||
344 | } | ||
332 | } | 345 | } |
333 | 346 | ||
334 | 347 | ||
@@ -415,6 +428,7 @@ static void ieee80211_set_associated(struct net_device *dev, | |||
415 | ieee80211_sta_send_associnfo(dev, ifsta); | 428 | ieee80211_sta_send_associnfo(dev, ifsta); |
416 | } else { | 429 | } else { |
417 | netif_carrier_off(dev); | 430 | netif_carrier_off(dev); |
431 | sdata->short_preamble = 0; | ||
418 | sdata->use_protection = 0; | 432 | sdata->use_protection = 0; |
419 | memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); | 433 | memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); |
420 | } | 434 | } |
@@ -2281,7 +2295,7 @@ static int ieee80211_sta_join_ibss(struct net_device *dev, | |||
2281 | "for IBSS beacon\n", dev->name); | 2295 | "for IBSS beacon\n", dev->name); |
2282 | break; | 2296 | break; |
2283 | } | 2297 | } |
2284 | control.tx_rate = (local->short_preamble && | 2298 | control.tx_rate = (sdata->short_preamble && |
2285 | (rate->flags & IEEE80211_RATE_PREAMBLE2)) ? | 2299 | (rate->flags & IEEE80211_RATE_PREAMBLE2)) ? |
2286 | rate->val2 : rate->val; | 2300 | rate->val2 : rate->val; |
2287 | control.antenna_sel_tx = local->hw.conf.antenna_sel_tx; | 2301 | control.antenna_sel_tx = local->hw.conf.antenna_sel_tx; |