diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2016-07-29 18:10:59 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-08-27 01:23:49 +0000 |
commit | 3673380cdbefe74ae5ea5b4c05ebd9edcc023844 (patch) | |
tree | ca68a323b3468a97c2731b490ac188de2f3caba1 /openbsc/src/libbsc/chan_alloc.c | |
parent | 723f7c7db3b0fc494f15fa20cab775f596b18cb1 (diff) |
dyn TS: bts_chan_load: use correct nr of subslots for dyn ts
For TCH/F_TCH/H_PDCH dynamic timeslots, the ts->pchan does not lead to a
meaningful value from the subslots_per_pchan[] array. Use the ts_subslots()
function instead, which checks for dyn pchan.
Change-Id: I659acebca82dfb3e305433471be64e9d27439af8
Diffstat (limited to 'openbsc/src/libbsc/chan_alloc.c')
-rw-r--r-- | openbsc/src/libbsc/chan_alloc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c index c3a7e0f04..d9808f42e 100644 --- a/openbsc/src/libbsc/chan_alloc.c +++ b/openbsc/src/libbsc/chan_alloc.c @@ -555,12 +555,14 @@ void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts) struct gsm_bts_trx_ts *ts = &trx->ts[i]; struct load_counter *pl = &cl->pchan[ts->pchan]; int j; + int subslots; /* skip administratively deactivated timeslots */ if (!nm_is_running(&ts->mo.nm_state)) continue; - for (j = 0; j < subslots_per_pchan[ts->pchan]; j++) { + subslots = ts_subslots(ts); + for (j = 0; j < subslots; j++) { struct gsm_lchan *lchan = &ts->lchan[j]; pl->total++; |