summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2015-05-04 14:55:14 -0500
committerJoe Hershberger <joe.hershberger@ni.com>2015-05-19 13:33:21 -0500
commit92ac520821405e196c920d60921bdfa5ab6b878c (patch)
tree64331eefb4a40a516281e4c9938c40953781c6bf /drivers
parentbef1014b31c5b33052bcaa865ba3618d73e906f0 (diff)
net: Remove all references to CONFIG_ETHADDR and friends
We really don't want boards defining fixed MAC addresses in their config so we just remove the option to set it in a fixed way. If you must have a MAC address that was not provisioned, then use the random MAC address functionality. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/greth.c10
-rw-r--r--drivers/net/lan91c96.c7
2 files changed, 3 insertions, 14 deletions
diff --git a/drivers/net/greth.c b/drivers/net/greth.c
index a93b37a5d7d..9bc8a8d1aa1 100644
--- a/drivers/net/greth.c
+++ b/drivers/net/greth.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <command.h>
+#include <errno.h>
#include <net.h>
#include <netdev.h>
#include <malloc.h>
@@ -653,13 +654,8 @@ int greth_initialize(bd_t * bis)
}
}
} else {
- /* HW Address not found in environment, Set default HW address */
- addr[0] = GRETH_HWADDR_0; /* MSB */
- addr[1] = GRETH_HWADDR_1;
- addr[2] = GRETH_HWADDR_2;
- addr[3] = GRETH_HWADDR_3;
- addr[4] = GRETH_HWADDR_4;
- addr[5] = GRETH_HWADDR_5; /* LSB */
+ /* No ethaddr set */
+ return -EINVAL;
}
/* set and remember MAC address */
diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c
index 495c0886fae..c4dd01ec2aa 100644
--- a/drivers/net/lan91c96.c
+++ b/drivers/net/lan91c96.c
@@ -725,12 +725,6 @@ static int smc_get_ethaddr(bd_t *bd, struct eth_device *dev)
static int get_rom_mac(struct eth_device *dev, unsigned char *v_rom_mac)
{
-#ifdef HARDCODE_MAC /* used for testing or to supress run time warnings */
- char hw_mac_addr[] = { 0x02, 0x80, 0xad, 0x20, 0x31, 0xb8 };
-
- memcpy (v_rom_mac, hw_mac_addr, 6);
- return (1);
-#else
int i;
SMC_SELECT_BANK(dev, 1);
for (i=0; i<6; i++)
@@ -738,7 +732,6 @@ static int get_rom_mac(struct eth_device *dev, unsigned char *v_rom_mac)
v_rom_mac[i] = SMC_inb(dev, LAN91C96_IA0 + i);
}
return (1);
-#endif
}
/* Structure to detect the device IDs */