Lines Matching refs:mmie
949 struct ieee80211_mmie *mmie; in ieee80211_crypto_aes_cmac_encrypt() local
964 if (WARN_ON(skb_tailroom(skb) < sizeof(*mmie))) in ieee80211_crypto_aes_cmac_encrypt()
967 mmie = skb_put(skb, sizeof(*mmie)); in ieee80211_crypto_aes_cmac_encrypt()
968 mmie->element_id = WLAN_EID_MMIE; in ieee80211_crypto_aes_cmac_encrypt()
969 mmie->length = sizeof(*mmie) - 2; in ieee80211_crypto_aes_cmac_encrypt()
970 mmie->key_id = cpu_to_le16(key->conf.keyidx); in ieee80211_crypto_aes_cmac_encrypt()
975 bip_ipn_set64(mmie->sequence_number, pn64); in ieee80211_crypto_aes_cmac_encrypt()
986 skb->data + 24, skb->len - 24, mmie->mic); in ieee80211_crypto_aes_cmac_encrypt()
997 struct ieee80211_mmie_16 *mmie; in ieee80211_crypto_aes_cmac_256_encrypt() local
1011 if (WARN_ON(skb_tailroom(skb) < sizeof(*mmie))) in ieee80211_crypto_aes_cmac_256_encrypt()
1014 mmie = skb_put(skb, sizeof(*mmie)); in ieee80211_crypto_aes_cmac_256_encrypt()
1015 mmie->element_id = WLAN_EID_MMIE; in ieee80211_crypto_aes_cmac_256_encrypt()
1016 mmie->length = sizeof(*mmie) - 2; in ieee80211_crypto_aes_cmac_256_encrypt()
1017 mmie->key_id = cpu_to_le16(key->conf.keyidx); in ieee80211_crypto_aes_cmac_256_encrypt()
1022 bip_ipn_set64(mmie->sequence_number, pn64); in ieee80211_crypto_aes_cmac_256_encrypt()
1029 skb->data + 24, skb->len - 24, mmie->mic); in ieee80211_crypto_aes_cmac_256_encrypt()
1040 struct ieee80211_mmie *mmie; in ieee80211_crypto_aes_cmac_decrypt() local
1049 if (skb->len < 24 + sizeof(*mmie)) in ieee80211_crypto_aes_cmac_decrypt()
1052 mmie = (struct ieee80211_mmie *) in ieee80211_crypto_aes_cmac_decrypt()
1053 (skb->data + skb->len - sizeof(*mmie)); in ieee80211_crypto_aes_cmac_decrypt()
1054 if (mmie->element_id != WLAN_EID_MMIE || in ieee80211_crypto_aes_cmac_decrypt()
1055 mmie->length != sizeof(*mmie) - 2) in ieee80211_crypto_aes_cmac_decrypt()
1058 bip_ipn_swap(ipn, mmie->sequence_number); in ieee80211_crypto_aes_cmac_decrypt()
1070 if (crypto_memneq(mic, mmie->mic, sizeof(mmie->mic))) { in ieee80211_crypto_aes_cmac_decrypt()
1079 skb_trim(skb, skb->len - sizeof(*mmie)); in ieee80211_crypto_aes_cmac_decrypt()
1090 struct ieee80211_mmie_16 *mmie; in ieee80211_crypto_aes_cmac_256_decrypt() local
1099 if (skb->len < 24 + sizeof(*mmie)) in ieee80211_crypto_aes_cmac_256_decrypt()
1102 mmie = (struct ieee80211_mmie_16 *) in ieee80211_crypto_aes_cmac_256_decrypt()
1103 (skb->data + skb->len - sizeof(*mmie)); in ieee80211_crypto_aes_cmac_256_decrypt()
1104 if (mmie->element_id != WLAN_EID_MMIE || in ieee80211_crypto_aes_cmac_256_decrypt()
1105 mmie->length != sizeof(*mmie) - 2) in ieee80211_crypto_aes_cmac_256_decrypt()
1108 bip_ipn_swap(ipn, mmie->sequence_number); in ieee80211_crypto_aes_cmac_256_decrypt()
1120 if (crypto_memneq(mic, mmie->mic, sizeof(mmie->mic))) { in ieee80211_crypto_aes_cmac_256_decrypt()
1129 skb_trim(skb, skb->len - sizeof(*mmie)); in ieee80211_crypto_aes_cmac_256_decrypt()
1140 struct ieee80211_mmie_16 *mmie; in ieee80211_crypto_aes_gmac_encrypt() local
1156 if (WARN_ON(skb_tailroom(skb) < sizeof(*mmie))) in ieee80211_crypto_aes_gmac_encrypt()
1159 mmie = skb_put(skb, sizeof(*mmie)); in ieee80211_crypto_aes_gmac_encrypt()
1160 mmie->element_id = WLAN_EID_MMIE; in ieee80211_crypto_aes_gmac_encrypt()
1161 mmie->length = sizeof(*mmie) - 2; in ieee80211_crypto_aes_gmac_encrypt()
1162 mmie->key_id = cpu_to_le16(key->conf.keyidx); in ieee80211_crypto_aes_gmac_encrypt()
1167 bip_ipn_set64(mmie->sequence_number, pn64); in ieee80211_crypto_aes_gmac_encrypt()
1173 bip_ipn_swap(nonce + ETH_ALEN, mmie->sequence_number); in ieee80211_crypto_aes_gmac_encrypt()
1177 skb->data + 24, skb->len - 24, mmie->mic) < 0) in ieee80211_crypto_aes_gmac_encrypt()
1189 struct ieee80211_mmie_16 *mmie; in ieee80211_crypto_aes_gmac_decrypt() local
1198 if (skb->len < 24 + sizeof(*mmie)) in ieee80211_crypto_aes_gmac_decrypt()
1201 mmie = (struct ieee80211_mmie_16 *) in ieee80211_crypto_aes_gmac_decrypt()
1202 (skb->data + skb->len - sizeof(*mmie)); in ieee80211_crypto_aes_gmac_decrypt()
1203 if (mmie->element_id != WLAN_EID_MMIE || in ieee80211_crypto_aes_gmac_decrypt()
1204 mmie->length != sizeof(*mmie) - 2) in ieee80211_crypto_aes_gmac_decrypt()
1207 bip_ipn_swap(ipn, mmie->sequence_number); in ieee80211_crypto_aes_gmac_decrypt()
1227 crypto_memneq(mic, mmie->mic, sizeof(mmie->mic))) { in ieee80211_crypto_aes_gmac_decrypt()
1238 skb_trim(skb, skb->len - sizeof(*mmie)); in ieee80211_crypto_aes_gmac_decrypt()