]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ath5k: Fix radio identification on AR5424/2424
authorNick Kossifidis <mick@madwifi.org>
Mon, 21 Apr 2008 18:28:24 +0000 (21:28 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 24 Apr 2008 01:25:35 +0000 (21:25 -0400)
 *Fix radio chip identification on AR5424/2424 during ath5k_hw_attach
 *Try to assign an RF2413 radio on AR2424 for testing

 Changes-licensed-under: ISC

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath5k/hw.c

index 87e782291a0180536cef3329de66cfc5ad32dec6..5fb1ae6ad3e23edb6357a2da5a8610539e8e4a10 100644 (file)
@@ -304,14 +304,20 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
                ah->ah_radio = AR5K_RF2413;
                ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A;
        } else if (ah->ah_radio_5ghz_revision < AR5K_SREV_RAD_SC2) {
-
                ah->ah_radio = AR5K_RF5413;
+               ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A;
+       } else if (ah->ah_radio_5ghz_revision < AR5K_SREV_RAD_5133) {
 
-               if (ah->ah_mac_srev <= AR5K_SREV_VER_AR5424 &&
-                       ah->ah_mac_srev >= AR5K_SREV_VER_AR2424)
+               /* AR5424 */
+               if (srev >= AR5K_SREV_VER_AR5424) {
+                       ah->ah_radio = AR5K_RF5413;
                        ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5424;
-               else
+               /* AR2424 */
+               } else {
+                       ah->ah_radio = AR5K_RF2413; /* For testing */
                        ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A;
+               }
+
        /*
         * Register returns 0x4 for radio revision
         * so ath5k_hw_radio_revision doesn't parse the value