diff options
Diffstat (limited to 'drivers/net/ethernet/sis/sis190.c')
-rw-r--r-- | drivers/net/ethernet/sis/sis190.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sis/sis190.c b/drivers/net/ethernet/sis/sis190.c index be4d772e68cf..5e66e3f3aafc 100644 --- a/drivers/net/ethernet/sis/sis190.c +++ b/drivers/net/ethernet/sis/sis190.c @@ -1586,6 +1586,7 @@ static int sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev, { struct sis190_private *tp = netdev_priv(dev); void __iomem *ioaddr = tp->mmio_addr; + __le16 addr[ETH_ALEN / 2]; u16 sig; int i; @@ -1606,8 +1607,9 @@ static int sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev, for (i = 0; i < ETH_ALEN / 2; i++) { u16 w = sis190_read_eeprom(ioaddr, EEPROMMACAddr + i); - ((__le16 *)dev->dev_addr)[i] = cpu_to_le16(w); + addr[i] = cpu_to_le16(w); } + eth_hw_addr_set(dev, (u8 *)addr); sis190_set_rgmii(tp, sis190_read_eeprom(ioaddr, EEPROMInfo)); |