From 288f9b2486840647411a21d2e5489fe7ae3fba5f Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 12 Feb 2021 16:32:10 +0100 Subject: gsm: Fix bitfield order in dtap_header This bitfield was added later and all osmocom code still uses the old field contain 1 byte "link_id". There's only one known user of the new bitfield which only uses it to log the SAPI name in osmocom, so no logical breakage is expected with this change (other than fixing a log line). While at it, fix a typo in comment describing related enum. Related: SYS#4909 Fixes: 392f607f2d42eb2839ccfc4c1b9e2c7cfaf3bcc2 Change-Id: I84866f03ee642aa7f1da273c93a16a38234cfa67 --- include/osmocom/gsm/protocol/gsm_08_08.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/osmocom') diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h index fe7776b2..7ef7a290 100644 --- a/include/osmocom/gsm/protocol/gsm_08_08.h +++ b/include/osmocom/gsm/protocol/gsm_08_08.h @@ -49,12 +49,12 @@ struct dtap_header { uint8_t link_id; /* Backward compatibility */ struct { #if OSMO_IS_LITTLE_ENDIAN - uint8_t dlci_cc:2, + uint8_t dlci_sapi:3, /* enum gsm0406_dlci_sapi */ dlci_spare:3, - dlci_sapi:3; /* enum gsm0406_dlc_sapi */ + dlci_cc:2; #elif OSMO_IS_BIG_ENDIAN /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ - uint8_t dlci_sapi:3, dlci_spare:3, dlci_cc:2; + uint8_t dlci_cc:2, dlci_spare:3, dlci_sapi:3; #endif }; }; -- cgit v1.2.3