summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Sheremet2020-12-24 20:53:44 +0300
committerDenis Sheremet2020-12-24 20:58:31 +0300
commit3772533c160dcd97fb02e1a04b342f33a02f71c5 (patch)
treebba80d9289654c847d6d1a2f6481fe47439e5e82
parent0101fecdd11ff4d7fbf75dcc4129d8e9ee344c97 (diff)
downloadaur-3772533c160dcd97fb02e1a04b342f33a02f71c5.tar.gz
fix for 5.* kernels
-rw-r--r--.SRCINFO21
-rwxr-xr-x4.9_preperation.patch11
-rw-r--r--PKGBUILD44
-rwxr-xr-xarch_build_preparation.patch303
-rwxr-xr-xextra.patch13
-rw-r--r--pci_word_fix_4.7.patch36
-rwxr-xr-xrt5592sta_fix_64bit_3.8.patch164
7 files changed, 16 insertions, 576 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bbca3067b90..d2353cfdc43 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,31 +1,22 @@
pkgbase = rt5592sta_linux_patched-dkms
pkgdesc = DKMS module which contains linux device driver for the Ralink RT2860 ABGN WLAN Card. It's based on halou89's rt5592sta_linux_patched package.
pkgver = 2.6.0.0
- pkgrel = 4
+ pkgrel = 6
url = http://asus.com
arch = i686
arch = x86_64
license = GPL
+ makedepends = git
depends = dkms
depends = make
depends = linux-headers
- conflicts = rt5592sta_linux,
- conflicts = rt5592sta_linux_patched,
+ conflicts = rt5592sta_linux
+ conflicts = rt5592sta_linux_patched
conflicts = rt5592sta_linux_patched-dkms
- source = http://dlcdnet.asus.com/pub/ASUS/wireless/PCE-N53/Linux_PCE_N53_1008.zip
- source = arch_build_preparation.patch
- source = rt5592sta_fix_64bit_3.8.patch
- source = extra.patch
- source = 4.9_preperation.patch
+ source = asus-pce-n53-linux::git+https://github.com/lesf0/asus-pce-n53-linux.git
source = dkms.conf
- source = pci_word_fix_4.7.patch
- sha1sums = 955b29d74fd66576b86dd1feee107f73b4605e3e
- sha1sums = d938f53945eb5e6c88eb58a942c451c61122cec1
- sha1sums = 7a11b444f9861463bdfbbafe95c7443d9e1767aa
- sha1sums = 3574c691fb771459471fcd2297b10003ccbea875
- sha1sums = 20420077e9e008c5b88305e420dd8969ffd41807
+ sha1sums = SKIP
sha1sums = 44a0dad0043e3482dec70d490325e651e333c72f
- sha1sums = 569f650a745944213578cbdc88fd12ffb57641c6
depends_i686 = glibc
depends_x86_64 = lib32-glibc
diff --git a/4.9_preperation.patch b/4.9_preperation.patch
deleted file mode 100755
index 0fde57fa095..00000000000
--- a/4.9_preperation.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/sta/sta_cfg.c 2014-06-17 04:37:11.297921533 +0300
-+++ b/sta/sta_cfg.c 2014-06-17 04:40:56.588334326 +0300
-@@ -4893,7 +4893,7 @@
- wrq->u.data.length = strlen(extra) + 1; /* 1: size of '\0' */
- break;
- case SHOW_DRVIER_VERION:
-- snprintf(extra, size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, __DATE__, __TIME__ );
-+ snprintf(extra, size, "Driver version-%s\n", STA_DRIVER_VERSION);
- wrq->u.data.length = strlen(extra) + 1; /* 1: size of '\0' */
- break;
- #ifdef DOT11_N_SUPPORT
diff --git a/PKGBUILD b/PKGBUILD
index 212fd4648bb..4c216ee0147 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,7 +11,7 @@ _srctarname=DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326.tar.bz2
_pkgbase=rt5592sta
pkgname=rt5592sta_linux_patched-dkms
pkgver=2.6.0.0
-pkgrel=4
+pkgrel=6
pkgdesc="DKMS module which contains linux device driver for the Ralink RT2860 ABGN WLAN Card. It's based on halou89's rt5592sta_linux_patched package."
arch=('i686' 'x86_64')
url="http://asus.com"
@@ -19,40 +19,16 @@ license=('GPL')
depends=('dkms' 'make' 'linux-headers' )
depends_x86_64=('lib32-glibc')
depends_i686=('glibc')
-makedepends=()
-conflicts=("rt5592sta_linux", "rt5592sta_linux_patched", "rt5592sta_linux_patched-dkms")
+makedepends=('git')
+conflicts=("rt5592sta_linux" "rt5592sta_linux_patched" "rt5592sta_linux_patched-dkms")
optdepends=()
options=()
changelog=
-source=("http://dlcdnet.asus.com/pub/ASUS/wireless/PCE-N53/${_zippkgname}.zip"
- 'arch_build_preparation.patch'
- 'rt5592sta_fix_64bit_3.8.patch'
- 'extra.patch'
- '4.9_preperation.patch'
+source=("asus-pce-n53-linux::git+https://github.com/lesf0/asus-pce-n53-linux.git"
'dkms.conf'
- 'pci_word_fix_4.7.patch'
)
-sha1sums=('955b29d74fd66576b86dd1feee107f73b4605e3e'
- 'd938f53945eb5e6c88eb58a942c451c61122cec1'
- '7a11b444f9861463bdfbbafe95c7443d9e1767aa'
- '3574c691fb771459471fcd2297b10003ccbea875'
- '20420077e9e008c5b88305e420dd8969ffd41807'
- '44a0dad0043e3482dec70d490325e651e333c72f'
- '569f650a745944213578cbdc88fd12ffb57641c6')
-
-build() {
- cd "${srcdir}/Linux"
- tar -xjf ${_srctarname}
- cd $(basename -s .tar.bz2 $_srctarname)
- msg2 "Applying patches..."
- # patch the moronic makefile
- patch -p1 -i "${srcdir}/arch_build_preparation.patch"
- # patching for 3.8 kernel compatibility
- patch -p1 -i "${srcdir}/rt5592sta_fix_64bit_3.8.patch"
- patch -p1 -i "${srcdir}/extra.patch"
- patch -p1 -i "${srcdir}/4.9_preperation.patch"
- patch -p1 -i "${srcdir}/pci_word_fix_4.7.patch"
-}
+sha1sums=('SKIP'
+ '44a0dad0043e3482dec70d490325e651e333c72f')
package() {
msg2 "Installing DKMS module..."
@@ -72,12 +48,12 @@ package() {
-i "$installDir/dkms.conf"
msg2 "Copying sources..."
# Copy sources
- cd "${srcdir}/Linux/DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326/"
- for d in `find . -type d`
+ cd "${srcdir}/asus-pce-n53-linux/"
+ for d in `find . -type d | grep -v '.git'`
do
- install -dm755 "$installDir/$d"
+ install -dm755 "$installDir/$d"
done
- for f in `find . -type f`
+ for f in `find . -type f | grep -v '.git' | grep -v Quick`
do
install -m644 "$(pwd)/$f" "$installDir/$f"
done
diff --git a/arch_build_preparation.patch b/arch_build_preparation.patch
deleted file mode 100755
index e550e3fae28..00000000000
--- a/arch_build_preparation.patch
+++ /dev/null
@@ -1,303 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 533ea7c..e1d79e9 100644
---- a/Makefile
-+++ b/Makefile
-@@ -332,7 +332,7 @@ THREADX:
- $(MAKE) -C $(RT28xx_DIR)/os/Threadx -f $(RT28xx_DIR)/os/ThreadX/Makefile
-
- LINUX:
--ifneq (,$(findstring 2.4,$(LINUX_SRC)))
-+ifneq (,$(findstring 2.4,$(LINUX_SRC)))
-
- ifeq ($(OSABL),YES)
- cp -f os/linux/Makefile.4.util $(RT28xx_DIR)/os/linux/Makefile
-@@ -347,30 +347,6 @@ ifeq ($(OSABL),YES)
- $(MAKE) -C $(RT28xx_DIR)/os/linux/
- endif
-
--ifeq ($(RT28xx_MODE),AP)
-- cp -f $(RT28xx_DIR)/os/linux/rt$(MODULE)ap.o /tftpboot
--ifeq ($(OSABL),YES)
-- cp -f $(RT28xx_DIR)/os/linux/rtutil$(MODULE)ap.o /tftpboot
-- cp -f $(RT28xx_DIR)/os/linux/rtnet$(MODULE)ap.o /tftpboot
--endif
--ifeq ($(PLATFORM),INF_AMAZON_SE)
-- cp -f /tftpboot/rt2870ap.o /backup/ifx/build/root_filesystem/lib/modules/2.4.31-Amazon_SE-3.6.2.2-R0416_Ralink/kernel/drivers/net
--endif
--else
--ifeq ($(RT28xx_MODE),APSTA)
-- cp -f $(RT28xx_DIR)/os/linux/rt$(MODULE)apsta.o /tftpboot
--ifeq ($(OSABL),YES)
-- cp -f $(RT28xx_DIR)/os/linux/rtutil$(MODULE)apsta.o /tftpboot
-- cp -f $(RT28xx_DIR)/os/linux/rtnet$(MODULE)apsta.o /tftpboot
--endif
--else
-- cp -f $(RT28xx_DIR)/os/linux/rt$(MODULE)sta.o /tftpboot
--ifeq ($(OSABL),YES)
-- cp -f $(RT28xx_DIR)/os/linux/rtutil$(MODULE)sta.o /tftpboot
-- cp -f $(RT28xx_DIR)/os/linux/rtnet$(MODULE)sta.o /tftpboot
--endif
--endif
--endif
- else
-
- ifeq ($(OSABL),YES)
-@@ -394,29 +370,7 @@ ifeq ($(OSABL),YES)
- $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
- endif
-
--ifeq ($(RT28xx_MODE),AP)
-- cp -f $(RT28xx_DIR)/os/linux/rt$(MODULE)ap.ko /tftpboot
--ifeq ($(OSABL),YES)
-- cp -f $(RT28xx_DIR)/os/linux/rtutil$(MODULE)ap.ko /tftpboot
-- cp -f $(RT28xx_DIR)/os/linux/rtnet$(MODULE)ap.ko /tftpboot
--endif
-- rm -f os/linux/rt$(MODULE)ap.ko.lzma
-- /root/bin/lzma e os/linux/rt$(MODULE)ap.ko os/linux/rt$(MODULE)ap.ko.lzma
--else
--ifeq ($(RT28xx_MODE),APSTA)
-- cp -f $(RT28xx_DIR)/os/linux/rt$(MODULE)apsta.ko /tftpboot
--ifeq ($(OSABL),YES)
-- cp -f $(RT28xx_DIR)/os/linux/rtutil$(MODULE)apsta.ko /tftpboot
-- cp -f $(RT28xx_DIR)/os/linux/rtnet$(MODULE)apsta.ko /tftpboot
--endif
--else
-- cp -f $(RT28xx_DIR)/os/linux/rt$(MODULE)sta.ko /tftpboot
--ifeq ($(OSABL),YES)
-- cp -f $(RT28xx_DIR)/os/linux/rtutil$(MODULE)sta.ko /tftpboot
-- cp -f $(RT28xx_DIR)/os/linux/rtnet$(MODULE)sta.ko /tftpboot
--endif
--endif
--endif
-+
- endif
-
-
-@@ -467,14 +421,81 @@ endif
- endif
-
- install:
-+
- ifeq ($(TARGET), LINUX)
- ifneq (,$(findstring 2.4,$(LINUX_SRC)))
- $(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.4 install
-+
-+
- else
- $(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.6 install
-+
- endif
- endif
-
-+############# START IF PART TO MOVE TO INSTALL TARGET
-+## START PART TO BE ADDED
-+ifneq (,$(findstring 2.4,$(LINUX_SRC)))
-+## END PART TO BE ADDED
-+ifeq ($(RT28xx_MODE),AP)
-+ cp -f $(RT28xx_DIR)/os/linux/rt$(MODULE)ap.o $(DESTDIR)/tftpboot
-+ifeq ($(OSABL),YES)
-+ cp -f $(RT28xx_DIR)/os/linux/rtutil$(MODULE)ap.o $(DESTDIR)/tftpboot
-+ cp -f $(RT28xx_DIR)/os/linux/rtnet$(MODULE)ap.o $(DESTDIR)/tftpboot
-+endif
-+ifeq ($(PLATFORM),INF_AMAZON_SE)
-+ cp -f /tftpboot/rt2870ap.o $(DESTDIR)/backup/ifx/build/root_filesystem/lib/modules/2.4.31-Amazon_SE-3.6.2.2-R0416_Ralink/kernel/drivers/net
-+endif
-+else
-+ifeq ($(RT28xx_MODE),APSTA)
-+ cp -f $(RT28xx_DIR)/os/linux/rt$(MODULE)apsta.o $(DESTDIR)/tftpboot
-+ifeq ($(OSABL),YES)
-+ cp -f $(RT28xx_DIR)/os/linux/rtutil$(MODULE)apsta.o $(DESTDIR)/tftpboot
-+ cp -f $(RT28xx_DIR)/os/linux/rtnet$(MODULE)apsta.o $(DESTDIR)/tftpboot
-+endif
-+else
-+ cp -f $(RT28xx_DIR)/os/linux/rt$(MODULE)sta.o $(DESTDIR)/tftpboot
-+ifeq ($(OSABL),YES)
-+ cp -f $(RT28xx_DIR)/os/linux/rtutil$(MODULE)sta.o $(DESTDIR)/tftpboot
-+ cp -f $(RT28xx_DIR)/os/linux/rtnet$(MODULE)sta.o $(DESTDIR)/tftpboot
-+endif
-+endif
-+endif
-+
-+## START PART TO BE MOVED TO INSTALL
-+else
-+
-+ifeq ($(RT28xx_MODE),AP)
-+ cp -f $(RT28xx_DIR)/os/linux/rt$(MODULE)ap.ko $(DESTDIR)/tftpboot
-+ifeq ($(OSABL),YES)
-+ cp -f $(RT28xx_DIR)/os/linux/rtutil$(MODULE)ap.ko $(DESTDIR)/tftpboot
-+ cp -f $(RT28xx_DIR)/os/linux/rtnet$(MODULE)ap.ko $(DESTDIR)/tftpboot
-+endif
-+ rm -f os/linux/rt$(MODULE)ap.ko.lzma
-+ /root/bin/lzma e os/linux/rt$(MODULE)ap.ko os/linux/rt$(MODULE)ap.ko.lzma
-+else
-+ifeq ($(RT28xx_MODE),APSTA)
-+ cp -f $(RT28xx_DIR)/os/linux/rt$(MODULE)apsta.ko $(DESTDIR)/tftpboot
-+ifeq ($(OSABL),YES)
-+ cp -f $(RT28xx_DIR)/os/linux/rtutil$(MODULE)apsta.ko $(DESTDIR)/tftpboot
-+ cp -f $(RT28xx_DIR)/os/linux/rtnet$(MODULE)apsta.ko $(DESTDIR)/tftpboot
-+endif
-+else
-+ cp -f $(RT28xx_DIR)/os/linux/rt$(MODULE)sta.ko $(DESTDIR)/tftpboot
-+ifeq ($(OSABL),YES)
-+ cp -f $(RT28xx_DIR)/os/linux/rtutil$(MODULE)sta.ko $(DESTDIR)/tftpboot
-+ cp -f $(RT28xx_DIR)/os/linux/rtnet$(MODULE)sta.ko $(DESTDIR)/tftpboot
-+endif
-+endif
-+endif
-+## END PART TO BE MOVED TO INSTALL
-+
-+## START PART TO BE ADDED
-+endif
-+## END PART TO BE ADDED
-+############# END IF PART TO MOVE TO INSTALL TARGET
-+
-+
- libwapi:
- ifneq (,$(findstring 2.4,$(LINUX_SRC)))
- cp -f os/linux/Makefile.libwapi.4 $(RT28xx_DIR)/os/linux/Makefile
-diff --git a/os/linux/Makefile.4 b/os/linux/Makefile.4
-index 2db303c..010ace7 100644
---- a/os/linux/Makefile.4
-+++ b/os/linux/Makefile.4
-@@ -278,14 +278,14 @@ install:
- $(shell [ ! -f /etc/Wireless ] && mkdir /etc/Wireless)
- mkdir $(DAT_PATH)
- cp $(RT28xx_DIR)/$(DAT_FILE_NAME) $(DAT_PATH)/.
-- install -d $(LINUX_SRC_MODULE)
-- install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(LINUX_SRC_MODULE)
-- /sbin/depmod -a ${shell uname -r}
-+ install -d $(DESTDIR)$(LINUX_SRC_MODULE)
-+ install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(DESTDIR)$(LINUX_SRC_MODULE)
-+# /sbin/depmod -a ${shell uname -r}
-
- uninstall:
--# rm -rf $(DAT_PATH)
-- rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .o,$(MOD_NAME)))
-- /sbin/depmod -a ${shell uname -r}
-+ rm -rf $(DESTDIR)$(DAT_PATH)
-+ rm -rf $(addprefix $(DESTDIR)$(LINUX_SRC_MODULE),$(addsuffix .o,$(MOD_NAME)))
-+# /sbin/depmod -a ${shell uname -r}
-
- # Declare the contents of the .PHONY variable as phony. We keep that
- # information in a variable so we can use it in if_changed and friends.
-diff --git a/os/linux/Makefile.4.netif b/os/linux/Makefile.4.netif
-index c8cc93c..820f707 100644
---- a/os/linux/Makefile.4.netif
-+++ b/os/linux/Makefile.4.netif
-@@ -92,13 +92,13 @@ endif
- endif
-
- install:
-- install -d $(LINUX_SRC_MODULE)
-- install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(LINUX_SRC_MODULE)
-- /sbin/depmod -a ${shell uname -r}
-+ install -d $(DESTDIR)$(LINUX_SRC_MODULE)
-+ install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(DESTDIR)$(LINUX_SRC_MODULE)
-+# /sbin/depmod -a ${shell uname -r}
-
- uninstall:
-- rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .o,$(MOD_NAME)))
-- /sbin/depmod -a ${shell uname -r}
-+ rm -rf $(addprefix $(DESTDIR)$(LINUX_SRC_MODULE),$(addsuffix .o,$(MOD_NAME)))
-+# /sbin/depmod -a ${shell uname -r}
-
- # Declare the contents of the .PHONY variable as phony. We keep that
- # # information in a variable so we can use it in if_changed and friends.
-diff --git a/os/linux/Makefile.4.util b/os/linux/Makefile.4.util
-index 69e401c..dd7b05a 100644
---- a/os/linux/Makefile.4.util
-+++ b/os/linux/Makefile.4.util
-@@ -63,13 +63,13 @@ endif
- endif
-
- install:
-- install -d $(LINUX_SRC_MODULE)
-- install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(LINUX_SRC_MODULE)
-- /sbin/depmod -a ${shell uname -r}
-+ install -d $(DESTDIR)$(LINUX_SRC_MODULE)
-+ install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(DESTDIR)$(LINUX_SRC_MODULE)
-+# /sbin/depmod -a ${shell uname -r}
-
- uninstall:
-- rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .o,$(MOD_NAME)))
-- /sbin/depmod -a ${shell uname -r}
-+ rm -rf $(addprefix $(DESTDIR)$(LINUX_SRC_MODULE),$(addsuffix .o,$(MOD_NAME)))
-+# /sbin/depmod -a ${shell uname -r}
-
- # Declare the contents of the .PHONY variable as phony. We keep that
- # # information in a variable so we can use it in if_changed and friends.
-diff --git a/os/linux/Makefile.6 b/os/linux/Makefile.6
-index 28c5530..1ae4e52 100644
---- a/os/linux/Makefile.6
-+++ b/os/linux/Makefile.6
-@@ -291,18 +291,18 @@ endif
- endif
-
- install:
-- rm -rf $(DAT_PATH)
-- $(shell [ ! -f /etc/Wireless ] && mkdir /etc/Wireless)
-- mkdir $(DAT_PATH)
-- cp $(RT28xx_DIR)/$(DAT_FILE_NAME) $(DAT_PATH)/.
-- install -d $(LINUX_SRC_MODULE)
-- install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(LINUX_SRC_MODULE)
-- /sbin/depmod -a ${shell uname -r}
-+ rm -rf $(DESTDIR)$(DAT_PATH)
-+ $(shell [ ! -f $(DESTDIR)etc/Wireless ] && mkdir -p $(DESTDIR)/etc/Wireless)
-+ mkdir -p $(DESTDIR)$(DAT_PATH)
-+ cp $(RT28xx_DIR)/$(DAT_FILE_NAME) $(DESTDIR)$(DAT_PATH)/.
-+ install -d $(DESTDIR)$(LINUX_SRC_MODULE)
-+ install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(DESTDIR)$(LINUX_SRC_MODULE)
-+# /sbin/depmod -a ${shell uname -r}
-
- uninstall:
--# rm -rf $(DAT_PATH)
-- rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .ko,$(MOD_NAME)))
-- /sbin/depmod -a ${shell uname -r}
-+ rm -rf $(DESTDIR)$(DAT_PATH)
-+ rm -rf $(addprefix $(DESTDIR)$(LINUX_SRC_MODULE),$(addsuffix .ko,$(MOD_NAME)))
-+# /sbin/depmod -a ${shell uname -r}
-
- # Declare the contents of the .PHONY variable as phony. We keep that
- # information in a variable so we can use it in if_changed and friends.
-diff --git a/os/linux/Makefile.6.netif b/os/linux/Makefile.6.netif
-index 968165d..1875607 100644
---- a/os/linux/Makefile.6.netif
-+++ b/os/linux/Makefile.6.netif
-@@ -88,10 +88,10 @@ endif
- endif
-
- install:
-- install -d $(LINUX_SRC_MODULE)
-- install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(LINUX_SRC_MODULE)
-- /sbin/depmod -a ${shell uname -r}
-+ install -d $(DESTDIR)$(LINUX_SRC_MODULE)
-+ install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(DESTDIR)$(LINUX_SRC_MODULE)
-+# /sbin/depmod -a ${shell uname -r}
-
- uninstall:
-- rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .ko,$(MOD_NAME)))
-- /sbin/depmod -a ${shell uname -r}
-+ rm -rf $(addprefix $(DESTDIR)$(LINUX_SRC_MODULE),$(addsuffix .ko,$(MOD_NAME)))
-+# /sbin/depmod -a ${shell uname -r}
-diff --git a/os/linux/Makefile.6.util b/os/linux/Makefile.6.util
-index 7510db6..2e4247e 100644
---- a/os/linux/Makefile.6.util
-+++ b/os/linux/Makefile.6.util
-@@ -48,10 +48,10 @@ endif
- endif
-
- install:
-- install -d $(LINUX_SRC_MODULE)
-- install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(LINUX_SRC_MODULE)
-+ install -d $(DESTDIR)$(LINUX_SRC_MODULE)
-+ install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(DESTDIR)$(LINUX_SRC_MODULE)
- /sbin/depmod -a ${shell uname -r}
-
- uninstall:
-- rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .ko,$(MOD_NAME)))
-+ rm -rf $(addprefix $(DESTDIR)$(LINUX_SRC_MODULE),$(addsuffix .ko,$(MOD_NAME)))
- /sbin/depmod -a ${shell uname -r}
-\ No newline at end of file
-diff --git a/tools/bin2h b/tools/bin2h
-index 25d0555..34bc25b 100755
-Binary files a/tools/bin2h and b/tools/bin2h differ
diff --git a/extra.patch b/extra.patch
deleted file mode 100755
index 3bc675fa676..00000000000
--- a/extra.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/include/os/rt_linux.h 2014-06-17 01:48:08.559748607 +0300
-+++ b/include/os/rt_linux.h 2014-06-17 01:49:43.045273571 +0300
-@@ -278,8 +278,8 @@
-
- typedef struct _OS_FS_INFO_
- {
-- int fsuid;
-- int fsgid;
-+ kuid_t fsuid;
-+ kgid_t fsgid;
- mm_segment_t fs;
- } OS_FS_INFO;
-
diff --git a/pci_word_fix_4.7.patch b/pci_word_fix_4.7.patch
deleted file mode 100644
index b813c3f20aa..00000000000
--- a/pci_word_fix_4.7.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- a/common/rtmp_mcu.c 2012-03-26 11:55:22.000000000 +0200
-+++ b/common/rtmp_mcu.c 2016-08-18 21:24:18.389453577 +0200
-@@ -441,7 +441,7 @@
-
- #ifdef CONFIG_STA_SUPPORT
- #ifdef PCIE_PS_SUPPORT
-- ULONG Configuration;
-+ u16 Configuration;
- ULONG offset;
- #endif /* PCIE_PS_SUPPORT */
- #endif /* CONFIG_STA_SUPPORT */
-@@ -556,10 +556,8 @@
- {
- offset = 0x70F;
- pci_read_config_word(((POS_COOKIE)pAd->OS_Cookie)->pci_dev, offset, &Configuration);
-- Configuration=le2cpu16(Configuration);
-- Configuration &= 0xffffff00;
-+ Configuration &= 0xff00;
- Configuration |= (0x13); /* set Latency to default */
-- Configuration=le2cpu16(Configuration);
- pci_write_config_word(((POS_COOKIE)pAd->OS_Cookie)->pci_dev, offset, Configuration);
- DBGPRINT(RT_DEBUG_TRACE, ("Write 70f; offset = %x, Configuration = %x. \n", offset, Configuration));
- }
-@@ -576,11 +574,9 @@
- offset = 0x70F;
- /* Configuration = RTMPReadCBConfigXP(pAd, offset); */
- pci_read_config_word(((POS_COOKIE)pAd->OS_Cookie)->pci_dev, offset, &Configuration);
-- Configuration=le2cpu16(Configuration);
-
-- Configuration &= 0xffffff00;
-+ Configuration &= 0xff00;
- Configuration |= (0x7F); // Set to long latency
-- Configuration=le2cpu16(Configuration);
-
- pci_write_config_word(((POS_COOKIE)pAd->OS_Cookie)->pci_dev, offset, Configuration);
-
diff --git a/rt5592sta_fix_64bit_3.8.patch b/rt5592sta_fix_64bit_3.8.patch
deleted file mode 100755
index 48369b5853e..00000000000
--- a/rt5592sta_fix_64bit_3.8.patch
+++ /dev/null
@@ -1,164 +0,0 @@
-diff --git a/include/os/rt_linux.h b/include/os/rt_linux.h
-index 8fe2b16..042b465 100644
---- a/include/os/rt_linux.h
-+++ b/include/os/rt_linux.h
-@@ -6,7 +6,7 @@
- * Taiwan, R.O.C.
- *
- * (c) Copyright 2002-2010, Ralink Technology, Inc.
-- *
-+ * Portions © 2013 Jesse Crews <jcrews at gridlox dot net>
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
-@@ -996,15 +996,15 @@ void linux_pci_unmap_single(void *handle, ra_dma_addr_t dma_addr, size_t size, i
- (RTPKT_TO_OSPKT(_pkt)->len) = (_len)
-
- #define GET_OS_PKT_DATATAIL(_pkt) \
-- (RTPKT_TO_OSPKT(_pkt)->tail)
-+ ((unsigned char*)skb_tail_pointer(RTPKT_TO_OSPKT(_pkt)))
- #define SET_OS_PKT_DATATAIL(_pkt, _start, _len) \
-- ((RTPKT_TO_OSPKT(_pkt))->tail) = (PUCHAR)((_start) + (_len))
-+ (skb_set_tail_pointer((RTPKT_TO_OSPKT(_pkt)), (_len)))
-
- #define GET_OS_PKT_HEAD(_pkt) \
- (RTPKT_TO_OSPKT(_pkt)->head)
-
- #define GET_OS_PKT_END(_pkt) \
-- (RTPKT_TO_OSPKT(_pkt)->end)
-+ ((unsigned char*)skb_end_pointer(RTPKT_TO_OSPKT(_pkt)))
-
- #define GET_OS_PKT_NETDEV(_pkt) \
- (RTPKT_TO_OSPKT(_pkt)->dev)
-diff --git a/os/linux/pci_main_dev.c b/os/linux/pci_main_dev.c
-index ebd3e57..6c17a67 100644
---- a/os/linux/pci_main_dev.c
-+++ b/os/linux/pci_main_dev.c
-@@ -6,7 +6,7 @@
- * Taiwan, R.O.C.
- *
- * (c) Copyright 2002-2010, Ralink Technology, Inc.
-- *
-+ * Portions © 2013, Jesse Crews <jcrews at gridlox dot net>
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
-@@ -39,8 +39,14 @@
- /*extern int rt28xx_close(IN struct net_device *net_dev); */
- /*extern int rt28xx_open(struct net_device *net_dev); */
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
-+static VOID rt2860_remove_one(struct pci_dev *pci_dev);
-+static INT rt2860_probe(struct pci_dev *pci_dev, const struct pci_device_id *ent);
-+#else
- static VOID __devexit rt2860_remove_one(struct pci_dev *pci_dev);
- static INT __devinit rt2860_probe(struct pci_dev *pci_dev, const struct pci_device_id *ent);
-+#endif
-+
- static void __exit rt2860_cleanup_module(void);
- static int __init rt2860_init_module(void);
-
-@@ -59,7 +65,11 @@ static int rt2860_resume(struct pci_dev *pci_dev);
- /* */
- /* Ralink PCI device table, include all supported chipsets */
- /* */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
-+static struct pci_device_id rt2860_pci_tbl[] =
-+#else
- static struct pci_device_id rt2860_pci_tbl[] __devinitdata =
-+#endif
- {
- #ifdef RT5592
- {PCI_DEVICE(NIC_PCI_VENDOR_ID, NIC5592_PCIe_DEVICE_ID)},
-@@ -86,11 +96,13 @@ static struct pci_driver rt2860_driver =
- name: RTMP_DRV_NAME,
- id_table: rt2860_pci_tbl,
- probe: rt2860_probe,
--#if LINUX_VERSION_CODE >= 0x20412
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0) /* 3.8 check */
-+#if LINUX_VERSION_CODE >= 0x20412
- remove: __devexit_p(rt2860_remove_one),
- #else
- remove: __devexit(rt2860_remove_one),
- #endif
-+#endif /* 3.8 check */
-
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
- #ifdef CONFIG_PM
-@@ -291,7 +303,11 @@ module_exit(rt2860_cleanup_module);
- /* */
- /* PCI device probe & initialization function */
- /* */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
-+static INT rt2860_probe(
-+#else
- static INT __devinit rt2860_probe(
-+#endif
- IN struct pci_dev *pci_dev,
- IN const struct pci_device_id *pci_id)
- {
-@@ -461,8 +477,11 @@ err_out:
- return -ENODEV; /* probe fail */
- }
-
--
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
-+static VOID rt2860_remove_one(
-+#else
- static VOID __devexit rt2860_remove_one(
-+#endif
- IN struct pci_dev *pci_dev)
- {
- PNET_DEV net_dev = pci_get_drvdata(pci_dev);
-diff --git a/os/linux/rt_linux.c b/os/linux/rt_linux.c
-index e7c8084..9dfebff 100644
---- a/os/linux/rt_linux.c
-+++ b/os/linux/rt_linux.c
-@@ -6,7 +6,7 @@
- * Taiwan, R.O.C.
- *
- * (c) Copyright 2002-2010, Ralink Technology, Inc.
-- *
-+ * Portions © Jesse Crews <jcrews at gridlox dot net>
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
-@@ -502,9 +502,9 @@ PNDIS_PACKET duplicate_pkt(
- MEM_DBG_PKT_ALLOC_INC(skb);
-
- skb_reserve(skb, 2);
-- NdisMoveMemory(skb->tail, pHeader802_3, HdrLen);
-+ NdisMoveMemory((unsigned char*)skb_tail_pointer(skb), pHeader802_3, HdrLen);
- skb_put(skb, HdrLen);
-- NdisMoveMemory(skb->tail, pData, DataSize);
-+ NdisMoveMemory((unsigned char*)skb_tail_pointer(skb), pData, DataSize);
- skb_put(skb, DataSize);
- skb->dev = pNetDev; /*get_netdev_from_bssid(pAd, FromWhichBSSID); */
- pPacket = OSPKT_TO_RTPKT(skb);
-@@ -656,7 +656,7 @@ PNDIS_PACKET ClonePacket(
- pClonedPkt->dev = pRxPkt->dev;
- pClonedPkt->data = pData;
- pClonedPkt->len = DataSize;
-- pClonedPkt->tail = pClonedPkt->data + pClonedPkt->len;
-+ skb_set_tail_pointer(pClonedPkt, DataSize);
- ASSERT(DataSize < 1530);
- }
- return pClonedPkt;
-@@ -702,7 +702,7 @@ void wlan_802_11_to_802_3_packet(
- pOSPkt->dev = pNetDev;
- pOSPkt->data = pData;
- pOSPkt->len = DataSize;
-- pOSPkt->tail = pOSPkt->data + pOSPkt->len;
-+ skb_set_tail_pointer(pOSPkt, DataSize);
-
- /* */
- /* copy 802.3 header */
-@@ -4933,7 +4933,7 @@ Note:
- */
- VOID RtmpOsPktTailAdjust(IN PNDIS_PACKET pNetPkt,
- IN UINT removedTagLen) {
-- OS_PKT_TAIL_ADJUST(pNetPkt, removedTagLen);
-+ skb_set_tail_pointer(pNetPkt, pNetPkt->len - removedTagLen)
- }
-
- /*