From 3b2e5de3aea8652969e7bbd1e3c04206dce51330 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 27 Jul 2016 15:16:29 +0200 Subject: dyn TS: measurement: use correct nr of subslots, rm code dup In measurement.c, fix the number of sublots for TCH/F_TCH/H_PDCH, by using ts_subslots() from gsm_data_shared.c. The local dup of subslots_per_pchan[] is no longer needed. (depends on recent commit to openbsc.git for ts_sublots()) Change-Id: I9d9df470c49487bffd56dde42c7bec0da2f50642 --- src/common/measurement.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/common/measurement.c b/src/common/measurement.c index d0b84d5d..be1d4f64 100644 --- a/src/common/measurement.c +++ b/src/common/measurement.c @@ -200,24 +200,10 @@ static int lchan_meas_check_compute(struct gsm_lchan *lchan, uint32_t fn) return 1; } -/* Copied from OpenBSC and enlarged to _GSM_PCHAN_MAX */ -static const uint8_t subslots_per_pchan[_GSM_PCHAN_MAX] = { - [GSM_PCHAN_NONE] = 0, - [GSM_PCHAN_CCCH] = 0, - [GSM_PCHAN_CCCH_SDCCH4] = 4, - [GSM_PCHAN_CCCH_SDCCH4_CBCH] = 4, - [GSM_PCHAN_TCH_F] = 1, - [GSM_PCHAN_TCH_H] = 2, - [GSM_PCHAN_SDCCH8_SACCH8C] = 8, - [GSM_PCHAN_SDCCH8_SACCH8C_CBCH] = 8, - [GSM_PCHAN_TCH_F_PDCH] = 1, - /* dynamic pchan are handled outside of this array */ -}; - static int ts_meas_check_compute(struct gsm_bts_trx_ts *ts, uint32_t fn) { int i; - const int num_subslots = subslots_per_pchan[ts->pchan]; + const int num_subslots = ts_subslots(ts); for (i = 0; i < num_subslots; ++i) { struct gsm_lchan *lchan = &ts->lchan[i]; -- cgit v1.2.3