Commit d14cc9a3 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by David S. Miller

[TG3]: skb->dev assignment is done by netdev_alloc_skb

All caller of netdev_alloc_skb need to assign skb->dev shortly
afterwards.  Move it into common code.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7b2e497a
...@@ -3101,7 +3101,6 @@ static int tg3_alloc_rx_skb(struct tg3 *tp, u32 opaque_key, ...@@ -3101,7 +3101,6 @@ static int tg3_alloc_rx_skb(struct tg3 *tp, u32 opaque_key,
if (skb == NULL) if (skb == NULL)
return -ENOMEM; return -ENOMEM;
skb->dev = tp->dev;
skb_reserve(skb, tp->rx_offset); skb_reserve(skb, tp->rx_offset);
mapping = pci_map_single(tp->pdev, skb->data, mapping = pci_map_single(tp->pdev, skb->data,
...@@ -3274,7 +3273,6 @@ static int tg3_rx(struct tg3 *tp, int budget) ...@@ -3274,7 +3273,6 @@ static int tg3_rx(struct tg3 *tp, int budget)
if (copy_skb == NULL) if (copy_skb == NULL)
goto drop_it_no_recycle; goto drop_it_no_recycle;
copy_skb->dev = tp->dev;
skb_reserve(copy_skb, 2); skb_reserve(copy_skb, 2);
skb_put(copy_skb, len); skb_put(copy_skb, len);
pci_dma_sync_single_for_cpu(tp->pdev, dma_addr, len, PCI_DMA_FROMDEVICE); pci_dma_sync_single_for_cpu(tp->pdev, dma_addr, len, PCI_DMA_FROMDEVICE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment