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

Commit 10727651 authored by Jeff Hugo's avatar Jeff Hugo Committed by Gerrit - the friendly Code Review server
Browse files

soc: qcom: bam_dmux: Correct payload length handing for dynamic mtu



Packets received under the dynamic mtu feature do not have a valid payload
size in the header, so the correct size is computed based on data from
SPS. This computation is incorrect, which results in the client
processing extra data in the scenario where their protocol requires the
packet to be dropped.

Correct the payload length handling for this scenario.

CRs-Fixed: 830835
Change-Id: I37e2d1bfe390657b9cdc2fcd530762d3daf97036
Signed-off-by: default avatarJeffrey Hugo <jhugo@codeaurora.org>
Signed-off-by: default avatarArun Kumar Neelakantam <aneela@codeaurora.org>
parent 62eb03b5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -699,7 +699,8 @@ static void handle_bam_mux_cmd(struct work_struct *work)
	switch (rx_hdr->cmd) {
	case BAM_MUX_HDR_CMD_DATA:
		if (rx_hdr->pkt_len == 0xffff)
			rx_hdr->pkt_len = sps_size;
			/* SPS includes the header bytes, need just payload */
			rx_hdr->pkt_len = sps_size - sizeof(*rx_hdr);
		DBG_INC_READ_CNT(rx_hdr->pkt_len);
		bam_mux_process_data(rx_skb);
		break;