diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-08-04 15:00:19 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-08-04 15:00:19 +0000 |
commit | 86400338f3955fe587b46d60012b5978aa8efe4c (patch) | |
tree | 6043983414ca10de2ad0a5957bf61369d49eb7db /sys/dev/pci/if_stge.c | |
parent | 9e306b1d3d43cc3d7f498b6f81ade43beb01028d (diff) |
simplify interface flags ioctl handler.
Diffstat (limited to 'sys/dev/pci/if_stge.c')
-rw-r--r-- | sys/dev/pci/if_stge.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c index 6b8de8525e8..6c183dcd9c5 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.31 2006/07/12 20:12:15 brad Exp $ */ +/* $OpenBSD: if_stge.c,v 1.32 2006/08/04 15:00:18 brad Exp $ */ /* $NetBSD: if_stge.c,v 1.27 2005/05/16 21:35:32 bouyer Exp $ */ /*- @@ -743,12 +743,8 @@ stge_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 & IFF_PROMISC && - !(sc->stge_if_flags & IFF_PROMISC)) { - stge_set_filter(sc); - } else if (ifp->if_flags & IFF_RUNNING && - !(ifp->if_flags & IFF_PROMISC) && - sc->stge_if_flags & IFF_PROMISC) { + ((ifp->if_flags ^ sc->stge_if_flags) & + IFF_PROMISC)) { stge_set_filter(sc); } else { if (!(ifp->if_flags & IFF_RUNNING)) |