diff options
author | Philipp <pmaier@sysmocom.de> | 2016-12-20 14:23:45 +0100 |
---|---|---|
committer | Philipp <pmaier@sysmocom.de> | 2016-12-20 14:23:45 +0100 |
commit | 8bd7fba5626b8b2f2e02dc2fe43713af3a26623b (patch) | |
tree | 0bac4cd20da5ee755c7a24ae7000b15b635f36d2 | |
parent | b0a32e58d11f7dd79272a178eef838980b980d41 (diff) |
gprs: 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.
-rw-r--r-- | openbsc/src/libbsc/rest_octets.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/rest_octets.c b/openbsc/src/libbsc/rest_octets.c index 1a5e43525..b6de6969a 100644 --- a/openbsc/src/libbsc/rest_octets.c +++ b/openbsc/src/libbsc/rest_octets.c @@ -556,6 +556,9 @@ static int encode_t3192(unsigned int t3192) static int encode_drx_timer(unsigned int drx) { + /* See also 3GPP TS 44.060 + Table 12.24.2: GPRS Cell Options information element details */ + if (drx == 0) return 0; else if (drx == 1) @@ -613,7 +616,11 @@ static int append_gprs_cell_opt(struct bitvec *bv, 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 */ |