Commit a29ec08a authored by Denis Kirjanov's avatar Denis Kirjanov Committed by David S. Miller

mv643xx_eth: check for valid hw address (resubmit)

Check for valid hw address.
Signed-off-by: default avatarDenis Kirjanov <kirjanov@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 64f16603
......@@ -1827,6 +1827,9 @@ static int mv643xx_eth_set_mac_address(struct net_device *dev, void *addr)
{
struct sockaddr *sa = addr;
if (!is_valid_ether_addr(sa->sa_data))
return -EINVAL;
memcpy(dev->dev_addr, sa->sa_data, ETH_ALEN);
netif_addr_lock_bh(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment