diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2014-04-22 11:54:47 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2014-04-22 11:54:47 +0000 |
commit | 3516ed2b3602f07b9747389c643cdc021611cb1d (patch) | |
tree | 8665104157a7e620885bf6caaf4b96794a849373 /sys/dev/pci/if_bge.c | |
parent | ef224a87c34f11b1e9423aa90b06b7591e7f20e2 (diff) |
If VLAN_HWTAGGING is disabled, we tell the chip not to strip the
tag from the received frame. Do not add the tag from the receive
descriptor in this case so that the packet isn't tagged twice.
Matches FreeBSD.
ok brad@
Diffstat (limited to 'sys/dev/pci/if_bge.c')
-rw-r--r-- | sys/dev/pci/if_bge.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c index 7ee9fc5cedf..e31ae3ee060 100644 --- a/sys/dev/pci/if_bge.c +++ b/sys/dev/pci/if_bge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bge.c,v 1.353 2014/02/24 20:00:48 brad Exp $ */ +/* $OpenBSD: if_bge.c,v 1.354 2014/04/22 11:54:46 naddy Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -3502,7 +3502,8 @@ bge_rxeof(struct bge_softc *sc) bge_rxcsum(sc, cur_rx, m); #if NVLAN > 0 - if (cur_rx->bge_flags & BGE_RXBDFLAG_VLAN_TAG) { + if (ifp->if_capabilities & IFCAP_VLAN_HWTAGGING && + cur_rx->bge_flags & BGE_RXBDFLAG_VLAN_TAG) { m->m_pkthdr.ether_vtag = cur_rx->bge_vlan_tag; m->m_flags |= M_VLANTAG; } |