diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2011-07-24 14:17:58 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2011-07-24 14:17:58 +0000 |
commit | 00dd85d8f61db55d6e08d224ed30f077075e9766 (patch) | |
tree | 7cabb1d9085c88122c18b953a731e548953a544b /target/linux/generic/files/crypto/ocf/ixp4xx | |
parent | 8ecad9c51ad06d4eaa325e5a9f4c42adb4b4eecb (diff) | |
download | mtk-20170518-00dd85d8f61db55d6e08d224ed30f077075e9766.zip mtk-20170518-00dd85d8f61db55d6e08d224ed30f077075e9766.tar.gz mtk-20170518-00dd85d8f61db55d6e08d224ed30f077075e9766.tar.bz2 |
ocf-linux: version bump to 20110720
Fixes problem with TFM allocation in cryptosoft.c
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Hauke:
* remove ubsec_ssb package and take it from ocf-linux
* use patches from ocf-linux package
* refresh all patches
* readd some build fixes for OpenWrt.
* readd CRYPTO_MANAGER dependency
SVN-Revision: 27753
Diffstat (limited to 'target/linux/generic/files/crypto/ocf/ixp4xx')
-rw-r--r-- | target/linux/generic/files/crypto/ocf/ixp4xx/ixp4xx.c | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/target/linux/generic/files/crypto/ocf/ixp4xx/ixp4xx.c b/target/linux/generic/files/crypto/ocf/ixp4xx/ixp4xx.c index a9eabf0..ede598f 100644 --- a/target/linux/generic/files/crypto/ocf/ixp4xx/ixp4xx.c +++ b/target/linux/generic/files/crypto/ocf/ixp4xx/ixp4xx.c @@ -4,7 +4,7 @@ * from Intel in order to operate (or compile). * * Written by David McCullough <david_mccullough@mcafee.com> - * Copyright (C) 2006-2010 David McCullough + * Copyright (C) 2006-2011 David McCullough * Copyright (C) 2004-2005 Intel Corporation. * * LICENSE TERMS @@ -34,10 +34,8 @@ */ #include <linux/version.h> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) -#include <generated/autoconf.h> -#else -#include <linux/autoconf.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +#include <linux/config.h> #endif #include <linux/module.h> #include <linux/init.h> @@ -448,14 +446,28 @@ ixp_q_process(struct ixp_q *q) dprintk("%s(%p)\n", __FUNCTION__, q); if (q->ixp_q_ccrd) { - if (q->ixp_q_ccrd->crd_flags & CRD_F_IV_EXPLICIT) { - q->ixp_q_iv = q->ixp_q_ccrd->crd_iv; + if (q->ixp_q_ccrd->crd_flags & CRD_F_ENCRYPT) { + if (q->ixp_q_ccrd->crd_flags & CRD_F_IV_EXPLICIT) { + q->ixp_q_iv = q->ixp_q_ccrd->crd_iv; + } else { + q->ixp_q_iv = q->ixp_q_iv_data; + read_random(q->ixp_q_iv, ixp->ixp_ctx.cipherCtx.cipherInitialVectorLen); + } + if ((q->ixp_q_ccrd->crd_flags & CRD_F_IV_PRESENT) == 0) + crypto_copyback(q->ixp_q_crp->crp_flags, q->ixp_q_crp->crp_buf, + q->ixp_q_ccrd->crd_inject, + ixp->ixp_ctx.cipherCtx.cipherInitialVectorLen, + (caddr_t) q->ixp_q_iv); } else { - q->ixp_q_iv = q->ixp_q_iv_data; - crypto_copydata(q->ixp_q_crp->crp_flags, q->ixp_q_crp->crp_buf, - q->ixp_q_ccrd->crd_inject, - ixp->ixp_ctx.cipherCtx.cipherInitialVectorLen, - (caddr_t) q->ixp_q_iv); + if (q->ixp_q_ccrd->crd_flags & CRD_F_IV_EXPLICIT) + q->ixp_q_iv = q->ixp_q_ccrd->crd_iv; + else { + q->ixp_q_iv = q->ixp_q_iv_data; + crypto_copydata(q->ixp_q_crp->crp_flags, q->ixp_q_crp->crp_buf, + q->ixp_q_ccrd->crd_inject, + ixp->ixp_ctx.cipherCtx.cipherInitialVectorLen, + (caddr_t) q->ixp_q_iv); + } } if (q->ixp_q_acrd) { |