[ETHTOOL] Provide default behaviors for a few ethtool sub-ioctls
authorJeff Garzik <jeff@garzik.org>
Sat, 15 Sep 2007 21:41:06 +0000 (14:41 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:51:17 +0000 (16:51 -0700)
For the operations
get-tx-csum
get-sg
get-tso
get-ufo
the default ethtool_op_xxx behavior is fine for all drivers, so we
permit op==NULL to imply the default behavior.

This provides a more uniform behavior across all drivers, eliminating
ethtool(8) "ioctl not supported" errors on older drivers that had
not been updated for the latest sub-ioctls.

The ethtool_op_xxx() functions are left exported, in case anyone
wishes to call them directly from a driver-private implementation --
a not-uncommon case.  Should an ethtool_op_xxx() helper remain unused
for a while, except by net/core/ethtool.c, we can un-export it at a
later date.

[ Resolved conflicts with set/get value ethtool patch... -DaveM ]

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
38 files changed:
drivers/net/8139cp.c
drivers/net/atl1/atl1_ethtool.c
drivers/net/bnx2.c
drivers/net/bonding/bond_main.c
drivers/net/chelsio/cxgb2.c
drivers/net/cxgb3/cxgb3_main.c
drivers/net/e1000/e1000_ethtool.c
drivers/net/ehea/ehea_ethtool.c
drivers/net/epic100.c
drivers/net/fealnx.c
drivers/net/fec_8xx/fec_main.c
drivers/net/forcedeth.c
drivers/net/fs_enet/fs_enet-main.c
drivers/net/ibm_emac/ibm_emac_core.c
drivers/net/ibmveth.c
drivers/net/ixgb/ixgb_ethtool.c
drivers/net/loopback.c
drivers/net/macvlan.c
drivers/net/mv643xx_eth.c
drivers/net/myri10ge/myri10ge.c
drivers/net/ne2k-pci.c
drivers/net/netxen/netxen_nic_ethtool.c
drivers/net/pcnet32.c
drivers/net/r8169.c
drivers/net/s2io.c
drivers/net/sc92031.c
drivers/net/skge.c
drivers/net/sky2.c
drivers/net/spider_net_ethtool.c
drivers/net/tg3.c
drivers/net/tulip/de2104x.c
drivers/net/tulip/winbond-840.c
drivers/net/typhoon.c
drivers/net/ucc_geth_ethtool.c
drivers/net/via-rhine.c
drivers/net/xen-netfront.c
net/bridge/br_device.c
net/core/ethtool.c

index 30310ed9f75fd616946b869f9abfd91926eecc39..58fad1b2f72e1e00b61802d53c05a1349ca841b7 100644 (file)
@@ -1572,11 +1572,8 @@ static const struct ethtool_ops cp_ethtool_ops = {
        .set_msglevel           = cp_set_msglevel,
        .get_rx_csum            = cp_get_rx_csum,
        .set_rx_csum            = cp_set_rx_csum,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
        .set_tx_csum            = ethtool_op_set_tx_csum, /* local! */
-       .get_sg                 = ethtool_op_get_sg,
        .set_sg                 = ethtool_op_set_sg,
-       .get_tso                = ethtool_op_get_tso,
        .set_tso                = ethtool_op_set_tso,
        .get_regs               = cp_get_regs,
        .get_wol                = cp_get_wol,
index 1f616c5c14739437d0e8efffa856c6df7824825c..53353b60a9c8bb3063f66cc52b4134554e5bae36 100644 (file)
@@ -489,15 +489,12 @@ const struct ethtool_ops atl1_ethtool_ops = {
        .get_pauseparam         = atl1_get_pauseparam,
        .set_pauseparam         = atl1_set_pauseparam,
        .get_rx_csum            = atl1_get_rx_csum,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
        .set_tx_csum            = ethtool_op_set_tx_hw_csum,
        .get_link               = ethtool_op_get_link,
-       .get_sg                 = ethtool_op_get_sg,
        .set_sg                 = ethtool_op_set_sg,
        .get_strings            = atl1_get_strings,
        .nway_reset             = atl1_nway_reset,
        .get_ethtool_stats      = atl1_get_ethtool_stats,
        .get_stats_count        = atl1_get_stats_count,
-       .get_tso                = ethtool_op_get_tso,
        .set_tso                = ethtool_op_set_tso,
 };
index f1e7204f78c9f08a8e2a7935957c0860e357a96b..5ee805b3e0e68cf703090ffb982da3e5d08759fd 100644 (file)
@@ -6257,11 +6257,8 @@ static const struct ethtool_ops bnx2_ethtool_ops = {
        .set_pauseparam         = bnx2_set_pauseparam,
        .get_rx_csum            = bnx2_get_rx_csum,
        .set_rx_csum            = bnx2_set_rx_csum,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
        .set_tx_csum            = bnx2_set_tx_csum,
-       .get_sg                 = ethtool_op_get_sg,
        .set_sg                 = ethtool_op_set_sg,
-       .get_tso                = ethtool_op_get_tso,
        .set_tso                = bnx2_set_tso,
        .self_test_count        = bnx2_self_test_count,
        .self_test              = bnx2_self_test,
index 88ff72ac9b0a40adebcd34b4bd22ecd670c8a06b..ea58144c220e9654e04d60163976266f30ae92ee 100644 (file)
@@ -4202,10 +4202,6 @@ static void bond_ethtool_get_drvinfo(struct net_device *bond_dev,
 }
 
 static const struct ethtool_ops bond_ethtool_ops = {
-       .get_tx_csum            = ethtool_op_get_tx_csum,
-       .get_tso                = ethtool_op_get_tso,
-       .get_ufo                = ethtool_op_get_ufo,
-       .get_sg                 = ethtool_op_get_sg,
        .get_drvinfo            = bond_ethtool_get_drvinfo,
 };
 
index 884aa0cd000645291113d33fcc7798378f2d7e38..7029f13d008d10a2929af76402a28b4d2382b2cf 100644 (file)
@@ -794,9 +794,7 @@ static const struct ethtool_ops t1_ethtool_ops = {
        .set_pauseparam    = set_pauseparam,
        .get_rx_csum       = get_rx_csum,
        .set_rx_csum       = set_rx_csum,
-       .get_tx_csum       = ethtool_op_get_tx_csum,
        .set_tx_csum       = ethtool_op_set_tx_csum,
-       .get_sg            = ethtool_op_get_sg,
        .set_sg            = ethtool_op_set_sg,
        .get_link          = ethtool_op_get_link,
        .get_strings       = get_strings,
@@ -804,7 +802,6 @@ static const struct ethtool_ops t1_ethtool_ops = {
        .get_ethtool_stats = get_stats,
        .get_regs_len      = get_regs_len,
        .get_regs          = get_regs,
-       .get_tso           = ethtool_op_get_tso,
        .set_tso           = set_tso,
 };
 
index 19937498589dc3bde3e5565f173df23a8505a1d4..04633ea55202c481d9d0e2fce6ff243f3f4e8ace 100644 (file)
@@ -1634,9 +1634,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
        .set_pauseparam = set_pauseparam,
        .get_rx_csum = get_rx_csum,
        .set_rx_csum = set_rx_csum,
-       .get_tx_csum = ethtool_op_get_tx_csum,
        .set_tx_csum = ethtool_op_set_tx_csum,
-       .get_sg = ethtool_op_get_sg,
        .set_sg = ethtool_op_set_sg,
        .get_link = ethtool_op_get_link,
        .get_strings = get_strings,
@@ -1647,7 +1645,6 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
        .get_regs_len = get_regs_len,
        .get_regs = get_regs,
        .get_wol = get_wol,
-       .get_tso = ethtool_op_get_tso,
        .set_tso = ethtool_op_set_tso,
 };
 
index 76d16aaf05b678f0d2d816f33ecdd5cda06d7475..e6c4a3bb9e4cb21253d6f34f30b956fc385d56c5 100644 (file)
@@ -1965,9 +1965,7 @@ static const struct ethtool_ops e1000_ethtool_ops = {
        .set_rx_csum            = e1000_set_rx_csum,
        .get_tx_csum            = e1000_get_tx_csum,
        .set_tx_csum            = e1000_set_tx_csum,
-       .get_sg                 = ethtool_op_get_sg,
        .set_sg                 = ethtool_op_set_sg,
-       .get_tso                = ethtool_op_get_tso,
        .set_tso                = e1000_set_tso,
        .self_test_count        = e1000_diag_test_count,
        .self_test              = e1000_diag_test,
index 29ef7a98f8be6594eba120c60579a00ca7b36e32..6498455bf97cb4216a168685c3f781e647a0a986 100644 (file)
@@ -262,9 +262,6 @@ const struct ethtool_ops ehea_ethtool_ops = {
        .get_msglevel = ehea_get_msglevel,
        .set_msglevel = ehea_set_msglevel,
        .get_link = ethtool_op_get_link,
-       .get_tx_csum = ethtool_op_get_tx_csum,
-       .get_sg = ethtool_op_get_sg,
-       .get_tso = ethtool_op_get_tso,
        .set_tso = ethtool_op_set_tso,
        .get_strings = ehea_get_strings,
        .get_stats_count = ehea_get_stats_count,
index 122ffd2f0822cb56c6f3c90bc2de2f68b1bd615f..5ac56f20003df20ccb8d4fac224f0b81388d0684 100644 (file)
@@ -1494,8 +1494,6 @@ static const struct ethtool_ops netdev_ethtool_ops = {
        .get_link               = netdev_get_link,
        .get_msglevel           = netdev_get_msglevel,
        .set_msglevel           = netdev_set_msglevel,
-       .get_sg                 = ethtool_op_get_sg,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
        .begin                  = ethtool_begin,
        .complete               = ethtool_complete
 };
index e9353072a96d1481ace85a98c13acdb732cb09b5..402b071d8d53fb03fde91c0377784752e5cae5a6 100644 (file)
@@ -1891,8 +1891,6 @@ static const struct ethtool_ops netdev_ethtool_ops = {
        .get_link               = netdev_get_link,
        .get_msglevel           = netdev_get_msglevel,
        .set_msglevel           = netdev_set_msglevel,
-       .get_sg                 = ethtool_op_get_sg,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
 };
 
 static int mii_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
index 6f214ab12fffa953e22c80951972b9ce27ebc32b..8d2904fa57896d33db21f274ca9181fb6f2f828a 100644 (file)
@@ -1041,9 +1041,7 @@ static const struct ethtool_ops fec_ethtool_ops = {
        .get_link       = ethtool_op_get_link,
        .get_msglevel   = fec_get_msglevel,
        .set_msglevel   = fec_set_msglevel,
-       .get_tx_csum    = ethtool_op_get_tx_csum,
        .set_tx_csum    = ethtool_op_set_tx_csum,       /* local! */
-       .get_sg         = ethtool_op_get_sg,
        .set_sg         = ethtool_op_set_sg,
        .get_regs       = fec_get_regs,
 };
index 050a8f14eda83d6aef5bc8d585a64d28888830e0..be744573b1c2778013c6bd0b21d36334745eed6d 100644 (file)
@@ -4710,7 +4710,6 @@ static const struct ethtool_ops ops = {
        .get_regs_len = nv_get_regs_len,
        .get_regs = nv_get_regs,
        .nway_reset = nv_nway_reset,
-       .get_tso = ethtool_op_get_tso,
        .set_tso = nv_set_tso,
        .get_ringparam = nv_get_ringparam,
        .set_ringparam = nv_set_ringparam,
@@ -4718,9 +4717,7 @@ static const struct ethtool_ops ops = {
        .set_pauseparam = nv_set_pauseparam,
        .get_rx_csum = nv_get_rx_csum,
        .set_rx_csum = nv_set_rx_csum,
-       .get_tx_csum = ethtool_op_get_tx_csum,
        .set_tx_csum = nv_set_tx_csum,
-       .get_sg = ethtool_op_get_sg,
        .set_sg = nv_set_sg,
        .get_strings = nv_get_strings,
        .get_stats_count = nv_get_stats_count,
index f6789a8db8cd1b8cf3a5319d5ca2d978225f051d..f9079599dd22635e09d560834cf93cb42b5a1781 100644 (file)
@@ -907,9 +907,7 @@ static const struct ethtool_ops fs_ethtool_ops = {
        .get_link = ethtool_op_get_link,
        .get_msglevel = fs_get_msglevel,
        .set_msglevel = fs_set_msglevel,
-       .get_tx_csum = ethtool_op_get_tx_csum,
        .set_tx_csum = ethtool_op_set_tx_csum,  /* local! */
-       .get_sg = ethtool_op_get_sg,
        .set_sg = ethtool_op_set_sg,
        .get_regs = fs_get_regs,
 };
index 354616b0b57b502a54e0c34a91494b9371e4f331..d7da56b105cbe782c878eefcc2a15c8cbffe46af 100644 (file)
@@ -1900,8 +1900,6 @@ static const struct ethtool_ops emac_ethtool_ops = {
        .get_ethtool_stats = emac_ethtool_get_ethtool_stats,
 
        .get_link = ethtool_op_get_link,
-       .get_tx_csum = ethtool_op_get_tx_csum,
-       .get_sg = ethtool_op_get_sg,
 };
 
 static int emac_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd)
index bdbf3dead4e200b97ad73451e7a19b6fbac421d2..0636883449fc2df18e3a84b3d1b889f10adf3207 100644 (file)
@@ -821,15 +821,11 @@ static const struct ethtool_ops netdev_ethtool_ops = {
        .get_drvinfo            = netdev_get_drvinfo,
        .get_settings           = netdev_get_settings,
        .get_link               = netdev_get_link,
-       .get_sg                 = ethtool_op_get_sg,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
        .set_tx_csum            = ibmveth_set_tx_csum,
        .get_rx_csum            = ibmveth_get_rx_csum,
        .set_rx_csum            = ibmveth_set_rx_csum,
-       .get_tso                        = ethtool_op_get_tso,
-       .get_ufo                        = ethtool_op_get_ufo,
        .get_strings            = ibmveth_get_strings,
-       .get_stats_count                = ibmveth_get_stats_count,
+       .get_stats_count        = ibmveth_get_stats_count,
        .get_ethtool_stats      = ibmveth_get_ethtool_stats,
 };
 
index 21d35bc53906806cb7da85276ff59f3ea42bf716..181b59dc1ac3d55d3bd28e7d137736b025ae00d7 100644 (file)
@@ -713,11 +713,9 @@ static const struct ethtool_ops ixgb_ethtool_ops = {
        .set_rx_csum = ixgb_set_rx_csum,
        .get_tx_csum = ixgb_get_tx_csum,
        .set_tx_csum = ixgb_set_tx_csum,
-       .get_sg = ethtool_op_get_sg,
        .set_sg = ethtool_op_set_sg,
        .get_msglevel = ixgb_get_msglevel,
        .set_msglevel = ixgb_set_msglevel,
-       .get_tso = ethtool_op_get_tso,
        .set_tso = ixgb_set_tso,
        .get_strings = ixgb_get_strings,
        .phys_id = ixgb_phys_id,
index a328da72833ce11fe8fa43c97affac274404c58e..0e2252fd71abf3fea077a029d69e99247e25b4de 100644 (file)
@@ -192,7 +192,6 @@ static u32 always_on(struct net_device *dev)
 
 static const struct ethtool_ops loopback_ethtool_ops = {
        .get_link               = always_on,
-       .get_tso                = ethtool_op_get_tso,
        .set_tso                = ethtool_op_set_tso,
        .get_tx_csum            = always_on,
        .get_sg                 = always_on,
index 2de073da182cabc26004619edcaacd7a17029d1f..2f6cdaa88729169a3e623d843f65adba82969da8 100644 (file)
@@ -282,10 +282,6 @@ static u32 macvlan_ethtool_get_rx_csum(struct net_device *dev)
 static const struct ethtool_ops macvlan_ethtool_ops = {
        .get_link               = ethtool_op_get_link,
        .get_rx_csum            = macvlan_ethtool_get_rx_csum,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
-       .get_tso                = ethtool_op_get_tso,
-       .get_ufo                = ethtool_op_get_ufo,
-       .get_sg                 = ethtool_op_get_sg,
        .get_drvinfo            = macvlan_ethtool_get_drvinfo,
 };
 
index 35781616eb23f8e1a0f3eec29ab9a1c7434ebf69..34df02cfdbe73d2c5c44e92d9a29177c56d4cafb 100644 (file)
@@ -2735,7 +2735,6 @@ static const struct ethtool_ops mv643xx_ethtool_ops = {
        .set_settings           = mv643xx_set_settings,
        .get_drvinfo            = mv643xx_get_drvinfo,
        .get_link               = mv643xx_eth_get_link,
-       .get_sg                 = ethtool_op_get_sg,
        .set_sg                 = ethtool_op_set_sg,
        .get_stats_count        = mv643xx_get_stats_count,
        .get_ethtool_stats      = mv643xx_get_ethtool_stats,
index 6dc28b82493511ebf916e55b20ee498d4ec872a7..2f8864e70ca9edc2507dd8ff6775474ff0eb6194 100644 (file)
@@ -1499,11 +1499,8 @@ static const struct ethtool_ops myri10ge_ethtool_ops = {
        .get_ringparam = myri10ge_get_ringparam,
        .get_rx_csum = myri10ge_get_rx_csum,
        .set_rx_csum = myri10ge_set_rx_csum,
-       .get_tx_csum = ethtool_op_get_tx_csum,
        .set_tx_csum = ethtool_op_set_tx_hw_csum,
-       .get_sg = ethtool_op_get_sg,
        .set_sg = ethtool_op_set_sg,
-       .get_tso = ethtool_op_get_tso,
        .set_tso = ethtool_op_set_tso,
        .get_link = ethtool_op_get_link,
        .get_strings = myri10ge_get_strings,
index 7ec362b2e3e50bf6557d46b340e876d05437aafa..a5879672903e048e3a70accbdbe296ecb29045ee 100644 (file)
@@ -635,8 +635,6 @@ static void ne2k_pci_get_drvinfo(struct net_device *dev,
 
 static const struct ethtool_ops ne2k_pci_ethtool_ops = {
        .get_drvinfo            = ne2k_pci_get_drvinfo,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
-       .get_sg                 = ethtool_op_get_sg,
 };
 
 static void __devexit ne2k_pci_remove_one (struct pci_dev *pdev)
index a6138b474b4aa8f7b00a936e3e15f66cb49aae54..08c76b343663dc53ff859979034a61fbabe59a49 100644 (file)
@@ -744,11 +744,8 @@ struct ethtool_ops netxen_nic_ethtool_ops = {
        .get_ringparam = netxen_nic_get_ringparam,
        .get_pauseparam = netxen_nic_get_pauseparam,
        .set_pauseparam = netxen_nic_set_pauseparam,
-       .get_tx_csum = ethtool_op_get_tx_csum,
        .set_tx_csum = ethtool_op_set_tx_csum,
-       .get_sg = ethtool_op_get_sg,
        .set_sg = ethtool_op_set_sg,
-       .get_tso = ethtool_op_get_tso,
        .set_tso = ethtool_op_set_tso,
        .self_test_count = netxen_nic_diag_test_count,
        .self_test = netxen_nic_diag_test,
index 724d90bd1febd0032ff5b1dbe6bd86945743e2ee..4840ddea71acb49ce6c8110ea43bcac5baa70cb3 100644 (file)
@@ -1509,9 +1509,6 @@ static const struct ethtool_ops pcnet32_ethtool_ops = {
        .get_link               = pcnet32_get_link,
        .get_ringparam          = pcnet32_get_ringparam,
        .set_ringparam          = pcnet32_set_ringparam,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
-       .get_sg                 = ethtool_op_get_sg,
-       .get_tso                = ethtool_op_get_tso,
        .get_strings            = pcnet32_get_strings,
        .self_test_count        = pcnet32_self_test_count,
        .self_test              = pcnet32_ethtool_test,
index b8809a8ef2047dd5a4005133bfc1d01f4fc9f5a2..06a1a6f2d17b1dc2fc682500badd7bedcd0c7093 100644 (file)
@@ -1061,11 +1061,8 @@ static const struct ethtool_ops rtl8169_ethtool_ops = {
        .set_msglevel           = rtl8169_set_msglevel,
        .get_rx_csum            = rtl8169_get_rx_csum,
        .set_rx_csum            = rtl8169_set_rx_csum,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
        .set_tx_csum            = ethtool_op_set_tx_csum,
-       .get_sg                 = ethtool_op_get_sg,
        .set_sg                 = ethtool_op_set_sg,
-       .get_tso                = ethtool_op_get_tso,
        .set_tso                = ethtool_op_set_tso,
        .get_regs               = rtl8169_get_regs,
        .get_wol                = rtl8169_get_wol,
index f77049b34e164dd92f9f0b62e13a10ef00ef65a5..a285dd734a03814acc1cb91d0e08f3f532384131 100644 (file)
@@ -6326,13 +6326,10 @@ static const struct ethtool_ops netdev_ethtool_ops = {
        .set_pauseparam = s2io_ethtool_setpause_data,
        .get_rx_csum = s2io_ethtool_get_rx_csum,
        .set_rx_csum = s2io_ethtool_set_rx_csum,
-       .get_tx_csum = ethtool_op_get_tx_csum,
        .set_tx_csum = s2io_ethtool_op_set_tx_csum,
-       .get_sg = ethtool_op_get_sg,
        .set_sg = ethtool_op_set_sg,
        .get_tso = s2io_ethtool_op_get_tso,
        .set_tso = s2io_ethtool_op_set_tso,
-       .get_ufo = ethtool_op_get_ufo,
        .set_ufo = ethtool_op_set_ufo,
        .self_test_count = s2io_ethtool_self_test_count,
        .self_test = s2io_ethtool_test,
index 872cb1cc9c41c05d2b12048450a5b187b782608f..02c472ecbe55126959289fecdddfc18d74a6d951 100644 (file)
@@ -1396,13 +1396,9 @@ static struct ethtool_ops sc92031_ethtool_ops = {
        .set_wol                = sc92031_ethtool_set_wol,
        .nway_reset             = sc92031_ethtool_nway_reset,
        .get_link               = ethtool_op_get_link,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
-       .get_sg                 = ethtool_op_get_sg,
-       .get_tso                = ethtool_op_get_tso,
        .get_strings            = sc92031_ethtool_get_strings,
        .get_stats_count        = sc92031_ethtool_get_stats_count,
        .get_ethtool_stats      = sc92031_ethtool_get_ethtool_stats,
-       .get_ufo                = ethtool_op_get_ufo,
 };
 
 static int __devinit sc92031_probe(struct pci_dev *pdev,
index 47a144d000d5b92470819b327ba0cce6aeb703eb..cac499f8413118c3d0644d775ac4977de034ea3b 100644 (file)
@@ -811,9 +811,7 @@ static const struct ethtool_ops skge_ethtool_ops = {
        .set_pauseparam = skge_set_pauseparam,
        .get_coalesce   = skge_get_coalesce,
        .set_coalesce   = skge_set_coalesce,
-       .get_sg         = ethtool_op_get_sg,
        .set_sg         = skge_set_sg,
-       .get_tx_csum    = ethtool_op_get_tx_csum,
        .set_tx_csum    = skge_set_tx_csum,
        .get_rx_csum    = skge_get_rx_csum,
        .set_rx_csum    = skge_set_rx_csum,
index 1b9e5f40ddeeac5008321264a20128c9aeef8274..b8c15f881eba51a8020516bcf2691ceda1c34177 100644 (file)
@@ -3710,11 +3710,8 @@ static const struct ethtool_ops sky2_ethtool_ops = {
        .get_eeprom_len = sky2_get_eeprom_len,
        .get_eeprom     = sky2_get_eeprom,
        .set_eeprom     = sky2_set_eeprom,
-       .get_sg         = ethtool_op_get_sg,
        .set_sg         = ethtool_op_set_sg,
-       .get_tx_csum    = ethtool_op_get_tx_csum,
        .set_tx_csum    = sky2_set_tx_csum,
-       .get_tso        = ethtool_op_get_tso,
        .set_tso        = sky2_set_tso,
        .get_rx_csum    = sky2_get_rx_csum,
        .set_rx_csum    = sky2_set_rx_csum,
index d940474e024a19b0eed798443b5f92a7feec2adc..1460d5006d1c2ba031cd41bc36819b7079128f62 100644 (file)
@@ -188,7 +188,6 @@ const struct ethtool_ops spider_net_ethtool_ops = {
        .nway_reset             = spider_net_ethtool_nway_reset,
        .get_rx_csum            = spider_net_ethtool_get_rx_csum,
        .set_rx_csum            = spider_net_ethtool_set_rx_csum,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
        .set_tx_csum            = ethtool_op_set_tx_csum,
        .get_ringparam          = spider_net_ethtool_get_ringparam,
        .get_strings            = spider_net_get_strings,
index 369a172a04aaf1b8fdcf3f5719ac15c7f2d6128a..1b860e0817f6637a7153de2ca3789bb6ef4ffb5d 100644 (file)
@@ -9278,11 +9278,8 @@ static const struct ethtool_ops tg3_ethtool_ops = {
        .set_pauseparam         = tg3_set_pauseparam,
        .get_rx_csum            = tg3_get_rx_csum,
        .set_rx_csum            = tg3_set_rx_csum,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
        .set_tx_csum            = tg3_set_tx_csum,
-       .get_sg                 = ethtool_op_get_sg,
        .set_sg                 = ethtool_op_set_sg,
-       .get_tso                = ethtool_op_get_tso,
        .set_tso                = tg3_set_tso,
        .self_test_count        = tg3_get_test_count,
        .self_test              = tg3_self_test,
index bd04e93908efb02f88323b40910973b5f7103fa2..ba3d0e5574a4b11166bba076df61b4bbcb0fbbc6 100644 (file)
@@ -1670,8 +1670,6 @@ static void de_get_regs(struct net_device *dev, struct ethtool_regs *regs,
 
 static const struct ethtool_ops de_ethtool_ops = {
        .get_link               = ethtool_op_get_link,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
-       .get_sg                 = ethtool_op_get_sg,
        .get_drvinfo            = de_get_drvinfo,
        .get_regs_len           = de_get_regs_len,
        .get_settings           = de_get_settings,
index 396f8455cd321a8749403f8a5a116b84e96f4ed6..e00833fadc0b9513a85c0a29cc1d04912934d2f9 100644 (file)
@@ -1451,8 +1451,6 @@ static const struct ethtool_ops netdev_ethtool_ops = {
        .get_link               = netdev_get_link,
        .get_msglevel           = netdev_get_msglevel,
        .set_msglevel           = netdev_set_msglevel,
-       .get_sg                 = ethtool_op_get_sg,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
 };
 
 static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
index 84d99fc77891b3e7c61551c1b2aa5e958d32659f..c6d8513ecad6696e2eba4ed6b2d3706c618d9868 100644 (file)
@@ -1236,11 +1236,8 @@ static const struct ethtool_ops typhoon_ethtool_ops = {
        .set_wol                = typhoon_set_wol,
        .get_link               = ethtool_op_get_link,
        .get_rx_csum            = typhoon_get_rx_csum,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
        .set_tx_csum            = ethtool_op_set_tx_csum,
-       .get_sg                 = ethtool_op_get_sg,
        .set_sg                 = ethtool_op_set_sg,
-       .get_tso                = ethtool_op_get_tso,
        .set_tso                = ethtool_op_set_tso,
        .get_ringparam          = typhoon_get_ringparam,
 };
index 64bef7c123654529b5a46864f872717fdde8623f..73aa677a4a3ef9b1cefa938a45ed08b22e8e90ab 100644 (file)
@@ -373,9 +373,7 @@ static const struct ethtool_ops uec_ethtool_ops = {
        .set_ringparam          = uec_set_ringparam,
        .get_pauseparam         = uec_get_pauseparam,
        .set_pauseparam         = uec_set_pauseparam,
-       .get_sg                 = ethtool_op_get_sg,
        .set_sg                 = ethtool_op_set_sg,
-       .get_tso                = ethtool_op_get_tso,
        .get_stats_count        = uec_get_stats_count,
        .get_strings            = uec_get_strings,
        .get_ethtool_stats      = uec_get_ethtool_stats,
index 987f5b937e3cd73d47054fe78d6c370f2ed63476..d55c4fdff48906f6a0abc98f3854ddb07909e83b 100644 (file)
@@ -1813,8 +1813,6 @@ static const struct ethtool_ops netdev_ethtool_ops = {
        .set_msglevel           = netdev_set_msglevel,
        .get_wol                = rhine_get_wol,
        .set_wol                = rhine_set_wol,
-       .get_sg                 = ethtool_op_get_sg,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
 };
 
 static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
index 78e344ae7051685fec852bc4824daf1b7ad12205..f464b82c7d5fe3f7795397b217d2459bdd85e211 100644 (file)
@@ -1617,11 +1617,8 @@ static void backend_changed(struct xenbus_device *dev,
 
 static struct ethtool_ops xennet_ethtool_ops =
 {
-       .get_tx_csum = ethtool_op_get_tx_csum,
        .set_tx_csum = ethtool_op_set_tx_csum,
-       .get_sg = ethtool_op_get_sg,
        .set_sg = xennet_set_sg,
-       .get_tso = ethtool_op_get_tso,
        .set_tso = xennet_set_tso,
        .get_link = ethtool_op_get_link,
 };
index f803e39eee28d4f76b70ade5641b6a760b2c87e9..c07bac5e3e10486c57b86556d3d45d1f2d3de226 100644 (file)
@@ -150,11 +150,8 @@ static int br_set_tx_csum(struct net_device *dev, u32 data)
 static struct ethtool_ops br_ethtool_ops = {
        .get_drvinfo = br_getinfo,
        .get_link = ethtool_op_get_link,
-       .get_sg = ethtool_op_get_sg,
        .set_sg = br_set_sg,
-       .get_tx_csum = ethtool_op_get_tx_csum,
        .set_tx_csum = br_set_tx_csum,
-       .get_tso = ethtool_op_get_tso,
        .set_tso = br_set_tso,
 };
 
index 0d0b13cc1dd361e88b42ddd009868db9a006fd37..1163eb2256d0560b1fb3b4a71db5df5d4a40a072 100644 (file)
@@ -893,21 +893,27 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)
                break;
        case ETHTOOL_GTXCSUM:
                rc = ethtool_get_value(dev, useraddr, ethcmd,
-                                      dev->ethtool_ops->get_tx_csum);
+                                      (dev->ethtool_ops->get_tx_csum ?
+                                       dev->ethtool_ops->get_tx_csum :
+                                       ethtool_op_get_tx_csum));
                break;
        case ETHTOOL_STXCSUM:
                rc = ethtool_set_tx_csum(dev, useraddr);
                break;
        case ETHTOOL_GSG:
                rc = ethtool_get_value(dev, useraddr, ethcmd,
-                                      dev->ethtool_ops->get_sg);
+                                      (dev->ethtool_ops->get_sg ?
+                                       dev->ethtool_ops->get_sg :
+                                       ethtool_op_get_sg));
                break;
        case ETHTOOL_SSG:
                rc = ethtool_set_sg(dev, useraddr);
                break;
        case ETHTOOL_GTSO:
                rc = ethtool_get_value(dev, useraddr, ethcmd,
-                                      dev->ethtool_ops->get_tso);
+                                      (dev->ethtool_ops->get_tso ?
+                                       dev->ethtool_ops->get_tso :
+                                       ethtool_op_get_tso));
                break;
        case ETHTOOL_STSO:
                rc = ethtool_set_tso(dev, useraddr);
@@ -929,7 +935,9 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)
                break;
        case ETHTOOL_GUFO:
                rc = ethtool_get_value(dev, useraddr, ethcmd,
-                                      dev->ethtool_ops->get_ufo);
+                                      (dev->ethtool_ops->get_ufo ?
+                                       dev->ethtool_ops->get_ufo :
+                                       ethtool_op_get_ufo));
                break;
        case ETHTOOL_SUFO:
                rc = ethtool_set_ufo(dev, useraddr);