aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>2018-05-15 20:52:02 -0400
committerDavid S. Miller <davem@davemloft.net>2018-05-16 14:23:04 -0400
commit721ce0f644401c923a266cb084c40ebc58b18f93 (patch)
treebd6bbcecf8b1d0c9cfbc5ab3fe182c32f3d7fe2b
parentbbde32d38bfbbc4a6970498c7470a8a817122735 (diff)
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. Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c
index 78fdad0c6f76..56a93df962e6 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c
@@ -69,17 +69,9 @@ static void rmnet_map_send_ack(struct sk_buff *skb,
69 struct rmnet_map_control_command *cmd; 69 struct rmnet_map_control_command *cmd;
70 int xmit_status; 70 int xmit_status;
71 71
72 if (port->data_format & RMNET_FLAGS_INGRESS_MAP_CKSUMV4) { 72 if (port->data_format & RMNET_FLAGS_INGRESS_MAP_CKSUMV4)
73 if (skb->len < sizeof(struct rmnet_map_header) + 73 skb_trim(skb,
74 RMNET_MAP_GET_LENGTH(skb) + 74 skb->len - sizeof(struct rmnet_map_dl_csum_trailer));
75 sizeof(struct rmnet_map_dl_csum_trailer)) {
76 kfree_skb(skb);
77 return;
78 }
79
80 skb_trim(skb, skb->len -
81 sizeof(struct rmnet_map_dl_csum_trailer));
82 }
83 75
84 skb->protocol = htons(ETH_P_MAP); 76 skb->protocol = htons(ETH_P_MAP);
85 77