Skip to content

Commit

Permalink
n_gsm: fix UIH control byte : P bit should be 0
Browse files Browse the repository at this point in the history
* the GSM 07.10 specification says in 5.4.3.1 that
'both stations shall set the P bit to 0'
  thanks to Alan Cox for finding this explanation in the spec

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

Signed-off-by: Eric Bénard <eric@eukrea.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Eric Bénard authored and Greg Kroah-Hartman committed Mar 9, 2011
1 parent 323e841 commit ed43b47
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/tty/n_gsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1250,8 +1250,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);
struct gsm_msg *msg = gsm_data_alloc(gsm, 0, ctrl->len + 1, gsm->ftype);
if (msg == NULL)
return;
msg->data[0] = (ctrl->cmd << 1) | 2 | EA; /* command */
Expand Down

0 comments on commit ed43b47

Please sign in to comment.