summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhenguo Zhao <Zhenguo.Zhao1@unisoc.com>2021-08-20 14:17:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-14 10:50:27 +0200
commit509067bbd2644ed8f59b84b5db95a985633004ba (patch)
treebc3e12194a30bffd89711b77b5f1c1a476e2dea9
parenttty: n_gsm: Modify CR,PF bit printk info when config requester (diff)
downloadlinux-509067bbd2644ed8f59b84b5db95a985633004ba.tar.xz
linux-509067bbd2644ed8f59b84b5db95a985633004ba.zip
tty: n_gsm: Delete gsm_disconnect when config requester
When n_gsm config "initiator=0",when gsmld config ,as requester ,it doesn't need to send CLD frame data or SABM frame. Example,when tty dev receive "AT+CMUX=0",it will change ldisc n_tty to n_gsm,during config requester,gsmld output "7e 01 ef c3 aa 7e", initiator maybe not want to receive the frame data. [ 154.666457] c1 Q> 0) R: UIH(F) [ 154.669514] c1 C3 [ 154.671519] c1 gsmld_output: 00000000: 7e 01 ef c3 aa 7e [ 155.014874] c1 Q> 0) R: UIH(F) [ 155.018000] c1 C3 [ 155.020046] c1 gsmld_output: 00000000: 7e 01 ef c3 aa 7e [ 155.364425] c1 Q> 0) R: UIH(F) [ 155.367546] c1 C3 [ 155.369597] c1 gsmld_output: 00000000: 7e 01 ef c3 aa 7e Signed-off-by: Zhenguo Zhao <Zhenguo.Zhao1@unisoc.com> Link: https://lore.kernel.org/r/1629461872-26965-5-git-send-email-zhenguo6858@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/n_gsm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 563b685de88c..fd980a68c7ea 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -2304,7 +2304,7 @@ static int gsm_config(struct gsm_mux *gsm, struct gsm_config *c)
* configuration
*/
- if (need_close || need_restart) {
+ if (gsm->initiator && (need_close || need_restart)) {
int ret;
ret = gsm_disconnect(gsm);