aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen/netxen_nic_ethtool.c
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2009-04-07 18:50:38 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-08 18:58:24 -0400
commite98e3350c03af4187e1d5fe007c7b460e378990c (patch)
tree5245bf0e0662ab27d1f8b33e629e4b0d118aa189 /drivers/net/netxen/netxen_nic_ethtool.c
parent577c9c456f0e1371cbade38eaf91ae8e8a308555 (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_ethtool.c')
-rw-r--r--drivers/net/netxen/netxen_nic_ethtool.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/net/netxen/netxen_nic_ethtool.c b/drivers/net/netxen/netxen_nic_ethtool.c
index a677ff895184..fe910c1715d6 100644
--- a/drivers/net/netxen/netxen_nic_ethtool.c
+++ b/drivers/net/netxen/netxen_nic_ethtool.c
@@ -30,7 +30,6 @@
30 30
31#include <linux/types.h> 31#include <linux/types.h>
32#include <linux/delay.h> 32#include <linux/delay.h>
33#include <asm/uaccess.h>
34#include <linux/pci.h> 33#include <linux/pci.h>
35#include <asm/io.h> 34#include <asm/io.h>
36#include <linux/netdevice.h> 35#include <linux/netdevice.h>
@@ -53,13 +52,9 @@ struct netxen_nic_stats {
53#define NETXEN_NIC_INVALID_DATA 0xDEADBEEF 52#define NETXEN_NIC_INVALID_DATA 0xDEADBEEF
54 53
55static const struct netxen_nic_stats netxen_nic_gstrings_stats[] = { 54static const struct netxen_nic_stats netxen_nic_gstrings_stats[] = {
56 {"rcvd_bad_skb", NETXEN_NIC_STAT(stats.rcvdbadskb)},
57 {"xmit_called", NETXEN_NIC_STAT(stats.xmitcalled)}, 55 {"xmit_called", NETXEN_NIC_STAT(stats.xmitcalled)},
58 {"xmited_frames", NETXEN_NIC_STAT(stats.xmitedframes)},
59 {"xmit_finished", NETXEN_NIC_STAT(stats.xmitfinished)}, 56 {"xmit_finished", NETXEN_NIC_STAT(stats.xmitfinished)},
60 {"bad_skb_len", NETXEN_NIC_STAT(stats.badskblen)}, 57 {"rx_dropped", NETXEN_NIC_STAT(stats.rxdropped)},
61 {"no_cmd_desc", NETXEN_NIC_STAT(stats.nocmddescriptor)},
62 {"polled", NETXEN_NIC_STAT(stats.polled)},
63 {"tx_dropped", NETXEN_NIC_STAT(stats.txdropped)}, 58 {"tx_dropped", NETXEN_NIC_STAT(stats.txdropped)},
64 {"csummed", NETXEN_NIC_STAT(stats.csummed)}, 59 {"csummed", NETXEN_NIC_STAT(stats.csummed)},
65 {"no_rcv", NETXEN_NIC_STAT(stats.no_rcv)}, 60 {"no_rcv", NETXEN_NIC_STAT(stats.no_rcv)},
@@ -168,7 +163,7 @@ netxen_nic_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
168 ecmd->phy_address = adapter->physical_port; 163 ecmd->phy_address = adapter->physical_port;
169 ecmd->transceiver = XCVR_EXTERNAL; 164 ecmd->transceiver = XCVR_EXTERNAL;
170 165
171 switch ((netxen_brdtype_t)adapter->ahw.board_type) { 166 switch (adapter->ahw.board_type) {
172 case NETXEN_BRDTYPE_P2_SB35_4G: 167 case NETXEN_BRDTYPE_P2_SB35_4G:
173 case NETXEN_BRDTYPE_P2_SB31_2G: 168 case NETXEN_BRDTYPE_P2_SB31_2G:
174 case NETXEN_BRDTYPE_P3_REF_QG: 169 case NETXEN_BRDTYPE_P3_REF_QG:
@@ -227,7 +222,7 @@ netxen_nic_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
227 break; 222 break;
228 default: 223 default:
229 printk(KERN_ERR "netxen-nic: Unsupported board model %d\n", 224 printk(KERN_ERR "netxen-nic: Unsupported board model %d\n",
230 (netxen_brdtype_t)adapter->ahw.board_type); 225 adapter->ahw.board_type);
231 return -EIO; 226 return -EIO;
232 } 227 }
233 228