You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
netdev: ethernet dev_alloc_skb to netdev_alloc_skb
Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet - Removed extra skb->dev = dev after netdev_alloc_skb Signed-off-by: Pradeep A Dalvi <netdev@pradeepdalvi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
1d26643054
commit
21a4e46995
@@ -1070,14 +1070,13 @@ static void allocate_rx_buffers(struct net_device *dev)
|
||||
while (np->really_rx_count != RX_RING_SIZE) {
|
||||
struct sk_buff *skb;
|
||||
|
||||
skb = dev_alloc_skb(np->rx_buf_sz);
|
||||
skb = netdev_alloc_skb(dev, np->rx_buf_sz);
|
||||
if (skb == NULL)
|
||||
break; /* Better luck next round. */
|
||||
|
||||
while (np->lack_rxbuf->skbuff)
|
||||
np->lack_rxbuf = np->lack_rxbuf->next_desc_logical;
|
||||
|
||||
skb->dev = dev; /* Mark as being used by this device. */
|
||||
np->lack_rxbuf->skbuff = skb;
|
||||
np->lack_rxbuf->buffer = pci_map_single(np->pci_dev, skb->data,
|
||||
np->rx_buf_sz, PCI_DMA_FROMDEVICE);
|
||||
@@ -1265,7 +1264,7 @@ static void init_ring(struct net_device *dev)
|
||||
|
||||
/* allocate skb for rx buffers */
|
||||
for (i = 0; i < RX_RING_SIZE; i++) {
|
||||
struct sk_buff *skb = dev_alloc_skb(np->rx_buf_sz);
|
||||
struct sk_buff *skb = netdev_alloc_skb(dev, np->rx_buf_sz);
|
||||
|
||||
if (skb == NULL) {
|
||||
np->lack_rxbuf = &np->rx_ring[i];
|
||||
@@ -1274,7 +1273,6 @@ static void init_ring(struct net_device *dev)
|
||||
|
||||
++np->really_rx_count;
|
||||
np->rx_ring[i].skbuff = skb;
|
||||
skb->dev = dev; /* Mark as being used by this device. */
|
||||
np->rx_ring[i].buffer = pci_map_single(np->pci_dev, skb->data,
|
||||
np->rx_buf_sz, PCI_DMA_FROMDEVICE);
|
||||
np->rx_ring[i].status = RXOWN;
|
||||
@@ -1704,7 +1702,7 @@ static int netdev_rx(struct net_device *dev)
|
||||
/* Check if the packet is long enough to accept without copying
|
||||
to a minimally-sized skbuff. */
|
||||
if (pkt_len < rx_copybreak &&
|
||||
(skb = dev_alloc_skb(pkt_len + 2)) != NULL) {
|
||||
(skb = netdev_alloc_skb(dev, pkt_len + 2)) != NULL) {
|
||||
skb_reserve(skb, 2); /* 16 byte align the IP header */
|
||||
pci_dma_sync_single_for_cpu(np->pci_dev,
|
||||
np->cur_rx->buffer,
|
||||
|
||||
Reference in New Issue
Block a user