579f112f71d1e38cac93c49a97e6aa3d52e6ece7
[librecmc/librecmc.git] / package / kernel / mac80211 / patches / 324-mac80211-fix-A-MSDU-aggregation-with-fast-xmit-txq.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Fri, 4 Nov 2016 10:18:51 +0100
3 Subject: [PATCH] mac80211: fix A-MSDU aggregation with fast-xmit + txq
4
5 A-MSDU aggregation alters the QoS header after a frame has been
6 enqueued, so it needs to be ready before enqueue and not overwritten
7 again afterwards
8
9 Fixes: bb42f2d13ffc ("mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue")
10 Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 ---
12
13 --- a/net/mac80211/tx.c
14 +++ b/net/mac80211/tx.c
15 @@ -3245,7 +3245,6 @@ static void ieee80211_xmit_fast_finish(s
16  
17         if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) {
18                 tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
19 -               *ieee80211_get_qos_ctl(hdr) = tid;
20                 hdr->seq_ctrl = ieee80211_tx_next_seq(sta, tid);
21         } else {
22                 info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ;
23 @@ -3370,6 +3369,11 @@ static bool ieee80211_xmit_fast(struct i
24                       (tid_tx ? IEEE80211_TX_CTL_AMPDU : 0);
25         info->control.flags = IEEE80211_TX_CTRL_FAST_XMIT;
26  
27 +       if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) {
28 +               tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
29 +               *ieee80211_get_qos_ctl(hdr) = tid;
30 +       }
31 +
32         __skb_queue_head_init(&tx.skbs);
33  
34         tx.flags = IEEE80211_TX_UNICAST;