diff options
author | Kristian Evensen <kristian.evensen@gmail.com> | 2021-06-09 16:32:49 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-09 15:37:07 -0700 |
commit | 8b8701d0b4925807a6d4dc4699cb80a1e16218ad (patch) | |
tree | 67f3bbf4d15e725d9cf0be2270ca945732de216f /drivers/net/ethernet/qualcomm/rmnet | |
parent | 6fb566c9278a2ea65a12fdff665bead392f4c0d2 (diff) | |
download | linux-stable-8b8701d0b4925807a6d4dc4699cb80a1e16218ad.tar.gz linux-stable-8b8701d0b4925807a6d4dc4699cb80a1e16218ad.tar.bz2 linux-stable-8b8701d0b4925807a6d4dc4699cb80a1e16218ad.zip |
net: ethernet: rmnet: Always subtract MAP header
Commit e1d9a90a9bfd ("net: ethernet: rmnet: Support for ingress MAPv5
checksum offload") broke ingress handling for devices where
RMNET_FLAGS_INGRESS_MAP_CKSUMV5 or RMNET_FLAGS_INGRESS_MAP_CKSUMV4 are
not set. Unless either of these flags are set, the MAP header is not
removed. This commit restores the original logic by ensuring that the
MAP header is removed for all MAP packets.
Fixes: e1d9a90a9bfd ("net: ethernet: rmnet: Support for ingress MAPv5 checksum offload")
Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qualcomm/rmnet')
-rw-r--r-- | drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c index 2504d0363b6b..bfbd7847f946 100644 --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c +++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c @@ -88,11 +88,12 @@ __rmnet_map_ingress_handler(struct sk_buff *skb, goto free_skb; skb_pull(skb, sizeof(*map_header)); rmnet_set_skb_proto(skb); - } else if (port->data_format & RMNET_FLAGS_INGRESS_MAP_CKSUMV4) { + } else { /* Subtract MAP header */ skb_pull(skb, sizeof(*map_header)); rmnet_set_skb_proto(skb); - if (!rmnet_map_checksum_downlink_packet(skb, len + pad)) + if (port->data_format & RMNET_FLAGS_INGRESS_MAP_CKSUMV4 && + !rmnet_map_checksum_downlink_packet(skb, len + pad)) skb->ip_summed = CHECKSUM_UNNECESSARY; } |