aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2016-07-27 15:16:29 +0200
committerHarald Welte <laforge@gnumonks.org>2016-08-30 07:35:47 +0000
commit3b2e5de3aea8652969e7bbd1e3c04206dce51330 (patch)
treee7d8dc6e28034ab5a9e84ee8f56192e9b134868e /src
parent988f634c97d070840f4ffc952f6bac32d967859b (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/common/measurement.c16
1 files changed, 1 insertions, 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];