summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/designware.c2
-rw-r--r--drivers/usb/eth/usb_ether.c9
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index bfa4384..1e34436 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -504,7 +504,7 @@ int designware_initialize(u32 id, ulong base_addr, u32 phy_addr)
dev->iobase = (int)base_addr;
dev->priv = priv;
- eth_getenv_enetaddr_by_index(id, &dev->enetaddr[0]);
+ eth_getenv_enetaddr_by_index("eth", id, &dev->enetaddr[0]);
priv->dev = dev;
priv->mac_regs_p = (struct eth_mac_regs *)base_addr;
diff --git a/drivers/usb/eth/usb_ether.c b/drivers/usb/eth/usb_ether.c
index 7b55da3..6565ea5 100644
--- a/drivers/usb/eth/usb_ether.c
+++ b/drivers/usb/eth/usb_ether.c
@@ -80,6 +80,7 @@ int is_eth_dev_on_usb_host(void)
*/
static void probe_valid_drivers(struct usb_device *dev)
{
+ struct eth_device *eth;
int j;
for (j = 0; prob_dev[j].probe && prob_dev[j].get_info; j++) {
@@ -88,9 +89,10 @@ static void probe_valid_drivers(struct usb_device *dev)
/*
* ok, it is a supported eth device. Get info and fill it in
*/
+ eth = &usb_eth[usb_max_eth_dev].eth_dev;
if (prob_dev[j].get_info(dev,
&usb_eth[usb_max_eth_dev],
- &usb_eth[usb_max_eth_dev].eth_dev)) {
+ eth)) {
/* found proper driver */
/* register with networking stack */
usb_max_eth_dev++;
@@ -100,7 +102,10 @@ static void probe_valid_drivers(struct usb_device *dev)
* call since eth_current_changed (internally called)
* relies on it
*/
- eth_register(&usb_eth[usb_max_eth_dev - 1].eth_dev);
+ eth_register(eth);
+ if (eth_write_hwaddr(eth, "usbeth",
+ usb_max_eth_dev - 1))
+ puts("Warning: failed to set MAC address\n");
break;
}
}