Index: if_em.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_em.c,v retrieving revision 1.7 diff -u -r1.7 if_em.c --- if_em.c 2003/02/27 16:31:09 1.7 +++ if_em.c 2003/03/06 22:15:48 @@ -499,8 +499,7 @@ /* 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) + m_head->m_pkthdr.rcvif != NULL) ifv = m_head->m_pkthdr.rcvif->if_softc; #endif @@ -1410,6 +1409,7 @@ ifp->if_ioctl = em_ioctl; ifp->if_start = em_start; ifp->if_watchdog = em_watchdog; + ifp->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING; IFQ_SET_MAXLEN(&ifp->if_snd, sc->num_tx_desc - 1); IFQ_SET_READY(&ifp->if_snd); @@ -2103,21 +2103,18 @@ bpf_mtap(ifp->if_bpf, sc->fmp); #endif - - eh = mtod(sc->fmp, struct ether_header *); - - /* Remove ethernet header from mbuf */ - m_adj(sc->fmp, sizeof(struct ether_header)); - em_receive_checksum(sc, current_desc, - sc->fmp); -#if 0 - if (current_desc->status & E1000_RXD_STAT_VP) - VLAN_INPUT_TAG(eh, sc->fmp, + if (current_desc->status & E1000_RXD_STAT_VP) { + vlan_input_tag(sc->fmp, letoh16(current_desc->special)); - else -#endif /* 0 */ + } else { + /* Remove ethernet header from mbuf */ + eh = mtod(sc->fmp, struct ether_header *); + m_adj(sc->fmp, + sizeof(struct ether_header)); + em_receive_checksum(sc, current_desc, + sc->fmp); ether_input(ifp, eh, sc->fmp); - + } sc->fmp = NULL; sc->lmp = NULL; }