From 6a8536d4da7a2be83ba8647ed12bdc200740dc36 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Tue, 6 Apr 2021 04:01:50 +0200 Subject: [hopping] Rework generation of Cell/Mobile Allocation Calculating the Cell Allocation (basically a bit-vector of all the frequencies allocated to a cell) on the OML link establishment has several downsides and potential problems: * Theoretically, more than 64 ARFCNs can be allocated for a cell via the VTY interface. The problem here is that the Mobile Allocation IE cannot contain more than 64 channels. * The BSC's operator will neither be warned by the interactive VTY shell during configuration, nor during the startup. * The BSC will accept such a configuration, but then will be unable to encode the Mobile Allocation IEs at run-time. This change aims to improve the situation by separating part of the logic from generate_cell_chan_list(), and invoking this part directly from the VTY commands. This way it will become impossible to configure more than 64 ARFCNs, neither via the config file, nor interactively from the VTY. Change-Id: I98211fb0684a973239f5760e1de52a24a1f4c33c --- include/osmocom/bsc/bts.h | 1 + include/osmocom/bsc/system_information.h | 1 + 2 files changed, 2 insertions(+) (limited to 'include') diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h index c8cf8b330..c03c75ed6 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -451,6 +451,7 @@ struct gsm_bts { struct bitvec si5_neigh_list; struct osmo_earfcn_si2q si2quater_neigh_list; size_t uarfcn_length; /* index for uarfcn and scramble lists */ + size_t cell_chan_num; /* number of channels in Cell Allocation */ struct { /* bitmask large enough for all possible ARFCN's */ uint8_t neigh_list[1024/8]; diff --git a/include/osmocom/bsc/system_information.h b/include/osmocom/bsc/system_information.h index 35892d9d6..e86a3493c 100644 --- a/include/osmocom/bsc/system_information.h +++ b/include/osmocom/bsc/system_information.h @@ -7,6 +7,7 @@ struct gsm_bts; +int generate_cell_chan_alloc(struct gsm_bts *bts); int generate_cell_chan_list(uint8_t *chan_list, struct gsm_bts *bts); int gsm_generate_si(struct gsm_bts *bts, enum osmo_sysinfo_type type); size_t si2q_earfcn_count(const struct osmo_earfcn_si2q *e); -- cgit v1.2.3