[MERGED] openbsc[master]: gprs: fix T3186 encoding in Sysinfo 13

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Mar 15 13:15:28 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: gprs: fix T3186 encoding in Sysinfo 13
......................................................................


gprs: fix T3186 encoding in Sysinfo 13

The timer T3186, which is described in 3GPP TS 44.060, is using 3
bits of the si13 mac block. This requires special encoding. In the
case of T3186, the value is encoded by the formula: bits = t/500-1.
Our implementation uses the formula bits=t/500, which is incorrect.

Change-Id: Ifd340c536cff2d1c4b1b3677a358ea95438801eb
---
M openbsc/src/libbsc/rest_octets.c
1 file changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/src/libbsc/rest_octets.c b/openbsc/src/libbsc/rest_octets.c
index 6fae9cd..ed6c573 100644
--- a/openbsc/src/libbsc/rest_octets.c
+++ b/openbsc/src/libbsc/rest_octets.c
@@ -566,6 +566,8 @@
 
 static int encode_t3192(unsigned int t3192)
 {
+	/* See also 3GPP TS 44.060
+	   Table 12.24.2: GPRS Cell Options information element details */
 	if (t3192 == 0)
 		return 3;
 	else if (t3192 <= 80)
@@ -645,7 +647,11 @@
 		return drx_timer_max;
 
 	bitvec_set_uint(bv, gco->nmo, 2);
-	bitvec_set_uint(bv, gco->t3168 / 500, 3);
+
+	/* See also 3GPP TS 44.060
+	   Table 12.24.2: GPRS Cell Options information element details */
+	bitvec_set_uint(bv, gco->t3168 / 500 - 1, 3);
+
 	bitvec_set_uint(bv, t3192, 3);
 	bitvec_set_uint(bv, drx_timer_max, 3);
 	/* ACCESS_BURST_TYPE: Hard-code 8bit */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd340c536cff2d1c4b1b3677a358ea95438801eb
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>



More information about the gerrit-log mailing list