aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/s2io.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/s2io.c')
-rw-r--r--drivers/net/s2io.c47
1 files changed, 20 insertions, 27 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 26895de3e264..7f6b0e611e3b 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -5040,12 +5040,6 @@ static void s2io_ethtool_gdrvinfo(struct net_device *dev,
5040 strncpy(info->bus_info, pci_name(sp->pdev), sizeof(info->bus_info)); 5040 strncpy(info->bus_info, pci_name(sp->pdev), sizeof(info->bus_info));
5041 info->regdump_len = XENA_REG_SPACE; 5041 info->regdump_len = XENA_REG_SPACE;
5042 info->eedump_len = XENA_EEPROM_SPACE; 5042 info->eedump_len = XENA_EEPROM_SPACE;
5043 info->testinfo_len = S2IO_TEST_LEN;
5044
5045 if (sp->device_type == XFRAME_I_DEVICE)
5046 info->n_stats = XFRAME_I_STAT_LEN;
5047 else
5048 info->n_stats = XFRAME_II_STAT_LEN;
5049} 5043}
5050 5044
5051/** 5045/**
@@ -6241,9 +6235,25 @@ static int s2io_get_eeprom_len(struct net_device *dev)
6241 return (XENA_EEPROM_SPACE); 6235 return (XENA_EEPROM_SPACE);
6242} 6236}
6243 6237
6244static int s2io_ethtool_self_test_count(struct net_device *dev) 6238static int s2io_get_sset_count(struct net_device *dev, int sset)
6245{ 6239{
6246 return (S2IO_TEST_LEN); 6240 struct s2io_nic *sp = dev->priv;
6241
6242 switch (sset) {
6243 case ETH_SS_TEST:
6244 return S2IO_TEST_LEN;
6245 case ETH_SS_STATS:
6246 switch(sp->device_type) {
6247 case XFRAME_I_DEVICE:
6248 return XFRAME_I_STAT_LEN;
6249 case XFRAME_II_DEVICE:
6250 return XFRAME_II_STAT_LEN;
6251 default:
6252 return 0;
6253 }
6254 default:
6255 return -EOPNOTSUPP;
6256 }
6247} 6257}
6248 6258
6249static void s2io_ethtool_get_strings(struct net_device *dev, 6259static void s2io_ethtool_get_strings(struct net_device *dev,
@@ -6270,22 +6280,6 @@ static void s2io_ethtool_get_strings(struct net_device *dev,
6270 sizeof(ethtool_driver_stats_keys)); 6280 sizeof(ethtool_driver_stats_keys));
6271 } 6281 }
6272} 6282}
6273static int s2io_ethtool_get_stats_count(struct net_device *dev)
6274{
6275 struct s2io_nic *sp = dev->priv;
6276 int stat_count = 0;
6277 switch(sp->device_type) {
6278 case XFRAME_I_DEVICE:
6279 stat_count = XFRAME_I_STAT_LEN;
6280 break;
6281
6282 case XFRAME_II_DEVICE:
6283 stat_count = XFRAME_II_STAT_LEN;
6284 break;
6285 }
6286
6287 return stat_count;
6288}
6289 6283
6290static int s2io_ethtool_op_set_tx_csum(struct net_device *dev, u32 data) 6284static int s2io_ethtool_op_set_tx_csum(struct net_device *dev, u32 data)
6291{ 6285{
@@ -6331,12 +6325,11 @@ static const struct ethtool_ops netdev_ethtool_ops = {
6331 .get_tso = s2io_ethtool_op_get_tso, 6325 .get_tso = s2io_ethtool_op_get_tso,
6332 .set_tso = s2io_ethtool_op_set_tso, 6326 .set_tso = s2io_ethtool_op_set_tso,
6333 .set_ufo = ethtool_op_set_ufo, 6327 .set_ufo = ethtool_op_set_ufo,
6334 .self_test_count = s2io_ethtool_self_test_count,
6335 .self_test = s2io_ethtool_test, 6328 .self_test = s2io_ethtool_test,
6336 .get_strings = s2io_ethtool_get_strings, 6329 .get_strings = s2io_ethtool_get_strings,
6337 .phys_id = s2io_ethtool_idnic, 6330 .phys_id = s2io_ethtool_idnic,
6338 .get_stats_count = s2io_ethtool_get_stats_count, 6331 .get_ethtool_stats = s2io_get_ethtool_stats,
6339 .get_ethtool_stats = s2io_get_ethtool_stats 6332 .get_sset_count = s2io_get_sset_count,
6340}; 6333};
6341 6334
6342/** 6335/**