summaryrefslogtreecommitdiff
path: root/sys/dev/ic/dp8390reg.h
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-07-31 01:51:51 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-07-31 01:51:51 +0000
commit9be0194294b8c07098938ca22263cd710e41ab26 (patch)
tree44cccaf2566bff5b5ca662d4609e761223eb2625 /sys/dev/ic/dp8390reg.h
parent6e3e533b3035f502df4ca7f1e7c58607e7c8c6c6 (diff)
Drop the ed_ring structure in favour of a byte-array and offset constants.
Makes the code much more robust agains MD paddings. Use new bus.h.
Diffstat (limited to 'sys/dev/ic/dp8390reg.h')
-rw-r--r--sys/dev/ic/dp8390reg.h20
1 files changed, 7 insertions, 13 deletions
diff --git a/sys/dev/ic/dp8390reg.h b/sys/dev/ic/dp8390reg.h
index c0f6d931a37..acb2849696f 100644
--- a/sys/dev/ic/dp8390reg.h
+++ b/sys/dev/ic/dp8390reg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dp8390reg.h,v 1.2 1996/03/05 08:28:05 niklas Exp $ */
+/* $OpenBSD: dp8390reg.h,v 1.3 1996/07/31 01:51:50 niklas Exp $ */
/* $NetBSD: dp8390reg.h,v 1.2 1995/04/12 16:12:42 mycroft Exp $ */
/*
@@ -528,18 +528,12 @@
* end block #'s in the NIC. For each packet that is put into the receive
* ring, one of these headers (4 bytes each) is tacked onto the front. The
* first byte is a copy of the receiver status register at the time the packet
- * was received.
- */
-struct ed_ring {
-#if ED_BYTE_ORDER == BIG_ENDIAN
- u_char next_packet; /* pointer to next packet */
- u_char rsr; /* receiver status */
-#else
- u_char rsr; /* receiver status */
- u_char next_packet; /* pointer to next packet */
-#endif
- u_short count; /* bytes in packet (length + 4) */
-};
+ * was received. The following constants are offsets into the headers.
+ */
+#define ED_RING_RSR 0 /* receiver status */
+#define ED_RING_NEXT_PACKET 1 /* pointer to next packet */
+#define ED_RING_COUNT 2 /* bytes in packet (length + 4) */
+#define ED_RING_HDRSZ 4 /* Header size */
/*
* Common constants