aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/bridge/br_device.c3
-rw-r--r--net/core/ethtool.c16
2 files changed, 12 insertions, 7 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index f803e39eee28..c07bac5e3e10 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -150,11 +150,8 @@ static int br_set_tx_csum(struct net_device *dev, u32 data)
150static struct ethtool_ops br_ethtool_ops = { 150static struct ethtool_ops br_ethtool_ops = {
151 .get_drvinfo = br_getinfo, 151 .get_drvinfo = br_getinfo,
152 .get_link = ethtool_op_get_link, 152 .get_link = ethtool_op_get_link,
153 .get_sg = ethtool_op_get_sg,
154 .set_sg = br_set_sg, 153 .set_sg = br_set_sg,
155 .get_tx_csum = ethtool_op_get_tx_csum,
156 .set_tx_csum = br_set_tx_csum, 154 .set_tx_csum = br_set_tx_csum,
157 .get_tso = ethtool_op_get_tso,
158 .set_tso = br_set_tso, 155 .set_tso = br_set_tso,
159}; 156};
160 157
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 0d0b13cc1dd3..1163eb2256d0 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -893,21 +893,27 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)
893 break; 893 break;
894 case ETHTOOL_GTXCSUM: 894 case ETHTOOL_GTXCSUM:
895 rc = ethtool_get_value(dev, useraddr, ethcmd, 895 rc = ethtool_get_value(dev, useraddr, ethcmd,
896 dev->ethtool_ops->get_tx_csum); 896 (dev->ethtool_ops->get_tx_csum ?
897 dev->ethtool_ops->get_tx_csum :
898 ethtool_op_get_tx_csum));
897 break; 899 break;
898 case ETHTOOL_STXCSUM: 900 case ETHTOOL_STXCSUM:
899 rc = ethtool_set_tx_csum(dev, useraddr); 901 rc = ethtool_set_tx_csum(dev, useraddr);
900 break; 902 break;
901 case ETHTOOL_GSG: 903 case ETHTOOL_GSG:
902 rc = ethtool_get_value(dev, useraddr, ethcmd, 904 rc = ethtool_get_value(dev, useraddr, ethcmd,
903 dev->ethtool_ops->get_sg); 905 (dev->ethtool_ops->get_sg ?
906 dev->ethtool_ops->get_sg :
907 ethtool_op_get_sg));
904 break; 908 break;
905 case ETHTOOL_SSG: 909 case ETHTOOL_SSG:
906 rc = ethtool_set_sg(dev, useraddr); 910 rc = ethtool_set_sg(dev, useraddr);
907 break; 911 break;
908 case ETHTOOL_GTSO: 912 case ETHTOOL_GTSO:
909 rc = ethtool_get_value(dev, useraddr, ethcmd, 913 rc = ethtool_get_value(dev, useraddr, ethcmd,
910 dev->ethtool_ops->get_tso); 914 (dev->ethtool_ops->get_tso ?
915 dev->ethtool_ops->get_tso :
916 ethtool_op_get_tso));
911 break; 917 break;
912 case ETHTOOL_STSO: 918 case ETHTOOL_STSO:
913 rc = ethtool_set_tso(dev, useraddr); 919 rc = ethtool_set_tso(dev, useraddr);
@@ -929,7 +935,9 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)
929 break; 935 break;
930 case ETHTOOL_GUFO: 936 case ETHTOOL_GUFO:
931 rc = ethtool_get_value(dev, useraddr, ethcmd, 937 rc = ethtool_get_value(dev, useraddr, ethcmd,
932 dev->ethtool_ops->get_ufo); 938 (dev->ethtool_ops->get_ufo ?
939 dev->ethtool_ops->get_ufo :
940 ethtool_op_get_ufo));
933 break; 941 break;
934 case ETHTOOL_SUFO: 942 case ETHTOOL_SUFO:
935 rc = ethtool_set_ufo(dev, useraddr); 943 rc = ethtool_set_ufo(dev, useraddr);