mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
ethernet: ec_bhf: use eth_hw_addr_set()
Commit 406f42fa0d
("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.
Copy the address into an array on the stack, then call
eth_hw_addr_set().
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
41edfff572
commit
10e6ded812
1 changed files with 3 additions and 1 deletions
|
@ -479,6 +479,7 @@ static int ec_bhf_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||||
struct net_device *net_dev;
|
struct net_device *net_dev;
|
||||||
struct ec_bhf_priv *priv;
|
struct ec_bhf_priv *priv;
|
||||||
void __iomem *dma_io;
|
void __iomem *dma_io;
|
||||||
|
u8 addr[ETH_ALEN];
|
||||||
void __iomem *io;
|
void __iomem *io;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
|
@ -539,7 +540,8 @@ static int ec_bhf_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto err_free_net_dev;
|
goto err_free_net_dev;
|
||||||
|
|
||||||
memcpy_fromio(net_dev->dev_addr, priv->mii_io + MII_MAC_ADDR, 6);
|
memcpy_fromio(addr, priv->mii_io + MII_MAC_ADDR, ETH_ALEN);
|
||||||
|
eth_hw_addr_set(net_dev, addr);
|
||||||
|
|
||||||
err = register_netdev(net_dev);
|
err = register_netdev(net_dev);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
|
|
Loading…
Reference in a new issue