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@.
This commit is contained in:
msaitoh 2019-10-21 08:00:58 +00:00
parent a14bf9da9d
commit 806b3dee8c

View File

@ -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 <sys/cdefs.h>
__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 <sys/param.h>
#include <sys/bus.h>
@ -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);