]> git.dujemihanovic.xyz Git - u-boot.git/commit
arm: mvebu: turris_mox: Better check for valid ethernet addresses in env
authorMarek Behún <marek.behun@nic.cz>
Sat, 9 Oct 2021 17:33:42 +0000 (19:33 +0200)
committerStefan Roese <sr@denx.de>
Thu, 21 Oct 2021 05:39:05 +0000 (07:39 +0200)
commit0034d84a66eaa51263a4881274b75de5b1c4f800
tree8741bc20c286da2f2b9765ff3c4c9c617b18f487
parentf3c71e75b08b7cbe35acc29d89e90c05edd70d40
arm: mvebu: turris_mox: Better check for valid ethernet addresses in env

Currently we overwrite ethaddr and eth1addr only if these variables
don't exist.

Better overwrite them even if the env variable exists, but is invalid -
eth_env_get_enetaddr_by_index() checks for validity.

Refactor the code to use a for cycle.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
board/CZ.NIC/turris_mox/turris_mox.c