lkml.org 
[lkml]   [2020]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH net-next v3 2/6] net/lapb: fix lapb_connect_request() for DCE
Date
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(-)

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:
--
2.20.1
\
 
 \ /
  Last update: 2020-11-18 15:11    [W:0.082 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site