hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/linuxver.h
old mode 100644new mode 100755
....@@ -886,10 +886,7 @@
886886
887887 #define KMALLOC_FLAG (CAN_SLEEP() ? GFP_KERNEL: GFP_ATOMIC)
888888
889
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 170))
890
-#define RANDOM32 get_random_u32
891
-#define RANDOM_BYTES get_random_bytes
892
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
889
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
893890 #define RANDOM32 prandom_u32
894891 #define RANDOM_BYTES prandom_bytes
895892 #else
....@@ -934,8 +931,14 @@
934931 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) */
935932
936933 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
934
+#ifdef CONFIG_NO_GKI
937935 #define vfs_write(fp, buf, len, pos) kernel_write(fp, buf, len, pos)
938936 #define vfs_read(fp, buf, len, pos) kernel_read(fp, buf, len, pos)
937
+#else
938
+#define vfs_write(fp, buf, len, pos) ({ UNUSED_PARAMETER(fp); UNUSED_PARAMETER(buf); UNUSED_PARAMETER(len); UNUSED_PARAMETER(pos); -EPERM; })
939
+#define vfs_read(fp, buf, len, pos) ({ UNUSED_PARAMETER(fp); UNUSED_PARAMETER(buf); UNUSED_PARAMETER(len); UNUSED_PARAMETER(pos); -EPERM; })
940
+#define filp_open(filename, flags, mode) ({ UNUSED_PARAMETER(filename); UNUSED_PARAMETER(flags); UNUSED_PARAMETER(mode); ERR_PTR(-EPERM); })
941
+#endif
939942 int kernel_read_compat(struct file *file, loff_t offset, char *addr, unsigned long count);
940943 #else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) */
941944 #define kernel_read_compat(file, offset, addr, count) kernel_read(file, offset, addr, count)
....@@ -960,12 +963,5 @@
960963 #define PCI_DMA_FROMDEVICE 2
961964 #endif
962965 #endif
963
-
964
-#ifdef ANDROID_BKPORT
965
-#if (ANDROID_VERSION >= 13) && (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 41))
966
-#define ANDROID13_KERNEL515_BKPORT
967
-#define CFG80211_BKPORT_MLO
968
-#endif /* ANDROID_VERSION >= 13 && KERNEL >= 5.15.41 */
969
-#endif /* ANDROID_BKPORT */
970966
971967 #endif /* _linuxver_h_ */