mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
net/ethernet: remove useless is_valid_ether_addr from drivers ndo_open
If ndo_validate_addr is set to the generic eth_validate_addr function there is no point in calling is_valid_ether_addr from driver ndo_open if ndo_open is not used elsewhere in the driver. With this change is_valid_ether_addr will be called from the generic eth_validate_addr function. So there should be no change in the actual behavior. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ae4b46e9d7
commit
c867b55eb4
13 changed files with 1 additions and 62 deletions
|
@ -1219,9 +1219,6 @@ static int lpc_eth_open(struct net_device *ndev)
|
|||
if (netif_msg_ifup(pldat))
|
||||
dev_dbg(&pldat->pdev->dev, "enabling %s\n", ndev->name);
|
||||
|
||||
if (!is_valid_ether_addr(ndev->dev_addr))
|
||||
return -EADDRNOTAVAIL;
|
||||
|
||||
__lpc_eth_clock_enable(pldat, true);
|
||||
|
||||
/* Reset and initialize */
|
||||
|
@ -1301,6 +1298,7 @@ static const struct net_device_ops lpc_netdev_ops = {
|
|||
.ndo_set_rx_mode = lpc_eth_set_multicast_list,
|
||||
.ndo_do_ioctl = lpc_eth_ioctl,
|
||||
.ndo_set_mac_address = lpc_set_mac_address,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
.ndo_change_mtu = eth_change_mtu,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue