diff options
author | Denis Du <dudenis2000@yahoo.ca> | 2018-02-24 16:51:42 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-11 16:19:46 +0100 |
commit | 830dd26a5397cee47ca4d622966cfb6d4ee69def (patch) | |
tree | f2bb18bbc254519c1be9731b4aeca962af1f1eec /drivers/net/wan/hdlc_ppp.c | |
parent | 7e70022d4b0b7738eeffa6873df6193ea2dd2d15 (diff) |
hdlc_ppp: carrier detect ok, don't turn off negotiation
[ Upstream commit b6c3bad1ba83af1062a7ff6986d9edc4f3d7fc8e ]
Sometimes when physical lines have a just good noise to make the protocol
handshaking fail, but the carrier detect still good. Then after remove of
the noise, nobody will trigger this protocol to be start again to cause
the link to never come back. The fix is when the carrier is still on, not
terminate the protocol handshaking.
Signed-off-by: Denis Du <dudenis2000@yahoo.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/wan/hdlc_ppp.c')
-rw-r--r-- | drivers/net/wan/hdlc_ppp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c index 0d7645581f91..4842344a96f1 100644 --- a/drivers/net/wan/hdlc_ppp.c +++ b/drivers/net/wan/hdlc_ppp.c @@ -574,7 +574,10 @@ static void ppp_timer(unsigned long arg) ppp_cp_event(proto->dev, proto->pid, TO_GOOD, 0, 0, 0, NULL); proto->restart_counter--; - } else + } else if (netif_carrier_ok(proto->dev)) + ppp_cp_event(proto->dev, proto->pid, TO_GOOD, 0, 0, + 0, NULL); + else ppp_cp_event(proto->dev, proto->pid, TO_BAD, 0, 0, 0, NULL); break; |