summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath5k/hw.c
diff options
context:
space:
mode:
authorNick Kossifidis <mick@madwifi.org>2008-04-16 18:42:48 +0300
committerJohn W. Linville <linville@tuxdriver.com>2008-04-16 16:00:02 -0400
commit136bfc798fe5378c7c1b5f5294abcfd1428438b3 (patch)
treeb2f09a5a27a2c13f873b21b1911fe6faf5d14d53 /drivers/net/wireless/ath5k/hw.c
parentfcc76c6b3367e654377d61403f4945ac85c4b651 (diff)
ath5k: Add RF2425 initvals
*Add RF2425 initvals (still no rx/tx) This was on my laptop for a long time so it has to go out even if it still doesn't work, i hope i'll get my hands on an eeepc so i can work this out. base.c Changes-licensed-under: 3-clause-BSD rest Changes-licensed-under: ISC Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k/hw.c')
-rw-r--r--drivers/net/wireless/ath5k/hw.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c
index ff579a223621..9e16bc09f1fd 100644
--- a/drivers/net/wireless/ath5k/hw.c
+++ b/drivers/net/wireless/ath5k/hw.c
@@ -204,15 +204,16 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
CHANNEL_2GHZ);
/* Return on unsuported chips (unsupported eeprom etc) */
- if(srev >= AR5K_SREV_VER_AR5416){
+ if (srev >= AR5K_SREV_VER_AR5416) {
ATH5K_ERR(sc, "Device not yet supported.\n");
ret = -ENODEV;
goto err_free;
}
/* Identify single chip solutions */
- if((srev <= AR5K_SREV_VER_AR5414) &&
- (srev >= AR5K_SREV_VER_AR2413)) {
+ if (((srev <= AR5K_SREV_VER_AR5414) &&
+ (srev >= AR5K_SREV_VER_AR2413)) ||
+ (srev == AR5K_SREV_VER_AR2425)) {
ah->ah_single_chip = true;
} else {
ah->ah_single_chip = false;
@@ -241,19 +242,19 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
} else if (ah->ah_radio_5ghz_revision < AR5K_SREV_RAD_SC1) {
ah->ah_radio = AR5K_RF2413;
ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A;
- } else {
+ } else if (ah->ah_radio_5ghz_revision < AR5K_SREV_RAD_SC2) {
ah->ah_radio = AR5K_RF5413;
if (ah->ah_mac_srev <= AR5K_SREV_VER_AR5424 &&
ah->ah_mac_srev >= AR5K_SREV_VER_AR2424)
ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5424;
- else if (ah->ah_mac_srev >= AR5K_SREV_VER_AR2425)
- ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112;
else
ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A;
-
+ } else if (ah->ah_radio_5ghz_revision < AR5K_SREV_RAD_5133) {
+ ah->ah_radio = AR5K_RF2425;
+ ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112;
}
ah->ah_phy = AR5K_PHY(0);
@@ -391,7 +392,7 @@ static int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial)
ret = ath5k_hw_nic_reset(ah, AR5K_RESET_CTL_PCU |
AR5K_RESET_CTL_BASEBAND | bus_flags);
if (ret) {
- ATH5K_ERR(ah->ah_sc, "failed to reset the MAC Chip + PCI\n");
+ ATH5K_ERR(ah->ah_sc, "failed to reset the MAC Chip\n");
return -EIO;
}
@@ -655,7 +656,8 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum ieee80211_if_types op_mode,
if (ah->ah_radio != AR5K_RF5111 &&
ah->ah_radio != AR5K_RF5112 &&
ah->ah_radio != AR5K_RF5413 &&
- ah->ah_radio != AR5K_RF2413) {
+ ah->ah_radio != AR5K_RF2413 &&
+ ah->ah_radio != AR5K_RF2425) {
ATH5K_ERR(ah->ah_sc,
"invalid phy radio: %u\n", ah->ah_radio);
return -EINVAL;