summaryrefslogtreecommitdiff
path: root/sys/dev/ic/rt2860.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2010-08-27 16:06:26 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2010-08-27 16:06:26 +0000
commit6edf190811a066b237b9d7ef0ab4e08942a1bba1 (patch)
tree93d0118ac5a0a03c0a58ea8cdcde851c860aab0e /sys/dev/ic/rt2860.c
parente9774e1b179ec2eedc9ec274dddd9c21aec1846f (diff)
Stop calling xxx_power() from xxx_resume(); instead do it the other way around.
Get rid of the sc_power() callback, which isn't used anymore. ok deraadt@
Diffstat (limited to 'sys/dev/ic/rt2860.c')
-rw-r--r--sys/dev/ic/rt2860.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/sys/dev/ic/rt2860.c b/sys/dev/ic/rt2860.c
index 0eebcaa095d..f4fadc55ef1 100644
--- a/sys/dev/ic/rt2860.c
+++ b/sys/dev/ic/rt2860.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2860.c,v 1.59 2010/08/27 04:09:18 deraadt Exp $ */
+/* $OpenBSD: rt2860.c,v 1.60 2010/08/27 16:06:25 kettenis Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -436,8 +436,10 @@ void
rt2860_resume(void *xsc)
{
struct rt2860_softc *sc = xsc;
+ struct ifnet *ifp = &sc->sc_ic.ic_if;
- rt2860_power(PWR_RESUME, sc);
+ if (ifp->if_flags & IFF_UP)
+ rt2860_init(ifp);
}
int
@@ -3867,22 +3869,15 @@ void
rt2860_power(int why, void *arg)
{
struct rt2860_softc *sc = arg;
- struct ifnet *ifp = &sc->sc_ic.ic_if;
int s;
s = splnet();
switch (why) {
case PWR_SUSPEND:
- rt2860_stop(ifp, 0);
- if (sc->sc_power != NULL)
- (*sc->sc_power)(sc, why);
+ rt2860_suspend(sc);
break;
case PWR_RESUME:
- if (ifp->if_flags & IFF_UP) {
- rt2860_init(ifp);
- if (sc->sc_power != NULL)
- (*sc->sc_power)(sc, why);
- }
+ rt2860_resume(sc);
break;
}
splx(s);