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

Commit bad23cea authored by Jaiju Yesudasan's avatar Jaiju Yesudasan Committed by Gerrit - the friendly Code Review server
Browse files

profiler: Fix issue with Bandwidth STOP command send



Bandwidth STOP command never sent to TZ due to “stop_done”
implementation. The stop_done veriable needs to be reset after START
command send.

Change-Id: Ia20a572481a6431899ba5e8fb6339f91e7ecf7ab
Signed-off-by: default avatarJaiju Yesudasan <c_jaijuy@qti.qualcomm.com>
parent f4903509
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -214,7 +214,7 @@ static int bw_profiling_stop(struct tz_bw_svc_buf *bwbuf)
	struct tz_bw_svc_stop_req *bwstopreq = NULL;

	if (stop_done) {
		stop_done--;
		stop_done = 0;
		return 0;
	}
	bwstopreq = (struct tz_bw_svc_stop_req *) &bwbuf->bwreq;
@@ -246,6 +246,7 @@ static int profiler_get_bw_info(void __user *argp)
		ret = bw_profiling_start(bwbuf);
		if (ret)
			pr_err("bw_profiling_start Failed with ret: %d\n", ret);
		stop_done = 0;
		break;
	}
	case TZ_BW_SVC_GET_ID: {
@@ -258,7 +259,7 @@ static int profiler_get_bw_info(void __user *argp)
		ret = bw_profiling_stop(bwbuf);
		if (ret)
			pr_err("bw_profiling_stop Failed with ret: %d\n", ret);
		stop_done++;
		stop_done = 1;
		break;
	}
	default: