summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-05-06 10:07:49 -0700
committerDavid S. Miller <davem@davemloft.net>2022-05-08 11:33:57 +0100
commit8ded532cd1cbe48461821c605dbad9447555755a (patch)
treeddbbbf8c33cb0359965ee4b79898da9ee976e880 /drivers/net/usb
parentb707b89f7be36147187ebc52d91c085040c26de9 (diff)
downloadlinux-8ded532cd1cbe48461821c605dbad9447555755a.tar.bz2
r8152: switch to netif_napi_add_weight()
r8152 uses a custom napi weight, switch to the new API for setting custom weight. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/r8152.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index d3b53db57c26..c2da3438387c 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -9732,10 +9732,8 @@ static int rtl8152_probe(struct usb_interface *intf,
usb_set_intfdata(intf, tp);
- if (tp->support_2500full)
- netif_napi_add(netdev, &tp->napi, r8152_poll, 256);
- else
- netif_napi_add(netdev, &tp->napi, r8152_poll, 64);
+ netif_napi_add_weight(netdev, &tp->napi, r8152_poll,
+ tp->support_2500full ? 256 : 64);
ret = register_netdev(netdev);
if (ret != 0) {