diff options
author | Kirill Zakharenko <earwin@gmail.com> | 2020-05-06 03:00:51 +0300 |
---|---|---|
committer | Kirill Zakharenko <earwin@gmail.com> | 2020-05-06 03:00:51 +0300 |
commit | 6123d50dfb4c85cf6a3d10f68a7499b7daeb8c06 (patch) | |
tree | fff0da9f02c33b2e50cb21bf707110327531b4f7 /src/osmo-bsc/chan_alloc.c | |
parent | b4b48947533c0eb6319eb66c3f8e07b20b81dc78 (diff) | |
parent | 0abc3f2f45566bb64f2417a47ca73b9e1a6710c1 (diff) |
Merge fairwaves/WIP-dyn-chan-load into fairwaves/production
Diffstat (limited to 'src/osmo-bsc/chan_alloc.c')
-rw-r--r-- | src/osmo-bsc/chan_alloc.c | 11 |
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) |