Lines Matching refs:mmie
826 struct ieee80211_mmie *mmie; in ieee80211_crypto_aes_cmac_encrypt() local
841 if (WARN_ON(skb_tailroom(skb) < sizeof(*mmie))) in ieee80211_crypto_aes_cmac_encrypt()
844 mmie = skb_put(skb, sizeof(*mmie)); in ieee80211_crypto_aes_cmac_encrypt()
845 mmie->element_id = WLAN_EID_MMIE; in ieee80211_crypto_aes_cmac_encrypt()
846 mmie->length = sizeof(*mmie) - 2; in ieee80211_crypto_aes_cmac_encrypt()
847 mmie->key_id = cpu_to_le16(key->conf.keyidx); in ieee80211_crypto_aes_cmac_encrypt()
852 bip_ipn_set64(mmie->sequence_number, pn64); in ieee80211_crypto_aes_cmac_encrypt()
863 skb->data + 24, skb->len - 24, mmie->mic); in ieee80211_crypto_aes_cmac_encrypt()
874 struct ieee80211_mmie_16 *mmie; in ieee80211_crypto_aes_cmac_256_encrypt() local
888 if (WARN_ON(skb_tailroom(skb) < sizeof(*mmie))) in ieee80211_crypto_aes_cmac_256_encrypt()
891 mmie = skb_put(skb, sizeof(*mmie)); in ieee80211_crypto_aes_cmac_256_encrypt()
892 mmie->element_id = WLAN_EID_MMIE; in ieee80211_crypto_aes_cmac_256_encrypt()
893 mmie->length = sizeof(*mmie) - 2; in ieee80211_crypto_aes_cmac_256_encrypt()
894 mmie->key_id = cpu_to_le16(key->conf.keyidx); in ieee80211_crypto_aes_cmac_256_encrypt()
899 bip_ipn_set64(mmie->sequence_number, pn64); in ieee80211_crypto_aes_cmac_256_encrypt()
906 skb->data + 24, skb->len - 24, mmie->mic); in ieee80211_crypto_aes_cmac_256_encrypt()
917 struct ieee80211_mmie *mmie; in ieee80211_crypto_aes_cmac_decrypt() local
926 if (skb->len < 24 + sizeof(*mmie)) in ieee80211_crypto_aes_cmac_decrypt()
929 mmie = (struct ieee80211_mmie *) in ieee80211_crypto_aes_cmac_decrypt()
930 (skb->data + skb->len - sizeof(*mmie)); in ieee80211_crypto_aes_cmac_decrypt()
931 if (mmie->element_id != WLAN_EID_MMIE || in ieee80211_crypto_aes_cmac_decrypt()
932 mmie->length != sizeof(*mmie) - 2) in ieee80211_crypto_aes_cmac_decrypt()
935 bip_ipn_swap(ipn, mmie->sequence_number); in ieee80211_crypto_aes_cmac_decrypt()
947 if (crypto_memneq(mic, mmie->mic, sizeof(mmie->mic))) { in ieee80211_crypto_aes_cmac_decrypt()
956 skb_trim(skb, skb->len - sizeof(*mmie)); in ieee80211_crypto_aes_cmac_decrypt()
967 struct ieee80211_mmie_16 *mmie; in ieee80211_crypto_aes_cmac_256_decrypt() local
976 if (skb->len < 24 + sizeof(*mmie)) in ieee80211_crypto_aes_cmac_256_decrypt()
979 mmie = (struct ieee80211_mmie_16 *) in ieee80211_crypto_aes_cmac_256_decrypt()
980 (skb->data + skb->len - sizeof(*mmie)); in ieee80211_crypto_aes_cmac_256_decrypt()
981 if (mmie->element_id != WLAN_EID_MMIE || in ieee80211_crypto_aes_cmac_256_decrypt()
982 mmie->length != sizeof(*mmie) - 2) in ieee80211_crypto_aes_cmac_256_decrypt()
985 bip_ipn_swap(ipn, mmie->sequence_number); in ieee80211_crypto_aes_cmac_256_decrypt()
997 if (crypto_memneq(mic, mmie->mic, sizeof(mmie->mic))) { in ieee80211_crypto_aes_cmac_256_decrypt()
1006 skb_trim(skb, skb->len - sizeof(*mmie)); in ieee80211_crypto_aes_cmac_256_decrypt()
1017 struct ieee80211_mmie_16 *mmie; in ieee80211_crypto_aes_gmac_encrypt() local
1033 if (WARN_ON(skb_tailroom(skb) < sizeof(*mmie))) in ieee80211_crypto_aes_gmac_encrypt()
1036 mmie = skb_put(skb, sizeof(*mmie)); in ieee80211_crypto_aes_gmac_encrypt()
1037 mmie->element_id = WLAN_EID_MMIE; in ieee80211_crypto_aes_gmac_encrypt()
1038 mmie->length = sizeof(*mmie) - 2; in ieee80211_crypto_aes_gmac_encrypt()
1039 mmie->key_id = cpu_to_le16(key->conf.keyidx); in ieee80211_crypto_aes_gmac_encrypt()
1044 bip_ipn_set64(mmie->sequence_number, pn64); in ieee80211_crypto_aes_gmac_encrypt()
1050 bip_ipn_swap(nonce + ETH_ALEN, mmie->sequence_number); in ieee80211_crypto_aes_gmac_encrypt()
1054 skb->data + 24, skb->len - 24, mmie->mic) < 0) in ieee80211_crypto_aes_gmac_encrypt()
1066 struct ieee80211_mmie_16 *mmie; in ieee80211_crypto_aes_gmac_decrypt() local
1075 if (skb->len < 24 + sizeof(*mmie)) in ieee80211_crypto_aes_gmac_decrypt()
1078 mmie = (struct ieee80211_mmie_16 *) in ieee80211_crypto_aes_gmac_decrypt()
1079 (skb->data + skb->len - sizeof(*mmie)); in ieee80211_crypto_aes_gmac_decrypt()
1080 if (mmie->element_id != WLAN_EID_MMIE || in ieee80211_crypto_aes_gmac_decrypt()
1081 mmie->length != sizeof(*mmie) - 2) in ieee80211_crypto_aes_gmac_decrypt()
1084 bip_ipn_swap(ipn, mmie->sequence_number); in ieee80211_crypto_aes_gmac_decrypt()
1104 crypto_memneq(mic, mmie->mic, sizeof(mmie->mic))) { in ieee80211_crypto_aes_gmac_decrypt()
1115 skb_trim(skb, skb->len - sizeof(*mmie)); in ieee80211_crypto_aes_gmac_decrypt()