encoding: Use explicit LH encoding in write_immediate_assignment

Currently bitvec_write_field is used which just sets the bits as
given, while the spec 44.018 assumes LH encoding.

Use the bitvec_write_field_lh function instead.

Sponsored-by: On-Waves ehf
This commit is contained in:
Jacob Erlbeck 2016-02-01 15:05:42 +01:00
parent 4e7424d47b
commit 7505f1d636
1 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ int Encoding::write_immediate_assignment(
if (downlink)
{
// GSM 04.08 10.5.2.16 IA Rest Octets
bitvec_write_field(dest, wp, 3, 2); // "HH"
bitvec_write_field_lh(dest, wp, 3, 2); // "HH"
bitvec_write_field(dest, wp, 1, 2); // "01" Packet Downlink Assignment
bitvec_write_field(dest, wp,tlli,32); // TLLI
bitvec_write_field(dest, wp,0x1,1); // switch TFI : on
@ -119,7 +119,7 @@ int Encoding::write_immediate_assignment(
else
{
// GMS 04.08 10.5.2.37b 10.5.2.16
bitvec_write_field(dest, wp, 3, 2); // "HH"
bitvec_write_field_lh(dest, wp, 3, 2); // "HH"
bitvec_write_field(dest, wp, 0, 2); // "0" Packet Uplink Assignment
if (single_block) {
bitvec_write_field(dest, wp, 0, 1); // Block Allocation : Single Block Allocation