Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15833
b: refs/heads/master
c: 6e15b71
h: refs/heads/master
i:
  15831: a329f5b
v: v3
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Dec 24, 2005
1 parent b1048e1 commit 703ba10
Show file tree
Hide file tree
Showing 2 changed files with 10 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: 6ed995bb29f042eece8392d9bae0b83f84bcdb23
refs/heads/master: 6e15b7124990e4b91645601e7a90d3fe72873336
9 changes: 9 additions & 0 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1694,6 +1694,9 @@ static struct sk_buff *sky2_receive(struct sky2_port *sky2,
if (!(status & GMR_FS_RX_OK))
goto resubmit;

if ((status >> 16) != length || length > sky2->rx_bufsize)
goto oversize;

if (length < copybreak) {
skb = alloc_skb(length + 2, GFP_ATOMIC);
if (!skb)
Expand Down Expand Up @@ -1735,7 +1738,13 @@ static struct sk_buff *sky2_receive(struct sky2_port *sky2,

return skb;

oversize:
++sky2->net_stats.rx_over_errors;
goto resubmit;

error:
++sky2->net_stats.rx_errors;

if (netif_msg_rx_err(sky2))
printk(KERN_INFO PFX "%s: rx error, status 0x%x length %d\n",
sky2->netdev->name, status, length);
Expand Down

0 comments on commit 703ba10

Please sign in to comment.