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/isdn/hysdn/hysdn_sched.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/isdn/hysdn/hysdn_sched.c')
-rw-r--r-- | drivers/isdn/hysdn/hysdn_sched.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); |