Message ID | 20201118135919.1447-3-ms@dev.tdt.de |
---|---|
State | New |
Headers | show |
Series | net/x25: netdev event handling | expand |
diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c index 3c03f6512c5f..8dd7c420ae93 100644 --- a/net/lapb/lapb_iface.c +++ b/net/lapb/lapb_iface.c @@ -278,10 +278,14 @@ int lapb_connect_request(struct net_device *dev) if (lapb->state == LAPB_STATE_3 || lapb->state == LAPB_STATE_4) goto out_put; - lapb_establish_data_link(lapb); + if (lapb->mode & LAPB_DCE) { + lapb_start_t1timer(lapb); + } else { + lapb_establish_data_link(lapb); - lapb_dbg(0, "(%p) S0 -> S1\n", lapb->dev); - lapb->state = LAPB_STATE_1; + lapb_dbg(0, "(%p) S0 -> S1\n", lapb->dev); + lapb->state = LAPB_STATE_1; + } rc = LAPB_OK; out_put:
For a DTE interface we should change to state LAPB_STATE_1 and start sending SABM(E). But for DCE interfaces, we simply should start the timer t1. Signed-off-by: Martin Schiller <ms@dev.tdt.de> --- net/lapb/lapb_iface.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)