diff options
Diffstat (limited to 'sys/dev/pci/if_bnx.c')
-rw-r--r-- | sys/dev/pci/if_bnx.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c index aea799bddb6..b5fc6269d48 100644 --- a/sys/dev/pci/if_bnx.c +++ b/sys/dev/pci/if_bnx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bnx.c,v 1.66 2008/10/02 20:21:14 brad Exp $ */ +/* $OpenBSD: if_bnx.c,v 1.67 2008/10/16 19:16:21 naddy Exp $ */ /*- * Copyright (c) 2006 Broadcom Corporation @@ -4014,26 +4014,14 @@ bnx_rx_intr(struct bnx_softc *sc) if ((status & L2_FHDR_STATUS_L2_VLAN_TAG) && !(sc->rx_mode & BNX_EMAC_RX_MODE_KEEP_VLAN_TAG)) { #if NVLAN > 0 - struct ether_vlan_header vh; - DBPRINT(sc, BNX_VERBOSE_SEND, "%s(): VLAN tag = 0x%04X\n", __FUNCTION__, l2fhdr->l2_fhdr_vlan_tag); - if (m->m_pkthdr.len < ETHER_HDR_LEN) { - m_freem(m); - goto bnx_rx_int_next_rx; - } - m_copydata(m, 0, ETHER_HDR_LEN, (caddr_t)&vh); - vh.evl_proto = vh.evl_encap_proto; - vh.evl_tag = htons(l2fhdr->l2_fhdr_vlan_tag); - vh.evl_encap_proto = htons(ETHERTYPE_VLAN); - m_adj(m, ETHER_HDR_LEN); - M_PREPEND(m, sizeof(vh), M_DONTWAIT); - if (m == NULL) - goto bnx_rx_int_next_rx; - m_copyback(m, 0, sizeof(vh), &vh); + m->m_pkthdr.ether_vtag = + l2fhdr->l2_fhdr_vlan_tag; + m->m_flags |= M_VLANTAG; #else m_freem(m); goto bnx_rx_int_next_rx; |