summaryrefslogtreecommitdiff
path: root/sys/dev/ic/re.c
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2008-10-16 19:18:04 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2008-10-16 19:18:04 +0000
commit7b27043f229c9133ae33baf4b80e762cd23177b0 (patch)
treef9d77bd5838c2cbb2089d11dd8b1a4f243c14f0d /sys/dev/ic/re.c
parent90aabd4ca2cee27b46f35ad2bde34bdc150da7d6 (diff)
Switch the existing TX VLAN hardware support over to having the
tag in the header. Convert TX tagging in the drivers. Help and ok brad@
Diffstat (limited to 'sys/dev/ic/re.c')
-rw-r--r--sys/dev/ic/re.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c
index 35520604f42..5a4cd7b5d28 100644
--- a/sys/dev/ic/re.c
+++ b/sys/dev/ic/re.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: re.c,v 1.95 2008/10/16 19:16:21 naddy Exp $ */
+/* $OpenBSD: re.c,v 1.96 2008/10/16 19:18:03 naddy Exp $ */
/* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@@ -1649,13 +1649,6 @@ re_encap(struct rl_softc *sc, struct mbuf *m, int *idx)
struct rl_desc *d;
u_int32_t cmdstat, vlanctl = 0, csum_flags = 0;
struct rl_txq *txq;
-#if NVLAN > 0
- struct ifvlan *ifv = NULL;
-
- if ((m->m_flags & (M_PROTO1|M_PKTHDR)) == (M_PROTO1|M_PKTHDR) &&
- m->m_pkthdr.rcvif != NULL)
- ifv = m->m_pkthdr.rcvif->if_softc;
-#endif
if (sc->rl_ldata.rl_tx_free <= RL_NTXDESC_RSVD)
return (EFBIG);
@@ -1728,8 +1721,9 @@ re_encap(struct rl_softc *sc, struct mbuf *m, int *idx)
* transmission attempt.
*/
#if NVLAN > 0
- if (ifv != NULL)
- vlanctl |= swap16(ifv->ifv_tag) | RL_TDESC_VLANCTL_TAG;
+ if (m->m_flags & M_VLANTAG)
+ vlanctl |= swap16(m->m_pkthdr.ether_vtag) |
+ RL_TDESC_VLANCTL_TAG;
#endif
/*