Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Use ETHER_*_LEN constants from <net/if_ether.h> inst...
details: https://anonhg.NetBSD.org/src/rev/ac96377998b9
branches: trunk
changeset: 467566:ac96377998b9
user: thorpej <thorpej%NetBSD.org@localhost>
date: Thu Mar 25 23:20:22 1999 +0000
description:
Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves.
diffstat:
sys/dev/ic/smc91cxx.c | 7 +------
sys/dev/isa/cs89x0.c | 8 +++-----
sys/dev/isa/if_eg.c | 6 +-----
sys/dev/isa/if_el.c | 6 +-----
sys/dev/isa/if_hp.c | 5 +----
sys/dev/isa/if_iy.c | 5 +----
6 files changed, 8 insertions(+), 29 deletions(-)
diffs (135 lines):
diff -r 3946966bd7a1 -r ac96377998b9 sys/dev/ic/smc91cxx.c
--- a/sys/dev/ic/smc91cxx.c Thu Mar 25 23:20:00 1999 +0000
+++ b/sys/dev/ic/smc91cxx.c Thu Mar 25 23:20:22 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: smc91cxx.c,v 1.15 1999/02/28 17:10:53 explorer Exp $ */
+/* $NetBSD: smc91cxx.c,v 1.16 1999/03/25 23:20:22 thorpej Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -177,11 +177,6 @@
void smc91cxx_watchdog __P((struct ifnet *));
int smc91cxx_ioctl __P((struct ifnet *, u_long, caddr_t));
-/* 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 -r 3946966bd7a1 -r ac96377998b9 sys/dev/isa/cs89x0.c
--- a/sys/dev/isa/cs89x0.c Thu Mar 25 23:20:00 1999 +0000
+++ b/sys/dev/isa/cs89x0.c Thu Mar 25 23:20:22 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cs89x0.c,v 1.7 1998/11/13 09:37:46 mycroft Exp $ */
+/* $NetBSD: cs89x0.c,v 1.8 1999/03/25 23:23:16 thorpej Exp $ */
/*
* Copyright 1997
@@ -234,8 +234,6 @@
#define CS_OUTPUT_LOOP_MAX 100 /* max times round notorious tx loop */
#define DMA_STATUS_BITS 0x0007 /* bit masks for checking DMA status */
#define DMA_STATUS_OK 0x0004
-#define ETHER_MTU 1518 /* ETHERMTU is defiend in if_ether.h as 1500
- * ie. without the header. */
/*
* FUNCTION PROTOTYPES
@@ -340,7 +338,7 @@
* this and to port this to a OS where this was not the case would
* not be straightforward.
*/
- if (MCLBYTES < ETHER_MTU) {
+ if (MCLBYTES < ETHER_MAX_LEN) {
printf("%s: MCLBYTES too small for Ethernet frame\n",
sc->sc_dev.dv_xname);
return;
@@ -1712,7 +1710,7 @@
pkt_length = *((unsigned short *) dma_mem_ptr)++;
/* Do some sanity checks on the length and status. */
- if ((pkt_length > ETHER_MTU) ||
+ if ((pkt_length > ETHER_MAX_LEN) ||
((status & DMA_STATUS_BITS) != DMA_STATUS_OK)) {
/*
* the SCO driver kills the adapter in this
diff -r 3946966bd7a1 -r ac96377998b9 sys/dev/isa/if_eg.c
--- a/sys/dev/isa/if_eg.c Thu Mar 25 23:20:00 1999 +0000
+++ b/sys/dev/isa/if_eg.c Thu Mar 25 23:20:22 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_eg.c,v 1.45 1999/02/28 17:09:25 explorer Exp $ */
+/* $NetBSD: if_eg.c,v 1.46 1999/03/25 23:21:38 thorpej Exp $ */
/*
* Copyright (c) 1993 Dean Huxley <dean%fsa.ca@localhost>
@@ -96,10 +96,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 -r 3946966bd7a1 -r ac96377998b9 sys/dev/isa/if_el.c
--- a/sys/dev/isa/if_el.c Thu Mar 25 23:20:00 1999 +0000
+++ b/sys/dev/isa/if_el.c Thu Mar 25 23:20:22 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_el.c,v 1.56 1999/02/28 17:09:26 explorer Exp $ */
+/* $NetBSD: if_el.c,v 1.57 1999/03/25 23:21:38 thorpej Exp $ */
/*
* Copyright (c) 1994, Matthew E. Kimmel. Permission is hereby granted
@@ -66,10 +66,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 -r 3946966bd7a1 -r ac96377998b9 sys/dev/isa/if_hp.c
--- a/sys/dev/isa/if_hp.c Thu Mar 25 23:20:00 1999 +0000
+++ b/sys/dev/isa/if_hp.c Thu Mar 25 23:20:22 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_hp.c,v 1.28 1999/02/28 17:09:26 explorer Exp $ */
+/* $NetBSD: if_hp.c,v 1.29 1999/03/25 23:21:38 thorpej Exp $ */
/* XXX THIS DRIVER IS BROKEN. IT WILL NOT EVEN COMPILE. */
@@ -112,9 +112,6 @@
struct mbuf *hpget();
-#define ETHER_MIN_LEN 64
-#define ETHER_MAX_LEN 1536
-
/*
* Ethernet software status per interface.
*
diff -r 3946966bd7a1 -r ac96377998b9 sys/dev/isa/if_iy.c
--- a/sys/dev/isa/if_iy.c Thu Mar 25 23:20:00 1999 +0000
+++ b/sys/dev/isa/if_iy.c Thu Mar 25 23:20:22 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iy.c,v 1.32 1999/02/28 17:09:26 explorer Exp $ */
+/* $NetBSD: if_iy.c,v 1.33 1999/03/25 23:21:38 thorpej Exp $ */
/* #define IYDEBUG */
/* #define IYMEMDEBUG */
@@ -102,9 +102,6 @@
#include <dev/isa/isavar.h>
#include <dev/ic/i82595reg.h>
-#define ETHER_MIN_LEN (ETHERMIN + sizeof(struct ether_header) + 4)
-#define ETHER_MAX_LEN (ETHERMTU + sizeof(struct ether_header) + 4)
-
/*
* Ethernet status, per interface.
*/
Home |
Main Index |
Thread Index |
Old Index