2e742e4484787364d113ff0d3e3ae36ba14a9860
[librecmc/librecmc.git] / package / kernel / mac80211 / patches / 318-mac80211-fix-up-mismerge-of-ieee80211_tx_dequeue.patch
1 From: Bob Copeland <me@bobcopeland.com>
2 Date: Wed, 12 Oct 2016 08:24:54 -0400
3 Subject: [PATCH] mac80211: fix up mismerge of ieee80211_tx_dequeue
4
5 Looks like this spinlock wound up on the wrong side of the
6 linearize, and I also lost the part that re-enters the loop.
7 Fix up to match mac80211-next.
8
9 Signed-off-by: Bob Copeland <me@bobcopeland.com>
10 ---
11
12 --- a/net/mac80211/tx.c
13 +++ b/net/mac80211/tx.c
14 @@ -3457,17 +3457,17 @@ begin:
15                         skb_queue_splice_tail(&tx.skbs, &txqi->frags);
16         }
17  
18 -out:
19 -       spin_unlock_bh(&fq->lock);
20 -
21         if (skb && skb_has_frag_list(skb) &&
22             !ieee80211_hw_check(&local->hw, TX_FRAG_LIST)) {
23                 if (skb_linearize(skb)) {
24                         ieee80211_free_txskb(&local->hw, skb);
25 -                       return NULL;
26 +                       goto begin;
27                 }
28         }
29  
30 +out:
31 +       spin_unlock_bh(&fq->lock);
32 +
33         return skb;
34  }
35  EXPORT_SYMBOL(ieee80211_tx_dequeue);