lede/package/kernel/mac80211/patches/ath11k/903-ath11k-ipq8074-support-512MB-memory-profile.patch
2022-12-20 11:43:45 +08:00

67 lines
2.0 KiB
Diff

From 20ad5a47dd5093a8eb934a64f398d16d4952de91 Mon Sep 17 00:00:00 2001
From: Robert Marko <robimarko@gmail.com>
Date: Wed, 15 Dec 2021 19:44:52 +0100
Subject: [PATCH] ath11k: ipq8074: support 512MB memory profile
ath11k is really memory intensive for devices with less that 1GB of ram,
so lets port the QSDK patch that adds a profile for devices with 512MB
of RAM.
Signed-off-by: Csaba Sipos <metro4@freemail.hu>
Signed-off-by: Robert Marko <robimarko@gmail.com>
---
drivers/net/wireless/ath/ath11k/Kconfig | 12 ++
drivers/net/wireless/ath/ath11k/core.c | 6 +
local-symbols | 2 +
4 files changed, 176 insertions(+)
--- a/drivers/net/wireless/ath/ath11k/Kconfig
+++ b/drivers/net/wireless/ath/ath11k/Kconfig
@@ -61,6 +61,18 @@
Enable ath11k spectral scan support
Say Y to enable access to the FFT/spectral data via debugfs.
+
+config ATH11K_MEM_PROFILE_512MB
+ bool "Atheros ath11k 512MB memory profile"
+ depends on ATH11K
+ help
+ Use limits for the 512MB memory size instead of 1GB.
+
+config ATH11K_MEM_PROFILE_1GB
+ bool "Atheros ath11k 1GB memory profile"
+ depends on ATH11K
+ help
+ Use limits for the 1GB memory size.
config ATH11K_THERMAL
bool "ath11k thermal sensors and throttling support"
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -83,9 +83,15 @@ static const struct ath11k_hw_params ath
.supports_sta_ps = false,
.cold_boot_calib = false,
.cbcal_restart_fw = true,
+#ifdef CPTCFG_ATH11K_MEM_PROFILE_1GB
.fw_mem_mode = 0,
.num_vdevs = 16 + 1,
.num_peers = 512,
+#elif CPTCFG_ATH11K_MEM_PROFILE_512MB
+ .fw_mem_mode = 1,
+ .num_vdevs = 8,
+ .num_peers = 128,
+#endif
.supports_suspend = false,
.hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074),
.supports_regdb = false,
--- a/local-symbols
+++ b/local-symbols
@@ -182,6 +182,8 @@ ATH11K_DEBUG=
ATH11K_DEBUGFS=
ATH11K_TRACING=
ATH11K_SPECTRAL=
+ATH11K_MEM_PROFILE_512MB=
+ATH11K_MEM_PROFILE_1GB=
ATH11K_THERMAL=
WLAN_VENDOR_ATMEL=
ATMEL=