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

Commit a355f901 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 8f0f3b0c
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 */

#include "ipa_i.h"
@@ -365,7 +365,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 {
@@ -414,6 +415,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;