diff options
| author | kefren <kefren@NetBSD.org> | 2009-04-23 20:24:23 +0000 |
|---|---|---|
| committer | kefren <kefren@NetBSD.org> | 2009-04-23 20:24:23 +0000 |
| commit | 02190332dd7a18769341aedc9149a7aaab14cd43 (patch) | |
| tree | 666050b13538fb4a7f41738474d37ffbb1986bf0 /sys/dev/ic/bwi.c | |
| parent | d3dabe12604098477d59d3bb1b3ce9e91ed49c06 (diff) | |
Add power hooks. Proposed a couple of days ago on tech-kern@, no
objections received. Tested on Dell Inspiron 2200 with BCM4318
Diffstat (limited to 'sys/dev/ic/bwi.c')
| -rw-r--r-- | sys/dev/ic/bwi.c | 24 |
1 files changed, 22 insertions, 2 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; +} |
