diff mbox series

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

Message ID 20210224151842.2419-2-zajec5@gmail.com (mailing list archive)
State Accepted
Delegated to: Netdev Maintainers
Headers show
Series [net] net: broadcom: bcm4908_enet: fix NAPI poll returned value | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present fail Series targets non-next tree, but doesn't contain any Fixes tags
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net
netdev/subject_prefix success Link
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

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

Florian Fainelli Feb. 24, 2021, 5:06 p.m. UTC | #1
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")
Jakub Kicinski Feb. 25, 2021, 5:48 p.m. UTC | #2
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) {