diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2017-01-22 10:17:40 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2017-01-22 10:17:40 +0000 |
commit | f6129f414cbe94169beb11dd59307556f48ba33a (patch) | |
tree | e5c7e9e39df56a638f353df59c91293716e91790 /sys/dev/pcmcia | |
parent | dc8502d359a9b47a4fc9b0ee84cfd6ce8b1cd350 (diff) |
move counting if_opackets next to counting if_obytes in if_enqueue.
this means packets are consistently counted in one place, unlike the
many and various ways that drivers thought they should do it.
ok mpi@ deraadt@
Diffstat (limited to 'sys/dev/pcmcia')
-rw-r--r-- | sys/dev/pcmcia/if_malo.c | 3 | ||||
-rw-r--r-- | sys/dev/pcmcia/if_xe.c | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/pcmcia/if_malo.c b/sys/dev/pcmcia/if_malo.c index ea72b077022..12c9f9f23a2 100644 --- a/sys/dev/pcmcia/if_malo.c +++ b/sys/dev/pcmcia/if_malo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_malo.c,v 1.91 2016/04/13 10:49:26 mpi Exp $ */ +/* $OpenBSD: if_malo.c,v 1.92 2017/01/22 10:17:39 dlg Exp $ */ /* * Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org> @@ -1066,7 +1066,6 @@ cmalo_tx_done(struct malo_softc *sc) DPRINTF(2, "%s: TX done\n", sc->sc_dev.dv_xname); - ifp->if_opackets++; ifq_clr_oactive(&ifp->if_snd); ifp->if_timer = 0; cmalo_start(ifp); diff --git a/sys/dev/pcmcia/if_xe.c b/sys/dev/pcmcia/if_xe.c index 26fe80adcbe..eda8f9324e1 100644 --- a/sys/dev/pcmcia/if_xe.c +++ b/sys/dev/pcmcia/if_xe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xe.c,v 1.58 2016/04/13 10:49:26 mpi Exp $ */ +/* $OpenBSD: if_xe.c,v 1.59 2017/01/22 10:17:39 dlg Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist, Brandon Creighton, Job de Haas @@ -722,7 +722,7 @@ xe_intr(arg) xe_start(ifp); /* Detected excessive collisions? */ - if ((tx_status & EXCESSIVE_COLL) && ifp->if_opackets > 0) { + if (tx_status & EXCESSIVE_COLL) { DPRINTF(XED_INTR, ("%s: excessive collisions\n", sc->sc_dev.dv_xname)); bus_space_write_1(sc->sc_bst, sc->sc_bsh, sc->sc_offset + CR, @@ -730,7 +730,7 @@ xe_intr(arg) ifp->if_oerrors++; } - if ((tx_status & TX_ABORT) && ifp->if_opackets > 0) + if (tx_status & TX_ABORT) ifp->if_oerrors++; end: @@ -1149,7 +1149,6 @@ xe_start(ifp) splx(s); ifp->if_timer = 5; - ++ifp->if_opackets; } int |