diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-27 17:55:52 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:28:23 -0400 |
commit | d626f62b11e00c16e81e4308ab93d3f13551812a (patch) | |
tree | fac4af6ced853755e12fc709d55f0c2bec51265d /drivers/net/tulip/dmfe.c | |
parent | 2a123b86e2b242a4a6db990d2851d45e192f88e5 (diff) |
[SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}
To clearly state the intent of copying from linear sk_buffs, _offset being a
overly long variant but interesting for the sake of saving some bytes.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'drivers/net/tulip/dmfe.c')
-rw-r--r-- | drivers/net/tulip/dmfe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c index a5e0237a6537..b3a64ca98634 100644 --- a/drivers/net/tulip/dmfe.c +++ b/drivers/net/tulip/dmfe.c | |||
@@ -682,7 +682,7 @@ static int dmfe_start_xmit(struct sk_buff *skb, struct DEVICE *dev) | |||
682 | 682 | ||
683 | /* transmit this packet */ | 683 | /* transmit this packet */ |
684 | txptr = db->tx_insert_ptr; | 684 | txptr = db->tx_insert_ptr; |
685 | memcpy(txptr->tx_buf_ptr, skb->data, skb->len); | 685 | skb_copy_from_linear_data(skb, txptr->tx_buf_ptr, skb->len); |
686 | txptr->tdes1 = cpu_to_le32(0xe1000000 | skb->len); | 686 | txptr->tdes1 = cpu_to_le32(0xe1000000 | skb->len); |
687 | 687 | ||
688 | /* Point to next transmit free descriptor */ | 688 | /* Point to next transmit free descriptor */ |
@@ -989,7 +989,9 @@ static void dmfe_rx_packet(struct DEVICE *dev, struct dmfe_board_info * db) | |||
989 | skb = newskb; | 989 | skb = newskb; |
990 | /* size less than COPY_SIZE, allocate a rxlen SKB */ | 990 | /* size less than COPY_SIZE, allocate a rxlen SKB */ |
991 | skb_reserve(skb, 2); /* 16byte align */ | 991 | skb_reserve(skb, 2); /* 16byte align */ |
992 | memcpy(skb_put(skb, rxlen), rxptr->rx_skb_ptr->data, rxlen); | 992 | skb_copy_from_linear_data(rxptr->rx_skb_ptr, |
993 | skb_put(skb, rxlen), | ||
994 | rxlen); | ||
993 | dmfe_reuse_skb(db, rxptr->rx_skb_ptr); | 995 | dmfe_reuse_skb(db, rxptr->rx_skb_ptr); |
994 | } else | 996 | } else |
995 | skb_put(skb, rxlen); | 997 | skb_put(skb, rxlen); |