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>
This commit is contained in:
Jakub Kicinski 2022-05-06 10:07:49 -07:00 committed by David S. Miller
parent b707b89f7b
commit 8ded532cd1

View File

@ -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) {