diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-10-14 16:16:19 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-10-14 16:16:19 +0000 |
commit | 8bfacbeb6c30a242d3201d81f7b40115a8284653 (patch) | |
tree | f2014d10d333845ba46c82fffe98afbff6c73ab5 /sys/dev | |
parent | 75d827d3a40f6b2a0621909470d59c4f23dc0df4 (diff) |
fix the slightly different reset procedure of single chip variants.
this should successfully initialize the ar5424 PCI-E chipset.
figured out by kettenis@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/ath.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c index edd7f3d0c42..8874ac1bdf2 100644 --- a/sys/dev/ic/ath.c +++ b/sys/dev/ic/ath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ath.c,v 1.56 2006/09/19 17:49:13 reyk Exp $ */ +/* $OpenBSD: ath.c,v 1.57 2006/10/14 16:16:18 reyk Exp $ */ /* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */ /*- @@ -221,6 +221,23 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); sc->sc_flags &= ~ATH_ATTACHED; /* make sure that it's not attached */ + switch (devid) { + case PCI_PRODUCT_ATHEROS_AR2413: + case PCI_PRODUCT_ATHEROS_AR5413: + case PCI_PRODUCT_ATHEROS_AR5424: + /* + * Known single chip solutions + */ + ah->ah_single_chip = AH_TRUE; + break; + default: + /* + * Multi chip solutions + */ + ah->ah_single_chip = AH_FALSE; + break; + } + ah = ath_hal_attach(devid, sc, sc->sc_st, sc->sc_sh, &status); if (ah == NULL) { printf("%s: unable to attach hardware; HAL status %d\n", @@ -235,26 +252,14 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) goto bad; } - switch (devid) { - case PCI_PRODUCT_ATHEROS_AR2413: - case PCI_PRODUCT_ATHEROS_AR5413: - case PCI_PRODUCT_ATHEROS_AR5424: - /* - * Known single chip solutions - */ - ah->ah_single_chip = AH_TRUE; + if (ah->ah_single_chip == AH_TRUE) { printf("%s: AR%s %u.%u phy %u.%u rf %u.%u", ifp->if_xname, ar5k_printver(AR5K_VERSION_DEV, devid), ah->ah_mac_version, ah->ah_mac_revision, ah->ah_phy_revision >> 4, ah->ah_phy_revision & 0xf, ah->ah_radio_5ghz_revision >> 4, ah->ah_radio_5ghz_revision & 0xf); - break; - default: - /* - * Multi chip solutions - */ - ah->ah_single_chip = AH_FALSE; + } else { printf("%s: AR%s %u.%u phy %u.%u", ifp->if_xname, ar5k_printver(AR5K_VERSION_VER, ah->ah_mac_srev), ah->ah_mac_version, ah->ah_mac_revision, @@ -270,7 +275,6 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) ah->ah_radio_2ghz_revision >> 4, ah->ah_radio_2ghz_revision & 0xf); } - break; } #if 0 |