diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-12-06 21:03:06 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-12-06 21:03:06 +0000 |
commit | dde7b00df07d5064317db5ff355091c989d5d684 (patch) | |
tree | 7ea38e550451394317b7581ff5f8914bd269ec95 /sys/dev/pci/if_wpi.c | |
parent | 236f5968eef75c8e14b0b020bb15cc2f53b5041e (diff) |
Add a DVACT_WAKEUP op to the *_activate() API. This is called after the
kernel resumes normal (non-cold, able to run processes, etc) operation.
Previously we were relying on specific DVACT_RESUME op's in drivers
creating callback/threads themselves, but that has become too common,
indicating the need for a built-in mechanism.
ok dlg kettenis, tested by a sufficient amount of people
Diffstat (limited to 'sys/dev/pci/if_wpi.c')
-rw-r--r-- | sys/dev/pci/if_wpi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c index bc70cf4625b..635fc73147c 100644 --- a/sys/dev/pci/if_wpi.c +++ b/sys/dev/pci/if_wpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wpi.c,v 1.116 2013/11/28 20:07:32 kettenis Exp $ */ +/* $OpenBSD: if_wpi.c,v 1.117 2013/12/06 21:03:04 deraadt Exp $ */ /*- * Copyright (c) 2006-2008 @@ -75,7 +75,7 @@ void wpi_radiotap_attach(struct wpi_softc *); #endif int wpi_detach(struct device *, int); int wpi_activate(struct device *, int); -void wpi_resume(struct wpi_softc *); +void wpi_wakeup(struct wpi_softc *); void wpi_init_task(void *, void *); int wpi_nic_lock(struct wpi_softc *); int wpi_read_prom_data(struct wpi_softc *, uint32_t, void *, int); @@ -396,8 +396,8 @@ wpi_activate(struct device *self, int act) if (ifp->if_flags & IFF_RUNNING) wpi_stop(ifp, 0); break; - case DVACT_RESUME: - wpi_resume(sc); + case DVACT_WAKEUP: + wpi_wakeup(sc); break; } @@ -405,7 +405,7 @@ wpi_activate(struct device *self, int act) } void -wpi_resume(struct wpi_softc *sc) +wpi_wakeup(struct wpi_softc *sc) { pcireg_t reg; @@ -414,7 +414,7 @@ wpi_resume(struct wpi_softc *sc) reg &= ~0xff00; pci_conf_write(sc->sc_pct, sc->sc_pcitag, 0x40, reg); - task_add(systq, &sc->init_task); + wpi_init_task(sc, NULL); } void |