diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2016-12-20 14:23:45 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-03-15 13:15:26 +0000 |
commit | 3d6cb338c6764a58f9ac06e305e0e9892790d127 (patch) | |
tree | c1902dd81a5b705f784b8b5c6745d5e51c4e45d7 /openbsc/src/libbsc/rest_octets.c | |
parent | e7379fe6570b97c7adea0b74b624adbcd4e56b35 (diff) |
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
Diffstat (limited to 'openbsc/src/libbsc/rest_octets.c')
-rw-r--r-- | openbsc/src/libbsc/rest_octets.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/rest_octets.c b/openbsc/src/libbsc/rest_octets.c index 6fae9cd87..ed6c573d5 100644 --- a/openbsc/src/libbsc/rest_octets.c +++ b/openbsc/src/libbsc/rest_octets.c @@ -566,6 +566,8 @@ static int append_gprs_mobile_alloc(struct bitvec *bv) 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 @@ 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 */ |