Commit 80e62ad5 authored by Herbert Xu's avatar Herbert Xu

crypto: qat - Use helper to set reqsize

The value of reqsize must only be changed through the helper.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 5ba78373
...@@ -494,6 +494,8 @@ static int qat_dh_init_tfm(struct crypto_kpp *tfm) ...@@ -494,6 +494,8 @@ static int qat_dh_init_tfm(struct crypto_kpp *tfm)
if (!inst) if (!inst)
return -EINVAL; return -EINVAL;
kpp_set_reqsize(tfm, sizeof(struct qat_asym_request) + 64);
ctx->p_size = 0; ctx->p_size = 0;
ctx->g2 = false; ctx->g2 = false;
ctx->inst = inst; ctx->inst = inst;
...@@ -1230,6 +1232,8 @@ static int qat_rsa_init_tfm(struct crypto_akcipher *tfm) ...@@ -1230,6 +1232,8 @@ static int qat_rsa_init_tfm(struct crypto_akcipher *tfm)
if (!inst) if (!inst)
return -EINVAL; return -EINVAL;
akcipher_set_reqsize(tfm, sizeof(struct qat_asym_request) + 64);
ctx->key_sz = 0; ctx->key_sz = 0;
ctx->inst = inst; ctx->inst = inst;
return 0; return 0;
...@@ -1252,7 +1256,6 @@ static struct akcipher_alg rsa = { ...@@ -1252,7 +1256,6 @@ static struct akcipher_alg rsa = {
.max_size = qat_rsa_max_size, .max_size = qat_rsa_max_size,
.init = qat_rsa_init_tfm, .init = qat_rsa_init_tfm,
.exit = qat_rsa_exit_tfm, .exit = qat_rsa_exit_tfm,
.reqsize = sizeof(struct qat_asym_request) + 64,
.base = { .base = {
.cra_name = "rsa", .cra_name = "rsa",
.cra_driver_name = "qat-rsa", .cra_driver_name = "qat-rsa",
...@@ -1269,7 +1272,6 @@ static struct kpp_alg dh = { ...@@ -1269,7 +1272,6 @@ static struct kpp_alg dh = {
.max_size = qat_dh_max_size, .max_size = qat_dh_max_size,
.init = qat_dh_init_tfm, .init = qat_dh_init_tfm,
.exit = qat_dh_exit_tfm, .exit = qat_dh_exit_tfm,
.reqsize = sizeof(struct qat_asym_request) + 64,
.base = { .base = {
.cra_name = "dh", .cra_name = "dh",
.cra_driver_name = "qat-dh", .cra_driver_name = "qat-dh",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment