Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(esp_eth): fix openeth driver to consider MAC address set in QEMU
Openeth driver did not consider the possibility that the MAC address was specified when launching QEMU, and would always overwrite that address with the address obtained from esp_read_mac. When running QEMU, setting the MAC address via QEMU arguments is more convenient than crafting an eFuse file with the correct MAC address. This change modifies openeth driver to first check if an address has been set in QEMU and uses it if so. Otherwise it falls back to the address obtained from esp_read_mac. As part of this change, also removed the unnecessary variable emac_opencores_t::addr, the address is only kept in the registers of the emulated peripheral now. For full effect this also requires changes in QEMU, see espressif/qemu#107 for background. Without changes in QEMU, this commit keeps the same behavior.
- Loading branch information