From 2afffd5cf67ad84c4fd8e589798b8697b809ebc5 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Sun, 25 Sep 2016 17:01:20 +0200 Subject: Revert "bts: extend bts_chan_load to allow counting tch only" This reverts commit 308cb0719dca3ba8eed1eff2a2124d44f34d9a28. Problems in this commit: openbsc/src/libbsc/chan_alloc.c:523: case GSM_PCHAN_TCH_F_PDCH: This is actually wrong, GSM_PCHAN_TCH_F_PDCH use ts->flags, not ts->dyn below (due to historical reasons and could be unified). 560: if (only_count_tch && !chan_is_tch(ts)) This has exactly one effect: it excludes GSM_PCHAN_TCH_F_PDCH when in PDCH mode, because for all other PDCH (plain PDCH and TCH/F_TCH/H_PDCH in PDCH mode) below ts_subslots() returns 0 and skips the for() loop. I consider this a bug in TCH/F_PDCH, to be fixed in an upcoming commit. I don't see why we need the only_count_tch argument, because this should normally only count TCH, weren't it for the TCH/F_PDCH bug. If dyn TS should be counted differently, we should do this in a different way. Change-Id: I34dbbaf53a800115e3d03bd44028cad675f3b525 --- openbsc/include/openbsc/chan_alloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbsc/include') diff --git a/openbsc/include/openbsc/chan_alloc.h b/openbsc/include/openbsc/chan_alloc.h index d919b5105..78242e5b7 100644 --- a/openbsc/include/openbsc/chan_alloc.h +++ b/openbsc/include/openbsc/chan_alloc.h @@ -46,7 +46,7 @@ struct pchan_load { struct load_counter pchan[_GSM_PCHAN_MAX]; }; -void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts, int only_count_tch); +void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts); void network_chan_load(struct pchan_load *pl, struct gsm_network *net); int trx_is_usable(struct gsm_bts_trx *trx); -- cgit v1.2.3