diff options
author | Gilad Ben-Yossef <gilad@benyossef.com> | 2017-10-18 08:00:39 +0100 |
---|---|---|
committer | Mircea Pop <mircea.pop@nxp.com> | 2019-05-14 09:54:34 +0200 |
commit | e9a23adaf413756c4c38bceeaeb5d5a5a4329ca1 (patch) | |
tree | 8f497aece4bf12f0c678e09eebf8045bfc6fc57b /crypto/algif_aead.c | |
parent | 73d2e52ac3cc69063fc3ee5660f858ffbf3a6e05 (diff) |
crypto: algif - move to generic async completion
algif starts several async crypto ops and waits for their completion.
Move it over to generic code doing the same.
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 2c3f8b162106a7d12097d02eb22459f57fab8247)
Diffstat (limited to 'crypto/algif_aead.c')
-rw-r--r-- | crypto/algif_aead.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c index f138af18b500..e9885a35ef6e 100644 --- a/crypto/algif_aead.c +++ b/crypto/algif_aead.c @@ -310,11 +310,11 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg, /* Synchronous operation */ aead_request_set_callback(&areq->cra_u.aead_req, CRYPTO_TFM_REQ_MAY_BACKLOG, - af_alg_complete, &ctx->completion); - err = af_alg_wait_for_completion(ctx->enc ? + crypto_req_done, &ctx->wait); + err = crypto_wait_req(ctx->enc ? crypto_aead_encrypt(&areq->cra_u.aead_req) : crypto_aead_decrypt(&areq->cra_u.aead_req), - &ctx->completion); + &ctx->wait); } @@ -576,7 +576,7 @@ static int aead_accept_parent_nokey(void *private, struct sock *sk) ctx->merge = 0; ctx->enc = 0; ctx->aead_assoclen = 0; - af_alg_init_completion(&ctx->completion); + crypto_init_wait(&ctx->wait); ask->private = ctx; |