aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/hostap/hostap_80211_rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_80211_rx.c')
-rw-r--r--drivers/net/wireless/hostap/hostap_80211_rx.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c
index 35a3a50724f..cbedc9ee740 100644
--- a/drivers/net/wireless/hostap/hostap_80211_rx.c
+++ b/drivers/net/wireless/hostap/hostap_80211_rx.c
@@ -933,12 +933,14 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
933 if (frag == 0) { 933 if (frag == 0) {
934 /* copy first fragment (including full headers) into 934 /* copy first fragment (including full headers) into
935 * beginning of the fragment cache skb */ 935 * beginning of the fragment cache skb */
936 memcpy(skb_put(frag_skb, flen), skb->data, flen); 936 skb_copy_from_linear_data(skb, skb_put(frag_skb, flen),
937 flen);
937 } else { 938 } else {
938 /* append frame payload to the end of the fragment 939 /* append frame payload to the end of the fragment
939 * cache skb */ 940 * cache skb */
940 memcpy(skb_put(frag_skb, flen), skb->data + hdrlen, 941 skb_copy_from_linear_data_offset(skb, hdrlen,
941 flen); 942 skb_put(frag_skb,
943 flen), flen);
942 } 944 }
943 dev_kfree_skb(skb); 945 dev_kfree_skb(skb);
944 skb = NULL; 946 skb = NULL;
@@ -1044,8 +1046,9 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
1044 skb->len >= ETH_HLEN + ETH_ALEN) { 1046 skb->len >= ETH_HLEN + ETH_ALEN) {
1045 /* Non-standard frame: get addr4 from its bogus location after 1047 /* Non-standard frame: get addr4 from its bogus location after
1046 * the payload */ 1048 * the payload */
1047 memcpy(skb->data + ETH_ALEN, 1049 skb_copy_from_linear_data_offset(skb, skb->len - ETH_ALEN,
1048 skb->data + skb->len - ETH_ALEN, ETH_ALEN); 1050 skb->data + ETH_ALEN,
1051 ETH_ALEN);
1049 skb_trim(skb, skb->len - ETH_ALEN); 1052 skb_trim(skb, skb->len - ETH_ALEN);
1050 } 1053 }
1051 1054