diff options
author | bz <bz@FreeBSD.org> | 2008-11-06 10:17:57 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2008-11-06 10:17:57 +0000 |
commit | 11a8a600e20bfb7941ab71c2d5f2e1a6dba2169d (patch) | |
tree | f111b5ebbe409d1e8b28c44336f0313f1df0c7a3 /sys/dev/cxgb/cxgb_main.c | |
parent | 2109be665616c81b3ff914c6bae03105b492c544 (diff) | |
download | FreeBSD-src-11a8a600e20bfb7941ab71c2d5f2e1a6dba2169d.zip FreeBSD-src-11a8a600e20bfb7941ab71c2d5f2e1a6dba2169d.tar.gz |
Hide AF_INET specific ioctl handling under #ifdef INET.
Reviewed by: kmacy
MFC after: 2 months
Diffstat (limited to 'sys/dev/cxgb/cxgb_main.c')
-rw-r--r-- | sys/dev/cxgb/cxgb_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c index 82107ce..cc6b30b 100644 --- a/sys/dev/cxgb/cxgb_main.c +++ b/sys/dev/cxgb/cxgb_main.c @@ -1931,7 +1931,9 @@ static int cxgb_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data) { struct port_info *p = ifp->if_softc; +#ifdef INET struct ifaddr *ifa = (struct ifaddr *)data; +#endif struct ifreq *ifr = (struct ifreq *)data; int flags, error = 0, reinit = 0; uint32_t mask; @@ -1944,6 +1946,7 @@ cxgb_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data) error = cxgb_set_mtu(p, ifr->ifr_mtu); break; case SIOCSIFADDR: +#ifdef INET if (ifa->ifa_addr->sa_family == AF_INET) { ifp->if_flags |= IFF_UP; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { @@ -1953,6 +1956,7 @@ cxgb_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data) } arp_ifinit(ifp, ifa); } else +#endif error = ether_ioctl(ifp, command, data); break; case SIOCSIFFLAGS: |