[En-Nut-Discussion] Ethernet drivers
Thiago A. Corrêa
thiago.correa at gmail.com
Mon Feb 16 07:35:41 CET 2009
Hi,
I'm giving the MACB driver on AVR32 a shot, and I've noticed that
all ethernet drivers wait for the link status to go up before
returning from NutDeviceRegister, and in some cases, like the
at91_emac, after a timeout, it simply fails, failling
NutDeviceRegister, and leaving it unaccessible until a reset for all
of the sample applications.
That's not very nice, and I would like to use the link interrupt
feature to setup the link at a later stage, so it can go up, down and
even change properties (from 10 half to 100 full duplex for instance)
which is also not supported in the current drivers.
I found that there is a header include/net/if.h that contains:
/*!
* \name Interface Link State
*/
/*@{*/
#define LINK_STATE_UNKNOWN 0 /* Link invalid/unknown. */
#define LINK_STATE_DOWN 1 /* Link is down. */
#define LINK_STATE_UP 2 /* Link is up. */
/*@}*/
Where were those defines supposed to be used? I can't find anywere.
At first I thought I would use the if_mask field, but on that same
file, I can see that it's meant for something else.
Any advice?
Thanks,
Thiago A. Correa
More information about the En-Nut-Discussion
mailing list