diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/eeprom_def.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom_def.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c index a8ac30a00720..1c25368b3836 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_def.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c | |||
@@ -91,17 +91,13 @@ static int ath9k_hw_def_get_eeprom_rev(struct ath_hw *ah) | |||
91 | 91 | ||
92 | static bool __ath9k_hw_def_fill_eeprom(struct ath_hw *ah) | 92 | static bool __ath9k_hw_def_fill_eeprom(struct ath_hw *ah) |
93 | { | 93 | { |
94 | struct ath_common *common = ath9k_hw_common(ah); | ||
95 | u16 *eep_data = (u16 *)&ah->eeprom.def; | 94 | u16 *eep_data = (u16 *)&ah->eeprom.def; |
96 | int addr, ar5416_eep_start_loc = 0x100; | 95 | int addr, ar5416_eep_start_loc = 0x100; |
97 | 96 | ||
98 | for (addr = 0; addr < SIZE_EEPROM_DEF; addr++) { | 97 | for (addr = 0; addr < SIZE_EEPROM_DEF; addr++) { |
99 | if (!ath9k_hw_nvram_read(common, addr + ar5416_eep_start_loc, | 98 | if (!ath9k_hw_nvram_read(ah, addr + ar5416_eep_start_loc, |
100 | eep_data)) { | 99 | eep_data)) |
101 | ath_err(ath9k_hw_common(ah), | ||
102 | "Unable to read eeprom region\n"); | ||
103 | return false; | 100 | return false; |
104 | } | ||
105 | eep_data++; | 101 | eep_data++; |
106 | } | 102 | } |
107 | return true; | 103 | return true; |
@@ -271,7 +267,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah) | |||
271 | bool need_swap = false; | 267 | bool need_swap = false; |
272 | int i, addr, size; | 268 | int i, addr, size; |
273 | 269 | ||
274 | if (!ath9k_hw_nvram_read(common, AR5416_EEPROM_MAGIC_OFFSET, &magic)) { | 270 | if (!ath9k_hw_nvram_read(ah, AR5416_EEPROM_MAGIC_OFFSET, &magic)) { |
275 | ath_err(common, "Reading Magic # failed\n"); | 271 | ath_err(common, "Reading Magic # failed\n"); |
276 | return false; | 272 | return false; |
277 | } | 273 | } |