diff options
Diffstat (limited to 'net/ieee80211/ieee80211_tx.c')
-rw-r--r-- | net/ieee80211/ieee80211_tx.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ieee80211/ieee80211_tx.c b/net/ieee80211/ieee80211_tx.c index 0292d6348e12..a4c3c51140a3 100644 --- a/net/ieee80211/ieee80211_tx.c +++ b/net/ieee80211/ieee80211_tx.c | |||
@@ -225,10 +225,10 @@ static int ieee80211_classify(struct sk_buff *skb) | |||
225 | struct iphdr *ip; | 225 | struct iphdr *ip; |
226 | 226 | ||
227 | eth = (struct ethhdr *)skb->data; | 227 | eth = (struct ethhdr *)skb->data; |
228 | if (eth->h_proto != __constant_htons(ETH_P_IP)) | 228 | if (eth->h_proto != htons(ETH_P_IP)) |
229 | return 0; | 229 | return 0; |
230 | 230 | ||
231 | ip = skb->nh.iph; | 231 | ip = ip_hdr(skb); |
232 | switch (ip->tos & 0xfc) { | 232 | switch (ip->tos & 0xfc) { |
233 | case 0x20: | 233 | case 0x20: |
234 | return 2; | 234 | return 2; |
@@ -309,8 +309,8 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) | |||
309 | } | 309 | } |
310 | 310 | ||
311 | /* Save source and destination addresses */ | 311 | /* Save source and destination addresses */ |
312 | memcpy(dest, skb->data, ETH_ALEN); | 312 | skb_copy_from_linear_data(skb, dest, ETH_ALEN); |
313 | memcpy(src, skb->data + ETH_ALEN, ETH_ALEN); | 313 | skb_copy_from_linear_data_offset(skb, ETH_ALEN, src, ETH_ALEN); |
314 | 314 | ||
315 | if (host_encrypt || host_build_iv) | 315 | if (host_encrypt || host_build_iv) |
316 | fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA | | 316 | fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA | |
@@ -363,7 +363,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) | |||
363 | snapped = 1; | 363 | snapped = 1; |
364 | ieee80211_copy_snap(skb_put(skb_new, SNAP_SIZE + sizeof(u16)), | 364 | ieee80211_copy_snap(skb_put(skb_new, SNAP_SIZE + sizeof(u16)), |
365 | ether_type); | 365 | ether_type); |
366 | memcpy(skb_put(skb_new, skb->len), skb->data, skb->len); | 366 | skb_copy_from_linear_data(skb, skb_put(skb_new, skb->len), skb->len); |
367 | res = crypt->ops->encrypt_msdu(skb_new, hdr_len, crypt->priv); | 367 | res = crypt->ops->encrypt_msdu(skb_new, hdr_len, crypt->priv); |
368 | if (res < 0) { | 368 | if (res < 0) { |
369 | IEEE80211_ERROR("msdu encryption failed\n"); | 369 | IEEE80211_ERROR("msdu encryption failed\n"); |
@@ -492,7 +492,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) | |||
492 | bytes -= SNAP_SIZE + sizeof(u16); | 492 | bytes -= SNAP_SIZE + sizeof(u16); |
493 | } | 493 | } |
494 | 494 | ||
495 | memcpy(skb_put(skb_frag, bytes), skb->data, bytes); | 495 | skb_copy_from_linear_data(skb, skb_put(skb_frag, bytes), bytes); |
496 | 496 | ||
497 | /* Advance the SKB... */ | 497 | /* Advance the SKB... */ |
498 | skb_pull(skb, bytes); | 498 | skb_pull(skb, bytes); |