aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-21 15:37:43 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-01-21 15:37:43 +0000
commitb5f1545686aab34894cf5e1d3291a4147241f7d7 (patch)
tree1b3ceb5136e6e4e86a6a91c05c3bf714be6bbcf6 /package
parent54e32dab8c148730033a95a41a5236c45b1629c8 (diff)
downloadmaster-187ad058-b5f1545686aab34894cf5e1d3291a4147241f7d7.tar.gz
master-187ad058-b5f1545686aab34894cf5e1d3291a4147241f7d7.tar.bz2
master-187ad058-b5f1545686aab34894cf5e1d3291a4147241f7d7.zip
ath9k: ignore EEPROM mismatch on flash based devices (fixes #21611)
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48438 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/kernel/mac80211/patches/310-ath9k_hw-ignore-eeprom-magic-mismatch-on-flash-based.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/310-ath9k_hw-ignore-eeprom-magic-mismatch-on-flash-based.patch b/package/kernel/mac80211/patches/310-ath9k_hw-ignore-eeprom-magic-mismatch-on-flash-based.patch
new file mode 100644
index 0000000000..287d6e13bd
--- /dev/null
+++ b/package/kernel/mac80211/patches/310-ath9k_hw-ignore-eeprom-magic-mismatch-on-flash-based.patch
@@ -0,0 +1,38 @@
+From: Felix Fietkau <nbd@openwrt.org>
+Date: Thu, 21 Jan 2016 16:28:44 +0100
+Subject: [PATCH] ath9k_hw: ignore eeprom magic mismatch on flash based devices
+
+Many AR913x based devices (maybe others too) do not have a valid EEPROM
+magic in their calibration data partition.
+
+Fixes: 6fa658fd5ab2 ("ath9k: Simplify and fix eeprom endianness swapping")
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+---
+
+--- a/drivers/net/wireless/ath/ath9k/eeprom.c
++++ b/drivers/net/wireless/ath/ath9k/eeprom.c
+@@ -150,18 +150,18 @@ int ath9k_hw_nvram_swap_data(struct ath_
+ return -EIO;
+ }
+
+- if (magic == AR5416_EEPROM_MAGIC) {
+- *swap_needed = false;
+- } else if (swab16(magic) == AR5416_EEPROM_MAGIC) {
++ *swap_needed = false;
++ if (swab16(magic) == AR5416_EEPROM_MAGIC) {
+ if (ah->ah_flags & AH_NO_EEP_SWAP) {
+ ath_info(common,
+ "Ignoring endianness difference in EEPROM magic bytes.\n");
+-
+- *swap_needed = false;
+ } else {
+ *swap_needed = true;
+ }
+- } else {
++ } else if (magic != AR5416_EEPROM_MAGIC) {
++ if (ath9k_hw_use_flash(ah))
++ return 0;
++
+ ath_err(common,
+ "Invalid EEPROM Magic (0x%04x).\n", magic);
+ return -EINVAL;