1 diff -urN madwifi.old/net80211/ieee80211_crypto_ccmp.c madwifi.dev/net80211/ieee80211_crypto_ccmp.c
2 --- madwifi.old/net80211/ieee80211_crypto_ccmp.c 2006-02-06 21:20:57.000000000 +0100
3 +++ madwifi.dev/net80211/ieee80211_crypto_ccmp.c 2006-06-12 22:29:23.000000000 +0200
7 ctx->cc_ic = vap->iv_ic;
8 - ctx->cc_tfm = crypto_alloc_tfm("aes", 0);
9 - if (ctx->cc_tfm == NULL) {
10 - FREE(ctx, M_DEVBUF);
11 - _MOD_DEC_USE(THIS_MODULE);
18 __func__, k->wk_keylen, 128 / NBBY);
21 - if (k->wk_flags & IEEE80211_KEY_SWCRYPT)
23 + if (k->wk_flags & IEEE80211_KEY_SWCRYPT) {
24 + if (ctx->cc_tfm == NULL)
25 + ctx->cc_tfm = crypto_alloc_tfm("aes", 0);
27 + if (ctx->cc_tfm == NULL) {
28 + IEEE80211_DPRINTF(ctx->cc_vap, IEEE80211_MSG_CRYPTO,
29 + "%s: Tried to add a software crypto key, but no software crypto available\n",
35 crypto_cipher_setkey(ctx->cc_tfm, k->wk_key, k->wk_keylen);