Skip to contentSkip to conversation

tty: n_gsm: delete CLD command frame as requester

PATCH Superseded Zhenguo Zhao 2 participants 2 messages Jul 1, 2021 – Jul 21, 2021 TTY layer and serial drivers

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tty: n_gsm: delete CLD command frame as requester

From: Zhenguo Zhao <[email protected]>

as initiator,it may be send CLD conmmand ,as requester,there is no need to send the CLD control frame,it will cause redundant data.

---
 drivers/tty/n_gsm.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/tty/n_gsm.c +5 -3
index 5fea02c..eecbc76 100644
@@ -2043,9 +2043,11 @@ static int gsm_disconnect(struct gsm_mux *gsm)
 
 	/* In theory disconnecting DLCI 0 is sufficient but for some
 	   modems this is apparently not the case. */
-	gc = gsm_control_send(gsm, CMD_CLD, NULL, 0);
-	if (gc)
-		gsm_control_wait(gsm, gc);
+	if (gsm->initiator) {
+		gc = gsm_control_send(gsm, CMD_CLD, NULL, 0);
+		if (gc)
+			gsm_control_wait(gsm, gc);
+	}
 
 	del_timer_sync(&gsm->t2_timer);
 	/* Now we are sure T2 has stopped */
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 4 lines · Zhenguo Zhao

From: Zhenguo Zhao <[email protected]>

as initiator,it may be send CLD conmmand ,as requester,there is no need to send the CLD control frame,it will cause redundant data.

Same issue here.

And please make this a patch series, properly numbered, so we can track them all together.

thanks,

greg k-h