All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tty: n_gsm: delete SABM command frame as requester
@ 2021-07-01  2:54 Zhenguo Zhao
  2021-07-01  6:13 ` Jiri Slaby
  2021-07-01  8:00   ` kernel test robot
  0 siblings, 2 replies; 6+ messages in thread
From: Zhenguo Zhao @ 2021-07-01  2:54 UTC (permalink / raw)
  To: zhenguo6858, gregkh, jirislaby; +Cc: linux-kernel

From: Zhenguo Zhao <Zhenguo.Zhao1@unisoc.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@unisoc.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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-07  5:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01  2:54 [PATCH] tty: n_gsm: delete SABM command frame as requester Zhenguo Zhao
2021-07-01  6:13 ` Jiri Slaby
2021-07-01  6:15   ` Jiri Slaby
     [not found]     ` <CAGGV+3+Oc415RJGueGHdYnDGWFqyuD_6ehBWybhR=6bDoFE9Wg@mail.gmail.com>
     [not found]       ` <CAGGV+3J9Kj-GoiCBYNN=JLx=Jj02yMkpdg5E_+3W-tvQ_jESyQ@mail.gmail.com>
     [not found]         ` <CAGGV+3JT6P=tM3_t045FfJtZQ_diPv2_qmnE1LHYvkQo7J7MAw@mail.gmail.com>
     [not found]           ` <CAGGV+3LHqgpuvWC_WpkqYnk=U_1vaCReEMrYkenDSAi95740hQ@mail.gmail.com>
2021-07-07  5:53             ` Greg KH
2021-07-01  8:00 ` kernel test robot
2021-07-01  8:00   ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.