summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEneas U de Queiroz <cotequeiroz@gmail.com>2019-12-20 20:02:16 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2019-12-27 11:18:04 +0100
commit3e806a12d10af2581aa26c37b58439286eab9782 (patch)
treefdd7bf7f90dc61dcdb999520431b3d902bb47a77 /drivers
parentcrypto: qce - save a sg table slot for result buf (diff)
downloadlinux-3e806a12d10af2581aa26c37b58439286eab9782.tar.xz
linux-3e806a12d10af2581aa26c37b58439286eab9782.zip
crypto: qce - update the skcipher IV
Update the IV after the completion of each cipher operation. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/crypto/qce/skcipher.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/crypto/qce/skcipher.c b/drivers/crypto/qce/skcipher.c
index a9ae356bc2a7..d3852a61cb1d 100644
--- a/drivers/crypto/qce/skcipher.c
+++ b/drivers/crypto/qce/skcipher.c
@@ -21,6 +21,7 @@ static void qce_skcipher_done(void *data)
struct qce_cipher_reqctx *rctx = skcipher_request_ctx(req);
struct qce_alg_template *tmpl = to_cipher_tmpl(crypto_skcipher_reqtfm(req));
struct qce_device *qce = tmpl->qce;
+ struct qce_result_dump *result_buf = qce->dma.result_buf;
enum dma_data_direction dir_src, dir_dst;
u32 status;
int error;
@@ -45,6 +46,7 @@ static void qce_skcipher_done(void *data)
if (error < 0)
dev_dbg(qce->dev, "skcipher operation error (%x)\n", status);
+ memcpy(rctx->iv, result_buf->encr_cntr_iv, rctx->ivsize);
qce->async_req_done(tmpl->qce, error);
}