net: ethernet: mtk_eth_soc: rework NAPI callbacks
authorIlya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Fri, 23 Apr 2021 05:21:06 +0000 (22:21 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Apr 2021 20:31:58 +0000 (13:31 -0700)
commitdb2c7b353db3b3f71b55f9ff4627d8a786446fbe
tree18bfdaa7267e3e0016fa12737121557e22b41e02
parent16769a8923fad5a5377253bcd76b0e0d64976c73
net: ethernet: mtk_eth_soc: rework NAPI callbacks

Use napi_complete_done to communicate total TX and RX work done to NAPI.
Count total RX work up instead of remaining work down for clarity.
Remove unneeded local variables for clarity. Use do {} while instead of
goto for clarity.

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.c