diff options
author | Max <msuraev@sysmocom.de> | 2017-04-12 15:30:54 +0200 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2017-04-28 08:45:36 +0000 |
commit | 6f0e50c8337355eb59033903ede9ab6528890835 (patch) | |
tree | d272206d3708f575ed73d5d8e96ea359d3d5310b /openbsc/src/libbsc/bsc_vty.c | |
parent | a18001d50605b0c7d4ae54c812b8766f8e7f5f61 (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/bsc_vty.c')
-rw-r--r-- | openbsc/src/libbsc/bsc_vty.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 3c70580ac..195fd6a96 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -644,7 +644,7 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts) get_value_string(osmo_sitype_strs, i), VTY_NEWLINE); vty_out(vty, " system-information %s static %s%s", get_value_string(osmo_sitype_strs, i), - osmo_hexdump_nospc(bts->si_buf[i], sizeof(bts->si_buf[i])), + osmo_hexdump_nospc(GSM_BTS_SI(bts, i), GSM_MACBLOCK_LEN), VTY_NEWLINE); } } @@ -2687,11 +2687,11 @@ DEFUN(cfg_bts_si_static, cfg_bts_si_static_cmd, } /* Fill buffer with padding pattern */ - memset(bts->si_buf[type], 0x2b, sizeof(bts->si_buf[type])); + memset(GSM_BTS_SI(bts, type), 0x2b, GSM_MACBLOCK_LEN); /* Parse the user-specified SI in hex format, [partially] overwriting padding */ - rc = osmo_hexparse(argv[1], bts->si_buf[type], sizeof(bts->si_buf[0])); - if (rc < 0 || rc > sizeof(bts->si_buf[0])) { + rc = osmo_hexparse(argv[1], GSM_BTS_SI(bts, type), GSM_MACBLOCK_LEN); + if (rc < 0 || rc > GSM_MACBLOCK_LEN) { vty_out(vty, "Error parsing HEXSTRING%s", VTY_NEWLINE); return CMD_WARNING; } @@ -2829,7 +2829,7 @@ DEFUN(cfg_bts_si2quater_neigh_add, cfg_bts_si2quater_neigh_add_cmd, e->prio_valid = true; } - if (si2q_size_check(bts)) + if (si2q_num(bts) < 2) return CMD_SUCCESS; vty_out(vty, "Warning: not enough space in SI2quater for a given EARFCN " |