提交 40e3465d 编写于 作者: K Ken Mills 提交者: 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: NKen Mills <ken.k.mills@intel.com>
Signed-off-by: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 820e62ef
......@@ -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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册