summaryrefslogtreecommitdiff
path: root/drivers/crypto/marvell/cesa.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-10-18 19:23:35 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2015-10-20 17:10:50 +0300
commit4c2b130c8ae79af734e5e57f3662e25ef4d20e8d (patch)
tree2d58744ec66599b088df01a0c4e17756f7e0c392 /drivers/crypto/marvell/cesa.h
parent80754539ec936b0afe8a3c406b7d67612977cc71 (diff)
downloadlinux-4c2b130c8ae79af734e5e57f3662e25ef4d20e8d.tar.xz
crypto: marvell/cesa - keep creq->state in CPU endian format at all times
Currently, we read/write the state in CPU endian, but on the final request, we convert its endian according to the requested algorithm. (md5 is little endian, SHA are big endian.) Always keep creq->state in CPU native endian format, and perform the necessary conversion when copying the hash to the result. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/marvell/cesa.h')
-rw-r--r--drivers/crypto/marvell/cesa.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/marvell/cesa.h b/drivers/crypto/marvell/cesa.h
index b60698b30d30..5a1fabdd6778 100644
--- a/drivers/crypto/marvell/cesa.h
+++ b/drivers/crypto/marvell/cesa.h
@@ -612,7 +612,7 @@ struct mv_cesa_ahash_req {
u64 len;
int src_nents;
bool last_req;
- __be32 state[8];
+ u32 state[8];
};
/* CESA functions */