Skip to content

Commit 509067b

Browse files
Zhenguo Zhaogregkh
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f999c3b commit 509067b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/n_gsm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2304,7 +2304,7 @@ static int gsm_config(struct gsm_mux *gsm, struct gsm_config *c)
23042304
* configuration
23052305
*/
23062306

2307-
if (need_close || need_restart) {
2307+
if (gsm->initiator && (need_close || need_restart)) {
23082308
int ret;
23092309

23102310
ret = gsm_disconnect(gsm);

0 commit comments

Comments
 (0)