summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_rl_pci.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2010-08-27 20:21:43 +0000
committerderaadt <deraadt@openbsd.org>2010-08-27 20:21:43 +0000
commita735b93e1b3db73807a61cacdc5bd667d3161599 (patch)
tree6fd227d1b7b656bb1f55ea9d7b815555ae6d8acb /sys/dev/pci/if_rl_pci.c
parentMove the guts of the powerhook function into the activate function and make (diff)
downloadwireguard-openbsd-a735b93e1b3db73807a61cacdc5bd667d3161599.tar.xz
wireguard-openbsd-a735b93e1b3db73807a61cacdc5bd667d3161599.zip
Move the activate function from pci to the the main driver, so that the
powerhook can use it ok kettenis
Diffstat (limited to 'sys/dev/pci/if_rl_pci.c')
-rw-r--r--sys/dev/pci/if_rl_pci.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/sys/dev/pci/if_rl_pci.c b/sys/dev/pci/if_rl_pci.c
index 060f86a6823..de0366b34ac 100644
--- a/sys/dev/pci/if_rl_pci.c
+++ b/sys/dev/pci/if_rl_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rl_pci.c,v 1.19 2010/07/27 17:34:26 deraadt Exp $ */
+/* $OpenBSD: if_rl_pci.c,v 1.20 2010/08/27 20:21:43 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -85,7 +85,6 @@
int rl_pci_match(struct device *, void *, void *);
void rl_pci_attach(struct device *, struct device *, void *);
int rl_pci_detach(struct device *, int);
-int rl_pci_activate(struct device *, int);
struct rl_pci_softc {
struct rl_softc psc_softc;
@@ -95,7 +94,7 @@ struct rl_pci_softc {
struct cfattach rl_pci_ca = {
sizeof(struct rl_pci_softc), rl_pci_match, rl_pci_attach, rl_pci_detach,
- rl_pci_activate
+ rl_activate
};
const struct pci_matchid rl_pci_devices[] = {
@@ -203,28 +202,3 @@ rl_pci_detach(struct device *self, int flags)
return (0);
}
-
-int
-rl_pci_activate(struct device *self, int act)
-{
- struct rl_pci_softc *psc = (struct rl_pci_softc *)self;
- struct rl_softc *sc = &psc->psc_softc;
- struct ifnet *ifp = &sc->sc_arpcom.ac_if;
- int rv = 0;
- extern void rl_stop(struct rl_softc *);
- extern void rl_init(struct rl_softc *);
-
- switch (act) {
- case DVACT_SUSPEND:
- if (ifp->if_flags & IFF_RUNNING)
- rl_stop(sc);
- rv = config_activate_children(self, act);
- break;
- case DVACT_RESUME:
- rv = config_activate_children(self, act);
- if (ifp->if_flags & IFF_UP)
- rl_init(sc);
- break;
- }
- return rv;
-}