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

Commit f578b7da authored by Subash Abhinov Kasiviswanathan's avatar Subash Abhinov Kasiviswanathan
Browse files

net: qualcomm: rmnet: Remove redundant command check



The command packet size is already checked once in
rmnet_map_deaggregate() for the header, packet and trailer size, so
this additional check is not needed.

CRs-Fixed: 2226308
Change-Id: If0ff3fe8a0f0233309ed27d74424a310dcb1ecdf
igned-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Git-commit: 721ce0f644401c923a266cb084c40ebc58b18f93
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git


Signed-off-by: default avatarSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
parent 5a9b2e52
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -69,17 +69,9 @@ static void rmnet_map_send_ack(struct sk_buff *skb,
	struct rmnet_map_control_command *cmd;
	int xmit_status;

	if (port->data_format & RMNET_FLAGS_INGRESS_MAP_CKSUMV4) {
		if (skb->len < sizeof(struct rmnet_map_header) +
		    RMNET_MAP_GET_LENGTH(skb) +
		    sizeof(struct rmnet_map_dl_csum_trailer)) {
			kfree_skb(skb);
			return;
		}

		skb_trim(skb, skb->len -
			 sizeof(struct rmnet_map_dl_csum_trailer));
	}
	if (port->data_format & RMNET_FLAGS_INGRESS_MAP_CKSUMV4)
		skb_trim(skb,
			 skb->len - sizeof(struct rmnet_map_dl_csum_trailer));

	skb->protocol = htons(ETH_P_MAP);