RTL8192DU: Removed old patches for legacy kernels.

This commit is contained in:
Carlos Garces 2020-10-07 22:06:35 +02:00
parent c7af1545ee
commit bb49137152
3 changed files with 0 additions and 125 deletions

View File

@ -1,66 +0,0 @@
From 1334c3b1378819cc428bc68222245c5c10296937 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20Peron?=
<1859302+clementperon@users.noreply.github.com>
Date: Wed, 6 Jun 2018 17:40:54 +0200
Subject: [PATCH] Change __vfs_read_alt to __vfs_read
For kernel from 4.1 to 4.10 there is no call_read_iter used in new_sync_read.
Why create a new __vfs_read_alt whereas the __vfs_read is exported and seems to do exactly the same.
Remove __vfs_read_alt code and it's dependencies and use the __vfs_read function instead
---
os_dep/osdep_service.c | 31 +------------------------------
1 file changed, 1 insertion(+), 30 deletions(-)
diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c
index 1aee9b2..dc688f2 100644
--- a/os_dep/osdep_service.c
+++ b/os_dep/osdep_service.c
@@ -42,35 +42,6 @@ static inline ssize_t call_read_iter(struct file *file, struct kiocb *kio,
}
#endif
-static ssize_t new_sync_read(struct file *filp, void __user *buf, __kernel_size_t len, loff_t *ppos)
-{
- struct iovec iov;
- struct kiocb kiocb;
- struct iov_iter iter;
- ssize_t ret;
-
- iov.iov_base = buf;
- iov.iov_len = len;
- init_sync_kiocb(&kiocb, filp);
- kiocb.ki_pos = *ppos;
- iov_iter_init(&iter, READ, &iov, 1, len);
-
- ret = call_read_iter(filp, &kiocb, &iter);
- BUG_ON(ret == -EIOCBQUEUED);
- *ppos = kiocb.ki_pos;
- return ret;
-}
-
-static ssize_t __vfs_read_alt(struct file *file, char __user *buf, size_t count,
- loff_t *pos)
-{
- if (file->f_op->read)
- return file->f_op->read(file, buf, count, pos);
- else if (file->f_op->read_iter)
- return new_sync_read(file, (void *)buf, (__kernel_size_t)count, pos);
- else
- return -EINVAL;
-}
/*
* Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE
* @return: one of RTW_STATUS_CODE
@@ -967,7 +938,7 @@ static int readFile(struct file *fp,char *buf,int len)
while(sum<len) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
- rlen = __vfs_read_alt(fp, buf+sum, len-sum, &fp->f_pos);
+ 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);
#endif
--
2.14.1

View File

@ -1,27 +0,0 @@
From 9e477ff7fb1626f188e0d3314799371a5cce8681 Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
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<len) {
-#if (LINUX_VERSION_CODE >= 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

View File

@ -1,32 +0,0 @@
From fc51eecebcdefa8d99b1e8e9941219726bdab2a0 Mon Sep 17 00:00:00 2001
From: 5schatten <supervisedthinking@gmail.com>
Date: Thu, 21 Mar 2019 22:26:31 +0100
Subject: [PATCH] Revert "rtl8192du: Fix builds for kernels older than 4.11.0"
This reverts commit 01722435acb1d62c9453b86161d2d8b99d702648.
---
os_dep/osdep_service.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c
index dc688f2..3635755 100644
--- a/os_dep/osdep_service.c
+++ b/os_dep/osdep_service.c
@@ -34,14 +34,6 @@
#define RT_TAG '1178'
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0))
-static inline ssize_t call_read_iter(struct file *file, struct kiocb *kio,
- struct iov_iter *iter)
-{
- return file->f_op->read_iter(kio, iter);
-}
-#endif
-
/*
* Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE
* @return: one of RTW_STATUS_CODE
--
2.14.1