[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1625108078-16491-1-git-send-email-zhenguo6858@gmail.com>
Date: Thu, 1 Jul 2021 10:54:38 +0800
From: Zhenguo Zhao <zhenguo6858@...il.com>
To: zhenguo6858@...il.com, gregkh@...uxfoundation.org,
jirislaby@...nel.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] tty: n_gsm: delete SABM command frame as requester
From: Zhenguo Zhao <Zhenguo.Zhao1@...soc.com>
as initiator,it need to send SABM conmmand ,as requester,there is
no need to send the SABM control frame,it will cause redundant data.
Signed-off-by: Zhenguo Zhao <Zhenguo.Zhao1@...soc.com>
---
drivers/tty/n_gsm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 5fea02c..e66418b 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -3005,8 +3005,9 @@ static int gsmtty_open(struct tty_struct *tty, struct file *filp)
/* We could in theory open and close before we wait - eg if we get
a DM straight back. This is ok as that will have caused a hangup */
tty_port_set_initialized(port, 1);
- /* Start sending off SABM messages */
- gsm_dlci_begin_open(dlci);
+ /* Start sending off SABM messages for initiator */
+ if (gsm->initiator)
+ gsm_dlci_begin_open(dlci);
/* And wait for virtual carrier */
return tty_port_block_til_ready(port, tty, filp);
}
--
1.9.1
Powered by blists - more mailing lists