Commit 4b6ccbdd authored by Fin Maaß's avatar Fin Maaß Committed by Benjamin Cabé
Browse files

drivers: ethernet: xmc4xxx: random mac only on dt



only set a random mac if zephyr,random-mac-address
is set in dt.

Signed-off-by: default avatarFin Maaß <f.maass@vogl-electronic.com>
parent 5638d9fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -866,7 +866,7 @@ static int eth_xmc4xxx_init(const struct device *dev)

	eth_xmc4xxx_mask_unused_interrupts(dev_cfg->regs);

#if !DT_INST_NODE_HAS_PROP(0, local_mac_address)
#if DT_INST_PROP(0, zephyr_random_mac_address)
	gen_random_mac(dev_data->mac_addr, INFINEON_OUI_B0, INFINEON_OUI_B1, INFINEON_OUI_B2);
#endif
	eth_xmc4xxx_set_mac_address(dev_cfg->regs, dev_data->mac_addr);