diff mbox series

[net] net: broadcom: bcm4908_enet: fix NAPI poll returned value

Message ID 20210224151842.2419-2-zajec5@gmail.com
State New
Headers show
Series [net] net: broadcom: bcm4908_enet: fix NAPI poll returned value | expand

Commit Message

Rafał Miłecki Feb. 24, 2021, 3:18 p.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

Missing increment was resulting in poll function always returning 0
instead of amount of processed packets.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 drivers/net/ethernet/broadcom/bcm4908_enet.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jakub Kicinski Feb. 25, 2021, 5:48 p.m. UTC | #1
On Wed, 24 Feb 2021 09:06:18 -0800 Florian Fainelli wrote:
> On 2/24/2021 7:18 AM, Rafał Miłecki wrote:
> > From: Rafał Miłecki <rafal@milecki.pl>
> > 
> > Missing increment was resulting in poll function always returning 0
> > instead of amount of processed packets.
> > 
> > Signed-off-by: Rafał Miłecki <rafal@milecki.pl>  
> 
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> Fixes: 4feffeadbcb2 ("net: broadcom: bcm4908enet: add BCM4908 controller
> driver")

Applied, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/broadcom/bcm4908_enet.c b/drivers/net/ethernet/broadcom/bcm4908_enet.c
index 7983c7a9fca9..0b70e9e0ddad 100644
--- a/drivers/net/ethernet/broadcom/bcm4908_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c
@@ -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) {