diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c b/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c index 359ac0594f24..877b87015915 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c @@ -3288,6 +3288,25 @@ static struct sk_buff *handle_skb_completion(struct gsi_chan_xfer_notify if (notify->bytes_xfered) rx_pkt->len = notify->bytes_xfered; + /*Drop packets when WAN consumer channel receive EOB event*/ + if ((notify->evt_id == GSI_CHAN_EVT_EOB || + sys->skip_eot) && + sys->ep->client == IPA_CLIENT_APPS_WAN_CONS) { + dma_unmap_single(ipa3_ctx->pdev, rx_pkt->data.dma_addr, + sys->rx_buff_sz, DMA_FROM_DEVICE); + sys->free_skb(rx_pkt->data.skb); + sys->free_rx_wrapper(rx_pkt); + sys->eob_drop_cnt++; + if (notify->evt_id == GSI_CHAN_EVT_EOB) { + IPADBG("EOB event on WAN consumer channel, drop\n"); + sys->skip_eot = true; + } else { + IPADBG("Reset skip eot flag.\n"); + sys->skip_eot = false; + } + return NULL; + } + rx_skb = rx_pkt->data.skb; skb_set_tail_pointer(rx_skb, rx_pkt->len); rx_skb->len = rx_pkt->len; @@ -3302,13 +3321,6 @@ static struct sk_buff *handle_skb_completion(struct gsi_chan_xfer_notify return NULL; } - /*Assesrt when WAN consumer channel receive EOB event*/ - if (notify->evt_id == GSI_CHAN_EVT_EOB && - sys->ep->client == IPA_CLIENT_APPS_WAN_CONS) { - IPAERR("EOB event received on WAN consumer channel\n"); - ipa_assert(); - } - head = &rx_pkt->sys->pending_pkts[notify->veid]; INIT_LIST_HEAD(&rx_pkt->link); diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_i.h b/drivers/platform/msm/ipa/ipa_v3/ipa_i.h index 4c19209051fd..d4b72c7f28ec 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_i.h +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_i.h @@ -1053,6 +1053,8 @@ struct ipa3_sys_context { struct list_head pending_pkts[GSI_VEID_MAX]; atomic_t xmit_eot_cnt; struct tasklet_struct tasklet; + bool skip_eot; + u32 eob_drop_cnt; /* ordering is important - mutable fields go above */ struct ipa3_ep_context *ep;