summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2006-01-22 21:41:04 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2006-01-22 21:41:04 +0000
commit46f33daf9a801f44014b453c63e91a4b8e1066e2 (patch)
tree268f15ce4a9319595a60d6459192a01677f49826 /sys/dev/usb
parent8d560c2ab6ba1f7f71fd9112e1f2a5fb8d130b97 (diff)
account tx retry-fail errors in if_oerrors.
Diffstat (limited to 'sys/dev/usb')
-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 */