summaryrefslogtreecommitdiff
path: root/sys/arch/armv7
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2017-01-22 10:17:40 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2017-01-22 10:17:40 +0000
commitf6129f414cbe94169beb11dd59307556f48ba33a (patch)
treee5c7e9e39df56a638f353df59c91293716e91790 /sys/arch/armv7
parentdc8502d359a9b47a4fc9b0ee84cfd6ce8b1cd350 (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/arch/armv7')
-rw-r--r--sys/arch/armv7/imx/if_fec.c4
-rw-r--r--sys/arch/armv7/omap/if_cpsw.c4
-rw-r--r--sys/arch/armv7/sunxi/sxie.c6
3 files changed, 3 insertions, 11 deletions
diff --git a/sys/arch/armv7/imx/if_fec.c b/sys/arch/armv7/imx/if_fec.c
index fd2c5484e78..899c1904144 100644
--- a/sys/arch/armv7/imx/if_fec.c
+++ b/sys/arch/armv7/imx/if_fec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fec.c,v 1.19 2016/10/21 22:34:00 jsg Exp $ */
+/* $OpenBSD: if_fec.c,v 1.20 2017/01/22 10:17:37 dlg Exp $ */
/*
* Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
*
@@ -811,8 +811,6 @@ fec_start(struct ifnet *ifp)
ifq_deq_commit(&ifp->if_snd, m_head);
- ifp->if_opackets++;
-
#if NBPFILTER > 0
if (ifp->if_bpf)
bpf_mtap(ifp->if_bpf, m_head, BPF_DIRECTION_OUT);
diff --git a/sys/arch/armv7/omap/if_cpsw.c b/sys/arch/armv7/omap/if_cpsw.c
index 8717b4b21fa..0fb3c9c92b9 100644
--- a/sys/arch/armv7/omap/if_cpsw.c
+++ b/sys/arch/armv7/omap/if_cpsw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_cpsw.c,v 1.41 2016/10/02 23:38:32 jsg Exp $ */
+/* $OpenBSD: if_cpsw.c,v 1.42 2017/01/22 10:17:37 dlg Exp $ */
/* $NetBSD: if_cpsw.c,v 1.3 2013/04/17 14:36:34 bouyer Exp $ */
/*
@@ -1200,8 +1200,6 @@ cpsw_txintr(void *arg)
m_freem(rdp->tx_mb[sc->sc_txhead]);
rdp->tx_mb[sc->sc_txhead] = NULL;
- ifp->if_opackets++;
-
handled = true;
ifq_clr_oactive(&ifp->if_snd);
diff --git a/sys/arch/armv7/sunxi/sxie.c b/sys/arch/armv7/sunxi/sxie.c
index c4bc430d582..1cd713cd52a 100644
--- a/sys/arch/armv7/sunxi/sxie.c
+++ b/sys/arch/armv7/sunxi/sxie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sxie.c,v 1.24 2017/01/21 08:26:49 patrick Exp $ */
+/* $OpenBSD: sxie.c,v 1.25 2017/01/22 10:17:37 dlg Exp $ */
/*
* Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
* Copyright (c) 2013 Artturi Alm
@@ -440,10 +440,6 @@ sxie_intr(void *arg)
if (pending & (SXIE_TX_FIFO0 | SXIE_TX_FIFO1)) {
ifq_clr_oactive(&ifp->if_snd);
- if (pending & SXIE_TX_FIFO0)
- ifp->if_opackets++;
- if (pending & SXIE_TX_FIFO1)
- ifp->if_opackets++;
sc->txf_inuse &= ~pending;
if (sc->txf_inuse == 0)
ifp->if_timer = 0;