Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -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;
		}
		}
	}
	}