Module Name: src
Committed By: skrll
Date: Tue Feb 4 07:37:11 UTC 2020
Modified Files:
src/sys/dev/qbus: if_dmc.c
Log Message:
Adopt <net/if_stats.h>
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/qbus/if_dmc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/qbus/if_dmc.c
diff -u src/sys/dev/qbus/if_dmc.c:1.26 src/sys/dev/qbus/if_dmc.c:1.27
--- src/sys/dev/qbus/if_dmc.c:1.26 Wed Jul 20 07:37:51 2016
+++ src/sys/dev/qbus/if_dmc.c Tue Feb 4 07:37:11 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: if_dmc.c,v 1.26 2016/07/20 07:37:51 ozaki-r Exp $ */
+/* $NetBSD: if_dmc.c,v 1.27 2020/02/04 07:37:11 skrll Exp $ */
/*
* Copyright (c) 1982, 1986 Regents of the University of California.
* All rights reserved.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_dmc.c,v 1.26 2016/07/20 07:37:51 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_dmc.c,v 1.27 2020/02/04 07:37:11 skrll Exp $");
#undef DMCDEBUG /* for base table dump on fatal error */
@@ -595,7 +595,7 @@ dmcxint(void *a)
len = (arg & DMC_CCOUNT) - sizeof (struct dmc_header);
if (len < 0 || len > DMCMTU) {
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
#ifdef DMCDEBUG
printd("%s: bad rcv pkt addr 0x%x len 0x%x\n",
device_xname(sc->sc_dev), pkaddr, len);
@@ -653,7 +653,7 @@ dmcxint(void *a)
* A write has completed, start another
* transfer if there is more data to send.
*/
- ifp->if_opackets++;
+ if_statinc(ifp, if_opackets);
/* find associated dmcbuf structure */
ifxp = &sc->sc_ifw[0];
for (rp = &sc->sc_xbufs[0]; rp < &sc->sc_xbufs[NXMT]; rp++) {
@@ -704,7 +704,7 @@ dmcxint(void *a)
/* ACCUMULATE STATISTICS */
switch(arg) {
case DMC_NOBUFS:
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
if ((sc->sc_nobuf++ % DMC_RPNBFS) == 0)
goto report;
break;
@@ -717,7 +717,7 @@ dmcxint(void *a)
goto report;
break;
case DMC_DATACK:
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
if ((sc->sc_datck++ % DMC_RPDCK) == 0)
goto report;
break;