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: ca87931755 ("ethernet: tulip: remove direct netdev->dev_addr writes")
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jakub Kicinski 2021-10-11 06:09:09 -07:00 committed by David S. Miller
parent 2ed08b5ead
commit 25b90c1910
2 changed files with 2 additions and 2 deletions

View File

@ -1823,7 +1823,7 @@ static void de21041_get_srom_info(struct de_private *de)
#endif
/* 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. */
ofs = ee_data[SROMC0InfoLeaf];

View File

@ -476,7 +476,7 @@ static int dmfe_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
}
/* Set Node address */
eth_hw_addr_set(dev, &db->srom[20 + i]);
eth_hw_addr_set(dev, &db->srom[20]);
err = register_netdev (dev);
if (err)