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

Commit 0b76d977 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ipa: Fix to use template header for L2TP UDP Remove"

parents 42c92fb2 ce8732c5
Loading
Loading
Loading
Loading
+18 −3
Original line number Diff line number Diff line
@@ -1318,10 +1318,25 @@ static int ipahal_cp_proc_ctx_to_hw_buff_v3(enum ipa_hdr_proc_type type,
		ctx->end.length = 0;
		ctx->end.value = 0;
	} else if (type == IPA_HDR_PROC_L2TP_UDP_HEADER_REMOVE) {
		struct ipa_hw_hdr_proc_ctx_remove_l2tp_udp_hdr_cmd_seq *ctx;
		struct ipa_hw_hdr_proc_ctx_remove_l2tp_hdr_cmd_seq *ctx;

		ctx = (struct ipa_hw_hdr_proc_ctx_remove_l2tp_udp_hdr_cmd_seq *)
		ctx = (struct ipa_hw_hdr_proc_ctx_remove_l2tp_hdr_cmd_seq *)
			(base + offset);
		ctx->hdr_add.tlv.type = IPA_PROC_CTX_TLV_TYPE_HDR_ADD;
		ctx->hdr_add.tlv.length = 2;
		if (l2tp_params->hdr_remove_param.eth_hdr_retained) {
			ctx->hdr_add.tlv.value = hdr_len;
			hdr_addr = is_hdr_proc_ctx ? phys_base :
				hdr_base_addr + offset_entry->offset;
			IPAHAL_DBG("header address 0x%llx length %d\n",
				hdr_addr, ctx->hdr_add.tlv.value);
			IPAHAL_CP_PROC_CTX_HEADER_UPDATE(ctx->hdr_add.hdr_addr,
				ctx->hdr_add.hdr_addr_hi, hdr_addr);
			if (!is_64)
				ctx->hdr_add.hdr_addr_hi = 0;
		} else {
			ctx->hdr_add.tlv.value = 0;
		}
		ctx->l2tp_params.tlv.type = IPA_PROC_CTX_TLV_TYPE_PROC_CMD;
		ctx->l2tp_params.tlv.length = 1;
		ctx->l2tp_params.tlv.value =
@@ -1451,7 +1466,7 @@ static int ipahal_get_proc_ctx_needed_len_v3(enum ipa_hdr_proc_type type)
		break;
	case IPA_HDR_PROC_L2TP_UDP_HEADER_REMOVE:
		ret =
		sizeof(struct ipa_hw_hdr_proc_ctx_remove_l2tp_udp_hdr_cmd_seq);
		sizeof(struct ipa_hw_hdr_proc_ctx_remove_l2tp_hdr_cmd_seq);
		break;
	case IPA_HDR_PROC_ETHII_TO_ETHII_EX:
		ret = sizeof(struct ipa_hw_hdr_proc_ctx_add_hdr_cmd_seq_ex);