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

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

Merge "msm: ipa: Add graceful handling to skip partial packets"

parents abdbe88f e5448107
Loading
Loading
Loading
Loading
+19 −7
Original line number Diff line number Diff line
@@ -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);
+2 −0
Original line number Diff line number Diff line
@@ -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;