diff options
author | Martin Schiller <mschiller@tdt.de> | 2016-08-18 12:03:17 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2016-08-20 05:33:09 +0200 |
commit | 070edfd92f8f83a93312a7df5f59048d74286584 (patch) | |
tree | 4de5631096240d062a879323964241d5ec605ed0 /package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c | |
parent | 93916613943ae095027f01acc521b4fcf174dea2 (diff) | |
download | mtk-20170518-070edfd92f8f83a93312a7df5f59048d74286584.zip mtk-20170518-070edfd92f8f83a93312a7df5f59048d74286584.tar.gz mtk-20170518-070edfd92f8f83a93312a7df5f59048d74286584.tar.bz2 |
ltq-deu: fix cra_priority
With the default priority of 0, the DEU algos would be overlapped
by the generic algos (if available).
To fix this, set the cra_priority of the hardware algos to the
recommended value of 300/400.
Signed-off-by: Martin Schiller <mschiller@tdt.de>
Diffstat (limited to 'package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c')
-rw-r--r-- | package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c b/package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c index 9ef42d1..b51cf47 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c @@ -455,6 +455,7 @@ void aes_decrypt (struct crypto_tfm *tfm, uint8_t *out, const uint8_t *in) struct crypto_alg ifxdeu_aes_alg = { .cra_name = "aes", .cra_driver_name = "ifxdeu-aes", + .cra_priority = 300, .cra_flags = CRYPTO_ALG_TYPE_CIPHER, .cra_blocksize = AES_BLOCK_SIZE, .cra_ctxsize = sizeof(struct aes_ctx), @@ -541,6 +542,7 @@ int ecb_aes_decrypt(struct blkcipher_desc *desc, struct crypto_alg ifxdeu_ecb_aes_alg = { .cra_name = "ecb(aes)", .cra_driver_name = "ifxdeu-ecb(aes)", + .cra_priority = 400, .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, .cra_blocksize = AES_BLOCK_SIZE, .cra_ctxsize = sizeof(struct aes_ctx), @@ -631,6 +633,7 @@ int cbc_aes_decrypt(struct blkcipher_desc *desc, struct crypto_alg ifxdeu_cbc_aes_alg = { .cra_name = "cbc(aes)", .cra_driver_name = "ifxdeu-cbc(aes)", + .cra_priority = 400, .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, .cra_blocksize = AES_BLOCK_SIZE, .cra_ctxsize = sizeof(struct aes_ctx), @@ -722,6 +725,7 @@ int ctr_basic_aes_decrypt(struct blkcipher_desc *desc, struct crypto_alg ifxdeu_ctr_basic_aes_alg = { .cra_name = "ctr(aes)", .cra_driver_name = "ifxdeu-ctr(aes)", + .cra_priority = 400, .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, .cra_blocksize = AES_BLOCK_SIZE, .cra_ctxsize = sizeof(struct aes_ctx), @@ -861,6 +865,7 @@ int ctr_rfc3686_aes_decrypt(struct blkcipher_desc *desc, struct crypto_alg ifxdeu_ctr_rfc3686_aes_alg = { .cra_name = "rfc3686(ctr(aes))", .cra_driver_name = "ifxdeu-ctr-rfc3686(aes)", + .cra_priority = 400, .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, .cra_blocksize = AES_BLOCK_SIZE, .cra_ctxsize = sizeof(struct aes_ctx), |