summaryrefslogtreecommitdiff
path: root/include/crypto
diff options
context:
space:
mode:
authorGilad Ben-Yossef <gilad@benyossef.com>2017-10-18 08:00:39 +0100
committerMircea Pop <mircea.pop@nxp.com>2019-05-14 09:54:34 +0200
commite9a23adaf413756c4c38bceeaeb5d5a5a4329ca1 (patch)
tree8f497aece4bf12f0c678e09eebf8045bfc6fc57b /include/crypto
parent73d2e52ac3cc69063fc3ee5660f858ffbf3a6e05 (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 'include/crypto')
-rw-r--r--include/crypto/if_alg.h15
1 files changed, 1 insertions, 14 deletions
diff --git a/include/crypto/if_alg.h b/include/crypto/if_alg.h
index ac0eae8372ab..f38227a78eae 100644
--- a/include/crypto/if_alg.h
+++ b/include/crypto/if_alg.h
@@ -41,11 +41,6 @@ struct alg_sock {
void *private;
};
-struct af_alg_completion {
- struct completion completion;
- int err;
-};
-
struct af_alg_control {
struct af_alg_iv *iv;
int op;
@@ -153,7 +148,7 @@ struct af_alg_ctx {
void *iv;
size_t aead_assoclen;
- struct af_alg_completion completion;
+ struct crypto_wait wait;
size_t used;
atomic_t rcvused;
@@ -178,19 +173,11 @@ void af_alg_link_sg(struct af_alg_sgl *sgl_prev, struct af_alg_sgl *sgl_new);
int af_alg_cmsg_send(struct msghdr *msg, struct af_alg_control *con);
-int af_alg_wait_for_completion(int err, struct af_alg_completion *completion);
-void af_alg_complete(struct crypto_async_request *req, int err);
-
static inline struct alg_sock *alg_sk(struct sock *sk)
{
return (struct alg_sock *)sk;
}
-static inline void af_alg_init_completion(struct af_alg_completion *completion)
-{
- init_completion(&completion->completion);
-}
-
/**
* Size of available buffer for sending data from user space to kernel.
*