summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2001-06-23 21:54:58 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2001-06-23 21:54:58 +0000
commitb4a55308473160cf766428883f536514afcc4bbd (patch)
tree19cd4293743c312ebbc079b5f7c77b482a6cd851
parentd7db1c56504be35c243bc1503b87d003be3eb625 (diff)
Remove repeated ethernet constants; use if_ether.h for it instead.
-rw-r--r--sys/dev/ic/dp8390.c6
-rw-r--r--sys/dev/ic/elink3.c6
-rw-r--r--sys/dev/ic/i82596var.h5
-rw-r--r--sys/dev/ic/smc91cxx.c9
-rw-r--r--sys/dev/isa/if_ed.c6
-rw-r--r--sys/dev/isa/if_ef_isapnp.c6
-rw-r--r--sys/dev/isa/if_eg.c6
-rw-r--r--sys/dev/isa/if_el.c6
-rw-r--r--sys/dev/isa/if_fe.c4
-rw-r--r--sys/dev/isa/if_ie.c6
-rw-r--r--sys/dev/pci/if_txvar.h11
-rw-r--r--sys/dev/pcmcia/if_ray.c10
-rw-r--r--sys/dev/pcmcia/if_xe.c5
13 files changed, 13 insertions, 73 deletions
diff --git a/sys/dev/ic/dp8390.c b/sys/dev/ic/dp8390.c
index a12e0f1e541..0384aa3f542 100644
--- a/sys/dev/ic/dp8390.c
+++ b/sys/dev/ic/dp8390.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dp8390.c,v 1.12 2001/03/29 01:39:32 aaron Exp $ */
+/* $OpenBSD: dp8390.c,v 1.13 2001/06/23 21:54:43 fgsch Exp $ */
/* $NetBSD: dp8390.c,v 1.13 1998/07/05 06:49:11 jonathan Exp $ */
/*
@@ -71,10 +71,6 @@ static int dp8390_test_mem __P((struct dp8390_softc *));
int dp8390_enable __P((struct dp8390_softc *));
void dp8390_disable __P((struct dp8390_softc *));
-#define ETHER_MIN_LEN 64
-#define ETHER_MAX_LEN 1518
-#define ETHER_ADDR_LEN 6
-
int dp8390_debug = 0;
/*
diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c
index ad9e4727a31..df694fd9b03 100644
--- a/sys/dev/ic/elink3.c
+++ b/sys/dev/ic/elink3.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: elink3.c,v 1.49 2001/05/26 06:57:19 angelos Exp $ */
+/* $OpenBSD: elink3.c,v 1.50 2001/06/23 21:54:44 fgsch Exp $ */
/* $NetBSD: elink3.c,v 1.32 1997/05/14 00:22:00 thorpej Exp $ */
/*
@@ -73,10 +73,6 @@
#include <dev/ic/elink3var.h>
#include <dev/ic/elink3reg.h>
-#define ETHER_MIN_LEN 64
-#define ETHER_MAX_LEN 1518
-#define ETHER_ADDR_LEN 6
-
/*
* Structure to map media-present bits in boards to
* ifmedia codes and printable media names. Used for table-driven
diff --git a/sys/dev/ic/i82596var.h b/sys/dev/ic/i82596var.h
index f46a6730642..00c01b098b0 100644
--- a/sys/dev/ic/i82596var.h
+++ b/sys/dev/ic/i82596var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82596var.h,v 1.4 2001/03/23 00:16:49 mickey Exp $ */
+/* $OpenBSD: i82596var.h,v 1.5 2001/06/23 21:54:45 fgsch Exp $ */
/* $NetBSD: i82586var.h,v 1.10 1998/08/15 04:42:42 mycroft Exp $ */
/*-
@@ -111,9 +111,6 @@
#define IED_CMDS 0x80
#define IED_ALL 0xff
-#define ETHER_MIN_LEN 64
-#define ETHER_MAX_LEN 1518
-
#define B_PER_F 3 /* recv buffers per frame */
#define IE_RBUF_SIZE 256 /* size of each receive buffer;
MUST BE POWER OF TWO */
diff --git a/sys/dev/ic/smc91cxx.c b/sys/dev/ic/smc91cxx.c
index 2ac0a297b3a..478aef8597a 100644
--- a/sys/dev/ic/smc91cxx.c
+++ b/sys/dev/ic/smc91cxx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smc91cxx.c,v 1.8 2001/02/20 19:39:36 mickey Exp $ */
+/* $OpenBSD: smc91cxx.c,v 1.9 2001/06/23 21:54:46 fgsch Exp $ */
/* $NetBSD: smc91cxx.c,v 1.11 1998/08/08 23:51:41 mycroft Exp $ */
/*-
@@ -132,8 +132,6 @@
/* XXX Hardware padding doesn't work yet(?) */
#define SMC91CXX_SW_PAD
-#define ETHER_ADDR_LEN 6
-
#ifdef SMC_DEBUG
const char *smc91cxx_idstrs[] = {
NULL, /* 0 */
@@ -181,11 +179,6 @@ int smc91cxx_ioctl __P((struct ifnet *, u_long, caddr_t));
int smc91cxx_enable __P((struct smc91cxx_softc *));
void smc91cxx_disable __P((struct smc91cxx_softc *));
-/* XXX Should be in a common header file. */
-#define ETHER_MAX_LEN 1518
-#define ETHER_MIN_LEN 64
-#define ETHER_CRC_LEN 4
-
static __inline int ether_cmp __P((void *, void *));
static __inline int
ether_cmp(va, vb)
diff --git a/sys/dev/isa/if_ed.c b/sys/dev/isa/if_ed.c
index bbfb6d5642c..1ebaf99fdda 100644
--- a/sys/dev/isa/if_ed.c
+++ b/sys/dev/isa/if_ed.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ed.c,v 1.42 2001/02/20 19:39:39 mickey Exp $ */
+/* $OpenBSD: if_ed.c,v 1.43 2001/06/23 21:54:47 fgsch Exp $ */
/* $NetBSD: if_ed.c,v 1.105 1996/10/21 22:40:45 thorpej Exp $ */
/*
@@ -163,10 +163,6 @@ struct cfdriver ed_cd = {
NULL, "ed", DV_IFNET
};
-#define ETHER_MIN_LEN 64
-#define ETHER_MAX_LEN 1518
-#define ETHER_ADDR_LEN 6
-
#define NIC_PUT(t, bah, nic, reg, val) \
bus_space_write_1((t), (bah), ((nic) + (reg)), (val))
#define NIC_GET(t, bah, nic, reg) \
diff --git a/sys/dev/isa/if_ef_isapnp.c b/sys/dev/isa/if_ef_isapnp.c
index fa76958d17c..9762d802b09 100644
--- a/sys/dev/isa/if_ef_isapnp.c
+++ b/sys/dev/isa/if_ef_isapnp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ef_isapnp.c,v 1.10 2001/02/20 19:39:41 mickey Exp $ */
+/* $OpenBSD: if_ef_isapnp.c,v 1.11 2001/06/23 21:54:48 fgsch Exp $ */
/*
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
@@ -90,10 +90,6 @@ struct ef_softc {
int sc_busmaster;
};
-#define ETHER_MIN_LEN 64
-#define ETHER_MAX_LEN 1518
-#define ETHER_ADDR_LEN 6
-
#define EF_W0_EEPROM_COMMAND 0x200a
#define EF_EEPROM_BUSY (1 << 9)
#define EF_EEPROM_READ (1 << 7)
diff --git a/sys/dev/isa/if_eg.c b/sys/dev/isa/if_eg.c
index fa97ef51f74..d21ffad6a85 100644
--- a/sys/dev/isa/if_eg.c
+++ b/sys/dev/isa/if_eg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_eg.c,v 1.18 2001/04/06 08:04:05 fgsch Exp $ */
+/* $OpenBSD: if_eg.c,v 1.19 2001/06/23 21:54:49 fgsch Exp $ */
/* $NetBSD: if_eg.c,v 1.26 1996/05/12 23:52:27 mycroft Exp $ */
/*
@@ -84,10 +84,6 @@
#define dprintf(x)
#endif
-#define ETHER_MIN_LEN 64
-#define ETHER_MAX_LEN 1518
-#define ETHER_ADDR_LEN 6
-
#define EG_INLEN 10
#define EG_BUFLEN 0x0670
diff --git a/sys/dev/isa/if_el.c b/sys/dev/isa/if_el.c
index 317d045e8f9..0701018b504 100644
--- a/sys/dev/isa/if_el.c
+++ b/sys/dev/isa/if_el.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_el.c,v 1.13 2001/02/20 19:39:40 mickey Exp $ */
+/* $OpenBSD: if_el.c,v 1.14 2001/06/23 21:54:49 fgsch Exp $ */
/* $NetBSD: if_el.c,v 1.39 1996/05/12 23:52:32 mycroft Exp $ */
/*
@@ -54,10 +54,6 @@
#include <dev/isa/isavar.h>
#include <dev/isa/if_elreg.h>
-#define ETHER_MIN_LEN 64
-#define ETHER_MAX_LEN 1518
-#define ETHER_ADDR_LEN 6
-
/* for debugging convenience */
#ifdef EL_DEBUG
#define dprintf(x) printf x
diff --git a/sys/dev/isa/if_fe.c b/sys/dev/isa/if_fe.c
index 892983c055b..6ae43f97751 100644
--- a/sys/dev/isa/if_fe.c
+++ b/sys/dev/isa/if_fe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fe.c,v 1.13 2001/02/20 19:39:40 mickey Exp $ */
+/* $OpenBSD: if_fe.c,v 1.14 2001/06/23 21:54:50 fgsch Exp $ */
/*
* All Rights Reserved, Copyright (C) Fujitsu Limited 1995
@@ -236,8 +236,6 @@ struct cfdriver fe_cd = {
/* Ethernet constants. To be defined in if_ehter.h? FIXME. */
#define ETHER_MIN_LEN 60 /* with header, without CRC. */
#define ETHER_MAX_LEN 1514 /* with header, without CRC. */
-#define ETHER_ADDR_LEN 6 /* number of bytes in an address. */
-#define ETHER_HDR_SIZE 14 /* src addr, dst addr, and data type. */
/*
* Fe driver specific constants which relate to 86960/86965.
diff --git a/sys/dev/isa/if_ie.c b/sys/dev/isa/if_ie.c
index 51310480477..53e8b77c80f 100644
--- a/sys/dev/isa/if_ie.c
+++ b/sys/dev/isa/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.20 2001/02/20 19:39:41 mickey Exp $ */
+/* $OpenBSD: if_ie.c,v 1.21 2001/06/23 21:54:52 fgsch Exp $ */
/* $NetBSD: if_ie.c,v 1.51 1996/05/12 23:52:48 mycroft Exp $ */
/*-
@@ -164,10 +164,6 @@ iomem, and to make 16-pointers, we subtract sc_maddr and and with 0xffff.
#define IED_XMIT 0x40
#define IED_ALL 0x7f
-#define ETHER_MIN_LEN 64
-#define ETHER_MAX_LEN 1518
-#define ETHER_ADDR_LEN 6
-
/*
sizeof(iscp) == 1+1+2+4 == 8
sizeof(scb) == 2+2+2+2+2+2+2+2 == 16
diff --git a/sys/dev/pci/if_txvar.h b/sys/dev/pci/if_txvar.h
index cbd9e28a797..747cc2a5cad 100644
--- a/sys/dev/pci/if_txvar.h
+++ b/sys/dev/pci/if_txvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_txvar.h,v 1.9 2001/02/23 22:59:09 jason Exp $ */
+/* $OpenBSD: if_txvar.h,v 1.10 2001/06/23 21:54:54 fgsch Exp $ */
/* $FreeBSD: src/sys/pci/if_txvar.h,v 1.8 2001/02/07 20:11:02 semenu Exp $ */
/*-
@@ -34,15 +34,6 @@
/*#define EPIC_USEIOSPACE 1*/
#define EARLY_RX 1
-#ifndef ETHER_MAX_LEN
-#define ETHER_MAX_LEN 1518
-#endif
-#ifndef ETHER_MIN_LEN
-#define ETHER_MIN_LEN 64
-#endif
-#ifndef ETHER_CRC_LEN
-#define ETHER_CRC_LEN 4
-#endif
#define TX_RING_SIZE 16 /* Leave this a power of 2 */
#define RX_RING_SIZE 16 /* And this too, to do not */
/* confuse RX(TX)_RING_MASK */
diff --git a/sys/dev/pcmcia/if_ray.c b/sys/dev/pcmcia/if_ray.c
index fbd8a12cbad..00d531c7508 100644
--- a/sys/dev/pcmcia/if_ray.c
+++ b/sys/dev/pcmcia/if_ray.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ray.c,v 1.13 2001/02/20 19:39:45 mickey Exp $ */
+/* $OpenBSD: if_ray.c,v 1.14 2001/06/23 21:54:56 fgsch Exp $ */
/* $NetBSD: if_ray.c,v 1.21 2000/07/05 02:35:54 onoe Exp $ */
/*
@@ -112,14 +112,6 @@
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
#endif
-#ifndef ETHER_CRC_LEN
-#define ETHER_CRC_LEN 4
-#endif
-
-#ifndef ETHER_MAX_LEN
-#define ETHER_MAX_LEN 1518
-#endif
-
#define RAY_USE_AMEM 0
/*#define RAY_DEBUG*/
diff --git a/sys/dev/pcmcia/if_xe.c b/sys/dev/pcmcia/if_xe.c
index b57a0addb80..cba55cbebab 100644
--- a/sys/dev/pcmcia/if_xe.c
+++ b/sys/dev/pcmcia/if_xe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_xe.c,v 1.18 2001/02/20 19:39:46 mickey Exp $ */
+/* $OpenBSD: if_xe.c,v 1.19 2001/06/23 21:54:57 fgsch Exp $ */
/*
* Copyright (c) 1999 Niklas Hallqvist, Brandon Creighton, Job de Haas
@@ -84,9 +84,6 @@
#include <net/bpfdesc.h>
#endif
-#define ETHER_MIN_LEN 64
-#define ETHER_CRC_LEN 4
-
/*
* Maximum number of bytes to read per interrupt. Linux recommends
* somewhere between 2000-22000.