summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-08-06 12:33:15 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-08-06 12:33:15 +0200
commite188d2ec26e8cf6d4ba0908e76868e91b6999fdf (patch)
tree268e1a3340d6e195a02068a31b70043088d95b8f /net
parent4ee01d2b469f65d92c6e7759152cd31fbfbb1414 (diff)
parentab8e23f239ddda7fff4d9a12a9d856d346e0d553 (diff)
downloadbarebox-e188d2ec26e8cf6d4ba0908e76868e91b6999fdf.tar.gz
barebox-e188d2ec26e8cf6d4ba0908e76868e91b6999fdf.tar.xz
Merge branch 'for-next/net'
Diffstat (limited to 'net')
-rw-r--r--net/eth.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/eth.c b/net/eth.c
index bea4706865..b22e55668a 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -100,9 +100,17 @@ static void eth_drop_ethaddr(int ethid)
void eth_register_ethaddr(int ethid, const char *ethaddr)
{
struct eth_ethaddr *addr;
+ struct eth_device *edev;
eth_drop_ethaddr(ethid);
+ list_for_each_entry(edev, &netdev_list, list) {
+ if (edev->dev.id == ethid) {
+ register_preset_mac_address(edev, ethaddr);
+ return;
+ }
+ }
+
addr = xzalloc(sizeof(*addr));
addr->ethid = ethid;
memcpy(addr->ethaddr, ethaddr, 6);