diff options
-rw-r--r-- | drivers/net/sky2.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 99a999383e9b..4e0b839de7e4 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -2109,6 +2109,9 @@ static struct sk_buff *sky2_receive(struct net_device *dev, | |||
2109 | if (!(status & GMR_FS_RX_OK)) | 2109 | if (!(status & GMR_FS_RX_OK)) |
2110 | goto resubmit; | 2110 | goto resubmit; |
2111 | 2111 | ||
2112 | if (status >> 16 != length) | ||
2113 | goto len_mismatch; | ||
2114 | |||
2112 | if (length < copybreak) | 2115 | if (length < copybreak) |
2113 | skb = receive_copy(sky2, re, length); | 2116 | skb = receive_copy(sky2, re, length); |
2114 | else | 2117 | else |
@@ -2118,6 +2121,11 @@ resubmit: | |||
2118 | 2121 | ||
2119 | return skb; | 2122 | return skb; |
2120 | 2123 | ||
2124 | len_mismatch: | ||
2125 | /* Truncation of overlength packets | ||
2126 | causes PHY length to not match MAC length */ | ||
2127 | ++sky2->net_stats.rx_length_errors; | ||
2128 | |||
2121 | error: | 2129 | error: |
2122 | ++sky2->net_stats.rx_errors; | 2130 | ++sky2->net_stats.rx_errors; |
2123 | if (status & GMR_FS_RX_FF_OV) { | 2131 | if (status & GMR_FS_RX_FF_OV) { |