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 02:53:55 +0300
commit0abc3f2f45566bb64f2417a47ca73b9e1a6710c1 (patch)
tree6379d17e71155701d31828db72e7279cdca40ae4
parent7ab23b75afe9d095f30776c6778451d6fc107e79 (diff)
Count dynamic timeslots as TCH/F for the channel load purposes.
-rw-r--r--src/osmo-bsc/chan_alloc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c
index 669eb8edb..9c5d0dd44 100644
--- a/src/osmo-bsc/chan_alloc.c
+++ b/src/osmo-bsc/chan_alloc.c
@@ -51,13 +51,22 @@ void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts)
for (i = 0; i < ARRAY_SIZE(trx->ts); i++) {
struct gsm_bts_trx_ts *ts = &trx->ts[i];
- struct load_counter *pl = &cl->pchan[ts->pchan_on_init];
+// enum gsm_phys_chan_config pchan = ts->pchan_on_init;
+ enum gsm_phys_chan_config pchan = ts->pchan_is;
+ struct load_counter *pl = &cl->pchan[pchan];
struct gsm_lchan *lchan;
/* skip administratively deactivated timeslots */
if (!nm_is_running(&ts->mo.nm_state))
continue;
+ 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)) {
+ cl->pchan[GSM_PCHAN_TCH_F].total++;
+ }
+
ts_for_each_lchan(lchan, ts) {
/* don't even count CBCH slots in total */
if (lchan->type == GSM_LCHAN_CBCH)