ath10k-ct: reduce memory pressure
authorChristian Lamparter <chunkeey@gmail.com>
Sat, 12 Jan 2019 13:10:59 +0000 (14:10 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Sat, 19 Oct 2019 16:50:43 +0000 (18:50 +0200)
No-Signed-Off

package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch [new file with mode: 0644]
package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch [new file with mode: 0644]

diff --git a/package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch b/package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch
new file mode 100644 (file)
index 0000000..fcc5927
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/ath10k-4.19/htt.h
++++ b/ath10k-4.19/htt.h
+@@ -237,7 +237,7 @@ enum htt_rx_ring_flags {
+ };
+ #define HTT_RX_RING_SIZE_MIN 128
+-#define HTT_RX_RING_SIZE_MAX 2048
++#define HTT_RX_RING_SIZE_MAX 512
+ #define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
+ #define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
+ #define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
+--- a/ath10k-5.2/htt.h
++++ b/ath10k-5.2/htt.h
+@@ -225,7 +225,7 @@ enum htt_rx_ring_flags {
+ };
+ #define HTT_RX_RING_SIZE_MIN 128
+-#define HTT_RX_RING_SIZE_MAX 2048
++#define HTT_RX_RING_SIZE_MAX 512
+ #define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
+ #define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
+ #define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
diff --git a/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch b/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch
new file mode 100644 (file)
index 0000000..c54b367
--- /dev/null
@@ -0,0 +1,76 @@
+--- a/ath10k-4.19/pci.c
++++ b/ath10k-4.19/pci.c
+@@ -142,7 +142,7 @@ static struct ce_attr host_ce_config_wla
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+-              .dest_nentries = 512,
++              .dest_nentries = 128,
+               .recv_cb = ath10k_pci_htt_htc_rx_cb,
+       },
+@@ -151,7 +151,7 @@ static struct ce_attr host_ce_config_wla
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+-              .dest_nentries = 128,
++              .dest_nentries = 64,
+               .recv_cb = ath10k_pci_htc_rx_cb,
+       },
+@@ -178,7 +178,7 @@ static struct ce_attr host_ce_config_wla
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 512,
+-              .dest_nentries = 512,
++              .dest_nentries = 128,
+               .recv_cb = ath10k_pci_htt_rx_cb,
+       },
+@@ -203,7 +203,7 @@ static struct ce_attr host_ce_config_wla
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+-              .dest_nentries = 128,
++              .dest_nentries = 96,
+               .recv_cb = ath10k_pci_pktlog_rx_cb,
+       },
+--- a/ath10k-5.2/pci.c
++++ b/ath10k-5.2/pci.c
+@@ -131,7 +131,7 @@ static struct ce_attr host_ce_config_wla
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+-              .dest_nentries = 512,
++              .dest_nentries = 128,
+               .recv_cb = ath10k_pci_htt_htc_rx_cb,
+       },
+@@ -140,7 +140,7 @@ static struct ce_attr host_ce_config_wla
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+-              .dest_nentries = 128,
++              .dest_nentries = 64,
+               .recv_cb = ath10k_pci_htc_rx_cb,
+       },
+@@ -167,7 +167,7 @@ static struct ce_attr host_ce_config_wla
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 512,
+-              .dest_nentries = 512,
++              .dest_nentries = 128,
+               .recv_cb = ath10k_pci_htt_rx_cb,
+       },
+@@ -192,7 +192,7 @@ static struct ce_attr host_ce_config_wla
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+-              .dest_nentries = 128,
++              .dest_nentries = 96,
+               .recv_cb = ath10k_pci_pktlog_rx_cb,
+       },