summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorKen Mills <ken.k.mills@intel.com>2010-11-04 16:16:42 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-11-11 20:06:09 +0100
commit40e3465db2cffd64e069ca82ee981025554bc159 (patch)
tree4d1f8b2e9eb7a6e585c3818cafa49f5840165941 /drivers/tty
parentn_gsm: Copy n2 over when configuring via ioctl interface (diff)
downloadlinux-40e3465db2cffd64e069ca82ee981025554bc159.tar.xz
linux-40e3465db2cffd64e069ca82ee981025554bc159.zip
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.c4
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)
if (msg->len < 128)
*--dp = (msg->len << 1) | EA;
else {
- *--dp = (msg->len >> 6) | EA;
- *--dp = (msg->len & 127) << 1;
+ *--dp = ((msg->len & 127) << 1) | EA;
+ *--dp = (msg->len >> 6) & 0xfe;
}
}