diff options
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/pgt.c | 10 | ||||
-rw-r--r-- | sys/dev/ic/pgtvar.h | 6 |
2 files changed, 14 insertions, 2 deletions
diff --git a/sys/dev/ic/pgt.c b/sys/dev/ic/pgt.c index b9e909996f9..11d1d5207a5 100644 --- a/sys/dev/ic/pgt.c +++ b/sys/dev/ic/pgt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pgt.c,v 1.29 2006/10/05 14:22:54 mglocker Exp $ */ +/* $OpenBSD: pgt.c,v 1.30 2006/10/06 21:55:33 mglocker Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -581,6 +581,10 @@ pgt_attach(void *xsc) //sc->sc_debug |= SC_DEBUG_RXFRAG; //sc->sc_debug |= SC_DEBUG_RXETHER; + /* enable card if possible */ + if (sc->sc_enable != NULL) + (*sc->sc_enable)(sc); + error = pgt_dma_alloc(sc); if (error) return; @@ -623,6 +627,10 @@ pgt_detach(struct pgt_softc *sc) pgt_disable(sc, SC_DYING); pgt_reboot(sc); + /* disable card if possible */ + if (sc->sc_disable != NULL) + (*sc->sc_disable)(sc); + ieee80211_ifdetach(&sc->sc_ic.ic_if); if_detach(&sc->sc_ic.ic_if); diff --git a/sys/dev/ic/pgtvar.h b/sys/dev/ic/pgtvar.h index 9a0157950f7..d4c6f9ba860 100644 --- a/sys/dev/ic/pgtvar.h +++ b/sys/dev/ic/pgtvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pgtvar.h,v 1.8 2006/10/02 18:06:55 mglocker Exp $ */ +/* $OpenBSD: pgtvar.h,v 1.9 2006/10/06 21:55:33 mglocker Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -175,6 +175,10 @@ struct pgt_softc { (struct ieee80211com *, enum ieee80211_state, int); + int (*sc_enable)(struct pgt_softc *); + void (*sc_disable)(struct pgt_softc *); + void (*sc_power)(struct pgt_softc *, int); + struct pgt_mgmt_descq sc_mgmtinprog; struct pgt_descq sc_freeq[PGT_QUEUE_COUNT]; size_t sc_freeq_count[PGT_QUEUE_COUNT]; |