Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5a2b4da authored by Herbert Xu's avatar Herbert Xu
Browse files

crypto: aesni - Use crypto_aead_set_reqsize helper



This patch uses the crypto_aead_set_reqsize helper to avoid directly
touching the internals of aead.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent ba6d8e39
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -807,8 +807,9 @@ static int rfc4106_init(struct crypto_tfm *tfm)
	child_ctx = aesni_rfc4106_gcm_ctx_get(cryptd_child);
	memcpy(child_ctx, ctx, sizeof(*ctx));
	ctx->cryptd_tfm = cryptd_tfm;
	tfm->crt_aead.reqsize = sizeof(struct aead_request)
		+ crypto_aead_reqsize(&cryptd_tfm->base);
	crypto_aead_set_reqsize(__crypto_aead_cast(tfm),
		sizeof(struct aead_request) +
		crypto_aead_reqsize(&cryptd_tfm->base));
	return 0;
}