Commit 40e3465d authored by Ken Mills's avatar Ken Mills Committed by Greg Kroah-Hartman

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: default avatarKen Mills <ken.k.mills@intel.com>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 820e62ef
...@@ -716,8 +716,8 @@ static void __gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg) ...@@ -716,8 +716,8 @@ static void __gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
if (msg->len < 128) if (msg->len < 128)
*--dp = (msg->len << 1) | EA; *--dp = (msg->len << 1) | EA;
else { else {
*--dp = (msg->len >> 6) | EA; *--dp = ((msg->len & 127) << 1) | EA;
*--dp = (msg->len & 127) << 1; *--dp = (msg->len >> 6) & 0xfe;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment