aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_sta.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/ieee80211_sta.c')
-rw-r--r--net/mac80211/ieee80211_sta.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index df6c410de161..ba2bf8f0a347 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -316,12 +316,11 @@ static void ieee80211_sta_wmm_params(struct net_device *dev,
316 316
317static void ieee80211_handle_erp_ie(struct net_device *dev, u8 erp_value) 317static void ieee80211_handle_erp_ie(struct net_device *dev, u8 erp_value)
318{ 318{
319 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
320 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 319 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
321 struct ieee80211_if_sta *ifsta = &sdata->u.sta; 320 struct ieee80211_if_sta *ifsta = &sdata->u.sta;
322 int use_protection = (erp_value & WLAN_ERP_USE_PROTECTION) != 0; 321 int use_protection = (erp_value & WLAN_ERP_USE_PROTECTION) != 0;
323 322
324 if (use_protection != !!ifsta->use_protection) { 323 if (use_protection != sdata->use_protection) {
325 if (net_ratelimit()) { 324 if (net_ratelimit()) {
326 printk(KERN_DEBUG "%s: CTS protection %s (BSSID=" 325 printk(KERN_DEBUG "%s: CTS protection %s (BSSID="
327 MAC_FMT ")\n", 326 MAC_FMT ")\n",
@@ -329,8 +328,7 @@ static void ieee80211_handle_erp_ie(struct net_device *dev, u8 erp_value)
329 use_protection ? "enabled" : "disabled", 328 use_protection ? "enabled" : "disabled",
330 MAC_ARG(ifsta->bssid)); 329 MAC_ARG(ifsta->bssid));
331 } 330 }
332 ifsta->use_protection = use_protection ? 1 : 0; 331 sdata->use_protection = use_protection;
333 local->cts_protect_erp_frames = use_protection;
334 } 332 }
335} 333}
336 334
@@ -390,6 +388,7 @@ static void ieee80211_set_associated(struct net_device *dev,
390 struct ieee80211_if_sta *ifsta, int assoc) 388 struct ieee80211_if_sta *ifsta, int assoc)
391{ 389{
392 union iwreq_data wrqu; 390 union iwreq_data wrqu;
391 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
393 392
394 if (ifsta->associated == assoc) 393 if (ifsta->associated == assoc)
395 return; 394 return;
@@ -417,6 +416,7 @@ static void ieee80211_set_associated(struct net_device *dev,
417 ieee80211_sta_send_associnfo(dev, ifsta); 416 ieee80211_sta_send_associnfo(dev, ifsta);
418 } else { 417 } else {
419 netif_carrier_off(dev); 418 netif_carrier_off(dev);
419 sdata->use_protection = 0;
420 memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); 420 memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
421 } 421 }
422 wrqu.ap_addr.sa_family = ARPHRD_ETHER; 422 wrqu.ap_addr.sa_family = ARPHRD_ETHER;