summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenami <enami@NetBSD.org>1999-09-27 05:25:44 +0000
committerenami <enami@NetBSD.org>1999-09-27 05:25:44 +0000
commitf449bb216c60849c22d16efdde91ea25f172e92b (patch)
tree48e4115303761cc53e6a7fdd8772ec409c8abf13
parentcc78535b32c6a8bde546f319714aad62c40bae21 (diff)
Change NE2000_USE_WORD to take pointer to softc rather than type.
-rw-r--r--sys/dev/ic/ne2000.c8
-rw-r--r--sys/dev/ic/ne2000var.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/ic/ne2000.c b/sys/dev/ic/ne2000.c
index dccf5e5ea7a..d4dd3edae4a 100644
--- a/sys/dev/ic/ne2000.c
+++ b/sys/dev/ic/ne2000.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ne2000.c,v 1.21 1999/09/27 04:52:19 enami Exp $ */
+/* $NetBSD: ne2000.c,v 1.22 1999/09/27 05:25:44 enami Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -125,7 +125,7 @@ ne2000_attach(nsc, myea, media, nmedia, defmedia)
}
}
- useword = NE2000_USE_WORD(nsc->sc_type);
+ useword = NE2000_USE_WORD(nsc);
dsc->cr_proto = ED_CR_RD2;
@@ -574,7 +574,7 @@ ne2000_ring_copy(sc, src, dst, amount)
bus_space_tag_t asict = nsc->sc_asict;
bus_space_handle_t asich = nsc->sc_asich;
u_short tmp_amount;
- int useword = NE2000_USE_WORD(nsc->sc_type);
+ int useword = NE2000_USE_WORD(nsc);
/* Does copy wrap to lower addr in ring buffer? */
if (src + amount > sc->mem_end) {
@@ -605,7 +605,7 @@ ne2000_read_hdr(sc, buf, hdr)
ne2000_readmem(sc->sc_regt, sc->sc_regh, nsc->sc_asict, nsc->sc_asich,
buf, (u_int8_t *)hdr, sizeof(struct dp8390_ring),
- NE2000_USE_WORD(nsc->sc_type));
+ NE2000_USE_WORD(nsc));
#if BYTE_ORDER == BIG_ENDIAN
hdr->count = bswap16(hdr->count);
#endif
diff --git a/sys/dev/ic/ne2000var.h b/sys/dev/ic/ne2000var.h
index 40b0060b4df..b16a6da1931 100644
--- a/sys/dev/ic/ne2000var.h
+++ b/sys/dev/ic/ne2000var.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ne2000var.h,v 1.4 1999/09/27 04:14:06 enami Exp $ */
+/* $NetBSD: ne2000var.h,v 1.5 1999/09/27 05:25:44 enami Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@ struct ne2000_softc {
#define NE2000_TYPE_NE1000 1
#define NE2000_TYPE_NE2000 2
-#define NE2000_USE_WORD(type) ((type) == NE2000_TYPE_NE2000)
+#define NE2000_USE_WORD(sc) (((sc)->sc_type) == NE2000_TYPE_NE2000)
void ne2000_attach __P((struct ne2000_softc *, u_int8_t *,
int *, int, int));