summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2012-04-01 13:25:14 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2012-04-01 13:25:14 +0000
commit3c855a8b8b28d1256be6bce5a12e0c118733009e (patch)
tree10af4eff09377a3c0202d1c3b40a0765a87dd6d8 /sys/dev/usb
parentb6146a441ff14988818616be7636711f0196d358 (diff)
make this work on big endian archs again, broken in the last commit.
fixes breakage noticed by landry@ on macppc
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_axe.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c
index 033659d795c..d7dbc18d74a 100644
--- a/sys/dev/usb/if_axe.c
+++ b/sys/dev/usb/if_axe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_axe.c,v 1.108 2012/03/01 04:33:15 jsg Exp $ */
+/* $OpenBSD: if_axe.c,v 1.109 2012/04/01 13:25:13 jsg Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Jonathan Gray <jsg@openbsd.org>
@@ -1028,13 +1028,13 @@ axe_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status)
memcpy(&hdr, buf, sizeof(hdr));
total_len -= sizeof(hdr);
- if (((hdr.len & AXE_RH1M_RXLEN_MASK) ^
- (hdr.ilen & AXE_RH1M_RXLEN_MASK)) !=
+ if (((letoh16(hdr.len) & AXE_RH1M_RXLEN_MASK) ^
+ (letoh16(hdr.ilen) & AXE_RH1M_RXLEN_MASK)) !=
AXE_RH1M_RXLEN_MASK) {
ifp->if_ierrors++;
goto done;
}
- pktlen = letoh16(hdr.len & AXE_RH1M_RXLEN_MASK);
+ pktlen = letoh16(hdr.len) & AXE_RH1M_RXLEN_MASK;
if (pktlen > total_len) {
ifp->if_ierrors++;
goto done;