diff options
| author | Kalle Valo <kvalo@codeaurora.org> | 2016-01-26 08:41:30 -0500 |
|---|---|---|
| committer | Kalle Valo <kvalo@codeaurora.org> | 2016-01-26 08:43:40 -0500 |
| commit | 36efee8e9ccb60ddff95e4e9be6dab3c21b9a334 (patch) | |
| tree | 7c372dba3ba71bcdb37a5bc282b890f9bd896e19 | |
| parent | c72fc9093718a3f8597249863a1bac345ba00859 (diff) | |
| parent | 65dc1a5d1efb0ec54ffb715468070890d27d63fc (diff) | |
Merge ath-current from ath.git
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom.c | 12 |
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) | |||
| 150 | return -EIO; | 150 | return -EIO; |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | if (magic == AR5416_EEPROM_MAGIC) { | 153 | *swap_needed = false; |
| 154 | *swap_needed = false; | 154 | if (swab16(magic) == AR5416_EEPROM_MAGIC) { |
| 155 | } else if (swab16(magic) == AR5416_EEPROM_MAGIC) { | ||
| 156 | if (ah->ah_flags & AH_NO_EEP_SWAP) { | 155 | if (ah->ah_flags & AH_NO_EEP_SWAP) { |
| 157 | ath_info(common, | 156 | ath_info(common, |
| 158 | "Ignoring endianness difference in EEPROM magic bytes.\n"); | 157 | "Ignoring endianness difference in EEPROM magic bytes.\n"); |
| 159 | |||
| 160 | *swap_needed = false; | ||
| 161 | } else { | 158 | } else { |
| 162 | *swap_needed = true; | 159 | *swap_needed = true; |
| 163 | } | 160 | } |
| 164 | } else { | 161 | } else if (magic != AR5416_EEPROM_MAGIC) { |
| 162 | if (ath9k_hw_use_flash(ah)) | ||
| 163 | return 0; | ||
| 164 | |||
| 165 | ath_err(common, | 165 | ath_err(common, |
| 166 | "Invalid EEPROM Magic (0x%04x).\n", magic); | 166 | "Invalid EEPROM Magic (0x%04x).\n", magic); |
| 167 | return -EINVAL; | 167 | return -EINVAL; |
