Avoid initializing the interface in the SIOCSIFFLAGS if ! UP and ! RUNNING.

This commit is contained in:
thorpej 1999-02-17 03:40:59 +00:00
parent c9956cf132
commit 69a4436f8b
7 changed files with 19 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: dp8390.c,v 1.20 1999/02/07 01:54:50 thorpej Exp $ */
/* $NetBSD: dp8390.c,v 1.21 1999/02/17 03:40:59 thorpej Exp $ */
/*
* Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@ -890,7 +890,7 @@ dp8390_ioctl(ifp, cmd, data)
if ((error = dp8390_enable(sc)) != 0)
break;
dp8390_init(sc);
} else if (sc->sc_enabled) {
} else if ((ifp->if_flags & IFF_UP) != 0) {
/*
* Reset the interface to pick up changes in any other
* flags that affect hardware registers.

View File

@ -1,4 +1,4 @@
/* $NetBSD: elink3.c,v 1.51 1998/12/12 16:36:24 mycroft Exp $ */
/* $NetBSD: elink3.c,v 1.52 1999/02/17 03:41:00 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -1725,7 +1725,7 @@ epioctl(ifp, cmd, data)
if ((error = epenable(sc)) != 0)
break;
epinit(sc);
} else if (sc->enabled) {
} else if ((ifp->if_flags & IFF_UP) != 0) {
/*
* deal with flags changes:
* IFF_MULTICAST, IFF_PROMISC.

View File

@ -1,4 +1,4 @@
/* $NetBSD: elinkxl.c,v 1.3 1999/01/10 14:19:46 drochner Exp $ */
/* $NetBSD: elinkxl.c,v 1.4 1999/02/17 03:41:00 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -1299,8 +1299,13 @@ ex_ioctl(ifp, cmd, data)
* start it.
*/
ex_init(sc);
} else
} else if ((ifp->if_flags & IFF_UP) != 0) {
/*
* Deal with other flags that change hardware
* state, i.e. IFF_PROMISC.
*/
ex_set_mc(sc);
}
break;
case SIOCADDMULTI:

View File

@ -1,4 +1,4 @@
/* $NetBSD: i82586.c,v 1.19 1998/12/12 16:58:10 mycroft Exp $ */
/* $NetBSD: i82586.c,v 1.20 1999/02/17 03:41:00 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -2026,7 +2026,7 @@ i82586_ioctl(ifp, cmd, data)
* start it.
*/
i82586_init(sc);
} else {
} else if ((ifp->if_flags & IFF_UP) != 0) {
/*
* Reset the interface to pick up changes in any other
* flags that affect hardware registers.

View File

@ -1,4 +1,4 @@
/* $NetBSD: lance.c,v 1.5 1998/12/12 16:58:10 mycroft Exp $ */
/* $NetBSD: lance.c,v 1.6 1999/02/17 03:41:01 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -654,7 +654,7 @@ lance_ioctl(ifp, cmd, data)
* start it.
*/
lance_init(sc);
} else {
} else if ((ifp->if_flags & IFF_UP) != 0) {
/*
* Reset the interface to pick up changes in any other
* flags that affect hardware registers.

View File

@ -1,4 +1,4 @@
/* $NetBSD: mb86960.c,v 1.29 1998/12/03 23:33:45 pk Exp $ */
/* $NetBSD: mb86960.c,v 1.30 1999/02/17 03:41:01 thorpej Exp $ */
/*
* All Rights Reserved, Copyright (C) Fujitsu Limited 1995
@ -1251,7 +1251,7 @@ mb86960_ioctl(ifp, cmd, data)
if ((error = mb86960_enable(sc)) != 0)
break;
mb86960_init(sc);
} else if (sc->sc_enabled) {
} else if ((ifp->if_flags & IFF_UP) != 0) {
/*
* Reset the interface to pick up changes in any other
* flags that affect hardware registers.

View File

@ -1,4 +1,4 @@
/* $NetBSD: smc91cxx.c,v 1.13 1998/11/18 18:34:52 thorpej Exp $ */
/* $NetBSD: smc91cxx.c,v 1.14 1999/02/17 03:41:01 thorpej Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -1056,7 +1056,7 @@ smc91cxx_ioctl(ifp, cmd, data)
if ((error = smc91cxx_enable(sc)) != 0)
break;
smc91cxx_init(sc);
} else if (sc->sc_enabled) {
} else if ((ifp->if_flags & IFF_UP) != 0) {
/*
* Reset the interface to pick up changes in any
* other flags that affect hardware registers.