summaryrefslogtreecommitdiff
path: root/package/kernel/lantiq/ltq-deu/src/ifxmips_des.c
diff options
context:
space:
mode:
authorMartin Schiller <mschiller@tdt.de>2016-08-18 12:03:17 +0200
committerJohn Crispin <john@phrozen.org>2016-08-20 05:33:09 +0200
commit070edfd92f8f83a93312a7df5f59048d74286584 (patch)
tree4de5631096240d062a879323964241d5ec605ed0 /package/kernel/lantiq/ltq-deu/src/ifxmips_des.c
parent93916613943ae095027f01acc521b4fcf174dea2 (diff)
downloadmtk-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_des.c')
-rw-r--r--package/kernel/lantiq/ltq-deu/src/ifxmips_des.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_des.c b/package/kernel/lantiq/ltq-deu/src/ifxmips_des.c
index 513c916..5b73b6a 100644
--- a/package/kernel/lantiq/ltq-deu/src/ifxmips_des.c
+++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_des.c
@@ -416,6 +416,7 @@ int des3_ede_setkey(struct crypto_tfm *tfm, const u8 *key,
struct crypto_alg ifxdeu_des_alg = {
.cra_name = "des",
.cra_driver_name = "ifxdeu-des",
+ .cra_priority = 300,
.cra_flags = CRYPTO_ALG_TYPE_CIPHER,
.cra_blocksize = DES_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct des_ctx),
@@ -436,6 +437,7 @@ struct crypto_alg ifxdeu_des_alg = {
struct crypto_alg ifxdeu_des3_ede_alg = {
.cra_name = "des3_ede",
.cra_driver_name = "ifxdeu-des3_ede",
+ .cra_priority = 300,
.cra_flags = CRYPTO_ALG_TYPE_CIPHER,
.cra_blocksize = DES_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct des_ctx),
@@ -520,6 +522,7 @@ int ecb_des_decrypt(struct blkcipher_desc *desc,
struct crypto_alg ifxdeu_ecb_des_alg = {
.cra_name = "ecb(des)",
.cra_driver_name = "ifxdeu-ecb(des)",
+ .cra_priority = 400,
.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER,
.cra_blocksize = DES_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct des_ctx),
@@ -543,6 +546,7 @@ struct crypto_alg ifxdeu_ecb_des_alg = {
struct crypto_alg ifxdeu_ecb_des3_ede_alg = {
.cra_name = "ecb(des3_ede)",
.cra_driver_name = "ifxdeu-ecb(des3_ede)",
+ .cra_priority = 400,
.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER,
.cra_blocksize = DES3_EDE_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct des_ctx),
@@ -634,6 +638,7 @@ int cbc_des_decrypt(struct blkcipher_desc *desc,
struct crypto_alg ifxdeu_cbc_des_alg = {
.cra_name = "cbc(des)",
.cra_driver_name = "ifxdeu-cbc(des)",
+ .cra_priority = 400,
.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER,
.cra_blocksize = DES_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct des_ctx),
@@ -658,6 +663,7 @@ struct crypto_alg ifxdeu_cbc_des_alg = {
struct crypto_alg ifxdeu_cbc_des3_ede_alg = {
.cra_name = "cbc(des3_ede)",
.cra_driver_name = "ifxdeu-cbc(des3_ede)",
+ .cra_priority = 400,
.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER,
.cra_blocksize = DES3_EDE_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct des_ctx),