mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
crypto: api - Introduce notifier for new crypto algorithms
Introduce a facility that can be used to receive a notification callback when a new algorithm becomes available. This can be used by existing crypto registrations to trigger a switch from a software-only algorithm to a hardware-accelerated version. A new CRYPTO_MSG_ALG_LOADED state is introduced to the existing crypto notification chain, and the register/unregister functions are exported so they can be called by subsystems outside of crypto. Signed-off-by: Martin K. Petersen <[email protected]> Suggested-by: Herbert Xu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
2fffee536c
commit
dd8b083f9a
4 changed files with 14 additions and 8 deletions
|
|
@ -372,6 +372,8 @@ static void crypto_wait_for_test(struct crypto_larval *larval)
|
|||
|
||||
err = wait_for_completion_killable(&larval->completion);
|
||||
WARN_ON(err);
|
||||
if (!err)
|
||||
crypto_probing_notify(CRYPTO_MSG_ALG_LOADED, larval);
|
||||
|
||||
out:
|
||||
crypto_larval_kill(&larval->alg);
|
||||
|
|
|
|||
Loading…
Reference in a new issue