Yes I saw this, but it does not seem a very good option to me.
It requires you to set up the hardware in the application, and does not
seem very efficient.
Where do you initialize the IP address?  You should use the same socket descriptor to call the ioctl to set the MAC address at that location
I was expecting to have the hardware/board initialization routines to
properly set-up the hardware and have it ready for usage for the
application.

The network won't work reliably without the network monitor at apps/netuitils/netinit.  If someone unplugs the cable, the network must be re-initialized when the cable is plugged back in.

Initialization and re-initialization is something may need to happen numerous times.  This is normally done in the appliction space.

Usually the board initialization has direct access to the low-level drivers
for this exact reason.

Also, as I see, now the MAC peripheral has essentially to be initialized
twice. Once with no MAC address, and again with the correct address.

After initialization, the network is still in the DOWN state. Additional initialization is required to set the IP address and bring the network up.

I think a PR to bring out the MAC address setup function as was done for arch/arm/src/samv7/sam_emac.c would be acceptable too. The MAC address should be retained indefinitely after it is set once.



Reply via email to