diff options
Diffstat (limited to 'drivers/net/cxgb3/sge.c')
-rw-r--r-- | drivers/net/cxgb3/sge.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index 166c959c94b9..3666586a4831 100644 --- a/drivers/net/cxgb3/sge.c +++ b/drivers/net/cxgb3/sge.c | |||
@@ -661,7 +661,7 @@ static inline struct sk_buff *get_imm_packet(const struct rsp_desc *resp) | |||
661 | 661 | ||
662 | if (skb) { | 662 | if (skb) { |
663 | __skb_put(skb, IMMED_PKT_SIZE); | 663 | __skb_put(skb, IMMED_PKT_SIZE); |
664 | memcpy(skb->data, resp->imm_data, IMMED_PKT_SIZE); | 664 | skb_copy_to_linear_data(skb, resp->imm_data, IMMED_PKT_SIZE); |
665 | } | 665 | } |
666 | return skb; | 666 | return skb; |
667 | } | 667 | } |
@@ -1722,11 +1722,11 @@ static void skb_data_init(struct sk_buff *skb, struct sge_fl_page *p, | |||
1722 | { | 1722 | { |
1723 | skb->len = len; | 1723 | skb->len = len; |
1724 | if (len <= SKB_DATA_SIZE) { | 1724 | if (len <= SKB_DATA_SIZE) { |
1725 | memcpy(skb->data, p->va, len); | 1725 | skb_copy_to_linear_data(skb, p->va, len); |
1726 | skb->tail += len; | 1726 | skb->tail += len; |
1727 | put_page(p->frag.page); | 1727 | put_page(p->frag.page); |
1728 | } else { | 1728 | } else { |
1729 | memcpy(skb->data, p->va, SKB_DATA_SIZE); | 1729 | skb_copy_to_linear_data(skb, p->va, SKB_DATA_SIZE); |
1730 | skb_shinfo(skb)->frags[0].page = p->frag.page; | 1730 | skb_shinfo(skb)->frags[0].page = p->frag.page; |
1731 | skb_shinfo(skb)->frags[0].page_offset = | 1731 | skb_shinfo(skb)->frags[0].page_offset = |
1732 | p->frag.page_offset + SKB_DATA_SIZE; | 1732 | p->frag.page_offset + SKB_DATA_SIZE; |