Skip to content

Commit

Permalink
[TG3]: skb->dev assignment is done by netdev_alloc_skb
Browse files Browse the repository at this point in the history
All caller of netdev_alloc_skb need to assign skb->dev shortly
afterwards.  Move it into common code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Christoph Hellwig authored and David S. Miller committed Aug 7, 2006
1 parent 7b2e497 commit d14cc9a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -3101,7 +3101,6 @@ static int tg3_alloc_rx_skb(struct tg3 *tp, u32 opaque_key,
if (skb == NULL)
return -ENOMEM;

skb->dev = tp->dev;
skb_reserve(skb, tp->rx_offset);

mapping = pci_map_single(tp->pdev, skb->data,
Expand Down Expand Up @@ -3274,7 +3273,6 @@ static int tg3_rx(struct tg3 *tp, int budget)
if (copy_skb == NULL)
goto drop_it_no_recycle;

copy_skb->dev = tp->dev;
skb_reserve(copy_skb, 2);
skb_put(copy_skb, len);
pci_dma_sync_single_for_cpu(tp->pdev, dma_addr, len, PCI_DMA_FROMDEVICE);
Expand Down

0 comments on commit d14cc9a

Please sign in to comment.