summaryrefslogtreecommitdiff
path: root/net/lapb/lapb_timer.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2021-02-02 14:37:25 +0000
committerRussell King <rmk+kernel@armlinux.org.uk>2021-02-02 14:37:25 +0000
commit9d4d8572a539ef807e21c196f145aa365fd52f0e (patch)
tree59a4fcd89ce86de32f068c2052f17a348188ae7e /net/lapb/lapb_timer.c
parent2c85ebc57b3e1817b6ce1a6b703928e113a90442 (diff)
parentf170b59fedd733b92f58c4d7c8357fbf7601d623 (diff)
Merge tag 'amba-make-remove-return-void' of https://git.pengutronix.de/git/ukl/linux into devel-stable
Tag for adaptions to struct amba_driver::remove changing prototype
Diffstat (limited to 'net/lapb/lapb_timer.c')
-rw-r--r--net/lapb/lapb_timer.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/net/lapb/lapb_timer.c b/net/lapb/lapb_timer.c
index 8f5b17001a076..baa247fe4ed05 100644
--- a/net/lapb/lapb_timer.c
+++ b/net/lapb/lapb_timer.c
@@ -85,11 +85,18 @@ static void lapb_t1timer_expiry(struct timer_list *t)
switch (lapb->state) {
/*
- * If we are a DCE, keep going DM .. DM .. DM
+ * If we are a DCE, send DM up to N2 times, then switch to
+ * STATE_1 and send SABM(E).
*/
case LAPB_STATE_0:
- if (lapb->mode & LAPB_DCE)
+ if (lapb->mode & LAPB_DCE &&
+ lapb->n2count != lapb->n2) {
+ lapb->n2count++;
lapb_send_control(lapb, LAPB_DM, LAPB_POLLOFF, LAPB_RESPONSE);
+ } else {
+ lapb->state = LAPB_STATE_1;
+ lapb_establish_data_link(lapb);
+ }
break;
/*