From 46f33daf9a801f44014b453c63e91a4b8e1066e2 Mon Sep 17 00:00:00 2001 From: Damien Bergamini Date: Sun, 22 Jan 2006 21:41:04 +0000 Subject: account tx retry-fail errors in if_oerrors. --- sys/dev/usb/if_ral.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'sys/dev/usb') 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 */ -- cgit v1.2.3