From 97ed77d7a9f1a4c010969f74a3ced52aa6853838 Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Mon, 2 Mar 2015 15:18:38 +0000 Subject: athn(4) USB drops received frames larger than MCLBYTES. Count these dropped frames as input errors. --- sys/dev/usb/if_athn_usb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sys/dev/usb/if_athn_usb.c') diff --git a/sys/dev/usb/if_athn_usb.c b/sys/dev/usb/if_athn_usb.c index cd55b8cfde5..bb4e6eca457 100644 --- a/sys/dev/usb/if_athn_usb.c +++ b/sys/dev/usb/if_athn_usb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_athn_usb.c,v 1.31 2015/03/02 15:05:11 stsp Exp $ */ +/* $OpenBSD: if_athn_usb.c,v 1.32 2015/03/02 15:18:37 stsp Exp $ */ /*- * Copyright (c) 2011 Damien Bergamini @@ -1804,6 +1804,8 @@ athn_usb_rxeof(struct usbd_xfer *xfer, void *priv, { struct athn_usb_rx_data *data = priv; struct athn_usb_softc *usc = data->sc; + struct athn_softc *sc = &usc->sc_sc; + struct ifnet *ifp = &sc->sc_ic.ic_if; struct athn_usb_rx_stream *stream = &usc->rx_stream; uint8_t *buf = data->buf; struct ar_stream_hdr *hdr; @@ -1872,6 +1874,10 @@ athn_usb_rxeof(struct usbd_xfer *xfer, void *priv, } } else /* Drop frames larger than MCLBYTES. */ m = NULL; + + if (m == NULL) + ifp->if_ierrors++; + /* * NB: m can be NULL, in which case the next pktlen bytes * will be discarded from the Rx stream. -- cgit v1.2.3