summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/bsc_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/libbsc/bsc_init.c')
-rw-r--r--openbsc/src/libbsc/bsc_init.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index dfe2797..719e19d 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -120,7 +120,7 @@ static int rsl_si(struct gsm_bts_trx *trx, enum osmo_sysinfo_type i, int si_len)
return rc;
}
-/* set all system information types */
+/* set all system information types for a TRX */
int gsm_bts_trx_set_system_infos(struct gsm_bts_trx *trx)
{
int i, rc;
@@ -197,6 +197,27 @@ err_out:
return rc;
}
+/* set all system information types for a BTS */
+int gsm_bts_set_system_infos(struct gsm_bts *bts)
+{
+ struct gsm_bts_trx *trx;
+
+ /* Generate a new ID */
+ bts->bcch_change_mark += 1;
+ bts->bcch_change_mark %= 0x7;
+
+ llist_for_each_entry(trx, &bts->trx_list, list) {
+ int rc;
+
+ rc = gsm_bts_trx_set_system_infos(trx);
+ if (rc != 0) {
+ return rc;
+ }
+ }
+
+ return 0;
+}
+
/* Produce a MA as specified in 10.5.2.21 */
static int generate_ma_for_ts(struct gsm_bts_trx_ts *ts)
{