immortalwrt-mt798x/package/kernel/mtk-eip93/patches/100-fix-build-on-kernel-5.4.patch
AmadeusGhost 395ebd8ba3
mtk-eip93: bump to latest git HEAD
(cherry picked from commit 7fc2fd764114b639a59609442d3b1fbc42a9a1f6)
2022-06-13 20:58:53 +08:00

49 lines
1.1 KiB
Diff

--- a/crypto/mtk-eip93/eip93-aead.c
+++ b/crypto/mtk-eip93/eip93-aead.c
@@ -13,8 +13,6 @@
#include <crypto/internal/aead.h>
#include <crypto/md5.h>
#include <crypto/null.h>
-#include <crypto/sha1.h>
-#include <crypto/sha2.h>
#if IS_ENABLED(CONFIG_CRYPTO_DEV_EIP93_DES)
#include <crypto/internal/des.h>
@@ -22,6 +20,14 @@
#include <linux/crypto.h>
#include <linux/dma-mapping.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 "eip93-aead.h"
#include "eip93-cipher.h"
--- a/crypto/mtk-eip93/eip93-common.c
+++ b/crypto/mtk-eip93/eip93-common.c
@@ -8,11 +8,17 @@
#include <crypto/aes.h>
#include <crypto/ctr.h>
#include <crypto/hmac.h>
-#include <crypto/sha1.h>
-#include <crypto/sha2.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/scatterlist.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 "eip93-cipher.h"
#include "eip93-common.h"