提交 5bfc819b 编写于 作者: J James Ketrenos 提交者: Jeff Garzik

[PATCH] ieee80211: Updated hostap to be compatible with extra_prefix_len changes

tree 8c1676c8a15c08e6d4c718fc7cd42d9bf4cd8235
parent 0ccc3dd6469ed492578c184f47dde2baccde3593
author James Ketrenos <jketreno@linux.intel.com> 1126715240 -0500
committer James Ketrenos <jketreno@linux.intel.com> 1127316717 -0500

Updated hostap to be compatible with extra_prefix_len changes.

Accomplished via:

for i in hostap_ap.c hostap_80211_tx.c; do
        sed -i -e "s:\([.>]\)extra_prefix_len:\1extra_mpdu_prefix_len:g" \
                -e "s:\([.>]\)extra_postfix_len:\1extra_mpdu_postfix_len:g" \
                drivers/net/wireless/hostap/$i
done

CC: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: NJames Ketrenos <jketreno@linux.intel.com>
Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
上级 d041674d
...@@ -317,10 +317,10 @@ struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb, ...@@ -317,10 +317,10 @@ struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb,
if (skb == NULL) if (skb == NULL)
return NULL; return NULL;
if ((skb_headroom(skb) < crypt->ops->extra_prefix_len || if ((skb_headroom(skb) < crypt->ops->extra_mpdu_prefix_len ||
skb_tailroom(skb) < crypt->ops->extra_postfix_len) && skb_tailroom(skb) < crypt->ops->extra_mpdu_postfix_len) &&
pskb_expand_head(skb, crypt->ops->extra_prefix_len, pskb_expand_head(skb, crypt->ops->extra_mpdu_prefix_len,
crypt->ops->extra_postfix_len, GFP_ATOMIC)) { crypt->ops->extra_mpdu_postfix_len, GFP_ATOMIC)) {
kfree_skb(skb); kfree_skb(skb);
return NULL; return NULL;
} }
......
...@@ -1256,14 +1256,14 @@ static char * ap_auth_make_challenge(struct ap_data *ap) ...@@ -1256,14 +1256,14 @@ static char * ap_auth_make_challenge(struct ap_data *ap)
} }
skb = dev_alloc_skb(WLAN_AUTH_CHALLENGE_LEN + skb = dev_alloc_skb(WLAN_AUTH_CHALLENGE_LEN +
ap->crypt->extra_prefix_len + ap->crypt->extra_mpdu_prefix_len +
ap->crypt->extra_postfix_len); ap->crypt->extra_mpdu_postfix_len);
if (skb == NULL) { if (skb == NULL) {
kfree(tmpbuf); kfree(tmpbuf);
return NULL; return NULL;
} }
skb_reserve(skb, ap->crypt->extra_prefix_len); skb_reserve(skb, ap->crypt->extra_mpdu_prefix_len);
memset(skb_put(skb, WLAN_AUTH_CHALLENGE_LEN), 0, memset(skb_put(skb, WLAN_AUTH_CHALLENGE_LEN), 0,
WLAN_AUTH_CHALLENGE_LEN); WLAN_AUTH_CHALLENGE_LEN);
if (ap->crypt->encrypt_mpdu(skb, 0, ap->crypt_priv)) { if (ap->crypt->encrypt_mpdu(skb, 0, ap->crypt_priv)) {
...@@ -1272,7 +1272,7 @@ static char * ap_auth_make_challenge(struct ap_data *ap) ...@@ -1272,7 +1272,7 @@ static char * ap_auth_make_challenge(struct ap_data *ap)
return NULL; return NULL;
} }
memcpy(tmpbuf, skb->data + ap->crypt->extra_prefix_len, memcpy(tmpbuf, skb->data + ap->crypt->extra_mpdu_prefix_len,
WLAN_AUTH_CHALLENGE_LEN); WLAN_AUTH_CHALLENGE_LEN);
dev_kfree_skb(skb); dev_kfree_skb(skb);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册