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

Commit 68c8a1f7 authored by Bojun Pan's avatar Bojun Pan
Browse files

msm: ipa3: IPA HW version check for FnR stats



The ipa_get_flt_rt_stats only support on IPA4.5 above.
The fix is to add the version check for security.

Change-Id: I3b712c3d24051e87d42d7ef241e9e0715ae96a66
Signed-off-by: default avatarBojun Pan <bojunp@codeaurora.org>
parent 1041824b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1052,6 +1052,12 @@ int ipa_get_flt_rt_stats(struct ipa_ioc_flt_rt_query *query)
		return 0;
	}

	if (ipa3_ctx->ipa_hw_type < IPA_HW_v4_5) {
		IPAERR("FnR stats not supported in %d hw_type\n",
			ipa3_ctx->ipa_hw_type);
		return 0;
	}

	if (query->start_id == 0 || query->end_id == 0) {
		IPAERR("Invalid start_id/end_id, must be not 0\n");
		IPAERR("start_id %d, end_id %d\n",