aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-27 17:55:52 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:28:23 -0400
commitd626f62b11e00c16e81e4308ab93d3f13551812a (patch)
treefac4af6ced853755e12fc709d55f0c2bec51265d /drivers/net/hamradio
parent2a123b86e2b242a4a6db990d2851d45e192f88e5 (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/hamradio')
-rw-r--r--drivers/net/hamradio/dmascc.c2
-rw-r--r--drivers/net/hamradio/hdlcdrv.c4
-rw-r--r--drivers/net/hamradio/yam.c4
3 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c
index 0fbb414b5a4d..3be8c5047599 100644
--- a/drivers/net/hamradio/dmascc.c
+++ b/drivers/net/hamradio/dmascc.c
@@ -930,7 +930,7 @@ static int scc_send_packet(struct sk_buff *skb, struct net_device *dev)
930 930
931 /* Transfer data to DMA buffer */ 931 /* Transfer data to DMA buffer */
932 i = priv->tx_head; 932 i = priv->tx_head;
933 memcpy(priv->tx_buf[i], skb->data + 1, skb->len - 1); 933 skb_copy_from_linear_data_offset(skb, 1, priv->tx_buf[i], skb->len - 1);
934 priv->tx_len[i] = skb->len - 1; 934 priv->tx_len[i] = skb->len - 1;
935 935
936 /* Clear interrupts while we touch our circular buffers */ 936 /* Clear interrupts while we touch our circular buffers */
diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c
index f5a17ad9d3d6..b33adc6a340b 100644
--- a/drivers/net/hamradio/hdlcdrv.c
+++ b/drivers/net/hamradio/hdlcdrv.c
@@ -317,7 +317,9 @@ void hdlcdrv_transmitter(struct net_device *dev, struct hdlcdrv_state *s)
317 dev_kfree_skb_irq(skb); 317 dev_kfree_skb_irq(skb);
318 break; 318 break;
319 } 319 }
320 memcpy(s->hdlctx.buffer, skb->data+1, pkt_len); 320 skb_copy_from_linear_data_offset(skb, 1,
321 s->hdlctx.buffer,
322 pkt_len);
321 dev_kfree_skb_irq(skb); 323 dev_kfree_skb_irq(skb);
322 s->hdlctx.bp = s->hdlctx.buffer; 324 s->hdlctx.bp = s->hdlctx.buffer;
323 append_crc_ccitt(s->hdlctx.buffer, pkt_len); 325 append_crc_ccitt(s->hdlctx.buffer, pkt_len);
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index ee3ea4fa729f..ac2d6dd9dbe4 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -638,7 +638,9 @@ static void yam_tx_byte(struct net_device *dev, struct yam_port *yp)
638 dev_kfree_skb_any(skb); 638 dev_kfree_skb_any(skb);
639 break; 639 break;
640 } 640 }
641 memcpy(yp->tx_buf, skb->data + 1, yp->tx_len); 641 skb_copy_from_linear_data_offset(skb->data, 1,
642 yp->tx_buf,
643 yp->tx_len);
642 dev_kfree_skb_any(skb); 644 dev_kfree_skb_any(skb);
643 yp->tx_count = 0; 645 yp->tx_count = 0;
644 yp->tx_crcl = 0x21; 646 yp->tx_crcl = 0x21;