summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2007-02-21 14:25:51 +0000
committerclaudio <claudio@openbsd.org>2007-02-21 14:25:51 +0000
commit586e9409230f60aa8a7aadb2583c43ce921d9216 (patch)
tree214a65fde111d83e3e6cb618126dfe1c9bddbc81
parentFor TUNSIFMODE protect the if_flags similar to the TUNSIFINFO case. (diff)
downloadwireguard-openbsd-586e9409230f60aa8a7aadb2583c43ce921d9216.tar.xz
wireguard-openbsd-586e9409230f60aa8a7aadb2583c43ce921d9216.zip
Make the firmware load on big endian systems and while there make sure that
the right value is printed in case of an error. OK mglocker@
-rw-r--r--sys/dev/ic/acx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/acx.c b/sys/dev/ic/acx.c
index 20ab345d78b..39b882fd93f 100644
--- a/sys/dev/ic/acx.c
+++ b/sys/dev/ic/acx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acx.c,v 1.61 2007/02/20 22:06:46 claudio Exp $ */
+/* $OpenBSD: acx.c,v 1.62 2007/02/21 14:25:51 claudio Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -1578,9 +1578,9 @@ acx_load_firmware(struct acx_softc *sc, uint32_t offset, const uint8_t *data,
fw = (const uint32_t *)data;
- if (*fw != csum) {
+ if (*fw != htole32(csum)) {
printf("%s: firmware checksum 0x%x does not match 0x%x!\n",
- ifp->if_xname, fw, csum);
+ ifp->if_xname, *fw, htole32(csum));
return (ENXIO);
}