aboutsummaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorJoel Fernandes <joelf@ti.com>2013-08-17 21:42:22 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2013-08-21 21:27:58 +1000
commit257aff515409f9455edff3a946344e71baf9e116 (patch)
tree01dea1b98b5d1534a2530698171e414e2bb1dfda /include/crypto
parentcrypto: nx - fix nx-aes-gcm verification (diff)
downloadlinux-dev-257aff515409f9455edff3a946344e71baf9e116.tar.xz
linux-dev-257aff515409f9455edff3a946344e71baf9e116.zip
crypto: scatterwalk - Add support for calculating number of SG elements
Crypto layer only passes nbytes to encrypt but in omap-aes driver we need to know number of SG elements to pass to dmaengine slave API. We add function for the same to scatterwalk library. Signed-off-by: Joel Fernandes <joelf@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/scatterwalk.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/crypto/scatterwalk.h b/include/crypto/scatterwalk.h
index 3744d2a642df..13621cc8cf4c 100644
--- a/include/crypto/scatterwalk.h
+++ b/include/crypto/scatterwalk.h
@@ -113,4 +113,6 @@ void scatterwalk_done(struct scatter_walk *walk, int out, int more);
void scatterwalk_map_and_copy(void *buf, struct scatterlist *sg,
unsigned int start, unsigned int nbytes, int out);
+int scatterwalk_bytes_sglen(struct scatterlist *sg, int num_bytes);
+
#endif /* _CRYPTO_SCATTERWALK_H */