From 86400338f3955fe587b46d60012b5978aa8efe4c Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Fri, 4 Aug 2006 15:00:19 +0000 Subject: simplify interface flags ioctl handler. --- sys/dev/pci/if_stge.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'sys/dev') 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)) -- cgit v1.2.3