diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-06-12 20:42:11 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-06-12 20:42:11 +0000 |
commit | 3a918c6b24e2a9f8fb2877af90b376fcad6ec871 (patch) | |
tree | 2f55f0d34c1a0f7058e6675f91864ff4f3a2fd4b /package/madwifi/patches/105-no_forced_aes_dep.patch | |
parent | 7962f7ca093b9e8e7fdfe3a931ec62a19b10d0b4 (diff) | |
download | master-187ad058-3a918c6b24e2a9f8fb2877af90b376fcad6ec871.tar.gz master-187ad058-3a918c6b24e2a9f8fb2877af90b376fcad6ec871.tar.bz2 master-187ad058-3a918c6b24e2a9f8fb2877af90b376fcad6ec871.zip |
madwifi: remove the hard dependency on kernel aes support - only needed for software crypto
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3934 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/madwifi/patches/105-no_forced_aes_dep.patch')
-rw-r--r-- | package/madwifi/patches/105-no_forced_aes_dep.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/package/madwifi/patches/105-no_forced_aes_dep.patch b/package/madwifi/patches/105-no_forced_aes_dep.patch new file mode 100644 index 0000000000..fa439c6e96 --- /dev/null +++ b/package/madwifi/patches/105-no_forced_aes_dep.patch @@ -0,0 +1,39 @@ +diff -urN madwifi.old/net80211/ieee80211_crypto_ccmp.c madwifi.dev/net80211/ieee80211_crypto_ccmp.c +--- madwifi.old/net80211/ieee80211_crypto_ccmp.c 2006-02-06 21:20:57.000000000 +0100 ++++ madwifi.dev/net80211/ieee80211_crypto_ccmp.c 2006-06-12 22:29:23.000000000 +0200 +@@ -105,12 +105,6 @@ + + ctx->cc_vap = vap; + ctx->cc_ic = vap->iv_ic; +- ctx->cc_tfm = crypto_alloc_tfm("aes", 0); +- if (ctx->cc_tfm == NULL) { +- FREE(ctx, M_DEVBUF); +- _MOD_DEC_USE(THIS_MODULE); +- return NULL; +- } + return ctx; + } + +@@ -137,8 +131,21 @@ + __func__, k->wk_keylen, 128 / NBBY); + return 0; + } +- if (k->wk_flags & IEEE80211_KEY_SWCRYPT) ++ ++ if (k->wk_flags & IEEE80211_KEY_SWCRYPT) { ++ if (ctx->cc_tfm == NULL) ++ ctx->cc_tfm = crypto_alloc_tfm("aes", 0); ++ ++ if (ctx->cc_tfm == NULL) { ++ IEEE80211_DPRINTF(ctx->cc_vap, IEEE80211_MSG_CRYPTO, ++ "%s: Tried to add a software crypto key, but no software crypto available\n", ++ __func__); ++ ++ return 0; ++ } ++ + crypto_cipher_setkey(ctx->cc_tfm, k->wk_key, k->wk_keylen); ++ } + return 1; + } + |