summaryrefslogtreecommitdiff
path: root/sys/dev/ic/rln.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/rln.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/rln.c')
-rw-r--r--sys/dev/ic/rln.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/ic/rln.c b/sys/dev/ic/rln.c
index db433db7b76..0a541599fc1 100644
--- a/sys/dev/ic/rln.c
+++ b/sys/dev/ic/rln.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rln.c,v 1.11 2001/06/24 20:59:40 fgsch Exp $ */
+/* $OpenBSD: rln.c,v 1.12 2001/06/27 06:34:43 kjc Exp $ */
/*
* David Leonard <d@openbsd.org>, 1999. Public Domain.
*
@@ -142,7 +142,8 @@ rlnconfig(sc)
ifp->if_ioctl = rlnioctl;
ifp->if_watchdog = rlnwatchdog;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS;
- ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
+ IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN);
+ IFQ_SET_READY(&ifp->if_snd);
if_attach(ifp);
ether_ifattach(ifp);
}
@@ -239,7 +240,7 @@ rlnstart(ifp)
startagain:
s = splimp();
- IF_DEQUEUE(&ifp->if_snd, m0);
+ IFQ_DEQUEUE(&ifp->if_snd, m0);
splx(s);
if (m0 == NULL) {