summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorindra17r2018-06-18 17:52:00 +0700
committerindra17r2018-06-18 17:52:00 +0700
commitbe581990c532fa43af623b9eb75b566e417c1c73 (patch)
tree476bfc28805cbc7a4e4d61d3f46a9d632a049a73
parentd1dae94a76933dd51f5caf2655c11f39aa9f5e75 (diff)
downloadaur-be581990c532fa43af623b9eb75b566e417c1c73.tar.gz
Linux 4.14 support
-rw-r--r--.SRCINFO2
-rw-r--r--001-MT7601u-Linux-4.x.patch24
-rw-r--r--PKGBUILD17
-rw-r--r--blacklist-mt7601u.conf1
4 files changed, 38 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 55a90c0147e..9a3ce5a54d4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = mt7601u-ap-dkms
pkgdesc = Kernel module for Ralink MT7601U chipset wireless adaptors with Access Point (AP / Master) support.
pkgver = 3.0.0.3
- pkgrel = 1
+ pkgrel = 2
url = http://www.ralinktech.com
install = mt7601u-ap-dkms.install
arch = any
diff --git a/001-MT7601u-Linux-4.x.patch b/001-MT7601u-Linux-4.x.patch
new file mode 100644
index 00000000000..61ccc2edc9a
--- /dev/null
+++ b/001-MT7601u-Linux-4.x.patch
@@ -0,0 +1,24 @@
+diff -ru MT7601u-2/src/include/os/rt_linux.h MT7601u/src/include/os/rt_linux.h
+--- MT7601u-2/src/include/os/rt_linux.h 2018-06-17 19:34:56.006528978 +0700
++++ MT7601u/src/include/os/rt_linux.h 2018-06-18 04:09:48.253593046 +0700
+@@ -83,6 +83,8 @@
+ #include <linux/kthread.h>
+ #endif /* KTHREAD_SUPPORT */
+
++/* For usage of kill_pid and friends. */
++#include <linux/sched/signal.h>
+
+ #include "os/rt_linux_cmm.h"
+
+diff -ru MT7601u-2/src/os/linux/rt_linux.c MT7601u/src/os/linux/rt_linux.c
+--- MT7601u-2/src/os/linux/rt_linux.c 2018-06-17 19:34:56.026529050 +0700
++++ MT7601u/src/os/linux/rt_linux.c 2018-06-18 05:15:53.294949852 +0700
+@@ -1165,7 +1165,7 @@
+ /* The object must have a read method */
+ if (osfd->f_op /*&& osfd->f_op->read*/) {
+ //return osfd->f_op->read(osfd, pDataPtr, readLen, &osfd->f_pos);
+- return vfs_read(osfd, pDataPtr, readLen, &osfd->f_pos);
++ return kernel_read(osfd, pDataPtr, readLen, &osfd->f_pos);
+ } else {
+ DBGPRINT(RT_DEBUG_ERROR, ("no file read method\n"));
+ return -1;
diff --git a/PKGBUILD b/PKGBUILD
index 9361251789f..6f64f7063be 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@ _pkgname=mt7601u-ap
pkgname=${_pkgname}-dkms
pkgver=3.0.0.3
_pkg=${_pkgname}-${pkgver}
-pkgrel=1
+pkgrel=2
pkgdesc="Kernel module for Ralink MT7601U chipset wireless adaptors with Access Point (AP / Master) support."
arch=('any')
url="http://www.ralinktech.com"
@@ -14,22 +14,26 @@ depends=('dkms')
conflicts=()
install=${pkgname}.install
options=(!strip)
-source=("https://github.com/housq/mt7601u/archive/master.zip"
+source=("https://github.com/setarcos/MT7601u/archive/master.zip"
#http://www.mediatek.com/AmazonS3/Downloads/linux/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2"
# "https://mt7601-openwrt.googlecode.com/hg/patches/001-DPO_MT7601U_LinuxSTA_3.0.0.4_20130913-Linux-3.17.0-v2.patch"
# "https://mt7601-openwrt.googlecode.com/hg/patches/002-rt2870-mt7601Usta-kuid_t-kgid_t.patch"
"mt7601u-ap.conf"
+ "blacklist-mt7601u.conf"
+ "001-MT7601u-Linux-4.x.patch"
"dkms.conf")
-sha256sums=('952e6200163132fd1ee3f01b739b842129dfc05282e6366c80ac191d87b38da6'
+sha256sums=('53a0b97563b61396b0bcde9ffeb677f7dbe46db764fb367517e0c99e90fd6e2f'
'5cb57146dcbc238feff1c0e1836dea995c33180892327eba02804a0755ce9a81'
+ '2c14cefbb3fe1229412f09129675948db40e60550ad8413dd31e8e24c9d7b189'
+ '3eacca3e1b034aba788ced29f452c47706e9b31ed7c624fb5c006ce751406f40'
'a4d4f94c9492f344d4baa05d5f5ce132eb3bf0f9fb6eec161a87eea9450ebc12')
prepare() {
- rm -rf "${srcdir}/mt7601u-master"
+ rm -rf "${srcdir}/MT7601u-master"
cd "${srcdir}"
unzip master.zip
- mv "${srcdir}/mt7601u-master" "${srcdir}/${_pkg}/"
+ mv "${srcdir}/MT7601u-master" "${srcdir}/${_pkg}/"
}
build() {
@@ -51,10 +55,13 @@ package() {
install -dm755 "$installDir"
install -m644 "${srcdir}/dkms.conf" "$installDir"
install -m644 "${srcdir}/mt7601u-ap.conf" "${pkgdir}/etc/modprobe.d/"
+ install -m644 "${srcdir}/blacklist-mt7601u.conf" "${pkgdir}/etc/modprobe.d/"
install -m644 "${srcdir}/${_pkg}/etc/Wireless/RT2870AP/RT2870AP.dat" "${pkgdir}/etc/Wireless/RT2870AP/"
cd "${srcdir}/${_pkg}/"
+ patch -p1 < ../001-MT7601u-Linux-4.x.patch
+
for d in `find . -type d`
do
install -dm755 "$installDir/$d"
diff --git a/blacklist-mt7601u.conf b/blacklist-mt7601u.conf
new file mode 100644
index 00000000000..6d44835c7cf
--- /dev/null
+++ b/blacklist-mt7601u.conf
@@ -0,0 +1 @@
+blacklist mt7601u