Don't OR the 12 bit vlan-id mask, we wan't the whole TCI (3 bits
for PCP and 1 bit for CF).
This makes our stack see the vlanprio in bpf and thus tcpdump
correctly displays the received tag.
Tested on i386.
ok ?
Index: ./dev/pci/if_em.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_em.c,v
retrieving revision 1.259
diff -d -u -p -w -r1.259 if_em.c
--- ./dev/pci/if_em.c 5 Jul 2011 16:51:34 -0000 1.259
+++ ./dev/pci/if_em.c 28 Aug 2011 05:51:23 -0000
@@ -2888,8 +2888,7 @@ em_rxeof(struct em_softc *sc, int count)
#if NVLAN > 0
if (desc->status & E1000_RXD_STAT_VP) {
m->m_pkthdr.ether_vtag =
- (letoh16(desc->special) &
- E1000_RXD_SPC_VLAN_MASK);
+ letoh16(desc->special);
m->m_flags |= M_VLANTAG;
}