aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Chemeris <Alexander.Chemeris@gmail.com>2020-05-06 02:25:21 +0300
committerAlexander Chemeris <Alexander.Chemeris@gmail.com>2020-05-06 21:03:05 +0300
commit50b55ee293479071bd161e8858b757e00d5f44dc (patch)
tree33372e5616b3015e8dbc80c79f7670a3842de300
parent7ab23b75afe9d095f30776c6778451d6fc107e79 (diff)
Count dynamic timeslots as TCH/F for the channel load purposes.
-rw-r--r--src/osmo-bsc/chan_alloc.c14
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)