Introduced sc_reset to wi_softc. The bus-specific front-end gets
to fill this.
This commit is contained in:
parent
932f26073f
commit
404d2ac6e8
|
@ -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 <sys/cdefs.h>
|
||||
__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! */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 <sys/cdefs.h>
|
||||
__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 <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue