summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authortomsik682016-08-19 14:00:02 +0200
committertomsik682016-08-19 14:00:02 +0200
commit0101fecdd11ff4d7fbf75dcc4129d8e9ee344c97 (patch)
treeff512746113aaa509b08911fba3abc76834e3839
parent504aa60dc2657240bf260bf8244393247fd67f34 (diff)
downloadaur-0101fecdd11ff4d7fbf75dcc4129d8e9ee344c97.tar.gz
Fixed driver building on new kernels
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD7
-rw-r--r--pci_word_fix_4.7.patch36
3 files changed, 43 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4bc9c38a2d97..bbca3067b90b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -18,12 +18,14 @@ pkgbase = rt5592sta_linux_patched-dkms
source = extra.patch
source = 4.9_preperation.patch
source = dkms.conf
+ source = pci_word_fix_4.7.patch
sha1sums = 955b29d74fd66576b86dd1feee107f73b4605e3e
sha1sums = d938f53945eb5e6c88eb58a942c451c61122cec1
sha1sums = 7a11b444f9861463bdfbbafe95c7443d9e1767aa
sha1sums = 3574c691fb771459471fcd2297b10003ccbea875
sha1sums = 20420077e9e008c5b88305e420dd8969ffd41807
sha1sums = 44a0dad0043e3482dec70d490325e651e333c72f
+ sha1sums = 569f650a745944213578cbdc88fd12ffb57641c6
depends_i686 = glibc
depends_x86_64 = lib32-glibc
diff --git a/PKGBUILD b/PKGBUILD
index e3d614c6004e..212fd4648bbc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -30,13 +30,15 @@ source=("http://dlcdnet.asus.com/pub/ASUS/wireless/PCE-N53/${_zippkgname}.zip"
'extra.patch'
'4.9_preperation.patch'
'dkms.conf'
+ 'pci_word_fix_4.7.patch'
)
sha1sums=('955b29d74fd66576b86dd1feee107f73b4605e3e'
'd938f53945eb5e6c88eb58a942c451c61122cec1'
'7a11b444f9861463bdfbbafe95c7443d9e1767aa'
'3574c691fb771459471fcd2297b10003ccbea875'
- '20420077e9e008c5b88305e420dd8969ffd41807'
- '44a0dad0043e3482dec70d490325e651e333c72f')
+ '20420077e9e008c5b88305e420dd8969ffd41807'
+ '44a0dad0043e3482dec70d490325e651e333c72f'
+ '569f650a745944213578cbdc88fd12ffb57641c6')
build() {
cd "${srcdir}/Linux"
@@ -49,6 +51,7 @@ build() {
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"
}
package() {
diff --git a/pci_word_fix_4.7.patch b/pci_word_fix_4.7.patch
new file mode 100644
index 000000000000..b813c3f20aac
--- /dev/null
+++ b/pci_word_fix_4.7.patch
@@ -0,0 +1,36 @@
+--- 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);
+