From 821bf067e408f649bed62f10683fd44b43c0d673 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 15 Jun 2012 11:07:03 +0800 Subject: RSL: Add CCCH LOAD INDICATION for RACH We now count the total number of RACH slots, the number with rx level above the busy threshold, and the number of valid access bursts. This data is used to generate RSL CCCH LOAD INDICATION for the RACH. --- src/common/load_indication.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/common/load_indication.c') diff --git a/src/common/load_indication.c b/src/common/load_indication.c index aa2ec9c1..3e6fa740 100644 --- a/src/common/load_indication.c +++ b/src/common/load_indication.c @@ -40,7 +40,7 @@ static void load_timer_cb(void *data) { struct gsm_bts *bts = data; struct gsm_bts_role_bts *btsb = bts_role_bts(bts); - unsigned int pch_percent; + unsigned int pch_percent, rach_percent; /* compute percentages */ pch_percent = (btsb->load.ccch.pch_used * 100) / btsb->load.ccch.pch_total; @@ -51,6 +51,14 @@ static void load_timer_cb(void *data) rsl_tx_ccch_load_ind_pch(bts, buffer_space); } + rach_percent = (btsb->load.rach.busy * 100) / btsb->load.rach.total; + if (rach_percent >= btsb->load.ccch.load_ind_thresh) { + /* send RSL load indication message to BSC */ + rsl_tx_ccch_load_ind_rach(bts, btsb->load.rach.total, + btsb->load.rach.busy, + btsb->load.rach.access); + } + reset_load_counters(bts); /* re-schedule the timer */ -- cgit v1.2.3