diff options
Diffstat (limited to 'drivers/net/ethernet/marvell/skge.c')
-rw-r--r-- | drivers/net/ethernet/marvell/skge.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c index ac48dcca268c..0c864e5bf0a6 100644 --- a/drivers/net/ethernet/marvell/skge.c +++ b/drivers/net/ethernet/marvell/skge.c @@ -3810,6 +3810,7 @@ static struct net_device *skge_devinit(struct skge_hw *hw, int port, { struct skge_port *skge; struct net_device *dev = alloc_etherdev(sizeof(*skge)); + u8 addr[ETH_ALEN]; if (!dev) return NULL; @@ -3862,7 +3863,8 @@ static struct net_device *skge_devinit(struct skge_hw *hw, int port, } /* read the mac address */ - memcpy_fromio(dev->dev_addr, hw->regs + B2_MAC_1 + port*8, ETH_ALEN); + memcpy_fromio(addr, hw->regs + B2_MAC_1 + port*8, ETH_ALEN); + eth_hw_addr_set(dev, addr); return dev; } |