diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-05-30 13:46:14 (GMT) |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-05-30 13:46:14 (GMT) |
commit | 8903bab009d3e9b34050042f8c0faf741eb027be (patch) | |
tree | 1e1df689c95e3eafda6fac8d5503cf9b8caac8bc /drivers/net/wireless/hostap/hostap_80211_tx.c | |
parent | 7f397dcdb78d699a20d96bfcfb595a2411a5bbd2 (diff) | |
parent | d7ea3be56adc95b17351221fd95e78115f3b01f4 (diff) | |
download | linux-fsl-qoriq-8903bab009d3e9b34050042f8c0faf741eb027be.tar.xz |
Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_80211_tx.c')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_80211_tx.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/wireless/hostap/hostap_80211_tx.c b/drivers/net/wireless/hostap/hostap_80211_tx.c index 246fac0..3df3c60 100644 --- a/drivers/net/wireless/hostap/hostap_80211_tx.c +++ b/drivers/net/wireless/hostap/hostap_80211_tx.c @@ -311,7 +311,7 @@ static struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb, local_info_t *local; struct ieee80211_hdr_4addr *hdr; u16 fc; - int hdr_len, res; + int prefix_len, postfix_len, hdr_len, res; iface = netdev_priv(skb->dev); local = iface->local; @@ -337,10 +337,13 @@ static struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb, if (skb == NULL) return NULL; - if ((skb_headroom(skb) < crypt->ops->extra_mpdu_prefix_len || - skb_tailroom(skb) < crypt->ops->extra_mpdu_postfix_len) && - pskb_expand_head(skb, crypt->ops->extra_mpdu_prefix_len, - crypt->ops->extra_mpdu_postfix_len, GFP_ATOMIC)) { + prefix_len = crypt->ops->extra_mpdu_prefix_len + + crypt->ops->extra_msdu_prefix_len; + postfix_len = crypt->ops->extra_mpdu_postfix_len + + crypt->ops->extra_msdu_postfix_len; + if ((skb_headroom(skb) < prefix_len || + skb_tailroom(skb) < postfix_len) && + pskb_expand_head(skb, prefix_len, postfix_len, GFP_ATOMIC)) { kfree_skb(skb); return NULL; } |