diff options
author | tomsik68 | 2015-06-09 12:03:47 +0200 |
---|---|---|
committer | tomsik68 | 2015-06-09 12:06:29 +0200 |
commit | deb3162e68aa4dbb1cb896a32f14253a7cc54e22 (patch) | |
tree | c037826bad83f81a4c76b6e97b4b9d44b1c54ec3 | |
download | aur-deb3162e68aa4dbb1cb896a32f14253a7cc54e22.tar.gz |
Import from AUR3(pkgrel 3)
-rw-r--r-- | .SRCINFO | 32 | ||||
-rwxr-xr-x | 4.9_preperation.patch | 11 | ||||
-rw-r--r-- | PKGBUILD | 89 | ||||
-rwxr-xr-x | arch_build_preparation.patch | 303 | ||||
-rw-r--r-- | dkms.conf | 10 | ||||
-rwxr-xr-x | extra.patch | 13 | ||||
-rwxr-xr-x | rt5592sta_fix_64bit_3.8.patch | 164 | ||||
-rw-r--r-- | rt5592sta_linux_patched-dkms.install | 18 |
8 files changed, 640 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..887a364a6dda --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,32 @@ +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 = 3 + url = http://asus.com + arch = i686 + arch = x86_64 + license = GPL + makedepends = make + makedepends = linux-headers + depends = dkms + 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 = dkms.conf + sha1sums = 955b29d74fd66576b86dd1feee107f73b4605e3e + sha1sums = d938f53945eb5e6c88eb58a942c451c61122cec1 + sha1sums = 7a11b444f9861463bdfbbafe95c7443d9e1767aa + sha1sums = 3574c691fb771459471fcd2297b10003ccbea875 + sha1sums = 20420077e9e008c5b88305e420dd8969ffd41807 + sha1sums = 44a0dad0043e3482dec70d490325e651e333c72f + depends_i686 = glibc + depends_x86_64 = lib32-glibc + +pkgname = rt5592sta_linux_patched-dkms + install = rt5592sta_linux_patched-dkms.install + diff --git a/4.9_preperation.patch b/4.9_preperation.patch new file mode 100755 index 000000000000..0fde57fa095d --- /dev/null +++ b/4.9_preperation.patch @@ -0,0 +1,11 @@ +--- 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 new file mode 100644 index 000000000000..58a468f8e99c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,89 @@ +# Maintainer: Tomas Jasek<tomsik68(at)gmail(dot)com> +# Contributor: Hamza Alloush<hamzaalloush(at)live(dot)com> +# Contributor: Eugen Dahm <eugen.dahm(at)gmail(dot)com> + + +# due to stupid naming conventions of the source package +_zippkgname=Linux_PCE_N53_1008 +_srctarname=DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326.tar.bz2 + +# name of the base package +_pkgbase=rt5592sta +pkgname=rt5592sta_linux_patched-dkms +pkgver=2.6.0.0 +pkgrel=3 +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" +license=('GPL') +depends=('dkms') +depends_x86_64=('lib32-glibc') +depends_i686=('glibc') +makedepends=(make linux-headers) +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' + 'dkms.conf' +) +sha1sums=('955b29d74fd66576b86dd1feee107f73b4605e3e' + 'd938f53945eb5e6c88eb58a942c451c61122cec1' + '7a11b444f9861463bdfbbafe95c7443d9e1767aa' + '3574c691fb771459471fcd2297b10003ccbea875' + '20420077e9e008c5b88305e420dd8969ffd41807' + '44a0dad0043e3482dec70d490325e651e333c72f') + +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" +} + +package() { + msg2 "Installing DKMS module..." + installDir="$pkgdir/usr/src/$pkgname-$pkgver" + + + install -dm755 "$installDir" + # Copy dkms.conf + msg2 "Copying dkms.conf..." + + install -m644 "${srcdir}/dkms.conf" "$installDir" + + # Set name and version in dkms.conf + msg2 "Configuring dkms.conf..." + sed -e "s/@_PKGBASE@/${_pkgbase}/" \ + -e "s/@PKGVER@/${pkgver}/" \ + -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` + do + install -dm755 "$installDir/$d" + done + for f in `find . -type f` + do + install -m644 "$(pwd)/$f" "$installDir/$f" + done + # TODO: + #cp RT2860STA.dat /etc/Wireless/RT2860STA/RT2860STA.dat + msg2 "Installing RT2860STA.dat" + install -dm755 "${pkgdir}/etc/Wireless/RT2860STA" + install -m644 "$(pwd)/RT2860STA.dat" "${pkgdir}/etc/Wireless/RT2860STA/RT2860STA.dat" + install=${pkgname}.install +} + +# vim:set ts=2 sw=2 et: diff --git a/arch_build_preparation.patch b/arch_build_preparation.patch new file mode 100755 index 000000000000..e550e3fae28e --- /dev/null +++ b/arch_build_preparation.patch @@ -0,0 +1,303 @@ +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/dkms.conf b/dkms.conf new file mode 100644 index 000000000000..ffcd62290937 --- /dev/null +++ b/dkms.conf @@ -0,0 +1,10 @@ +PACKAGE_NAME="@_PKGBASE@" +PACKAGE_VERSION="@PKGVER@" +#MAKE[0]="make --uname_r=$kernelver" +# only do make, DKMS will take care of "install" +# rename the file while copying to name of package :) +MAKE[0]="make && cp os/linux/rt5592sta.ko ./@_PKGBASE@.ko" +CLEAN="make clean" +BUILT_MODULE_NAME[0]="@_PKGBASE@" +DEST_MODULE_LOCATION[0]="/kernel/drivers/misc" +AUTOINSTALL="yes" diff --git a/extra.patch b/extra.patch new file mode 100755 index 000000000000..3bc675fa6763 --- /dev/null +++ b/extra.patch @@ -0,0 +1,13 @@ +--- 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/rt5592sta_fix_64bit_3.8.patch b/rt5592sta_fix_64bit_3.8.patch new file mode 100755 index 000000000000..48369b5853e4 --- /dev/null +++ b/rt5592sta_fix_64bit_3.8.patch @@ -0,0 +1,164 @@ +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) + } + + /* diff --git a/rt5592sta_linux_patched-dkms.install b/rt5592sta_linux_patched-dkms.install new file mode 100644 index 000000000000..ef5c2afabd66 --- /dev/null +++ b/rt5592sta_linux_patched-dkms.install @@ -0,0 +1,18 @@ +# old version (without -$pkgrel): ${1%%-*} +# new version (without -$pkgrel): ${2%%-*} + +post_install() { + dkms install rt5592sta_linux_patched-dkms/${1%%-*} +} + +pre_upgrade() { + pre_remove ${2%%-*} +} + +post_upgrade() { + post_install ${1%%-*} +} + +pre_remove() { + dkms remove rt5592sta_linux_patched-dkms/${1%%-*} --all +} |