diff options
author | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2020-05-06 02:25:21 +0300 |
---|---|---|
committer | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2020-05-06 21:03:05 +0300 |
commit | 50b55ee293479071bd161e8858b757e00d5f44dc (patch) | |
tree | 33372e5616b3015e8dbc80c79f7670a3842de300 | |
parent | 7ab23b75afe9d095f30776c6778451d6fc107e79 (diff) |
Count dynamic timeslots as TCH/F for the channel load purposes.
Change-Id: Iabd70e8adbf15eb3b7a7be597281ea99b352317b
-rw-r--r-- | src/osmo-bsc/chan_alloc.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c index 669eb8edb..0964b6121 100644 --- a/src/osmo-bsc/chan_alloc.c +++ b/src/osmo-bsc/chan_alloc.c @@ -58,6 +58,20 @@ void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts) if (!nm_is_running(&ts->mo.nm_state)) continue; + /* dynamic timeslots have to be counted separately + * when not in TCH/F or TCH/H mode because they don't + * have an lchan's allocated to them */ + if ( ( ts->pchan_on_init == GSM_PCHAN_TCH_F_TCH_H_PDCH + || ts->pchan_on_init == GSM_PCHAN_TCH_F_PDCH) + && ( ts->pchan_is == GSM_PCHAN_NONE + || ts->pchan_is == GSM_PCHAN_PDCH)) { + pl->total++; + } + + /* count allocated logical channels. + * Note: When GSM_PCHAN_TCH_F_TCH_H_PDCH is allocation + * in TCH/H mode, this leads to changing the total + * count vs the TCH/F allocation */ ts_for_each_lchan(lchan, ts) { /* don't even count CBCH slots in total */ if (lchan->type == GSM_LCHAN_CBCH) |