提交 8ea7a37c 编写于 作者: S Steven J. Magnani 提交者: David S. Miller

ll_temac: Fix MAC address configuration from userland

A userland command to set the LLTEMAC MAC address,
i.e. "ifconfig eth0 hw addr xx:yy:zz:pp:dd:qq",
results in a device address of 00:01:xx:yy:zz:pp.
Correct this.
Signed-off-by: NSteven J. Magnani <steve@digidescorp.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c3b7c12c
...@@ -224,6 +224,13 @@ static int temac_set_mac_address(struct net_device *ndev, void *address) ...@@ -224,6 +224,13 @@ static int temac_set_mac_address(struct net_device *ndev, void *address)
return 0; return 0;
} }
static int netdev_set_mac_address(struct net_device *ndev, void *p)
{
struct sockaddr *addr = p;
return temac_set_mac_address(ndev, addr->sa_data);
}
static void temac_set_multicast_list(struct net_device *ndev) static void temac_set_multicast_list(struct net_device *ndev)
{ {
struct temac_local *lp = netdev_priv(ndev); struct temac_local *lp = netdev_priv(ndev);
...@@ -768,7 +775,7 @@ static const struct net_device_ops temac_netdev_ops = { ...@@ -768,7 +775,7 @@ static const struct net_device_ops temac_netdev_ops = {
.ndo_open = temac_open, .ndo_open = temac_open,
.ndo_stop = temac_stop, .ndo_stop = temac_stop,
.ndo_start_xmit = temac_start_xmit, .ndo_start_xmit = temac_start_xmit,
.ndo_set_mac_address = temac_set_mac_address, .ndo_set_mac_address = netdev_set_mac_address,
//.ndo_set_multicast_list = temac_set_multicast_list, //.ndo_set_multicast_list = temac_set_multicast_list,
#ifdef CONFIG_NET_POLL_CONTROLLER #ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = temac_poll_controller, .ndo_poll_controller = temac_poll_controller,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册