diff options
author | Ken Mills <ken.k.mills@intel.com> | 2010-11-04 15:16:42 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-11 11:06:09 -0800 |
commit | 40e3465db2cffd64e069ca82ee981025554bc159 (patch) | |
tree | 4d1f8b2e9eb7a6e585c3818cafa49f5840165941 /drivers | |
parent | 820e62ef3d39ba9414dd9b87dba2eedd7e403e53 (diff) | |
download | blackbird-op-linux-40e3465db2cffd64e069ca82ee981025554bc159.tar.gz blackbird-op-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')
-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) 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; } } |