lede/package/kernel/mac80211/patches/ath11k/901-ath11k-ipq8074-support-512MB-memory-profile.patch
2022-07-08 12:44:37 +08:00

64 lines
1.9 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,3 +61,15 @@ config ATH11K_SPECTRAL
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.
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -84,9 +84,15 @@ static const struct ath11k_hw_params ath
.idle_ps = false,
.supports_sta_ps = false,
.cold_boot_calib = false,
+#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
@@ -155,6 +155,8 @@ ATH11K_DEBUG=
ATH11K_DEBUGFS=
ATH11K_TRACING=
ATH11K_SPECTRAL=
+ATH11K_MEM_PROFILE_512MB=
+ATH11K_MEM_PROFILE_1GB=
WLAN_VENDOR_ATMEL=
ATMEL=
PCI_ATMEL=