Thanks for helping me figure this out!
I have tried to use the proposed, proper way of doing this using:
net_mgmt(NET_REQUEST_ETHERNET_SET_MAC_ADDRESS, iface,
¶ms, sizeof(struct ethernet_req_params));
Unfortunately the build will fail due to: undefined reference to `net_mgmt_NET_REQUEST_ETHERNET_SET_MAC_ADDRESS' when trying to use it.
I have added CONFIG_NET_MGMT=y to prj.conf.
Do I have to add more or could it be that my platform (nucleo_f767zi) lacks support for this feature?
/Anders