summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2007-12-11 02:36:03 +0000
committerBrad Smith <brad@cvs.openbsd.org>2007-12-11 02:36:03 +0000
commit039d7e63eaa2ffd4b09e9e98f36985e9bcdc954d (patch)
tree3d88b4d8568f98f60a5715668a269c41227901b5 /sys/dev/pci
parentdf95025bf69496e26c87da6f15f94dfbe8a1ad79 (diff)
- Remove disabled and unusable HW VLAN tagging code.
- Remove setup of the HW VLAN stripping. Issue reported by and fix tested by henric@ ok dlg@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_vge.c38
1 files changed, 4 insertions, 34 deletions
diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c
index be1055f9028..a978623b19b 100644
--- a/sys/dev/pci/if_vge.c
+++ b/sys/dev/pci/if_vge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vge.c,v 1.34 2007/10/10 12:46:44 kettenis Exp $ */
+/* $OpenBSD: if_vge.c,v 1.35 2007/12/11 02:36:02 brad Exp $ */
/* $FreeBSD: if_vge.c,v 1.3 2004/09/11 22:13:25 wpaul Exp $ */
/*
* Copyright (c) 2004
@@ -82,7 +82,6 @@
*/
#include "bpfilter.h"
-#include "vlan.h"
#include <sys/param.h>
#include <sys/endian.h>
@@ -107,11 +106,6 @@
#include <netinet/if_ether.h>
#endif
-#if NVLAN > 0
-#include <net/if_types.h>
-#include <net/if_vlan_var.h>
-#endif
-
#if NBPFILTER > 0
#include <net/bpf.h>
#endif
@@ -780,10 +774,6 @@ vge_attach(struct device *parent, struct device *self, void *aux)
ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_CSUM_IPv4 |
IFCAP_CSUM_TCPv4 | IFCAP_CSUM_UDPv4;
-#ifdef VGE_VLAN
- ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING;
-#endif
-
/* Set interface name */
strlcpy(ifp->if_xname, sc->vge_dev.dv_xname, IFNAMSIZ);
@@ -1296,13 +1286,6 @@ vge_encap(struct vge_softc *sc, struct mbuf *m_head, int idx)
struct mbuf *mnew = NULL;
int error, frag;
u_int32_t vge_flags;
-#if NVLAN > 0
- struct ifvlan *ifv = NULL;
-
- if ((m_head->m_flags & (M_PROTO1|M_PKTHDR)) == (M_PROTO1|M_PKTHDR) &&
- m_head->m_pkthdr.rcvif != NULL)
- ifv = m_head->m_pkthdr.rcvif->if_softc;
-#endif
vge_flags = 0;
@@ -1391,16 +1374,6 @@ repack:
sc->vge_ldata.vge_tx_free--;
sc->vge_ldata.vge_tx_list[idx].vge_sts |= htole32(VGE_TDSTS_OWN);
- /*
- * Set up hardware VLAN tagging.
- */
-#if NVLAN > 0
- if (ifv != NULL) {
- sc->vge_ldata.vge_tx_list[idx].vge_ctl |=
- htole32(htons(ifv->ifv_tag) | VGE_TDCTL_VTAG);
- }
-#endif
-
idx++;
if (mnew == NULL) {
/* if mbuf is coalesced, it is already dequeued */
@@ -1523,12 +1496,9 @@ vge_init(struct ifnet *ifp)
for (i = 0; i < ETHER_ADDR_LEN; i++)
CSR_WRITE_1(sc, VGE_PAR0 + i, sc->arpcom.ac_enaddr[i]);
- /*
- * Set receive FIFO threshold. Also allow transmission and
- * reception of VLAN tagged frames.
- */
- CSR_CLRBIT_1(sc, VGE_RXCFG, VGE_RXCFG_FIFO_THR|VGE_RXCFG_VTAGOPT);
- CSR_SETBIT_1(sc, VGE_RXCFG, VGE_RXFIFOTHR_128BYTES|VGE_VTAG_OPT2);
+ /* Set receive FIFO threshold */
+ CSR_CLRBIT_1(sc, VGE_RXCFG, VGE_RXCFG_FIFO_THR);
+ CSR_SETBIT_1(sc, VGE_RXCFG, VGE_RXFIFOTHR_128BYTES);
/* Set DMA burst length */
CSR_CLRBIT_1(sc, VGE_DMACFG0, VGE_DMACFG0_BURSTLEN);