xilinx: common: Optimise updating ethaddr from eeprom
In board_late_init_xilinx() eth*addr are updated from the values read from eeprom. Ideally the MAC addresses are updated sequencially. So if any MAC address is invalid, it means there are no further valid values. So optimise this logic by replacing continue with break. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/efef0d07add5d5777396ea111ad75411dc402db3.1645624855.git.michal.simek@xilinx.com
This commit is contained in:
parent
90e8f2db60
commit
ff8ee707fb
1 changed files with 1 additions and 1 deletions
|
@ -416,7 +416,7 @@ int board_late_init_xilinx(void)
|
|||
|
||||
for (i = 0; i < EEPROM_HDR_NO_OF_MAC_ADDR; i++) {
|
||||
if (!desc->mac_addr[i])
|
||||
continue;
|
||||
break;
|
||||
|
||||
if (is_valid_ethaddr((const u8 *)desc->mac_addr[i]))
|
||||
ret |= eth_env_set_enetaddr_by_index("eth",
|
||||
|
|
Loading…
Reference in a new issue