Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58724
b: refs/heads/master
c: 7174953
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Jul 10, 2007
1 parent 1862e1c commit 8bf63a8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f4331a6d24f2e5524678caf4621d35f33fb934da
refs/heads/master: 71749531f2d1954137a1a77422ef4ff29eb102dd
8 changes: 8 additions & 0 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2109,6 +2109,9 @@ static struct sk_buff *sky2_receive(struct net_device *dev,
if (!(status & GMR_FS_RX_OK))
goto resubmit;

if (status >> 16 != length)
goto len_mismatch;

if (length < copybreak)
skb = receive_copy(sky2, re, length);
else
Expand All @@ -2118,6 +2121,11 @@ static struct sk_buff *sky2_receive(struct net_device *dev,

return skb;

len_mismatch:
/* Truncation of overlength packets
causes PHY length to not match MAC length */
++sky2->net_stats.rx_length_errors;

error:
++sky2->net_stats.rx_errors;
if (status & GMR_FS_RX_FF_OV) {
Expand Down

0 comments on commit 8bf63a8

Please sign in to comment.