diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-10-23 11:41:46 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-10-23 11:41:46 -0400 |
commit | 9b34f40c20111ba658f88e1669598db494be1fbc (patch) | |
tree | be98189b178ca63a44c09c8a5e92574a92932b51 /net/mac80211 | |
parent | 9917c85b06c2eb9d61c0f2dadd2d5d8788f7e563 (diff) | |
parent | 290eddc4b3661dc4dfa95d199e0be5788928b3b1 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts:
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
net/mac80211/mlme.c
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/iface.c | 2 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 34 | ||||
-rw-r--r-- | net/mac80211/sta_info.c | 4 | ||||
-rw-r--r-- | net/mac80211/util.c | 4 | ||||
-rw-r--r-- | net/mac80211/wpa.c | 14 |
5 files changed, 38 insertions, 20 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index c50cf6b9e28d..bc3e3e1db093 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -859,7 +859,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, | |||
859 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 859 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
860 | if (info->control.vif == &sdata->vif) { | 860 | if (info->control.vif == &sdata->vif) { |
861 | __skb_unlink(skb, &local->pending[i]); | 861 | __skb_unlink(skb, &local->pending[i]); |
862 | dev_kfree_skb_irq(skb); | 862 | ieee80211_free_txskb(&local->hw, skb); |
863 | } | 863 | } |
864 | } | 864 | } |
865 | } | 865 | } |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 469d86419bc6..861e1c40b1b9 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -3178,26 +3178,37 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata, | |||
3178 | ht_cfreq, ht_oper->primary_chan, | 3178 | ht_cfreq, ht_oper->primary_chan, |
3179 | cbss->channel->band); | 3179 | cbss->channel->band); |
3180 | ht_oper = NULL; | 3180 | ht_oper = NULL; |
3181 | } else { | ||
3182 | channel_type = NL80211_CHAN_HT20; | ||
3181 | } | 3183 | } |
3182 | } | 3184 | } |
3183 | 3185 | ||
3184 | if (ht_oper) { | 3186 | if (ht_oper && sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) { |
3187 | /* | ||
3188 | * cfg80211 already verified that the channel itself can | ||
3189 | * be used, but it didn't check that we can do the right | ||
3190 | * HT type, so do that here as well. If HT40 isn't allowed | ||
3191 | * on this channel, disable 40 MHz operation. | ||
3192 | */ | ||
3185 | const u8 *ht_cap_ie; | 3193 | const u8 *ht_cap_ie; |
3186 | const struct ieee80211_ht_cap *ht_cap; | 3194 | const struct ieee80211_ht_cap *ht_cap; |
3187 | u8 chains = 1; | 3195 | u8 chains = 1; |
3188 | 3196 | ||
3189 | channel_type = NL80211_CHAN_HT20; | 3197 | channel_type = NL80211_CHAN_HT20; |
3190 | 3198 | ||
3191 | if (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) { | 3199 | switch (ht_oper->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) { |
3192 | switch (ht_oper->ht_param & | 3200 | case IEEE80211_HT_PARAM_CHA_SEC_ABOVE: |
3193 | IEEE80211_HT_PARAM_CHA_SEC_OFFSET) { | 3201 | if (cbss->channel->flags & IEEE80211_CHAN_NO_HT40PLUS) |
3194 | case IEEE80211_HT_PARAM_CHA_SEC_ABOVE: | 3202 | ifmgd->flags |= IEEE80211_STA_DISABLE_40MHZ; |
3203 | else | ||
3195 | channel_type = NL80211_CHAN_HT40PLUS; | 3204 | channel_type = NL80211_CHAN_HT40PLUS; |
3196 | break; | 3205 | break; |
3197 | case IEEE80211_HT_PARAM_CHA_SEC_BELOW: | 3206 | case IEEE80211_HT_PARAM_CHA_SEC_BELOW: |
3207 | if (cbss->channel->flags & IEEE80211_CHAN_NO_HT40MINUS) | ||
3208 | ifmgd->flags |= IEEE80211_STA_DISABLE_40MHZ; | ||
3209 | else | ||
3198 | channel_type = NL80211_CHAN_HT40MINUS; | 3210 | channel_type = NL80211_CHAN_HT40MINUS; |
3199 | break; | 3211 | break; |
3200 | } | ||
3201 | } | 3212 | } |
3202 | 3213 | ||
3203 | ht_cap_ie = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, | 3214 | ht_cap_ie = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, |
@@ -3649,6 +3660,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | |||
3649 | { | 3660 | { |
3650 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | 3661 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
3651 | u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN]; | 3662 | u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN]; |
3663 | bool tx = !req->local_state_change; | ||
3652 | 3664 | ||
3653 | mutex_lock(&ifmgd->mtx); | 3665 | mutex_lock(&ifmgd->mtx); |
3654 | 3666 | ||
@@ -3665,12 +3677,12 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | |||
3665 | if (ifmgd->associated && | 3677 | if (ifmgd->associated && |
3666 | ether_addr_equal(ifmgd->associated->bssid, req->bssid)) { | 3678 | ether_addr_equal(ifmgd->associated->bssid, req->bssid)) { |
3667 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, | 3679 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, |
3668 | req->reason_code, true, frame_buf); | 3680 | req->reason_code, tx, frame_buf); |
3669 | } else { | 3681 | } else { |
3670 | drv_mgd_prepare_tx(sdata->local, sdata); | 3682 | drv_mgd_prepare_tx(sdata->local, sdata); |
3671 | ieee80211_send_deauth_disassoc(sdata, req->bssid, | 3683 | ieee80211_send_deauth_disassoc(sdata, req->bssid, |
3672 | IEEE80211_STYPE_DEAUTH, | 3684 | IEEE80211_STYPE_DEAUTH, |
3673 | req->reason_code, true, | 3685 | req->reason_code, tx, |
3674 | frame_buf); | 3686 | frame_buf); |
3675 | } | 3687 | } |
3676 | 3688 | ||
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index daf55e1e0fd3..f7bb54f9ab72 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -664,7 +664,7 @@ static bool sta_info_cleanup_expire_buffered_ac(struct ieee80211_local *local, | |||
664 | */ | 664 | */ |
665 | if (!skb) | 665 | if (!skb) |
666 | break; | 666 | break; |
667 | dev_kfree_skb(skb); | 667 | ieee80211_free_txskb(&local->hw, skb); |
668 | } | 668 | } |
669 | 669 | ||
670 | /* | 670 | /* |
@@ -693,7 +693,7 @@ static bool sta_info_cleanup_expire_buffered_ac(struct ieee80211_local *local, | |||
693 | local->total_ps_buffered--; | 693 | local->total_ps_buffered--; |
694 | ps_dbg(sta->sdata, "Buffered frame expired (STA %pM)\n", | 694 | ps_dbg(sta->sdata, "Buffered frame expired (STA %pM)\n", |
695 | sta->sta.addr); | 695 | sta->sta.addr); |
696 | dev_kfree_skb(skb); | 696 | ieee80211_free_txskb(&local->hw, skb); |
697 | } | 697 | } |
698 | 698 | ||
699 | /* | 699 | /* |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 51a4a2516233..60c8ad10deb1 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -406,7 +406,7 @@ void ieee80211_add_pending_skb(struct ieee80211_local *local, | |||
406 | int queue = info->hw_queue; | 406 | int queue = info->hw_queue; |
407 | 407 | ||
408 | if (WARN_ON(!info->control.vif)) { | 408 | if (WARN_ON(!info->control.vif)) { |
409 | kfree_skb(skb); | 409 | ieee80211_free_txskb(&local->hw, skb); |
410 | return; | 410 | return; |
411 | } | 411 | } |
412 | 412 | ||
@@ -431,7 +431,7 @@ void ieee80211_add_pending_skbs_fn(struct ieee80211_local *local, | |||
431 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 431 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
432 | 432 | ||
433 | if (WARN_ON(!info->control.vif)) { | 433 | if (WARN_ON(!info->control.vif)) { |
434 | kfree_skb(skb); | 434 | ieee80211_free_txskb(&local->hw, skb); |
435 | continue; | 435 | continue; |
436 | } | 436 | } |
437 | 437 | ||
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c index bdb53aba888e..8bd2f5c6a56e 100644 --- a/net/mac80211/wpa.c +++ b/net/mac80211/wpa.c | |||
@@ -106,7 +106,8 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx) | |||
106 | if (status->flag & RX_FLAG_MMIC_ERROR) | 106 | if (status->flag & RX_FLAG_MMIC_ERROR) |
107 | goto mic_fail; | 107 | goto mic_fail; |
108 | 108 | ||
109 | if (!(status->flag & RX_FLAG_IV_STRIPPED) && rx->key) | 109 | if (!(status->flag & RX_FLAG_IV_STRIPPED) && rx->key && |
110 | rx->key->conf.cipher == WLAN_CIPHER_SUITE_TKIP) | ||
110 | goto update_iv; | 111 | goto update_iv; |
111 | 112 | ||
112 | return RX_CONTINUE; | 113 | return RX_CONTINUE; |
@@ -545,14 +546,19 @@ ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx) | |||
545 | 546 | ||
546 | static void bip_aad(struct sk_buff *skb, u8 *aad) | 547 | static void bip_aad(struct sk_buff *skb, u8 *aad) |
547 | { | 548 | { |
549 | __le16 mask_fc; | ||
550 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; | ||
551 | |||
548 | /* BIP AAD: FC(masked) || A1 || A2 || A3 */ | 552 | /* BIP AAD: FC(masked) || A1 || A2 || A3 */ |
549 | 553 | ||
550 | /* FC type/subtype */ | 554 | /* FC type/subtype */ |
551 | aad[0] = skb->data[0]; | ||
552 | /* Mask FC Retry, PwrMgt, MoreData flags to zero */ | 555 | /* Mask FC Retry, PwrMgt, MoreData flags to zero */ |
553 | aad[1] = skb->data[1] & ~(BIT(4) | BIT(5) | BIT(6)); | 556 | mask_fc = hdr->frame_control; |
557 | mask_fc &= ~cpu_to_le16(IEEE80211_FCTL_RETRY | IEEE80211_FCTL_PM | | ||
558 | IEEE80211_FCTL_MOREDATA); | ||
559 | put_unaligned(mask_fc, (__le16 *) &aad[0]); | ||
554 | /* A1 || A2 || A3 */ | 560 | /* A1 || A2 || A3 */ |
555 | memcpy(aad + 2, skb->data + 4, 3 * ETH_ALEN); | 561 | memcpy(aad + 2, &hdr->addr1, 3 * ETH_ALEN); |
556 | } | 562 | } |
557 | 563 | ||
558 | 564 | ||