Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79091
b: refs/heads/master
c: 6d3b2cb
h: refs/heads/master
i:
  79089: 17a99f9
  79087: bb82c4d
v: v3
  • Loading branch information
Pekka Enberg authored and David S. Miller committed Jan 28, 2008
1 parent 584a4ae commit 9ce5d9c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1662e4b7af956979c6cb864bf23cf88f882cdaf8
refs/heads/master: 6d3b2cb92bee1cec43c716f4cd6554be1e6b36ea
34 changes: 6 additions & 28 deletions trunk/drivers/net/ipg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1483,35 +1483,13 @@ static int ipg_nic_rx(struct net_device *dev)
/* Set the buffer's protocol field to Ethernet. */
skb->protocol = eth_type_trans(skb, dev);

/* If the frame contains an IP/TCP/UDP frame,
* determine if upper layer must check IP/TCP/UDP
* checksums.
*
* NOTE: DO NOT RELY ON THE TCP/UDP CHECKSUM
* VERIFICATION FOR SILICON REVISIONS B3
* AND EARLIER!
*
if ((le64_to_cpu(rxfd->rfs &
(IPG_RFS_TCPDETECTED | IPG_RFS_UDPDETECTED |
IPG_RFS_IPDETECTED))) &&
!(le64_to_cpu(rxfd->rfs &
(IPG_RFS_TCPERROR | IPG_RFS_UDPERROR |
IPG_RFS_IPERROR)))) {
* Indicate IP checksums were performed
* by the IPG.
*
skb->ip_summed = CHECKSUM_UNNECESSARY;
} else
/* The IPG encountered an error with (or
* there were no) IP/TCP/UDP checksums.
* This may or may not indicate an invalid
* IP/TCP/UDP frame was received. Let the
* upper layer decide.
*/
{
/* The IPG encountered an error with (or
* there were no) IP/TCP/UDP checksums.
* This may or may not indicate an invalid
* IP/TCP/UDP frame was received. Let the
* upper layer decide.
*/
skb->ip_summed = CHECKSUM_NONE;
}
skb->ip_summed = CHECKSUM_NONE;

/* Hand off frame for higher layer processing.
* The function netif_rx() releases the sk_buff
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/net/ipg.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <linux/skbuff.h>
#include <linux/version.h>
#include <asm/bitops.h>
/*#include <asm/spinlock.h>*/

/*
* Constants
Expand Down Expand Up @@ -733,8 +732,7 @@ enum ipg_regs {
* Miscellaneous macros.
*/

/* Marco for printing debug statements.
# define IPG_DDEBUG_MSG(args...) printk(KERN_DEBUG "IPG: " ## args) */
/* Marco for printing debug statements. */
#ifdef IPG_DEBUG
# define IPG_DEBUG_MSG(args...)
# define IPG_DDEBUG_MSG(args...) printk(KERN_DEBUG "IPG: " args)
Expand Down

0 comments on commit 9ce5d9c

Please sign in to comment.