diff options
author | Sathya Perla <sathya.perla@emulex.com> | 2011-07-25 19:10:14 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-01 00:11:59 -0700 |
commit | ac124ff973e2780279774a30dd924affef758a51 (patch) | |
tree | 1df7efa8c135ee686860c3c296e30fbd2ce652e2 /drivers/net/benet/be_cmds.c | |
parent | 1b4c8af8d2e9bfb474f233b010988ec008ae2ffa (diff) |
be2net: cleanup and refactor stats code
In preparation for 64-bit stats interface, the following cleanups help
streamline the code:
1) made some more rx/tx stats stored by driver 64 bit
2) made some HW stas (err/drop counters) stored in be_drv_stats 32 bit to
keep the code simple as BE provides 32-bit counters only.
3) removed duplication of netdev stats in ethtool
4) removed some un-necessary stats and fixed some names
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be_cmds.c')
-rw-r--r-- | drivers/net/benet/be_cmds.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index 054fa67bc4e..e15f06aacab 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c @@ -82,26 +82,6 @@ static int be_mcc_compl_process(struct be_adapter *adapter, if (((compl->tag0 == OPCODE_ETH_GET_STATISTICS) || (compl->tag0 == OPCODE_ETH_GET_PPORT_STATS)) && (compl->tag1 == CMD_SUBSYSTEM_ETH)) { - if (adapter->generation == BE_GEN3) { - if (lancer_chip(adapter)) { - struct lancer_cmd_resp_pport_stats - *resp = adapter->stats_cmd.va; - be_dws_le_to_cpu(&resp->pport_stats, - sizeof(resp->pport_stats)); - } else { - struct be_cmd_resp_get_stats_v1 *resp = - adapter->stats_cmd.va; - - be_dws_le_to_cpu(&resp->hw_stats, - sizeof(resp->hw_stats)); - } - } else { - struct be_cmd_resp_get_stats_v0 *resp = - adapter->stats_cmd.va; - - be_dws_le_to_cpu(&resp->hw_stats, - sizeof(resp->hw_stats)); - } be_parse_stats(adapter); netdev_stats_update(adapter); adapter->stats_cmd_sent = false; |