Skip to content

Commit

Permalink
tulip: fix setting device address from rom
Browse files Browse the repository at this point in the history
I missed removing i from the array index when converting
from a loop to a direct copy.

Fixes: ca87931 ("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>
  • Loading branch information
Jakub Kicinski authored and David S. Miller committed Oct 12, 2021
1 parent 2ed08b5 commit 25b90c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/dec/tulip/de2104x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/dec/tulip/dmfe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 25b90c1

Please sign in to comment.