Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them

ourselves.
This commit is contained in:
thorpej 1999-03-25 23:11:51 +00:00
parent 0193701fcd
commit 587eda7c3f
8 changed files with 12 additions and 41 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ea.c,v 1.20 1998/08/08 23:58:39 mycroft Exp $ */
/* $NetBSD: if_ea.c,v 1.21 1999/03/25 23:11:51 thorpej Exp $ */
/*
* Copyright (c) 1995 Mark Brinicombe
@ -98,10 +98,6 @@
#include <arm32/podulebus/podulebus.h>
#include <arm32/podulebus/podules.h>
#define ETHER_MIN_LEN 64
#define ETHER_MAX_LEN 1514
#define ETHER_ADDR_LEN 6
#ifndef EA_TIMEOUT
#define EA_TIMEOUT 60
#endif
@ -1028,7 +1024,7 @@ eatxpacket(sc)
len = max(len, ETHER_MIN_LEN);
if (len > ETHER_MAX_LEN)
if (len > (ETHER_MAX_LEN - ETHER_CRC_LEN))
log(LOG_WARNING, "ea: oversize packet = %d bytes\n", len);
/* Ok we now have a packet len bytes long in our packet buffer */
@ -1266,7 +1262,7 @@ eagetpackets(sc)
/* Is the packet too big ? - this will probably be trapped above as a receive error */
if (len > ETHER_MAX_LEN) {
if (len > (ETHER_MAX_LEN - ETHER_CRC_LEN)) {
++ifp->if_ierrors;
printf("rx packet size error len=%d\n", len);
sc->sc_config2 |= EA_CFG2_OUTPUT;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_eb.c,v 1.20 1998/08/08 23:58:40 mycroft Exp $ */
/* $NetBSD: if_eb.c,v 1.21 1999/03/25 23:11:52 thorpej Exp $ */
/*
* Copyright (c) 1995 Mark Brinicombe
@ -97,10 +97,6 @@
#include <arm32/podulebus/podulebus.h>
#include <arm32/podulebus/podules.h>
#define ETHER_MIN_LEN 64
#define ETHER_MAX_LEN 1514
#define ETHER_ADDR_LEN 6
#ifndef EB_TIMEOUT
#define EB_TIMEOUT 60
#endif
@ -1045,7 +1041,7 @@ ebtxpacket(sc)
len = max(len, ETHER_MIN_LEN);
if (len > ETHER_MAX_LEN)
if (len > (ETHER_MAX_LEN - ETHER_CRC_LEN))
log(LOG_WARNING, "ea: oversize packet = %d bytes\n", len);
/* Ok we now have a packet len bytes long in our packet buffer */
@ -1280,7 +1276,7 @@ ebgetpackets(sc)
/* Is the packet too big ? - this will probably be trapped above as a receive error */
if (len > ETHER_MAX_LEN) {
if (len > (ETHER_MAX_LEN - ETHER_CRC_LEN)) {
++ifp->if_ierrors;
printf("rx packet size error len=%d\n", len);
sc->sc_config2 |= EB_CFG2_OUTPUT;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ie.c,v 1.21 1999/02/28 09:59:33 mark Exp $ */
/* $NetBSD: if_ie.c,v 1.22 1999/03/25 23:11:52 thorpej Exp $ */
/*
* Copyright (c) 1995 Melvin Tang-Richardson.
@ -117,9 +117,6 @@
#define NTXBUF (2) /* number of transmit buffers to allocate */
#define IE_TXBUF_SIZE (1522) /* size of tx buffer */
#define ETHER_MIN_LEN (64)
#define ETHER_MAX_LEN (1518)
#define PWriteShort(a,b) WriteWord(a,(b)<<16|(b))
#define xoffsetof(type, member) (offsetof(type, member) << 1)

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_le.c,v 1.2 1997/12/26 22:37:05 scottr Exp $ */
/* $NetBSD: if_le.c,v 1.3 1999/03/25 23:12:10 thorpej Exp $ */
/*
* Copyright (c) 1993 Adam Glass
@ -51,10 +51,6 @@
int le_debug = 0;
#endif
#define ETHER_MIN_LEN 64
#define ETHER_MAX_LEN 1518
#define ETHER_ADDR_LEN 6
int le_probe();
int le_match();
void le_init();

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ie.c,v 1.1 1996/05/17 21:18:23 chuck Exp $ */
/* $NetBSD: if_ie.c,v 1.2 1999/03/25 23:13:08 thorpej Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@ -37,9 +37,6 @@
#include <netinet/in.h>
#include <netinet/in_systm.h>
#define ETHER_MIN_LEN 64
#define ETHER_MAX_LEN 1518
#define NTXBUF 1
#define NRXBUF 16
#define IE_RBUF_SIZE ETHER_MAX_LEN

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ie.c,v 1.28 1998/10/01 20:05:09 thorpej Exp $ */
/* $NetBSD: if_ie.c,v 1.29 1999/03/25 23:13:54 thorpej Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995 Charles M. Hannum.
@ -167,10 +167,6 @@
#define IED_XMIT 0x40
#define IED_ALL 0x7f
#define ETHER_MIN_LEN 64
#define ETHER_MAX_LEN 1518
#define ETHER_ADDR_LEN 6
#ifdef IEDEBUG
#define inline /* not */
void print_rbd __P((volatile struct ie_recv_buf_desc *));

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_le.c,v 1.6 1998/10/09 06:14:22 matt Exp $ */
/* $NetBSD: if_le.c,v 1.7 1999/03/25 23:16:09 thorpej Exp $ */
/*
* Copyright (c) 1997 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -47,10 +47,6 @@
#include <dev/ic/lancereg.h>
#include <dev/ic/am7990reg.h>
#define ETHER_MIN_LEN 64
#define ETHER_MAX_LEN 1518
#define ETHER_ADDR_LEN 6
/*
* The following are incorrect. Why doesn't DEC follow its own specs???
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ze.c,v 1.1 1998/07/01 10:52:11 ragge Exp $ */
/* $NetBSD: if_ze.c,v 1.2 1999/03/25 23:16:09 thorpej Exp $ */
/*
* Copyright (c) 1998 James R. Maynard III. All rights reserved.
*
@ -62,9 +62,6 @@ struct netif_driver ze_driver = {
#define NRCV 5 /* allocate 5 receive descriptors */
#define NXMT 5 /* and 5 transmit - must be >1 */
#define ETHER_MAX_LEN 1518 /* maximum Ethernet frame */
#define ETHER_MIN_LEN 64 /* minimum Ethernet frame */
#define ETHER_ADDR_LEN 6 /* length of an Ethernet address */
#define SETUP_FRAME_LEN 128 /* length of the setup frame */
/* allocate a buffer on an octaword boundary */