diff --git a/sys/dev/ic/wi.c b/sys/dev/ic/wi.c index 412cddbfc321..f622d2a646ee 100644 --- a/sys/dev/ic/wi.c +++ b/sys/dev/ic/wi.c @@ -1,4 +1,4 @@ -/* $NetBSD: wi.c,v 1.112 2003/02/25 01:57:35 dyoung Exp $ */ +/* $NetBSD: wi.c,v 1.113 2003/03/27 04:34:17 dyoung Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.112 2003/02/25 01:57:35 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.113 2003/03/27 04:34:17 dyoung Exp $"); #define WI_HERMES_AUTOINC_WAR /* Work around data write autoinc bug. */ #define WI_HERMES_STATS_WAR /* Work around stats counter bug. */ @@ -846,6 +846,10 @@ wi_reset(struct wi_softc *sc) int i, error; DPRINTF(("wi_reset\n")); + + if (sc->sc_reset) + (*sc->sc_reset)(sc); + error = 0; for (i = 0; i < 5; i++) { DELAY(20*1000); /* XXX: way too long! */ diff --git a/sys/dev/ic/wivar.h b/sys/dev/ic/wivar.h index a81052ba4af0..a9bd552ad40f 100644 --- a/sys/dev/ic/wivar.h +++ b/sys/dev/ic/wivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: wivar.h,v 1.28 2003/01/09 08:49:40 dyoung Exp $ */ +/* $NetBSD: wivar.h,v 1.29 2003/03/27 04:34:17 dyoung Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -97,6 +97,8 @@ struct wi_softc { int sc_false_syns; u_int16_t sc_txbuf[IEEE80211_MAX_LEN/2]; + + void (*sc_reset)(struct wi_softc *); }; #define sc_if sc_ic.ic_if diff --git a/sys/dev/pci/if_wi_pci.c b/sys/dev/pci/if_wi_pci.c index 7029c1c51576..b117f3961e34 100644 --- a/sys/dev/pci/if_wi_pci.c +++ b/sys/dev/pci/if_wi_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_wi_pci.c,v 1.16 2003/01/02 06:26:49 dyoung Exp $ */ +/* $NetBSD: if_wi_pci.c,v 1.17 2003/03/27 04:34:16 dyoung Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wi_pci.c,v 1.16 2003/01/02 06:26:49 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wi_pci.c,v 1.17 2003/03/27 04:34:16 dyoung Exp $"); #include #include @@ -324,6 +324,8 @@ wi_pci_attach(parent, self, aux) return; } + sc->sc_reset = wi_pci_reset; + /* Add a suspend hook to restore PCI config state */ psc->sc_powerhook = powerhook_establish(wi_pci_powerhook, psc); if (psc->sc_powerhook == NULL)