summaryrefslogtreecommitdiffstats
path: root/recipes-extended/qat/files/0011-qat17-use-namespace-CRYPTO_INTERNAL.patch
blob: 1a7a647d6961e060615520eef708b0fe411ed72b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From 9b2b7a79fc9d9323fe9ec44de7619ea175c45bc1 Mon Sep 17 00:00:00 2001
From: Yongxin Liu <yongxin.liu@windriver.com>
Date: Tue, 23 Mar 2021 09:31:25 +0000
Subject: [PATCH 11/11] qat17: use namespace CRYPTO_INTERNAL

Due to kernel commit 0eb76ba29d16 ("crypto: remove cipher routines from
public crypto API") in v5.12-rc1, some crypto APIs are exported into a new
namespace CRYPTO_INTERNAL.

Upstream-Status: Inappropriate [Code released in tarball form only]

Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com>
---
 quickassist/lookaside/access_layer/src/linux/icp_qa_module.c         | 3 +++
 .../utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c      | 5 +++++
 2 files changed, 8 insertions(+)

diff --git a/quickassist/lookaside/access_layer/src/linux/icp_qa_module.c b/quickassist/lookaside/access_layer/src/linux/icp_qa_module.c
index 413eb07..f3a371e 100644
--- a/quickassist/lookaside/access_layer/src/linux/icp_qa_module.c
+++ b/quickassist/lookaside/access_layer/src/linux/icp_qa_module.c
@@ -120,3 +120,6 @@ module_exit(kapi_mod_exit);
 MODULE_DESCRIPTION("Intel(R) Quickassist Technology Acceleration Driver");
 MODULE_AUTHOR("Intel");
 MODULE_LICENSE("Dual BSD/GPL");
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0))
+MODULE_IMPORT_NS(CRYPTO_INTERNAL);
+#endif
diff --git a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
index de24fa0..96c29c0 100644
--- a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
+++ b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
@@ -75,6 +75,11 @@
 #else
 #include <crypto/sha.h>
 #endif
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0))
+#include <crypto/internal/cipher.h>
+#include <linux/module.h>
+MODULE_IMPORT_NS(CRYPTO_INTERNAL);
+#endif
 
 #define OSAL_MAX_SHASH_DECSIZE 512
 
-- 
2.14.5