mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 00:41:17 +00:00
1ac627024d
According to many bugreports [0][1][2] the default ath10k-ct kernel module is unusable on devices with just 64 MiB RAM or with 128 MiB and dual ath10k cards. The target boards boot but eventually oom-killer starts to interfere with normal operation, so the current state is effectively broken. Since the two patches in question have a performance impact (and possibly some other unexpected side-effects) a dedicated build variant is added so that users of the low RAM devices can still benefit from all the ath10k-ct advantages. According to testing [3] results, the issue can be experienced even with "a 256MB device with three radios". Measured performance impact of implementing small buffers was lowering "the maximum 5 GHz throughput on an IPQ40xx device without RPS/XPS optimizations from 494/432 Mbit/s for TCP transfers (download/upload) to 438/343 Mbit/s" The patches were apparently inspired by QSDK tweaks used by ODMs for the affected devices. [0] http://lists.infradead.org/pipermail/openwrt-devel/2019-December/020573.html [1] https://github.com/openwrt/openwrt/pull/1077 [2] https://bugs.openwrt.org/index.php?do=details&task_id=2664 [3] https://github.com/freifunk-gluon/gluon/pull/1440#issue-195607701 Signed-off-by: Paul Fertser <fercerpav@gmail.com> [Remove double CONFIG_ATH10K-CT_LEDS entry] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
101 lines
2.3 KiB
Diff
101 lines
2.3 KiB
Diff
--- a/ath10k-4.19/pci.c
|
|
+++ b/ath10k-4.19/pci.c
|
|
@@ -142,7 +142,11 @@ static struct ce_attr host_ce_config_wla
|
|
.flags = CE_ATTR_FLAGS,
|
|
.src_nentries = 0,
|
|
.src_sz_max = 2048,
|
|
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
|
.dest_nentries = 512,
|
|
+#else
|
|
+ .dest_nentries = 128,
|
|
+#endif
|
|
.recv_cb = ath10k_pci_htt_htc_rx_cb,
|
|
},
|
|
|
|
@@ -151,7 +155,11 @@ static struct ce_attr host_ce_config_wla
|
|
.flags = CE_ATTR_FLAGS,
|
|
.src_nentries = 0,
|
|
.src_sz_max = 2048,
|
|
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
|
.dest_nentries = 128,
|
|
+#else
|
|
+ .dest_nentries = 64,
|
|
+#endif
|
|
.recv_cb = ath10k_pci_htc_rx_cb,
|
|
},
|
|
|
|
@@ -178,7 +186,11 @@ static struct ce_attr host_ce_config_wla
|
|
.flags = CE_ATTR_FLAGS,
|
|
.src_nentries = 0,
|
|
.src_sz_max = 512,
|
|
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
|
.dest_nentries = 512,
|
|
+#else
|
|
+ .dest_nentries = 128,
|
|
+#endif
|
|
.recv_cb = ath10k_pci_htt_rx_cb,
|
|
},
|
|
|
|
@@ -203,7 +215,11 @@ static struct ce_attr host_ce_config_wla
|
|
.flags = CE_ATTR_FLAGS,
|
|
.src_nentries = 0,
|
|
.src_sz_max = 2048,
|
|
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
|
.dest_nentries = 128,
|
|
+#else
|
|
+ .dest_nentries = 96,
|
|
+#endif
|
|
.recv_cb = ath10k_pci_pktlog_rx_cb,
|
|
},
|
|
|
|
--- a/ath10k-5.2/pci.c
|
|
+++ b/ath10k-5.2/pci.c
|
|
@@ -131,7 +131,11 @@ static struct ce_attr host_ce_config_wla
|
|
.flags = CE_ATTR_FLAGS,
|
|
.src_nentries = 0,
|
|
.src_sz_max = 2048,
|
|
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
|
.dest_nentries = 512,
|
|
+#else
|
|
+ .dest_nentries = 128,
|
|
+#endif
|
|
.recv_cb = ath10k_pci_htt_htc_rx_cb,
|
|
},
|
|
|
|
@@ -140,7 +144,11 @@ static struct ce_attr host_ce_config_wla
|
|
.flags = CE_ATTR_FLAGS,
|
|
.src_nentries = 0,
|
|
.src_sz_max = 2048,
|
|
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
|
.dest_nentries = 128,
|
|
+#else
|
|
+ .dest_nentries = 64,
|
|
+#endif
|
|
.recv_cb = ath10k_pci_htc_rx_cb,
|
|
},
|
|
|
|
@@ -167,7 +175,11 @@ static struct ce_attr host_ce_config_wla
|
|
.flags = CE_ATTR_FLAGS,
|
|
.src_nentries = 0,
|
|
.src_sz_max = 512,
|
|
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
|
.dest_nentries = 512,
|
|
+#else
|
|
+ .dest_nentries = 128,
|
|
+#endif
|
|
.recv_cb = ath10k_pci_htt_rx_cb,
|
|
},
|
|
|
|
@@ -192,7 +204,11 @@ static struct ce_attr host_ce_config_wla
|
|
.flags = CE_ATTR_FLAGS,
|
|
.src_nentries = 0,
|
|
.src_sz_max = 2048,
|
|
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
|
.dest_nentries = 128,
|
|
+#else
|
|
+ .dest_nentries = 96,
|
|
+#endif
|
|
.recv_cb = ath10k_pci_pktlog_rx_cb,
|
|
},
|
|
|