aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2021-10-12 15:21:00 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2021-10-13 11:47:01 +0200
commitd24d34aff07e066ffc46e765b97402bf2f69e883 (patch)
treeacd3ab218257dbdf53141a4e76b7eab3aabc4d2c
parentb818d5755f5b1824df2cbceb279ec8c269789579 (diff)
bts: set ncc_permitted from bts_alloc
The value ncc_permitted is preset in osmo_bsc_main.c from bootstrap_bts(). It is a constant value that also cannot be changed via the VTY. Therefore it should be set from bts_alloc(). This also fixes the problem that when the BTS is added at runtime from the VTY. BTSs added at runtime would have an all zero ncc_permitted until the next restart of osmo_bsc. Change-Id: I9f02277d7b4b4bcb383e749435416a0b22efd5e8 Related: SYS#5369
-rw-r--r--src/osmo-bsc/bts.c1
-rw-r--r--src/osmo-bsc/osmo_bsc_main.c2
-rw-r--r--tests/gsm0408/gsm0408_test.ok2
3 files changed, 2 insertions, 3 deletions
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index 092c7907f..fe18b59d3 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -273,6 +273,7 @@ struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, struct gsm_bts_sm *bts_sm
bts->si_common.chan_desc.t3212 = osmo_tdef_get(net->T_defs, 3212, OSMO_TDEF_CUSTOM, -1);
bts->si_common.cell_options.pwrc = 0; /* PWRC not set */
bts->si_common.cell_sel_par.acs = 0;
+ bts->si_common.ncc_permitted = 0xff;
gsm_bts_set_radio_link_timeout(bts, 32); /* Use RADIO LINK TIMEOUT of 32 */
INIT_LLIST_HEAD(&bts->abis_queue);
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 28a56a774..3a1a6731e 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -510,8 +510,6 @@ static int bootstrap_bts(struct gsm_bts *bts)
bts->si_common.chan_desc.ccch_conf = (n << 1);
}
- bts->si_common.ncc_permitted = 0xff;
-
/* ACC ramping is initialized from vty/config */
/* Initialize the BTS state */
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index b22d0c241..0bb7ee037 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -169,7 +169,7 @@ generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4b b8 4
BTS deallocated OK in test_si2q_long()
BTS allocation OK in test_si_ba_ind()
Testing if BA-IND is set as expected in SI2xxx and SI5xxx
-SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e5 04 00
+SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff e5 04 00
SI2bis: 55 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e5 04 00 2b
SI2ter: 49 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b
SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00