Date: Sun, 11 Dec 2011 09:37:25 +0000 (UTC) From: Jack F Vogel <jfv@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r228405 - head/sys/dev/e1000 Message-ID: <201112110937.pBB9bPWC045562@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jfv Date: Sun Dec 11 09:37:25 2011 New Revision: 228405 URL: http://svn.freebsd.org/changeset/base/228405 Log: Correct LINT build issues in the ioctl code. Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Sun Dec 11 00:04:18 2011 (r228404) +++ head/sys/dev/e1000/if_em.c Sun Dec 11 09:37:25 2011 (r228405) @@ -1045,8 +1045,8 @@ em_ioctl(struct ifnet *ifp, u_long comma struct ifreq *ifr = (struct ifreq *)data; #if defined(INET) || defined(INET6) struct ifaddr *ifa = (struct ifaddr *)data; -#endif bool avoid_reset = FALSE; +#endif int error = 0; if (adapter->in_detach) @@ -1058,6 +1058,11 @@ em_ioctl(struct ifnet *ifp, u_long comma if (ifa->ifa_addr->sa_family == AF_INET) avoid_reset = TRUE; #endif +#ifdef INET6 + if (ifa->ifa_addr->sa_family == AF_INET6) + avoid_reset = TRUE; +#endif +#if defined(INET) || defined(INET6) /* ** Calling init results in link renegotiation, ** so we avoid doing it when possible. @@ -1066,12 +1071,11 @@ em_ioctl(struct ifnet *ifp, u_long comma ifp->if_flags |= IFF_UP; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) em_init(adapter); -#ifdef INET if (!(ifp->if_flags & IFF_NOARP)) arp_ifinit(ifp, ifa); -#endif } else error = ether_ioctl(ifp, command, data); +#endif break; case SIOCSIFMTU: { Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Sun Dec 11 00:04:18 2011 (r228404) +++ head/sys/dev/e1000/if_igb.c Sun Dec 11 09:37:25 2011 (r228405) @@ -992,9 +992,9 @@ igb_ioctl(struct ifnet *ifp, u_long comm struct ifreq *ifr = (struct ifreq *)data; #if defined(INET) || defined(INET6) struct ifaddr *ifa = (struct ifaddr *)data; + bool avoid_reset = FALSE; #endif int error = 0; - bool avoid_reset = FALSE; if (adapter->in_detach) return (error); @@ -1005,10 +1005,11 @@ igb_ioctl(struct ifnet *ifp, u_long comm if (ifa->ifa_addr->sa_family == AF_INET) avoid_reset = TRUE; #endif -#ifdef INET +#ifdef INET6 if (ifa->ifa_addr->sa_family == AF_INET6) avoid_reset = TRUE; #endif +#if defined(INET) || defined(INET6) /* ** Calling init results in link renegotiation, ** so we avoid doing it when possible. @@ -1017,12 +1018,11 @@ igb_ioctl(struct ifnet *ifp, u_long comm ifp->if_flags |= IFF_UP; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) igb_init(adapter); -#ifdef INET if (!(ifp->if_flags & IFF_NOARP)) arp_ifinit(ifp, ifa); -#endif } else error = ether_ioctl(ifp, command, data); +#endif break; case SIOCSIFMTU: {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112110937.pBB9bPWC045562>