diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-09-22 06:34:52 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-09-27 15:57:39 -0400 |
commit | 7a37081e2e25e58701b17c41579fd06bc353b392 (patch) | |
tree | 94a4f361030b97115ff90c37f00459c8666d9fdd /drivers/net/wireless/ath/ath9k/ar5008_phy.c | |
parent | 67e0208acea29682f5766eb9f67f6f26117eef3e (diff) |
ath9k_hw: simplify revision checks for AR9280
Since AR9280 v1.0 was never sold (and the initvals removed), v1.0 specific
revision checks can be removed and the 'v2.0 or later' check can be
simplified to a check for AR9280 or later.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar5008_phy.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar5008_phy.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c index 3d2c8679bc8..9318ae73698 100644 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c | |||
@@ -118,7 +118,7 @@ static void ar5008_hw_force_bias(struct ath_hw *ah, u16 synth_freq) | |||
118 | if (!AR_SREV_5416(ah) || synth_freq >= 3000) | 118 | if (!AR_SREV_5416(ah) || synth_freq >= 3000) |
119 | return; | 119 | return; |
120 | 120 | ||
121 | BUG_ON(AR_SREV_9280_10_OR_LATER(ah)); | 121 | BUG_ON(AR_SREV_9280_20_OR_LATER(ah)); |
122 | 122 | ||
123 | if (synth_freq < 2412) | 123 | if (synth_freq < 2412) |
124 | new_bias = 0; | 124 | new_bias = 0; |
@@ -454,7 +454,7 @@ static int ar5008_hw_rf_alloc_ext_banks(struct ath_hw *ah) | |||
454 | 454 | ||
455 | struct ath_common *common = ath9k_hw_common(ah); | 455 | struct ath_common *common = ath9k_hw_common(ah); |
456 | 456 | ||
457 | BUG_ON(AR_SREV_9280_10_OR_LATER(ah)); | 457 | BUG_ON(AR_SREV_9280_20_OR_LATER(ah)); |
458 | 458 | ||
459 | ATH_ALLOC_BANK(ah->analogBank0Data, ah->iniBank0.ia_rows); | 459 | ATH_ALLOC_BANK(ah->analogBank0Data, ah->iniBank0.ia_rows); |
460 | ATH_ALLOC_BANK(ah->analogBank1Data, ah->iniBank1.ia_rows); | 460 | ATH_ALLOC_BANK(ah->analogBank1Data, ah->iniBank1.ia_rows); |
@@ -484,7 +484,7 @@ static void ar5008_hw_rf_free_ext_banks(struct ath_hw *ah) | |||
484 | bank = NULL; \ | 484 | bank = NULL; \ |
485 | } while (0); | 485 | } while (0); |
486 | 486 | ||
487 | BUG_ON(AR_SREV_9280_10_OR_LATER(ah)); | 487 | BUG_ON(AR_SREV_9280_20_OR_LATER(ah)); |
488 | 488 | ||
489 | ATH_FREE_BANK(ah->analogBank0Data); | 489 | ATH_FREE_BANK(ah->analogBank0Data); |
490 | ATH_FREE_BANK(ah->analogBank1Data); | 490 | ATH_FREE_BANK(ah->analogBank1Data); |
@@ -525,7 +525,7 @@ static bool ar5008_hw_set_rf_regs(struct ath_hw *ah, | |||
525 | * for single chip devices, that is AR9280 or anything | 525 | * for single chip devices, that is AR9280 or anything |
526 | * after that. | 526 | * after that. |
527 | */ | 527 | */ |
528 | if (AR_SREV_9280_10_OR_LATER(ah)) | 528 | if (AR_SREV_9280_20_OR_LATER(ah)) |
529 | return true; | 529 | return true; |
530 | 530 | ||
531 | /* Setup rf parameters */ | 531 | /* Setup rf parameters */ |
@@ -663,7 +663,7 @@ static void ar5008_hw_override_ini(struct ath_hw *ah, | |||
663 | */ | 663 | */ |
664 | REG_SET_BIT(ah, AR_DIAG_SW, (AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT)); | 664 | REG_SET_BIT(ah, AR_DIAG_SW, (AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT)); |
665 | 665 | ||
666 | if (AR_SREV_9280_10_OR_LATER(ah)) { | 666 | if (AR_SREV_9280_20_OR_LATER(ah)) { |
667 | val = REG_READ(ah, AR_PCU_MISC_MODE2); | 667 | val = REG_READ(ah, AR_PCU_MISC_MODE2); |
668 | 668 | ||
669 | if (!AR_SREV_9271(ah)) | 669 | if (!AR_SREV_9271(ah)) |
@@ -676,7 +676,7 @@ static void ar5008_hw_override_ini(struct ath_hw *ah, | |||
676 | } | 676 | } |
677 | 677 | ||
678 | if (!AR_SREV_5416_20_OR_LATER(ah) || | 678 | if (!AR_SREV_5416_20_OR_LATER(ah) || |
679 | AR_SREV_9280_10_OR_LATER(ah)) | 679 | AR_SREV_9280_20_OR_LATER(ah)) |
680 | return; | 680 | return; |
681 | /* | 681 | /* |
682 | * Disable BB clock gating | 682 | * Disable BB clock gating |
@@ -900,7 +900,7 @@ static void ar5008_hw_set_rfmode(struct ath_hw *ah, struct ath9k_channel *chan) | |||
900 | rfMode |= (IS_CHAN_B(chan) || IS_CHAN_G(chan)) | 900 | rfMode |= (IS_CHAN_B(chan) || IS_CHAN_G(chan)) |
901 | ? AR_PHY_MODE_DYNAMIC : AR_PHY_MODE_OFDM; | 901 | ? AR_PHY_MODE_DYNAMIC : AR_PHY_MODE_OFDM; |
902 | 902 | ||
903 | if (!AR_SREV_9280_10_OR_LATER(ah)) | 903 | if (!AR_SREV_9280_20_OR_LATER(ah)) |
904 | rfMode |= (IS_CHAN_5GHZ(chan)) ? | 904 | rfMode |= (IS_CHAN_5GHZ(chan)) ? |
905 | AR_PHY_MODE_RF5GHZ : AR_PHY_MODE_RF2GHZ; | 905 | AR_PHY_MODE_RF5GHZ : AR_PHY_MODE_RF2GHZ; |
906 | 906 | ||