summaryrefslogtreecommitdiff
path: root/drivers/crypto/chelsio/chcr_core.c
diff options
context:
space:
mode:
authorHarsh Jain <harsh@chelsio.com>2016-11-29 16:30:43 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2016-11-30 15:01:51 +0300
commit2debd3325e55d448cae83b7f262e645db1697d25 (patch)
tree1ec8a1fcdff8b1ca15dd2e43fa7afeca1937ec25 /drivers/crypto/chelsio/chcr_core.c
parent5c86a8ff2e0deba95324cc59e6b90c28da8af535 (diff)
downloadlinux-2debd3325e55d448cae83b7f262e645db1697d25.tar.xz
crypto: chcr - Add AEAD algos.
Add support for following AEAD algos. GCM,CCM,RFC4106,RFC4309,authenc(hmac(shaXXX),cbc(aes)). Reviewed-by: Stephan Mueller <smueller@chronox.de> 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_core.c')
-rw-r--r--drivers/crypto/chelsio/chcr_core.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/crypto/chelsio/chcr_core.c b/drivers/crypto/chelsio/chcr_core.c
index fb5f9bbfa09c..acde2de2c1e1 100644
--- a/drivers/crypto/chelsio/chcr_core.c
+++ b/drivers/crypto/chelsio/chcr_core.c
@@ -109,14 +109,12 @@ static int cpl_fw6_pld_handler(struct chcr_dev *dev,
if (ack_err_status) {
if (CHK_MAC_ERR_BIT(ack_err_status) ||
CHK_PAD_ERR_BIT(ack_err_status))
- error_status = -EINVAL;
+ error_status = -EBADMSG;
}
/* call completion callback with failure status */
if (req) {
- if (!chcr_handle_resp(req, input, error_status))
- req->complete(req, error_status);
- else
- return -EINVAL;
+ error_status = chcr_handle_resp(req, input, error_status);
+ req->complete(req, error_status);
} else {
pr_err("Incorrect request address from the firmware\n");
return -EFAULT;