revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36
[firefly-linux-kernel-4.4.55.git] / drivers / net / 8139cp.c
index 70609eefc2dec1a9b97ac6d749c2f76bb27c139b..4a4f6b81e32de9ae8c85f9dd6aa379927d0ffaa0 100644 (file)
@@ -490,11 +490,13 @@ static inline unsigned int cp_rx_csum_ok (u32 status)
 {
        unsigned int protocol = (status >> 16) & 0x3;
 
-       if (((protocol == RxProtoTCP) && !(status & TCPFail)) ||
-           ((protocol == RxProtoUDP) && !(status & UDPFail)))
+       if (likely((protocol == RxProtoTCP) && (!(status & TCPFail))))
                return 1;
-       else
-               return 0;
+       else if ((protocol == RxProtoUDP) && (!(status & UDPFail)))
+               return 1;
+       else if ((protocol == RxProtoIP) && (!(status & IPFail)))
+               return 1;
+       return 0;
 }
 
 static int cp_rx_poll(struct napi_struct *napi, int budget)