crypto: kpp - add get/set_flags helpers
authorTudor-Dan Ambarus <tudor.ambarus@microchip.com>
Wed, 5 Jul 2017 10:07:58 +0000 (13:07 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 18 Jul 2017 09:50:57 +0000 (17:50 +0800)
These helpers will be used for fallbacks to kpp software
implementations.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
include/crypto/kpp.h

index 2133d17b7156eb3340b45ba037bc1ca399f32e2e..1bde0a6514fa682deafb3141376f57949504c1e6 100644 (file)
@@ -145,6 +145,16 @@ static inline struct crypto_kpp *crypto_kpp_reqtfm(struct kpp_request *req)
        return __crypto_kpp_tfm(req->base.tfm);
 }
 
+static inline u32 crypto_kpp_get_flags(struct crypto_kpp *tfm)
+{
+       return crypto_tfm_get_flags(crypto_kpp_tfm(tfm));
+}
+
+static inline void crypto_kpp_set_flags(struct crypto_kpp *tfm, u32 flags)
+{
+       crypto_tfm_set_flags(crypto_kpp_tfm(tfm), flags);
+}
+
 /**
  * crypto_free_kpp() - free KPP tfm handle
  *