From bedbef8ad3e75a304af6361af235302bcc61d06b Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Tue, 14 May 2024 06:39:01 +0000
Subject: [PATCH] 修改内核路径

---
 kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/linuxver.h |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/linuxver.h b/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/linuxver.h
old mode 100644
new mode 100755
index e697349..f405a5d
--- a/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/linuxver.h
+++ b/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/linuxver.h
@@ -931,8 +931,14 @@
 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) */
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
+#ifdef CONFIG_NO_GKI
 #define vfs_write(fp, buf, len, pos) kernel_write(fp, buf, len, pos)
 #define vfs_read(fp, buf, len, pos) kernel_read(fp, buf, len, pos)
+#else
+#define vfs_write(fp, buf, len, pos) ({ UNUSED_PARAMETER(fp); UNUSED_PARAMETER(buf); UNUSED_PARAMETER(len); UNUSED_PARAMETER(pos); -EPERM; })
+#define vfs_read(fp, buf, len, pos) ({ UNUSED_PARAMETER(fp); UNUSED_PARAMETER(buf); UNUSED_PARAMETER(len); UNUSED_PARAMETER(pos); -EPERM; })
+#define filp_open(filename, flags, mode) ({ UNUSED_PARAMETER(filename); UNUSED_PARAMETER(flags); UNUSED_PARAMETER(mode); ERR_PTR(-EPERM); })
+#endif
 int kernel_read_compat(struct file *file, loff_t offset, char *addr, unsigned long count);
 #else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) */
 #define kernel_read_compat(file, offset, addr, count) kernel_read(file, offset, addr, count)
@@ -957,12 +963,5 @@
 #define	PCI_DMA_FROMDEVICE	2
 #endif
 #endif
-
-#ifdef ANDROID_BKPORT
-#if (ANDROID_VERSION >= 13) && (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 41))
-#define ANDROID13_KERNEL515_BKPORT
-#define CFG80211_BKPORT_MLO
-#endif /* ANDROID_VERSION >= 13 && KERNEL >= 5.15.41 */
-#endif /* ANDROID_BKPORT */
 
 #endif /* _linuxver_h_ */

--
Gitblit v1.6.2