diff options
author | sobomax <sobomax@FreeBSD.org> | 2002-08-18 07:05:00 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2002-08-18 07:05:00 +0000 |
commit | f6cebc060671b6c67f52080c35a0e55d5498cbf0 (patch) | |
tree | 344b7a3da98a22c060f844fe311e36665045f41f | |
parent | 2f2bf8ffc0ae7c92c322a28e5781db15fbca6226 (diff) | |
download | FreeBSD-src-f6cebc060671b6c67f52080c35a0e55d5498cbf0.zip FreeBSD-src-f6cebc060671b6c67f52080c35a0e55d5498cbf0.tar.gz |
Increase size of ifnet.if_flags from 16 bits (short) to 32 bits (int). To avoid
breaking application ABI use unused ifreq.ifru_flags[1] for upper 16 bits in
SIOCSIFFLAGS and SIOCGIFFLAGS ioctl's.
Reviewed by: -hackers, -net
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 5 | ||||
-rw-r--r-- | share/man/man4/netintro.4 | 17 | ||||
-rw-r--r-- | share/man/man9/ifnet.9 | 2 | ||||
-rw-r--r-- | sys/compat/linux/linux_ioctl.c | 2 | ||||
-rw-r--r-- | sys/dev/dc/if_dc.c | 6 | ||||
-rw-r--r-- | sys/dev/fxp/if_fxp.c | 4 | ||||
-rw-r--r-- | sys/dev/vx/if_vx.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_poll.c | 10 | ||||
-rw-r--r-- | sys/net/if.c | 30 | ||||
-rw-r--r-- | sys/net/if.h | 12 | ||||
-rw-r--r-- | sys/net/if_tap.c | 4 | ||||
-rw-r--r-- | sys/net/if_var.h | 2 | ||||
-rw-r--r-- | sys/net/rtsock.c | 4 | ||||
-rw-r--r-- | sys/netatm/atm_if.c | 2 | ||||
-rw-r--r-- | sys/netinet6/in6_var.h | 2 | ||||
-rw-r--r-- | sys/nfsclient/bootp_subr.c | 2 | ||||
-rw-r--r-- | sys/pci/if_dc.c | 6 | ||||
-rw-r--r-- | sys/pci/if_rl.c | 6 | ||||
-rw-r--r-- | sys/pci/if_sis.c | 6 | ||||
-rw-r--r-- | usr.sbin/mrouted/config.c | 2 |
20 files changed, 64 insertions, 62 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 9f37f99..537378b 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -999,14 +999,15 @@ setifflags(const char *vname, int value, int s, const struct afswtch *afp) exit(1); } strncpy(my_ifr.ifr_name, name, sizeof (my_ifr.ifr_name)); - flags = my_ifr.ifr_flags; + flags = (ifr->ifr_flags & 0xffff) | (my_ifr.ifr_flagshigh << 16); if (value < 0) { value = -value; flags &= ~value; } else flags |= value; - my_ifr.ifr_flags = flags; + my_ifr.ifr_flags = flags & 0xffff; + my_ifr.ifr_flagshigh = flags >> 16; if (ioctl(s, SIOCSIFFLAGS, (caddr_t)&my_ifr) < 0) Perror(vname); } diff --git a/share/man/man4/netintro.4 b/share/man/man4/netintro.4 index 97ba82b..dc869ba 100644 --- a/share/man/man4/netintro.4 +++ b/share/man/man4/netintro.4 @@ -197,20 +197,21 @@ struct ifreq { struct sockaddr ifru_addr; struct sockaddr ifru_dstaddr; struct sockaddr ifru_broadaddr; - short ifru_flags; + short ifru_flags[2]; int ifru_metric; int ifru_mtu; int ifru_phys; caddr_t ifru_data; } ifr_ifru; -#define ifr_addr ifr_ifru.ifru_addr /* address */ -#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ +#define ifr_addr ifr_ifru.ifru_addr /* address */ +#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ #define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ -#define ifr_flags ifr_ifru.ifru_flags /* flags */ -#define ifr_metric ifr_ifru.ifru_metric /* metric */ -#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ -#define ifr_phys ifr_ifru.ifru_phys /* physical wire */ -#define ifr_data ifr_ifru.ifru_data /* for use by interface */ +#define ifr_flags ifr_ifru.ifru_flags[0] /* flags (low 16 bits) */ +#define ifr_flagshigh ifr_ifru.ifru_flags[1] /* flags (high 16 bits) */ +#define ifr_metric ifr_ifru.ifru_metric /* metric */ +#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ +#define ifr_phys ifr_ifru.ifru_phys /* physical wire */ +#define ifr_data ifr_ifru.ifru_data /* for use by interface */ }; .Ed .Pp diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9 index 49222e2..1697b4a 100644 --- a/share/man/man9/ifnet.9 +++ b/share/man/man9/ifnet.9 @@ -284,7 +284,7 @@ is called, or zero if the timer is disabled. (Set by driver, decremented by generic watchdog code.) .It Va if_flags -.Pq Vt short +.Pq Vt int Flags describing operational parameters of this interface (see below). (Manipulated by both driver and generic code.) .It Va if_capabilities diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index 05fc0bd..d0dbddd 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -1981,7 +1981,7 @@ linux_gifflags(struct thread *td, struct ifnet *ifp, struct l_ifreq *ifr) { l_short flags; - flags = ifp->if_flags; + flags = ifp->if_flags & 0xffff; /* these flags have no Linux equivalent */ flags &= ~(IFF_SMART|IFF_OACTIVE|IFF_SIMPLEX| IFF_LINK0|IFF_LINK1|IFF_LINK2); diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c index 7c55346..d854a44 100644 --- a/sys/dev/dc/if_dc.c +++ b/sys/dev/dc/if_dc.c @@ -2483,7 +2483,7 @@ static void dc_rxeof(sc) while(!(sc->dc_ldata->dc_rx_list[i].dc_status & DC_RXSTAT_OWN)) { #ifdef DEVICE_POLLING - if (ifp->if_ipending & IFF_POLLING) { + if (ifp->if_flags & IFF_POLLING) { if (sc->rxcycles <= 0) break; sc->rxcycles--; @@ -2885,7 +2885,7 @@ static void dc_intr(arg) DC_LOCK(sc); ifp = &sc->arpcom.ac_if; #ifdef DEVICE_POLLING - if (ifp->if_ipending & IFF_POLLING) + if (ifp->if_flags & IFF_POLLING) goto done; if (ether_poll_register(dc_poll, ifp)) { /* ok, disable interrupts */ CSR_WRITE_4(sc, DC_IMR, 0x00000000); @@ -3265,7 +3265,7 @@ static void dc_init(xsc) * the case of polling. Some cards (e.g. fxp) turn interrupts on * after a reset. */ - if (ifp->if_ipending & IFF_POLLING) + if (ifp->if_flags & IFF_POLLING) CSR_WRITE_4(sc, DC_IMR, 0x00000000); else #endif diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 3d8ba4c..594d9ac 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -1193,7 +1193,7 @@ fxp_intr(void *xsc) #ifdef DEVICE_POLLING struct ifnet *ifp = &sc->sc_if; - if (ifp->if_ipending & IFF_POLLING) + if (ifp->if_flags & IFF_POLLING) return; if (ether_poll_register(fxp_poll, ifp)) { /* disable interrupts */ @@ -1785,7 +1785,7 @@ fxp_init(void *xsc) * ... but only do that if we are not polling. And because (presumably) * the default is interrupts on, we need to disable them explicitly! */ - if ( ifp->if_ipending & IFF_POLLING ) + if ( ifp->if_flags & IFF_POLLING ) CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, FXP_SCB_INTR_DISABLE); else #endif /* DEVICE_POLLING */ diff --git a/sys/dev/vx/if_vx.c b/sys/dev/vx/if_vx.c index b5ddd7b..317ee11 100644 --- a/sys/dev/vx/if_vx.c +++ b/sys/dev/vx/if_vx.c @@ -285,7 +285,7 @@ vxsetlink(sc) register struct ifnet *ifp = &sc->arpcom.ac_if; int i, j, k; char *reason, *warning; - static short prev_flags; + static int prev_flags; static char prev_conn = -1; if (prev_conn == -1) { diff --git a/sys/kern/kern_poll.c b/sys/kern/kern_poll.c index b3a96ba..0f3254e 100644 --- a/sys/kern/kern_poll.c +++ b/sys/kern/kern_poll.c @@ -383,7 +383,7 @@ netisr_poll(void) for (i = 0 ; i < poll_handlers ; i++) { if (pr[i].handler && pr[i].ifp->if_flags & IFF_RUNNING) { - pr[i].ifp->if_ipending &= ~IFF_POLLING; + pr[i].ifp->if_flags &= ~IFF_POLLING; pr[i].handler(pr[i].ifp, POLL_DEREGISTER, 1); } pr[i].handler=NULL; @@ -415,7 +415,7 @@ ether_poll_register(poll_handler_t *h, struct ifnet *ifp) return 0; if ( !(ifp->if_flags & IFF_UP) ) /* must be up */ return 0; - if (ifp->if_ipending & IFF_POLLING) /* already polling */ + if (ifp->if_flags & IFF_POLLING) /* already polling */ return 0; s = splhigh(); @@ -440,7 +440,7 @@ ether_poll_register(poll_handler_t *h, struct ifnet *ifp) pr[poll_handlers].handler = h; pr[poll_handlers].ifp = ifp; poll_handlers++; - ifp->if_ipending |= IFF_POLLING; + ifp->if_flags |= IFF_POLLING; splx(s); if (idlepoll_sleeping) wakeup(&idlepoll_sleeping); @@ -459,14 +459,14 @@ ether_poll_deregister(struct ifnet *ifp) int i; mtx_lock(&Giant); - if ( !ifp || !(ifp->if_ipending & IFF_POLLING) ) { + if ( !ifp || !(ifp->if_flags & IFF_POLLING) ) { mtx_unlock(&Giant); return 0; } for (i = 0 ; i < poll_handlers ; i++) if (pr[i].ifp == ifp) /* found it */ break; - ifp->if_ipending &= ~IFF_POLLING; /* found or not... */ + ifp->if_flags &= ~IFF_POLLING; /* found or not... */ if (i == poll_handlers) { mtx_unlock(&Giant); printf("ether_poll_deregister: ifp not found!!!\n"); diff --git a/sys/net/if.c b/sys/net/if.c index 1dd37ec..969963d 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1234,6 +1234,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) struct ifreq *ifr; struct ifstat *ifs; int error = 0; + int new_flags; ifr = (struct ifreq *)data; switch (cmd) { @@ -1242,7 +1243,8 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) break; case SIOCGIFFLAGS: - ifr->ifr_flags = ifp->if_flags; + ifr->ifr_flags = ifp->if_flags & 0xffff; + ifr->ifr_flagshigh = ifp->if_flags >> 16; break; case SIOCGIFCAP: @@ -1272,22 +1274,23 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) error = suser(td); if (error) return (error); - ifr->ifr_prevflags = ifp->if_flags; + new_flags = (ifr->ifr_flags & 0xffff) | + (ifr->ifr_flagshigh << 16); if (ifp->if_flags & IFF_SMART) { /* Smart drivers twiddle their own routes */ } else if (ifp->if_flags & IFF_UP && - (ifr->ifr_flags & IFF_UP) == 0) { + (new_flags & IFF_UP) == 0) { int s = splimp(); if_down(ifp); splx(s); - } else if (ifr->ifr_flags & IFF_UP && + } else if (new_flags & IFF_UP && (ifp->if_flags & IFF_UP) == 0) { int s = splimp(); if_up(ifp); splx(s); } ifp->if_flags = (ifp->if_flags & IFF_CANTCHANGE) | - (ifr->ifr_flags &~ IFF_CANTCHANGE); + (new_flags &~ IFF_CANTCHANGE); if (ifp->if_ioctl) (void) (*ifp->if_ioctl)(ifp, cmd, data); getmicrotime(&ifp->if_lastchange); @@ -1438,7 +1441,7 @@ ifioctl(so, cmd, data, td) struct ifnet *ifp; struct ifreq *ifr; int error; - short oif_flags; + int oif_flags; switch (cmd) { case SIOCGIFCONF: @@ -1573,7 +1576,8 @@ ifpromisc(ifp, pswitch) return (0); ifp->if_flags &= ~IFF_PROMISC; } - ifr.ifr_flags = ifp->if_flags; + ifr.ifr_flags = ifp->if_flags & 0xffff; + ifr.ifr_flagshigh = ifp->if_flags >> 16; error = (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr); if (error == 0) { log(LOG_INFO, "%s%d: promiscuous mode %s\n", @@ -1695,7 +1699,8 @@ if_allmulti(ifp, onswitch) if (onswitch) { if (ifp->if_amcount++ == 0) { ifp->if_flags |= IFF_ALLMULTI; - ifr.ifr_flags = ifp->if_flags; + ifr.ifr_flags = ifp->if_flags & 0xffff; + ifr.ifr_flagshigh = ifp->if_flags >> 16; error = ifp->if_ioctl(ifp, SIOCSIFFLAGS, (caddr_t)&ifr); } } else { @@ -1704,7 +1709,8 @@ if_allmulti(ifp, onswitch) } else { ifp->if_amcount = 0; ifp->if_flags &= ~IFF_ALLMULTI; - ifr.ifr_flags = ifp->if_flags; + ifr.ifr_flags = ifp->if_flags & 0xffff;; + ifr.ifr_flagshigh = ifp->if_flags >> 16; error = ifp->if_ioctl(ifp, SIOCSIFFLAGS, (caddr_t)&ifr); } } @@ -1919,10 +1925,12 @@ if_setlladdr(struct ifnet *ifp, const u_char *lladdr, int len) */ if ((ifp->if_flags & IFF_UP) != 0) { ifp->if_flags &= ~IFF_UP; - ifr.ifr_flags = ifp->if_flags; + ifr.ifr_flags = ifp->if_flags & 0xffff; + ifr.ifr_flagshigh = ifp->if_flags >> 16; (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr); ifp->if_flags |= IFF_UP; - ifr.ifr_flags = ifp->if_flags; + ifr.ifr_flags = ifp->if_flags & 0xffff; + ifr.ifr_flagshigh = ifp->if_flags >> 16; (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr); #ifdef INET /* diff --git a/sys/net/if.h b/sys/net/if.h index 0074cec..fc95786 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -139,14 +139,6 @@ struct if_data { #define IFF_LINK2 0x4000 /* per link layer defined bit */ #define IFF_ALTPHYS IFF_LINK2 /* use alternate physical connection */ #define IFF_MULTICAST 0x8000 /* supports multicast */ - -/* - * The following flag(s) ought to go in if_flags, but we cannot change - * struct ifnet because of binary compatibility, so we store them in - * if_ipending, which is not used so far. - * If possible, make sure the value is not conflicting with other - * IFF flags, so we have an easier time when we want to merge them. - */ #define IFF_POLLING 0x10000 /* Interface is in polling mode. */ /* flags set internally only: */ @@ -244,8 +236,8 @@ struct ifreq { #define ifr_addr ifr_ifru.ifru_addr /* address */ #define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ #define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ -#define ifr_flags ifr_ifru.ifru_flags[0] /* flags */ -#define ifr_prevflags ifr_ifru.ifru_flags[1] /* flags */ +#define ifr_flags ifr_ifru.ifru_flags[0] /* flags (low 16 bits) */ +#define ifr_flagshigh ifr_ifru.ifru_flags[1] /* flags (high 16 bits) */ #define ifr_metric ifr_ifru.ifru_metric /* metric */ #define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ #define ifr_phys ifr_ifru.ifru_phys /* physical wire */ diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c index ef0a36d..0d46639 100644 --- a/sys/net/if_tap.c +++ b/sys/net/if_tap.c @@ -654,7 +654,7 @@ tapioctl(dev, cmd, data, flag, td) struct ifnet *ifp = &tp->tap_if; struct tapinfo *tapp = NULL; int s; - short f; + int f; switch (cmd) { case TAPSIFINFO: @@ -728,7 +728,7 @@ tapioctl(dev, cmd, data, flag, td) break; case VMIO_SIOCSIFFLAGS: /* VMware/VMnet SIOCSIFFLAGS */ - f = *(short *)data; + f = *(int *)data; f &= 0x0fff; f &= ~IFF_CANTCHANGE; f |= IFF_UP; diff --git a/sys/net/if_var.h b/sys/net/if_var.h index f36091b..bd9ebfd 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -138,7 +138,7 @@ struct ifnet { u_short if_index; /* numeric abbreviation for this if */ short if_unit; /* sub-unit for lower level driver */ short if_timer; /* time 'til if_watchdog called */ - short if_flags; /* up/down, broadcast, etc. */ + int if_flags; /* up/down, broadcast, etc. */ int if_capabilities; /* interface capabilities */ int if_capenable; /* enabled features */ int if_ipending; /* interrupts pending */ diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index d9c2316..98a042c 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -757,7 +757,7 @@ rt_ifmsg(ifp) return; ifm = mtod(m, struct if_msghdr *); ifm->ifm_index = ifp->if_index; - ifm->ifm_flags = (u_short)ifp->if_flags; + ifm->ifm_flags = ifp->if_flags; ifm->ifm_data = ifp->if_data; ifm->ifm_addrs = 0; route_proto.sp_protocol = 0; @@ -958,7 +958,7 @@ sysctl_iflist(af, w) ifm = (struct if_msghdr *)w->w_tmem; ifm->ifm_index = ifp->if_index; - ifm->ifm_flags = (u_short)ifp->if_flags; + ifm->ifm_flags = ifp->if_flags; ifm->ifm_data = ifp->if_data; ifm->ifm_addrs = info.rti_addrs; error = SYSCTL_OUT(w->w_req,(caddr_t)ifm, len); diff --git a/sys/netatm/atm_if.c b/sys/netatm/atm_if.c index 7b8a116..fa843b5 100644 --- a/sys/netatm/atm_if.c +++ b/sys/netatm/atm_if.c @@ -1057,7 +1057,7 @@ atm_if_ioctl(ifp, cmd, data) break; case SIOCGIFFLAGS: - *(short *)data = ifp->if_flags; + *(int *)data = ifp->if_flags; break; case SIOCSIFFLAGS: diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index 06fff7b..fc2242a 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -234,7 +234,7 @@ struct in6_ifreq { union { struct sockaddr_in6 ifru_addr; struct sockaddr_in6 ifru_dstaddr; - short ifru_flags; + int ifru_flags; int ifru_flags6; int ifru_metric; caddr_t ifru_data; diff --git a/sys/nfsclient/bootp_subr.c b/sys/nfsclient/bootp_subr.c index 993e0c5..a9c504f 100644 --- a/sys/nfsclient/bootp_subr.c +++ b/sys/nfsclient/bootp_subr.c @@ -385,7 +385,7 @@ bootpboot_p_if(struct ifnet *ifp, struct ifaddr *ifa) printf("%s%d flags %x, addr ", ifp->if_name, ifp->if_unit, - (unsigned short) ifp->if_flags); + ifp->if_flags); print_sin_addr((struct sockaddr_in *) ifa->ifa_addr); printf(", broadcast "); print_sin_addr((struct sockaddr_in *) ifa->ifa_dstaddr); diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c index 7c55346..d854a44 100644 --- a/sys/pci/if_dc.c +++ b/sys/pci/if_dc.c @@ -2483,7 +2483,7 @@ static void dc_rxeof(sc) while(!(sc->dc_ldata->dc_rx_list[i].dc_status & DC_RXSTAT_OWN)) { #ifdef DEVICE_POLLING - if (ifp->if_ipending & IFF_POLLING) { + if (ifp->if_flags & IFF_POLLING) { if (sc->rxcycles <= 0) break; sc->rxcycles--; @@ -2885,7 +2885,7 @@ static void dc_intr(arg) DC_LOCK(sc); ifp = &sc->arpcom.ac_if; #ifdef DEVICE_POLLING - if (ifp->if_ipending & IFF_POLLING) + if (ifp->if_flags & IFF_POLLING) goto done; if (ether_poll_register(dc_poll, ifp)) { /* ok, disable interrupts */ CSR_WRITE_4(sc, DC_IMR, 0x00000000); @@ -3265,7 +3265,7 @@ static void dc_init(xsc) * the case of polling. Some cards (e.g. fxp) turn interrupts on * after a reset. */ - if (ifp->if_ipending & IFF_POLLING) + if (ifp->if_flags & IFF_POLLING) CSR_WRITE_4(sc, DC_IMR, 0x00000000); else #endif diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c index e5dc0be..63dc6f8 100644 --- a/sys/pci/if_rl.c +++ b/sys/pci/if_rl.c @@ -1187,7 +1187,7 @@ static void rl_rxeof(sc) while((CSR_READ_1(sc, RL_COMMAND) & RL_CMD_EMPTY_RXBUF) == 0) { #ifdef DEVICE_POLLING - if (ifp->if_ipending & IFF_POLLING) { + if (ifp->if_flags & IFF_POLLING) { if (sc->rxcycles <= 0) break; sc->rxcycles--; @@ -1416,7 +1416,7 @@ static void rl_intr(arg) ifp = &sc->arpcom.ac_if; #ifdef DEVICE_POLLING - if (ifp->if_ipending & IFF_POLLING) + if (ifp->if_flags & IFF_POLLING) goto done; if (ether_poll_register(rl_poll, ifp)) { /* ok, disable interrupts */ CSR_WRITE_2(sc, RL_IMR, 0x0000); @@ -1654,7 +1654,7 @@ static void rl_init(xsc) /* * Disable interrupts if we are polling. */ - if (ifp->if_ipending & IFF_POLLING) + if (ifp->if_flags & IFF_POLLING) CSR_WRITE_2(sc, RL_IMR, 0); else /* otherwise ... */ #endif /* DEVICE_POLLING */ diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c index d958866..977e83f 100644 --- a/sys/pci/if_sis.c +++ b/sys/pci/if_sis.c @@ -1285,7 +1285,7 @@ static void sis_rxeof(sc) while(SIS_OWNDESC(&sc->sis_ldata.sis_rx_list[i])) { #ifdef DEVICE_POLLING - if (ifp->if_ipending & IFF_POLLING) { + if (ifp->if_flags & IFF_POLLING) { if (sc->rxcycles <= 0) break; sc->rxcycles--; @@ -1508,7 +1508,7 @@ static void sis_intr(arg) SIS_LOCK(sc); #ifdef DEVICE_POLLING - if (ifp->if_ipending & IFF_POLLING) + if (ifp->if_flags & IFF_POLLING) goto done; if (ether_poll_register(sis_poll, ifp)) { /* ok, disable interrupts */ CSR_WRITE_4(sc, SIS_IER, 0); @@ -1810,7 +1810,7 @@ static void sis_init(xsc) * ... only enable interrupts if we are not polling, make sure * they are off otherwise. */ - if (ifp->if_ipending & IFF_POLLING) + if (ifp->if_flags & IFF_POLLING) CSR_WRITE_4(sc, SIS_IER, 0); else #endif /* DEVICE_POLLING */ diff --git a/usr.sbin/mrouted/config.c b/usr.sbin/mrouted/config.c index 5b436e6..9ca6f88 100644 --- a/usr.sbin/mrouted/config.c +++ b/usr.sbin/mrouted/config.c @@ -32,7 +32,7 @@ config_vifs_from_kernel() register vifi_t vifi; int n; u_int32 addr, mask, subnet; - short flags; + int flags; int num_ifreq = 32; ifc.ifc_len = num_ifreq * sizeof(struct ifreq); |