mirror of
https://github.com/qosmio/nss-packages.git
synced 2025-12-16 16:21:53 +00:00
nss-crypto: Sync with upstream and remove obsolete patches
2024-09-16 - 60e27b9 - Linux 6.6 compilation fixes Signed-off-by: Sean Khan <datapronix@protonmail.com>
This commit is contained in:
parent
3e2008c883
commit
1f7a6b7879
@ -1,13 +1,13 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=qca-nss-crypto
|
PKG_NAME:=qca-nss-crypto
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/nss-crypto.git
|
PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/nss-crypto.git
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_DATE:=2022-12-15
|
PKG_SOURCE_DATE:=2024-09-16
|
||||||
PKG_SOURCE_VERSION:=3c5a574
|
PKG_SOURCE_VERSION:=60e27b9
|
||||||
PKG_MIRROR_HASH:=a195ba22016d91cd1711fe8f5167d65cfbd03feee5a9089929cb0d2180bf4047
|
PKG_MIRROR_HASH:=f4d992ccfccdbd14463872afac44ab7d44cfae683a8e9768cee27948b62fd62d
|
||||||
QSDK_VERSION:=12.5
|
QSDK_VERSION:=12.5
|
||||||
PKG_VERSION:=$(QSDK_VERSION).$(subst -,.,$(PKG_SOURCE_DATE))~$(PKG_SOURCE_VERSION)
|
PKG_VERSION:=$(QSDK_VERSION).$(subst -,.,$(PKG_SOURCE_DATE))~$(PKG_SOURCE_VERSION)
|
||||||
|
|
||||||
|
|||||||
@ -1,27 +0,0 @@
|
|||||||
From 0c6c593783f2d64a429ad38523661a915aa462fc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Robert Marko <robimarko@gmail.com>
|
|
||||||
Date: Sun, 13 Mar 2022 13:44:47 +0100
|
|
||||||
Subject: [PATCH 1/3] nss-crypto: fix SHA1 header include
|
|
||||||
|
|
||||||
SHA1 header has been merged to the generic SHA one,
|
|
||||||
and with that the cryptohash.h was dropped.
|
|
||||||
|
|
||||||
So, fix include in kernels 5.8 and newer.
|
|
||||||
|
|
||||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|
||||||
---
|
|
||||||
v2.0/src/nss_crypto_hlos.h | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
--- a/v2.0/src/nss_crypto_hlos.h
|
|
||||||
+++ b/v2.0/src/nss_crypto_hlos.h
|
|
||||||
@@ -55,7 +55,9 @@
|
|
||||||
#include <linux/interrupt.h>
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/vmalloc.h>
|
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)
|
|
||||||
#include <linux/cryptohash.h>
|
|
||||||
+#endif
|
|
||||||
#include <crypto/sha.h>
|
|
||||||
#include <crypto/aes.h>
|
|
||||||
#include <crypto/des.h>
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
From 96da3ca01ac172e5d858209b3d3d9aefad04423c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Robert Marko <robimarko@gmail.com>
|
|
||||||
Date: Sun, 13 Mar 2022 13:47:24 +0100
|
|
||||||
Subject: [PATCH 3/3] nss-crypto: fix SHA header include in 5.15
|
|
||||||
|
|
||||||
SHA header was split into SHA-1 and SHA-2 headers in kernel 5.11, so
|
|
||||||
fix the include for newer kernels.
|
|
||||||
|
|
||||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|
||||||
---
|
|
||||||
v2.0/src/nss_crypto_ctrl.c | 6 ++++++
|
|
||||||
v2.0/src/nss_crypto_hlos.h | 4 ++++
|
|
||||||
2 files changed, 10 insertions(+)
|
|
||||||
|
|
||||||
--- a/v2.0/src/nss_crypto_ctrl.c
|
|
||||||
+++ b/v2.0/src/nss_crypto_ctrl.c
|
|
||||||
@@ -38,7 +38,13 @@
|
|
||||||
#include <linux/debugfs.h>
|
|
||||||
#include <linux/log2.h>
|
|
||||||
#include <linux/completion.h>
|
|
||||||
+#include <linux/version.h>
|
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0)
|
|
||||||
#include <crypto/sha.h>
|
|
||||||
+#else
|
|
||||||
+#include <crypto/sha1.h>
|
|
||||||
+#include <crypto/sha2.h>
|
|
||||||
+#endif
|
|
||||||
#include <crypto/des.h>
|
|
||||||
#include <crypto/aes.h>
|
|
||||||
#include <crypto/md5.h>
|
|
||||||
--- a/v2.0/src/nss_crypto_hlos.h
|
|
||||||
+++ b/v2.0/src/nss_crypto_hlos.h
|
|
||||||
@@ -58,7 +58,11 @@
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)
|
|
||||||
#include <linux/cryptohash.h>
|
|
||||||
#endif
|
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0)
|
|
||||||
#include <crypto/sha.h>
|
|
||||||
+#else
|
|
||||||
+#include <crypto/sha1.h>
|
|
||||||
+#endif
|
|
||||||
#include <crypto/aes.h>
|
|
||||||
#include <crypto/des.h>
|
|
||||||
#include <crypto/ghash.h>
|
|
||||||
@ -45,7 +45,7 @@
|
|||||||
static struct platform_driver nss_crypto_device = {
|
static struct platform_driver nss_crypto_device = {
|
||||||
.probe = nss_crypto_device_probe,
|
.probe = nss_crypto_device_probe,
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
|
||||||
+ .remove_new = nss_crypto_device_remove,
|
+ .remove_new = nss_crypto_device_remove,
|
||||||
+#else
|
+#else
|
||||||
.remove = nss_crypto_device_remove,
|
.remove = nss_crypto_device_remove,
|
||||||
+#endif
|
+#endif
|
||||||
@ -74,7 +74,7 @@
|
|||||||
static struct platform_driver nss_crypto_drv = {
|
static struct platform_driver nss_crypto_drv = {
|
||||||
.probe = nss_crypto_probe,
|
.probe = nss_crypto_probe,
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
|
||||||
+ .remove_new = nss_crypto_remove,
|
+ .remove_new = nss_crypto_remove,
|
||||||
+#else
|
+#else
|
||||||
.remove = nss_crypto_remove,
|
.remove = nss_crypto_remove,
|
||||||
+#endif
|
+#endif
|
||||||
@ -396,3 +396,34 @@
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Reset EIP blocks and check if reset is complete
|
* Reset EIP blocks and check if reset is complete
|
||||||
|
--- a/v1.0/src/nss_crypto_dtsi.c
|
||||||
|
+++ b/v1.0/src/nss_crypto_dtsi.c
|
||||||
|
@@ -346,7 +346,7 @@ static int nss_crypto_probe(struct platf
|
||||||
|
* nss_crypto_remove()
|
||||||
|
* remove the crypto engine and deregister everything
|
||||||
|
*/
|
||||||
|
-static int nss_crypto_remove(struct platform_device *pdev)
|
||||||
|
+static void nss_crypto_remove(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
struct nss_crypto_ctrl_eng *e_ctrl;
|
||||||
|
struct nss_crypto_ctrl *ctrl;
|
||||||
|
@@ -361,7 +361,6 @@ static int nss_crypto_remove(struct plat
|
||||||
|
kfree(ctrl->clocks);
|
||||||
|
}
|
||||||
|
|
||||||
|
- return 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct of_device_id nss_crypto_dt_ids[] = {
|
||||||
|
@@ -375,7 +374,11 @@ MODULE_DEVICE_TABLE(of, nss_crypto_dt_id
|
||||||
|
*/
|
||||||
|
static struct platform_driver nss_crypto_drv = {
|
||||||
|
.probe = nss_crypto_probe,
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
|
||||||
|
+ .remove_new = nss_crypto_remove,
|
||||||
|
+#else
|
||||||
|
.remove = nss_crypto_remove,
|
||||||
|
+#endif
|
||||||
|
.driver = {
|
||||||
|
.owner = THIS_MODULE,
|
||||||
|
.name = "nss-crypto",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user