aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/chan_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/libbsc/chan_alloc.c')
-rw-r--r--openbsc/src/libbsc/chan_alloc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c
index b27ac8fd2..5fa20af29 100644
--- a/openbsc/src/libbsc/chan_alloc.c
+++ b/openbsc/src/libbsc/chan_alloc.c
@@ -609,8 +609,9 @@ bts_update_t3122_chan_load(struct gsm_bts *bts)
load = ((used / total) * 100);
LOGP(DRLL, LOGL_DEBUG, "(bts=%d) channel load average is %lu.%.2lu%%\n",
bts->nr, (load & 0xffffff00) >> 8, (load & 0xff) / 10);
- osmo_stat_item_set(bts->bts_statg->items[BTS_STAT_CHAN_LOAD_AVERAGE],
- (load & 0xffffff00) >> 8);
+ bts->chan_load_avg = ((load & 0xffffff00) >> 8);
+ OSMO_ASSERT(bts->chan_load_avg <= 100);
+ osmo_stat_item_set(bts->bts_statg->items[BTS_STAT_CHAN_LOAD_AVERAGE], bts->chan_load_avg);
/* Calculate new T3122 wait indicator. */
wait_ind = ((used / total) * max_wait_ind);