| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008-2009 Atheros Communications Inc. | 2 * Copyright (c) 2008-2009 Atheros Communications Inc. |
| 3 * | 3 * |
| 4 * Permission to use, copy, modify, and/or distribute this software for any | 4 * Permission to use, copy, modify, and/or distribute this software for any |
| 5 * purpose with or without fee is hereby granted, provided that the above | 5 * purpose with or without fee is hereby granted, provided that the above |
| 6 * copyright notice and this permission notice appear in all copies. | 6 * copyright notice and this permission notice appear in all copies. |
| 7 * | 7 * |
| 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 static int ath9k_hw_ar9287_get_eeprom_rev(struct ath_hw *ah) | 27 static int ath9k_hw_ar9287_get_eeprom_rev(struct ath_hw *ah) |
| 28 { | 28 { |
| 29 return (ah->eeprom.map9287.baseEepHeader.version) & 0xFFF; | 29 return (ah->eeprom.map9287.baseEepHeader.version) & 0xFFF; |
| 30 } | 30 } |
| 31 | 31 |
| 32 static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah) | 32 static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah) |
| 33 { | 33 { |
| 34 struct ar9287_eeprom *eep = &ah->eeprom.map9287; | 34 struct ar9287_eeprom *eep = &ah->eeprom.map9287; |
| 35 struct ath_common *common = ath9k_hw_common(ah); | 35 struct ath_common *common = ath9k_hw_common(ah); |
| 36 u16 *eep_data; | 36 u16 *eep_data; |
| 37 » int addr, eep_start_loc = AR9287_EEP_START_LOC; | 37 » int addr, eep_start_loc; |
| 38 eep_data = (u16 *)eep; | 38 eep_data = (u16 *)eep; |
| 39 | 39 |
| 40 if (ah->hw_version.devid == 0x7015) |
| 41 eep_start_loc = AR9287_HTC_EEP_START_LOC; |
| 42 else |
| 43 eep_start_loc = AR9287_EEP_START_LOC; |
| 44 |
| 40 if (!ath9k_hw_use_flash(ah)) { | 45 if (!ath9k_hw_use_flash(ah)) { |
| 41 ath_print(common, ATH_DBG_EEPROM, | 46 ath_print(common, ATH_DBG_EEPROM, |
| 42 "Reading from EEPROM, not flash\n"); | 47 "Reading from EEPROM, not flash\n"); |
| 43 } | 48 } |
| 44 | 49 |
| 45 for (addr = 0; addr < NUM_EEP_WORDS; addr++) { | 50 for (addr = 0; addr < NUM_EEP_WORDS; addr++) { |
| 46 if (!ath9k_hw_nvram_read(common, addr + eep_start_loc, | 51 if (!ath9k_hw_nvram_read(common, addr + eep_start_loc, |
| 47 eep_data)) { | 52 eep_data)) { |
| 48 ath_print(common, ATH_DBG_EEPROM, | 53 ath_print(common, ATH_DBG_EEPROM, |
| 49 "Unable to read eeprom region\n"); | 54 "Unable to read eeprom region\n"); |
| (...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1172 .fill_eeprom = ath9k_hw_ar9287_fill_eeprom, | 1177 .fill_eeprom = ath9k_hw_ar9287_fill_eeprom, |
| 1173 .get_eeprom_ver = ath9k_hw_ar9287_get_eeprom_ver, | 1178 .get_eeprom_ver = ath9k_hw_ar9287_get_eeprom_ver, |
| 1174 .get_eeprom_rev = ath9k_hw_ar9287_get_eeprom_rev, | 1179 .get_eeprom_rev = ath9k_hw_ar9287_get_eeprom_rev, |
| 1175 .get_num_ant_config = ath9k_hw_ar9287_get_num_ant_config, | 1180 .get_num_ant_config = ath9k_hw_ar9287_get_num_ant_config, |
| 1176 .get_eeprom_antenna_cfg = ath9k_hw_ar9287_get_eeprom_antenna_cfg, | 1181 .get_eeprom_antenna_cfg = ath9k_hw_ar9287_get_eeprom_antenna_cfg, |
| 1177 .set_board_values = ath9k_hw_ar9287_set_board_values, | 1182 .set_board_values = ath9k_hw_ar9287_set_board_values, |
| 1178 .set_addac = ath9k_hw_ar9287_set_addac, | 1183 .set_addac = ath9k_hw_ar9287_set_addac, |
| 1179 .set_txpower = ath9k_hw_ar9287_set_txpower, | 1184 .set_txpower = ath9k_hw_ar9287_set_txpower, |
| 1180 .get_spur_channel = ath9k_hw_ar9287_get_spur_channel | 1185 .get_spur_channel = ath9k_hw_ar9287_get_spur_channel |
| 1181 }; | 1186 }; |
| OLD | NEW |