summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_poll.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_poll.c')
-rw-r--r--sys/kern/kern_poll.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/kern/kern_poll.c b/sys/kern/kern_poll.c
index 2fe1324..f1e7e41 100644
--- a/sys/kern/kern_poll.c
+++ b/sys/kern/kern_poll.c
@@ -66,7 +66,7 @@ void ether_poll(int); /* polling while in trap */
* POLL_DEREGISTER: deregister and return to interrupt mode.
*
* The first two commands are only issued if the interface is marked as
- * 'IFF_UP and IFF_RUNNING', the last one only if IFF_RUNNING is set.
+ * 'IFF_UP and IFF_DRV_RUNNING', the last one only if IFF_DRV_RUNNING is set.
*
* The count limit specifies how much work the handler can do during the
* call -- typically this is the number of packets to be received, or
@@ -251,8 +251,9 @@ ether_poll(int count)
if (count > poll_each_burst)
count = poll_each_burst;
for (i = 0 ; i < poll_handlers ; i++)
- if (pr[i].handler && (IFF_UP|IFF_RUNNING) ==
- (pr[i].ifp->if_flags & (IFF_UP|IFF_RUNNING)) )
+ if (pr[i].handler &&
+ (pr[i].ifp->if_flags & IFF_UP) &&
+ (pr[i].ifp->if_drv_flags & IFF_DRV_RUNNING))
pr[i].handler(pr[i].ifp, 0, count); /* quick check */
mtx_unlock(&Giant);
}
@@ -373,13 +374,14 @@ netisr_poll(void)
if (polling) {
for (i = 0 ; i < poll_handlers ; i++)
- if (pr[i].handler && (IFF_UP|IFF_RUNNING) ==
- (pr[i].ifp->if_flags & (IFF_UP|IFF_RUNNING)) )
+ if (pr[i].handler &&
+ (pr[i].ifp->if_flags & IFF_UP) &&
+ (pr[i].ifp->if_drv_flags & IFF_DRV_RUNNING))
pr[i].handler(pr[i].ifp, arg, cycles);
} else { /* unregister */
for (i = 0 ; i < poll_handlers ; i++) {
if (pr[i].handler &&
- pr[i].ifp->if_flags & IFF_RUNNING) {
+ pr[i].ifp->if_drv_flags & IFF_DRV_RUNNING) {
pr[i].ifp->if_flags &= ~IFF_POLLING;
pr[i].handler(pr[i].ifp, POLL_DEREGISTER, 1);
}
OpenPOWER on IntegriCloud