summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_ral.c
diff options
context:
space:
mode:
authordamien <damien@openbsd.org>2006-08-09 07:40:52 +0000
committerdamien <damien@openbsd.org>2006-08-09 07:40:52 +0000
commit96fb53e185a8baa6bee3a715e217748b61fcc683 (patch)
tree89abfd527d96a3a314eb9ea94227047a96b87bfe /sys/dev/usb/if_ral.c
parentadd 1000BaseLX (diff)
downloadwireguard-openbsd-96fb53e185a8baa6bee3a715e217748b61fcc683.tar.xz
wireguard-openbsd-96fb53e185a8baa6bee3a715e217748b61fcc683.zip
fix endianness. this should give rate adaptation a better chance to work
on big endian architectures.
Diffstat (limited to 'sys/dev/usb/if_ral.c')
-rw-r--r--sys/dev/usb/if_ral.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c
index 8a5bf9add89..648845d5794 100644
--- a/sys/dev/usb/if_ral.c
+++ b/sys/dev/usb/if_ral.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ral.c,v 1.71 2006/07/02 00:56:14 jsg Exp $ */
+/* $OpenBSD: if_ral.c,v 1.72 2006/08/09 07:40:52 damien Exp $ */
/*-
* Copyright (c) 2005, 2006
@@ -2225,16 +2225,16 @@ ural_amrr_update(usbd_xfer_handle xfer, usbd_private_handle priv,
}
/* count TX retry-fail as Tx errors */
- ifp->if_oerrors += sc->sta[9];
+ ifp->if_oerrors += letoh16(sc->sta[9]);
sc->amn.amn_retrycnt =
- sc->sta[7] + /* TX one-retry ok count */
- sc->sta[8] + /* TX more-retry ok count */
- sc->sta[9]; /* TX retry-fail count */
+ letoh16(sc->sta[7]) + /* TX one-retry ok count */
+ letoh16(sc->sta[8]) + /* TX more-retry ok count */
+ letoh16(sc->sta[9]); /* TX retry-fail count */
sc->amn.amn_txcnt =
sc->amn.amn_retrycnt +
- sc->sta[6]; /* TX no-retry ok count */
+ letoh16(sc->sta[6]); /* TX no-retry ok count */
ieee80211_amrr_choose(&sc->amrr, sc->sc_ic.ic_bss, &sc->amn);