aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDenis Kirjanov <kirjanov@gmail.com>2009-12-08 23:36:00 -0500
committerDavid S. Miller <davem@davemloft.net>2009-12-08 23:36:00 -0500
commita29ec08a1b649436248c140a3bc389bc11434c94 (patch)
tree1c40d2acfc389648330ade1cc66b7abd7e6c4e80 /drivers/net
parent64f16603eae17e869d5fc8a60ae987394190e639 (diff)
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/mv643xx_eth.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 796a493f95ab..1405a170bb43 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -1827,6 +1827,9 @@ static int mv643xx_eth_set_mac_address(struct net_device *dev, void *addr)
1827{ 1827{
1828 struct sockaddr *sa = addr; 1828 struct sockaddr *sa = addr;
1829 1829
1830 if (!is_valid_ether_addr(sa->sa_data))
1831 return -EINVAL;
1832
1830 memcpy(dev->dev_addr, sa->sa_data, ETH_ALEN); 1833 memcpy(dev->dev_addr, sa->sa_data, ETH_ALEN);
1831 1834
1832 netif_addr_lock_bh(dev); 1835 netif_addr_lock_bh(dev);