5 #include <linux/kernel.h>
6 #include <linux/string.h>
7 #include <linux/if_ether.h>
19 priv->
tx_tfm_mic = crypto_alloc_hash(
"michael_mic", 0, 0);
22 "crypto API michael_mic\n");
27 priv->
rx_tfm_mic = crypto_alloc_hash(
"michael_mic", 0, 0);
30 "crypto API michael_mic\n");
54 if (tfm_michael ==
NULL) {
63 hdr[ETH_ALEN * 2 + 1] = 0;
64 hdr[ETH_ALEN * 2 + 2] = 0;
65 hdr[ETH_ALEN * 2 + 3] = 0;
69 sg_set_buf(&sg[0], hdr,
sizeof(hdr));
70 sg_set_buf(&sg[1], data, data_len);
72 if (crypto_hash_setkey(tfm_michael, key,
MIC_KEYLEN))
75 desc.
tfm = tfm_michael;
77 return crypto_hash_digest(&desc, sg, data_len +
sizeof(hdr),