From: Zhenguo Zhao <zhenguo6858@gmail.com>
To: zhenguo6858@gmail.com, gregkh@linuxfoundation.org, jirislaby@kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH v2] tty: n_gsm: CR bit value should be 0 when config "initiator=0"
Date: Wed, 16 Jun 2021 19:53:22 +0800 [thread overview]
Message-ID: <1623844402-4731-1-git-send-email-zhenguo6858@gmail.com> (raw)
From: Zhenguo Zhao <zhenguo.zhao1@unisoc.com>
config "initiator=0",gsmld will receives dlci SABM/DISC control command
frame,as slaver,the CR bit value check should be 1.
if check "cr == 0",it will goto invalid,so it can't send UA response
frame and open slaver dlci.
Signed-off-by: Zhenguo Zhao <zhenguo.zhao1@unisoc.com>
---
drivers/tty/n_gsm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 5fea02c..becca2c 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -1779,7 +1779,7 @@ static void gsm_queue(struct gsm_mux *gsm)
switch (gsm->control) {
case SABM|PF:
- if (cr == 0)
+ if (cr == 1)
goto invalid;
if (dlci == NULL)
dlci = gsm_dlci_alloc(gsm, address);
@@ -1793,7 +1793,7 @@ static void gsm_queue(struct gsm_mux *gsm)
}
break;
case DISC|PF:
- if (cr == 0)
+ if (cr == 1)
goto invalid;
if (dlci == NULL || dlci->state == DLCI_CLOSED) {
gsm_response(gsm, address, DM);
--
1.9.1
next reply other threads:[~2021-06-16 11:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-16 11:53 Zhenguo Zhao [this message]
2021-06-24 12:58 ` [PATCH v2] tty: n_gsm: CR bit value should be 0 when config "initiator=0" Greg KH
[not found] ` <CAGGV+3LgLdohhYhH+qJTokeNU_WdV9oRNHMc9a_5YTTVA3U8ow@mail.gmail.com>
2021-07-07 6:08 ` 赵振国
2021-07-07 6:10 ` Greg KH
2021-07-07 6:12 ` 赵振国
2021-07-15 2:29 ` 赵振国
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1623844402-4731-1-git-send-email-zhenguo6858@gmail.com \
--to=zhenguo6858@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).