drivers: console: gsm_mux: fix length indicator

The MSB and LSB were inverted for length > 127
Fixes #41077

Signed-off-by: Guillaume Lager <g.lager@innoseis.com>
This commit is contained in:
Guillaume Lager 2021-12-10 17:57:51 +01:00 committed by Maureen Helm
parent 45307140ac
commit ba7e70e0bc

View file

@ -387,8 +387,8 @@ static int gsm_mux_send_data_msg(struct gsm_mux *mux, bool cmd,
hdr[3] = (size << 1) | EA;
pos = 4;
} else {
hdr[3] = (size >> 7);
hdr[4] = (size & 127) << 1;
hdr[3] = (size & 127) << 1;
hdr[4] = (size >> 7);
pos = 5;
}