aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2010-02-03 08:31:12 +0000
committerDavid S. Miller <davem@davemloft.net>2010-02-03 20:32:29 -0800
commit90c30335a70e96b8b8493b7deb15e6b30e6d9fce (patch)
tree1d1f71bb8bba8c0e0d07f9fb80e5167aefcc2d3b /drivers/net/sky2.c
parent3fbd9187d004149fb8a98c9cb51ef9f4a4f66aca (diff)
sky2: Flow control frames recorded as dropped packets
Thanks for your patch. A more general solution would be to move the rx_dropped up into sky2_receive. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 72c92495a9b..744362272e2 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2404,6 +2404,9 @@ okay:
skb = receive_copy(sky2, re, length);
else
skb = receive_new(sky2, re, length);
+
+ dev->stats.rx_dropped += (skb == NULL);
+
resubmit:
sky2_rx_submit(sky2, re);
@@ -2515,11 +2518,10 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx)
case OP_RXSTAT:
total_packets[port]++;
total_bytes[port] += length;
+
skb = sky2_receive(dev, length, status);
- if (unlikely(!skb)) {
- dev->stats.rx_dropped++;
+ if (!skb)
break;
- }
/* This chip reports checksum status differently */
if (hw->flags & SKY2_HW_NEW_LE) {