acc: Fix erratic ramping behavior when several BTS configured
One callback function was being registered for each BTS. That means, when a C0 RCARRIER of one specific BTS changed NM state, the outcome on whether to trigger/abort ramping would end up being applied to all BTS. Change-Id: I56c4dd1809fdcf8441a69bf77ad173e1ccc8eea7
This commit is contained in:
parent
7d621e0a79
commit
7b36d0b0a0
|
@ -161,6 +161,8 @@ static inline unsigned int acc_ramp_is_running(struct acc_ramp *acc_ramp)
|
|||
return acc_ramp->step_interval_sec;
|
||||
}
|
||||
|
||||
void acc_ramp_global_init(void);
|
||||
|
||||
void acc_ramp_init(struct acc_ramp *acc_ramp, struct gsm_bts *bts);
|
||||
int acc_ramp_set_step_size(struct acc_ramp *acc_ramp, unsigned int step_size);
|
||||
int acc_ramp_set_step_interval(struct acc_ramp *acc_ramp, unsigned int step_interval);
|
||||
|
|
|
@ -414,7 +414,6 @@ static void do_acc_ramping_step(void *data)
|
|||
static int acc_ramp_nm_sig_cb(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data)
|
||||
{
|
||||
struct nm_statechg_signal_data *nsd = signal_data;
|
||||
struct acc_ramp *acc_ramp = handler_data;
|
||||
struct gsm_bts_trx *trx = NULL;
|
||||
bool trigger_ramping = false, abort_ramping = false;
|
||||
|
||||
|
@ -523,9 +522,9 @@ static int acc_ramp_nm_sig_cb(unsigned int subsys, unsigned int signal, void *ha
|
|||
}
|
||||
|
||||
if (trigger_ramping)
|
||||
acc_ramp_trigger(acc_ramp);
|
||||
acc_ramp_trigger(&trx->bts->acc_ramp);
|
||||
else if (abort_ramping)
|
||||
acc_ramp_abort(acc_ramp);
|
||||
acc_ramp_abort(&trx->bts->acc_ramp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -548,7 +547,6 @@ void acc_ramp_init(struct acc_ramp *acc_ramp, struct gsm_bts *bts)
|
|||
acc_ramp->chan_load_lower_threshold = ACC_RAMP_CHAN_LOAD_THRESHOLD_LOW;
|
||||
acc_ramp->chan_load_upper_threshold = ACC_RAMP_CHAN_LOAD_THRESHOLD_UP;
|
||||
osmo_timer_setup(&acc_ramp->step_timer, do_acc_ramping_step, acc_ramp);
|
||||
osmo_signal_register_handler(SS_NM, acc_ramp_nm_sig_cb, acc_ramp);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -646,3 +644,8 @@ void acc_ramp_abort(struct acc_ramp *acc_ramp)
|
|||
|
||||
acc_mgr_set_len_allowed_ramp(&acc_ramp->bts->acc_mgr, 10);
|
||||
}
|
||||
|
||||
void acc_ramp_global_init(void)
|
||||
{
|
||||
osmo_signal_register_handler(SS_NM, acc_ramp_nm_sig_cb, NULL);
|
||||
}
|
||||
|
|
|
@ -929,6 +929,7 @@ int main(int argc, char **argv)
|
|||
assignment_fsm_init();
|
||||
handover_fsm_init();
|
||||
lb_init();
|
||||
acc_ramp_global_init();
|
||||
|
||||
/* Read the config */
|
||||
rc = bsc_network_configure(config_file);
|
||||
|
|
Loading…
Reference in New Issue