浏览代码

[PATCH] 3c59x: correct rx_dropped counting

Only increment rx_dropped in case of lack of resources (i.e. not for
frames with errors).

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
John W. Linville 19 年之前
父节点
当前提交
35b306743d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/3c59x.c

+ 1 - 1
drivers/net/3c59x.c

@@ -2608,8 +2608,8 @@ static int vortex_rx(struct net_device *dev)
 			} else if (vortex_debug > 0)
 			} else if (vortex_debug > 0)
 				printk(KERN_NOTICE "%s: No memory to allocate a sk_buff of "
 				printk(KERN_NOTICE "%s: No memory to allocate a sk_buff of "
 					   "size %d.\n", dev->name, pkt_len);
 					   "size %d.\n", dev->name, pkt_len);
+			vp->stats.rx_dropped++;
 		}
 		}
-		vp->stats.rx_dropped++;
 		issue_and_wait(dev, RxDiscard);
 		issue_and_wait(dev, RxDiscard);
 	}
 	}