projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[powerpc.git]
/
net
/
ieee80211
/
ieee80211_tx.c
diff --git
a/net/ieee80211/ieee80211_tx.c
b/net/ieee80211/ieee80211_tx.c
index
854fc13
..
a4c3c51
100644
(file)
--- a/
net/ieee80211/ieee80211_tx.c
+++ b/
net/ieee80211/ieee80211_tx.c
@@
-54,7
+54,7
@@
Desc. | ctrl | dura | DA/RA | TA | SA | Sequ | Frame | fcs |
| | tion | (BSSID) | | | ence | data | |
`--------------------------------------------------| |------'
Total: 28 non-data bytes `----.----'
| | tion | (BSSID) | | | ence | data | |
`--------------------------------------------------| |------'
Total: 28 non-data bytes `----.----'
-
|
+ |
.- 'Frame data' expands, if WEP enabled, to <----------'
|
V
.- 'Frame data' expands, if WEP enabled, to <----------'
|
V
@@
-64,8
+64,8
@@
Bytes | 4 | 0-2296 | 4 |
Desc. | IV | Encrypted | ICV |
| | Packet | |
`-----| |-----'
Desc. | IV | Encrypted | ICV |
| | Packet | |
`-----| |-----'
-
`-----.-----'
-
|
+ `-----.-----'
+ |
.- 'Encrypted Packet' expands to
|
V
.- 'Encrypted Packet' expands to
|
V
@@
-225,10
+225,10
@@
static int ieee80211_classify(struct sk_buff *skb)
struct iphdr *ip;
eth = (struct ethhdr *)skb->data;
struct iphdr *ip;
eth = (struct ethhdr *)skb->data;
- if (eth->h_proto !=
__constant_
htons(ETH_P_IP))
+ if (eth->h_proto != htons(ETH_P_IP))
return 0;
return 0;
- ip =
skb->nh.iph
;
+ ip =
ip_hdr(skb)
;
switch (ip->tos & 0xfc) {
case 0x20:
return 2;
switch (ip->tos & 0xfc) {
case 0x20:
return 2;
@@
-309,8
+309,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(src, skb->data + ETH_ALEN
, ETH_ALEN);
+
skb_copy_from_linear_data(skb, dest
, ETH_ALEN);
+
skb_copy_from_linear_data_offset(skb, ETH_ALEN, src
, ETH_ALEN);
if (host_encrypt || host_build_iv)
fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA |
if (host_encrypt || host_build_iv)
fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA |
@@
-363,7
+363,7
@@
int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
snapped = 1;
ieee80211_copy_snap(skb_put(skb_new, SNAP_SIZE + sizeof(u16)),
ether_type);
snapped = 1;
ieee80211_copy_snap(skb_put(skb_new, SNAP_SIZE + sizeof(u16)),
ether_type);
-
memcpy(skb_put(skb_new, skb->len), skb->data
, skb->len);
+
skb_copy_from_linear_data(skb, skb_put(skb_new, skb->len)
, skb->len);
res = crypt->ops->encrypt_msdu(skb_new, hdr_len, crypt->priv);
if (res < 0) {
IEEE80211_ERROR("msdu encryption failed\n");
res = crypt->ops->encrypt_msdu(skb_new, hdr_len, crypt->priv);
if (res < 0) {
IEEE80211_ERROR("msdu encryption failed\n");
@@
-492,7
+492,7
@@
int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
bytes -= SNAP_SIZE + sizeof(u16);
}
bytes -= SNAP_SIZE + sizeof(u16);
}
-
memcpy(skb_put(skb_frag, bytes), skb->data
, bytes);
+
skb_copy_from_linear_data(skb, skb_put(skb_frag, bytes)
, bytes);
/* Advance the SKB... */
skb_pull(skb, bytes);
/* Advance the SKB... */
skb_pull(skb, bytes);
@@
-502,9
+502,6
@@
int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
if (host_encrypt)
ieee80211_encrypt_fragment(ieee, skb_frag, hdr_len);
else if (host_build_iv) {
if (host_encrypt)
ieee80211_encrypt_fragment(ieee, skb_frag, hdr_len);
else if (host_build_iv) {
- struct ieee80211_crypt_data *crypt;
-
- crypt = ieee->crypt[ieee->tx_keyidx];
atomic_inc(&crypt->refcnt);
if (crypt->ops->build_iv)
crypt->ops->build_iv(skb_frag, hdr_len,
atomic_inc(&crypt->refcnt);
if (crypt->ops->build_iv)
crypt->ops->build_iv(skb_frag, hdr_len,