aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/rest_octets.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-04-12 15:30:54 +0200
committerMax <msuraev@sysmocom.de>2017-04-28 08:45:36 +0000
commit6f0e50c8337355eb59033903ede9ab6528890835 (patch)
treed272206d3708f575ed73d5d8e96ea359d3d5310b /openbsc/src/libbsc/rest_octets.c
parenta18001d50605b0c7d4ae54c812b8766f8e7f5f61 (diff)
Prepare for extended SI2quater support
Supporting SI2quater as per 3GPP TS 44.018 will require chnages to the way System Information is stored because it uses 1:n instead of 1:1 mapping between SI type and generated SI content. This should not affect other SI types though. To facilitate this transition: * convert the code to always use GSM_BTS_SI helper instead of accessing buffer directly * make helper more robust by adding extra parenthesis * add similar helper for gsm_lchan * add function estimating number of SI2quater message to hold configured number of (U|E)ARFCNs * add SI2q index/count fields and pass them to rest_octets generator explicitly * internalize buffer access in generate_si* functions Change-Id: I74e4e3cb86364cec869a1472a41b4a95af0d50dd Related: RT#8792
Diffstat (limited to 'openbsc/src/libbsc/rest_octets.c')
-rw-r--r--openbsc/src/libbsc/rest_octets.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/src/libbsc/rest_octets.c b/openbsc/src/libbsc/rest_octets.c
index ed6c573d5..af660f1f1 100644
--- a/openbsc/src/libbsc/rest_octets.c
+++ b/openbsc/src/libbsc/rest_octets.c
@@ -256,7 +256,7 @@ static inline int append_uarfcns(struct bitvec *bv, const uint16_t *u,
}
/* generate SI2quater rest octets: 3GPP TS 44.018 ยง 10.5.2.33b */
-int rest_octets_si2quater(uint8_t *data, const struct osmo_earfcn_si2q *e,
+int rest_octets_si2quater(uint8_t *data, uint8_t index, uint8_t count, const struct osmo_earfcn_si2q *e,
const uint16_t *u, const uint16_t *sc, size_t u_len)
{
int rc;
@@ -275,9 +275,9 @@ int rest_octets_si2quater(uint8_t *data, const struct osmo_earfcn_si2q *e,
/* we do not support multiple si2quater messages at the moment: */
/* SI2quater_INDEX */
- bitvec_set_uint(&bv, 0, 4);
+ bitvec_set_uint(&bv, index, 4);
/* SI2quater_COUNT */
- bitvec_set_uint(&bv, 0, 4);
+ bitvec_set_uint(&bv, count, 4);
/* No Measurement_Parameters Description */
bitvec_set_bit(&bv, 0);