aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee80211
diff options
context:
space:
mode:
Diffstat (limited to 'net/ieee80211')
-rw-r--r--net/ieee80211/ieee80211_tx.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/ieee80211/ieee80211_tx.c b/net/ieee80211/ieee80211_tx.c
index f4f2a33973a7..fb4509032402 100644
--- a/net/ieee80211/ieee80211_tx.c
+++ b/net/ieee80211/ieee80211_tx.c
@@ -190,7 +190,7 @@ void ieee80211_txb_free(struct ieee80211_txb *txb)
190} 190}
191 191
192static struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size, 192static struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
193 gfp_t gfp_mask) 193 int headroom, gfp_t gfp_mask)
194{ 194{
195 struct ieee80211_txb *txb; 195 struct ieee80211_txb *txb;
196 int i; 196 int i;
@@ -204,11 +204,13 @@ static struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
204 txb->frag_size = txb_size; 204 txb->frag_size = txb_size;
205 205
206 for (i = 0; i < nr_frags; i++) { 206 for (i = 0; i < nr_frags; i++) {
207 txb->fragments[i] = dev_alloc_skb(txb_size); 207 txb->fragments[i] = __dev_alloc_skb(txb_size + headroom,
208 gfp_mask);
208 if (unlikely(!txb->fragments[i])) { 209 if (unlikely(!txb->fragments[i])) {
209 i--; 210 i--;
210 break; 211 break;
211 } 212 }
213 skb_reserve(txb->fragments[i], headroom);
212 } 214 }
213 if (unlikely(i != nr_frags)) { 215 if (unlikely(i != nr_frags)) {
214 while (i >= 0) 216 while (i >= 0)
@@ -384,7 +386,8 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
384 /* When we allocate the TXB we allocate enough space for the reserve 386 /* When we allocate the TXB we allocate enough space for the reserve
385 * and full fragment bytes (bytes_per_frag doesn't include prefix, 387 * and full fragment bytes (bytes_per_frag doesn't include prefix,
386 * postfix, header, FCS, etc.) */ 388 * postfix, header, FCS, etc.) */
387 txb = ieee80211_alloc_txb(nr_frags, frag_size, GFP_ATOMIC); 389 txb = ieee80211_alloc_txb(nr_frags, frag_size,
390 ieee->tx_headroom, GFP_ATOMIC);
388 if (unlikely(!txb)) { 391 if (unlikely(!txb)) {
389 printk(KERN_WARNING "%s: Could not allocate TXB\n", 392 printk(KERN_WARNING "%s: Could not allocate TXB\n",
390 ieee->dev->name); 393 ieee->dev->name);