? awi.diff.1 ? awi.diff.2 ? awi.diff.3 ? o Index: awi.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/awi.c,v retrieving revision 1.102 diff -u -p -u -r1.102 awi.c --- awi.c 5 Jul 2024 04:31:51 -0000 1.102 +++ awi.c 30 Dec 2024 20:37:55 -0000 @@ -276,10 +276,9 @@ awi_attach(struct awi_softc *sc) if ((sc->sc_sdhook = shutdownhook_establish(awi_shutdown, sc)) == NULL) printf("%s: WARNING: unable to establish shutdown hook\n", ifp->if_xname); - if ((sc->sc_powerhook = - powerhook_establish(ifp->if_xname, awi_power, sc)) == NULL) - printf("%s: WARNING: unable to establish power hook\n", - ifp->if_xname); + + pmf_device_register(sc->sc_dev, NULL, NULL); + pmf_class_network_register(sc->sc_dev, ifp); sc->sc_attached = 1; splx(s); @@ -310,7 +309,7 @@ awi_detach(struct awi_softc *sc) ieee80211_ifdetach(ic); if_detach(ifp); shutdownhook_disestablish(sc->sc_sdhook); - powerhook_disestablish(sc->sc_powerhook); + pmf_device_deregister(sc->sc_dev); softint_disestablish(sc->sc_soft_ih); splx(s); return 0; @@ -331,38 +330,6 @@ awi_activate(device_t self, enum devact } void -awi_power(int why, void *arg) -{ - struct awi_softc *sc = arg; - struct ifnet *ifp = &sc->sc_if; - int s; - int ocansleep; - - DPRINTF(("awi_power: %d\n", why)); - s = splnet(); - ocansleep = sc->sc_cansleep; - sc->sc_cansleep = 0; - switch (why) { - case PWR_SUSPEND: - case PWR_STANDBY: - awi_stop(ifp, 1); - break; - case PWR_RESUME: - if (ifp->if_flags & IFF_UP) { - awi_init(ifp); - awi_softintr(sc); /* make sure */ - } - break; - case PWR_SOFTSUSPEND: - case PWR_SOFTSTANDBY: - case PWR_SOFTRESUME: - break; - } - sc->sc_cansleep = ocansleep; - splx(s); -} - -void awi_shutdown(void *arg) { struct awi_softc *sc = arg; Index: awivar.h =================================================================== RCS file: /cvsroot/src/sys/dev/ic/awivar.h,v retrieving revision 1.28 diff -u -p -u -r1.28 awivar.h --- awivar.h 2 Feb 2017 10:05:35 -0000 1.28 +++ awivar.h 30 Dec 2024 20:37:55 -0000 @@ -85,7 +85,6 @@ struct awi_softc { void *sc_soft_ih; void *sc_sdhook; /* shutdown hook */ - void *sc_powerhook; /* power management hook */ unsigned int sc_attached:1, sc_enabled:1, sc_busy:1, @@ -141,7 +140,6 @@ struct awi_softc { int awi_attach(struct awi_softc *); int awi_detach(struct awi_softc *); int awi_activate(device_t, enum devact); -void awi_power(int, void *); void awi_shutdown(void *); int awi_intr(void *);