Skip to content

Commit

Permalink
r8152: switch to netif_napi_add_weight()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jakub Kicinski authored and David S. Miller committed May 8, 2022
1 parent b707b89 commit 8ded532
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/usb/r8152.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8ded532

Please sign in to comment.