diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/mxc_fec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/mxc_fec.c b/drivers/net/mxc_fec.c index 8aa32c7..c3e813d 100644 --- a/drivers/net/mxc_fec.c +++ b/drivers/net/mxc_fec.c @@ -729,6 +729,10 @@ void mxc_fec_set_mac_from_env(char *mac_addr) int i; eth_parse_enetaddr(mac_addr, ea); + if (!is_valid_ether_addr(ea)) { + printf("Error: invalid FEC MAC address!\n"); + return; + } for (i = 0; i < sizeof(fec_info) / sizeof(fec_info[0]); i++) { fecp = (fec_t *)(fec_info[i].iobase); |