ramips: crypto: Fix with Mediatek EIP93 Crypto Engine for MT7621 SoC (#7568)

This commit is contained in:
Ailick 2021-07-31 01:46:15 -05:00 committed by GitHub
parent 27cbdc106d
commit aa347717dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,37 @@
From d789256e237343f17097eed7ef29be554b5a2265 Mon Sep 17 00:00:00 2001
From: ailick <277498654@qq.com>
Date: Sat, 31 Jul 2021 00:49:23 +0800
Subject: [PATCH] Fix compilation issues
---
eip93-prng.c | 1 +
eip93-ring.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/eip93-prng.c b/eip93-prng.c
index 9c02522..87cd4dc 100644
--- a/eip93-prng.c
+++ b/eip93-prng.c
@@ -5,6 +5,7 @@
* Richard van Schagen <vschagen@cs.com>
*/
+#include <linux/dma-mapping.h>
#include "eip93-common.h"
#include "eip93-core.h"
#include "eip93-regs.h"
diff --git a/eip93-ring.c b/eip93-ring.c
index fff5c0b..b553bba 100644
--- a/eip93-ring.c
+++ b/eip93-ring.c
@@ -5,6 +5,7 @@
* Richard van Schagen <vschagen@cs.com>
*/
+#include <linux/device.h>
#include "eip93-common.h"
#include "eip93-core.h"
--
2.30.2

View File

@ -0,0 +1,14 @@
--- a/include/linux/crypto.h 2021-07-19 15:45:03.000000000 +0800
+++ b/include/linux/crypto.h 2021-07-31 00:41:39.404278501 +0800
@@ -101,6 +101,11 @@
#define CRYPTO_NOLOAD 0x00008000
/*
+ * Transform masks and values (for crt_flags).
+ */
+#define CRYPTO_TFM_RES_BAD_KEY_LEN 0x00200000
+
+/*
* The algorithm may allocate memory during request processing, i.e. during
* encryption, decryption, or hashing. Users can request an algorithm with this
* flag unset if they can't handle memory allocation failures.

View File

@ -0,0 +1,14 @@
--- a/include/linux/crypto.h 2021-06-23 20:42:55.000000000 +0800
+++ b/include/linux/crypto.h 2021-07-31 00:41:29.404278501 +0800
@@ -101,6 +101,11 @@
#define CRYPTO_NOLOAD 0x00008000
/*
+ * Transform masks and values (for crt_flags).
+ */
+#define CRYPTO_TFM_RES_BAD_KEY_LEN 0x00200000
+
+/*
* The algorithm may allocate memory during request processing, i.e. during
* encryption, decryption, or hashing. Users can request an algorithm with this
* flag unset if they can't handle memory allocation failures.