diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-02-07 17:04:23 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-02-07 17:04:23 +1100 |
commit | 89fa7d4989785694ba720133c0fd3d7485cd059a (patch) | |
tree | ef062d89ed62defaed0856e9e0dff6e130b54aff /net/mac80211/tx.c | |
parent | e61c0ad53a8281dca1f392a7654e9b1f2210cb91 (diff) | |
parent | f66cce24892aa254a556516339c8307a1a6fd165 (diff) |
Merge branch 'akpm/master'
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index a2cb6a302cc7..5a62468e634d 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1999,24 +1999,14 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, skb = skb_clone(skb, GFP_ATOMIC); if (skb) { unsigned long flags; - int id, r; + int id; spin_lock_irqsave(&local->ack_status_lock, flags); - r = idr_get_new_above(&local->ack_status_frames, - orig_skb, 1, &id); - if (r == -EAGAIN) { - idr_pre_get(&local->ack_status_frames, - GFP_ATOMIC); - r = idr_get_new_above(&local->ack_status_frames, - orig_skb, 1, &id); - } - if (WARN_ON(!id) || id > 0xffff) { - idr_remove(&local->ack_status_frames, id); - r = -ERANGE; - } + id = idr_alloc(&local->ack_status_frames, orig_skb, + 1, 0x10000, GFP_ATOMIC); spin_unlock_irqrestore(&local->ack_status_lock, flags); - if (!r) { + if (id >= 0) { info_id = id; info_flags |= IEEE80211_TX_CTL_REQ_TX_STATUS; } else if (skb_shared(skb)) { |