提交 a71b9978 编写于 作者: K kirjanov@gmail.com 提交者: Greg Kroah-Hartman

staging: slicoss Check for valid hw address

Check for valid hw address.
Signed-off-by: NDenis Kirjanov <kirjanov@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册