old mode 100644new mode 100755.. | .. |
---|
886 | 886 | |
---|
887 | 887 | #define KMALLOC_FLAG (CAN_SLEEP() ? GFP_KERNEL: GFP_ATOMIC) |
---|
888 | 888 | |
---|
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)) |
---|
893 | 890 | #define RANDOM32 prandom_u32 |
---|
894 | 891 | #define RANDOM_BYTES prandom_bytes |
---|
895 | 892 | #else |
---|
.. | .. |
---|
934 | 931 | #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) */ |
---|
935 | 932 | |
---|
936 | 933 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) |
---|
| 934 | +#ifdef CONFIG_NO_GKI |
---|
937 | 935 | #define vfs_write(fp, buf, len, pos) kernel_write(fp, buf, len, pos) |
---|
938 | 936 | #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 |
---|
939 | 942 | int kernel_read_compat(struct file *file, loff_t offset, char *addr, unsigned long count); |
---|
940 | 943 | #else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) */ |
---|
941 | 944 | #define kernel_read_compat(file, offset, addr, count) kernel_read(file, offset, addr, count) |
---|
.. | .. |
---|
960 | 963 | #define PCI_DMA_FROMDEVICE 2 |
---|
961 | 964 | #endif |
---|
962 | 965 | #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 */ |
---|
970 | 966 | |
---|
971 | 967 | #endif /* _linuxver_h_ */ |
---|