diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2006-08-09 07:40:53 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2006-08-09 07:40:53 +0000 |
commit | 169b4cd79d0332292405c3b68629d4a633fef815 (patch) | |
tree | cbfba804d99d51a74d2cf0839f836e87f4674545 /sys | |
parent | 6c451c578bfbf9497e0db2f5db517a56566a218f (diff) |
fix endianness. this should give rate adaptation a better chance to work
on big endian architectures.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/if_ral.c | 12 | ||||
-rw-r--r-- | sys/dev/usb/if_ralreg.h | 6 |
2 files changed, 9 insertions, 9 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); diff --git a/sys/dev/usb/if_ralreg.h b/sys/dev/usb/if_ralreg.h index ad464e8f85b..e2cf5144f99 100644 --- a/sys/dev/usb/if_ralreg.h +++ b/sys/dev/usb/if_ralreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ralreg.h,v 1.10 2006/06/10 20:28:11 damien Exp $ */ +/* $OpenBSD: if_ralreg.h,v 1.11 2006/08/09 07:40:52 damien Exp $ */ /*- * Copyright (c) 2005, 2006 @@ -21,7 +21,7 @@ #define RAL_TX_DESC_SIZE (sizeof (struct ural_tx_desc)) #define RAL_CONFIG_NO 1 -#define RAL_IFACE_INDEX 0 +#define RAL_IFACE_INDEX 0 #define RAL_WRITE_MAC 0x02 #define RAL_READ_MAC 0x03 @@ -106,9 +106,9 @@ #define RAL_SHORT_PREAMBLE (1 << 2) -#define RAL_HOST_READY (1 << 2) #define RAL_RESET_ASIC (1 << 0) #define RAL_RESET_BBP (1 << 1) +#define RAL_HOST_READY (1 << 2) #define RAL_ENABLE_TSF (1 << 0) #define RAL_ENABLE_TSF_SYNC(x) (((x) & 0x3) << 1) |