Commit 5ed5b191 authored by Jakub Kicinski's avatar Jakub Kicinski

net: hippi: use dev_addr_set()

Commit 406f42fa ("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: default avatarJakub Kicinski <kuba@kernel.org>
parent ed088907
...@@ -502,6 +502,7 @@ static unsigned int write_eeprom(struct rr_private *rrpriv, ...@@ -502,6 +502,7 @@ static unsigned int write_eeprom(struct rr_private *rrpriv,
static int rr_init(struct net_device *dev) static int rr_init(struct net_device *dev)
{ {
u8 addr[HIPPI_ALEN] __aligned(4);
struct rr_private *rrpriv; struct rr_private *rrpriv;
struct rr_regs __iomem *regs; struct rr_regs __iomem *regs;
u32 sram_size, rev; u32 sram_size, rev;
...@@ -537,10 +538,11 @@ static int rr_init(struct net_device *dev) ...@@ -537,10 +538,11 @@ static int rr_init(struct net_device *dev)
* other method I've seen. -VAL * other method I've seen. -VAL
*/ */
*(__be16 *)(dev->dev_addr) = *(__be16 *)(addr) =
htons(rr_read_eeprom_word(rrpriv, offsetof(struct eeprom, manf.BoardULA))); htons(rr_read_eeprom_word(rrpriv, offsetof(struct eeprom, manf.BoardULA)));
*(__be32 *)(dev->dev_addr+2) = *(__be32 *)(addr+2) =
htonl(rr_read_eeprom_word(rrpriv, offsetof(struct eeprom, manf.BoardULA[4]))); htonl(rr_read_eeprom_word(rrpriv, offsetof(struct eeprom, manf.BoardULA[4])));
dev_addr_set(dev, addr);
printk(" MAC: %pM\n", dev->dev_addr); printk(" MAC: %pM\n", dev->dev_addr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment