diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2008-11-07 18:03:53 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2008-11-07 18:03:53 +0000 |
commit | 01d4d3704e8725aff3a9ae216ba003e48f58ebc4 (patch) | |
tree | b8d44fb007b3ac419a73462cafa2c1794ff24b8d /sys/dev/ic | |
parent | dc5c8ea2fa9b1dd94332d88dbdcc077a2c7dd31b (diff) |
Simplify the interface flag handling in the ioctl handler.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/gem.c | 14 | ||||
-rw-r--r-- | sys/dev/ic/gemvar.h | 4 |
2 files changed, 5 insertions, 13 deletions
diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c index 2f734b2d72c..50d81620e0e 100644 --- a/sys/dev/ic/gem.c +++ b/sys/dev/ic/gem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gem.c,v 1.81 2008/11/07 18:00:31 brad Exp $ */ +/* $OpenBSD: gem.c,v 1.82 2008/11/07 18:03:52 brad Exp $ */ /* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */ /* @@ -1450,20 +1450,14 @@ gem_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { - if ((ifp->if_flags & IFF_RUNNING) && - ((ifp->if_flags ^ sc->sc_if_flags) & - (IFF_ALLMULTI | IFF_PROMISC)) != 0) + if (ifp->if_flags & IFF_RUNNING) gem_setladrf(sc); - else { - if ((ifp->if_flags & IFF_RUNNING) == 0) - gem_init(ifp); - } + else + gem_init(ifp); } else { if (ifp->if_flags & IFF_RUNNING) gem_stop(ifp, 1); } - sc->sc_if_flags = ifp->if_flags; - #ifdef GEM_DEBUG sc->sc_debug = (ifp->if_flags & IFF_DEBUG) != 0 ? 1 : 0; #endif diff --git a/sys/dev/ic/gemvar.h b/sys/dev/ic/gemvar.h index f08d959f307..cf394795928 100644 --- a/sys/dev/ic/gemvar.h +++ b/sys/dev/ic/gemvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: gemvar.h,v 1.18 2008/08/30 07:41:51 brad Exp $ */ +/* $OpenBSD: gemvar.h,v 1.19 2008/11/07 18:03:52 brad Exp $ */ /* $NetBSD: gemvar.h,v 1.1 2001/09/16 00:11:43 eeh Exp $ */ /* @@ -141,8 +141,6 @@ struct gem_softc { #endif int sc_burst; /* DVMA burst size in effect */ - int sc_if_flags; - int sc_mif_config; /* Selected MII reg setting */ int sc_pci; /* XXXXX -- PCI buses are LE. */ |