aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-02-08 18:44:05 +0100
committerStefan Sperling <ssperling@sysmocom.de>2018-02-08 18:44:05 +0100
commita137e3529d0d4fce53544ee60deaad1f7d6ef723 (patch)
tree03f24452705dbd297ce24f17c104b559b0825df7
parent82d116053904a35c0bf1fe817d09af27a0f0b35d (diff)
enable and disable ACC ramping when link comes up / goes downstsp/acc_ramp
-rw-r--r--include/osmocom/bsc/acc_ramp.h5
-rw-r--r--src/libbsc/bsc_init.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/include/osmocom/bsc/acc_ramp.h b/include/osmocom/bsc/acc_ramp.h
index a4ce0d2d6..9e0d13f00 100644
--- a/include/osmocom/bsc/acc_ramp.h
+++ b/include/osmocom/bsc/acc_ramp.h
@@ -106,7 +106,10 @@ void acc_ramp_set_step_interval_dynamic(struct acc_ramp *acc_ramp);
*/
void acc_ramp_start(struct acc_ramp *acc_ramp);
-/* Abort the ramping process. If the process has already finished, this function has no effect. */
+/*
+ * Abort the ramping process. If ramping is disabled or has already finished,
+ * then this function has no effect.
+ */
void acc_ramp_abort(struct acc_ramp *acc_ramp);
/*
diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c
index 67a421c70..18c1eb77f 100644
--- a/src/libbsc/bsc_init.c
+++ b/src/libbsc/bsc_init.c
@@ -331,6 +331,9 @@ static void bootstrap_rsl(struct gsm_bts_trx *trx)
bsc_gsmnet->network_code, trx->bts->location_area_code,
trx->bts->cell_identity, trx->bts->bsic);
+ if (trx->bts->acc_ramping_enabled)
+ acc_ramp_start(&trx->bts->acc_ramp);
+
if (trx->bts->type == GSM_BTS_TYPE_NOKIA_SITE) {
rsl_nokia_si_begin(trx);
}
@@ -400,8 +403,10 @@ static int inp_sig_cb(unsigned int subsys, unsigned int signal,
if (isd->link_type == E1INP_SIGN_OML)
rate_ctr_inc(&trx->bts->bts_ctrs->ctr[BTS_CTR_BTS_OML_FAIL]);
- else if (isd->link_type == E1INP_SIGN_RSL)
+ else if (isd->link_type == E1INP_SIGN_RSL) {
rate_ctr_inc(&trx->bts->bts_ctrs->ctr[BTS_CTR_BTS_RSL_FAIL]);
+ acc_ramp_abort(&trx->bts->acc_ramp);
+ }
/*
* free all allocated channels. change the nm_state so the