summaryrefslogtreecommitdiff
path: root/drivers/crypto/chelsio/chcr_crypto.h
diff options
context:
space:
mode:
authorHarsh Jain <harsh@chelsio.com>2017-04-10 15:54:01 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2017-04-21 15:30:35 +0300
commit0e93708dabc0e999c7ffcf1e8661b68d96de24fd (patch)
tree8251825b7fe1edc6bab52b35ff1f703563a67c3a /drivers/crypto/chelsio/chcr_crypto.h
parent72a56ca97dc163a7a10a654aab6635e30e781070 (diff)
downloadlinux-0e93708dabc0e999c7ffcf1e8661b68d96de24fd.tar.xz
crypto: chcr - Add fallback for AEAD algos
Fallback to sw when I AAD length greater than 511 II Zero length payload II No of sg entries exceeds Request size. Signed-off-by: Harsh Jain <harsh@chelsio.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/chelsio/chcr_crypto.h')
-rw-r--r--drivers/crypto/chelsio/chcr_crypto.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/crypto/chelsio/chcr_crypto.h b/drivers/crypto/chelsio/chcr_crypto.h
index c5673f097ce9..5b2fabb14229 100644
--- a/drivers/crypto/chelsio/chcr_crypto.h
+++ b/drivers/crypto/chelsio/chcr_crypto.h
@@ -41,7 +41,7 @@
#define CCM_B0_SIZE 16
#define CCM_AAD_FIELD_SIZE 2
-#define T5_MAX_AAD_SIZE 512
+#define T6_MAX_AAD_SIZE 511
/* Define following if h/w is not dropping the AAD and IV data before
@@ -188,6 +188,7 @@ struct chcr_aead_ctx {
__be32 key_ctx_hdr;
unsigned int enckey_len;
struct crypto_skcipher *null;
+ struct crypto_aead *sw_cipher;
u8 salt[MAX_SALT];
u8 key[CHCR_AES_MAX_KEY_LEN];
u16 hmac_ctrl;