When driver can't allocate receive buffer it drops incoming
packet, so update counter.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>

---
 drivers/net/sky2.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- sky2-2.6.21.orig/drivers/net/sky2.c 2007-05-08 10:28:50.000000000 -0700
+++ sky2-2.6.21/drivers/net/sky2.c      2007-05-08 10:28:54.000000000 -0700
@@ -2132,8 +2132,10 @@ static int sky2_status_intr(struct sky2_
                switch (le->opcode & ~HW_OWNER) {
                case OP_RXSTAT:
                        skb = sky2_receive(dev, length, status);
-                       if (!skb)
+                       if (unlikely(!skb)) {
+                               sky2->net_stats.rx_dropped++;
                                goto force_update;
+                       }
 
                        skb->protocol = eth_type_trans(skb, dev);
                        sky2->net_stats.rx_packets++;

--

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to