diff options
author | Ken Mills <ken.k.mills@intel.com> | 2010-11-04 11:16:42 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-11 14:06:09 -0500 |
commit | 40e3465db2cffd64e069ca82ee981025554bc159 (patch) | |
tree | 4d1f8b2e9eb7a6e585c3818cafa49f5840165941 /drivers/tty | |
parent | 820e62ef3d39ba9414dd9b87dba2eedd7e403e53 (diff) |
n_gsm: Fix length handling
If the mux is configured with a large mru/mtu the existing code gets the
byte ordering wrong for the header.
Signed-off-by: Ken Mills <ken.k.mills@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/n_gsm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 7f79044ae996..81b46585edf7 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c | |||
@@ -716,8 +716,8 @@ static void __gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg) | |||
716 | if (msg->len < 128) | 716 | if (msg->len < 128) |
717 | *--dp = (msg->len << 1) | EA; | 717 | *--dp = (msg->len << 1) | EA; |
718 | else { | 718 | else { |
719 | *--dp = (msg->len >> 6) | EA; | 719 | *--dp = ((msg->len & 127) << 1) | EA; |
720 | *--dp = (msg->len & 127) << 1; | 720 | *--dp = (msg->len >> 6) & 0xfe; |
721 | } | 721 | } |
722 | } | 722 | } |
723 | 723 | ||