mv643xx_eth: check for valid hw address (resubmit)

Check for valid hw address.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Denis Kirjanov 2009-12-08 20:36:00 -08:00 committed by David S. Miller
parent 64f16603ea
commit a29ec08a1b

View File

@ -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);