svn commit: r245404 - projects/vmxnet/sys/dev/vmware/vmxnet

Bryan Venteicher bryanv at FreeBSD.org
Mon Jan 14 04:31:55 UTC 2013


Author: bryanv
Date: Mon Jan 14 04:31:54 2013
New Revision: 245404
URL: http://svnweb.freebsd.org/changeset/base/245404

Log:
  Remove special handling of SIOCSIFADDR
  
  Init is not especially expensive on vmxnet, so don't bother
  trying to avoid it when setting an inet address.
  
  opt_inet.h wasn't being included so this was dead code anyways.
  
  Approved by:	grehan (implicit)

Modified:
  projects/vmxnet/sys/dev/vmware/vmxnet/if_vic.c

Modified: projects/vmxnet/sys/dev/vmware/vmxnet/if_vic.c
==============================================================================
--- projects/vmxnet/sys/dev/vmware/vmxnet/if_vic.c	Mon Jan 14 04:30:21 2013	(r245403)
+++ projects/vmxnet/sys/dev/vmware/vmxnet/if_vic.c	Mon Jan 14 04:31:54 2013	(r245404)
@@ -840,10 +840,6 @@ vic_ioctl(struct ifnet *ifp, u_long cmd,
 {
 	struct vic_softc *sc;
 	struct ifreq *ifr;
-#if defined(INET) || defined(INET6)
-	struct ifaddr *ifa = data;
-	int avoid_reset = 0;
-#endif
 	int mask, error;
 
 	sc = ifp->if_softc;
@@ -851,27 +847,6 @@ vic_ioctl(struct ifnet *ifp, u_long cmd,
 	error = 0;
 
 	switch (cmd) {
-	case SIOCSIFADDR:
-#ifdef INET
-		if (ifa->ifa_addr->sa_family == AF_INET)
-			avoid_reset = 1;
-#endif
-#ifdef INET6
-		if (ifa->ifa_addr->sa_family == AF_INET6)
-			avoid_reset = 1;
-#endif
-#if defined(INET) || defined(INET6)
-		if (avoid_reset != 0) {
-			ifp->if_flags |= IFF_UP;
-			if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
-				vic_init(adapter);
-			if ((ifp->if_flags & IFF_NOARP) == 0)
-				arp_ifinit(ifp, ifa);
-		} else
-			error = ether_ioctl(ifp, command, data);
-#endif
-		break;
-
 	case SIOCSIFMTU:
 		VIC_LOCK(sc);
 		if (ifr->ifr_mtu < ETHERMIN)


More information about the svn-src-projects mailing list