summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8192e/rtllib_rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/rtl8192e/rtllib_rx.c')
-rw-r--r--drivers/staging/rtl8192e/rtllib_rx.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 0033dc6979e7..7bc9cb131bcc 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -782,7 +782,6 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
u8 nPadding_Length = 0;
u16 SeqNum = 0;
struct sk_buff *sub_skb;
- u8 *data_ptr;
/* just for debug purpose */
SeqNum = WLAN_GET_SEQ_SEQ(le16_to_cpu(hdr->seq_ctl));
if ((RTLLIB_QOS_HAS_SEQ(fc)) &&
@@ -817,8 +816,7 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
if (!sub_skb)
return 0;
skb_reserve(sub_skb, 12);
- data_ptr = (u8 *)skb_put(sub_skb, skb->len);
- memcpy(data_ptr, skb->data, skb->len);
+ skb_put_data(sub_skb, skb->data, skb->len);
sub_skb->dev = ieee->dev;
rxb->subframes[0] = sub_skb;
@@ -870,8 +868,7 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
if (!sub_skb)
return 0;
skb_reserve(sub_skb, 12);
- data_ptr = (u8 *)skb_put(sub_skb, nSubframe_Length);
- memcpy(data_ptr, skb->data, nSubframe_Length);
+ skb_put_data(sub_skb, skb->data, nSubframe_Length);
sub_skb->dev = ieee->dev;
rxb->subframes[rxb->nr_subframes++] = sub_skb;
@@ -1141,13 +1138,12 @@ static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
/* copy first fragment (including full headers) into
* beginning of the fragment cache skb
*/
- memcpy(skb_put(frag_skb, flen), skb->data, flen);
+ skb_put_data(frag_skb, skb->data, flen);
} else {
/* append frame payload to the end of the fragment
* cache skb
*/
- memcpy(skb_put(frag_skb, flen), skb->data + hdrlen,
- flen);
+ skb_put_data(frag_skb, skb->data + hdrlen, flen);
}
dev_kfree_skb_any(skb);
skb = NULL;