summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorKalle Valo <kvalo@codeaurora.org>2016-01-26 16:41:30 +0300
committerKalle Valo <kvalo@codeaurora.org>2016-01-26 16:43:40 +0300
commit36efee8e9ccb60ddff95e4e9be6dab3c21b9a334 (patch)
tree7c372dba3ba71bcdb37a5bc282b890f9bd896e19 /drivers/net
parentc72fc9093718a3f8597249863a1bac345ba00859 (diff)
parent65dc1a5d1efb0ec54ffb715468070890d27d63fc (diff)
downloadlinux-36efee8e9ccb60ddff95e4e9be6dab3c21b9a334.tar.xz
Merge ath-current from ath.git
Diffstat (limited to 'drivers/net')
-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;