From 547a2aea5aa57cb35fee1dd828bd329ddf730f6c Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 18 Mar 2015 17:23:40 -0600 Subject: [PATCH] SAMV7: Add a sneak internal interface that will allow us to set the MAC address before NSH even starts --- configs/samv71-xult/src/sam_ethernet.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/configs/samv71-xult/src/sam_ethernet.c b/configs/samv71-xult/src/sam_ethernet.c index 07cf8b6ef6b..65538d02d32 100644 --- a/configs/samv71-xult/src/sam_ethernet.c +++ b/configs/samv71-xult/src/sam_ethernet.c @@ -225,9 +225,14 @@ int sam_emac0_setmac(void) mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Now configure the EMAC driver to use this MAC address */ -#warning Missing logic - return OK; + ret = sam_emac_setmacaddr(EMAC0_INTF, mac); + if (ret < 0) + { + ndbg("ERROR: Failed to set MAC address: %d\n", ret); + } + + return ret; } #else # define sam_emac0_setmac()