summaryrefslogtreecommitdiffstats
path: root/recipes-extended/qat/files/0010-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/qat/files/0010-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch')
-rw-r--r--recipes-extended/qat/files/0010-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/recipes-extended/qat/files/0010-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch b/recipes-extended/qat/files/0010-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch
new file mode 100644
index 0000000..b86d1db
--- /dev/null
+++ b/recipes-extended/qat/files/0010-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch
@@ -0,0 +1,54 @@
1From c9e04ec8d8be3a1f21a5bdc6c5c79f50191d57dd Mon Sep 17 00:00:00 2001
2From: Yongxin Liu <yongxin.liu@windriver.com>
3Date: Thu, 28 Jan 2021 13:07:59 +0800
4Subject: [PATCH 10/11] qat: include sha1.h and sha2.h instead of sha.h in
5 kernel v5.11
6
7In kernel commit a24d22b225ce ("crypto: sha - split sha.h into sha1.h and sha2.h"),
8<crypto/sha.h> was split into two headers <crypto/sha1.h> and <crypto/sha2.h>.
9
10Upstream-Status: Inappropriate [Code released in tarball form only]
11
12Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com>
13---
14 quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c | 5 +++++
15 .../utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c | 5 +++++
16 2 files changed, 10 insertions(+)
17
18diff --git a/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c b/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c
19index 37ac11e..08680ca 100644
20--- a/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c
21+++ b/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c
22@@ -52,7 +52,12 @@
23 #include <crypto/internal/aead.h>
24 #include <crypto/internal/skcipher.h>
25 #include <crypto/aes.h>
26+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
27+#include <crypto/sha1.h>
28+#include <crypto/sha2.h>
29+#else
30 #include <crypto/sha.h>
31+#endif
32 #include <crypto/hash.h>
33 #include <crypto/algapi.h>
34 #include <crypto/authenc.h>
35diff --git a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
36index 9d2e85c..de24fa0 100644
37--- a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
38+++ b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
39@@ -69,7 +69,12 @@
40 #include <linux/version.h>
41 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
42 #include <crypto/internal/hash.h>
43+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
44+#include <crypto/sha1.h>
45+#include <crypto/sha2.h>
46+#else
47 #include <crypto/sha.h>
48+#endif
49
50 #define OSAL_MAX_SHASH_DECSIZE 512
51
52--
532.14.5
54