Hi Prabhakar, > Hi All, > > I am seeing following type of code for MAC address write for a > network device. > > net/eth-uclass.c eth_post_probe() or net/eth_legacy.c > eth_write_hwaddr() > > eth_env_get_enetaddr_by_index("eth", dev->seq, env_enetaddr); > if (!is_zero_ethaddr(env_enetaddr)) { > if (!is_zero_ethaddr(pdata->enetaddr) && > memcmp(pdata->enetaddr, env_enetaddr, ARP_HLEN)) { > printf("\nWarning: %s MAC addresses don't > match:\n", dev->name); > printf("Address in ROM is %pM\n", > pdata->enetaddr); > printf("Address in environment is %pM\n", > env_enetaddr); > } > > /* Override the ROM MAC address */ > memcpy(pdata->enetaddr, env_enetaddr, ARP_HLEN); > > Why ROM MAC address getting overwritten by environment env MAC > address. MAC address is something unique and assigned to a particular > device. So one should never change its MAC address. >
It may happen that company which uses NXP processor wants to use their own set of MAC addresses. > Please suggest. > > Regards, > Prabhakar > > _______________________________________________ > U-Boot mailing list > U-Boot@lists.denx.de > https://lists.denx.de/listinfo/u-boot Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
pgpYDzGVQ3mvH.pgp
Description: OpenPGP digital signature
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot