From 6bc469fdf0ec2718ff2f4acdeb5f49b5a96fe6aa Mon Sep 17 00:00:00 2001 From: Ashok Vuyyuru Date: Fri, 4 Nov 2022 23:49:11 +0530 Subject: [PATCH] msm: ipa3: Update QMAP ID field in metadata field for GSB client In XLAT scenario QMAP ID not updated in TX packets, due to that it was not hitting not correct filter rules. Adding changes to update QMAP ID field in metadata field for GSB client. Change-Id: Ic6bfceb0b8e34316507eaf551fb2b62f085a3519 --- drivers/platform/msm/ipa/ipa_clients/ipa_gsb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/platform/msm/ipa/ipa_clients/ipa_gsb.c b/drivers/platform/msm/ipa/ipa_clients/ipa_gsb.c index 8eb0627c8aa3..cfd88852b19d 100644 --- a/drivers/platform/msm/ipa/ipa_clients/ipa_gsb.c +++ b/drivers/platform/msm/ipa/ipa_clients/ipa_gsb.c @@ -1,6 +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. */ #include @@ -762,8 +763,6 @@ static void ipa_gsb_tx_dp_notify(void *priv, enum ipa_dp_evt_type evt, /* fetch iface handle from header */ mux_hdr = (struct ipa_gsb_mux_hdr *)skb->data; - /* change to host order */ - *(u32 *)mux_hdr = ntohl(*(u32 *)mux_hdr); hdl = mux_hdr->iface_hdl; if ((hdl < 0) || (hdl >= MAX_SUPPORTED_IFACE) || !ipa_gsb_ctx->iface[hdl]) { @@ -1215,9 +1214,9 @@ static int ipa_bridge_tx_dp_internal(u32 hdl, struct sk_buff *skb, /* add 4 byte header for mux */ mux_hdr = (struct ipa_gsb_mux_hdr *)skb_push(skb, sizeof(struct ipa_gsb_mux_hdr)); + memset(mux_hdr, 0, sizeof(struct ipa_gsb_mux_hdr)); mux_hdr->iface_hdl = (u8)hdl; - /* change to network order */ - *(u32 *)mux_hdr = htonl(*(u32 *)mux_hdr); + mux_hdr->qmap_id = (u8)ipa3_ctx->ep[ipa_gsb_ctx->prod_hdl].cfg.meta.qmap_id; ret = ipa_tx_dp(IPA_CLIENT_ODU_PROD, skb, metadata); if (ret) {