diff options
author | Danny Kukawka <danny.kukawka@bisect.de> | 2012-02-21 21:36:38 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-22 14:46:37 -0500 |
commit | b049aadca3f2535bea245cb0bba1393d9a60c7a4 (patch) | |
tree | 8e8753388190052b4ed1bf33a327de0895578a82 /drivers/net/ethernet/3com | |
parent | f274fd9a0384c448335dcc51b04c4c41caa7f432 (diff) |
3com/typhoon: reuse eth_mac_addr()
Use eth_mac_addr() for .ndo_set_mac_address, remove
typhoon_set_mac_address() since it do currently the same as
eth_mac_addr(). Additional advantage: eth_mac_addr() already
checks if the given address is valid.
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Acked-by: Dave Dillow <dave@thedillows.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/3com')
-rw-r--r-- | drivers/net/ethernet/3com/typhoon.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/net/ethernet/3com/typhoon.c b/drivers/net/ethernet/3com/typhoon.c index f7d622eed203..1234a14b2b73 100644 --- a/drivers/net/ethernet/3com/typhoon.c +++ b/drivers/net/ethernet/3com/typhoon.c | |||
@@ -966,18 +966,6 @@ typhoon_get_stats(struct net_device *dev) | |||
966 | return stats; | 966 | return stats; |
967 | } | 967 | } |
968 | 968 | ||
969 | static int | ||
970 | typhoon_set_mac_address(struct net_device *dev, void *addr) | ||
971 | { | ||
972 | struct sockaddr *saddr = (struct sockaddr *) addr; | ||
973 | |||
974 | if(netif_running(dev)) | ||
975 | return -EBUSY; | ||
976 | |||
977 | memcpy(dev->dev_addr, saddr->sa_data, dev->addr_len); | ||
978 | return 0; | ||
979 | } | ||
980 | |||
981 | static void | 969 | static void |
982 | typhoon_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) | 970 | typhoon_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) |
983 | { | 971 | { |
@@ -2266,7 +2254,7 @@ static const struct net_device_ops typhoon_netdev_ops = { | |||
2266 | .ndo_tx_timeout = typhoon_tx_timeout, | 2254 | .ndo_tx_timeout = typhoon_tx_timeout, |
2267 | .ndo_get_stats = typhoon_get_stats, | 2255 | .ndo_get_stats = typhoon_get_stats, |
2268 | .ndo_validate_addr = eth_validate_addr, | 2256 | .ndo_validate_addr = eth_validate_addr, |
2269 | .ndo_set_mac_address = typhoon_set_mac_address, | 2257 | .ndo_set_mac_address = eth_mac_addr, |
2270 | .ndo_change_mtu = eth_change_mtu, | 2258 | .ndo_change_mtu = eth_change_mtu, |
2271 | }; | 2259 | }; |
2272 | 2260 | ||