1 --- a/net80211/ieee80211_crypto_ccmp.c
2 +++ b/net80211/ieee80211_crypto_ccmp.c
3 @@ -115,6 +115,7 @@ ccmp_attach(struct ieee80211vap *vap, st
4 /* This function (crypto_alloc_foo might sleep. Therefore:
8 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
9 ctx->cc_tfm = crypto_alloc_tfm("aes", 0);
11 @@ -123,7 +124,8 @@ ccmp_attach(struct ieee80211vap *vap, st
12 if (IS_ERR(ctx->cc_tfm))
18 if (ctx->cc_tfm == NULL) {
19 IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO,
20 "%s: unable to load kernel AES crypto support\n",
21 @@ -138,12 +140,14 @@ ccmp_detach(struct ieee80211_key *k)
23 struct ccmp_ctx *ctx = k->wk_private;
26 if (ctx->cc_tfm != NULL)
27 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
28 crypto_free_tfm(ctx->cc_tfm);
30 crypto_free_cipher(ctx->cc_tfm);
35 _MOD_DEC_USE(THIS_MODULE);
36 @@ -169,7 +173,9 @@ ccmp_setkey(struct ieee80211_key *k)
41 crypto_cipher_setkey(ctx->cc_tfm, k->wk_key, k->wk_keylen);
46 @@ -324,6 +330,7 @@ xor_block(u8 *b, const u8 *a, size_t len
48 rijndael_encrypt(struct crypto_cipher *tfm, const void *src, void *dst)
51 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
52 crypto_cipher_encrypt_one(tfm, dst, src);
54 @@ -339,6 +346,7 @@ rijndael_encrypt(struct crypto_cipher *t
55 sg_dst.length = AES_BLOCK_LEN;
56 crypto_cipher_encrypt(tfm, &sg_dst, &sg_src, AES_BLOCK_LEN);
62 @@ -475,6 +483,9 @@ ccmp_encrypt(struct ieee80211_key *key,
66 + if (ctx->cc_tfm == NULL)
69 ctx->cc_vap->iv_stats.is_crypto_ccmp++;
72 @@ -589,6 +600,9 @@ ccmp_decrypt(struct ieee80211_key *key,
76 + if (ctx->cc_tfm == NULL)
79 ctx->cc_vap->iv_stats.is_crypto_ccmp++;
84 @@ -192,11 +192,4 @@ endif
88 - @# check crypto support is enabled
89 - @if [ -z "$(CONFIG_CRYPTO)" ]; then \
91 - echo "Please enable crypto API."; \