Commit a71b9978 authored by kirjanov@gmail.com's avatar kirjanov@gmail.com Committed by Greg Kroah-Hartman

staging: slicoss Check for valid hw address

Check for valid hw address.
Signed-off-by: default avatarDenis Kirjanov <kirjanov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 203fe0d2
......@@ -2531,6 +2531,9 @@ static int slic_mac_set_address(struct net_device *dev, void *ptr)
if (!adapter)
return -EBUSY;
if (!is_valid_ether_addr(addr->sa_data))
return -EINVAL;
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
memcpy(adapter->currmacaddr, addr->sa_data, dev->addr_len);
......
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