summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2009-05-25 10:17:56 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2009-05-25 10:17:56 +0000
commit6c0a9d0e6299d04e2837561eb2f64bcd88adf314 (patch)
tree584b2bb9c14c834ab6c9579e47cf2730fecbff66
parentbbaa0a93e3053773644c36911357d3e98b0b2d6d (diff)
Add missing letoh in em(4) vlan handling, resulting in a problem on
big-endian arch where vlans were in use. Fix from Brad. Problem reported and fix tested by Axton Grams, also tested by me. ok dlg@.
-rw-r--r--sys/dev/pci/if_em.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index a74b85592e0..4ee5c347645 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.207 2009/01/27 09:17:51 dlg Exp $ */
+/* $OpenBSD: if_em.c,v 1.208 2009/05/25 10:17:55 sthen Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -2752,7 +2752,7 @@ em_rxeof(struct em_softc *sc, int count)
#if NVLAN > 0
if (desc->status & E1000_RXD_STAT_VP) {
m->m_pkthdr.ether_vtag =
- (desc->special &
+ (letoh16(desc->special) &
E1000_RXD_SPC_VLAN_MASK);
m->m_flags |= M_VLANTAG;
}