sun/niu: fix wrong RXMAC_BC_FRM_CNT_COUNT count
authorDenis Efremov <efremov@linux.com>
Fri, 5 Mar 2021 17:02:12 +0000 (20:02 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Mar 2021 12:40:08 +0000 (14:40 +0200)
[ Upstream commit 155b23e6e53475ca3b8c2a946299b4d4dd6a5a1e ]

RXMAC_BC_FRM_CNT_COUNT added to mp->rx_bcasts twice in a row
in niu_xmac_interrupt(). Remove the second addition.

Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/sun/niu.c

index 411a69bea1d44e8717a588366e844cceeccbcbe8..32ab44d00790e2687bde91002456143d6fc57284 100644 (file)
@@ -3948,8 +3948,6 @@ static void niu_xmac_interrupt(struct niu *np)
                mp->rx_mcasts += RXMAC_MC_FRM_CNT_COUNT;
        if (val & XRXMAC_STATUS_RXBCAST_CNT_EXP)
                mp->rx_bcasts += RXMAC_BC_FRM_CNT_COUNT;
-       if (val & XRXMAC_STATUS_RXBCAST_CNT_EXP)
-               mp->rx_bcasts += RXMAC_BC_FRM_CNT_COUNT;
        if (val & XRXMAC_STATUS_RXHIST1_CNT_EXP)
                mp->rx_hist_cnt1 += RXMAC_HIST_CNT1_COUNT;
        if (val & XRXMAC_STATUS_RXHIST2_CNT_EXP)