net: bcmgenet: fix accounting of packet drops vs errors
authorPetri Gynther <pgynther@google.com>
Fri, 10 Jul 2015 23:20:00 +0000 (16:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 12 Jul 2015 04:16:08 +0000 (21:16 -0700)
commitc590032f9ab8d03aab235a7601db22a267c2d958
tree227ad660d2e3efabc382a9d698b071cea4c86709
parent22401ff17f993bda9acd14ac39213e6f9bb985d0
net: bcmgenet: fix accounting of packet drops vs errors

bcmgenet driver needs to separate packet drops from packet errors.

When the driver has to drop a *good* packet, due to lack of buffers or
replacement skbs, increment only dev->stats.[rx|tx]_dropped.

When the driver encounters a bad Rx packet or Tx error, increment only
dev->stats.[rx|tx]_errors + relevant detailed error counter.

Signed-off-by: Petri Gynther <pgynther@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c