diff options
author | 2009-08-10 17:47:23 +0000 | |
---|---|---|
committer | 2009-08-10 17:47:23 +0000 | |
commit | 0e6e1e351e33b3cc5df735f22422fc59ddb28d76 (patch) | |
tree | b7220f2841fe1127b8ccc41e9a6ddf50fc2f24ea | |
parent | xge_shutdown is not needed now that interface is stopped, since (diff) | |
download | wireguard-openbsd-0e6e1e351e33b3cc5df735f22422fc59ddb28d76.tar.xz wireguard-openbsd-0e6e1e351e33b3cc5df735f22422fc59ddb28d76.zip |
three more shutdown hooks bite the dust.
-rw-r--r-- | sys/dev/ic/rt2560.c | 20 | ||||
-rw-r--r-- | sys/dev/ic/rt2560var.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/rt2661.c | 23 | ||||
-rw-r--r-- | sys/dev/ic/rt2661var.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/rt2860.c | 22 | ||||
-rw-r--r-- | sys/dev/ic/rt2860var.h | 4 |
6 files changed, 6 insertions, 71 deletions
diff --git a/sys/dev/ic/rt2560.c b/sys/dev/ic/rt2560.c index 0b6364c2702..08672c95214 100644 --- a/sys/dev/ic/rt2560.c +++ b/sys/dev/ic/rt2560.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2560.c,v 1.44 2009/07/29 17:46:31 blambert Exp $ */ +/* $OpenBSD: rt2560.c,v 1.45 2009/08/10 17:47:23 damien Exp $ */ /*- * Copyright (c) 2005, 2006 @@ -297,14 +297,6 @@ rt2560_attach(void *xsc, int id) sc->sc_txtap.wt_ihdr.it_present = htole32(RT2560_TX_RADIOTAP_PRESENT); #endif - /* - * Make sure the interface is shutdown during reboot. - */ - sc->sc_sdhook = shutdownhook_establish(rt2560_shutdown, sc); - if (sc->sc_sdhook == NULL) { - printf("%s: WARNING: unable to establish shutdown hook\n", - sc->sc_dev.dv_xname); - } sc->sc_powerhook = powerhook_establish(rt2560_power, sc); if (sc->sc_powerhook == NULL) { printf("%s: WARNING: unable to establish power hook\n", @@ -333,8 +325,6 @@ rt2560_detach(void *xsc) if (sc->sc_powerhook != NULL) powerhook_disestablish(sc->sc_powerhook); - if (sc->sc_sdhook != NULL) - shutdownhook_disestablish(sc->sc_sdhook); rt2560_free_tx_ring(sc, &sc->txq); rt2560_free_tx_ring(sc, &sc->atimq); @@ -2753,14 +2743,6 @@ rt2560_power(int why, void *arg) splx(s); } -void -rt2560_shutdown(void *arg) -{ - struct rt2560_softc *sc = arg; - - rt2560_stop(&sc->sc_ic.ic_if, 1); -} - struct cfdriver ral_cd = { NULL, "ral", DV_IFNET }; diff --git a/sys/dev/ic/rt2560var.h b/sys/dev/ic/rt2560var.h index e461fd4d7be..e2695083004 100644 --- a/sys/dev/ic/rt2560var.h +++ b/sys/dev/ic/rt2560var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2560var.h,v 1.5 2006/10/22 12:14:44 damien Exp $ */ +/* $OpenBSD: rt2560var.h,v 1.6 2009/08/10 17:47:23 damien Exp $ */ /*- * Copyright (c) 2005, 2006 @@ -162,11 +162,9 @@ struct rt2560_softc { #define sc_txtap sc_txtapu.th int sc_txtap_len; #endif - void *sc_sdhook; /* shutdown hook */ void *sc_powerhook; /* power management hook */ }; int rt2560_attach(void *, int); int rt2560_detach(void *); int rt2560_intr(void *); -void rt2560_shutdown(void *); diff --git a/sys/dev/ic/rt2661.c b/sys/dev/ic/rt2661.c index b4760de947b..49621dc2ba4 100644 --- a/sys/dev/ic/rt2661.c +++ b/sys/dev/ic/rt2661.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2661.c,v 1.49 2009/07/29 17:46:31 blambert Exp $ */ +/* $OpenBSD: rt2661.c,v 1.50 2009/08/10 17:47:23 damien Exp $ */ /*- * Copyright (c) 2006 @@ -330,15 +330,6 @@ rt2661_attach(void *xsc, int id) sc->sc_txtap.wt_ihdr.it_present = htole32(RT2661_TX_RADIOTAP_PRESENT); #endif - /* - * Make sure the interface is shutdown during reboot. - */ - sc->sc_sdhook = shutdownhook_establish(rt2661_shutdown, sc); - if (sc->sc_sdhook == NULL) { - printf("%s: WARNING: unable to establish shutdown hook\n", - sc->sc_dev.dv_xname); - } - sc->sc_powerhook = powerhook_establish(rt2661_power, sc); if (sc->sc_powerhook == NULL) { printf("%s: WARNING: unable to establish power hook\n", @@ -369,9 +360,6 @@ rt2661_detach(void *xsc) if (sc->sc_powerhook != NULL) powerhook_disestablish(sc->sc_powerhook); - if (sc->sc_sdhook != NULL) - shutdownhook_disestablish(sc->sc_sdhook); - for (ac = 0; ac < 4; ac++) rt2661_free_tx_ring(sc, &sc->txq[ac]); rt2661_free_tx_ring(sc, &sc->mgtq); @@ -2944,12 +2932,3 @@ rt2661_power(int why, void *arg) } splx(s); } - -void -rt2661_shutdown(void *arg) -{ - struct rt2661_softc *sc = arg; - struct ifnet *ifp = &sc->sc_ic.ic_if; - - rt2661_stop(ifp, 1); -} diff --git a/sys/dev/ic/rt2661var.h b/sys/dev/ic/rt2661var.h index d24a866ea86..7793ade66b5 100644 --- a/sys/dev/ic/rt2661var.h +++ b/sys/dev/ic/rt2661var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2661var.h,v 1.9 2006/10/22 12:14:44 damien Exp $ */ +/* $OpenBSD: rt2661var.h,v 1.10 2009/08/10 17:47:23 damien Exp $ */ /*- * Copyright (c) 2006 @@ -173,11 +173,9 @@ struct rt2661_softc { #define sc_txtap sc_txtapu.th int sc_txtap_len; #endif - void *sc_sdhook; void *sc_powerhook; }; int rt2661_attach(void *, int); int rt2661_detach(void *); int rt2661_intr(void *); -void rt2661_shutdown(void *); diff --git a/sys/dev/ic/rt2860.c b/sys/dev/ic/rt2860.c index 6f6c4d9c008..ed5bb811575 100644 --- a/sys/dev/ic/rt2860.c +++ b/sys/dev/ic/rt2860.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2860.c,v 1.34 2009/05/11 19:20:27 damien Exp $ */ +/* $OpenBSD: rt2860.c,v 1.35 2009/08/10 17:47:23 damien Exp $ */ /*- * Copyright (c) 2007, 2008 @@ -316,14 +316,6 @@ rt2860_attach(void *xsc, int id) sc->sc_txtap.wt_ihdr.it_len = htole16(sc->sc_txtap_len); sc->sc_txtap.wt_ihdr.it_present = htole32(RT2860_TX_RADIOTAP_PRESENT); #endif - /* - * Make sure the interface is shutdown during reboot. - */ - sc->sc_sdhook = shutdownhook_establish(rt2860_shutdown, sc); - if (sc->sc_sdhook == NULL) { - printf("%s: WARNING: unable to establish shutdown hook\n", - sc->sc_dev.dv_xname); - } sc->sc_powerhook = powerhook_establish(rt2860_power, sc); if (sc->sc_powerhook == NULL) { @@ -352,9 +344,6 @@ rt2860_detach(void *xsc) if (sc->sc_powerhook != NULL) powerhook_disestablish(sc->sc_powerhook); - if (sc->sc_sdhook != NULL) - shutdownhook_disestablish(sc->sc_sdhook); - for (qid = 0; qid < 6; qid++) rt2860_free_tx_ring(sc, &sc->txq[qid]); rt2860_free_rx_ring(sc, &sc->rxq); @@ -3170,12 +3159,3 @@ rt2860_power(int why, void *arg) } splx(s); } - -void -rt2860_shutdown(void *arg) -{ - struct rt2860_softc *sc = arg; - struct ifnet *ifp = &sc->sc_ic.ic_if; - - rt2860_stop(ifp, 1); -} diff --git a/sys/dev/ic/rt2860var.h b/sys/dev/ic/rt2860var.h index 8c780364fcb..f9ed48f4889 100644 --- a/sys/dev/ic/rt2860var.h +++ b/sys/dev/ic/rt2860var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2860var.h,v 1.11 2008/12/29 13:27:27 damien Exp $ */ +/* $OpenBSD: rt2860var.h,v 1.12 2009/08/10 17:47:23 damien Exp $ */ /*- * Copyright (c) 2007 @@ -186,11 +186,9 @@ struct rt2860_softc { #define sc_txtap sc_txtapu.th int sc_txtap_len; #endif - void *sc_sdhook; void *sc_powerhook; }; int rt2860_attach(void *, int); int rt2860_detach(void *); int rt2860_intr(void *); -void rt2860_shutdown(void *); |