-/* $OpenBSD: dc.c,v 1.157 2024/05/13 01:15:50 jsg Exp $ */
+/* $OpenBSD: dc.c,v 1.158 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
{
struct dc_softc *sc = (struct dc_softc *)self;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
dc_stop(sc, 0);
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
dc_init(sc);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
int
-/* $OpenBSD: fxp.c,v 1.134 2024/02/28 12:53:31 miod Exp $ */
+/* $OpenBSD: fxp.c,v 1.135 2024/08/31 16:23:09 deraadt Exp $ */
/* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */
/*
{
struct fxp_softc *sc = (struct fxp_softc *)self;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
fxp_stop(sc, 1, 0);
- rv = config_activate_children(self, act);
break;
case DVACT_WAKEUP:
if (ifp->if_flags & IFF_UP)
fxp_wakeup(sc);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
void
-/* $OpenBSD: rtl81x9.c,v 1.98 2020/07/10 13:26:37 patrick Exp $ */
+/* $OpenBSD: rtl81x9.c,v 1.99 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998
{
struct rl_softc *sc = (struct rl_softc *)self;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
rl_stop(sc);
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
rl_init(sc);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
int
-/* $OpenBSD: xl.c,v 1.139 2023/11/10 15:51:20 bluhm Exp $ */
+/* $OpenBSD: xl.c,v 1.140 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
{
struct xl_softc *sc = (struct xl_softc *)self;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
xl_stop(sc);
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
xl_init(sc);
break;
case DVACT_POWERDOWN:
- rv = config_activate_children(self, act);
#ifndef SMALL_KERNEL
xl_wol_power(sc);
#endif
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
/*
-/* $OpenBSD: if_alc.c,v 1.58 2024/05/24 06:02:53 jsg Exp $ */
+/* $OpenBSD: if_alc.c,v 1.59 2024/08/31 16:23:09 deraadt Exp $ */
/*-
* Copyright (c) 2009, Pyun YongHyeon <yongari@FreeBSD.org>
* All rights reserved.
{
struct alc_softc *sc = (struct alc_softc *)self;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
alc_stop(sc);
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
alc_init(ifp);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
int
-/* $OpenBSD: if_ale.c,v 1.51 2024/05/24 06:02:53 jsg Exp $ */
+/* $OpenBSD: if_ale.c,v 1.52 2024/08/31 16:23:09 deraadt Exp $ */
/*-
* Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org>
* All rights reserved.
{
struct ale_softc *sc = (struct ale_softc *)self;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
ale_stop(sc);
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
ale_init(ifp);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
int
-/* $OpenBSD: if_bce.c,v 1.56 2024/05/24 06:02:53 jsg Exp $ */
+/* $OpenBSD: if_bce.c,v 1.57 2024/08/31 16:23:09 deraadt Exp $ */
/* $NetBSD: if_bce.c,v 1.3 2003/09/29 01:53:02 mrg Exp $ */
/*
}
break;
}
-
return (0);
}
-/* $OpenBSD: if_bge.c,v 1.405 2024/05/24 06:02:53 jsg Exp $ */
+/* $OpenBSD: if_bge.c,v 1.406 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
{
struct bge_softc *sc = (struct bge_softc *)self;
struct ifnet *ifp = &sc->arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
- rv = config_activate_children(self, act);
if (ifp->if_flags & IFF_RUNNING)
bge_stop(sc, 0);
break;
if (ifp->if_flags & IFF_UP)
bge_init(sc);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
void
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.377 2024/05/24 06:02:53 jsg Exp $ */
+/* $OpenBSD: if_em.c,v 1.378 2024/08/31 16:23:09 deraadt Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
{
struct em_softc *sc = (struct em_softc *)self;
struct ifnet *ifp = &sc->sc_ac.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
em_stop(sc, 0);
- /* We have no children atm, but we will soon */
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
em_init(sc);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
/*********************************************************************
-/* $OpenBSD: if_ix.c,v 1.215 2024/05/21 11:19:39 bluhm Exp $ */
+/* $OpenBSD: if_ix.c,v 1.216 2024/08/31 16:23:09 deraadt Exp $ */
/******************************************************************************
struct ifnet *ifp = &sc->arpcom.ac_if;
struct ixgbe_hw *hw = &sc->hw;
uint32_t ctrl_ext;
- int rv = 0;
switch (act) {
case DVACT_QUIESCE:
if (ifp->if_flags & IFF_UP)
ixgbe_init(sc);
break;
- default:
- break;
}
- return (rv);
+ return (0);
}
/*********************************************************************
-/* $OpenBSD: if_lii.c,v 1.47 2024/05/24 06:02:53 jsg Exp $ */
+/* $OpenBSD: if_lii.c,v 1.48 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 2007 The NetBSD Foundation.
{
struct lii_softc *sc = (struct lii_softc *)self;
struct ifnet *ifp = &sc->sc_ac.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
lii_stop(ifp);
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
lii_init(ifp);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
int
-/* $OpenBSD: if_msk.c,v 1.144 2024/05/24 06:02:53 jsg Exp $ */
+/* $OpenBSD: if_msk.c,v 1.145 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
{
struct sk_if_softc *sc_if = (void *)self;
struct ifnet *ifp = &sc_if->arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_RESUME:
if (ifp->if_flags & IFF_RUNNING)
msk_init(sc_if);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
int
-/* $OpenBSD: if_nfe.c,v 1.126 2024/05/24 06:02:56 jsg Exp $ */
+/* $OpenBSD: if_nfe.c,v 1.127 2024/08/31 16:23:09 deraadt Exp $ */
/*-
* Copyright (c) 2006, 2007 Damien Bergamini <damien.bergamini@free.fr>
{
struct nfe_softc *sc = (struct nfe_softc *)self;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
nfe_stop(ifp, 0);
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
nfe_init(ifp);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
-/* $OpenBSD: if_re_pci.c,v 1.58 2024/05/24 06:02:56 jsg Exp $ */
+/* $OpenBSD: if_re_pci.c,v 1.59 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org>
re_init(ifp);
break;
}
-
return (0);
}
-/* $OpenBSD: if_rge.c,v 1.34 2024/08/21 01:22:31 dlg Exp $ */
+/* $OpenBSD: if_rge.c,v 1.35 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 2019, 2020, 2023, 2024
#ifndef SMALL_KERNEL
struct rge_softc *sc = (struct rge_softc *)self;
#endif
- int rv = 0;
switch (act) {
case DVACT_POWERDOWN:
- rv = config_activate_children(self, act);
#ifndef SMALL_KERNEL
rge_wol_power(sc);
#endif
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
int
-/* $OpenBSD: if_se.c,v 1.25 2024/05/24 06:02:56 jsg Exp $ */
+/* $OpenBSD: if_se.c,v 1.26 2024/08/31 16:23:09 deraadt Exp $ */
/*-
* Copyright (c) 2009, 2010 Christopher Zimmermann <madroach@zakweb.de>
{
struct se_softc *sc = (struct se_softc *)self;
struct ifnet *ifp = &sc->sc_ac.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
se_stop(sc);
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
(void)se_init(ifp);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
-
- return (rv);
+ return (0);
}
/*
-/* $OpenBSD: if_sis.c,v 1.145 2024/05/24 06:02:56 jsg Exp $ */
+/* $OpenBSD: if_sis.c,v 1.146 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
{
struct sis_softc *sc = (struct sis_softc *)self;
struct ifnet *ifp = &sc->arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
sis_stop(sc);
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
sis_init(sc);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
/*
-/* $OpenBSD: if_sk.c,v 1.197 2024/06/26 01:40:49 jsg Exp $ */
+/* $OpenBSD: if_sk.c,v 1.198 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
{
struct sk_if_softc *sc_if = (void *)self;
struct ifnet *ifp = &sc_if->arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_RESUME:
if (ifp->if_flags & IFF_RUNNING)
sk_init(sc_if);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
int
-/* $OpenBSD: if_vr.c,v 1.161 2024/05/24 06:02:57 jsg Exp $ */
+/* $OpenBSD: if_vr.c,v 1.162 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998
{
struct vr_softc *sc = (struct vr_softc *)self;
struct ifnet *ifp = &sc->arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
vr_stop(sc);
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
vr_init(sc);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
/*