diff options
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index a5e5c31c23ab..de09f58d9683 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -306,28 +306,24 @@ static void ieee80211_sta_wmm_params(struct net_device *dev, | |||
306 | switch (aci) { | 306 | switch (aci) { |
307 | case 1: | 307 | case 1: |
308 | queue = IEEE80211_TX_QUEUE_DATA3; | 308 | queue = IEEE80211_TX_QUEUE_DATA3; |
309 | if (acm) { | 309 | if (acm) |
310 | local->wmm_acm |= BIT(0) | BIT(3); | 310 | local->wmm_acm |= BIT(0) | BIT(3); |
311 | } | ||
312 | break; | 311 | break; |
313 | case 2: | 312 | case 2: |
314 | queue = IEEE80211_TX_QUEUE_DATA1; | 313 | queue = IEEE80211_TX_QUEUE_DATA1; |
315 | if (acm) { | 314 | if (acm) |
316 | local->wmm_acm |= BIT(4) | BIT(5); | 315 | local->wmm_acm |= BIT(4) | BIT(5); |
317 | } | ||
318 | break; | 316 | break; |
319 | case 3: | 317 | case 3: |
320 | queue = IEEE80211_TX_QUEUE_DATA0; | 318 | queue = IEEE80211_TX_QUEUE_DATA0; |
321 | if (acm) { | 319 | if (acm) |
322 | local->wmm_acm |= BIT(6) | BIT(7); | 320 | local->wmm_acm |= BIT(6) | BIT(7); |
323 | } | ||
324 | break; | 321 | break; |
325 | case 0: | 322 | case 0: |
326 | default: | 323 | default: |
327 | queue = IEEE80211_TX_QUEUE_DATA2; | 324 | queue = IEEE80211_TX_QUEUE_DATA2; |
328 | if (acm) { | 325 | if (acm) |
329 | local->wmm_acm |= BIT(1) | BIT(2); | 326 | local->wmm_acm |= BIT(1) | BIT(2); |
330 | } | ||
331 | break; | 327 | break; |
332 | } | 328 | } |
333 | 329 | ||
@@ -706,9 +702,8 @@ static void ieee80211_send_assoc(struct net_device *dev, | |||
706 | if (bss) { | 702 | if (bss) { |
707 | if (bss->capability & WLAN_CAPABILITY_PRIVACY) | 703 | if (bss->capability & WLAN_CAPABILITY_PRIVACY) |
708 | capab |= WLAN_CAPABILITY_PRIVACY; | 704 | capab |= WLAN_CAPABILITY_PRIVACY; |
709 | if (bss->wmm_ie) { | 705 | if (bss->wmm_ie) |
710 | wmm = 1; | 706 | wmm = 1; |
711 | } | ||
712 | ieee80211_rx_bss_put(dev, bss); | 707 | ieee80211_rx_bss_put(dev, bss); |
713 | } | 708 | } |
714 | 709 | ||
@@ -1805,9 +1800,8 @@ static void ieee80211_rx_mgmt_deauth(struct net_device *dev, | |||
1805 | " (reason=%d)\n", | 1800 | " (reason=%d)\n", |
1806 | dev->name, print_mac(mac, mgmt->sa), reason_code); | 1801 | dev->name, print_mac(mac, mgmt->sa), reason_code); |
1807 | 1802 | ||
1808 | if (ifsta->flags & IEEE80211_STA_AUTHENTICATED) { | 1803 | if (ifsta->flags & IEEE80211_STA_AUTHENTICATED) |
1809 | printk(KERN_DEBUG "%s: deauthenticated\n", dev->name); | 1804 | printk(KERN_DEBUG "%s: deauthenticated\n", dev->name); |
1810 | } | ||
1811 | 1805 | ||
1812 | if (ifsta->state == IEEE80211_AUTHENTICATE || | 1806 | if (ifsta->state == IEEE80211_AUTHENTICATE || |
1813 | ifsta->state == IEEE80211_ASSOCIATE || | 1807 | ifsta->state == IEEE80211_ASSOCIATE || |
@@ -3517,10 +3511,12 @@ static int ieee80211_sta_create_ibss(struct net_device *dev, | |||
3517 | bss->beacon_int = local->hw.conf.beacon_int; | 3511 | bss->beacon_int = local->hw.conf.beacon_int; |
3518 | bss->last_update = jiffies; | 3512 | bss->last_update = jiffies; |
3519 | bss->capability = WLAN_CAPABILITY_IBSS; | 3513 | bss->capability = WLAN_CAPABILITY_IBSS; |
3520 | if (sdata->default_key) { | 3514 | |
3515 | if (sdata->default_key) | ||
3521 | bss->capability |= WLAN_CAPABILITY_PRIVACY; | 3516 | bss->capability |= WLAN_CAPABILITY_PRIVACY; |
3522 | } else | 3517 | else |
3523 | sdata->drop_unencrypted = 0; | 3518 | sdata->drop_unencrypted = 0; |
3519 | |||
3524 | bss->supp_rates_len = sband->n_bitrates; | 3520 | bss->supp_rates_len = sband->n_bitrates; |
3525 | pos = bss->supp_rates; | 3521 | pos = bss->supp_rates; |
3526 | for (i = 0; i < sband->n_bitrates; i++) { | 3522 | for (i = 0; i < sband->n_bitrates; i++) { |
@@ -4203,6 +4199,7 @@ int ieee80211_sta_set_extra_ie(struct net_device *dev, char *ie, size_t len) | |||
4203 | { | 4199 | { |
4204 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 4200 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
4205 | struct ieee80211_if_sta *ifsta = &sdata->u.sta; | 4201 | struct ieee80211_if_sta *ifsta = &sdata->u.sta; |
4202 | |||
4206 | kfree(ifsta->extra_ie); | 4203 | kfree(ifsta->extra_ie); |
4207 | if (len == 0) { | 4204 | if (len == 0) { |
4208 | ifsta->extra_ie = NULL; | 4205 | ifsta->extra_ie = NULL; |
@@ -4220,9 +4217,9 @@ int ieee80211_sta_set_extra_ie(struct net_device *dev, char *ie, size_t len) | |||
4220 | } | 4217 | } |
4221 | 4218 | ||
4222 | 4219 | ||
4223 | struct sta_info * ieee80211_ibss_add_sta(struct net_device *dev, | 4220 | struct sta_info *ieee80211_ibss_add_sta(struct net_device *dev, |
4224 | struct sk_buff *skb, u8 *bssid, | 4221 | struct sk_buff *skb, u8 *bssid, |
4225 | u8 *addr) | 4222 | u8 *addr) |
4226 | { | 4223 | { |
4227 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 4224 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
4228 | struct sta_info *sta; | 4225 | struct sta_info *sta; |