aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k/hw.c
diff options
context:
space:
mode:
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)
204 CHANNEL_2GHZ); 204 CHANNEL_2GHZ);
205 205
206 /* Return on unsuported chips (unsupported eeprom etc) */ 206 /* Return on unsuported chips (unsupported eeprom etc) */
207 if(srev >= AR5K_SREV_VER_AR5416){ 207 if (srev >= AR5K_SREV_VER_AR5416) {
208 ATH5K_ERR(sc, "Device not yet supported.\n"); 208 ATH5K_ERR(sc, "Device not yet supported.\n");
209 ret = -ENODEV; 209 ret = -ENODEV;
210 goto err_free; 210 goto err_free;
211 } 211 }
212 212
213 /* Identify single chip solutions */ 213 /* Identify single chip solutions */
214 if((srev <= AR5K_SREV_VER_AR5414) && 214 if (((srev <= AR5K_SREV_VER_AR5414) &&
215 (srev >= AR5K_SREV_VER_AR2413)) { 215 (srev >= AR5K_SREV_VER_AR2413)) ||
216 (srev == AR5K_SREV_VER_AR2425)) {
216 ah->ah_single_chip = true; 217 ah->ah_single_chip = true;
217 } else { 218 } else {
218 ah->ah_single_chip = false; 219 ah->ah_single_chip = false;
@@ -241,19 +242,19 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
241 } else if (ah->ah_radio_5ghz_revision < AR5K_SREV_RAD_SC1) { 242 } else if (ah->ah_radio_5ghz_revision < AR5K_SREV_RAD_SC1) {
242 ah->ah_radio = AR5K_RF2413; 243 ah->ah_radio = AR5K_RF2413;
243 ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A; 244 ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A;
244 } else { 245 } else if (ah->ah_radio_5ghz_revision < AR5K_SREV_RAD_SC2) {
245 246
246 ah->ah_radio = AR5K_RF5413; 247 ah->ah_radio = AR5K_RF5413;
247 248
248 if (ah->ah_mac_srev <= AR5K_SREV_VER_AR5424 && 249 if (ah->ah_mac_srev <= AR5K_SREV_VER_AR5424 &&
249 ah->ah_mac_srev >= AR5K_SREV_VER_AR2424) 250 ah->ah_mac_srev >= AR5K_SREV_VER_AR2424)
250 ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5424; 251 ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5424;
251 else if (ah->ah_mac_srev >= AR5K_SREV_VER_AR2425)
252 ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112;
253 else 252 else
254 ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A; 253 ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A;
255 254
256 255 } else if (ah->ah_radio_5ghz_revision < AR5K_SREV_RAD_5133) {
256 ah->ah_radio = AR5K_RF2425;
257 ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112;
257 } 258 }
258 259
259 ah->ah_phy = AR5K_PHY(0); 260 ah->ah_phy = AR5K_PHY(0);
@@ -391,7 +392,7 @@ static int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial)
391 ret = ath5k_hw_nic_reset(ah, AR5K_RESET_CTL_PCU | 392 ret = ath5k_hw_nic_reset(ah, AR5K_RESET_CTL_PCU |
392 AR5K_RESET_CTL_BASEBAND | bus_flags); 393 AR5K_RESET_CTL_BASEBAND | bus_flags);
393 if (ret) { 394 if (ret) {
394 ATH5K_ERR(ah->ah_sc, "failed to reset the MAC Chip + PCI\n"); 395 ATH5K_ERR(ah->ah_sc, "failed to reset the MAC Chip\n");
395 return -EIO; 396 return -EIO;
396 } 397 }
397 398
@@ -655,7 +656,8 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum ieee80211_if_types op_mode,
655 if (ah->ah_radio != AR5K_RF5111 && 656 if (ah->ah_radio != AR5K_RF5111 &&
656 ah->ah_radio != AR5K_RF5112 && 657 ah->ah_radio != AR5K_RF5112 &&
657 ah->ah_radio != AR5K_RF5413 && 658 ah->ah_radio != AR5K_RF5413 &&
658 ah->ah_radio != AR5K_RF2413) { 659 ah->ah_radio != AR5K_RF2413 &&
660 ah->ah_radio != AR5K_RF2425) {
659 ATH5K_ERR(ah->ah_sc, 661 ATH5K_ERR(ah->ah_sc,
660 "invalid phy radio: %u\n", ah->ah_radio); 662 "invalid phy radio: %u\n", ah->ah_radio);
661 return -EINVAL; 663 return -EINVAL;