summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorKen Mills <ken.k.mills@intel.com>2010-11-04 15:16:42 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2010-11-11 11:06:09 -0800
commit40e3465db2cffd64e069ca82ee981025554bc159 (patch)
tree4d1f8b2e9eb7a6e585c3818cafa49f5840165941 /drivers/tty
parent820e62ef3d39ba9414dd9b87dba2eedd7e403e53 (diff)
downloadop-kernel-dev-40e3465db2cffd64e069ca82ee981025554bc159.zip
op-kernel-dev-40e3465db2cffd64e069ca82ee981025554bc159.tar.gz
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 7f79044..81b46585 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;
}
}
OpenPOWER on IntegriCloud