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

Commit c6482ce7 authored by Arun Kumar Neelakantam's avatar Arun Kumar Neelakantam
Browse files

soc: qcom: bam_dmux: Restore the skb to orginal in write_done



The client skb buffers are updated with bam_dmux transport header
and padding information during bam_dmux write which alters the actual
skb buffers data and length send by the clients.

Remove the bam_dmux header and padding length from skb before notifying
client in the write_done callback.

CRs-Fixed: 689227
Change-Id: If33bd2f7addba8da83742b9337d84ec7b52db525
Signed-off-by: default avatarArun Kumar Neelakantam <aneela@codeaurora.org>
parent 9d075f70
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -839,6 +839,11 @@ static void bam_mux_write_done(struct work_struct *work)
	kfree(info);
	hdr = (struct bam_mux_hdr *)skb->data;
	DBG_INC_WRITE_CNT(skb->len);
	/* Restore skb for client */
	skb_pull(skb, sizeof(*hdr));
	if (hdr->pad_len)
		skb_trim(skb, skb->len - hdr->pad_len);

	event_data = (unsigned long)(skb);
	spin_lock_irqsave(&bam_ch[hdr->ch_id].lock, flags);
	bam_ch[hdr->ch_id].num_tx_pkts--;