From 23fa18eaa71266feff7ba8d83022d9e1cc83c65a Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Fri, 10 May 2024 07:42:03 +0000
Subject: [PATCH] disable pwm7

---
 kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/linuxver.h |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 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 355eacc..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
@@ -886,10 +886,7 @@
 
 #define KMALLOC_FLAG (CAN_SLEEP() ? GFP_KERNEL: GFP_ATOMIC)
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 170))
-#define RANDOM32	get_random_u32
-#define RANDOM_BYTES    get_random_bytes
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
 #define RANDOM32	prandom_u32
 #define RANDOM_BYTES    prandom_bytes
 #else
@@ -934,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)
@@ -960,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