d4cf84e4b65e997e82899f70968cfb0b17bbdd7e
[openwrt/staging/ynezz.git] /
1 From 4d9274cee40b6a20dd6148c6c81c6733c2678cbc Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Wed, 24 Feb 2021 16:18:42 +0100
4 Subject: [PATCH] net: broadcom: bcm4908_enet: fix NAPI poll returned value
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Missing increment was resulting in poll function always returning 0
10 instead of amount of processed packets.
11
12 Fixes: 4feffeadbcb2 ("net: broadcom: bcm4908enet: add BCM4908 controller driver")
13 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
14 Acked-by: Florian Fainelli <f.fainelli@gmail.com>
15 Link: https://lore.kernel.org/r/20210224151842.2419-2-zajec5@gmail.com
16 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
17 ---
18 drivers/net/ethernet/broadcom/bcm4908_enet.c | 2 ++
19 1 file changed, 2 insertions(+)
20
21 --- a/drivers/net/ethernet/broadcom/bcm4908_enet.c
22 +++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c
23 @@ -583,6 +583,8 @@ static int bcm4908_enet_poll(struct napi
24
25 enet->netdev->stats.rx_packets++;
26 enet->netdev->stats.rx_bytes += len;
27 +
28 + handled++;
29 }
30
31 if (handled < weight) {