mac80211: update to version based on 4.19-rc4
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / subsys / 378-mac80211-fix-memory-accounting-with-A-MSDU-aggregati.patch
index c64457a17ffef5571fa61be12f59672cc8c525dd..54bb114f65fc9730b6abe9e4b65b2e91e012e84d 100644 (file)
@@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -3171,6 +3171,7 @@ static bool ieee80211_amsdu_aggregate(st
+@@ -3184,6 +3184,7 @@ static bool ieee80211_amsdu_aggregate(st
        u8 max_subframes = sta->sta.max_amsdu_subframes;
        int max_frags = local->hw.max_tx_fragments;
        int max_amsdu_len = sta->sta.max_amsdu_len;
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        __be16 len;
        void *data;
        bool ret = false;
-@@ -3201,12 +3202,13 @@ static bool ieee80211_amsdu_aggregate(st
+@@ -3215,12 +3216,13 @@ static bool ieee80211_amsdu_aggregate(st
        flow = fq_flow_classify(fq, tin, skb, fq_flow_get_default_func);
        head = skb_peek_tail(&flow->queue);
        if (!head)
@@ -44,11 +44,11 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 -              goto out;
 +              goto unlock;
  
-       if (!ieee80211_amsdu_prepare_head(sdata, fast_tx, head))
-               goto out;
-@@ -3249,6 +3251,9 @@ static bool ieee80211_amsdu_aggregate(st
-       fq_recalc_backlog(fq, tin, flow);
+       nfrags = 1 + skb_shinfo(skb)->nr_frags;
+       nfrags += 1 + skb_shinfo(head)->nr_frags;
+@@ -3278,6 +3280,9 @@ out_recalc:
+               fq_recalc_backlog(fq, tin, flow);
+       }
  out:
 +      fq->memory_usage += head->truesize - orig_truesize;
 +