summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_ral.c
diff options
context:
space:
mode:
authordamien <damien@openbsd.org>2006-01-22 21:41:03 +0000
committerdamien <damien@openbsd.org>2006-01-22 21:41:03 +0000
commit66fcf640b3ca97c023a650882509fb56748abf55 (patch)
treed2d4d5ed3946cd48579228dfe3a9b2f77b458260 /sys/dev/usb/if_ral.c
parentfixes miibus_{read,write}reg routines. (diff)
downloadwireguard-openbsd-66fcf640b3ca97c023a650882509fb56748abf55.tar.xz
wireguard-openbsd-66fcf640b3ca97c023a650882509fb56748abf55.zip
account tx retry-fail errors in if_oerrors.
Diffstat (limited to 'sys/dev/usb/if_ral.c')
-rw-r--r--sys/dev/usb/if_ral.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c
index 99d74634551..b90945db3b6 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.60 2006/01/14 12:40:39 damien Exp $ */
+/* $OpenBSD: if_ral.c,v 1.61 2006/01/22 21:41:03 damien Exp $ */
/*-
* Copyright (c) 2005, 2006
@@ -2342,9 +2342,16 @@ ural_amrr_update(usbd_xfer_handle xfer, usbd_private_handle priv,
{
struct ural_softc *sc = (struct ural_softc *)priv;
struct ural_amrr *amrr = &sc->amrr;
+ struct ifnet *ifp = &sc->sc_ic.ic_if;
- if (status != USBD_NORMAL_COMPLETION)
+ if (status != USBD_NORMAL_COMPLETION) {
+ printf("%s: could not retrieve Tx statistics - cancelling "
+ "automatic rate control\n", USBDEVNAME(sc->sc_dev));
return;
+ }
+
+ /* count TX retry-fail as Tx errors */
+ ifp->if_oerrors += sc->sta[9];
amrr->retrycnt =
sc->sta[7] + /* TX one-retry ok count */