summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/bcm/cipher.c
diff options
context:
space:
mode:
authorCorentin LABBE2017-08-22 10:08:13 +0200
committerHerbert Xu2017-09-22 11:43:12 +0200
commita59851d2f220e6653f8878bc312ad61f108fd3c9 (patch)
treed7b191c1ebc95e5050cab50c5fbaa3eb25afc478 /drivers/crypto/bcm/cipher.c
parentcrypto: atmel - Use GCM IV size constant (diff)
downloadkernel-qcow2-linux-a59851d2f220e6653f8878bc312ad61f108fd3c9.tar.gz
kernel-qcow2-linux-a59851d2f220e6653f8878bc312ad61f108fd3c9.tar.xz
kernel-qcow2-linux-a59851d2f220e6653f8878bc312ad61f108fd3c9.zip
crypto: bcm - Use GCM IV size constant
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>
Diffstat (limited to 'drivers/crypto/bcm/cipher.c')
-rw-r--r--drivers/crypto/bcm/cipher.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/crypto/bcm/cipher.c b/drivers/crypto/bcm/cipher.c
index 8685c7e4debd..537a67483aa3 100644
--- a/drivers/crypto/bcm/cipher.c
+++ b/drivers/crypto/bcm/cipher.c
@@ -1367,11 +1367,11 @@ static int handle_aead_req(struct iproc_reqctx_s *rctx)
* expects AAD to include just SPI and seqno. So
* subtract off the IV len.
*/
- aead_parms.assoc_size -= GCM_ESP_IV_SIZE;
+ aead_parms.assoc_size -= GCM_RFC4106_IV_SIZE;
if (rctx->is_encrypt) {
aead_parms.return_iv = true;
- aead_parms.ret_iv_len = GCM_ESP_IV_SIZE;
+ aead_parms.ret_iv_len = GCM_RFC4106_IV_SIZE;
aead_parms.ret_iv_off = GCM_ESP_SALT_SIZE;
}
} else {
@@ -3255,7 +3255,7 @@ static struct iproc_alg_s driver_algs[] = {
.cra_flags = CRYPTO_ALG_NEED_FALLBACK
},
.setkey = aead_gcm_esp_setkey,
- .ivsize = GCM_ESP_IV_SIZE,
+ .ivsize = GCM_RFC4106_IV_SIZE,
.maxauthsize = AES_BLOCK_SIZE,
},
.cipher_info = {
@@ -3301,7 +3301,7 @@ static struct iproc_alg_s driver_algs[] = {
.cra_flags = CRYPTO_ALG_NEED_FALLBACK
},
.setkey = rfc4543_gcm_esp_setkey,
- .ivsize = GCM_ESP_IV_SIZE,
+ .ivsize = GCM_RFC4106_IV_SIZE,
.maxauthsize = AES_BLOCK_SIZE,
},
.cipher_info = {