[PATCH 1/2] n_gsm: improve behaviour with encoding 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* on Telit & Sim.com modems, using encoding 0, opening a new DLC
randomly fails. Not setting PF bit of the control byte gives a
reliable behaviour on these modems.

* note that the detailed documentation of CMUX for both these
modems doesn't set this bit when sending the UIH frame with the
MSC command :
http://www.telit.com/module/infopool/download.php?id=616
http://wm.sim.com/sim/News/photo/2010721161442.pdf

Signed-off-by: Eric BÃnard <eric@xxxxxxxxxx>
---
 drivers/tty/n_gsm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 9a71b57..38efedb 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -1251,7 +1251,7 @@ static void gsm_control_response(struct gsm_mux *gsm, unsigned int command,
 static void gsm_control_transmit(struct gsm_mux *gsm, struct gsm_control *ctrl)
 {
 	struct gsm_msg *msg = gsm_data_alloc(gsm, 0, ctrl->len + 1,
-							gsm->ftype|PF);
+					gsm->ftype|(gsm->encoding ? PF : 0));
 	if (msg == NULL)
 		return;
 	msg->data[0] = (ctrl->cmd << 1) | 2 | EA;	/* command */
-- 
1.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux