aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/jme.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/jme.c')
-rw-r--r--drivers/net/jme.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/jme.c b/drivers/net/jme.c
index 29cd5f43eea5..e7068c7cd627 100644
--- a/drivers/net/jme.c
+++ b/drivers/net/jme.c
@@ -880,27 +880,27 @@ jme_rxsum_ok(struct jme_adapter *jme, u16 flags)
880 if (!(flags & (RXWBFLAG_TCPON | RXWBFLAG_UDPON | RXWBFLAG_IPV4))) 880 if (!(flags & (RXWBFLAG_TCPON | RXWBFLAG_UDPON | RXWBFLAG_IPV4)))
881 return false; 881 return false;
882 882
883 if (unlikely(!(flags & RXWBFLAG_MF) && 883 if (unlikely((flags & (RXWBFLAG_MF | RXWBFLAG_TCPON | RXWBFLAG_TCPCS))
884 (flags & RXWBFLAG_TCPON) && !(flags & RXWBFLAG_TCPCS))) { 884 == RXWBFLAG_TCPON)) {
885 msg_rx_err(jme, "TCP Checksum error.\n"); 885 if (flags & RXWBFLAG_IPV4)
886 goto out_sumerr; 886 msg_rx_err(jme, "TCP Checksum error\n");
887 return false;
887 } 888 }
888 889
889 if (unlikely(!(flags & RXWBFLAG_MF) && 890 if (unlikely((flags & (RXWBFLAG_MF | RXWBFLAG_UDPON | RXWBFLAG_UDPCS))
890 (flags & RXWBFLAG_UDPON) && !(flags & RXWBFLAG_UDPCS))) { 891 == RXWBFLAG_UDPON)) {
891 msg_rx_err(jme, "UDP Checksum error.\n"); 892 if (flags & RXWBFLAG_IPV4)
892 goto out_sumerr; 893 msg_rx_err(jme, "UDP Checksum error.\n");
894 return false;
893 } 895 }
894 896
895 if (unlikely((flags & RXWBFLAG_IPV4) && !(flags & RXWBFLAG_IPCS))) { 897 if (unlikely((flags & (RXWBFLAG_IPV4 | RXWBFLAG_IPCS))
898 == RXWBFLAG_IPV4)) {
896 msg_rx_err(jme, "IPv4 Checksum error.\n"); 899 msg_rx_err(jme, "IPv4 Checksum error.\n");
897 goto out_sumerr; 900 return false;
898 } 901 }
899 902
900 return true; 903 return true;
901
902out_sumerr:
903 return false;
904} 904}
905 905
906static void 906static void