diff options
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r-- | sys/arch/sparc/dev/hme.c | 12 | ||||
-rw-r--r-- | sys/arch/sparc/dev/hmereg.h | 6 | ||||
-rw-r--r-- | sys/arch/sparc/dev/hmevar.h | 9 |
3 files changed, 6 insertions, 21 deletions
diff --git a/sys/arch/sparc/dev/hme.c b/sys/arch/sparc/dev/hme.c index d020ff8290b..b361dbc35a8 100644 --- a/sys/arch/sparc/dev/hme.c +++ b/sys/arch/sparc/dev/hme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hme.c,v 1.43 2004/08/08 19:01:20 brad Exp $ */ +/* $OpenBSD: hme.c,v 1.44 2004/09/28 00:21:23 brad Exp $ */ /* * Copyright (c) 1998 Jason L. Wright (jason@thought.net) @@ -69,10 +69,6 @@ #include <net/bpfdesc.h> #endif -#if NVLAN > 0 -#include <net/if_vlan_var.h> -#endif - #include <machine/autoconf.h> #include <sparc/cpu.h> #include <sparc/sparc/cpuvar.h> @@ -249,7 +245,7 @@ hmeattach(parent, self, aux) ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST; sc->sc_if_flags = ifp->if_flags; - ifp->if_capabilities |= IFCAP_VLAN_MTU; + ifp->if_capabilities = IFCAP_VLAN_MTU; IFQ_SET_MAXLEN(&ifp->if_snd, HME_TX_RING_SIZE); IFQ_SET_READY(&ifp->if_snd); @@ -565,7 +561,7 @@ hmeinit(sc) sc->sc_arpcom.ac_enaddr[3]; cr->mac_addr2 = (sc->sc_arpcom.ac_enaddr[4] << 8) | sc->sc_arpcom.ac_enaddr[5]; - cr->tx_pkt_max = cr->rx_pkt_max = HME_MTU; + cr->tx_pkt_max = cr->rx_pkt_max = ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN; cr->jsize = HME_DEFAULT_JSIZE; cr->ipkt_gap1 = HME_DEFAULT_IPKT_GAP1; @@ -962,7 +958,7 @@ hme_mcreset(sc) for (j = 0; j < 8; j++) { if ((crc & 1) ^ (octet & 1)) { crc >>= 1; - crc ^= MC_POLY_LE; + crc ^= ETHER_CRC_POLY_LE; } else crc >>= 1; diff --git a/sys/arch/sparc/dev/hmereg.h b/sys/arch/sparc/dev/hmereg.h index 7ca3b6df891..e7d340624f2 100644 --- a/sys/arch/sparc/dev/hmereg.h +++ b/sys/arch/sparc/dev/hmereg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hmereg.h,v 1.10 2003/11/03 07:01:33 david Exp $ */ +/* $OpenBSD: hmereg.h,v 1.11 2004/09/28 00:21:23 brad Exp $ */ /* * Copyright (c) 1998 Jason L. Wright (jason@thought.net) @@ -31,10 +31,6 @@ #define HME_DEFAULT_IPKT_GAP1 8 #define HME_DEFAULT_IPKT_GAP2 4 -#define MC_POLY_BE 0x04c11db7UL /* mcast crc, big endian */ -#define MC_POLY_LE 0xedb88320UL /* mcast crc, little endian */ - - /* global registers */ struct hme_gr { volatile u_int32_t reset; /* reset tx/rx */ diff --git a/sys/arch/sparc/dev/hmevar.h b/sys/arch/sparc/dev/hmevar.h index a6e6a749755..9b39ebfbf5d 100644 --- a/sys/arch/sparc/dev/hmevar.h +++ b/sys/arch/sparc/dev/hmevar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hmevar.h,v 1.10 2004/08/08 19:01:20 brad Exp $ */ +/* $OpenBSD: hmevar.h,v 1.11 2004/09/28 00:21:23 brad Exp $ */ /* * Copyright (c) 1998 Jason L. Wright (jason@thought.net) @@ -60,10 +60,3 @@ struct hme_softc { int sc_first_td, sc_last_td, sc_no_td; /* tx counters */ int sc_last_rd; /* rx counters */ }; - -#ifndef EVL_ENCAPLEN /* defined if NVLAN > 0 */ -#define EVL_ENCAPLEN 0 -#endif - -#define HME_MTU \ - (ETHERMTU + EVL_ENCAPLEN + sizeof(u_int32_t) + sizeof(struct ether_header)) |