msm: ipa: add support for packet length update
Add support for IPA uC to update packet length field
in client header.
Change-Id: I11021aa3e81bd75acd71797de53d57262de0c3ea
Acked-by: Shihuan Liu <shihuanl@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.c b/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.c
index 57d44e3..a48fd01 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.c
+++ b/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.c
@@ -1167,7 +1167,7 @@
u32 hdr_len, bool is_hdr_proc_ctx,
dma_addr_t phys_base, u32 hdr_base_addr,
struct ipa_hdr_offset_entry *offset_entry,
- union ipa_l2tp_hdr_proc_ctx_params l2tp_params){
+ struct ipa_l2tp_hdr_proc_ctx_params l2tp_params){
if (type == IPA_HDR_PROC_NONE) {
struct ipa_hw_hdr_proc_ctx_add_hdr_seq *ctx;
@@ -1230,6 +1230,17 @@
l2tp_params.hdr_remove_param.hdr_len_remove;
ctx->l2tp_params.l2tp_params.eth_hdr_retained =
l2tp_params.hdr_remove_param.eth_hdr_retained;
+ ctx->l2tp_params.l2tp_params.hdr_ofst_pkt_size_valid =
+ l2tp_params.hdr_remove_param.hdr_ofst_pkt_size_valid;
+ ctx->l2tp_params.l2tp_params.hdr_ofst_pkt_size =
+ l2tp_params.hdr_remove_param.hdr_ofst_pkt_size;
+ ctx->l2tp_params.l2tp_params.hdr_endianness =
+ l2tp_params.hdr_remove_param.hdr_endianness;
+ IPAHAL_DBG("hdr ofst valid: %d, hdr ofst pkt size: %d\n",
+ ctx->l2tp_params.l2tp_params.hdr_ofst_pkt_size_valid,
+ ctx->l2tp_params.l2tp_params.hdr_ofst_pkt_size);
+ IPAHAL_DBG("endianness: %d\n",
+ ctx->l2tp_params.l2tp_params.hdr_endianness);
IPAHAL_DBG("command id %d\n", ctx->l2tp_params.tlv.value);
ctx->end.type = IPA_PROC_CTX_TLV_TYPE_END;
@@ -1304,7 +1315,7 @@
bool is_hdr_proc_ctx, dma_addr_t phys_base,
u32 hdr_base_addr,
struct ipa_hdr_offset_entry *offset_entry,
- union ipa_l2tp_hdr_proc_ctx_params l2tp_params);
+ struct ipa_l2tp_hdr_proc_ctx_params l2tp_params);
int (*ipahal_get_proc_ctx_needed_len)(enum ipa_hdr_proc_type type);
};
@@ -1375,7 +1386,7 @@
void *const base, u32 offset, u32 hdr_len,
bool is_hdr_proc_ctx, dma_addr_t phys_base,
u32 hdr_base_addr, struct ipa_hdr_offset_entry *offset_entry,
- union ipa_l2tp_hdr_proc_ctx_params l2tp_params)
+ struct ipa_l2tp_hdr_proc_ctx_params l2tp_params)
{
IPAHAL_DBG(
"type %d, base %p, offset %d, hdr_len %d, is_hdr_proc_ctx %d, hdr_base_addr %d, offset_entry %p\n"