diff options
author | Andrew Lunn <andrew@lunn.ch> | 2020-04-20 00:11:50 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-20 12:43:24 -0700 |
commit | eec517cdb4810b3843eb7707971de3164088bff1 (patch) | |
tree | 082f3cf957cf9da4dfba2d2f57b36387faa8e9dc /net/core/dev.c | |
parent | 749d22e8f6d5645ed066ec434c0ce5327987c699 (diff) | |
download | linux-eec517cdb4810b3843eb7707971de3164088bff1.tar.bz2 |
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>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 522288177bbd..fb61522b1ce1 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -9136,6 +9136,11 @@ void netif_stacked_transfer_operstate(const struct net_device *rootdev, else netif_dormant_off(dev); + if (rootdev->operstate == IF_OPER_TESTING) + netif_testing_on(dev); + else + netif_testing_off(dev); + if (netif_carrier_ok(rootdev)) netif_carrier_on(dev); else |