diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-04-15 17:39:17 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-04-16 15:43:40 -0400 |
commit | 57b98384e5450996300d77ece61739b58325a84f (patch) | |
tree | b797704e2d232ec7c6175758c7b8804a6e66cf73 /drivers | |
parent | 6c84ce08aaf5995afc7ff7b4c54069c2431fca87 (diff) |
ath9k_hw: move AR9280 PCI EEPROM fix to eeprom_def.c
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom_def.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 17 |
2 files changed, 6 insertions, 17 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c index 3d1b86bd07df..cf59799ef307 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_def.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c | |||
@@ -223,6 +223,12 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah) | |||
223 | return -EINVAL; | 223 | return -EINVAL; |
224 | } | 224 | } |
225 | 225 | ||
226 | /* Enable fixup for AR_AN_TOP2 if necessary */ | ||
227 | if (AR_SREV_9280_10_OR_LATER(ah) && | ||
228 | (eep->baseEepHeader.version & 0xff) > 0x0a && | ||
229 | eep->baseEepHeader.pwdclkind == 0) | ||
230 | ah->need_an_top2_fixup = 1; | ||
231 | |||
226 | return 0; | 232 | return 0; |
227 | } | 233 | } |
228 | 234 | ||
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 2a04251d6063..888a768ee0be 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -525,21 +525,6 @@ static int ath9k_hw_post_init(struct ath_hw *ah) | |||
525 | return 0; | 525 | return 0; |
526 | } | 526 | } |
527 | 527 | ||
528 | static void ath9k_hw_init_eeprom_fix(struct ath_hw *ah) | ||
529 | { | ||
530 | struct base_eep_header *pBase = &(ah->eeprom.def.baseEepHeader); | ||
531 | struct ath_common *common = ath9k_hw_common(ah); | ||
532 | |||
533 | ah->need_an_top2_fixup = (ah->hw_version.devid == AR9280_DEVID_PCI) && | ||
534 | !AR_SREV_9285(ah) && !AR_SREV_9271(ah) && | ||
535 | ((pBase->version & 0xff) > 0x0a) && | ||
536 | (pBase->pwdclkind == 0); | ||
537 | |||
538 | if (ah->need_an_top2_fixup) | ||
539 | ath_print(common, ATH_DBG_EEPROM, | ||
540 | "needs fixup for AR_AN_TOP2 register\n"); | ||
541 | } | ||
542 | |||
543 | static void ath9k_hw_attach_ops(struct ath_hw *ah) | 528 | static void ath9k_hw_attach_ops(struct ath_hw *ah) |
544 | { | 529 | { |
545 | if (AR_SREV_9300_20_OR_LATER(ah)) | 530 | if (AR_SREV_9300_20_OR_LATER(ah)) |
@@ -629,8 +614,6 @@ static int __ath9k_hw_init(struct ath_hw *ah) | |||
629 | if (r) | 614 | if (r) |
630 | return r; | 615 | return r; |
631 | 616 | ||
632 | ath9k_hw_init_eeprom_fix(ah); | ||
633 | |||
634 | r = ath9k_hw_init_macaddr(ah); | 617 | r = ath9k_hw_init_macaddr(ah); |
635 | if (r) { | 618 | if (r) { |
636 | ath_print(common, ATH_DBG_FATAL, | 619 | ath_print(common, ATH_DBG_FATAL, |