crypto: mediatek - Use GCM IV size constant
authorCorentin LABBE <clabbe.montjoie@gmail.com>
Tue, 22 Aug 2017 08:08:14 +0000 (10:08 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 22 Sep 2017 09:43:12 +0000 (17:43 +0800)
This patch replace GCM IV size value by their constant name.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/mediatek/mtk-aes.c

index 72e4549ed36b8212c8962068fe4e5252252daa03..32aa587783c304c60f05202d1fc8f8ac0272382e 100644 (file)
@@ -13,6 +13,7 @@
  */
 
 #include <crypto/aes.h>
+#include <crypto/gcm.h>
 #include "mtk-platform.h"
 
 #define AES_QUEUE_SIZE         512
@@ -1103,7 +1104,7 @@ static struct aead_alg aes_gcm_alg = {
        .decrypt        = mtk_aes_gcm_decrypt,
        .init           = mtk_aes_gcm_init,
        .exit           = mtk_aes_gcm_exit,
-       .ivsize         = 12,
+       .ivsize         = GCM_AES_IV_SIZE,
        .maxauthsize    = AES_BLOCK_SIZE,
 
        .base = {