summaryrefslogtreecommitdiff
path: root/target/linux/mxs/patches-4.14
diff options
context:
space:
mode:
authorZoltan HERPAI <wigyori@uid0.hu>2018-01-08 23:50:01 +0100
committerZoltan HERPAI <wigyori@uid0.hu>2018-02-20 13:24:43 +0100
commit1bbd66c4fc6a10ac5088f4acbf323ec3cb2a8b31 (patch)
treea417ccbd2cf1a020c9336a7f17c8973dcf0cc8f4 /target/linux/mxs/patches-4.14
parentba5f700d7fbbbf861d60f45710467f62c784aed4 (diff)
downloadmtk-20170518-1bbd66c4fc6a10ac5088f4acbf323ec3cb2a8b31.zip
mtk-20170518-1bbd66c4fc6a10ac5088f4acbf323ec3cb2a8b31.tar.gz
mtk-20170518-1bbd66c4fc6a10ac5088f4acbf323ec3cb2a8b31.tar.bz2
mxs: add support for 4.14
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Diffstat (limited to 'target/linux/mxs/patches-4.14')
-rw-r--r--target/linux/mxs/patches-4.14/110-crypto-mxsdcp-provide-importexport.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/target/linux/mxs/patches-4.14/110-crypto-mxsdcp-provide-importexport.patch b/target/linux/mxs/patches-4.14/110-crypto-mxsdcp-provide-importexport.patch
new file mode 100644
index 0000000..e8d8852
--- /dev/null
+++ b/target/linux/mxs/patches-4.14/110-crypto-mxsdcp-provide-importexport.patch
@@ -0,0 +1,51 @@
+--- a/drivers/crypto/mxs-dcp.c
++++ b/drivers/crypto/mxs-dcp.c
+@@ -770,6 +770,24 @@ static void dcp_sha_cra_exit(struct cryp
+ {
+ }
+
++static int dcp_sha_export(struct ahash_request *req, void *out)
++{
++ struct dcp_sha_req_ctx *rctx = ahash_request_ctx(req);
++
++ memcpy(out, rctx, sizeof(struct dcp_sha_req_ctx));
++
++ return 0;
++}
++
++static int dcp_sha_import(struct ahash_request *req, const void *in)
++{
++ struct dcp_sha_req_ctx *rctx = ahash_request_ctx(req);
++
++ memcpy(rctx, in, sizeof(struct dcp_sha_req_ctx));
++
++ return 0;
++}
++
+ /* AES 128 ECB and AES 128 CBC */
+ static struct crypto_alg dcp_aes_algs[] = {
+ {
+@@ -829,8 +847,11 @@ static struct ahash_alg dcp_sha1_alg = {
+ .final = dcp_sha_final,
+ .finup = dcp_sha_finup,
+ .digest = dcp_sha_digest,
++ .import = dcp_sha_import,
++ .export = dcp_sha_export,
+ .halg = {
+ .digestsize = SHA1_DIGEST_SIZE,
++ .statesize = sizeof(struct dcp_sha_req_ctx),
+ .base = {
+ .cra_name = "sha1",
+ .cra_driver_name = "sha1-dcp",
+@@ -853,8 +874,11 @@ static struct ahash_alg dcp_sha256_alg =
+ .final = dcp_sha_final,
+ .finup = dcp_sha_finup,
+ .digest = dcp_sha_digest,
++ .import = dcp_sha_import,
++ .export = dcp_sha_export,
+ .halg = {
+ .digestsize = SHA256_DIGEST_SIZE,
++ .statesize = sizeof(struct dcp_sha_req_ctx),
+ .base = {
+ .cra_name = "sha256",
+ .cra_driver_name = "sha256-dcp",