From 33ce82e4069dbb7ce660bfdcc303d148047744ed Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Wed, 25 Sep 2002 00:28:11 +0000 Subject: #if NVLAN > 0 around vlan portions of code --- sys/dev/pci/if_em.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sys') 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 -- cgit v1.2.3