diff options
author | Nathan Binkert <nate@cvs.openbsd.org> | 2002-09-25 00:28:11 +0000 |
---|---|---|
committer | Nathan Binkert <nate@cvs.openbsd.org> | 2002-09-25 00:28:11 +0000 |
commit | 33ce82e4069dbb7ce660bfdcc303d148047744ed (patch) | |
tree | bad2df408b089f44ab0e53093afba87d29363ba4 /sys/dev/pci | |
parent | 59ead801afa1e069c2a0a47bb63a2c317f0c0594 (diff) |
#if NVLAN > 0 around vlan portions of code
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_em.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index f83e9f099d1..0576727d036 100644 --- a/sys/dev/pci/if_em.c +++ b/sys/dev/pci/if_em.c @@ -456,7 +456,9 @@ em_start(struct ifnet *ifp) s = splimp(); for(;;) { +#if NVLAN > 0 struct ifvlan *ifv = NULL; +#endif IFQ_POLL(&ifp->if_snd, m_head); @@ -508,12 +510,14 @@ em_start(struct ifnet *ifp) } #endif +#if NVLAN > 0 /* Find out if we are in vlan mode */ if ((m_head->m_flags & (M_PROTO1|M_PKTHDR)) == (M_PROTO1|M_PKTHDR) && m_head->m_pkthdr.rcvif != NULL && m_head->m_pkthdr.rcvif->if_type == IFT_L2VLAN) ifv = m_head->m_pkthdr.rcvif->if_softc; +#endif if (bus_dmamap_load_mbuf(sc->osdep.em_pa.pa_dmat, tx_buffer->dmamap, @@ -544,6 +548,7 @@ em_start(struct ifnet *ifp) SIMPLEQ_INSERT_TAIL(&sc->used_tx_buffer_list, tx_buffer, em_tx_entry); +#if NVLAN > 0 if (ifv != NULL) { /* Tell hardware to add tag */ current_tx_desc->lower.data |= @@ -553,6 +558,7 @@ em_start(struct ifnet *ifp) current_tx_desc->upper.fields.special = htole16(ifv->ifv_tag); } +#endif /* * Last Descriptor of Packet needs End Of Packet |