diff options
author | Horia Geantă <horia.geanta@nxp.com> | 2016-11-22 14:44:05 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-11-28 14:23:22 +0100 |
commit | 488ebc3a41260d62b24c18271356abc1f3ffdb63 (patch) | |
tree | 5bafab13827b4d9b932ce3bb8aaf135944926b3a /drivers/crypto/caam/key_gen.c | |
parent | crypto: caam - group algorithm related params (diff) | |
download | linux-488ebc3a41260d62b24c18271356abc1f3ffdb63.tar.xz linux-488ebc3a41260d62b24c18271356abc1f3ffdb63.zip |
crypto: caam - remove superfluous alg_op algorithm param
Information carried by alg_op can be deduced from adata->algtype
plus some fixed flags.
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/key_gen.c')
-rw-r--r-- | drivers/crypto/caam/key_gen.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/crypto/caam/key_gen.c b/drivers/crypto/caam/key_gen.c index df287e751df1..621199a02f2e 100644 --- a/drivers/crypto/caam/key_gen.c +++ b/drivers/crypto/caam/key_gen.c @@ -42,8 +42,7 @@ Split key generation----------------------------------------------- @0xffe04000 */ int gen_split_key(struct device *jrdev, u8 *key_out, - struct alginfo * const adata, const u8 *key_in, u32 keylen, - u32 alg_op) + struct alginfo * const adata, const u8 *key_in, u32 keylen) { u32 *desc; struct split_key_result result; @@ -74,7 +73,9 @@ int gen_split_key(struct device *jrdev, u8 *key_out, append_key(desc, dma_addr_in, keylen, CLASS_2 | KEY_DEST_CLASS_REG); /* Sets MDHA up into an HMAC-INIT */ - append_operation(desc, alg_op | OP_ALG_DECRYPT | OP_ALG_AS_INIT); + append_operation(desc, (adata->algtype & OP_ALG_ALGSEL_MASK) | + OP_ALG_AAI_HMAC | OP_TYPE_CLASS2_ALG | OP_ALG_DECRYPT | + OP_ALG_AS_INIT); /* * do a FIFO_LOAD of zero, this will trigger the internal key expansion |