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

Commit f09adb02 authored by Skylar Chang's avatar Skylar Chang
Browse files

msm: ipa: add support for AGGR_SW_EOF_ACTIVE



Configure AGGR_SW_EOF_ACTIVE for WAN_CONS pipe in order to
allow modem to close aggregation on this pipe.
This is needed in order for modem to ensure
a QMAP command packet always resides in the end of aggregated frame.

Change-Id: I7412f1f0af8d2109853e311de815a1f1ec3220e3
CRs-Fixed: 979484
Acked-by: default avatarAdy Abraham <adya@qti.qualcomm.com>
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
parent d5809484
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2930,6 +2930,8 @@ static int ipa_assign_policy(struct ipa_sys_connect_params *in,
						ipa_ctx->wan_rx_ring_size;
					sys->ep->wakelock_client =
					IPA_WAKELOCK_REF_CLIENT_WAN_RX;
					in->ipa_ep_cfg.aggr.aggr_sw_eof_active
						= true;
					if (ipa_ctx->
					ipa_client_apps_wan_cons_agg_gro) {
						IPAERR("get close-by %u\n",
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -147,6 +147,8 @@ Common Registers

#define IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_BMSK 0x1
#define IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_SHFT 0x16
#define IPA_ENDP_INIT_AGGR_n_AGGR_SW_EOF_ACTIVE_BMSK 0x200000
#define IPA_ENDP_INIT_AGGR_n_AGGR_SW_EOF_ACTIVE_SHFT 0x15
#define IPA_ENDP_INIT_AGGR_n_AGGR_PKT_LIMIT_BMSK 0x1f8000
#define IPA_ENDP_INIT_AGGR_n_AGGR_PKT_LIMIT_SHFT 0xf
#define IPA_ENDP_INIT_AGGR_N_AGGR_TIME_LIMIT_BMSK 0x7c00
+4 −0
Original line number Diff line number Diff line
@@ -3232,6 +3232,10 @@ void _ipa_cfg_ep_aggr_v2_0(u32 pipe_number,
			IPA_ENDP_INIT_AGGR_n_AGGR_PKT_LIMIT_SHFT,
			IPA_ENDP_INIT_AGGR_n_AGGR_PKT_LIMIT_BMSK);

	IPA_SETFIELD_IN_REG(reg_val, ep_aggr->aggr_sw_eof_active,
			IPA_ENDP_INIT_AGGR_n_AGGR_SW_EOF_ACTIVE_SHFT,
			IPA_ENDP_INIT_AGGR_n_AGGR_SW_EOF_ACTIVE_BMSK);

	ipa_write_reg(ipa_ctx->mmio,
			IPA_ENDP_INIT_AGGR_N_OFST_v2_0(pipe_number), reg_val);
}
+2 −0
Original line number Diff line number Diff line
@@ -2958,6 +2958,8 @@ static int ipa3_assign_policy(struct ipa_sys_connect_params *in,
						ipa3_replenish_rx_cache;
				sys->rx_pool_sz =
					ipa3_ctx->wan_rx_ring_size;
				in->ipa_ep_cfg.aggr.aggr_sw_eof_active
					= true;
			}
		} else if (IPA_CLIENT_IS_WLAN_CONS(in->client)) {
			IPADBG("assigning policy to client:%d",
+3 −2
Original line number Diff line number Diff line
@@ -3085,8 +3085,9 @@ int ipa3_cfg_ep_aggr(u32 clnt_hdl, const struct ipa_ep_cfg_aggr *ep_aggr)
			ipa3_get_aggr_type_str(ep_aggr->aggr),
			ep_aggr->aggr_byte_limit,
			ep_aggr->aggr_time_limit);
	IPADBG("hard_byte_limit_en=%d\n",
		ep_aggr->aggr_hard_byte_limit_en);
	IPADBG("hard_byte_limit_en=%d aggr_sw_eof_active=%d\n",
		ep_aggr->aggr_hard_byte_limit_en,
		ep_aggr->aggr_sw_eof_active);

	/* copy over EP cfg */
	ipa3_ctx->ep[clnt_hdl].cfg.aggr = *ep_aggr;
Loading