Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ffaa92ae authored by Skylar Chang's avatar Skylar Chang
Browse files

msm: ipa: fix debugfs for hw stats



Fix debugfs behaviour for IPA HW stats to handle
the case where stats are not configured.

Change-Id: I4ef446f1dff969c4f7013beef28dc042016bb876
Acked-by: default avatarAdy Abraham <adya@qti.qualcomm.com>
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
parent bbb93d75
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -231,6 +231,9 @@ int ipa_get_quota_stats(struct ipa_quota_stats_all *out)

	IPADBG_LOW("offset = %d size = %d\n", offset.offset, offset.size);

	if (offset.size == 0)
		return 0;

	mem.size = offset.size;
	mem.base = dma_alloc_coherent(ipa3_ctx->pdev,
		mem.size,
@@ -541,6 +544,9 @@ int ipa_get_teth_stats(void)

	IPADBG_LOW("offset = %d size = %d\n", offset.offset, offset.size);

	if (offset.size == 0)
		return 0;

	mem.size = offset.size;
	mem.base = dma_alloc_coherent(ipa3_ctx->pdev,
		mem.size,
@@ -1099,6 +1105,11 @@ static int __ipa_get_flt_rt_stats(enum ipa_ip_type ip, bool filtering,

	IPADBG_LOW("offset = %d size = %d\n", offset.offset, offset.size);

	if (offset.size == 0) {
		ret = 0;
		goto free_offset;
	}

	mem.size = offset.size;
	mem.base = dma_alloc_coherent(ipa3_ctx->pdev,
		mem.size,
@@ -1368,6 +1379,9 @@ int ipa_get_drop_stats(struct ipa_drop_stats_all *out)

	IPADBG_LOW("offset = %d size = %d\n", offset.offset, offset.size);

	if (offset.size == 0)
		return 0;

	mem.size = offset.size;
	mem.base = dma_alloc_coherent(ipa3_ctx->pdev,
		mem.size,