Commit aace4959 authored by Manuel Lauss's avatar Manuel Lauss Committed by David S. Miller

net: smsc911x: allow platform_data to specify mac address

Extend the driver to accept a MAC address specified in platform_data.
Signed-off-by: default avatarManuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b4efc561
...@@ -2071,6 +2071,9 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) ...@@ -2071,6 +2071,9 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
if (is_valid_ether_addr(dev->dev_addr)) { if (is_valid_ether_addr(dev->dev_addr)) {
smsc911x_set_hw_mac_address(pdata, dev->dev_addr); smsc911x_set_hw_mac_address(pdata, dev->dev_addr);
SMSC_TRACE(PROBE, "MAC Address is specified by configuration"); SMSC_TRACE(PROBE, "MAC Address is specified by configuration");
} else if (is_valid_ether_addr(pdata->config.mac)) {
memcpy(dev->dev_addr, pdata->config.mac, 6);
SMSC_TRACE(PROBE, "MAC Address specified by platform data");
} else { } else {
/* Try reading mac address from device. if EEPROM is present /* Try reading mac address from device. if EEPROM is present
* it will already have been set */ * it will already have been set */
......
...@@ -30,6 +30,7 @@ struct smsc911x_platform_config { ...@@ -30,6 +30,7 @@ struct smsc911x_platform_config {
unsigned int irq_type; unsigned int irq_type;
unsigned int flags; unsigned int flags;
phy_interface_t phy_interface; phy_interface_t phy_interface;
unsigned char mac[6];
}; };
/* Constants for platform_device irq polarity configuration */ /* Constants for platform_device irq polarity configuration */
......
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