[packages/rtl8812au] - fix building with kernel 5.1 - rel 2

baggins baggins at pld-linux.org
Tue May 7 19:14:19 CEST 2019


commit c54a2f38177509a4ca3c70150c9dda4254a0cb6f
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue May 7 19:13:57 2019 +0200

    - fix building with kernel 5.1
    - rel 2

 kernel-5.1.patch | 38 ++++++++++++++++++++++++++++++++++++++
 rtl8812au.spec   |  4 +++-
 2 files changed, 41 insertions(+), 1 deletion(-)
---
diff --git a/rtl8812au.spec b/rtl8812au.spec
index 937362d..9c1af3b 100644
--- a/rtl8812au.spec
+++ b/rtl8812au.spec
@@ -5,7 +5,7 @@
 # nothing to be placed to debuginfo package
 %define		_enable_debug_packages	0
 
-%define		rel	1
+%define		rel	2
 %define		snap	20190309
 %define		pname	rtl8812au
 Summary:	Driver for AC1200 (802.11ac) Wireless Dual-Band USB Adapter
@@ -17,6 +17,7 @@ License:	GPL
 Group:		Base/Kernel
 Source0:	https://github.com/gordboy/rtl8812au/archive/master/%{pname}-%{version}-%{snap}.tar.gz
 # Source0-md5:	5b5b12a758b949dd6fd76fe557084462
+Patch0:		kernel-5.1.patch
 # good luck finding this chip on Realtek website :/
 #URL:		http://www.realtek.com.tw/
 URL:		https://github.com/gordboy/rtl8812au
@@ -61,6 +62,7 @@ Driver for AC1200 (802.11ac) Wireless Dual-Band USB Adapter\
 
 %prep
 %setup -q -n %{pname}-master
+%patch0 -p1
 
 %build
 %{expand:%build_kernel_packages}
diff --git a/kernel-5.1.patch b/kernel-5.1.patch
new file mode 100644
index 0000000..aa724f0
--- /dev/null
+++ b/kernel-5.1.patch
@@ -0,0 +1,38 @@
+From ac063a4b1a87855e10f6cd1f358aaccbeee9b9c1 Mon Sep 17 00:00:00 2001
+From: gordboy <35108003+gordboy at users.noreply.github.com>
+Date: Mon, 18 Mar 2019 22:04:56 +0000
+Subject: [PATCH] Update to kernel 5.1
+
+---
+ README.md              | 2 +-
+ os_dep/osdep_service.c | 4 ++++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/README.md b/README.md
+index 74514dc..074018d 100644
+--- a/README.md
++++ b/README.md
+@@ -4,7 +4,7 @@
+ 
+ Only supports 8812AU chipset.
+ 
+-Works fine with 5.0-rc2 kernel. Source now builds with no warnings or errors.
++Works fine with 5.1-rc1 kernel. Source now builds with no warnings or errors.
+ 
+ Greatly improved stability due to huge rewrite of phydm - "4 second glitch" seems to have been fixed, or at least vastly reduced, in driver version 5.2.20.2.
+ 
+diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c
+index 5823d59..407fdfc 100644
+--- a/os_dep/osdep_service.c
++++ b/os_dep/osdep_service.c
+@@ -2072,6 +2072,10 @@ static int writeFile(struct file *fp, char *buf, int len)
+ 
+ }
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
++  #define get_ds() (KERNEL_DS)
++#endif
++
+ /*
+ * Test if the specifi @param path is a file and readable
+ * If readable, @param sz is got
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rtl8812au.git/commitdiff/c54a2f38177509a4ca3c70150c9dda4254a0cb6f



More information about the pld-cvs-commit mailing list