aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcommon/acc_ramp.c
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-02-06 18:53:25 +0100
committerStefan Sperling <ssperling@sysmocom.de>2018-02-06 18:53:25 +0100
commitd26f6d402e43028df512527c3541b6d8da0dbf73 (patch)
treede7c6b88509388b4905982975ff339f8c30a9d09 /src/libcommon/acc_ramp.c
parent7f117ae21c0a830dac04e062498d37b2cce8b64e (diff)
update rach control parameters
Diffstat (limited to 'src/libcommon/acc_ramp.c')
-rw-r--r--src/libcommon/acc_ramp.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libcommon/acc_ramp.c b/src/libcommon/acc_ramp.c
index 001a46fcb..3f83d1e1d 100644
--- a/src/libcommon/acc_ramp.c
+++ b/src/libcommon/acc_ramp.c
@@ -73,6 +73,21 @@ static unsigned int get_next_step_interval(struct acc_ramp *acc_ramp)
return acc_ramp->step_interval_sec;
}
+static void update_bts_rach_control(struct acc_ramp *acc_ramp)
+{
+ struct gsm_bts *bts = acc_ramp->bts;
+ struct gsm_bts_trx *trx;
+
+ /* Update RACH control parameters of this BTS. */
+ bts->si_common.rach_control.t2 &= ~0x03;
+ bts->si_common.rach_control.t2 |= acc_ramp_get_barred_t2(acc_ramp);
+ bts->si_common.rach_control.t3 = acc_ramp_get_barred_t3(acc_ramp);
+
+ /* Send updated system information to all TRX. */
+ llist_for_each_entry_reverse(trx, &bts->trx_list, list)
+ gsm_bts_trx_set_system_infos(trx);
+}
+
static void do_ramping_step(void *data)
{
struct acc_ramp *acc_ramp = data;
@@ -102,6 +117,9 @@ static void do_ramping_step(void *data)
}
}
+
+ update_bts_rach_control(acc_ramp);
+
/* If we have not allowed all ACCs yet, schedule another ramping step. */
if (acc_ramp_get_barred_t2(acc_ramp) != 0x00 ||
acc_ramp_get_barred_t3(acc_ramp) != 0x00)