aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
Diffstat (limited to 'net/core')
-rw-r--r--net/core/ethtool.c16
1 files changed, 12 insertions, 4 deletions
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);