diff options
Diffstat (limited to 'sys/dev/ic')
| -rw-r--r-- | sys/dev/ic/bwi.c | 24 | ||||
| -rw-r--r-- | sys/dev/ic/bwivar.h | 6 |
2 files changed, 27 insertions, 3 deletions
diff --git a/sys/dev/ic/bwi.c b/sys/dev/ic/bwi.c index b98a09b3818..70b60510f7c 100644 --- a/sys/dev/ic/bwi.c +++ b/sys/dev/ic/bwi.c @@ -1,4 +1,4 @@ -/* $NetBSD: bwi.c,v 1.8 2009/04/18 14:58:02 tsutsui Exp $ */ +/* $NetBSD: bwi.c,v 1.9 2009/04/23 20:24:23 kefren Exp $ */ /* $OpenBSD: bwi.c,v 1.74 2008/02/25 21:13:30 mglocker Exp $ */ /* @@ -49,7 +49,7 @@ #include "bpfilter.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bwi.c,v 1.8 2009/04/18 14:58:02 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bwi.c,v 1.9 2009/04/23 20:24:23 kefren Exp $"); #include <sys/param.h> #include <sys/callout.h> @@ -9739,3 +9739,23 @@ bwi_calc_rssi(struct bwi_softc *sc, const struct bwi_rxbuf_hdr *hdr) return (bwi_rf_calc_rssi(mac, hdr)); } + +bool +bwi_suspend(device_t dv PMF_FN_ARGS) +{ + struct bwi_softc *sc = device_private(dv); + + bwi_power_off(sc, 0); + + return true; +} + +bool +bwi_resume(device_t dv PMF_FN_ARGS) +{ + struct bwi_softc *sc = device_private(dv); + + bwi_power_on(sc, 1); + + return true; +} diff --git a/sys/dev/ic/bwivar.h b/sys/dev/ic/bwivar.h index 3b81af29d4f..531a7a53ae6 100644 --- a/sys/dev/ic/bwivar.h +++ b/sys/dev/ic/bwivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: bwivar.h,v 1.2 2009/01/09 20:49:42 macallan Exp $ */ +/* $NetBSD: bwivar.h,v 1.3 2009/04/23 20:24:23 kefren Exp $ */ /* $OpenBSD: bwivar.h,v 1.23 2008/02/25 20:36:54 mglocker Exp $ */ /* @@ -791,4 +791,8 @@ int bwi_intr(void *); int bwi_attach(struct bwi_softc *); void bwi_detach(struct bwi_softc *); +/* Power Management Framework */ +bool bwi_suspend(device_t db PMF_FN_ARGS); +bool bwi_resume(device_t db PMF_FN_ARGS); + #endif /* !_DEV_IC_BWIVAR_H */ |
