net: Add IF_OPER_TESTING
RFC 2863 defines the operational state testing. Add support for this state, both as a IF_LINK_MODE_ and __LINK_STATE_. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
749d22e8f6
commit
eec517cdb4
@@ -829,11 +829,18 @@ static void set_operstate(struct net_device *dev, unsigned char transition)
|
||||
switch (transition) {
|
||||
case IF_OPER_UP:
|
||||
if ((operstate == IF_OPER_DORMANT ||
|
||||
operstate == IF_OPER_TESTING ||
|
||||
operstate == IF_OPER_UNKNOWN) &&
|
||||
!netif_dormant(dev))
|
||||
!netif_dormant(dev) && !netif_testing(dev))
|
||||
operstate = IF_OPER_UP;
|
||||
break;
|
||||
|
||||
case IF_OPER_TESTING:
|
||||
if (operstate == IF_OPER_UP ||
|
||||
operstate == IF_OPER_UNKNOWN)
|
||||
operstate = IF_OPER_TESTING;
|
||||
break;
|
||||
|
||||
case IF_OPER_DORMANT:
|
||||
if (operstate == IF_OPER_UP ||
|
||||
operstate == IF_OPER_UNKNOWN)
|
||||
|
Reference in New Issue
Block a user