summaryrefslogtreecommitdiffstats
path: root/mac80211/patches/a00-900-0013-ath10k-fix-rx-ring-memory-leak.patch
blob: b092bdfd272d595edbe213cdb309a7c8052c57eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -2902,6 +2902,7 @@ int ath10k_core_start(struct ath10k *ar,
 		}
 	}
 
+	ar->htt.rx_ring.ready_to_fill = true;
 	status = ath10k_htt_rx_ring_refill(ar);
 	if (status) {
 		ath10k_err(ar, "failed to refill htt rx ring: %d\n", status);
--- a/drivers/net/wireless/ath/ath10k/htt.h
+++ b/drivers/net/wireless/ath/ath10k/htt.h
@@ -1876,6 +1876,7 @@ struct ath10k_htt {
 		 * of hash collisions for sk_buffs.
 		 */
 		bool in_ord_rx;
+		bool ready_to_fill;
 		DECLARE_HASHTABLE(skb_table, 4);
 
 		/*
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -207,6 +207,9 @@ static void ath10k_htt_rx_msdu_buff_repl
 {
 	int ret, num_deficit, num_to_fill;
 
+	if (!htt->rx_ring.ready_to_fill)
+		return;
+
 	/* Refilling the whole RX ring buffer proves to be a bad idea. The
 	 * reason is RX may take up significant amount of CPU cycles and starve
 	 * other tasks, e.g. TX on an ethernet device while acting as a bridge