diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2021-05-19 02:28:26 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2021-05-31 05:20:03 +0000 |
commit | 27c07690d9ece5c8e752a40b5276934bfa1326e3 (patch) | |
tree | be095a148a490b92610cb4b75518cc5e0ba60c0e /src/osmo-bsc/chan_alloc.c | |
parent | e262919892ab58fe122ae203d745bd2b6a45626e (diff) |
replace ts_*_for_each_lchan() with ts_for_n_lchans()
So far we have a couple of macros iterating a specific number of lchans,
depending on dynamic timeslot state etc. With addition of VAMOS lchans,
this would become more complex and bloated.
Instead of separate iteration macros for each situation, only have one
that takes a number of lchans as argument. That allows to more clearly
pick the number of lchans, especially for non-trivial VAMOS scenarios.
Related: SYS#5315 OS#4940
Change-Id: Ib2c6baf73a81ba371143ba5adc912aef6f79238d
Diffstat (limited to 'src/osmo-bsc/chan_alloc.c')
-rw-r--r-- | src/osmo-bsc/chan_alloc.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c index 3569d4eaa..402ca4603 100644 --- a/src/osmo-bsc/chan_alloc.c +++ b/src/osmo-bsc/chan_alloc.c @@ -73,15 +73,7 @@ void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts) pl->total++; } - /* Count allocated logical channels. - * Note: A GSM_PCHAN_TCH_F_TCH_H_PDCH can be switched - * to a single TCH/F or to two TCH/H. So when it's in - * the TCH/H mode, total number of available channels - * is 1 more than when it's in the TCH/F mode. - * I.e. "total" count will fluctuate depending on - * whether GSM_PCHAN_TCH_F_TCH_H_PDCH timeslot is - * in TCH/F or TCH/H (or in NONE/PDCH) mode. */ - ts_for_each_lchan(lchan, ts) { + ts_for_n_lchans(lchan, ts, ts->max_primary_lchans) { /* don't even count CBCH slots in total */ if (lchan->type == GSM_LCHAN_CBCH) continue; |