summaryrefslogtreecommitdiffstats
path: root/include/crypto/algapi.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-05-11 05:47:39 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2015-05-12 22:31:25 -0400
commitd6ef2f198d4c9d95b77ee4918b97fc8a53c8a7b7 (patch)
tree4926330410a3ab29a0e2802120d4be77d7175b9f /include/crypto/algapi.h
parent6499e8cfaa8f5d041b20af24d8409dec9f3ac3d0 (diff)
crypto: api - Add crypto_grab_spawn primitive
This patch adds a new primitive crypto_grab_spawn which is meant to replace crypto_init_spawn and crypto_init_spawn2. Under the new scheme the user no longer has to worry about reference counting the alg object before it is subsumed by the spawn. It is pretty much an exact copy of crypto_grab_aead. Prior to calling this function spawn->frontend and spawn->inst must have been set. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/algapi.h')
-rw-r--r--include/crypto/algapi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index 0ecb7688af71..a949bf70983b 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -144,6 +144,8 @@ int crypto_init_spawn(struct crypto_spawn *spawn, struct crypto_alg *alg,
144int crypto_init_spawn2(struct crypto_spawn *spawn, struct crypto_alg *alg, 144int crypto_init_spawn2(struct crypto_spawn *spawn, struct crypto_alg *alg,
145 struct crypto_instance *inst, 145 struct crypto_instance *inst,
146 const struct crypto_type *frontend); 146 const struct crypto_type *frontend);
147int crypto_grab_spawn(struct crypto_spawn *spawn, const char *name,
148 u32 type, u32 mask);
147 149
148void crypto_drop_spawn(struct crypto_spawn *spawn); 150void crypto_drop_spawn(struct crypto_spawn *spawn);
149struct crypto_tfm *crypto_spawn_tfm(struct crypto_spawn *spawn, u32 type, 151struct crypto_tfm *crypto_spawn_tfm(struct crypto_spawn *spawn, u32 type,