summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKalle Valo <kvalo@codeaurora.org>2016-01-26 14:41:30 +0100
committerKalle Valo <kvalo@codeaurora.org>2016-01-26 14:43:40 +0100
commit36efee8e9ccb60ddff95e4e9be6dab3c21b9a334 (patch)
tree7c372dba3ba71bcdb37a5bc282b890f9bd896e19 /drivers
parentrtlwifi: rtl8821ae: Fix 5G failure when EEPROM is incorrectly encoded (diff)
parentath9k_hw: ignore eeprom magic mismatch on flash based devices (diff)
downloadlinux-36efee8e9ccb60ddff95e4e9be6dab3c21b9a334.tar.xz
linux-36efee8e9ccb60ddff95e4e9be6dab3c21b9a334.zip
Merge ath-current from ath.git
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/eeprom.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c
index a7afdeee698c..73fb4232f9f2 100644
--- 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_hw *ah, bool *swap_needed, int size)
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;