diff --git a/packages/linux-drivers/RTL8192DU/patches/RTL8192DU-0003-fix-vfs-read.patch b/packages/linux-drivers/RTL8192DU/patches/RTL8192DU-0003-fix-vfs-read.patch new file mode 100644 index 0000000000..ecc26a678d --- /dev/null +++ b/packages/linux-drivers/RTL8192DU/patches/RTL8192DU-0003-fix-vfs-read.patch @@ -0,0 +1,27 @@ +From 9e477ff7fb1626f188e0d3314799371a5cce8681 Mon Sep 17 00:00:00 2001 +From: MilhouseVH +Date: Wed, 13 Jun 2018 18:54:09 +0100 +Subject: [PATCH] fix vfs_read with 4.14.y+ + +--- + os_dep/osdep_service.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c +index 9dd3d2b..bd1df96 100644 +--- a/os_dep/osdep_service.c ++++ b/os_dep/osdep_service.c +@@ -1055,7 +1055,9 @@ static int readFile(struct file *fp,char *buf,int len) + return -EPERM; + + while(sum= KERNEL_VERSION(4, 1, 0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)) ++ rlen = kernel_read(fp, buf+sum, len-sum, &fp->f_pos); ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)) + rlen = __vfs_read(fp, buf+sum, len-sum, &fp->f_pos); + #else + rlen = fp->f_op->read(fp, buf+sum, len-sum, &fp->f_pos); +-- +2.14.1 +