summaryrefslogtreecommitdiff
path: root/sys/dev/ic/re.c
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2008-10-16 19:16:22 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2008-10-16 19:16:22 +0000
commitbd4e71e6bed07a52899e9b2eb7b4088e57f0a007 (patch)
tree7d8fd5fb7d332b5c26271e072add15c3be9a679f /sys/dev/ic/re.c
parentc73f03f7f8fc0a3ad3cd779e5c9e0cefdfa342f2 (diff)
Convert RX tag stripping to storing the tag in the mbuf header and
enable RX tag stripping for re(4). ok brad@
Diffstat (limited to 'sys/dev/ic/re.c')
-rw-r--r--sys/dev/ic/re.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c
index c1b54c09189..35520604f42 100644
--- a/sys/dev/ic/re.c
+++ b/sys/dev/ic/re.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: re.c,v 1.94 2008/10/11 23:49:05 brad Exp $ */
+/* $OpenBSD: re.c,v 1.95 2008/10/16 19:16:21 naddy Exp $ */
/* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@@ -1461,6 +1461,13 @@ re_rxeof(struct rl_softc *sc)
m->m_pkthdr.csum_flags |= M_TCP_CSUM_IN_OK |
M_UDP_CSUM_IN_OK;
}
+#if NVLAN > 0
+ if (rxvlan & RL_RDESC_VLANCTL_TAG) {
+ m->m_pkthdr.ether_vtag =
+ ntohs((rxvlan & RL_RDESC_VLANCTL_DATA));
+ m->m_flags |= M_VLANTAG;
+ }
+#endif
#if NBPFILTER > 0
if (ifp->if_bpf)
@@ -1917,6 +1924,8 @@ re_init(struct ifnet *ifp)
cfg = RL_CPLUSCMD_PCI_MRW;
if (ifp->if_capabilities & IFCAP_CSUM_IPv4)
cfg |= RL_CPLUSCMD_RXCSUM_ENB;
+ if (ifp->if_capabilities & IFCAP_VLAN_HWTAGGING)
+ cfg |= RL_CPLUSCMD_VLANSTRIP;
if (sc->rl_flags & RL_FLAG_MACSTAT) {
cfg |= RL_CPLUSCMD_MACSTAT_DIS;
/* XXX magic. */