aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-01 15:05:42 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-08 00:45:38 +0100
commit7505f1d63613892a29c3bfb503d3f6f185fb1016 (patch)
treeca96299dff7b97b708183f633da8a88c85592328
parent4e7424d47bf15b3d7a902fbd020838540117292a (diff)
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
-rw-r--r--src/encoding.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/encoding.cpp b/src/encoding.cpp
index 9471fff..4da533a 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -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