aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hysdn
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/isdn/hysdn
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/isdn/hysdn')
-rw-r--r--drivers/isdn/hysdn/hycapi.c2
-rw-r--r--drivers/isdn/hysdn/hysdn_sched.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/isdn/hysdn/hycapi.c b/drivers/isdn/hysdn/hycapi.c
index b2ae4ec1e49e..4433ce0fca55 100644
--- a/drivers/isdn/hysdn/hycapi.c
+++ b/drivers/isdn/hysdn/hycapi.c
@@ -398,7 +398,7 @@ static u16 hycapi_send_message(struct capi_ctr *ctrl, struct sk_buff *skb)
398 _len = CAPIMSG_LEN(skb->data); 398 _len = CAPIMSG_LEN(skb->data);
399 if (_len > 22) { 399 if (_len > 22) {
400 _len2 = _len - 22; 400 _len2 = _len - 22;
401 memcpy(msghead, skb->data, 22); 401 skb_copy_from_linear_data(skb, msghead, 22);
402 memcpy(skb->data + _len2, msghead, 22); 402 memcpy(skb->data + _len2, msghead, 22);
403 skb_pull(skb, _len2); 403 skb_pull(skb, _len2);
404 CAPIMSG_SETLEN(skb->data, 22); 404 CAPIMSG_SETLEN(skb->data, 22);
diff --git a/drivers/isdn/hysdn/hysdn_sched.c b/drivers/isdn/hysdn/hysdn_sched.c
index b7b5aa4748a0..81db4a190d41 100644
--- a/drivers/isdn/hysdn/hysdn_sched.c
+++ b/drivers/isdn/hysdn/hysdn_sched.c
@@ -113,7 +113,8 @@ hysdn_sched_tx(hysdn_card *card, unsigned char *buf,
113 (skb = hysdn_tx_netget(card)) != NULL) 113 (skb = hysdn_tx_netget(card)) != NULL)
114 { 114 {
115 if (skb->len <= maxlen) { 115 if (skb->len <= maxlen) {
116 memcpy(buf, skb->data, skb->len); /* copy the packet to the buffer */ 116 /* copy the packet to the buffer */
117 skb_copy_from_linear_data(skb, buf, skb->len);
117 *len = skb->len; 118 *len = skb->len;
118 *chan = CHAN_NDIS_DATA; 119 *chan = CHAN_NDIS_DATA;
119 card->net_tx_busy = 1; /* we are busy sending network data */ 120 card->net_tx_busy = 1; /* we are busy sending network data */
@@ -126,7 +127,7 @@ hysdn_sched_tx(hysdn_card *card, unsigned char *buf,
126 ((skb = hycapi_tx_capiget(card)) != NULL) ) 127 ((skb = hycapi_tx_capiget(card)) != NULL) )
127 { 128 {
128 if (skb->len <= maxlen) { 129 if (skb->len <= maxlen) {
129 memcpy(buf, skb->data, skb->len); 130 skb_copy_from_linear_data(skb, buf, skb->len);
130 *len = skb->len; 131 *len = skb->len;
131 *chan = CHAN_CAPI; 132 *chan = CHAN_CAPI;
132 hycapi_tx_capiack(card); 133 hycapi_tx_capiack(card);