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

Commit 2cbf5fb1 authored by Manoj Prabhu B's avatar Manoj Prabhu B Committed by Gerrit - the friendly Code Review server
Browse files

diag: Use valid data_source for a valid token



For a valid token indicating remote proc use data_source to
indicate packet originated from dci remote source.

Change-Id: I01729a905d532fae7ea046acc143598eca04460b
Signed-off-by: default avatarManoj Prabhu B <bmanoj@codeaurora.org>
parent 08d69389
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1063,6 +1063,11 @@ void extract_dci_pkt_rsp(unsigned char *buf, int len, int data_source,
		return;
	}

	if (token != entry->client_info.token) {
		mutex_unlock(&driver->dci_mutex);
		return;
	}

	mutex_lock(&entry->buffers[data_source].buf_mutex);
	rsp_buf = entry->buffers[data_source].buf_cmd;