Commit 18294d87 authored by James Ketrenos's avatar James Ketrenos Committed by Jeff Garzik

[PATCH] ieee80211 Cleanup memcpy parameters.

Cleanup memcpy parameters.
Signed-off-by: default avatarJames Ketrenos <jketreno@linux.intel.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 7b1fa540
...@@ -285,8 +285,8 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -285,8 +285,8 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
} }
/* Save source and destination addresses */ /* Save source and destination addresses */
memcpy(&dest, skb->data, ETH_ALEN); memcpy(dest, skb->data, ETH_ALEN);
memcpy(&src, skb->data + ETH_ALEN, ETH_ALEN); memcpy(src, skb->data + ETH_ALEN, ETH_ALEN);
/* Advance the SKB to the start of the payload */ /* Advance the SKB to the start of the payload */
skb_pull(skb, sizeof(struct ethhdr)); skb_pull(skb, sizeof(struct ethhdr));
...@@ -304,15 +304,15 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -304,15 +304,15 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
fc |= IEEE80211_FCTL_TODS; fc |= IEEE80211_FCTL_TODS;
/* To DS: Addr1 = BSSID, Addr2 = SA, /* To DS: Addr1 = BSSID, Addr2 = SA,
Addr3 = DA */ Addr3 = DA */
memcpy(&header.addr1, ieee->bssid, ETH_ALEN); memcpy(header.addr1, ieee->bssid, ETH_ALEN);
memcpy(&header.addr2, &src, ETH_ALEN); memcpy(header.addr2, src, ETH_ALEN);
memcpy(&header.addr3, &dest, ETH_ALEN); memcpy(header.addr3, dest, ETH_ALEN);
} else if (ieee->iw_mode == IW_MODE_ADHOC) { } else if (ieee->iw_mode == IW_MODE_ADHOC) {
/* not From/To DS: Addr1 = DA, Addr2 = SA, /* not From/To DS: Addr1 = DA, Addr2 = SA,
Addr3 = BSSID */ Addr3 = BSSID */
memcpy(&header.addr1, dest, ETH_ALEN); memcpy(header.addr1, dest, ETH_ALEN);
memcpy(&header.addr2, src, ETH_ALEN); memcpy(header.addr2, src, ETH_ALEN);
memcpy(&header.addr3, ieee->bssid, ETH_ALEN); memcpy(header.addr3, ieee->bssid, ETH_ALEN);
} }
header.frame_ctl = cpu_to_le16(fc); header.frame_ctl = cpu_to_le16(fc);
hdr_len = IEEE80211_3ADDR_LEN; hdr_len = IEEE80211_3ADDR_LEN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment