diff options
author | Philippe Reynes <tremyfr@gmail.com> | 2016-07-15 09:25:36 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-17 00:54:40 -0400 |
commit | b3f2cf8feecfa89b3e94a61c0ca29ea59e36d146 (patch) | |
tree | 6c1b950d7bf963c2160219d7bf7cf478c6a4dee3 /drivers/net/usb | |
parent | 009722a2ff079bf58d3ba3378eb6d898e1fc4b31 (diff) |
net: usb: ax88172x: use phy_ethtool_{get|set}_link_ksettings
There are two generics functions phy_ethtool_{get|set}_link_ksettings,
so we can use them instead of defining the same code in the driver.
Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/ax88172a.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/drivers/net/usb/ax88172a.c b/drivers/net/usb/ax88172a.c index cf77f2dffa69..163a2c576e69 100644 --- a/drivers/net/usb/ax88172a.c +++ b/drivers/net/usb/ax88172a.c | |||
@@ -149,24 +149,6 @@ static const struct net_device_ops ax88172a_netdev_ops = { | |||
149 | .ndo_set_rx_mode = asix_set_multicast, | 149 | .ndo_set_rx_mode = asix_set_multicast, |
150 | }; | 150 | }; |
151 | 151 | ||
152 | static int ax88172a_get_settings(struct net_device *net, | ||
153 | struct ethtool_cmd *cmd) | ||
154 | { | ||
155 | if (!net->phydev) | ||
156 | return -ENODEV; | ||
157 | |||
158 | return phy_ethtool_gset(net->phydev, cmd); | ||
159 | } | ||
160 | |||
161 | static int ax88172a_set_settings(struct net_device *net, | ||
162 | struct ethtool_cmd *cmd) | ||
163 | { | ||
164 | if (!net->phydev) | ||
165 | return -ENODEV; | ||
166 | |||
167 | return phy_ethtool_sset(net->phydev, cmd); | ||
168 | } | ||
169 | |||
170 | static int ax88172a_nway_reset(struct net_device *net) | 152 | static int ax88172a_nway_reset(struct net_device *net) |
171 | { | 153 | { |
172 | if (!net->phydev) | 154 | if (!net->phydev) |
@@ -185,9 +167,9 @@ static const struct ethtool_ops ax88172a_ethtool_ops = { | |||
185 | .get_eeprom_len = asix_get_eeprom_len, | 167 | .get_eeprom_len = asix_get_eeprom_len, |
186 | .get_eeprom = asix_get_eeprom, | 168 | .get_eeprom = asix_get_eeprom, |
187 | .set_eeprom = asix_set_eeprom, | 169 | .set_eeprom = asix_set_eeprom, |
188 | .get_settings = ax88172a_get_settings, | ||
189 | .set_settings = ax88172a_set_settings, | ||
190 | .nway_reset = ax88172a_nway_reset, | 170 | .nway_reset = ax88172a_nway_reset, |
171 | .get_link_ksettings = phy_ethtool_get_link_ksettings, | ||
172 | .set_link_ksettings = phy_ethtool_set_link_ksettings, | ||
191 | }; | 173 | }; |
192 | 174 | ||
193 | static int ax88172a_reset_phy(struct usbnet *dev, int embd_phy) | 175 | static int ax88172a_reset_phy(struct usbnet *dev, int embd_phy) |