diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c b/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c index 8a3fccc1b80d..64d29401ac41 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c @@ -3808,7 +3808,16 @@ static int ipa3_assign_policy(struct ipa_sys_connect_params *in, } else if (in->client == IPA_CLIENT_ODL_DPL_CONS) { IPADBG("assigning policy to ODL client:%d\n", in->client); - sys->ep->status.status_en = true; + /* Status enabling is needed for DPLv2 with + * IPA versions < 4.5. + * Dont enable ipa_status for APQ, since MDM IPA + * has IPA >= 4.5 with DPLv3. + */ + if (ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ && + ipa3_is_mhip_offload_enabled()) + sys->ep->status.status_en = false; + else + sys->ep->status.status_en = true; sys->policy = IPA_POLICY_INTR_POLL_MODE; INIT_WORK(&sys->work, ipa3_wq_handle_rx); INIT_DELAYED_WORK(&sys->switch_to_intr_work, diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_odl.c b/drivers/platform/msm/ipa/ipa_v3/ipa_odl.c index 82a19541b6c5..69d35a35215b 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_odl.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_odl.c @@ -287,10 +287,6 @@ int ipa_setup_odl_pipe(void) ipa_odl_ep_cfg->ipa_ep_cfg.aggr.aggr_en = IPA_ENABLE_AGGR; ipa_odl_ep_cfg->ipa_ep_cfg.aggr.aggr_hard_byte_limit_en = 1; - if (ipa3_is_mhip_offload_enabled()) { - IPADBG("MHIP is enabled, disable aggregation for ODL pipe"); - ipa_odl_ep_cfg->ipa_ep_cfg.aggr.aggr_en = IPA_BYPASS_AGGR; - } ipa_odl_ep_cfg->ipa_ep_cfg.aggr.aggr = IPA_GENERIC; ipa_odl_ep_cfg->ipa_ep_cfg.aggr.aggr_byte_limit = IPA_ODL_AGGR_BYTE_LIMIT; @@ -316,6 +312,19 @@ int ipa_setup_odl_pipe(void) ipa_odl_ep_cfg->desc_fifo_sz = IPA_ODL_RX_RING_SIZE * IPA_FIFO_ELEMENT_SIZE; ipa3_odl_ctx->odl_client_hdl = -1; + + /* For MHIP, ODL functionality is DMA. So bypass aggregation, checksum + * offload, hdr_len. + */ + if (ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ && + ipa3_is_mhip_offload_enabled()) { + IPADBG("MHIP enabled: bypass aggr + csum offload for ODL"); + ipa_odl_ep_cfg->ipa_ep_cfg.aggr.aggr_en = IPA_BYPASS_AGGR; + ipa_odl_ep_cfg->ipa_ep_cfg.cfg.cs_offload_en = + IPA_DISABLE_CS_OFFLOAD; + ipa_odl_ep_cfg->ipa_ep_cfg.hdr.hdr_len = 0; + } + ret = ipa3_setup_sys_pipe(ipa_odl_ep_cfg, &ipa3_odl_ctx->odl_client_hdl); return ret;