svn commit: r205024 - head/sys/net
jmallett at FreeBSD.org
Fri Mar 12 08:28:05 UTC 2010
On Fri, Mar 12, 2010 at 00:11, Qing Li <qingli at freebsd.org> wrote:
> I like Julian's suggestion because it is simple and very low risk.
> And there isn't a need to check for interface type any more.
> Here is why:
For actual link state, you can already see whether a driver is in
UNKNOWN state, like:
* Values for if_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 */
Therefore you should be able to easily add assertions and debugging
printfs for interfaces that don't event support *setting* link state
-- which is the real problem more than changing link state, since a
driver probably won't report link as down if it has no intention of
It doesn't help that there are two things wrt link state floating
around -- one in the form of LINK_STATE (the one that matters here)
and the other in ifmedia stuff. I think that's confusing this
More information about the svn-src-head