mirror of https://gerrit.osmocom.org/libosmocore
gsm48_hdr_msg_type[_r99]: Fix bit-masks
TS 24.007 is quite clear: The upper two bits of the message type octet are *not* part of the message type in any of the L3 protocols which implement sequence numbers. it doesn't matter if it's R98 or R99, or whether the sequence number is 1bit or 2bits wide. Related: OS#2908 Change-Id: Iec875a77f5458322dfbef174f5abfc0e8c09d464
This commit is contained in:
parent
cd82710be7
commit
143aed7fa6
|
@ -1001,7 +1001,7 @@ static inline uint8_t gsm48_hdr_msg_type_r98(const struct gsm48_hdr *hdr)
|
|||
case GSM48_PDISC_GROUP_CC:
|
||||
case GSM48_PDISC_BCAST_CC:
|
||||
case GSM48_PDISC_LOC:
|
||||
return hdr->msg_type & 0xbf;
|
||||
return hdr->msg_type & 0x3f;
|
||||
default:
|
||||
return hdr->msg_type;
|
||||
}
|
||||
|
@ -1022,7 +1022,7 @@ static inline uint8_t gsm48_hdr_msg_type_r99(const struct gsm48_hdr *hdr)
|
|||
case GSM48_PDISC_GROUP_CC:
|
||||
case GSM48_PDISC_BCAST_CC:
|
||||
case GSM48_PDISC_LOC:
|
||||
return hdr->msg_type & 0xbf;
|
||||
return hdr->msg_type & 0x3f;
|
||||
default:
|
||||
return hdr->msg_type;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue