diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2004-09-27 23:59:28 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2004-09-27 23:59:28 +0000 |
commit | 80dce2e7d18adec0e477b0e67c6afec515c76e53 (patch) | |
tree | ca1e68febe3627257a68fe7287155f5ecb45fc3a /sys/dev | |
parent | d55234b5da6d885f1cd489f70e074ef2945ab1ee (diff) |
allow for VLAN-sized frames.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/gem.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c index c759065cae3..1f0b7daeee8 100644 --- a/sys/dev/ic/gem.c +++ b/sys/dev/ic/gem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gem.c,v 1.38 2004/06/20 20:50:41 pvalchev Exp $ */ +/* $OpenBSD: gem.c,v 1.39 2004/09/27 23:59:27 brad Exp $ */ /* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */ /* @@ -64,10 +64,6 @@ #include <net/bpf.h> #endif -#if NVLAN > 0 -#include <net/if_vlan_var.h> -#endif - #include <machine/bus.h> #include <machine/intr.h> @@ -232,6 +228,7 @@ gem_config(sc) ifp->if_ioctl = gem_ioctl; ifp->if_watchdog = gem_watchdog; IFQ_SET_READY(&ifp->if_snd); + ifp->if_capabilities = IFCAP_VLAN_MTU; /* Initialize ifmedia structures and MII info */ mii->mii_ifp = ifp; @@ -735,12 +732,7 @@ gem_init(struct ifnet *ifp) /* step 4. TX MAC registers & counters */ gem_init_regs(sc); - max_frame_size = max(ifp->if_mtu, ETHERMTU); - max_frame_size += ETHER_HDR_LEN + ETHER_CRC_LEN; -#if 0 - if (sc->sc_ethercom.ec_capenable & ETHERCAP_VLAN_MTU) - max_frame_size += ETHER_VLAN_ENCAP_LEN; -#endif + max_frame_size = ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN; v = (max_frame_size) | (0x2000 << 16) /* Burst size */; bus_space_write_4(t, h, GEM_MAC_MAC_MAX_FRAME, v); |