diff options
author | Rajkumar Manoharan <rmanoharan@atheros.com> | 2010-11-19 06:23:21 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-24 16:19:41 -0500 |
commit | f7ec8fb4d6f8f3ecb8b11e9e46ece95aa66139cc (patch) | |
tree | 286e8e839b91a024501b0086d23430ad13d3af4d /drivers/net/wireless | |
parent | 64f121708342afec306ce52920cc9982f4f1008f (diff) |
ath9k_hw: Fix eeprom offset for AR9287 devices (PCI/USB)
AR9287 devices (PCI/USB) use different eeprom start location
to read nvram. New devices might endup with same devid. So use
driver_info to set offset, instead of devid. driver_info is
valid for HTC devices alone which is filled in usb_device_id.
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom_9287.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/reg.h | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c index e75697858ae8..bcb9ed39c047 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c | |||
@@ -37,10 +37,10 @@ static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah) | |||
37 | int addr, eep_start_loc; | 37 | int addr, eep_start_loc; |
38 | eep_data = (u16 *)eep; | 38 | eep_data = (u16 *)eep; |
39 | 39 | ||
40 | if (AR9287_HTC_DEVID(ah)) | 40 | if (!common->driver_info) |
41 | eep_start_loc = AR9287_HTC_EEP_START_LOC; | ||
42 | else | ||
43 | eep_start_loc = AR9287_EEP_START_LOC; | 41 | eep_start_loc = AR9287_EEP_START_LOC; |
42 | else | ||
43 | eep_start_loc = AR9287_HTC_EEP_START_LOC; | ||
44 | 44 | ||
45 | if (!ath9k_hw_use_flash(ah)) { | 45 | if (!ath9k_hw_use_flash(ah)) { |
46 | ath_print(common, ATH_DBG_EEPROM, | 46 | ath_print(common, ATH_DBG_EEPROM, |
diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h index f1bbc7560c86..9d68237e4d9c 100644 --- a/drivers/net/wireless/ath/ath9k/reg.h +++ b/drivers/net/wireless/ath/ath9k/reg.h | |||
@@ -870,10 +870,6 @@ | |||
870 | ((_ah)->hw_version.devid == 0xA704) || \ | 870 | ((_ah)->hw_version.devid == 0xA704) || \ |
871 | ((_ah)->hw_version.devid == 0x1200)) | 871 | ((_ah)->hw_version.devid == 0x1200)) |
872 | 872 | ||
873 | #define AR9287_HTC_DEVID(_ah) \ | ||
874 | (((_ah)->hw_version.devid == 0x7015) || \ | ||
875 | ((_ah)->hw_version.devid == 0x1200)) | ||
876 | |||
877 | #define AR_RADIO_SREV_MAJOR 0xf0 | 873 | #define AR_RADIO_SREV_MAJOR 0xf0 |
878 | #define AR_RAD5133_SREV_MAJOR 0xc0 | 874 | #define AR_RAD5133_SREV_MAJOR 0xc0 |
879 | #define AR_RAD2133_SREV_MAJOR 0xd0 | 875 | #define AR_RAD2133_SREV_MAJOR 0xd0 |