diff mbox

[1/7] via-velocity: Correct setting of skipped checksums

Message ID 20091120161205.6ddeb3ff@marrow.netinsight.se
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Simon Kagstrom Nov. 20, 2009, 3:12 p.m. UTC
(Taken from the VIA driver). Check that this is actually an UDP or TCP
packet before claiming that the checksum is unnecessary.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
---
 drivers/net/via-velocity.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

David Miller Nov. 20, 2009, 5:36 p.m. UTC | #1
From: Simon Kagstrom <simon.kagstrom@netinsight.net>
Date: Fri, 20 Nov 2009 16:12:05 +0100

> (Taken from the VIA driver). Check that this is actually an UDP or TCP
> packet before claiming that the checksum is unnecessary.
> 
> Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>

Why would the chip specifically say UDP or TCP checksum is OK
on a packet that is not of said protocol type?

Just wondering...
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index e04e5be..af79969 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -1924,8 +1924,8 @@  static inline void velocity_rx_csum(struct rx_desc *rd, struct sk_buff *skb)
 					(rd->rdesc1.CSM & CSM_UDPKT)) {
 				if (!(rd->rdesc1.CSM & CSM_TUPOK))
 					return;
+				skb->ip_summed = CHECKSUM_UNNECESSARY;
 			}
-			skb->ip_summed = CHECKSUM_UNNECESSARY;
 		}
 	}
 }