diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-09-14 03:55:09 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-07 16:39:30 -0400 |
commit | 5bb127913299b37fceecf66ce86ee8ede70e7d13 (patch) | |
tree | 9856d3469b448bab7f425aac962f5a9a46ace9e6 /drivers/net/wireless/ath/ath9k/eeprom_def.c | |
parent | 990b70ab24cbce585a3436c8c88cb48b888d48b4 (diff) |
atheros: move bus ops to ath_common
This is the last part to make ath9k hw code core driver agnostic.
I believe ath9k_htc can now use use the hw code unmodified.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/eeprom_def.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom_def.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c index 56e90baf6949..8f04b644e2e6 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_def.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c | |||
@@ -89,11 +89,12 @@ static int ath9k_hw_def_get_eeprom_rev(struct ath_hw *ah) | |||
89 | static bool ath9k_hw_def_fill_eeprom(struct ath_hw *ah) | 89 | static bool ath9k_hw_def_fill_eeprom(struct ath_hw *ah) |
90 | { | 90 | { |
91 | #define SIZE_EEPROM_DEF (sizeof(struct ar5416_eeprom_def) / sizeof(u16)) | 91 | #define SIZE_EEPROM_DEF (sizeof(struct ar5416_eeprom_def) / sizeof(u16)) |
92 | struct ath_common *common = ath9k_hw_common(ah); | ||
92 | u16 *eep_data = (u16 *)&ah->eeprom.def; | 93 | u16 *eep_data = (u16 *)&ah->eeprom.def; |
93 | int addr, ar5416_eep_start_loc = 0x100; | 94 | int addr, ar5416_eep_start_loc = 0x100; |
94 | 95 | ||
95 | for (addr = 0; addr < SIZE_EEPROM_DEF; addr++) { | 96 | for (addr = 0; addr < SIZE_EEPROM_DEF; addr++) { |
96 | if (!ath9k_hw_nvram_read(ah, addr + ar5416_eep_start_loc, | 97 | if (!ath9k_hw_nvram_read(common, addr + ar5416_eep_start_loc, |
97 | eep_data)) { | 98 | eep_data)) { |
98 | ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, | 99 | ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, |
99 | "Unable to read eeprom region\n"); | 100 | "Unable to read eeprom region\n"); |
@@ -115,7 +116,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah) | |||
115 | bool need_swap = false; | 116 | bool need_swap = false; |
116 | int i, addr, size; | 117 | int i, addr, size; |
117 | 118 | ||
118 | if (!ath9k_hw_nvram_read(ah, AR5416_EEPROM_MAGIC_OFFSET, &magic)) { | 119 | if (!ath9k_hw_nvram_read(common, AR5416_EEPROM_MAGIC_OFFSET, &magic)) { |
119 | ath_print(common, ATH_DBG_FATAL, "Reading Magic # failed\n"); | 120 | ath_print(common, ATH_DBG_FATAL, "Reading Magic # failed\n"); |
120 | return false; | 121 | return false; |
121 | } | 122 | } |