Commit 25b90c19 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

tulip: fix setting device address from rom

I missed removing i from the array index when converting
from a loop to a direct copy.

Fixes: ca879317 ("ethernet: tulip: remove direct netdev->dev_addr writes")
Reported-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2ed08b5e
...@@ -1823,7 +1823,7 @@ static void de21041_get_srom_info(struct de_private *de) ...@@ -1823,7 +1823,7 @@ static void de21041_get_srom_info(struct de_private *de)
#endif #endif
/* store MAC address */ /* store MAC address */
eth_hw_addr_set(de->dev, &ee_data[i + sa_offset]); eth_hw_addr_set(de->dev, &ee_data[sa_offset]);
/* get offset of controller 0 info leaf. ignore 2nd byte. */ /* get offset of controller 0 info leaf. ignore 2nd byte. */
ofs = ee_data[SROMC0InfoLeaf]; ofs = ee_data[SROMC0InfoLeaf];
......
...@@ -476,7 +476,7 @@ static int dmfe_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -476,7 +476,7 @@ static int dmfe_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
} }
/* Set Node address */ /* Set Node address */
eth_hw_addr_set(dev, &db->srom[20 + i]); eth_hw_addr_set(dev, &db->srom[20]);
err = register_netdev (dev); err = register_netdev (dev);
if (err) if (err)
......
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