summaryrefslogtreecommitdiff
path: root/sys/net
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/net
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/net')
-rw-r--r--sys/net/if_vlan.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 191de2e49d7..955f8715f34 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vlan.c,v 1.76 2008/10/16 19:12:51 naddy Exp $ */
+/* $OpenBSD: if_vlan.c,v 1.77 2008/10/16 19:18:03 naddy Exp $ */
/*
* Copyright 1998 Massachusetts Institute of Technology
@@ -206,23 +206,11 @@ vlan_start(struct ifnet *ifp)
* If the IFCAP_VLAN_HWTAGGING capability is set on the parent,
* it can do VLAN tag insertion itself and doesn't require us
* to create a special header for it. In this case, we just pass
- * the packet along. However, we need some way to tell the
- * interface where the packet came from so that it knows how
- * to find the VLAN tag to use, so we set the rcvif in the
- * mbuf header to our ifnet.
- *
- * Note: we also set the M_PROTO1 flag in the mbuf to let
- * the parent driver know that the rcvif pointer is really
- * valid. We need to do this because sometimes mbufs will
- * be allocated by other parts of the system that contain
- * garbage in the rcvif pointer. Using the M_PROTO1 flag
- * lets the driver perform a proper sanity check and avoid
- * following potentially bogus rcvif pointers off into
- * never-never land.
+ * the packet along.
*/
if (p->if_capabilities & IFCAP_VLAN_HWTAGGING) {
- m->m_pkthdr.rcvif = ifp;
- m->m_flags |= M_PROTO1;
+ m->m_pkthdr.ether_vtag = ifv->ifv_tag;
+ m->m_flags |= M_VLANTAG;
} else {
struct ether_vlan_header evh;