path: root/src/osmo-bsc
diff options
authorHarald Welte <laforge@gnumonks.org>2019-05-23 21:58:21 +0200
committerHarald Welte <laforge@gnumonks.org>2019-05-24 09:12:57 +0000
commit744886ae96d74cb60ef03bb209d46b250af54612 (patch)
tree49a462a9896f9cb94be0ad0e31e0a06ddfddaefa /src/osmo-bsc
parent228daade29478d98f1b48764cf739bb1e4ef489e (diff)
chan_alloc: Don't include CBCH channels in load computation
When displaying the channel (lchan) load, we are interested in the dedicated channels as available for communication with mobile stations. If CBCH is enabled, it "steals" one of the SDCCH slots, so we have to exclude this channel from the count of available dedicated channels. Before this patch, A CBCH would show up as "in use" dedicated channel (so both the total and the in_use count were incremented). After this patch, neither "total" nor "use" are affected; The CBCH slot is completely excluded from load statistics. Change-Id: I606962e4977f122ff05a2d4e756c04c7f38bdaa0
Diffstat (limited to 'src/osmo-bsc')
1 files changed, 4 insertions, 0 deletions
diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c
index 9c434145f..7f0aa31aa 100644
--- a/src/osmo-bsc/chan_alloc.c
+++ b/src/osmo-bsc/chan_alloc.c
@@ -59,6 +59,10 @@ void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts)
ts_for_each_lchan(lchan, ts) {
+ /* don't even count CBCH slots in total */
+ if (lchan->type == GSM_LCHAN_CBCH)
+ continue;
switch (lchan->fi->state) {