summaryrefslogtreecommitdiff
path: root/drivers/isdn/hysdn/hycapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/hysdn/hycapi.c')
-rw-r--r--drivers/isdn/hysdn/hycapi.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/isdn/hysdn/hycapi.c b/drivers/isdn/hysdn/hycapi.c
index 93bae94314a6..87119b517508 100644
--- a/drivers/isdn/hysdn/hycapi.c
+++ b/drivers/isdn/hysdn/hycapi.c
@@ -171,16 +171,16 @@ hycapi_register_internal(struct capi_ctr *ctrl, __u16 appl,
card->myid);
return;
}
- memcpy(skb_put(skb, sizeof(__u16)), &len, sizeof(__u16));
- memcpy(skb_put(skb, sizeof(__u16)), &appl, sizeof(__u16));
+ skb_put_data(skb, &len, sizeof(__u16));
+ skb_put_data(skb, &appl, sizeof(__u16));
memcpy(skb_put(skb, sizeof(__u8)), &_command, sizeof(_command));
memcpy(skb_put(skb, sizeof(__u8)), &_subcommand, sizeof(_subcommand));
- memcpy(skb_put(skb, sizeof(__u16)), &MessageNumber, sizeof(__u16));
- memcpy(skb_put(skb, sizeof(__u16)), &MessageBufferSize, sizeof(__u16));
- memcpy(skb_put(skb, sizeof(__u16)), &(rp->level3cnt), sizeof(__u16));
- memcpy(skb_put(skb, sizeof(__u16)), &(rp->datablkcnt), sizeof(__u16));
- memcpy(skb_put(skb, sizeof(__u16)), &(rp->datablklen), sizeof(__u16));
- memcpy(skb_put(skb, slen), ExtFeatureDefaults, slen);
+ skb_put_data(skb, &MessageNumber, sizeof(__u16));
+ skb_put_data(skb, &MessageBufferSize, sizeof(__u16));
+ skb_put_data(skb, &(rp->level3cnt), sizeof(__u16));
+ skb_put_data(skb, &(rp->datablkcnt), sizeof(__u16));
+ skb_put_data(skb, &(rp->datablklen), sizeof(__u16));
+ skb_put_data(skb, ExtFeatureDefaults, slen);
hycapi_applications[appl - 1].ctrl_mask |= (1 << (ctrl->cnr - 1));
hycapi_send_message(ctrl, skb);
}
@@ -279,11 +279,11 @@ static void hycapi_release_internal(struct capi_ctr *ctrl, __u16 appl)
card->myid);
return;
}
- memcpy(skb_put(skb, sizeof(__u16)), &len, sizeof(__u16));
- memcpy(skb_put(skb, sizeof(__u16)), &appl, sizeof(__u16));
+ skb_put_data(skb, &len, sizeof(__u16));
+ skb_put_data(skb, &appl, sizeof(__u16));
memcpy(skb_put(skb, sizeof(__u8)), &_command, sizeof(_command));
memcpy(skb_put(skb, sizeof(__u8)), &_subcommand, sizeof(_subcommand));
- memcpy(skb_put(skb, sizeof(__u16)), &MessageNumber, sizeof(__u16));
+ skb_put_data(skb, &MessageNumber, sizeof(__u16));
hycapi_send_message(ctrl, skb);
hycapi_applications[appl - 1].ctrl_mask &= ~(1 << (ctrl->cnr - 1));
}
@@ -557,10 +557,9 @@ hycapi_rx_capipkt(hysdn_card *card, unsigned char *buf, unsigned short len)
card->myid);
return;
}
- memcpy(skb_put(skb, MsgLen), buf, MsgLen);
- memcpy(skb_put(skb, 2 * sizeof(__u32)), CP64, 2 * sizeof(__u32));
- memcpy(skb_put(skb, len - MsgLen), buf + MsgLen,
- len - MsgLen);
+ skb_put_data(skb, buf, MsgLen);
+ skb_put_data(skb, CP64, 2 * sizeof(__u32));
+ skb_put_data(skb, buf + MsgLen, len - MsgLen);
CAPIMSG_SETLEN(skb->data, 30);
} else {
if (!(skb = alloc_skb(len, GFP_ATOMIC))) {
@@ -568,7 +567,7 @@ hycapi_rx_capipkt(hysdn_card *card, unsigned char *buf, unsigned short len)
card->myid);
return;
}
- memcpy(skb_put(skb, len), buf, len);
+ skb_put_data(skb, buf, len);
}
switch (CAPIMSG_CMD(skb->data))
{