diff options
author | 2005-11-23 20:29:30 +0000 | |
---|---|---|
committer | 2005-11-23 20:29:30 +0000 | |
commit | 74861c17dadff20510f89e90d0736cd7cae8d30d (patch) | |
tree | 9e9ef2e91a0231275bed3b45d1c28b171e38cee1 /sys/dev/usb/if_ral.c | |
parent | one too many `Ns' (diff) | |
download | wireguard-openbsd-74861c17dadff20510f89e90d0736cd7cae8d30d.tar.xz wireguard-openbsd-74861c17dadff20510f89e90d0736cd7cae8d30d.zip |
use sizeof instead of hard-coded values.
Diffstat (limited to 'sys/dev/usb/if_ral.c')
-rw-r--r-- | sys/dev/usb/if_ral.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c index 59a648578f6..14e8986f56c 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.47 2005/11/23 20:23:48 damien Exp $ */ +/* $OpenBSD: if_ral.c,v 1.48 2005/11/23 20:29:30 damien Exp $ */ /*- * Copyright (c) 2005 @@ -2225,10 +2225,11 @@ ural_amrr_timeout(void *arg) req.bRequest = RAL_READ_MULTI_MAC; USETW(req.wValue, 0); USETW(req.wIndex, RAL_STA_CSR0); - USETW(req.wLength, 22); + USETW(req.wLength, sizeof sc->sta); usbd_setup_default_xfer(sc->amrr_xfer, sc->sc_udev, sc, - USBD_DEFAULT_TIMEOUT, &req, sc->sta, 22, 0, ural_amrr_update); + USBD_DEFAULT_TIMEOUT, &req, sc->sta, sizeof sc->sta, 0, + ural_amrr_update); (void)usbd_transfer(sc->amrr_xfer); splx(s); @@ -2246,7 +2247,7 @@ ural_amrr_update(usbd_xfer_handle xfer, usbd_private_handle priv, amrr->retrycnt = sc->sta[7] + /* TX one-retry ok count */ - sc->sta[8] + /* TX more-retry ok count */ + sc->sta[8] + /* TX more-retry ok count */ sc->sta[8]; /* TX retry-fail count */ amrr->txcnt = |