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 /sys/kern/kern_poll.c | |
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
Diffstat (limited to 'sys/kern/kern_poll.c')
-rw-r--r-- | sys/kern/kern_poll.c | 10 |
1 files changed, 5 insertions, 5 deletions
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"); |