Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 May 2009 08:02:05 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r192740 - head/sys/dev/msk
Message-ID:  <200905250802.n4P825ct015779@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Mon May 25 08:02:05 2009
New Revision: 192740
URL: http://svn.freebsd.org/changeset/base/192740

Log:
  Simplify SIOCSIFFLAGS handler.

Modified:
  head/sys/dev/msk/if_msk.c

Modified: head/sys/dev/msk/if_msk.c
==============================================================================
--- head/sys/dev/msk/if_msk.c	Mon May 25 07:59:30 2009	(r192739)
+++ head/sys/dev/msk/if_msk.c	Mon May 25 08:02:05 2009	(r192740)
@@ -957,18 +957,14 @@ msk_ioctl(struct ifnet *ifp, u_long comm
 	case SIOCSIFFLAGS:
 		MSK_IF_LOCK(sc_if);
 		if ((ifp->if_flags & IFF_UP) != 0) {
-			if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) {
-				if (((ifp->if_flags ^ sc_if->msk_if_flags)
-				    & (IFF_PROMISC | IFF_ALLMULTI)) != 0)
-					msk_rxfilter(sc_if);
-			} else {
-				if ((sc_if->msk_flags & MSK_FLAG_DETACH) == 0)
-					msk_init_locked(sc_if);
-			}
-		} else {
-			if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
-				msk_stop(sc_if);
-		}
+			if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0 &&
+			    ((ifp->if_flags ^ sc_if->msk_if_flags) &
+			    (IFF_PROMISC | IFF_ALLMULTI)) != 0)
+				msk_rxfilter(sc_if);
+			else if ((sc_if->msk_flags & MSK_FLAG_DETACH) == 0)
+				msk_init_locked(sc_if);
+		} else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
+			msk_stop(sc_if);
 		sc_if->msk_if_flags = ifp->if_flags;
 		MSK_IF_UNLOCK(sc_if);
 		break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905250802.n4P825ct015779>