Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 265188
b: refs/heads/master
c: f3f70bf
h: refs/heads/master
v: v3
  • Loading branch information
Matvejchikov Ilya authored and David S. Miller committed Aug 4, 2011
1 parent eca2a4b commit c33d195
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0d1d5875ef6c7903ab86ae3ecdbc78a5ca2e44ee
refs/heads/master: f3f70bf6ac256b2c016e4f4561769f63dfb7c8f2
29 changes: 14 additions & 15 deletions trunk/drivers/net/slip.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,34 +562,33 @@ static struct rtnl_link_stats64 *
sl_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats)
{
struct net_device_stats *devstats = &dev->stats;
unsigned long c_rx_dropped = 0;
#ifdef SL_INCLUDE_CSLIP
unsigned long c_rx_fifo_errors = 0;
unsigned long c_tx_fifo_errors = 0;
unsigned long c_collisions = 0;
struct slip *sl = netdev_priv(dev);
struct slcompress *comp = sl->slcomp;

if (comp) {
c_rx_fifo_errors = comp->sls_i_compressed;
c_rx_dropped = comp->sls_i_tossed;
c_tx_fifo_errors = comp->sls_o_compressed;
c_collisions = comp->sls_o_misses;
}
stats->rx_fifo_errors = sl->rx_compressed + c_rx_fifo_errors;
stats->tx_fifo_errors = sl->tx_compressed + c_tx_fifo_errors;
stats->collisions = sl->tx_misses + c_collisions;
#endif
stats->rx_packets = devstats->rx_packets;
stats->tx_packets = devstats->tx_packets;
stats->rx_bytes = devstats->rx_bytes;
stats->tx_bytes = devstats->tx_bytes;
stats->rx_dropped = devstats->rx_dropped + c_rx_dropped;
stats->rx_dropped = devstats->rx_dropped;
stats->tx_dropped = devstats->tx_dropped;
stats->tx_errors = devstats->tx_errors;
stats->rx_errors = devstats->rx_errors;
stats->rx_over_errors = devstats->rx_over_errors;

#ifdef SL_INCLUDE_CSLIP
if (comp) {
/* Generic compressed statistics */
stats->rx_compressed = comp->sls_i_compressed;
stats->tx_compressed = comp->sls_o_compressed;

/* Are we really still needs this? */
stats->rx_fifo_errors += comp->sls_i_compressed;
stats->rx_dropped += comp->sls_i_tossed;
stats->tx_fifo_errors += comp->sls_o_compressed;
stats->collisions += comp->sls_o_misses;
}
#endif
return stats;
}

Expand Down
9 changes: 0 additions & 9 deletions trunk/drivers/net/slip.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,6 @@ struct slip {
unsigned char *xbuff; /* transmitter buffer */
unsigned char *xhead; /* pointer to next byte to XMIT */
int xleft; /* bytes left in XMIT queue */

/* SLIP interface statistics. */
#ifdef SL_INCLUDE_CSLIP
unsigned long tx_compressed;
unsigned long rx_compressed;
unsigned long tx_misses;
#endif
/* Detailed SLIP statistics. */

int mtu; /* Our mtu (to spot changes!) */
int buffsize; /* Max buffers sizes */

Expand Down

0 comments on commit c33d195

Please sign in to comment.