From 806b3dee8c8046ba1f3162b9ff9768e1c7ed25a1 Mon Sep 17 00:00:00 2001 From: msaitoh Date: Mon, 21 Oct 2019 08:00:58 +0000 Subject: [PATCH] if_ipackets is incremented in can_input(), so don't increment it in sunxi_can_rx_intr to prevent double count. OK'd by bouyer@. --- sys/arch/arm/sunxi/sunxi_can.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/arch/arm/sunxi/sunxi_can.c b/sys/arch/arm/sunxi/sunxi_can.c index 8120bc746106..95e08cadea46 100644 --- a/sys/arch/arm/sunxi/sunxi_can.c +++ b/sys/arch/arm/sunxi/sunxi_can.c @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_can.c,v 1.1 2018/03/07 20:55:31 bouyer Exp $ */ +/* $NetBSD: sunxi_can.c,v 1.2 2019/10/21 08:00:58 msaitoh Exp $ */ /*- * Copyright (c) 2017,2018 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: sunxi_can.c,v 1.1 2018/03/07 20:55:31 bouyer Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sunxi_can.c,v 1.2 2019/10/21 08:00:58 msaitoh Exp $"); #include #include @@ -292,7 +292,6 @@ sunxi_can_rx_intr(struct sunxi_can_softc *sc) } sunxi_can_write(sc, SUNXI_CAN_CMD_REG, SUNXI_CAN_CMD_REL_RX_BUF); m->m_len = m->m_pkthdr.len = CAN_MTU; - ifp->if_ipackets++; ifp->if_ibytes += m->m_len; m_set_rcvif(m, ifp); can_bpf_mtap(ifp, m, 1);