diff options
author | 2021-10-29 13:17:22 +0100 | |
---|---|---|
committer | 2021-10-29 13:17:22 +0100 | |
commit | e311eb9192497a20199c68181d58cb61871f1f86 (patch) | |
tree | 78c4e73bbf7d6d547f12582df8db6794abe6961b /drivers | |
parent | Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue (diff) | |
parent | net: xtensa: use eth_hw_addr_set() (diff) | |
download | wireguard-linux-e311eb9192497a20199c68181d58cb61871f1f86.tar.xz wireguard-linux-e311eb9192497a20199c68181d58cb61871f1f86.zip |
Merge branch 'eth_hw_addr_set'
Jakub Kicinski says:
====================
arch, misc: use eth_hw_addr_set()
Convert remaining misc drivers to use helpers to write
to netdev->dev_addr.
This is the last set :) :)
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/misc/sgi-xp/xpnet.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c index 2508f83bdc3f..dab7b92db790 100644 --- a/drivers/misc/sgi-xp/xpnet.c +++ b/drivers/misc/sgi-xp/xpnet.c @@ -514,6 +514,7 @@ static const struct net_device_ops xpnet_netdev_ops = { static int __init xpnet_init(void) { + u8 addr[ETH_ALEN]; int result; if (!is_uv_system()) @@ -545,15 +546,17 @@ xpnet_init(void) xpnet_device->min_mtu = XPNET_MIN_MTU; xpnet_device->max_mtu = XPNET_MAX_MTU; + memset(addr, 0, sizeof(addr)); /* * Multicast assumes the LSB of the first octet is set for multicast * MAC addresses. We chose the first octet of the MAC to be unlikely * to collide with any vendor's officially issued MAC. */ - xpnet_device->dev_addr[0] = 0x02; /* locally administered, no OUI */ + addr[0] = 0x02; /* locally administered, no OUI */ - xpnet_device->dev_addr[XPNET_PARTID_OCTET + 1] = xp_partition_id; - xpnet_device->dev_addr[XPNET_PARTID_OCTET + 0] = (xp_partition_id >> 8); + addr[XPNET_PARTID_OCTET + 1] = xp_partition_id; + addr[XPNET_PARTID_OCTET + 0] = (xp_partition_id >> 8); + eth_hw_addr_set(xpnet_device, addr); /* * ether_setup() sets this to a multicast device. We are |