Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57097
b: refs/heads/master
c: d7ea3be
h: refs/heads/master
i:
  57095: 29472e7
v: v3
  • Loading branch information
Brandon Craig Rhodes authored and John W. Linville committed May 29, 2007
1 parent b8d5926 commit 2ccd5e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ef7ab2357ba09e8a795018640a87e93dfa043360
refs/heads/master: d7ea3be56adc95b17351221fd95e78115f3b01f4
13 changes: 8 additions & 5 deletions trunk/drivers/net/wireless/hostap/hostap_80211_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit 2ccd5e5

Please sign in to comment.