[PATCH] osmo-pcu[master]: EDGE: fix wrong encoding of LH bits

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Minh-Quang Nguyen gerrit-no-reply at lists.osmocom.org
Tue Sep 19 15:36:32 UTC 2017


Review at  https://gerrit.osmocom.org/3991

EDGE: fix wrong encoding of LH bits

Change-Id: I75dd5bebc74eea85edf9582607c774d0bba0d2a6
---
M src/encoding.cpp
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/91/3991/1

diff --git a/src/encoding.cpp b/src/encoding.cpp
index 6742efd..e14477a 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -85,7 +85,7 @@
 		return -EINVAL;
 	}
 	// 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,tbf->tlli(),32); // TLLI
 	bitvec_write_field(dest, &wp,0x1,1);   // switch TFI   : on
@@ -115,7 +115,7 @@
 	if (tbf->is_egprs_enabled()) {
 		/* see GMS 44.018, 10.5.2.16 */
 		unsigned int ws_enc = (tbf->m_window.ws() - 64) / 32;
-		bitvec_write_field(dest, &wp, 1, 1);  // "H"
+		bitvec_write_field_lh(dest, &wp, 1, 1);  // "H"
 		bitvec_write_field(dest, &wp, ws_enc, 5); // EGPRS Window Size
 		bitvec_write_field(dest, &wp, 0x0, 2);    // LINK_QUALITY_MEASUREMENT_MODE
 		bitvec_write_field(dest, &wp, 0, 1);      // BEP_PERIOD2 not present
@@ -133,7 +133,7 @@
 	OSMO_ASSERT(!tbf || !tbf->is_egprs_enabled());
 
 	// 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 (tbf == NULL) {
 		bitvec_write_field(dest, &wp, 0, 1);    // Block Allocation : Single Block Allocation

-- 
To view, visit https://gerrit.osmocom.org/3991
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I75dd5bebc74eea85edf9582607c774d0bba0d2a6
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Minh-Quang Nguyen <minh-quang.nguyen at nutaq.com>



More information about the gerrit-log mailing list