diff options
-rw-r--r-- | drivers/net/ethernet/ethoc.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c index 0623c20131bb..779d3c386ea7 100644 --- a/drivers/net/ethernet/ethoc.c +++ b/drivers/net/ethernet/ethoc.c | |||
@@ -890,7 +890,31 @@ out: | |||
890 | return NETDEV_TX_OK; | 890 | return NETDEV_TX_OK; |
891 | } | 891 | } |
892 | 892 | ||
893 | static int ethoc_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) | ||
894 | { | ||
895 | struct ethoc *priv = netdev_priv(dev); | ||
896 | struct phy_device *phydev = priv->phy; | ||
897 | |||
898 | if (!phydev) | ||
899 | return -EOPNOTSUPP; | ||
900 | |||
901 | return phy_ethtool_gset(phydev, cmd); | ||
902 | } | ||
903 | |||
904 | static int ethoc_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) | ||
905 | { | ||
906 | struct ethoc *priv = netdev_priv(dev); | ||
907 | struct phy_device *phydev = priv->phy; | ||
908 | |||
909 | if (!phydev) | ||
910 | return -EOPNOTSUPP; | ||
911 | |||
912 | return phy_ethtool_sset(phydev, cmd); | ||
913 | } | ||
914 | |||
893 | const struct ethtool_ops ethoc_ethtool_ops = { | 915 | const struct ethtool_ops ethoc_ethtool_ops = { |
916 | .get_settings = ethoc_get_settings, | ||
917 | .set_settings = ethoc_set_settings, | ||
894 | .get_link = ethtool_op_get_link, | 918 | .get_link = ethtool_op_get_link, |
895 | .get_ts_info = ethtool_op_get_ts_info, | 919 | .get_ts_info = ethtool_op_get_ts_info, |
896 | }; | 920 | }; |