crypto: qce - Add MAC failed error checking
MAC_FAILED gets set in the status register if authenthication fails for ccm algorithms(during decryption). Add support to catch and flag this error. Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
b7c3635e56
commit
a9ca8eacb3
|
@ -419,6 +419,8 @@ int qce_check_status(struct qce_device *qce, u32 *status)
|
|||
*/
|
||||
if (*status & STATUS_ERRORS || !(*status & BIT(OPERATION_DONE_SHIFT)))
|
||||
ret = -ENXIO;
|
||||
else if (*status & BIT(MAC_FAILED_SHIFT))
|
||||
ret = -EBADMSG;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue