Loading drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c +15 −0 Original line number Diff line number Diff line Loading @@ -65,12 +65,27 @@ static void ipa3_hdr_proc_ctx_to_hw_format(struct ipa_mem_buffer *mem, u32 hdr_base_addr) { struct ipa3_hdr_proc_ctx_entry *entry; int ep; list_for_each_entry(entry, &ipa3_ctx->hdr_proc_ctx_tbl.head_proc_ctx_entry_list, link) { IPADBG_LOW("processing type %d ofst=%d\n", entry->type, entry->offset_entry->offset); if (entry->l2tp_params.is_dst_pipe_valid) { ep = ipa3_get_ep_mapping(entry->l2tp_params.dst_pipe); if (ep >= 0) { entry->l2tp_params.hdr_remove_param. hdr_ofst_pkt_size_valid = ipa3_ctx-> ep[ep].cfg.hdr.hdr_ofst_pkt_size_valid; entry->l2tp_params.hdr_remove_param. hdr_ofst_pkt_size = ipa3_ctx->ep[ep]. cfg.hdr.hdr_ofst_pkt_size; entry->l2tp_params.hdr_remove_param. hdr_endianness = ipa3_ctx->ep[ep]. cfg.hdr_ext.hdr_little_endian ? 0 : 1; } } ipahal_cp_proc_ctx_to_hw_buff(entry->type, mem->base, entry->offset_entry->offset, entry->hdr->hdr_len, Loading drivers/platform/msm/ipa/ipa_v3/ipa_i.h +1 −1 Original line number Diff line number Diff line Loading @@ -389,7 +389,7 @@ struct ipa3_hdr_proc_ctx_entry { struct list_head link; u32 cookie; enum ipa_hdr_proc_type type; union ipa_l2tp_hdr_proc_ctx_params l2tp_params; struct ipa_l2tp_hdr_proc_ctx_params l2tp_params; struct ipa3_hdr_proc_ctx_offset_entry *offset_entry; struct ipa3_hdr_entry *hdr; u32 ref_cnt; Loading drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.c +14 −3 Original line number Diff line number Diff line Loading @@ -1061,7 +1061,7 @@ static void ipahal_cp_proc_ctx_to_hw_buff_v3(enum ipa_hdr_proc_type type, 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; Loading Loading @@ -1124,6 +1124,17 @@ static void ipahal_cp_proc_ctx_to_hw_buff_v3(enum ipa_hdr_proc_type type, 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; Loading Loading @@ -1195,7 +1206,7 @@ struct ipahal_hdr_funcs { 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); }; Loading Loading @@ -1263,7 +1274,7 @@ void ipahal_cp_proc_ctx_to_hw_buff(enum ipa_hdr_proc_type type, 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_LOW("entry\n"); IPAHAL_DBG( Loading drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.h +1 −1 Original line number Diff line number Diff line Loading @@ -626,7 +626,7 @@ void ipahal_cp_proc_ctx_to_hw_buff(enum ipa_hdr_proc_type type, 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_get_proc_ctx_needed_len() - calculates the needed length for addition Loading include/uapi/linux/msm_ipa.h +19 −4 Original line number Diff line number Diff line Loading @@ -868,22 +868,37 @@ struct ipa_l2tp_header_add_procparams { * @hdr_len_remove: Specifies how much of the header needs to be removed in bytes * @eth_hdr_retained: Specifies if Ethernet header is retained or not * @hdr_ofst_pkt_size_valid: Specifies if the Header offset is valid * @hdr_ofst_pkt_size: If hdr_ofst_pkt_size_valid =1, this indicates where the packet size field (2bytes) resides * @hdr_endianness: 0:little endian, 1:big endian */ struct ipa_l2tp_header_remove_procparams { uint32_t hdr_len_remove:8; uint32_t eth_hdr_retained:1; uint32_t reserved:23; /* Following fields are valid if eth_hdr_retained =1 ( bridge mode) */ uint32_t hdr_ofst_pkt_size_valid:1; uint32_t hdr_ofst_pkt_size:6; uint32_t hdr_endianness:1; uint32_t reserved:15; }; /** * union ipa_l2tp_hdr_proc_ctx_params - * struct ipa_l2tp_hdr_proc_ctx_params - * @hdr_add_param: parameters for header add * @hdr_remove_param: parameters for header remove * @is_dst_pipe_valid: if dst pipe is valid * @dst_pipe: destination pipe */ union ipa_l2tp_hdr_proc_ctx_params { struct ipa_l2tp_hdr_proc_ctx_params { struct ipa_l2tp_header_add_procparams hdr_add_param; struct ipa_l2tp_header_remove_procparams hdr_remove_param; uint8_t is_dst_pipe_valid; enum ipa_client_type dst_pipe; }; #define L2TP_USER_SPACE_SPECIFY_DST_PIPE /** * struct ipa_hdr_proc_ctx_add - processing context descriptor includes * in and out parameters Loading @@ -900,7 +915,7 @@ struct ipa_hdr_proc_ctx_add { uint32_t hdr_hdl; uint32_t proc_ctx_hdl; int status; union ipa_l2tp_hdr_proc_ctx_params l2tp_params; struct ipa_l2tp_hdr_proc_ctx_params l2tp_params; }; #define IPA_L2TP_HDR_PROC_SUPPORT Loading Loading
drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c +15 −0 Original line number Diff line number Diff line Loading @@ -65,12 +65,27 @@ static void ipa3_hdr_proc_ctx_to_hw_format(struct ipa_mem_buffer *mem, u32 hdr_base_addr) { struct ipa3_hdr_proc_ctx_entry *entry; int ep; list_for_each_entry(entry, &ipa3_ctx->hdr_proc_ctx_tbl.head_proc_ctx_entry_list, link) { IPADBG_LOW("processing type %d ofst=%d\n", entry->type, entry->offset_entry->offset); if (entry->l2tp_params.is_dst_pipe_valid) { ep = ipa3_get_ep_mapping(entry->l2tp_params.dst_pipe); if (ep >= 0) { entry->l2tp_params.hdr_remove_param. hdr_ofst_pkt_size_valid = ipa3_ctx-> ep[ep].cfg.hdr.hdr_ofst_pkt_size_valid; entry->l2tp_params.hdr_remove_param. hdr_ofst_pkt_size = ipa3_ctx->ep[ep]. cfg.hdr.hdr_ofst_pkt_size; entry->l2tp_params.hdr_remove_param. hdr_endianness = ipa3_ctx->ep[ep]. cfg.hdr_ext.hdr_little_endian ? 0 : 1; } } ipahal_cp_proc_ctx_to_hw_buff(entry->type, mem->base, entry->offset_entry->offset, entry->hdr->hdr_len, Loading
drivers/platform/msm/ipa/ipa_v3/ipa_i.h +1 −1 Original line number Diff line number Diff line Loading @@ -389,7 +389,7 @@ struct ipa3_hdr_proc_ctx_entry { struct list_head link; u32 cookie; enum ipa_hdr_proc_type type; union ipa_l2tp_hdr_proc_ctx_params l2tp_params; struct ipa_l2tp_hdr_proc_ctx_params l2tp_params; struct ipa3_hdr_proc_ctx_offset_entry *offset_entry; struct ipa3_hdr_entry *hdr; u32 ref_cnt; Loading
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.c +14 −3 Original line number Diff line number Diff line Loading @@ -1061,7 +1061,7 @@ static void ipahal_cp_proc_ctx_to_hw_buff_v3(enum ipa_hdr_proc_type type, 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; Loading Loading @@ -1124,6 +1124,17 @@ static void ipahal_cp_proc_ctx_to_hw_buff_v3(enum ipa_hdr_proc_type type, 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; Loading Loading @@ -1195,7 +1206,7 @@ struct ipahal_hdr_funcs { 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); }; Loading Loading @@ -1263,7 +1274,7 @@ void ipahal_cp_proc_ctx_to_hw_buff(enum ipa_hdr_proc_type type, 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_LOW("entry\n"); IPAHAL_DBG( Loading
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.h +1 −1 Original line number Diff line number Diff line Loading @@ -626,7 +626,7 @@ void ipahal_cp_proc_ctx_to_hw_buff(enum ipa_hdr_proc_type type, 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_get_proc_ctx_needed_len() - calculates the needed length for addition Loading
include/uapi/linux/msm_ipa.h +19 −4 Original line number Diff line number Diff line Loading @@ -868,22 +868,37 @@ struct ipa_l2tp_header_add_procparams { * @hdr_len_remove: Specifies how much of the header needs to be removed in bytes * @eth_hdr_retained: Specifies if Ethernet header is retained or not * @hdr_ofst_pkt_size_valid: Specifies if the Header offset is valid * @hdr_ofst_pkt_size: If hdr_ofst_pkt_size_valid =1, this indicates where the packet size field (2bytes) resides * @hdr_endianness: 0:little endian, 1:big endian */ struct ipa_l2tp_header_remove_procparams { uint32_t hdr_len_remove:8; uint32_t eth_hdr_retained:1; uint32_t reserved:23; /* Following fields are valid if eth_hdr_retained =1 ( bridge mode) */ uint32_t hdr_ofst_pkt_size_valid:1; uint32_t hdr_ofst_pkt_size:6; uint32_t hdr_endianness:1; uint32_t reserved:15; }; /** * union ipa_l2tp_hdr_proc_ctx_params - * struct ipa_l2tp_hdr_proc_ctx_params - * @hdr_add_param: parameters for header add * @hdr_remove_param: parameters for header remove * @is_dst_pipe_valid: if dst pipe is valid * @dst_pipe: destination pipe */ union ipa_l2tp_hdr_proc_ctx_params { struct ipa_l2tp_hdr_proc_ctx_params { struct ipa_l2tp_header_add_procparams hdr_add_param; struct ipa_l2tp_header_remove_procparams hdr_remove_param; uint8_t is_dst_pipe_valid; enum ipa_client_type dst_pipe; }; #define L2TP_USER_SPACE_SPECIFY_DST_PIPE /** * struct ipa_hdr_proc_ctx_add - processing context descriptor includes * in and out parameters Loading @@ -900,7 +915,7 @@ struct ipa_hdr_proc_ctx_add { uint32_t hdr_hdl; uint32_t proc_ctx_hdl; int status; union ipa_l2tp_hdr_proc_ctx_params l2tp_params; struct ipa_l2tp_hdr_proc_ctx_params l2tp_params; }; #define IPA_L2TP_HDR_PROC_SUPPORT Loading