diff options
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index a11d2518c365..e8c6ba5ce70b 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -1650,7 +1650,12 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx) | |||
1650 | result = ieee80211_crypto_tkip_decrypt(rx); | 1650 | result = ieee80211_crypto_tkip_decrypt(rx); |
1651 | break; | 1651 | break; |
1652 | case WLAN_CIPHER_SUITE_CCMP: | 1652 | case WLAN_CIPHER_SUITE_CCMP: |
1653 | result = ieee80211_crypto_ccmp_decrypt(rx); | 1653 | result = ieee80211_crypto_ccmp_decrypt( |
1654 | rx, IEEE80211_CCMP_MIC_LEN); | ||
1655 | break; | ||
1656 | case WLAN_CIPHER_SUITE_CCMP_256: | ||
1657 | result = ieee80211_crypto_ccmp_decrypt( | ||
1658 | rx, IEEE80211_CCMP_256_MIC_LEN); | ||
1654 | break; | 1659 | break; |
1655 | case WLAN_CIPHER_SUITE_AES_CMAC: | 1660 | case WLAN_CIPHER_SUITE_AES_CMAC: |
1656 | result = ieee80211_crypto_aes_cmac_decrypt(rx); | 1661 | result = ieee80211_crypto_aes_cmac_decrypt(rx); |
@@ -1785,7 +1790,9 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx) | |||
1785 | /* This is the first fragment of a new frame. */ | 1790 | /* This is the first fragment of a new frame. */ |
1786 | entry = ieee80211_reassemble_add(rx->sdata, frag, seq, | 1791 | entry = ieee80211_reassemble_add(rx->sdata, frag, seq, |
1787 | rx->seqno_idx, &(rx->skb)); | 1792 | rx->seqno_idx, &(rx->skb)); |
1788 | if (rx->key && rx->key->conf.cipher == WLAN_CIPHER_SUITE_CCMP && | 1793 | if (rx->key && |
1794 | (rx->key->conf.cipher == WLAN_CIPHER_SUITE_CCMP || | ||
1795 | rx->key->conf.cipher == WLAN_CIPHER_SUITE_CCMP_256) && | ||
1789 | ieee80211_has_protected(fc)) { | 1796 | ieee80211_has_protected(fc)) { |
1790 | int queue = rx->security_idx; | 1797 | int queue = rx->security_idx; |
1791 | /* Store CCMP PN so that we can verify that the next | 1798 | /* Store CCMP PN so that we can verify that the next |
@@ -1814,7 +1821,9 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx) | |||
1814 | int i; | 1821 | int i; |
1815 | u8 pn[IEEE80211_CCMP_PN_LEN], *rpn; | 1822 | u8 pn[IEEE80211_CCMP_PN_LEN], *rpn; |
1816 | int queue; | 1823 | int queue; |
1817 | if (!rx->key || rx->key->conf.cipher != WLAN_CIPHER_SUITE_CCMP) | 1824 | if (!rx->key || |
1825 | (rx->key->conf.cipher != WLAN_CIPHER_SUITE_CCMP && | ||
1826 | rx->key->conf.cipher != WLAN_CIPHER_SUITE_CCMP_256)) | ||
1818 | return RX_DROP_UNUSABLE; | 1827 | return RX_DROP_UNUSABLE; |
1819 | memcpy(pn, entry->last_pn, IEEE80211_CCMP_PN_LEN); | 1828 | memcpy(pn, entry->last_pn, IEEE80211_CCMP_PN_LEN); |
1820 | for (i = IEEE80211_CCMP_PN_LEN - 1; i >= 0; i--) { | 1829 | for (i = IEEE80211_CCMP_PN_LEN - 1; i >= 0; i--) { |