diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-11-06 08:48:50 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-11-06 08:48:50 +0000 |
commit | ea61e1e1d8b72390f435916c1ff64ce9094d3d48 (patch) | |
tree | e7b1b5e96413cc5062f4e130c30294e63ceb789b /sys/dev | |
parent | 1411d46ae4de10f431c80c1e79a4c6ea7cb7de7f (diff) |
figured out by tdeval@:
>During factorization in 1.57, the switch block was moved too early.
>Hence it's updating an uninitialized ah structure.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/ar5xxx.c | 19 | ||||
-rw-r--r-- | sys/dev/ic/ath.c | 19 |
2 files changed, 19 insertions, 19 deletions
diff --git a/sys/dev/ic/ar5xxx.c b/sys/dev/ic/ar5xxx.c index 03d1e7bb237..628745db1fa 100644 --- a/sys/dev/ic/ar5xxx.c +++ b/sys/dev/ic/ar5xxx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar5xxx.c,v 1.35 2006/09/19 17:08:01 reyk Exp $ */ +/* $OpenBSD: ar5xxx.c,v 1.36 2006/11/06 08:48:49 reyk Exp $ */ /* * Copyright (c) 2004, 2005 Reyk Floeter <reyk@openbsd.org> @@ -204,6 +204,23 @@ ath_hal_attach(u_int16_t device, void *sc, bus_space_tag_t st, hal->ah_software_retry = AH_FALSE; hal->ah_ant_diversity = AR5K_TUNE_ANT_DIVERSITY; + switch (device) { + case PCI_PRODUCT_ATHEROS_AR2413: + case PCI_PRODUCT_ATHEROS_AR5413: + case PCI_PRODUCT_ATHEROS_AR5424: + /* + * Known single chip solutions + */ + hal->ah_single_chip = AH_TRUE; + break; + default: + /* + * Multi chip solutions + */ + hal->ah_single_chip = AH_FALSE; + break; + } + if ((attach)(device, hal, st, sh, status) == NULL) goto failed; diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c index 265e30b2f35..be126db4c65 100644 --- a/sys/dev/ic/ath.c +++ b/sys/dev/ic/ath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ath.c,v 1.58 2006/10/19 10:55:56 tom Exp $ */ +/* $OpenBSD: ath.c,v 1.59 2006/11/06 08:48:49 reyk Exp $ */ /* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */ /*- @@ -221,23 +221,6 @@ 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", |