aboutsummaryrefslogtreecommitdiffstats
path: root/src/libbsc/bsc_init.c
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-04-10 16:36:54 +0200
committerHarald Welte <laforge@gnumonks.org>2018-04-11 16:53:05 +0000
commitea33341cf7b52d432be98f2280b4a5f3129ef667 (patch)
tree702489b4448a1dab018cc3f7990aef415fdb06de /src/libbsc/bsc_init.c
parent881836a7707a05b0871c73c50ad48f591043d07e (diff)
ensure that acc_ramp_init() is only called once
There are plans to register signal handlers in acc_ramp_init(). Once we do that, the acc_ramp_init() function should only be called once to avoid duplicate signal handlers on the handler list. However, the acc_ramp_init() function currently serves a dual-purpose: 1) Initialize the acc_ramp structure for a bts 2) Enable or disable ACC ramping Add new functions to support use case 2, and call acc_ramp_init() just once while reading the configuration file. The VTY commands which enable/disable ACC ramping use the new APIs instead. Also, rename acc_ramp_start() to acc_ramp_trigger() and tweak its semantics so that it can always be called regardless of what the current configuration settings are. This prepares us for triggering ACC ramping upon events other than "RSL link-up". Change-Id: Ia25bff85d9e5c277da76bffa11d31972e9fdc323 Related: OS2591
Diffstat (limited to 'src/libbsc/bsc_init.c')
-rw-r--r--src/libbsc/bsc_init.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c
index d1173e0ca..c35710533 100644
--- a/src/libbsc/bsc_init.c
+++ b/src/libbsc/bsc_init.c
@@ -336,9 +336,12 @@ static void bootstrap_rsl(struct gsm_bts_trx *trx)
rsl_nokia_si_begin(trx);
}
- /* Configure ACC ramping before sending system information to BTS. */
- if (acc_ramp_is_enabled(&trx->bts->acc_ramp))
- acc_ramp_start(&trx->bts->acc_ramp);
+ /*
+ * Trigger ACC ramping before sending system information to BTS.
+ * This ensures that RACH control in system information is configured correctly.
+ */
+ acc_ramp_trigger(&trx->bts->acc_ramp);
+
gsm_bts_trx_set_system_infos(trx);
if (trx->bts->type == GSM_BTS_TYPE_NOKIA_SITE) {