mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-04 12:52:15 +00:00
Correct LINT build issues in the ioctl code.
This commit is contained in:
parent
a506169a2b
commit
133f283b45
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=228405
@ -1045,8 +1045,8 @@ em_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
|
||||
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 command, caddr_t data)
|
||||
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 command, caddr_t data)
|
||||
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:
|
||||
{
|
||||
|
@ -992,9 +992,9 @@ igb_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
|
||||
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 command, caddr_t data)
|
||||
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 command, caddr_t data)
|
||||
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:
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user