Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: unisys: use eth_hw_addr_set()

Commit 406f42fa0d3c ("net-next: When a bond have a massive amount
of VLANs...") introduced a rbtree for faster Ethernet address look
up. To maintain netdev->dev_addr in this tree we need to make all
the writes to it got through appropriate helpers.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20211019171243.1412240-7-kuba@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jakub Kicinski and committed by
Greg Kroah-Hartman
13898e93 d0cf28f1

+3 -2
+3 -2
drivers/staging/unisys/visornic/visornic_main.c
··· 1782 1782 struct net_device *netdev = NULL; 1783 1783 int err; 1784 1784 int channel_offset = 0; 1785 + u8 addr[ETH_ALEN]; 1785 1786 u64 features; 1786 1787 1787 1788 netdev = alloc_etherdev(sizeof(struct visornic_devdata)); ··· 1799 1798 /* Get MAC address from channel and read it into the device. */ 1800 1799 netdev->addr_len = ETH_ALEN; 1801 1800 channel_offset = offsetof(struct visor_io_channel, vnic.macaddr); 1802 - err = visorbus_read_channel(dev, channel_offset, netdev->dev_addr, 1803 - ETH_ALEN); 1801 + err = visorbus_read_channel(dev, channel_offset, addr, ETH_ALEN); 1804 1802 if (err < 0) { 1805 1803 dev_err(&dev->device, 1806 1804 "%s failed to get mac addr from chan (%d)\n", 1807 1805 __func__, err); 1808 1806 goto cleanup_netdev; 1809 1807 } 1808 + eth_hw_addr_set(netdev, addr); 1810 1809 1811 1810 devdata = devdata_initialize(netdev_priv(netdev), dev); 1812 1811 if (!devdata) {