Skip to content

Commit 2fdac01

Browse files
JuliaLawalldavem330
authored andcommitted
drivers/net/ethernet/via/via-velocity.c: update napi implementation
Drivers supporting NAPI should use a NAPI-specific function for receiving packets. Hence netif_rx is changed to netif_receive_skb. Furthermore netif_napi_del should be used in the probe and remove function to clean up the NAPI resource information. Thanks to Francois Romieu, David Shwatrz and Rami Rosen for their help on this patch. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 728e2cc commit 2fdac01

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ethernet/via/via-velocity.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2100,7 +2100,7 @@ static int velocity_receive_frame(struct velocity_info *vptr, int idx)
21002100

21012101
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
21022102
}
2103-
netif_rx(skb);
2103+
netif_receive_skb(skb);
21042104

21052105
stats->rx_bytes += pkt_len;
21062106
stats->rx_packets++;
@@ -2884,6 +2884,7 @@ static int velocity_probe(struct device *dev, int irq,
28842884
return ret;
28852885

28862886
err_iounmap:
2887+
netif_napi_del(&vptr->napi);
28872888
iounmap(regs);
28882889
err_free_dev:
28892890
free_netdev(netdev);
@@ -2904,6 +2905,7 @@ static int velocity_remove(struct device *dev)
29042905
struct velocity_info *vptr = netdev_priv(netdev);
29052906

29062907
unregister_netdev(netdev);
2908+
netif_napi_del(&vptr->napi);
29072909
iounmap(vptr->mac_regs);
29082910
free_netdev(netdev);
29092911
velocity_nics--;

0 commit comments

Comments
 (0)