From 6a1fa62ffa4acd6e8e4d4f648e19363a2ed5ef74 Mon Sep 17 00:00:00 2001 From: Yongxin Liu 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 --- quickassist/lookaside/access_layer/src/linux/icp_qa_module.c | 3 +++ quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c | 5 +++++ .../osal/src/linux/kernel_space/OsalCryptoInterface.c | 5 +++++ 3 files changed, 13 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 db51add84592..209b3054aa8c 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/qat/drivers/crypto/qat/qat_common/qat_algs.c b/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c index 23249de3db39..0e61954c0150 100644 --- a/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c +++ b/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c @@ -8,7 +8,12 @@ #include #include #include +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0)) +#include +#include +#else #include +#endif #include #include #include diff --git a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c index ec536607989a..9d62bb8749d5 100644 --- a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c +++ b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c @@ -76,6 +76,11 @@ #endif /* end of 5.11.0, 2.6.29 checks */ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) #include +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0)) +#include +#include +MODULE_IMPORT_NS(CRYPTO_INTERNAL); +#endif #define OSAL_MAX_SHASH_DECSIZE 512 -- 2.29.2