]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: broadcom: bcm4908_enet: fix NAPI poll returned value
authorRafał Miłecki <rafal@milecki.pl>
Wed, 24 Feb 2021 15:18:42 +0000 (16:18 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 25 Feb 2021 17:46:39 +0000 (09:46 -0800)
Missing increment was resulting in poll function always returning 0
instead of amount of processed packets.

Fixes: 4feffeadbcb2 ("net: broadcom: bcm4908enet: add BCM4908 controller driver")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20210224151842.2419-2-zajec5@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bcm4908_enet.c

index 7983c7a9fca95fe8cc0518f4819d7352768ad09d..0b70e9e0ddad559d5d3c127682f1381ab94bf503 100644 (file)
@@ -583,6 +583,8 @@ static int bcm4908_enet_poll(struct napi_struct *napi, int weight)
 
                enet->netdev->stats.rx_packets++;
                enet->netdev->stats.rx_bytes += len;
+
+               handled++;
        }
 
        if (handled < weight) {