From patchwork Sat Sep 20 23:47:05 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: atl2: add tx bytes statistic Date: Sat, 20 Sep 2008 13:47:05 -0000 From: Jay Cliburn X-Patchwork-Id: 762 Message-Id: <20080920184705.46ba1669@osprey.hogchain.net> To: jeff@garzik.org Cc: Chris Snook , jie.yang@atheros.com, netdev@vger.kernel.org From: Jay Cliburn Date: Sat, 20 Sep 2008 17:37:05 -0500 Subject: [PATCH] atl2: add tx bytes statistic Let's see how many bytes have been transmitted. Signed-off-by: Jay Cliburn --- drivers/net/atlx/atl2.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c index b2995ac..4f82f66 100644 --- a/drivers/net/atlx/atl2.c +++ b/drivers/net/atlx/atl2.c @@ -522,8 +522,10 @@ static void atl2_intr_tx(struct atl2_adapter *adapter) atomic_set(&adapter->txd_read_ptr, (int)txd_read_ptr); /* tx statistics: */ - if (txs->ok) + if (txs->ok) { + adapter->net_stats.tx_bytes += txs->pkt_size; adapter->net_stats.tx_packets++; + } else adapter->net_stats.tx_errors++;