From 1ac627024de916eb157659caf49f93fa89d3b19a Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Sun, 22 Dec 2019 21:20:57 +0300 Subject: kernel: ath10k-ct: provide a build variant for small RAM devices 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 [Remove double CONFIG_ATH10K-CT_LEDS entry] Signed-off-by: Hauke Mehrtens --- .../960-0010-ath10k-limit-htt-rx-ring-size.patch | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch (limited to 'package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch') 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 index 0000000000..a3a939440a --- /dev/null +++ b/package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch @@ -0,0 +1,28 @@ +--- a/ath10k-4.19/htt.h ++++ b/ath10k-4.19/htt.h +@@ -237,7 +237,11 @@ enum htt_rx_ring_flags { + }; + + #define HTT_RX_RING_SIZE_MIN 128 ++#ifndef CONFIG_ATH10K_SMALLBUFFERS + #define HTT_RX_RING_SIZE_MAX 2048 ++#else ++#define HTT_RX_RING_SIZE_MAX 512 ++#endif + #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,11 @@ enum htt_rx_ring_flags { + }; + + #define HTT_RX_RING_SIZE_MIN 128 ++#ifndef CONFIG_ATH10K_SMALLBUFFERS + #define HTT_RX_RING_SIZE_MAX 2048 ++#else ++#define HTT_RX_RING_SIZE_MAX 512 ++#endif + #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) -- cgit v1.2.3