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

Commit b4b9eb69 authored by Manoj Prabhu B's avatar Manoj Prabhu B
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 f3a27013
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
 */

#include <linux/slab.h>
@@ -1069,6 +1069,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;