Skip to content

Commit

Permalink
staging: slicoss Use dev->stats rather than adapter->stats.
Browse files Browse the repository at this point in the history
Use dev->stats rather than adapter->stats.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
kirjanov@gmail.com authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent d9c057a commit 6c7aeb6
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions drivers/staging/slicoss/slicoss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1230,21 +1230,20 @@ static void slic_init_cleanup(struct adapter *adapter)
static struct net_device_stats *slic_get_stats(struct net_device *dev)
{
struct adapter *adapter = netdev_priv(dev);
struct net_device_stats *stats;

ASSERT(adapter);
stats = &adapter->stats;
stats->collisions = adapter->slic_stats.iface.xmit_collisions;
stats->rx_errors = adapter->slic_stats.iface.rcv_errors;
stats->tx_errors = adapter->slic_stats.iface.xmt_errors;
stats->rx_missed_errors = adapter->slic_stats.iface.rcv_discards;
stats->tx_heartbeat_errors = 0;
stats->tx_aborted_errors = 0;
stats->tx_window_errors = 0;
stats->tx_fifo_errors = 0;
stats->rx_frame_errors = 0;
stats->rx_length_errors = 0;
return &adapter->stats;
dev->stats.collisions = adapter->slic_stats.iface.xmit_collisions;
dev->stats.rx_errors = adapter->slic_stats.iface.rcv_errors;
dev->stats.tx_errors = adapter->slic_stats.iface.xmt_errors;
dev->stats.rx_missed_errors = adapter->slic_stats.iface.rcv_discards;
dev->stats.tx_heartbeat_errors = 0;
dev->stats.tx_aborted_errors = 0;
dev->stats.tx_window_errors = 0;
dev->stats.tx_fifo_errors = 0;
dev->stats.rx_frame_errors = 0;
dev->stats.rx_length_errors = 0;

return &dev->stats;
}

/*
Expand Down

0 comments on commit 6c7aeb6

Please sign in to comment.