add support for per-package prereq checks, run global prereq checks before (menu...
[openwrt.git] / package / madwifi / patches / 105-no_forced_aes_dep.patch
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
4 @@ -105,12 +105,6 @@
5
6 ctx->cc_vap = vap;
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);
12 - return NULL;
13 - }
14 return ctx;
15 }
16
17 @@ -137,8 +131,21 @@
18 __func__, k->wk_keylen, 128 / NBBY);
19 return 0;
20 }
21 - if (k->wk_flags & IEEE80211_KEY_SWCRYPT)
22 +
23 + if (k->wk_flags & IEEE80211_KEY_SWCRYPT) {
24 + if (ctx->cc_tfm == NULL)
25 + ctx->cc_tfm = crypto_alloc_tfm("aes", 0);
26 +
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",
30 + __func__);
31 +
32 + return 0;
33 + }
34 +
35 crypto_cipher_setkey(ctx->cc_tfm, k->wk_key, k->wk_keylen);
36 + }
37 return 1;
38 }
39
This page took 0.045276 seconds and 5 git commands to generate.