aboutsummaryrefslogtreecommitdiffstats
path: root/package/ath9k/patches
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-07-20 11:44:14 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-07-20 11:44:14 +0000
commit58da1d033b406f944a6174f99ee8243381a34bf5 (patch)
tree2c25348dc60e9617de004d32d58f386a89a737f9 /package/ath9k/patches
parent101c4aa3092cdd9aefb441562f1c5bdf83312fb3 (diff)
downloadupstream-58da1d033b406f944a6174f99ee8243381a34bf5.tar.gz
upstream-58da1d033b406f944a6174f99ee8243381a34bf5.tar.bz2
upstream-58da1d033b406f944a6174f99ee8243381a34bf5.zip
add the new ath9k driver (loads successfully on an AR9160 card, but still seems to have some rf issues)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11884 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/ath9k/patches')
-rw-r--r--package/ath9k/patches/100-bad_udelay.patch15
-rw-r--r--package/ath9k/patches/110-regd_includes.patch15
-rw-r--r--package/ath9k/patches/120-devid.patch23
-rw-r--r--package/ath9k/patches/130-eeprom.patch16
4 files changed, 69 insertions, 0 deletions
diff --git a/package/ath9k/patches/100-bad_udelay.patch b/package/ath9k/patches/100-bad_udelay.patch
new file mode 100644
index 0000000000..98f33d7176
--- /dev/null
+++ b/package/ath9k/patches/100-bad_udelay.patch
@@ -0,0 +1,15 @@
+Replace udelay(3000) with mdelay(3), because udelay(3000) fails on ARM
+
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+
+--- a/drivers/net/wireless/ath9k/recv.c
++++ b/drivers/net/wireless/ath9k/recv.c
+@@ -737,7 +737,7 @@
+ ath9k_hw_stoppcurecv(ah); /* disable PCU */
+ ath9k_hw_setrxfilter(ah, 0); /* clear recv filter */
+ stopped = ath9k_hw_stopdmarecv(ah); /* disable DMA engine */
+- udelay(3000); /* 3ms is long enough for 1 frame */
++ mdelay(3); /* 3ms is long enough for 1 frame */
+ tsf = ath9k_hw_gettsf64(ah);
+ sc->sc_rxlink = NULL; /* just in case */
+ return stopped;
diff --git a/package/ath9k/patches/110-regd_includes.patch b/package/ath9k/patches/110-regd_includes.patch
new file mode 100644
index 0000000000..e928da85b9
--- /dev/null
+++ b/package/ath9k/patches/110-regd_includes.patch
@@ -0,0 +1,15 @@
+Add missing include statements
+
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+
+--- a/drivers/net/wireless/ath9k/regd.c
++++ b/drivers/net/wireless/ath9k/regd.c
+@@ -14,6 +14,8 @@
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
++#include <linux/kernel.h>
++#include <linux/slab.h>
+ #include "ath9k.h"
+ #include "regd.h"
+ #include "regd_common.h"
diff --git a/package/ath9k/patches/120-devid.patch b/package/ath9k/patches/120-devid.patch
new file mode 100644
index 0000000000..d9999f262e
--- /dev/null
+++ b/package/ath9k/patches/120-devid.patch
@@ -0,0 +1,23 @@
+Add missing device ID for AR9160
+
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+
+--- a/drivers/net/wireless/ath9k/hw.c
++++ b/drivers/net/wireless/ath9k/hw.c
+@@ -8329,6 +8329,8 @@
+ case AR5416_DEVID_PCI:
+ case AR5416_DEVID_PCIE:
+ return "Atheros 5416";
++ case AR9160_DEVID_PCI:
++ return "Atheros 9160";
+ case AR9280_DEVID_PCI:
+ case AR9280_DEVID_PCIE:
+ return "Atheros 9280";
+@@ -8350,6 +8352,7 @@
+ switch (devid) {
+ case AR5416_DEVID_PCI:
+ case AR5416_DEVID_PCIE:
++ case AR9160_DEVID_PCI:
+ case AR9280_DEVID_PCI:
+ case AR9280_DEVID_PCIE:
+ ah = ath9k_hw_do_attach(devid, sc, mem, error);
diff --git a/package/ath9k/patches/130-eeprom.patch b/package/ath9k/patches/130-eeprom.patch
new file mode 100644
index 0000000000..2ab5f381e8
--- /dev/null
+++ b/package/ath9k/patches/130-eeprom.patch
@@ -0,0 +1,16 @@
+Fix a return code check for ath9k_hw_nvram_read, this function returns
+AH_TRUE when the call succeeded
+
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+
+--- a/drivers/net/wireless/ath9k/hw.c
++++ b/drivers/net/wireless/ath9k/hw.c
+@@ -803,7 +803,7 @@
+ u_int16_t magic, magic2;
+ int addr;
+
+- if (ath9k_hw_nvram_read(ah, AR5416_EEPROM_MAGIC_OFFSET,
++ if (!ath9k_hw_nvram_read(ah, AR5416_EEPROM_MAGIC_OFFSET,
+ &magic)) {
+ HDPRINTF(ah, HAL_DBG_EEPROM,
+ "%s: Reading Magic # failed\n", __func__);