diff options
author | Dhananjay Phadke <dhananjay@netxen.com> | 2009-04-07 18:50:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-08 18:58:24 -0400 |
commit | e98e3350c03af4187e1d5fe007c7b460e378990c (patch) | |
tree | 5245bf0e0662ab27d1f8b33e629e4b0d118aa189 /drivers/net/netxen/netxen_nic_main.c | |
parent | 577c9c456f0e1371cbade38eaf91ae8e8a308555 (diff) |
netxen: code cleanup
o remove unused structure defs.
o remove unnecessary includes.
o replace enums with specific #defines.
o reduce footprint of stats structure.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_main.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index aef77289bd34..85693c0f5637 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -29,7 +29,7 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/vmalloc.h> | 31 | #include <linux/vmalloc.h> |
32 | #include <linux/highmem.h> | 32 | #include <linux/interrupt.h> |
33 | #include "netxen_nic_hw.h" | 33 | #include "netxen_nic_hw.h" |
34 | 34 | ||
35 | #include "netxen_nic.h" | 35 | #include "netxen_nic.h" |
@@ -1598,10 +1598,6 @@ static void netxen_tx_timeout_task(struct work_struct *work) | |||
1598 | netif_wake_queue(adapter->netdev); | 1598 | netif_wake_queue(adapter->netdev); |
1599 | } | 1599 | } |
1600 | 1600 | ||
1601 | /* | ||
1602 | * netxen_nic_get_stats - Get System Network Statistics | ||
1603 | * @netdev: network interface device structure | ||
1604 | */ | ||
1605 | struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev) | 1601 | struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev) |
1606 | { | 1602 | { |
1607 | struct netxen_adapter *adapter = netdev_priv(netdev); | 1603 | struct netxen_adapter *adapter = netdev_priv(netdev); |
@@ -1609,22 +1605,11 @@ struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev) | |||
1609 | 1605 | ||
1610 | memset(stats, 0, sizeof(*stats)); | 1606 | memset(stats, 0, sizeof(*stats)); |
1611 | 1607 | ||
1612 | /* total packets received */ | ||
1613 | stats->rx_packets = adapter->stats.no_rcv; | 1608 | stats->rx_packets = adapter->stats.no_rcv; |
1614 | /* total packets transmitted */ | 1609 | stats->tx_packets = adapter->stats.xmitfinished; |
1615 | stats->tx_packets = adapter->stats.xmitedframes + | ||
1616 | adapter->stats.xmitfinished; | ||
1617 | /* total bytes received */ | ||
1618 | stats->rx_bytes = adapter->stats.rxbytes; | 1610 | stats->rx_bytes = adapter->stats.rxbytes; |
1619 | /* total bytes transmitted */ | ||
1620 | stats->tx_bytes = adapter->stats.txbytes; | 1611 | stats->tx_bytes = adapter->stats.txbytes; |
1621 | /* bad packets received */ | ||
1622 | stats->rx_errors = adapter->stats.rcvdbadskb; | ||
1623 | /* packet transmit problems */ | ||
1624 | stats->tx_errors = adapter->stats.nocmddescriptor; | ||
1625 | /* no space in linux buffers */ | ||
1626 | stats->rx_dropped = adapter->stats.rxdropped; | 1612 | stats->rx_dropped = adapter->stats.rxdropped; |
1627 | /* no space available in linux */ | ||
1628 | stats->tx_dropped = adapter->stats.txdropped; | 1613 | stats->tx_dropped = adapter->stats.txdropped; |
1629 | 1614 | ||
1630 | return stats; | 1615 | return stats; |