diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2010-12-09 07:10:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-10 18:55:24 -0500 |
commit | ed4ba4b5b96742d29225308ccccbdb1810b63064 (patch) | |
tree | 2c28a534d7b7fe4ed58925401d69b14df90323be /drivers/net/e1000e/ethtool.c | |
parent | e596e6e4d578f2639416e620d367a3af34814a40 (diff) |
netdev: Use default implementation of ethtool_ops::get_link where possible
Various drivers are using implementations of ethtool_ops::get_link
that are equivalent to the default ethtool_op_get_link(). Change
them to use that instead.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000e/ethtool.c')
-rw-r--r-- | drivers/net/e1000e/ethtool.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c index 8984d165a39b..3612900b3bfe 100644 --- a/drivers/net/e1000e/ethtool.c +++ b/drivers/net/e1000e/ethtool.c | |||
@@ -194,20 +194,6 @@ static int e1000_get_settings(struct net_device *netdev, | |||
194 | return 0; | 194 | return 0; |
195 | } | 195 | } |
196 | 196 | ||
197 | static u32 e1000_get_link(struct net_device *netdev) | ||
198 | { | ||
199 | struct e1000_adapter *adapter = netdev_priv(netdev); | ||
200 | struct e1000_hw *hw = &adapter->hw; | ||
201 | |||
202 | /* | ||
203 | * Avoid touching hardware registers when possible, otherwise | ||
204 | * link negotiation can get messed up when user-level scripts | ||
205 | * are rapidly polling the driver to see if link is up. | ||
206 | */ | ||
207 | return netif_running(netdev) ? netif_carrier_ok(netdev) : | ||
208 | !!(er32(STATUS) & E1000_STATUS_LU); | ||
209 | } | ||
210 | |||
211 | static int e1000_set_spd_dplx(struct e1000_adapter *adapter, u16 spddplx) | 197 | static int e1000_set_spd_dplx(struct e1000_adapter *adapter, u16 spddplx) |
212 | { | 198 | { |
213 | struct e1000_mac_info *mac = &adapter->hw.mac; | 199 | struct e1000_mac_info *mac = &adapter->hw.mac; |
@@ -2024,7 +2010,7 @@ static const struct ethtool_ops e1000_ethtool_ops = { | |||
2024 | .get_msglevel = e1000_get_msglevel, | 2010 | .get_msglevel = e1000_get_msglevel, |
2025 | .set_msglevel = e1000_set_msglevel, | 2011 | .set_msglevel = e1000_set_msglevel, |
2026 | .nway_reset = e1000_nway_reset, | 2012 | .nway_reset = e1000_nway_reset, |
2027 | .get_link = e1000_get_link, | 2013 | .get_link = ethtool_op_get_link, |
2028 | .get_eeprom_len = e1000_get_eeprom_len, | 2014 | .get_eeprom_len = e1000_get_eeprom_len, |
2029 | .get_eeprom = e1000_get_eeprom, | 2015 | .get_eeprom = e1000_get_eeprom, |
2030 | .set_eeprom = e1000_set_eeprom, | 2016 | .set_eeprom = e1000_set_eeprom, |