aboutsummaryrefslogtreecommitdiffstats
path: root/package/ath9k/patches
diff options
context:
space:
mode:
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__);