summaryrefslogtreecommitdiff
path: root/sys/dev/ic/midway.c
diff options
context:
space:
mode:
authorKenjiro Cho <kjc@cvs.openbsd.org>2001-06-27 06:34:54 +0000
committerKenjiro Cho <kjc@cvs.openbsd.org>2001-06-27 06:34:54 +0000
commit17cc5dbba19bbbbeb9361149e56ee11dbc22da68 (patch)
tree8a51ae8b2bde0887aa6650a31196833183a5b94f /sys/dev/ic/midway.c
parent30721c7f5299136d216635afefc517f47511b9f3 (diff)
ALTQ'ify network drivers.
- use the new queue macros. - use IFQ_POLL() to peek at the next packet. - use IFQ_IS_EMPTY() for empty check. - drivers should always check if (m == NULL) after IFQ_DEQUEUE(), since it could return NULL even when IFQ_IS_EMPTY() is FALSE under rate-limiting. - drivers are supposed to call if_start from tx complete interrupts (in order to trigger the next dequeue under rate-limiting).
Diffstat (limited to 'sys/dev/ic/midway.c')
-rw-r--r--sys/dev/ic/midway.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/midway.c b/sys/dev/ic/midway.c
index 4da7aa37156..107350bc320 100644
--- a/sys/dev/ic/midway.c
+++ b/sys/dev/ic/midway.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: midway.c,v 1.27 2000/10/09 22:39:24 itojun Exp $ */
+/* $OpenBSD: midway.c,v 1.28 2001/06/27 06:34:42 kjc Exp $ */
/* (sync'd to midway.c 1.68) */
/*
@@ -742,6 +742,7 @@ done_probe:
ifp->if_ioctl = en_ioctl;
ifp->if_output = atm_output;
ifp->if_start = en_start;
+ IFQ_SET_READY(&ifp->if_snd);
/*
* init softc
@@ -1481,7 +1482,6 @@ struct ifnet *ifp;
#else
struct en_softc *sc = (struct en_softc *) ifp->if_softc;
#endif
- struct ifqueue *ifq = &ifp->if_snd; /* if INPUT QUEUE */
struct mbuf *m, *lastm, *prev;
struct atm_pseudohdr *ap, *new_ap;
int txchan, mlen, got, need, toadd, cellcnt, first;
@@ -1498,7 +1498,7 @@ struct ifnet *ifp;
while (1) {
- IF_DEQUEUE(ifq, m);
+ IFQ_DEQUEUE(&ifp->if_snd, m);
if (m == NULL)
return; /* EMPTY: >>> exit here <<< */