diff options
Diffstat (limited to 'sys')
46 files changed, 161 insertions, 105 deletions
diff --git a/sys/arch/mac68k/dev/if_ae.c b/sys/arch/mac68k/dev/if_ae.c index ea7e5c93169..44f49213597 100644 --- a/sys/arch/mac68k/dev/if_ae.c +++ b/sys/arch/mac68k/dev/if_ae.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ae.c,v 1.24 2004/11/26 21:21:24 miod Exp $ */ +/* $OpenBSD: if_ae.c,v 1.25 2005/01/15 05:24:09 brad Exp $ */ /* $NetBSD: if_ae.c,v 1.62 1997/04/24 16:52:05 scottr Exp $ */ /* @@ -831,8 +831,10 @@ aeioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - aestop(sc); /* XXX for ds_setmcaf? */ - aeinit(sc); + if (ifp->if_flags & IFF_RUNNING) { + aestop(sc); /* XXX for ds_setmcaf? */ + aeinit(sc); + } error = 0; } break; diff --git a/sys/arch/macppc/dev/if_bm.c b/sys/arch/macppc/dev/if_bm.c index 214d9b77176..29650c10c6b 100644 --- a/sys/arch/macppc/dev/if_bm.c +++ b/sys/arch/macppc/dev/if_bm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bm.c,v 1.16 2003/10/16 03:54:48 deraadt Exp $ */ +/* $OpenBSD: if_bm.c,v 1.17 2005/01/15 05:24:10 brad Exp $ */ /* $NetBSD: if_bm.c,v 1.1 1999/01/01 01:27:52 tsubai Exp $ */ /*- @@ -896,8 +896,10 @@ bmac_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) * Multicast list has changed; set the hardware filter * accordingly. */ - bmac_init(sc); - bmac_setladrf(sc); + if (ifp->if_flags & IFF_RUNNING) { + bmac_init(sc); + bmac_setladrf(sc); + } error = 0; } break; diff --git a/sys/arch/mvme68k/dev/if_ie.c b/sys/arch/mvme68k/dev/if_ie.c index 58522049a5a..87cc07d8bd2 100644 --- a/sys/arch/mvme68k/dev/if_ie.c +++ b/sys/arch/mvme68k/dev/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.27 2004/07/30 22:29:44 miod Exp $ */ +/* $OpenBSD: if_ie.c,v 1.28 2005/01/15 05:24:10 brad Exp $ */ /*- * Copyright (c) 1999 Steve Murphree, Jr. @@ -1897,7 +1897,8 @@ ieioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - mc_reset(sc); + if (ifp->if_flags & IFF_RUNNING) + mc_reset(sc); error = 0; } break; diff --git a/sys/arch/mvme88k/dev/if_ie.c b/sys/arch/mvme88k/dev/if_ie.c index 6651cbda9f1..51e24e79a7d 100644 --- a/sys/arch/mvme88k/dev/if_ie.c +++ b/sys/arch/mvme88k/dev/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.31 2004/08/02 08:35:00 miod Exp $ */ +/* $OpenBSD: if_ie.c,v 1.32 2005/01/15 05:24:10 brad Exp $ */ /*- * Copyright (c) 1998 Steve Murphree, Jr. @@ -1871,7 +1871,8 @@ ieioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - mc_reset(sc); + if (ifp->if_flags & IFF_RUNNING) + mc_reset(sc); error = 0; } break; diff --git a/sys/arch/sgi/dev/if_mec.c b/sys/arch/sgi/dev/if_mec.c index 51300e86d2e..06c8bb1f734 100644 --- a/sys/arch/sgi/dev/if_mec.c +++ b/sys/arch/sgi/dev/if_mec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mec.c,v 1.6 2004/09/29 17:57:35 pefo Exp $ */ +/* $OpenBSD: if_mec.c,v 1.7 2005/01/15 05:24:10 brad Exp $ */ /* $NetBSD: if_mec_mace.c,v 1.5 2004/08/01 06:36:36 tsutsui Exp $ */ /* @@ -1095,12 +1095,14 @@ mec_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) error = (cmd == SIOCADDMULTI) ? ether_addmulti(ifr, &sc->sc_ac) : ether_delmulti(ifr, &sc->sc_ac); + if (error == ENETRESET) { /* * Multicast list has changed; set the hardware * filter accordingly. */ - mec_init(ifp); + if (ifp->if_flags & IFF_RUNNING) + mec_init(ifp); error = 0; } break; diff --git a/sys/arch/sparc/dev/be.c b/sys/arch/sparc/dev/be.c index f9c87d423f1..5e14e6d2d9c 100644 --- a/sys/arch/sparc/dev/be.c +++ b/sys/arch/sparc/dev/be.c @@ -1,4 +1,4 @@ -/* $OpenBSD: be.c,v 1.35 2004/09/29 07:35:11 miod Exp $ */ +/* $OpenBSD: be.c,v 1.36 2005/01/15 05:24:10 brad Exp $ */ /* * Copyright (c) 1998 Theo de Raadt and Jason L. Wright. @@ -644,7 +644,8 @@ beioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - be_mcreset(sc); + if (ifp->if_flags & IFF_RUNNING) + be_mcreset(sc); error = 0; } break; diff --git a/sys/arch/sparc/dev/hme.c b/sys/arch/sparc/dev/hme.c index 40727d19d93..c54dd3c0cdb 100644 --- a/sys/arch/sparc/dev/hme.c +++ b/sys/arch/sparc/dev/hme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hme.c,v 1.45 2004/09/29 07:35:11 miod Exp $ */ +/* $OpenBSD: hme.c,v 1.46 2005/01/15 05:24:10 brad Exp $ */ /* * Copyright (c) 1998 Jason L. Wright (jason@thought.net) @@ -471,7 +471,8 @@ hmeioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - hme_mcreset(sc); + if (ifp->if_flags & IFF_RUNNING) + hme_mcreset(sc); error = 0; } break; diff --git a/sys/arch/sparc/dev/if_ie.c b/sys/arch/sparc/dev/if_ie.c index f42747a0f6e..c6e15657f30 100644 --- a/sys/arch/sparc/dev/if_ie.c +++ b/sys/arch/sparc/dev/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.28 2004/09/29 07:35:11 miod Exp $ */ +/* $OpenBSD: if_ie.c,v 1.29 2005/01/15 05:24:10 brad Exp $ */ /* $NetBSD: if_ie.c,v 1.33 1997/07/29 17:55:38 fair Exp $ */ /*- @@ -2038,7 +2038,8 @@ ieioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - mc_reset(sc); + if (ifp->if_flags & IFF_RUNNING) + mc_reset(sc); error = 0; } break; diff --git a/sys/arch/sparc/dev/qe.c b/sys/arch/sparc/dev/qe.c index 0263de1e758..40993385e1d 100644 --- a/sys/arch/sparc/dev/qe.c +++ b/sys/arch/sparc/dev/qe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qe.c,v 1.25 2004/09/29 07:35:11 miod Exp $ */ +/* $OpenBSD: qe.c,v 1.26 2005/01/15 05:24:10 brad Exp $ */ /* * Copyright (c) 1998, 2000 Jason L. Wright. @@ -663,7 +663,7 @@ qeioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - if (ifp->if_flags & IFF_UP) + if (ifp->if_flags & IFF_RUNNING) qeinit(sc); error = 0; } diff --git a/sys/arch/vax/bi/if_ni.c b/sys/arch/vax/bi/if_ni.c index 34bdafbd4b8..305852aa8b6 100644 --- a/sys/arch/vax/bi/if_ni.c +++ b/sys/arch/vax/bi/if_ni.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ni.c,v 1.5 2004/07/07 23:10:43 deraadt Exp $ */ +/* $OpenBSD: if_ni.c,v 1.6 2005/01/15 05:24:10 brad Exp $ */ /* $NetBSD: if_ni.c,v 1.15 2002/05/22 16:03:14 wiz Exp $ */ /* * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved. @@ -763,7 +763,8 @@ niioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - ni_setup(sc); + if (ifp->if_flags & IFF_RUNNING) + ni_setup(sc); error = 0; } break; diff --git a/sys/arch/vax/if/sgec.c b/sys/arch/vax/if/sgec.c index 7d4c1d7ec97..d52aee2092f 100644 --- a/sys/arch/vax/if/sgec.c +++ b/sys/arch/vax/if/sgec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sgec.c,v 1.7 2004/07/07 23:10:45 deraadt Exp $ */ +/* $OpenBSD: sgec.c,v 1.8 2005/01/15 05:24:10 brad Exp $ */ /* $NetBSD: sgec.c,v 1.5 2000/06/04 02:14:14 matt Exp $ */ /* * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved. @@ -552,7 +552,8 @@ zeioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - ze_setup(sc); + if (ifp->if_flags & IFF_RUNNING) + ze_setup(sc); error = 0; } break; diff --git a/sys/dev/ic/am7990.c b/sys/dev/ic/am7990.c index 5c564d8003b..8447a7aa1a6 100644 --- a/sys/dev/ic/am7990.c +++ b/sys/dev/ic/am7990.c @@ -1,4 +1,4 @@ -/* $OpenBSD: am7990.c,v 1.37 2005/01/01 03:59:52 brad Exp $ */ +/* $OpenBSD: am7990.c,v 1.38 2005/01/15 05:24:10 brad Exp $ */ /* $NetBSD: am7990.c,v 1.22 1996/10/13 01:37:19 christos Exp $ */ /*- @@ -909,7 +909,8 @@ am7990_ioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - am7990_reset(sc); + if (ifp->if_flags & IFF_RUNNING) + am7990_reset(sc); error = 0; } break; diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c index 07e5da5f304..ddf80afe40f 100644 --- a/sys/dev/ic/atw.c +++ b/sys/dev/ic/atw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atw.c,v 1.27 2004/12/31 04:27:52 jsg Exp $ */ +/* $OpenBSD: atw.c,v 1.28 2005/01/15 05:24:10 brad Exp $ */ /* $NetBSD: atw.c,v 1.69 2004/07/23 07:07:55 dyoung Exp $ */ /*- @@ -4007,7 +4007,7 @@ atw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) #endif if (error == ENETRESET) { - if (ATW_IS_ENABLED(sc)) + if (ifp->if_flags & IFF_RUNNING) atw_filter_setup(sc); /* do not rescan */ error = 0; } diff --git a/sys/dev/ic/awi.c b/sys/dev/ic/awi.c index 198ca7cb7b9..28a0f72c701 100644 --- a/sys/dev/ic/awi.c +++ b/sys/dev/ic/awi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: awi.c,v 1.15 2004/11/23 21:12:23 fgsch Exp $ */ +/* $OpenBSD: awi.c,v 1.16 2005/01/15 05:24:10 brad Exp $ */ /* $NetBSD: awi.c,v 1.26 2000/07/21 04:48:55 onoe Exp $ */ /*- @@ -526,7 +526,7 @@ awi_ioctl(ifp, cmd, data) * Do not rescan BSS. Rather, just reset multicast filter. */ if (error == ENETRESET) { - if (sc->sc_enabled) + if (ifp->if_flags & IFF_RUNNING) error = awi_init(sc); else error = 0; diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index 42101cb715c..a0866b70206 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.79 2005/01/14 15:04:51 brad Exp $ */ +/* $OpenBSD: dc.c,v 1.80 2005/01/15 05:24:11 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -3096,7 +3096,8 @@ dc_ioctl(ifp, command, data) * Multicast list has changed; set the hardware * filter accordingly. */ - dc_setfilt(sc); + if (ifp->if_flags & IFF_RUNNING) + dc_setfilt(sc); error = 0; } break; diff --git a/sys/dev/ic/dp8390.c b/sys/dev/ic/dp8390.c index 8f8ea1572ab..46b43b40393 100644 --- a/sys/dev/ic/dp8390.c +++ b/sys/dev/ic/dp8390.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dp8390.c,v 1.26 2004/06/06 17:56:36 mcbride Exp $ */ +/* $OpenBSD: dp8390.c,v 1.27 2005/01/15 05:24:11 brad Exp $ */ /* $NetBSD: dp8390.c,v 1.13 1998/07/05 06:49:11 jonathan Exp $ */ /* @@ -902,8 +902,10 @@ dp8390_ioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - dp8390_stop(sc); /* XXX for ds_setmcaf? */ - dp8390_init(sc); + if (ifp->if_flags & IFF_RUNNING) { + dp8390_stop(sc); /* XXX for ds_setmcaf? */ + dp8390_init(sc); + } error = 0; } break; diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c index 1cc9187ae0b..d6f01ca6174 100644 --- a/sys/dev/ic/elink3.c +++ b/sys/dev/ic/elink3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: elink3.c,v 1.62 2004/05/12 06:35:10 tedu Exp $ */ +/* $OpenBSD: elink3.c,v 1.63 2005/01/15 05:24:11 brad Exp $ */ /* $NetBSD: elink3.c,v 1.32 1997/05/14 00:22:00 thorpej Exp $ */ /* @@ -1555,7 +1555,8 @@ epioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - epreset(sc); + if (ifp->if_flags & IFF_RUNNING) + epreset(sc); error = 0; } break; diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c index 7c0cbb78c65..70378d7557c 100644 --- a/sys/dev/ic/fxp.c +++ b/sys/dev/ic/fxp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fxp.c,v 1.64 2005/01/14 18:14:12 deraadt Exp $ */ +/* $OpenBSD: fxp.c,v 1.65 2005/01/15 05:24:11 brad Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -1730,7 +1730,8 @@ fxp_ioctl(ifp, command, data) * Multicast list has changed; set the hardware * filter accordingly. */ - fxp_init(sc); + if (ifp->if_flags & IFF_RUNNING) + fxp_init(sc); error = 0; } break; diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c index 1f0b7daeee8..28dc070f19a 100644 --- a/sys/dev/ic/gem.c +++ b/sys/dev/ic/gem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gem.c,v 1.39 2004/09/27 23:59:27 brad Exp $ */ +/* $OpenBSD: gem.c,v 1.40 2005/01/15 05:24:11 brad Exp $ */ /* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */ /* @@ -1432,7 +1432,8 @@ gem_ioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - gem_init(ifp); + if (ifp->if_flags & IFF_RUNNING) + gem_init(ifp); error = 0; } break; diff --git a/sys/dev/ic/hme.c b/sys/dev/ic/hme.c index be104208907..2f5e41f1602 100644 --- a/sys/dev/ic/hme.c +++ b/sys/dev/ic/hme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hme.c,v 1.33 2004/09/28 00:21:23 brad Exp $ */ +/* $OpenBSD: hme.c,v 1.34 2005/01/15 05:24:11 brad Exp $ */ /* $NetBSD: hme.c,v 1.21 2001/07/07 15:59:37 thorpej Exp $ */ /*- @@ -1188,7 +1188,8 @@ hme_ioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - hme_setladrf(sc); + if (ifp->if_flags & IFF_RUNNING) + hme_setladrf(sc); error = 0; } break; diff --git a/sys/dev/ic/i82596.c b/sys/dev/ic/i82596.c index 769e2a7ecbf..c163fff852e 100644 --- a/sys/dev/ic/i82596.c +++ b/sys/dev/ic/i82596.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i82596.c,v 1.24 2004/05/12 06:35:10 tedu Exp $ */ +/* $OpenBSD: i82596.c,v 1.25 2005/01/15 05:24:11 brad Exp $ */ /* $NetBSD: i82586.c,v 1.18 1998/08/15 04:42:42 mycroft Exp $ */ /*- @@ -1945,7 +1945,8 @@ i82596_ioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - ie_mc_reset(sc); + if (ifp->if_flags & IFF_RUNNING) + ie_mc_reset(sc); error = 0; } break; diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c index 792a7198456..add84ce8de6 100644 --- a/sys/dev/ic/if_wi.c +++ b/sys/dev/ic/if_wi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi.c,v 1.114 2004/12/22 02:19:11 millert Exp $ */ +/* $OpenBSD: if_wi.c,v 1.115 2005/01/15 05:24:11 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -127,7 +127,7 @@ u_int32_t widebug = WIDEBUG; #if !defined(lint) && !defined(__OpenBSD__) static const char rcsid[] = - "$OpenBSD: if_wi.c,v 1.114 2004/12/22 02:19:11 millert Exp $"; + "$OpenBSD: if_wi.c,v 1.115 2005/01/15 05:24:11 brad Exp $"; #endif /* lint */ #ifdef foo @@ -1653,12 +1653,14 @@ wi_ioctl(ifp, command, data) error = (command == SIOCADDMULTI) ? ether_addmulti(ifr, &sc->sc_arpcom) : ether_delmulti(ifr, &sc->sc_arpcom); + if (error == ENETRESET) { /* * Multicast list has changed; set the hardware filter * accordingly. */ - wi_setmulti(sc); + if (ifp->if_flags & IFF_RUNNING) + wi_setmulti(sc); error = 0; } break; diff --git a/sys/dev/ic/lemac.c b/sys/dev/ic/lemac.c index d2ccb0ed40a..893302ef04f 100644 --- a/sys/dev/ic/lemac.c +++ b/sys/dev/ic/lemac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lemac.c,v 1.5 2003/10/30 02:30:48 itojun Exp $ */ +/* $OpenBSD: lemac.c,v 1.6 2005/01/15 05:24:11 brad Exp $ */ /* $NetBSD: lemac.c,v 1.20 2001/06/13 10:46:02 wiz Exp $ */ /*- @@ -846,7 +846,8 @@ lemac_ifioctl(struct ifnet *ifp, u_long cmd, caddr_t data) if (error == ENETRESET) { /* Reset multicast filtering. */ - lemac_init(sc); + if (ifp->if_flags & IFF_RUNNING) + lemac_init(sc); error = 0; } break; diff --git a/sys/dev/ic/mtd8xx.c b/sys/dev/ic/mtd8xx.c index df72c1cd56b..20789d46c00 100644 --- a/sys/dev/ic/mtd8xx.c +++ b/sys/dev/ic/mtd8xx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mtd8xx.c,v 1.7 2004/09/28 04:37:32 brad Exp $ */ +/* $OpenBSD: mtd8xx.c,v 1.8 2005/01/15 05:24:11 brad Exp $ */ /* * Copyright (c) 2003 Oleg Safiullin <form@pdp11.org.ru> @@ -631,7 +631,8 @@ mtd_ioctl(struct ifnet *ifp, u_long command, caddr_t data) * Multicast list has changed; set the hardware * filter accordingly. */ - mtd_setmulti(sc); + if (ifp->if_flags & IFF_RUNNING) + mtd_setmulti(sc); error = 0; } break; diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c index c8eb9fc0335..b79c4f89af8 100644 --- a/sys/dev/ic/re.c +++ b/sys/dev/ic/re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re.c,v 1.2 2005/01/14 01:32:45 pvalchev Exp $ */ +/* $OpenBSD: re.c,v 1.3 2005/01/15 05:24:11 brad Exp $ */ /* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -1896,7 +1896,8 @@ re_ioctl(ifp, command, data) * Multicast list has changed; set the hardware * filter accordingly. */ - re_setmulti(sc); + if (ifp->if_flags & IFF_RUNNING) + re_setmulti(sc); error = 0; } break; diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c index 9aa4e907c53..d5f90fcb49c 100644 --- a/sys/dev/ic/rtl81x9.c +++ b/sys/dev/ic/rtl81x9.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtl81x9.c,v 1.35 2004/11/21 18:50:43 brad Exp $ */ +/* $OpenBSD: rtl81x9.c,v 1.36 2005/01/15 05:24:11 brad Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1127,7 +1127,8 @@ int rl_ioctl(ifp, command, data) * Multicast list has changed; set the hardware * filter accordingly. */ - rl_setmulti(sc); + if (ifp->if_flags & IFF_RUNNING) + rl_setmulti(sc); error = 0; } break; diff --git a/sys/dev/ic/smc91cxx.c b/sys/dev/ic/smc91cxx.c index 5caa5ca0c9c..afc1ec6a141 100644 --- a/sys/dev/ic/smc91cxx.c +++ b/sys/dev/ic/smc91cxx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smc91cxx.c,v 1.18 2004/05/12 06:35:10 tedu Exp $ */ +/* $OpenBSD: smc91cxx.c,v 1.19 2005/01/15 05:24:11 brad Exp $ */ /* $NetBSD: smc91cxx.c,v 1.11 1998/08/08 23:51:41 mycroft Exp $ */ /*- @@ -1059,7 +1059,8 @@ smc91cxx_ioctl(ifp, cmd, data) * Multicast list has changed; set the hardware * filter accordingly. */ - smc91cxx_reset(sc); + if (ifp->if_flags & IFF_RUNNING) + smc91cxx_reset(sc); error = 0; } break; diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c index f82e3d2c7bc..4d3eceb31ae 100644 --- a/sys/dev/ic/xl.c +++ b/sys/dev/ic/xl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xl.c,v 1.61 2004/11/01 02:03:45 brad Exp $ */ +/* $OpenBSD: xl.c,v 1.62 2005/01/15 05:24:11 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -2464,10 +2464,12 @@ xl_ioctl(ifp, command, data) * Multicast list has changed; set the hardware * filter accordingly. */ - if (sc->xl_type == XL_TYPE_905B) - xl_setmulti_hash(sc); - else - xl_setmulti(sc); + if (ifp->if_flags & IFF_RUNNING) { + if (sc->xl_type == XL_TYPE_905B) + xl_setmulti_hash(sc); + else + xl_setmulti(sc); + } error = 0; } break; diff --git a/sys/dev/isa/if_ed.c b/sys/dev/isa/if_ed.c index b74cd90ee28..6013873cc62 100644 --- a/sys/dev/isa/if_ed.c +++ b/sys/dev/isa/if_ed.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ed.c,v 1.53 2004/06/06 17:56:36 mcbride Exp $ */ +/* $OpenBSD: if_ed.c,v 1.54 2005/01/15 05:24:11 brad Exp $ */ /* $NetBSD: if_ed.c,v 1.105 1996/10/21 22:40:45 thorpej Exp $ */ /* @@ -2499,8 +2499,10 @@ edioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - edstop(sc); /* XXX for ds_setmcaf? */ - edinit(sc); + if (ifp->if_flags & IFF_RUNNING) { + edstop(sc); /* XXX for ds_setmcaf? */ + edinit(sc); + } error = 0; } break; diff --git a/sys/dev/isa/if_ef_isapnp.c b/sys/dev/isa/if_ef_isapnp.c index be226d2273b..5e92e611478 100644 --- a/sys/dev/isa/if_ef_isapnp.c +++ b/sys/dev/isa/if_ef_isapnp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ef_isapnp.c,v 1.17 2004/09/28 01:02:14 brad Exp $ */ +/* $OpenBSD: if_ef_isapnp.c,v 1.18 2005/01/15 05:24:11 brad Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -387,8 +387,10 @@ efioctl(ifp, cmd, data) error = (cmd == SIOCADDMULTI) ? ether_addmulti(ifr, &sc->sc_arpcom) : ether_delmulti(ifr, &sc->sc_arpcom); + if (error == ENETRESET) { - efreset(sc); + if (ifp->if_flags & IFF_RUNNING) + efreset(sc); error = 0; } efsetmulti(sc); diff --git a/sys/dev/isa/if_fe.c b/sys/dev/isa/if_fe.c index 6e02157c6bc..c8e851748f4 100644 --- a/sys/dev/isa/if_fe.c +++ b/sys/dev/isa/if_fe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_fe.c,v 1.20 2004/05/12 06:35:11 tedu Exp $ */ +/* $OpenBSD: if_fe.c,v 1.21 2005/01/15 05:24:11 brad Exp $ */ /* * All Rights Reserved, Copyright (C) Fujitsu Limited 1995 @@ -1979,7 +1979,8 @@ fe_ioctl(ifp, command, data) * Multicast list has changed; set the hardware filter * accordingly. */ - fe_setmode(sc); + if (ifp->if_flags & IFF_RUNNING) + fe_setmode(sc); error = 0; } break; diff --git a/sys/dev/isa/if_ie.c b/sys/dev/isa/if_ie.c index 889c51a4fc3..225e1411ef7 100644 --- a/sys/dev/isa/if_ie.c +++ b/sys/dev/isa/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.29 2004/05/18 11:16:33 miod Exp $ */ +/* $OpenBSD: if_ie.c,v 1.30 2005/01/15 05:24:11 brad Exp $ */ /* $NetBSD: if_ie.c,v 1.51 1996/05/12 23:52:48 mycroft Exp $ */ /*- @@ -2205,7 +2205,8 @@ ieioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - mc_reset(sc); + if (ifp->if_flags & IFF_RUNNING) + mc_reset(sc); error = 0; } break; diff --git a/sys/dev/isa/if_iy.c b/sys/dev/isa/if_iy.c index a91f47281fe..db4dddba6a3 100644 --- a/sys/dev/isa/if_iy.c +++ b/sys/dev/isa/if_iy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iy.c,v 1.19 2004/05/12 06:35:11 tedu Exp $ */ +/* $OpenBSD: if_iy.c,v 1.20 2005/01/15 05:24:11 brad Exp $ */ /* $NetBSD: if_iy.c,v 1.4 1996/05/12 23:52:53 mycroft Exp $ */ /* #define IYDEBUG */ /* #define IYMEMDEBUG */ @@ -1165,7 +1165,8 @@ iyioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - iy_mc_reset(sc); /* XXX */ + if (ifp->if_flags & IFF_RUNNING) + iy_mc_reset(sc); /* XXX */ error = 0; } break; diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c index 7b3451b2520..bff8d5d255a 100644 --- a/sys/dev/pci/if_de.c +++ b/sys/dev/pci/if_de.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_de.c,v 1.62 2004/11/08 21:16:47 deraadt Exp $ */ +/* $OpenBSD: if_de.c,v 1.63 2005/01/15 05:24:11 brad Exp $ */ /* $NetBSD: if_de.c,v 1.45 1997/06/09 00:34:18 thorpej Exp $ */ /*- @@ -4562,8 +4562,10 @@ tulip_ifioctl( error = ether_delmulti(ifr, TULIP_ETHERCOM(sc)); if (error == ENETRESET) { - tulip_addr_filter(sc); /* reset multicast filtering */ - tulip_init(sc); + if (ifp->if_flags & IFF_RUNNING) { + tulip_addr_filter(sc); /* reset multicast filtering */ + tulip_init(sc); + } error = 0; } break; diff --git a/sys/dev/pci/if_sf.c b/sys/dev/pci/if_sf.c index bafc8971d54..21342f180a2 100644 --- a/sys/dev/pci/if_sf.c +++ b/sys/dev/pci/if_sf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sf.c,v 1.27 2004/11/29 07:22:44 jsg Exp $ */ +/* $OpenBSD: if_sf.c,v 1.28 2005/01/15 05:24:11 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -510,7 +510,8 @@ int sf_ioctl(ifp, command, data) * Multicast list has changed; set the hardware * filter accordingly. */ - sf_setmulti(sc); + if (ifp->if_flags & IFF_RUNNING) + sf_setmulti(sc); error = 0; } break; diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c index d2d045ed382..5fca6dc4f5c 100644 --- a/sys/dev/pci/if_sis.c +++ b/sys/dev/pci/if_sis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sis.c,v 1.42 2004/09/28 04:37:33 brad Exp $ */ +/* $OpenBSD: if_sis.c,v 1.43 2005/01/15 05:24:11 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -1966,10 +1966,12 @@ int sis_ioctl(ifp, command, data) * Multicast list has changed; set the hardware * filter accordingly. */ - if (sc->sis_type == SIS_TYPE_83815) - sis_setmulti_ns(sc); - else - sis_setmulti_sis(sc); + if (ifp->if_flags & IFF_RUNNING) { + if (sc->sis_type == SIS_TYPE_83815) + sis_setmulti_ns(sc); + else + sis_setmulti_sis(sc); + } error = 0; } break; diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c index c99e56f07db..93b3f4e61fd 100644 --- a/sys/dev/pci/if_sk.c +++ b/sys/dev/pci/if_sk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sk.c,v 1.59 2005/01/02 01:46:17 brad Exp $ */ +/* $OpenBSD: if_sk.c,v 1.60 2005/01/15 05:24:11 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1051,7 +1051,8 @@ sk_ioctl(struct ifnet *ifp, u_long command, caddr_t data) * Multicast list has changed; set the hardware * filter accordingly. */ - sk_setmulti(sc_if); + if (ifp->if_flags & IFF_RUNNING) + sk_setmulti(sc_if); error = 0; } break; diff --git a/sys/dev/pci/if_ste.c b/sys/dev/pci/if_ste.c index a532569e11d..04ee950709c 100644 --- a/sys/dev/pci/if_ste.c +++ b/sys/dev/pci/if_ste.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ste.c,v 1.27 2004/11/21 18:04:09 brad Exp $ */ +/* $OpenBSD: if_ste.c,v 1.28 2005/01/15 05:24:11 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -1335,7 +1335,8 @@ int ste_ioctl(ifp, command, data) * Multicast list has changed; set the hardware * filter accordingly. */ - ste_setmulti(sc); + if (ifp->if_flags & IFF_RUNNING) + ste_setmulti(sc); error = 0; } break; diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c index 8ffc359e033..2aa62162f31 100644 --- a/sys/dev/pci/if_stge.c +++ b/sys/dev/pci/if_stge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_stge.c,v 1.9 2004/11/10 10:18:31 grange Exp $ */ +/* $OpenBSD: if_stge.c,v 1.10 2005/01/15 05:24:11 brad Exp $ */ /* $NetBSD: if_stge.c,v 1.4 2001/07/25 15:44:48 thorpej Exp $ */ /*- @@ -1024,13 +1024,16 @@ stge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) error = (cmd == SIOCADDMULTI) ? ether_addmulti(ifr, &sc->sc_arpcom) : ether_delmulti(ifr, &sc->sc_arpcom); + if (error == ENETRESET) { /* * Multicast list has changed; set the hardware * filter accordingly. */ - stge_init(ifp); - error = 0; + if (ifp->if_flags & IFF_RUNNING) + error = stge_init(ifp); + else + error = 0; } break; diff --git a/sys/dev/pci/if_tx.c b/sys/dev/pci/if_tx.c index eeac0f3c509..97533f5ca05 100644 --- a/sys/dev/pci/if_tx.c +++ b/sys/dev/pci/if_tx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tx.c,v 1.28 2004/09/23 17:45:16 brad Exp $ */ +/* $OpenBSD: if_tx.c,v 1.29 2005/01/15 05:24:11 brad Exp $ */ /* $FreeBSD: src/sys/pci/if_tx.c,v 1.45 2001/02/07 20:11:02 semenu Exp $ */ /*- @@ -716,7 +716,8 @@ epic_ifioctl(ifp, command, data) ether_delmulti((struct ifreq *)data, &sc->arpcom); if (error == ENETRESET) { - epic_set_mc_table(sc); + if (ifp->if_flags & IFF_RUNNING) + epic_set_mc_table(sc); error = 0; } #endif diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c index 2ffeaf5c976..31b968af97c 100644 --- a/sys/dev/pci/if_txp.c +++ b/sys/dev/pci/if_txp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_txp.c,v 1.75 2004/12/17 14:10:40 grange Exp $ */ +/* $OpenBSD: if_txp.c,v 1.76 2005/01/15 05:24:11 brad Exp $ */ /* * Copyright (c) 2001 @@ -1265,7 +1265,8 @@ txp_ioctl(ifp, command, data) * Multicast list has changed; set the hardware * filter accordingly. */ - txp_set_filter(sc); + if (ifp->if_flags & IFF_RUNNING) + txp_set_filter(sc); error = 0; } break; diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c index 65402bac0f9..7cbfa1151ce 100644 --- a/sys/dev/pci/if_vge.c +++ b/sys/dev/pci/if_vge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vge.c,v 1.5 2004/12/27 00:46:40 pvalchev Exp $ */ +/* $OpenBSD: if_vge.c,v 1.6 2005/01/15 05:24:11 brad Exp $ */ /* $FreeBSD: if_vge.c,v 1.3 2004/09/11 22:13:25 wpaul Exp $ */ /* * Copyright (c) 2004 @@ -1803,8 +1803,10 @@ vge_ioctl(struct ifnet *ifp, u_long command, caddr_t data) error = (command == SIOCADDMULTI) ? ether_addmulti(ifr, &sc->arpcom) : ether_delmulti(ifr, &sc->arpcom); + if (error == ENETRESET) { - vge_setmulti(sc); + if (ifp->if_flags & IFF_RUNNING) + vge_setmulti(sc); error = 0; } break; diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index 5b441ba3911..92db3df3858 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.44 2004/09/23 17:45:16 brad Exp $ */ +/* $OpenBSD: if_vr.c,v 1.45 2005/01/15 05:24:11 brad Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1672,7 +1672,8 @@ vr_ioctl(ifp, command, data) * Multicast list has changed; set the hardware * filter accordingly. */ - vr_setmulti(sc); + if (ifp->if_flags & IFF_RUNNING) + vr_setmulti(sc); error = 0; } break; diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c index 18acb268d39..88cf1264be1 100644 --- a/sys/dev/pci/if_wb.c +++ b/sys/dev/pci/if_wb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wb.c,v 1.26 2004/12/11 02:06:47 brad Exp $ */ +/* $OpenBSD: if_wb.c,v 1.27 2005/01/15 05:24:11 brad Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1676,7 +1676,8 @@ int wb_ioctl(ifp, command, data) * Multicast list has changed; set the hardware * filter accordingly. */ - wb_setmulti(sc); + if (ifp->if_flags & IFF_RUNNING) + wb_setmulti(sc); error = 0; } break; diff --git a/sys/dev/sbus/be.c b/sys/dev/sbus/be.c index 62e8cd94f55..f37d1d09550 100644 --- a/sys/dev/sbus/be.c +++ b/sys/dev/sbus/be.c @@ -1,4 +1,4 @@ -/* $OpenBSD: be.c,v 1.15 2004/05/12 06:35:11 tedu Exp $ */ +/* $OpenBSD: be.c,v 1.16 2005/01/15 05:24:12 brad Exp $ */ /* $NetBSD: be.c,v 1.26 2001/03/20 15:39:20 pk Exp $ */ /*- @@ -1026,7 +1026,8 @@ beioctl(struct ifnet *ifp, u_long cmd, caddr_t data) * Multicast list has changed; set the hardware filter * accordingly. */ - be_mcreset(sc); + if (ifp->if_flags & IFF_RUNNING) + be_mcreset(sc); error = 0; } break; diff --git a/sys/dev/sbus/qe.c b/sys/dev/sbus/qe.c index ba74ad0ff92..8e086f1de79 100644 --- a/sys/dev/sbus/qe.c +++ b/sys/dev/sbus/qe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qe.c,v 1.15 2004/05/12 06:35:11 tedu Exp $ */ +/* $OpenBSD: qe.c,v 1.16 2005/01/15 05:24:12 brad Exp $ */ /* $NetBSD: qe.c,v 1.16 2001/03/30 17:30:18 christos Exp $ */ /*- @@ -1001,7 +1001,8 @@ qeioctl(ifp, cmd, data) * Multicast list has changed; set the hardware filter * accordingly. */ - qe_mcreset(sc); + if (ifp->if_flags & IFF_RUNNING) + qe_mcreset(sc); error = 0; } break; |