summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_nge.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/pci/if_nge.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/pci/if_nge.c')
-rw-r--r--sys/dev/pci/if_nge.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/sys/dev/pci/if_nge.c b/sys/dev/pci/if_nge.c
index 3ee2a043e6a..85ac6a95341 100644
--- a/sys/dev/pci/if_nge.c
+++ b/sys/dev/pci/if_nge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nge.c,v 1.60 2008/10/15 19:12:18 blambert Exp $ */
+/* $OpenBSD: if_nge.c,v 1.61 2008/10/16 19:18:03 naddy Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 1997, 1998, 1999, 2000, 2001
@@ -1593,13 +1593,6 @@ nge_encap(sc, m_head, txidx)
struct nge_desc *f = NULL;
struct mbuf *m;
int frag, cur, cnt = 0;
-#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
/*
* Start packing the mbufs in this chain into
@@ -1633,9 +1626,9 @@ nge_encap(sc, m_head, txidx)
sc->nge_ldata->nge_tx_list[*txidx].nge_extsts = 0;
#if NVLAN > 0
- if (ifv != NULL) {
+ if (m_head->m_flags & M_VLANTAG) {
sc->nge_ldata->nge_tx_list[cur].nge_extsts |=
- (NGE_TXEXTSTS_VLANPKT|ifv->ifv_tag);
+ (NGE_TXEXTSTS_VLANPKT|m_head->m_pkthdr.ether_vtag);
}
#endif