wlan-ap-Telecominfraproject/feeds/ipq95xx/mac80211/patches/qca/358-ath11k-skip-caldb-alloc-in-seg-mode.patch
John Crispin 144c5d00f4 ipq95xx/mac80211: update to ATH12.3-CS
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-28 18:56:21 +01:00

42 lines
1.5 KiB
Diff

From 26988f50228b268b08361df4033f614fc2b17c30 Mon Sep 17 00:00:00 2001
From: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
Date: Fri, 30 Sep 2022 23:19:29 +0530
Subject: [PATCH] ath11k: skip caldb alloc in seg mode when cold_boot_cal is
disabled
In segmented approach, when cold boot calibration is disabled caldb
memory segments are allocated and responded to the firmware. This memory
will be unused.
Skip allocating caldb memory when cold boot calibration is disabled.
Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
---
drivers/net/wireless/ath/ath11k/qmi.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
index 104df0cae14d..b40027550e8e 100644
--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
@@ -2797,6 +2797,16 @@ static int ath11k_qmi_alloc_target_mem_chunk(struct ath11k_base *ab)
for (i = 0; i < ab->qmi.mem_seg_count; i++) {
chunk = &ab->qmi.target_mem[i];
+
+ if (chunk->type == CALDB_MEM_REGION_TYPE && (!ab->enable_cold_boot_cal
+ || !ab->hw_params.cold_boot_calib)) {
+ ath11k_info(ab, "Skipping caldb allocation chunk->size %u chunk->paddr %pad\n",
+ chunk->size, &chunk->paddr);
+ chunk->paddr = 0;
+ chunk->vaddr = NULL;
+ continue;
+ }
+
/*
* Ignore the memory request from FW if size is more than 2MB
* if host sends failure, FW reqesut for 2MB segments in mode-0
--
2.37.3