diff options
author | Stefan Sperling <ssperling@sysmocom.de> | 2018-04-09 17:15:29 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-04-09 17:38:54 +0000 |
commit | ebc1e39d919f5f919cb176ee9c6cbbccc8d620b1 (patch) | |
tree | 9de57c5648976f48a8926cf3e1d7e273d2ca6580 | |
parent | 79e13fa11e542cf0b1b423a8970646faf0cff936 (diff) |
fix initialization of acc ramping
Remove a redundant call to acc_ramp_init() during bootstrap_bts().
ACC ramping state is already initialized during VTY config parsing,
and bootstrap_bts() accidentally disabled ACC ramping again even
if it was enabled in the configuration.
This bug was introduced in last-minute refactoring during
review of https://gerrit.osmocom.org/#/c/6324/ when the
acc_ramping_enabled flag was moved from struct gsm_bts to
the acc_ramp structure itself.
Also remove an acc_ramp_init() call in bootstrap_rsl().
It is no longer needed as it serves no purpose other than
initializing the bitmasks of barred ACCs. To ensure that
ACC ramping configuration provided to the BTS via system
information stays correct, we move the call to acc_ramp_start(),
which has the same effect on barred ACCs, further up.
Port of osmo-bsc commit f34fb4828249eab44b4515e0e54b3ee0491d0051
Fixes: 8469818e33ef81e9f707a0c4dd13d7b91ecf83f5
Related: OS#2591
Change-Id: I5834fd953e65b8453dee0a7751d5a4cae12be83a
-rw-r--r-- | openbsc/src/libbsc/bsc_init.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index 9389c4342..6147257c4 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -321,6 +321,9 @@ 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); gsm_bts_trx_set_system_infos(trx); if (trx->bts->type == GSM_BTS_TYPE_NOKIA_SITE) { @@ -331,9 +334,6 @@ static void bootstrap_rsl(struct gsm_bts_trx *trx) for (i = 0; i < ARRAY_SIZE(trx->ts); i++) generate_ma_for_ts(&trx->ts[i]); - - if (acc_ramp_is_enabled(&trx->bts->acc_ramp)) - acc_ramp_start(&trx->bts->acc_ramp); } /* Callback function to be called every time we receive a signal from INPUT */ @@ -521,7 +521,7 @@ static int bootstrap_bts(struct gsm_bts *bts) bts->chan_load_samples_idx = 0; - acc_ramp_init(&bts->acc_ramp, false, bts); + /* ACC ramping is initialized from vty/config */ /* Initialize the BTS state */ gsm_bts_mo_reset(bts); |