msm: ipa3: Adding changes to remove dependency ipa3_ctx global variable

ipa3_ctx variable not able to access from the client module and so
adding changes to get qmap id details from ipa core driver.

Change-Id: I215ed0137fdad531e23be35b496d4b8e4a43a554
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
This commit is contained in:
Ashok Vuyyuru 2023-03-23 15:06:09 +05:30
commit 338eb798c7
3 changed files with 19 additions and 3 deletions

View file

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/debugfs.h>
@ -1216,7 +1216,7 @@ static int ipa_bridge_tx_dp_internal(u32 hdl, struct sk_buff *skb,
sizeof(struct ipa_gsb_mux_hdr));
memset(mux_hdr, 0, sizeof(struct ipa_gsb_mux_hdr));
mux_hdr->iface_hdl = (u8)hdl;
mux_hdr->qmap_id = (u8)ipa3_ctx->ep[ipa_gsb_ctx->prod_hdl].cfg.meta.qmap_id;
mux_hdr->qmap_id = (u8)ipa3_get_qmap_id(ipa_gsb_ctx->prod_hdl);
ret = ipa_tx_dp(IPA_CLIENT_ODU_PROD, skb, metadata);
if (ret) {

View file

@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef _IPA3_I_H_
@ -2815,6 +2815,7 @@ bool ipa3_is_client_handle_valid(u32 clnt_hdl);
enum ipa_client_type ipa3_get_client_mapping(int pipe_idx);
enum ipa_client_type ipa3_get_client_by_pipe(int pipe_idx);
u32 ipa3_get_qmap_id(int pipe_idx);
void ipa_init_ep_flt_bitmap(void);

View file

@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved
*/
#include <net/ip.h>
@ -9615,6 +9616,20 @@ u32 ipa3_get_r_rev_version(void)
}
EXPORT_SYMBOL(ipa3_get_r_rev_version);
u32 ipa3_get_qmap_id(int pipe_idx)
{
if (pipe_idx >= ipa3_ctx->ipa_num_pipes || pipe_idx < 0) {
IPAERR("Bad pipe index!\n");
WARN_ON(1);
return -EINVAL;
}
return ipa3_ctx->ep[pipe_idx].cfg.meta.qmap_id;
}
EXPORT_SYMBOL(ipa3_get_qmap_id);
/**
* ipa3_ctx_get_type() - to get platform type, hw type
* and hw mode