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

Commit 075e17e2 authored by Praveen Kurapati's avatar Praveen Kurapati Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa3: Fix to check if adpl pipe configured



Added check to see if adpl pipe is already configured
and avoid it from setting up the pipe again.
Also releasing adpl configuration in non-ssr cases.

Change-Id: I00e26dbe4d5b3dbbe5f92146a6fdedfd3105fcd0
Signed-off-by: default avatarPraveen Kurapati <pkurapat@codeaurora.org>
parent d35a3240
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2018-2019, 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
@@ -371,7 +371,8 @@ static int ipa_adpl_open(struct inode *inode, struct file *filp)
	int ret = 0;

	IPADBG("Called the function :\n");
	if (ipa3_odl_ctx->odl_state.odl_init) {
	if (ipa3_odl_ctx->odl_state.odl_init &&
				!ipa3_odl_ctx->odl_state.adpl_open) {
		ipa3_odl_ctx->odl_state.adpl_open = true;
		ret = ipa3_odl_pipe_open();
	} else {
@@ -419,6 +420,8 @@ void ipa3_odl_pipe_cleanup(bool is_ssr)
	/*Assume DIAG will not close this node in SSR case*/
	if (is_ssr)
		ipa3_odl_ctx->odl_state.adpl_open = true;
	else
		ipa3_odl_ctx->odl_state.adpl_open = false;

	ipa3_odl_ctx->odl_state.odl_disconnected = true;
	ipa3_odl_ctx->odl_state.odl_ep_setup = false;