aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/et131x/et1310_rx.c
diff options
context:
space:
mode:
authorMark Einon <mark.einon@gmail.com>2011-07-03 18:08:22 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-07-05 19:54:58 -0700
commita7aa8a028dcaeb6ad4e4161399dd26713e95efd2 (patch)
treead0aa9e9cb90080f7dc80617adac5297e8aa56bc /drivers/staging/et131x/et1310_rx.c
parent2b4baab313fefc4eaef7a034f5ff8c8c08a48daf (diff)
staging: et131x: Fix stats->rx_packets accounting
The net_device_stats->rx_packets counter is not getting updated. This is due to checking a fMP_ADAPTER_LINK_DETECTION flag prior to updating which is never set. Solved by using netif_carrier_ok() to test for a link, and removing the fMP_ADAPTER_LINK_DETECTION flag, which looks to be a broken mechanism. Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/et131x/et1310_rx.c')
-rw-r--r--drivers/staging/et131x/et1310_rx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c
index 100ee9b4e43..6c0a64bdd59 100644
--- a/drivers/staging/et131x/et1310_rx.c
+++ b/drivers/staging/et131x/et1310_rx.c
@@ -1126,10 +1126,9 @@ void et131x_handle_recv_interrupt(struct et131x_adapter *etdev)
* Free buffer ring.
*/
if (!etdev->PacketFilter ||
- !(etdev->Flags & fMP_ADAPTER_LINK_DETECTION) ||
- rfd->len == 0) {
+ !netif_carrier_ok(etdev->netdev) ||
+ rfd->len == 0)
continue;
- }
/* Increment the number of packets we received */
etdev->stats.ipackets++;